function OpenImage(imageURL, imageHeight, imageWidth){
	var options = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1';
	options += ',width=' + (imageWidth + 20) + ',height=' + (imageHeight+20) + '';
	
	window.open(imageURL, '', options);			
}

// values are URL, Name of popup (can be anything), width, height, scrollbars? 1 = yes, 0 = no, resizable? 1 = yes, 0 = no)
function popup(URL,PageName,w,h,scrollable,resizable){
	// if there is no URL specified, exit.
	if (URL == "") return false;
	// check the other options, and set them to something if they are empty
	if (PageName == "") PageName = "popup window";
	//if (w=="") w = 768;
	//if (h=="") h = 500;
	//if (scrollable == "0") scrollable = 0;
	//if (resizable == "") resizable = 0;
	w = 768;
	h = 500;
	scrollable = 1;
	resizable = 1;
	
	//alert(URL+", "+PageName+", "+w+", "+h+", "+scrollable+", "+resizable);
	// center the popup on the screen
	var LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	// or set the position manually
	//var LeftPosition = 100
	//var TopPosition = 100

	// get the page settings
	var settings = ("height="+h+",width="+w+",top="+TopPosition+",left="+LeftPosition+",scrollbars="+scrollable+",resizable="+resizable);
	// now open the popup using the above settings
	myWindow = window.open(URL,PageName,settings);
	// and make the window appear in the foreground.
	myWindow.window.focus();
}
