// JavaScript Document
function addBookmark(title,url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, window.parent.location.href,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
			return true;
		}
	}
	
function checkformSearch ( form ){
	if (form.searchword.value.length < 4) 
	{ 
	alert("Voer een zoekwoord in van minstens 4 karakters."); 
	return false; 
	} 
	return true ;
}


function checkAanmeldForm ( form )
{
  if (form.mailad.value == "") {
    alert( "Vul je e-mail adres in." );
    form.mailad.focus();
    return false ;
  }
  return true ;
}

function checkAfmeldForm ( form )
{
  if (form.mailad.value == "") {
    alert( "Vul je e-mail adres in." );
    form.mailad.focus();
    return false ;
  }
  return true ;
}
	
// highlighting button onload
function highlightButtons(){
	catMenu(cat, '_over');
	}

// highlighting buttons menu onmouseover
function catMenu(id, newClass) {
	if (! document.getElementById )
        return;
		//alert(id);
	if (id == cat){ newClass = "_over";}
	newClass = "menu_a"+newClass;
	//alert(newClass);
	var testId = document.getElementById (id);
	if (! testId )
		//alert("stop");
		return;
    document.getElementById(id).className=newClass;
}

function changeSrc(id, newSrc) {
   document.getElementById(id).src=newSrc;
} 

//open browserwindow
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function huurinfo(){
	MM_openBrWindow('http://www.erocinema.nl/huurinfo.html','huurinfo','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=480,height=326,left=20,top=20')
}

function coverWin(theFront,theBack) { 
theURL = "http://panorama.maxx-xs.nl/covers.php?front="+theFront+"&back="+theBack; 
winName = "Covers";              
features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=470,height=710,top=0,left=0';           
xsWin = window.open(theURL,winName,features); 
xsWin.focus(); 
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, 'freeclip', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=330,left = 440,top = 362');");
}

// Cookies
function createCookie(name,value,days){
	if (days){
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	//alert("Expires: "+expires);
}

function readCookie(name){
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++){
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function resizeDiv() {
	document.getElementById('content').style.height = (document.getElementById('body').scrollHeight - 113)+"px";
}
function reloadpage(delay){
setTimeout("document.location.reload();",delay);
}

function openWin() {               
theURL = "http://www.maxx-xs.nl/pages/covers.php?front=http://www.maxx-xs.nl/images/covers/large/cover_6769_front.jpg&back=http://www.maxx-xs.nl/images/covers/large/cover_6769_back.jpg";              
winName = "Covers";              
features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=476,height=726,top=0,left=0';           
xsWin = window.open(theURL,winName,features);              
xsWin.focus();       
}   

function rightclickbuttons()
{
	return false;
}

function adserver(adId,linkCode,zoneId){
	document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
	document.write ("http://adserver1.megaclick.nl/adjs.php?n="+adId+"");
	document.write ("&amp;what=zone:"+zoneId+"&amp;source=link"+linkCode+"&amp;target=_blank");
	document.write ("&amp;exclude=" + document.phpAds_used);
	document.write ("'><" + "/script>");
	document.write ("<noscript><a href='http://adserver1.megaclick.nl/adclick.php?"+adId+"' target='_blank'><img src='http://adserver1.megaclick.nl/adview.php?what="+zoneId+"&amp;source=link"+linkCode+"&amp;target=_blank&amp;n="+adId+"' border='0' alt='' /></a></noscript>");
}
  
  


