var image
var width,height
var cond1,cond2
function galleryWindow(image,width,height) {
        if (width==0) cond1=" "
                else cond1="left="+((screen.width-width)/2)+",width="+(width+50)+"";
        if (height==0) cond2=" "
                else cond2="top="+((screen.height-height)/2)+",height="+(height+50)+"";
		var html  = ""
			html += "<html><head><title>&nbsp;</title>"
			html += "<meta http-equiv='imagetoolbar' content='no'>" 
			html += "</head><body bgcolor='#FFFFFF'>" 
			html += "<table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%'>"
			html += "<tr><td align='center' valign='middle'>"
			html += "<img src='"+image+"' width='"+width+"' height='"+height+"' border='0'>"
			html += "</td></tr></table></body></html>"
        ImageWindow=window.open("", "","toolbar=no,scrollbars=no,menubar=no,"+cond1+","+cond2);
        ImageWindow.document.write(html)
        ImageWindow.document.close()
}
function centerWindow(url,width,height,scroll){
		window.open(url,"","scrollbars="+scroll+",width="+(width+20)+",height="+(height+30)+",top="+((screen.height-height)/2)+",left="+((screen.width-width)/2));
}
