///////algemeen///////

	// bookmark script
	function CreateBookmarkLink(dn,ai,rc,wl) {
		url = dn;
		title = "MeJane.com - Online films en trailers kijken!";   
		
		if (ai!="") {
			url=url+"?ai="+ai;
			if (rc!="") {
				url=url+"&refcode="+rc;
			}
			if (wl!="") {
				title = "Online films en trailers kijken!";   	
				url=url+"&version="+wl;
			}
		}
	
		if (window.sidebar) { 	// Mozilla Firefox Bookmark	
			window.sidebar.addPanel(title, url,"");	
		}
		else if( window.external ) { // IE Favorite		
			window.external.AddFavorite(url,title)
		}	
	} 
	
	// show the word 'code' in password field
	function codeword() {
		if(document.getElementById('password-field').value!==''){document.getElementById('password-field').style.backgroundImage='';}
		if(document.getElementById('email').value==''){document.getElementById('email').value='e-mailadres';}
	
	}

	// show freemovie script Startpagina.nl	
	function showFreeMovie(ai) {
		if (document.getElementById('gratisfilm')){
			if (ai == "139"){ 
				var x = readCookie('firstmovie')
				if (x == "139") {
				}
				else{
					document.getElementById('gratisfilm').style.display = 'block';
					document.getElementById('gratisfilmtxt').style.display = 'block';
				}
			}
		}
	}
	
	function closeFreeMovie(ai) {
		document.getElementById('gratisfilm').style.display = 'none'; 
		document.getElementById('gratisfilmtxt').style.display = 'none'; 
		createCookie('firstmovie',ai,7000);	
	}
	
	// whitelabel loginpopup script
	function openLoginPop() {
		document.getElementById('loginpop').style.display = 'block';
		document.getElementById('loginpoptxt').style.display = 'block';
	}
	
	function closeLoginPop() {
		document.getElementById('loginpop').style.display = 'none'; 
		document.getElementById('loginpoptxt').style.display = 'none'; 
	}
	
	// wis de standaard tekst in invoervelden
	function clearDefault(el) {
	  if (el.defaultValue==el.value) el.value = ""
	}
	
	//open popups
	function popups(pwidth, pheight, url, scrollbars) {
		var left = (window.screen.width/2 - pwidth/2);
		var top = (screen.height/2 - pheight/2);
		newwindow=window.open(''+url+'','','width='+pwidth+',height='+pheight+',left='+left+',top='+top+',scrollbars='+scrollbars+',dependent=yes,alwaysRaised=1');
	}

	//html popup read vars
	function gup( name ){  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  var regexS = "[\\?&]"+name+"=([^&#]*)";  var regex = new RegExp( regexS );  var results = regex.exec( window.location.href );  if( results == null )    return "";  else    return results[1];}
	
	// date script bottom website 
	maanden = new Array('januari','februari','maart','april','mei','juni','juli','augustus','september','oktober','november','december');
	function maakDatum(datum) {
		var d= datum.getDate();
		var m = maanden [datum.getMonth()];
		var j = datum.getFullYear();
		var datumstring = d + " " +  m + " " + j;
		return datumstring;
	}
	
	// show active channel in topmenu
	function myCurrent(wat, subject) {
		if (wat == "films" || wat == "filmsnachtclub"){
			if (document.getElementById('btnthuisbios')) {
				if(wat == "filmsnachtclub"){
					document.getElementById('btnnachtclub').style.backgroundImage="url('/images/tmnachtclubomo.gif')";
					}
				else{
					document.getElementById('btnthuisbios').style.backgroundImage="url('/images/tmthuisbiosomo.gif')";
					}
			} 
			if (document.getElementById('smbtnthuisbios')) {
				document.getElementById('smbtnthuisbios').style.backgroundImage="url('/images/smthuisbiosomo.gif')";
			} 
			else if (document.getElementById('smbtnthuisbios18')) {
				document.getElementById('smbtnthuisbios18').style.backgroundImage="url('/images/smthuisbios18omo.gif')";
			}
		}
		if (wat == "trailers"){
			if (document.getElementById('btnthuisbios')) {
				document.getElementById('btnthuisbios').style.backgroundImage="url('/images/tmthuisbiosomo.gif')";
			} 
			if (document.getElementById('smbtntrailers')) {
				document.getElementById('smbtntrailers').style.backgroundImage="url('/images/smtrailersomo.gif')";
			} 
		}
		if (wat == "nachtclub"){
			if (document.getElementById('btnnachtclub')) {
				document.getElementById('btnnachtclub').style.backgroundImage="url('/images/tmnachtclubomo.gif')";
			} 
		}
		if (wat == "klantenservice"){ 
			if (subject == "faq") {
				document.getElementById('faq').style.display="block";
			}
			if (subject == "pctv" || subject == "mce" || subject == "pczapper" || subject == "doehetzelf" || subject == "draadloos") {
				document.getElementById('pctv').style.display="block";
			}
			if (subject == "mijngegevens" || subject == "dezemaand" || subject == "facturen" || subject == "persoonsgegevens" || subject == "abonnementen") {
				document.getElementById('mijngegevens').style.display="block";
			}
		}
		
	}
	
	//detect browser
	var detect = navigator.userAgent.toLowerCase();  
	var OS,browser,version,total,thestring;    
	
	if (checkIt('konqueror'))  {   
		browser = "Konqueror";   
		OS = "Linux";  
	}  
	else if (checkIt('safari')) 
		browser = "Safari";  
	else if (checkIt('omniweb')) 
		browser = "OmniWeb";  
	else if (checkIt('opera')) 
		browser = "Opera";  
	else if (checkIt('webtv')) 
		browser = "WebTV";  
	else if (checkIt('icab')) 
		browser = "iCab";  
	else if (checkIt('msie')) 
		browser = "Internet Explorer";  
	else if (!checkIt('compatible'))  {   
		browser = "Netscape Navigator";   
		version = detect.charAt(8);  
	}  
	else browser = "An unknown browser";    
	
	if (!version) version = detect.charAt(place + thestring.length);    if (!OS)  {   if (checkIt('linux')) OS = "Linux";   else if (checkIt('x11')) OS = "Unix";   else if (checkIt('mac')) OS = "Mac";   else if (checkIt('win')) OS = "Windows";   else OS = "an unknown operating system";  }    function checkIt(string)  {   place = detect.indexOf(string) + 1;   thestring = string;   return place;  }  
	
	// start focus on formfield
	function startFocus(element) {
		if (document.getElementById(element)){
			document.getElementById(element).focus()
		}
	}
	
	// general check if numbers are present in form field
	function checkForNumbers(naampje) {
		var nummer = 0;
		for (i=0;i<naampje.length;i++) {
			if (!isNaN(naampje.charAt(i)) && naampje.charAt(i)!=" ") {
				nummer = 1;
			}
		}
		return nummer;
	}

	// creating cookies for favorites
	function createCookie(name,value,days) {
		var x = readCookie(name)
		if (x) {
			x = x+","+value;
			arr_value = x.split(",");
			arr_value = unique(arr_value);
			for (var i = 0; i < arr_value.length; i++) {
				if(i == 0){
				value = arr_value[i];
				}
				else{
				value = value+","+arr_value[i];
				}
			} 
		}
		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=/";
		if (days !== -1){
			if (name == 'favorites'){
				alert("Deze film is toegevoegd aan je favorieten!");
				}
			else if (name == 'favoritetrailers'){
				alert("Deze trailer is toegevoegd aan je favorieten!");
				}
			else if (name == 'favoritewebcams'){
				alert("Dit model is toegevoegd aan je favorieten!");
				}
			else if (name == 'blockedwebcams'){
				alert("Dit model wordt niet meer getoond!");
				location.reload(true);
				}
			else {
				}
		}
	}
	
	function changeCookie(name,value,days) {
		var x = readCookie(name)
		if (x) {
			arr_value = x.split(",");
			arr_value = unique(arr_value);
			deleteitem = value;
			$a = 0;
			for (var i = 0; i < arr_value.length; i++) {
					if (arr_value[i] == deleteitem){
						//verwijder
					}
					else{
							if($a == 0){
							value = arr_value[i];
							}
							else{
							value = value+","+arr_value[i];
							}
							$a++;
					}
			} 
		}
		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=/";
		if (arr_value.length == 1) {
			eraseCookie(name);
		}
		location.reload(true);
	}
	
	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 eraseCookie(name) {
		createCookie(name,"",-1);
	}

	// part of cookie script
	function unique(a) {
		tmp = new Array(0);
		for(i=0;i<a.length;i++){
			if(!contains(tmp, a[i])){
				tmp.length+=1;
				tmp[tmp.length-1]=a[i];
			}
		}
		return tmp;
	}

	// part of cookie script
	function contains(a, e) {
		for(j=0;j<a.length;j++)if(a[j]==e)return true;
		return false;
	}

	// show png images in IE6 or lower
	function replaceImgpng(img, id){
		if (browser == "Internet Explorer"){ 
		which= img;
		if (id){ which = img + id;}
		document.getElementById(which).src = "/images/blank.gif"; 
		document.getElementById(which).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/" + img + ".png', sizingMethod='image')"; 
		}
	}

	// less pretty, but needed for some starratings, because no unique ID is present
	function replaceImg(url,target,img,imgblank,title,align,valign){
		if(url){
			document.write('<a href="'+url+'" target="'+target+'">');
		}
			if (browser == "Internet Explorer"){   
				document.write("<img src=\"/images/"+imgblank+"\" alt=\""+title+"\" title=\""+title+"\" border=\"0\" align=\""+align+"\" valign=\""+valign+"\" style=\"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/"+img+"', sizingMethod='image');\" >");  
			}  
			else {   
				document.write('<img src="/images/'+img+'" alt="'+title+'" title="'+title+'" border="0" align="'+align+'" valign="'+valign+'" />');  
			}  
		if(url){
			document.write('</a>');
		}
	
	
	}

	// for replacing arrows written by php scripting for whitelabel images
	function replaceImgAI(img){
		if (browser == "Internet Explorer"){ 
			document.getElementById(img).src = "/images/blank.gif"; 
			document.getElementById(img).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/" + img + ".png', sizingMethod='image')"; 
		}
		else{
			document.getElementById(img).src = "/images/" + img + ".png"; 
		}
	}
	
	// show MSN presence
	function showpresence(presence)
	{
	  if(presence.statusText == 'Online'){
		if(document.getElementById("msnchat")){
			document.getElementById("msnchat").style.display = "inline";
		}
		if(document.getElementById("msnchattop")) {
			document.getElementById("msnchattop").style.display = "inline";
		}
	  }
	}

///////enkel klantenservice///////

	// mce + pczapper screenshots
	function imagepopups(myWidth, myHeight, photo) {
		var ns = navigator.appName.indexOf('Netscape')!=-1 && !ie && !opera;
		var dirname = "images";
		var newWin = 0;
		var left = (window.screen.width/2 - myWidth/2);
		var top = (screen.height/2 - myHeight/2);
		//browsercheck
		//if (ns){myHeight+=0;}
		newWin ++;
		addBar = 'no';
		if (myHeight > screen.availheight - 24){ 
			myHeight = screen.availheight - 24; 
			addBar = 'yes'; myWidth +=16;
		}
		if (myWidth > screen.availwidth){ 
			myWidth = screen.availwidth; 
			addBar = 'yes';
		}
		myFeatures=('width='+myWidth+',height='+myHeight+',left='+left+',top='+top+',scrollbars='+addBar+',dependent=yes,alwaysRaised=1');
		myWin=open('',newWin,myFeatures);
		myWin.document.open();
		myWin.document.write('<html><head><title>Mejane.com</title>');
		myWin.document.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
		myWin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>');
		myWin.document.write('<body style="padding:0px; margin:0px;">');
		myWin.document.write('<a href="javascript:window.close();" style="cursor:pointer;"><img src="'+dirname+'/'+photo+'" border="0" width="'+myWidth+'" height="'+myHeight+'" alt="Klik om te sluiten" title="Klik om te sluiten"></a></body></html>');
		myWin.document.close();
	}
	
	// check on toegangscodevergeten page
	function checkPincodeForm() {
	
		doorgaan = true;
		var str=document.submitform.emailadres.value;
		var filter=/^.+@.+\..{2,3}$/;
	
		if (document.submitform.emailadres.value == '') {
			doorgaan = false;
			var foutmelding = "Er is geen e-mailadres ingevuld";
			document.submitform.emailadres.focus();
		} else if (!filter.test(str)) {
			doorgaan = false;
			var foutmelding = "Er is geen geldig e-mailadres ingevoerd.";
			document.submitform.emailadres.value = '';
			document.submitform.emailadres.focus();
		}
	
		if (doorgaan == true) {
			return true;
		}else {
			alert(foutmelding);
			return false;
		}	
	}
	
	// check 'mijn gegevens' form
	function checkMijngegevensForm() {
		doorgaan = "true";
	
		//straatnaam check
		if (document.displayform.straatnaam.value.length>0 && checkForNumbers(document.displayform.straatnaam.value)) {
			doorgaan = "false";
			foutmelding = "Straatnaam mag geen cijfers bevatten.";
			document.displayform.straatnaam.focus();
		}else if (document.displayform.straatnaam.value.length>0 && document.displayform.straatnaam.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een straatnaam heeft minimaal 2 karakters.";
			document.displayform.straatnaam.focus();
		//huisnummer check
		}else if (document.displayform.huisnummer.value.length>0 && isNaN(document.displayform.huisnummer.value)) {
			doorgaan = "false";
			foutmelding = "Een huisnummer mag alleen bestaan uit cijfers.";
			document.displayform.huisnummer.focus();
		//telefoonnummer check
		}else if (document.displayform.woonplaats.value.length>0 && checkForNumbers(document.displayform.woonplaats.value)) {
			doorgaan = "false";
			foutmelding = "Een woonplaats mag geen cijfers bevatten.";
			document.displayform.woonplaats.focus();
		}else if (document.displayform.woonplaats.value.length>0 && document.displayform.woonplaats.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een woonplaats heeft minimaal 2 karakters.";
			document.displayform.woonplaats.focus();
		}else if (document.displayform.telefoonnummer.value.length>0 && isNaN(document.displayform.telefoonnummer.value)){
			doorgaan = "false";
			foutmelding = "Een telefoonnummer mag alleen uit cijfers bestaan.";
			document.displayform.telefoonnummer.focus();
		}else if (isNaN(document.displayform.newpin.value.charAt(0)) || isNaN(document.displayform.newpin.value.charAt(1)) || isNaN(document.displayform.newpin.value.charAt(2)) || isNaN(document.displayform.newpin.value.charAt(3))){
			doorgaan = "false";
			foutmelding = "De toegangscode dient uit 4 cijfers te bestaan.";
			document.displayform.newpin.value = '';
			document.displayform.newpincheck.value = '';
			document.displayform.newpin.focus()
		}else if(document.displayform.newpin.value.length>0 && document.displayform.newpin.value.length < 4) {
			doorgaan = "false";
			foutmelding = "De toegangscode dient uit 4 cijfers te bestaan.";
			document.displayform.newpin.value = '';
			document.displayform.newpincheck.value = '';
			document.displayform.newpin.focus()
		}else if(document.displayform.newpin.value != document.displayform.newpincheck.value) {
			doorgaan = "false";
			foutmelding = "De ingevoerde toegangscodes zijn niet gelijk. Voer beide opnieuw in.";
			document.displayform.newpin.value = '';
			document.displayform.newpincheck.value = '';
			document.displayform.newpin.focus();
		}
		//onderscheid NL en BE
		if (document.displayform.land.value == ""){
			doorgaan = "false";
			foutmelding = "Er is geen land ingevuld.";
		}
		if (document.displayform.land.value == "België"){
			if (document.displayform.postcode.value.length>0 && (isNaN(document.displayform.postcode.value))){
				doorgaan = "false";
				foutmelding = "Er is geen nummerieke postcode ingevuld.";
				document.displayform.postcode.focus();
			}else if (document.displayform.postcode.value.length<4 || document.displayform.postcode.value.length>4) {
				doorgaan = "false";
				foutmelding = "Een postcode bestaat uit 4 cijfers.";
				document.displayform.postcode.focus();
			}else if (document.displayform.telefoonnummer.value.length>0 && document.displayform.telefoonnummer.value.length<9){
				doorgaan = "false";
				foutmelding = "Een telefoonnummer moet uit 9 of 10 cijfers bestaan.";
				document.displayform.telefoonnummer.focus();
			}
		}
		else{
			//postcode check
			if (document.displayform.postcode.value.length>0 && document.displayform.postcode.value.length<6) {
				doorgaan = "false";
				foutmelding = "Een postcode heeft 6 posities.";
				document.displayform.postcode.focus();
			}else if (document.displayform.postcode.value.length>0 && (isNaN(document.displayform.postcode.value.charAt(0)) || isNaN(document.displayform.postcode.value.charAt(1)) || isNaN(document.displayform.postcode.value.charAt(2)) || isNaN(document.displayform.postcode.value.charAt(3)) || !isNaN(document.displayform.postcode.value.charAt(4)) || !isNaN(document.displayform.postcode.value.charAt(5)))){
				doorgaan = "false";
				foutmelding = "Een postcode mag alleen bestaan uit vier cijfers gevolgd door twee letters.";
				document.displayform.postcode.focus();
			}else if (document.displayform.telefoonnummer.value.length>0 && document.displayform.telefoonnummer.value.length<10){
				doorgaan = "false";
				foutmelding = "Een telefoonnummer moet uit 10 cijfers bestaan.";
				document.displayform.telefoonnummer.focus();
			}else if ((document.displayform.telefoonnummer.value.substr(0,4) == "0900") || (document.displayform.telefoonnummer.value.substr(0,4) == "0906") || (document.displayform.telefoonnummer.value.substr(0,4) == "0909")) {
				doorgaan = "false";
				foutmelding = "Het opgegeven telefoonnummer is niet toegestaan.";
				document.displayform.telefoonnummer.focus();
			}else if (document.displayform.telefoonnummer.value.substr(0,1) != "0") {
				doorgaan = "false";
				foutmelding = "Een telefoonnummer moet met een 0 beginnen";
				document.displayform.telefoonnummer.focus();
			}else if (document.displayform.telefoonnummer.value.substr(0,2) == "00") {
				doorgaan = "false";
				foutmelding = "Een telefoonnummer mag niet met 00 beginnen";
				document.displayform.telefoonnummer.focus();
			}
		}
		if (doorgaan=="true") {
			return true;
		}else {
			alert(foutmelding);
			return false;
		}	
	}
	
	// resize iframe nieuwsbrief
	function resizeMe(obj){
		docHeight = nieuwsbrief.document.body.scrollHeight ;
		obj.style.height = docHeight + 10 + 'px' ;
	}

///////enkel draadloos gebeuren bestellen///////

	function orderNow() {
		doorgaan = "true";
		//items ordered check
		//if (!document.displayform.displayhardware16.checked) {
		//	doorgaan = "false";
		//	foutmelding = "Er zijn geen artikelen aangevinkt.";
		//street check
		//}else
		if (document.displayform.straatnaam.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen straatnaam ingevuld.";
			document.displayform.straatnaam.focus();
		}else if (checkForNumbers(document.displayform.straatnaam.value)) {
			doorgaan = "false";
			foutmelding = "Straatnaam mag geen cijfers bevatten.";
			document.displayform.straatnaam.focus();
		}else if (document.displayform.straatnaam.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een straatnaam heeft minimaal 2 karakters!";
			document.displayform.straatnaam.focus();
		//postcode check
		}else if (document.displayform.postcode.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen postcode ingevuld.";
			document.displayform.postcode.focus();
		}else if (document.displayform.postcode.value.length<6) {
			doorgaan = "false";
			foutmelding = "Een postcode heeft 6 posities.";
			document.displayform.postcode.focus();
		}else if (isNaN(document.displayform.postcode.value.charAt(0)) || isNaN(document.displayform.postcode.value.charAt(1)) || isNaN(document.displayform.postcode.value.charAt(2)) || isNaN(document.displayform.postcode.value.charAt(3)) || !isNaN(document.displayform.postcode.value.charAt(4)) || !isNaN(document.displayform.postcode.value.charAt(5))){
			doorgaan = "false";
			foutmelding = "Een postcode mag alleen bestaan uit vier cijfers gevolgd door twee letters.";
			document.displayform.postcode.focus();
		//huisnummer check
		}else if (document.displayform.huisnummer.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen huisnummer ingevuld.";
			document.displayform.huisnummer.focus();
		}else if (isNaN(document.displayform.huisnummer.value)) {
			doorgaan = "false";
			foutmelding = "Een huisnummer mag alleen bestaan uit cijfers.";
			document.displayform.huisnummer.focus();
			//woonplaats check
		}else if (document.displayform.woonplaats.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen woonplaats ingevuld.";
			document.displayform.woonplaats.focus();
		}else if (checkForNumbers(document.displayform.woonplaats.value)) {
			doorgaan = "false";
			foutmelding = "Woonplaats mag geen cijfers bevatten.";
			document.displayform.woonplaats.focus();
		}else if (document.displayform.woonplaats.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een woonplaats heeft minimaal 2 karakters!";
			document.displayform.woonplaats.focus();
		}
		//if an error occurred, display it, else continue
		if (doorgaan=="true") {
			document.displayform.submit();
			//return false
		}else {
			alert(foutmelding);
		}	
	}
	
	function doOrder() {
		doorgaan = "true";
		//pincode check
		if (document.displayform.pincode.value.length <= 0) {
			doorgaan = "false";
			foutmelding = "Geen toegangscode ingevoerd!";
		}else if (isNaN(document.displayform.pincode.value)) {
			doorgaan = "false";
			foutmelding = "Onjuiste toegangscode ingevoerd!";
		}
	}

///////enkel movie pages///////

	// menu swaps
	function moviedetailswap(wat) {
		if(wat == 4){ watt = 3; }	else {	watt = wat;	}
		document.getElementById('btnmoviedetail1').src ="/images/btnmoviedetail1"+watt+".gif";
		document.getElementById('btnmoviedetail2').src ="/images/btnmoviedetail2"+watt+".gif";
		document.getElementById('btnmoviedetail3').src ="/images/btnmoviedetail3"+watt+".gif";
		document.getElementById('moviedetail1').style.display = "none";
		document.getElementById('moviedetail2').style.display = "none";
		document.getElementById('moviedetail3').style.display = "none";
		document.getElementById('moviedetail4').style.display = "none";
		document.getElementById('moviedetail'+wat+'').style.display = "block";
	}

	// menu swaps whitelabel
	function moviedetailswapai(wat) {
		if(wat == 4){ watt = 3; }	else {	watt = wat;	}
		document.getElementById('moviedetail1').style.display = "none";
		document.getElementById('moviedetail2').style.display = "none";
		document.getElementById('moviedetail3').style.display = "none";
		document.getElementById('moviedetail4').style.display = "none";
		document.getElementById('moviedetail'+wat+'').style.display = "block";
	}

	// menu swaps playpage
	function playswap(wat) {
			document.getElementById('btnplay1').src ="/images/btnplay1"+wat+".gif";
			document.getElementById('btnplay2').src ="/images/btnplay2"+wat+".gif";
			document.getElementById('play1').style.display = "none";
			document.getElementById('play2').style.display = "none";
			document.getElementById('play'+wat+'').style.display = "block";
	}

	// menu swaps playpage whitelabel
	function playswaaip(wat) {
			document.getElementById('play1').style.display = "none";
			document.getElementById('play2').style.display = "none";
			document.getElementById('play'+wat+'').style.display = "block";
	}

	// validate review
	function validate()
	{
		var form = document.forms.reviewForm;
		var radio = form.rating;
		for (var i=0;i<radio.length;i++)
		{
			if (radio[i].checked)
			var checked = true;
		}
		if(checked == true)
		{
			return true;
		}
		else
		{
			alert('Je dient bij een review tenminste een cijfer te geven.');
			return false;
	
		}
	}
	
	// shows paymethods or PCTV on movie front page
	var whichTxt = Math.round(Math.random()*2) + 1;
	function showTxt(){
		document.getElementById('blokje'+whichTxt).style.display = 'block';
	}
	
	// start screenshot slideshow
	function runSlideShow(){
		if (document.all){
			document.images.PictureBox.style.filter="blendTrans(duration=2)";
			document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
			document.images.PictureBox.filters.blendTrans.Apply();
		}
	
		document.images.PictureBox.src = preLoad[jss].src;
			
		if (document.all) document.images.PictureBox.filters.blendTrans.Play();
		jss = jss + 1;
		if (jss > (Picture.length-1)) jss=0;
		tss = setTimeout('runSlideShow()', SlideShowSpeed);
	}

/////////enkel betaalscherm

	function toTop(){
		if (parent) parent.location.hash = '#';
	}

///////enkel Webcams///////

	// change schreenshot pics
	function changePic(welk){
		document.getElementById("groot").src = welk;
	}
	
	//check nickname webcamchat
	function checkFormChat(){
			doorgaan = "true";
			if (document.nicknameform.nickname.value.length<4) {
				doorgaan = "false";
				foutmelding = "Nickname is minumaal 4 karakters lang.";
			}else if (document.nicknameform.nickname.value.length>12) {
				doorgaan = "false";
				foutmelding = "Nickname is maximaal 12 karakters lang.";
			}else if (checkForNumbers(document.nicknameform.nickname.value)) {
				doorgaan = "false";
				foutmelding = "Nickname mag geen cijfers bevatten.";
			}
				
			if (doorgaan=="true") {
				return true;
			}else {
				alert(foutmelding);
				return false;
			}
	}
	
///////enkel Webmaster pages///////

	function checkwebmasteremailaddress() {
		doorgaan = "true";
		if (document.submitformemailaddress.emailadres.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen e-mailadres ingevuld";
			document.submitformemailaddress.emailadres.focus();
		}
	
		var str=document.submitformemailaddress.emailadres.value;
		var filter=/^.+@.+\..{2,3}$/;
		if (!filter.test(str)) {
			doorgaan = "false";
			foutmelding = "Er is geen geldig e-mailadres ingevoerd.";
			document.submitformemailaddress.emailadres.focus();
		}
		
		if (doorgaan=="true") {
			document.submitformemailaddress.submit();
		}else {
			alert(foutmelding);
		}	
	}
	
	function checkwebmasterusername() {
		doorgaan = "true";
		if (document.submitformusername.username.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen gebruikersnaam ingevuld";
			document.submitformusername.username.focus();
		}
	
		if (doorgaan=="true") {
			document.submitformusername.submit();
		}else {
			alert(foutmelding);
		}	
	}
	
	function checkwebmasterForm() {
		doorgaan = "true";
		//firstname check
		if (document.displayform.voornaam.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen voornaam ingevuld.";
			document.displayform.voornaam.focus();
		}else if (checkForNumbers(document.displayform.voornaam.value)) {
			doorgaan = "false";
			foutmelding = "Voornaam mag geen cijfers bevatten.";
			document.displayform.voornaam.focus();
		}else if (document.displayform.voornaam.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een voornaam heeft minimaal 2 karakters!";
			document.displayform.voornaam.focus();
		//lastname check
		}else if (document.displayform.achternaam.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen achternaam ingevuld.";
			document.displayform.achternaam.focus();
		}else if (checkForNumbers(document.displayform.achternaam.value)) {
			doorgaan = "false";
			foutmelding = "Achternaam mag geen cijfers bevatten.";
			document.displayform.achternaam.focus();
		}else if (document.displayform.achternaam.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een achternaam heeft minimaal 2 karakters.";
			document.displayform.achternaam.focus();
		//email check
		}else if (document.displayform.email.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen E-mail adres ingevuld";
			document.displayform.email.focus();	
		}else if (document.displayform.username.value.length<=5) {
			doorgaan = "false";
			foutmelding = "Er is geen geldige gebruikersnaam ingevuld (minimaal 6 karakters)";
			document.displayform.username.focus();		
		//woonplaats check
		}else if (document.displayform.wachtwoord.value.length<=3) {
			doorgaan = "false";
			foutmelding = "Er is geen geldig wachtwoord ingevuld (minimaal 4 karakters)";
			document.displayform.wachtwoord.focus();		
		//woonplaats check
		}else if (document.displayform.woonplaats.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen woonplaats ingevuld.";
			document.displayform.woonplaats.focus();
		}else if (checkForNumbers(document.displayform.woonplaats.value)) {
			doorgaan = "false";
			foutmelding = "Woonplaats mag geen cijfers bevatten.";
			document.displayform.woonplaats.focus();
		}else if (document.displayform.woonplaats.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een woonplaats heeft minimaal 2 karakters.";
			document.displayform.woonplaats.focus();
		//adres check
		}else if (document.displayform.adres.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen adres ingevuld.";
			document.displayform.adres.focus();
		}else if (document.displayform.adres.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een adres heeft minimaal 2 karakters.";
			document.displayform.adres.focus();
		//postcode check
		}else if (document.displayform.postcode.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen postcode ingevuld.";
			document.displayform.postcode.focus();
		}else if (document.displayform.postcode.value.length<4) {
			doorgaan = "false";
			foutmelding = "Een Nederlandse postcode heeft 6 karakters, een Belgische 4.";
			document.displayform.postcode.focus();
		//telefoon check
		}else if (document.displayform.telefoon.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen telefoonnummer ingevuld.";
			document.displayform.telefoon.focus();
		}else if (document.displayform.telefoon.value.length<9) {
			doorgaan = "false";
			foutmelding = "Een Nederlands telefoonnummer heeft minimaal 10 karakters, een Belgisch nummer minimaal 9.";
			document.displayform.telefoon.focus();
		//bankgiro check
		}else if (isNaN(document.displayform.rekeningnummer.value)) {
			doorgaan = "false";
			foutmelding = "Het opgegeven rekeningnummer is niet juist.";
			document.displayform.rekeningnummer.focus();
		}else if (document.displayform.rekeningnummer.value.length<6) {
			doorgaan = "false";
			foutmelding = "Een rekeningnummer heeft minimaal 6 karakters.";
			document.displayform.rekeningnummer.focus();
		//rekeninghouder check
		}else if (document.displayform.rekeninghouder.value.length<=0) {
			doorgaan = "false";
			foutmelding = "Er is geen rekeninghouder ingevuld.";
			document.displayform.rekeninghouder.focus();
		}else if (document.displayform.rekeninghouder.value.length<2) {
			doorgaan = "false";
			foutmelding = "Een rekeninghouder heeft minimaal 2 karakters.";
			document.displayform.rekeninghouder.focus();
		//websites check
		}else if (document.displayform.websites.value.length<10) {
			doorgaan = "false";
			foutmelding = "Er is geen website ingevuld.";
			document.displayform.websites.focus();	
		}
		//check for doorgaan email address
		var str=document.displayform.email.value;
		var filter=/^.+@.+\..{2,3}$/;
		if (!filter.test(str)) {
			doorgaan = "false";
			foutmelding = "Er is geen geldig e-mailadres ingevoerd.";
			document.displayform.email.focus();
		}
		//if an error occurred, display it, else continue
		if (doorgaan=="true") {
			document.displayform.submit();
		}else {
			alert(foutmelding);
		}	
	}
	
	function ClipBoard(textarea) {
		deTextArea=document.getElementById(textarea)
		Copied = deTextArea.createTextRange();
		Copied.execCommand("Copy");
	}
	
	function ShowCode(textarea){
		if (document.getElementById(textarea).style.display == "block"){
			document.getElementById(textarea).style.display = "none";	
		}
		else {
			document.getElementById(textarea).style.display = "block";	
		}
	}
	

	function webmastertool(form){
		document.getElementById('algemeen').style.display = "none";	
		document.getElementById('topmenu').style.display = "none";	
		document.getElementById('menulinks').style.display = "none";	
		document.getElementById('koppen').style.display = "none";	
		document.getElementById('blokken').style.display = "none";	
		document.getElementById('logokop').style.display = "none";	
		document.getElementById('webcams').style.display = "none";	
		document.getElementById(form.webmasterwelk.value).style.display = "block";	
	}
	
	function activateBanner(){
		document.getElementById('banner1').style.display = 'block';
		document.getElementById('banner2').style.display = 'block';
		document.getElementById('banner3').style.display = 'block';
	}