/* Opens any .gif, .jpg or .png image thru /bin/phplib/popup_image.php script
** on a new window with no toolbar that is resized automatically based on the size of the 
** image
** Parameters :
**   urlImage = absolute or relative url of the image to open
**   do not refer absolute urls as http://... Relative paths should be refered to the actual php
**   script from where this function is called.
** Optional parameter :
**   Window title, default is NOAA/AOML/PhOD
*********************************************************************/
//$RCSID = '$$';
RCSID = '$$';

function openImage(urlImage) {
    
	var winTitle = arguments[1];
	var w; 	var h; var name; var pageUrl;
	
	name = "imagesautoresize";
	pageUrl = document.location.href;
	
	w = 400;
	h = 200;
	url = "/phod/floridacurrent/bin/phplib/popup_image.php?pTitle="+winTitle+"&pPageUrl="+pageUrl+"&pImgUrl="+urlImage;
	
	var win = window.open(url, name, "resizable=yes,scrollbars=no,toolbar=no,status=no,left=20,top=20,width=" + w + ",height=" + h);
	
    	if (win.opener == null) win.opener = this;
	
    	win.focus();
}
