var agt = navigator.userAgent.toLowerCase(); 
var is_mac = (agt.indexOf("mac")!=-1);
var childWindow = "";

function openpopup(URL,Features,Width,Height) 
{
	childWindow = window.open(URL, "child_window", Features+Width+",height="+Height);
	if (document.images)
	{
		childWindow.focus();
	}
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function openWindow(HTML_URL,W,H,BAR)
{
	if (BAR == "" || !BAR) {	BAR = 'yes';	}
	
	popURL = HTML_URL;
	popFeatures = "directory=no,location=no,toolbar=no,scrollbars="+ BAR +",status=no,resizable=no,width="
	popWidth = W;
	popHeight = H;
	if (childWindow.closed == false) {
		childWindow.close();
		if (is_mac) {
			setTimeout('openpopup(popURL,popFeatures,popWidth,popHeight)',500);
			return;
		}
	}
	openpopup(popURL,popFeatures,popWidth,popHeight);
}

function popup_foto(NR, URL, WIDTH, HEIGHT, NAAM) 
{
	windowprops = "left=5,top=5,width=" + (WIDTH + 40) + ",height=" + (HEIGHT + 65);
	text = "<html><head><title>- VD GEE POTTERY & BAMBOO - </title>";
	text += "<STYLE TYPE=\"text/css\">";
	text += "<!--";
	text += "a:link   { color: #0052B8; font-family: Verdana, Arial, Helvetica; text-decoration: none }";
	text += "a:visited{ color: #0052B8; font-family: Verdana, Arial, Helvetica; text-decoration: none }";
	text += "a:active { color: #000000; font-family: Verdana, Arial, Helvetica; text-decoration: none }";
	text += "a:hover  { color: #000000; font-family: Verdana, Arial, Helvetica; text-decoration: none }";
	text += "TD       { color: #000080; font-family: Verdana, Arial, Helvetica; font-size: 12px; background-color: #D8D7B8; }";
	text += "BODY     { color: #000080; font-family: Verdana, Arial, Helvetica; font-size: 12px; background-color: #D8D7B8; }";
	text += "// -->";
	text += "</STYLE>";
	text += "</head><body bgcolor='#FFFFFF'>";
<!--	text += "<font face='Verdana'>"; //-->
	text += "<center><a href=\"javascript:window.close()\"><img src='" + URL + " 'border=\"2\" style=\"border-style: double; border-color: #000000\" alt=\"Sluit dit Venster\"></a><br>";
<!--	text += "<b>";
	text += "<font face='Verdana'>" + NAAM; 
	text += "</b>";
	text += "<br>&nbsp;";

	text += "<br>&nbsp;";
	text += "<font face='Verdana'><a href=\"index.php?actie=sluit\" target=\"_self\">sluit venster</a>";
	text += "</center></body></html>";
	preview = window.open("", "preview", windowprops);
	preview.document.open();
	preview.document.write(text);
	preview.document.close();
	preview.self.focus();

}

function back(NR) 
{
    history.go(-NR);
}
