var base= "images/"
var normal = new Array();
var active = new Array();
var currChoice=-1;

if (document.images){
	for (i=0;i<menus.length;i++){
		normal[i] = new Image;
		normal[i].src = base + menus[i] + ".gif"
		active[i] = new Image;
		active[i].src = base + menus[i] + "_mo.gif";
	}
}

function over(no){
	if(currChoice!=no){
		if (document.images){
			document.images[menus[no]].src = active[no].src
		}
	}
}

function out(no){
	if(currChoice!=no){
		if (document.images){
			document.images[menus[no]].src = normal[no].src
		}
	}
}

function setChoice(no){
	document.frm2.status.value=(no-1);
	if(no==2){
		document.frm2.text.value="Deze clip gaat veel te ver want...";
	}
	else if(no==3){
		document.frm2.text.value="Deze clip gaat niet te ver want...";
	}
	tmpno=currChoice;
	currChoice=no;
	if(tmpno!=-1){
		out(tmpno);
	}
}

function doAuth(){
	document.frm.submit();
}

function stuurOpinie(){
	if (document.frm2.status.value == -1){
 		alert("Er is geen keuze gemaakt. \nKies voor 'deze clip gaat veel te ver' of 'deze clip gaat niet te ver'");
	}
	else if (document.frm2.name.value == ''){
 		alert("Er is geen naam ingevuld");
 		document.frm2.name.focus();
    }
	else if (!checkMail(document.frm2.email.value)){
 		alert("Er is geen (geldig) email adres ingevuld");
 		document.frm2.email.focus();
    }
	else if (document.frm2.text.value == '' || document.frm2.text.value == 'Deze clip gaat veel te ver want...' || document.frm2.text.value == 'Deze clip gaat niet te ver want...'){
 		alert("Er is geen bericht ingevuld");
 		document.frm2.text.focus();
     }
	else{
		document.frm2.submit();
	}
}

function checkMail(email){
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(email))return true;
	else return false;
}

function setIframeHeight(ifr,pageHeight){
	var x = new getObj(ifr);
	x.style.height = (pageHeight)+"px";
}

function getObj(name){
	if (document.getElementById){
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}
	else if (document.all){
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
	else if (document.layers){
		this.obj = document.layers[name];
		this.style = document.layers[name];
	}
}


