function openSearchWin(h) { 

	var dims 			= new WindowDimensions();
	var screenHeight 	= dims.screen.height;
	var winHeight 		= self.outerHeight;
	var viewPortHeight 	= dims.viewport.inner.height;
	var topPosWin 		= dims.browser.top;
	var leftPosWin 		= dims.browser.left;
	var agent 			= navigator.userAgent.toLowerCase();
	var ie 				= (agent.indexOf('msie 6') != -1) || (agent.indexOf('msie 7') != -1);
	var ff 				= agent.indexOf('firefox') != -1;
	var safari			= agent.indexOf('safari') != -1;
	
	/**
	 * make calculations for top pos, safari for mac subtracts de 22px of the standard Mac menubar, 
	 * FF does not and in IE the vars don't work so add a random 100px 
	 */
	if ( ff ) {
		var extra = 34;
	}
	if ( safari ) {
		extra = 18;
	}
	if (ie ) {
		extra = 158;
	}
	
	// set width & height of screen
	var popWidth = 271;
	var popHeight = 350;
	if ( h == 1200 ) {
		popWidth = 318;
		popHeight = 400;
	}
	if ( h == 1440 ) {
		popWidth = 366;
		popHeight = 450;
	}
	searchWinLeft 	= ie ? 93 : leftPosWin + 93;
	searchWinTop	= ie ? extra : (topPosWin + (winHeight - viewPortHeight) + extra);
	// alert('topposwin ' + topPosWin + '\nwindowhoogte ' + winHeight + '\nviewPortHeight ' + viewPortHeight + '\nleftPosWin ' + leftPosWin);
	//alert(leftPosWin);

	schermpje = window.open('?action=search_win', 'scherm','width='+popWidth+',height='+popHeight+',location=0,status=1,scrollbars=1' );
	schermpje.moveTo(searchWinLeft,searchWinTop);
	schermpje.focus();
	
}

//get current dimensions and positions of basic objects (screen, browser, viewport, window/frame)
//optionally, specify a particular window/frame
//usage:   var dims = new WindowDimensions();
function WindowDimensions(windowFrame)
{
	windowFrame = windowFrame || window;

	//****************************************************//
	//***** screen, browser, and viewport dimensions *****//
	//****************************************************//

	this.screen = {
		width: screen.width,
		height: screen.height,
		//available screen dimensions; excludes taskbar, etc.
		availWidth: screen.availWidth,
		availHeight: screen.availHeight,
		colorDepth: screen.colorDepth
	};
	this.browser = {
		width: window.outerWidth,	//undefined in IE, incorrect in Opera
		height: window.outerHeight,	//undefined in IE, incorrect in Opera
		left: window.screenX,		//undefined in IE, incorrect in Opera
		top: window.screenY			//undefined in IE, incorrect in Opera
	};
	this.viewport = {
		outer: {	//includes scroll bars
			width: window.top.innerWidth,	//undefined in IE
			height: window.top.innerHeight	//undefined in IE
		},
		inner: {	//excludes scroll bars
			width: window.top.document.documentElement.clientWidth,
			height: window.top.document.documentElement.clientHeight
		}
	};

	//***********************************//
	//***** window/frame dimensions *****//
	//***********************************//

	var left, top;

	//scroll position of document
	if(windowFrame.pageYOffset)	//all except IE
	{
		left = windowFrame.pageXOffset;
		top = windowFrame.pageYOffset;
	}
	else if(windowFrame.document.documentElement && !isNaN(windowFrame.document.documentElement.scrollTop))	//IE standards compliance mode
	{
		left = windowFrame.document.documentElement.scrollLeft;
		top = windowFrame.document.documentElement.scrollTop;
	}
	if(!top && !left)	//IE quirks mode
	{
		left = windowFrame.document.body.scrollLeft || 0;
		top = windowFrame.document.body.scrollTop || 0;
	}

	this.window = this.frame = {
		outer: {	//includes scroll bars
			width: windowFrame.innerWidth,	//undefined in IE
			height: windowFrame.innerHeight	//undefined in IE
		},
		inner: {	//excludes scroll bars
			width: windowFrame.document.documentElement.clientWidth,
			height: windowFrame.document.documentElement.clientHeight	//incorrect in quirks mode (equals offsetHeight)
		},
		scroll: {
			width: windowFrame.document.documentElement.scrollWidth,
			height: windowFrame.document.documentElement.scrollHeight,
			left: left,
			top: top
		}
	};
}

function FFAlert() {
	if ( navigator.userAgent.indexOf('Firefox') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) {
		document.writeln('<div id="hulpje" style="color:red; top:350px;">Due to a bug in Firefox for Mac you will be having trouble to see the film on this page. <br />Please try refreshing the page or viewing this page in another webbrowser like Safari.</div>');
	}
}

