///  ScriptSet developed by CreaVision for PINCoding (2005) ///


function popup(winTitel,winURL,winWidth,winHeight,scroll)
{ 
	var win;
	var winTop = (screen.height / 2) - (winHeight/2);
	var winLeft = (screen.width / 2) - (winWidth/2);
	//var winTop = 20
	//var winLeft = 20
	var windowKenmerken = "scrollbars="+scroll +",width="+winWidth+",height="+winHeight+",";
	windowKenmerken += "left="+winLeft+",";
	windowKenmerken += "top="+winTop;
	if(winTitel!="")
	{
		winURL+="?winTitel="+winTitel;
	}
	//win = window.open(winURL,winTitel,windowKenmerken);	
	//win.focus();	
	window.open(winURL,winTitel,windowKenmerken);	
}

function check_frame(url)
{
	
	if(parent.frames.length==0)top.location="http://"+url;	
}	

function popup_foto(winTitel,winURL,winWidth,winHeight,scroll)
{ 
	
	var win;
	var winTop = (screen.height / 2) - (winHeight/2);
	var winLeft = (screen.width / 2) - (winWidth/2);	
	
	var windowKenmerken = "resizable=no,"+"scrollbars="+scroll +",width="+winWidth+",height="+winHeight+",";
	windowKenmerken += "left="+winLeft+",";
	windowKenmerken += "top="+winTop;
	
	win = window.open(winURL,winTitel,windowKenmerken);	
	win.document.open();
	win.document.write('<html><head><title>De Wilde Zee</title></head><body bgcolor="#ffffff" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0"></body></html>');	
	win.document.write("<img src="+winURL+"></div></body></html>");
	win.document.close();
	win.focus();
}

function go_kaart()
{
	window.top.content_frame.left.location.href="../left_kaart.html";
	window.top.content_frame.main.location.href="kaart.php";
}

function go_wijnkaart()
{
	window.top.content_frame.left.location.href="../left_wijnen.html";
	window.top.content_frame.main.location.href="wijnkaart.php";
}

///////////// Script om foto te tonen in nieuw venster /////////////

function viewimage(ifile,ix,iy,ititle)
{ 
	var win;
	var sWidth;
	var sHeight;
	var NS = (document.layers) ? 1 : 0;

	win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");

	if (NS)
	{
		sWidth = win.innerWidth;
		sHeight = win.innerHeight;
	}
	else
	{
	sWidth = win.document.body.clientWidth;
	sHeight = win.document.body.clientHeight;
	}

	if(sWidth!=ix || sHeight!=iy)
	{
	win.close();
	setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
	return;
	}
	win.document.open();
	win.document.write("<html><head><title>"+ititle+"</title>");
	win.document.write("</head><body>");
	win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
	win.document.write("<img src="+ifile+"></div></body></html>");
	win.document.close();
}