
//takes in a url and the height and width that the popup should be
function popup_url( contentURL, popup_width, popup_height) {
	theURL = contentURL;
	//centers the popup to the center of the screen
	var popup_top_margin = Math.round(screen.height - popup_height - ( (screen.height - popup_height)*.75 ) );
	if( popup_top_margin <= 0){ popup_top_margin = screen.height*.01; }
	//opens actual window
	var OpenWindow = window.open(theURL, 'newwin', 'top='+popup_top_margin+',left='+Math.round(screen.width-screen.width*.5-popup_width*.5)+',height='+popup_height+',width='+popup_width+',scrollbars=yes,resizable=no');
}	


function openImage( image, image_width, image_height ) {
				
	used_width = image_width;
	used_height = image_height;
		
	//centers the popup to the center of the screen
	var popup_top_margin = Math.round(screen.height - used_height - ( (screen.height - used_height)*.75 ) );
	if( popup_top_margin <= 0){ popup_top_margin = screen.height*.01; }
	
	var popup_left_margin = Math.round(screen.width-screen.width*.5-used_width*.5)
	
	var OpenWindow=window.open('','newwin','left='+popup_left_margin+',top='+popup_top_margin+',height='+used_height+',width='+used_width+',scrollbars=no, resizable=no' ); 
	OpenWindow.document.write("<html><head><title>ukno.web.creations</title>");
	OpenWindow.document.write("</head><body topmargin=0 leftmargin=0 > ");
	OpenWindow.document.write("<center><table cellpadding=0 cellspacing=0><tr><td><center> ");
	OpenWindow.document.write("<a href='javascript:self.close()' target='_self'><img src='"+image+"' border=0></a>" );
	OpenWindow.document.write("</center></td></tr></table></center> ");
	OpenWindow.document.write("</body></html>");
}	