function popupWindow(Name,imageName,imageWidth,imageHeight) {
    the_window=window.open("","myWindow","width="+(imageWidth+60)+",height="+(imageHeight+60), scrollbars=0);
    the_window.document.writeln('<html><head><title>'+Name+'</title></head>');
  	the_window.document.writeln('<body bgcolor="#FFFFFF" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">');
  	the_window.document.writeln('<table height="'+(imageHeight+60)+'"border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td height="100%" align="center" valign="middle">');
    the_window.document.writeln('<a href="javascript:close()"><img src="'+imageName+'" border="0" alt="'+Name+' is currently loading"></a>');
    the_window.document.writeln('</td></tr></table>');
    the_window.document.writeln('</body></html>');
  	var screen_height = window.screen.availHeight;
	var screen_width = window.screen.availWidth;
	var left_point = parseInt(screen_width/ 2) - imageWidth/2;
	var top_point = parseInt(screen_height/ 2) - imageHeight/2;
	the_window.moveTo(left_point, top_point);
}

function simplerpopupWindow(URL,imageName,imageWidth,imageHeight) {
    the_window=window.open(URL,imageName,"width="+(imageWidth+60)+",height="+(imageHeight+60), scrollbars=0);
  
  	var screen_height = window.screen.availHeight;
	var screen_width = window.screen.availWidth;
	var left_point = parseInt(screen_width/ 2) - imageWidth/2;
	var top_point = parseInt(screen_height/ 2) - imageHeight/2;
	the_window.moveTo(left_point, top_point);
}