///////algemeen///////

	// huur/koop/DivX checkboxjes
	function check(wel, niet, niett){
		var x=document.forms.ptfilterform;
		if(x[niet]){x[niet].checked=false;}
		if(x[niett]){x[niett].checked=false;}
		if(x[wel]){x[wel].checked=true;}
	}

	// Google Analytics script
	var theName;
	function grabName(e){ 
		var targ;
		if (!e) var e = window.event;
		if (e.target) targ = e.target;
		else if (e.srcElement) targ = e.srcElement;
		if (targ.nodeType == 3) {targ = targ.parentNode;}
		theName=targ.name;
		if(theName){GoogleCounter(theName);}
	}
	
	document.onclick=grabName;
	
	function GoogleCounter(which){
		var totalcode = which;
		var singlecodes = new Array();
		singlecodes = totalcode.split('_');
		if(singlecodes[0] == "GC"){
			pageTracker._trackEvent(singlecodes[1], singlecodes[2], singlecodes[3]);
		}
		if(singlecodes[0] == "GCSM"){
			socialmedia_listener(singlecodes[1], singlecodes[2]);
		}
		if(singlecodes[0] == "GCT"){
			alert(singlecodes[1] + singlecodes[2] + singlecodes[3]);
		}
	}

	// 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 && navigator.appName !== "Netscape" ) { // IE Favorite		
			window.external.AddFavorite(url,title)
		}	
		else {
			alert("Klik [CTRL] + D om te bookmarken in Chrome, Opera of Safari");
		}
	} 
	
	// 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 = ""
	}

	//show overlay windows
	function ShowOverlay(wat) {
		if(document.getElementById(wat).style.display == "block"){
			document.getElementById(wat).style.display = "none";
			}
		else{
			document.getElementById(wat).style.display = "block";
			document.getElementById(wat).className+=" "+wat;
		}
	}
	//show overlay windows
	function ShowOverlayOpen(wat) {
			document.getElementById(wat).style.display = "block";
	}
	//hide overlay windows
	function ShowOverlayClose(wat) {
		document.getElementById(wat).style.display = "none";
	}

	//show/hide contactform items
	function ShowContactItems(wat, welk) {
			document.getElementById("bmtelefoon").style.display = "none";
			document.getElementById("bmsms").style.display = "none";
			document.getElementById("bmideal").style.display = "none";
			document.getElementById("bmcc").style.display = "none";
			document.getElementById("bmpaypal").style.display = "none";
			document.getElementById("bmwallie").style.display = "none";
			document.getElementById("bmmrcash").style.display = "none";
			if(welk == 1){
				if(wat == 0 ){
					document.getElementById('thuisbios').style.display = "";
				}
				else{
					document.getElementById('thuisbios').style.display = "none";
					document.getElementById('thuisbiosproblem').style.display = "none";
					document.getElementById('betaalmethode').style.display = "none";
				}
			}
			if(welk == 2){
				if(wat == 1 || wat == 2 || wat == 3){
					document.getElementById('thuisbiosproblem').style.display = "";
				}
				else{
					document.getElementById('thuisbiosproblem').style.display = "none";
					document.getElementById('betaalmethode').style.display = "none";
				}
			}
			if(welk == 3){
				if(wat == 1 || wat == 2){
					document.getElementById('betaalmethode').style.display = "";
				}
				else{
					document.getElementById('betaalmethode').style.display = "none";
				}
			}
			if(welk == 4){
				if(wat == 2){
					document.getElementById('bmtelefoon').style.display = "";
				}
				if(wat == 3){
					document.getElementById('bmsms').style.display = "";
				}
				if(wat == 4){
					document.getElementById('bmideal').style.display = "";
				}
				if(wat == 5 || wat ==6){
					document.getElementById('bmcc').style.display = "";
				}
				if(wat == 7){
					document.getElementById('bmpaypal').style.display = "";
				}
				if(wat == 8){
					document.getElementById('bmwallie').style.display = "";
				}
				if(wat == 9 || wat == 10 ||wat == 11){
					document.getElementById('bmmrcash').style.display = "";
				}
			}
			//if(wat.substring(0,2) == "bm"){
			//	document.getElementById(wat).style.display = "";
			//}
	}
	//check stuff for contact form
	function CheckHardware(){

		var BrowserDetect = {
			init: function () {
				this.browser = this.searchString(this.dataBrowser) || "Other browser";
				this.version = this.searchVersion(navigator.userAgent)
					|| this.searchVersion(navigator.appVersion)
					|| "an unknown version";
				this.OS = this.searchString(this.dataOS) || "Other OS";
			},
			searchString: function (data) {
				for (var i=0;i<data.length;i++)	{
					var dataString = data[i].string;
					var dataProp = data[i].prop;
					this.versionSearchString = data[i].versionSearch || data[i].identity;
					if (dataString) {
						if (dataString.indexOf(data[i].subString) != -1)
							return data[i].identity;
					}
					else if (dataProp)
						return data[i].identity;
				}
			},
			searchVersion: function (dataString) {
				var index = dataString.indexOf(this.versionSearchString);
				if (index == -1) return;
				return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
			},
			dataBrowser: [
				{
					string: navigator.userAgent,
					subString: "Chrome",
					identity: "Chrome"
				},
				{ 	string: navigator.userAgent,
					subString: "OmniWeb",
					versionSearch: "OmniWeb/",
					identity: "OmniWeb"
				},
				{
					string: navigator.vendor,
					subString: "Apple",
					identity: "Safari",
					versionSearch: "Version"
				},
				{
					prop: window.opera,
					identity: "Opera"
				},
				{
					string: navigator.vendor,
					subString: "iCab",
					identity: "iCab"
				},
				{
					string: navigator.vendor,
					subString: "KDE",
					identity: "Konqueror"
				},
				{
					string: navigator.vendor,
					subString: "Camino",
					identity: "Camino"
				},
				{		// for newer Netscapes (6+)
					string: navigator.userAgent,
					subString: "Netscape",
					identity: "Netscape"
				},
				{
					string: navigator.userAgent,
					subString: "Firefox",
					identity: "Firefox"
				},
				{
					string: navigator.userAgent,
					subString: "MSIE",
					identity: "Internet Explorer",
					versionSearch: "MSIE"
				},
				{
					string: navigator.userAgent,
					subString: "Gecko",
					identity: "Mozilla",
					versionSearch: "rv"
				},
				{ 		// for older Netscapes (4-)
					string: navigator.userAgent,
					subString: "Mozilla",
					identity: "Netscape",
					versionSearch: "Mozilla"
				}
			],
			dataOS : [
				{
					string: navigator.platform,
					subString: "Win",
					identity: "Windows"
				},
				{
					string: navigator.platform,
					subString: "Mac",
					identity: "Mac"
				},
				{
					   string: navigator.userAgent,
					   subString: "iPhone",
					   identity: "iPhone/iPod"
				},
				{
					string: navigator.platform,
					subString: "Linux",
					identity: "Linux"
				}
			]
		
		};
		BrowserDetect.init();
	
		var browserscontactform = "";
		BrowserCheck();	
		//browser detection
		function BrowserCheck() {
			browserscontactform = BrowserDetect.browser;
			versNr = BrowserDetect.version;
			document.getElementById('Browser').value = browserscontactform + " " + versNr;
			testCookie();
		}
		
		function testCookie(){
			// Trap error generated when trying to read cookie
			window.onerror = testCookie_err;
		
			WriteCookie('test','test');
			if (ReadCookie('test') == null) {
				document.getElementById('Cookie').value = "NIET OK";
			} else {
				document.getElementById('Cookie').value = "OK";
			}
			checkResolution();
		}
		function ReadCookie(name) {
			var start = document.cookie.indexOf(name + "=");
		
			if(start == -1) return null;
			 
			start = document.cookie.indexOf("=",start) + 1;
			var end = document.cookie.indexOf(";",start);
		
			if( end == -1 )	end = document.cookie.length;
			 
			var value = unescape(document.cookie.substring(start,end));
		
			return value;
		}
		
		function WriteCookie(name, value) {
			document.cookie = name + "=" + value;
		}
		
		// Trap error generated when trying to read / write cookie
		function testCookie_err(msg, url, line) {
			checkResolution();
		}
		
		function checkResolution(){
			if ((screen.width>=1024) && (screen.height>=720)){
				document.getElementById('Resolution').value = screen.width + "x" + screen.height;
			}
			else{
				document.getElementById('Resolution').value = "Lager dan 1024 x 720";
			}
			checkSilverlight();
		}	

		function checkSilverlight(){
	
			//try firefox/non-IE version.
			var nav = navigator.plugins["Silverlight Plug-In"];
			var silverlight = "";
			
			if (nav) {
				for (var i = 0; i < 4; i++) {
					silverlight = silverlight  + parseInt(nav.description.split(".")[i]).toString() + ".";
				}
			} else {
				//try the IE one now.
				try {
					var control = new ActiveXObject('AgControl.AgControl');
					//the following would be faster with a binary search, but this is "fast enough" for now. 
					var vers = Array(1, 0, 0, 0);
					loopMatch(control, vers, 0, 1);
					loopMatch(control, vers, 1, 1);
					loopMatch(control, vers, 2, 10000);
					loopMatch(control, vers, 2, 1000);
					loopMatch(control, vers, 2, 100);
					loopMatch(control, vers, 2, 10);
					loopMatch(control, vers, 2, 1);
					loopMatch(control, vers, 3, 1);
					for (var i = 0; i < 4; i++) {
						silverlight = silverlight  + vers[i].toString() + ".";
					}
				} catch (e) {
					silverlight = "Geen silverlight geinstalleerd";
				}
			}
			document.getElementById('Silverlight').value = silverlight;
			testMediaplayer();
		}

		function testMediaplayer(){
			if (browserscontactform == "Internet Explorer"){
				// Trap error generated when checking wmp
				window.onerror = testMediaplayer_err;
		
				var fHasWMP7  = (WMP7.URL = "x");
		
				if (fHasWMP7) {
					document.getElementById('WMPversion').value = parseInt(WMP7.versionInfo);
				}else{
					document.getElementById('WMPversion').value = "geen WMP gedetecteerd";
				}
				checkWmpIndivid();
			}
			else{
				var WMPlayer9 = PluginDetect.isMinVersion('WindowsMediaPlayer', "9,0,0,0");
				var WMPlayer10 = PluginDetect.isMinVersion('WindowsMediaPlayer', "10,0,0,0");
				var WMPlayer11 = PluginDetect.isMinVersion('WindowsMediaPlayer', "11,0,0,0");
				var WMPlayer12 = PluginDetect.isMinVersion('WindowsMediaPlayer', "12,0,0,0");
				 
				if (WMPlayer9 == 1){
					if(WMPlayer9 == 1){
						document.getElementById('WMPversion').value = "Versie 9";
					}
					if(WMPlayer10 == 1){
						document.getElementById('WMPversion').value = "Versie 10";
					}
					if(WMPlayer11 == 1){
						document.getElementById('WMPversion').value = "Versie 11";
					}
					if(WMPlayer12 == 1){
						document.getElementById('WMPversion').value = "Versie 12";
					}
					checkWmpIndivid();
				}
				else if (WMPlayer9 == 0){
				    // Windows Media Player installed but version is unknown. Browsers do not reveal the WinMediaPlayer version in their navigator array,
				    // they only show whether the plugin is installed or not. It is thus the user's responsibility to make sure that their Media Player is up to date.
					document.getElementById('WMPversion').value = "Versie onbekend";
					checkWmpIndivid();
				}
				else if (WMPlayer9 == -1){
				   if (PluginDetect.isMinVersion('WindowsMediaPlayer', '0') >= 0){
				   //Windows Media Player installed but version is too low
					document.getElementById('WMPversion').value = "Versie is lager dan 9";
				   }
				   else{
				   //else Windows Media Player not installed/enabled			
					document.getElementById('WMPversion').value = "Geen WMP geinstalleerd of WMP plugin niet geinstalleerd/geactiveerd";
					}
				}
				else if (WMPlayer9 == -2){
				   // ActiveX is disabled			
					document.getElementById('WMPversion').value = "Versie onbekend";
					checkWmpIndivid();
				}
				else{
					document.getElementById('WMPversion').value = "Geen info";
					checkWmpIndivid();
				}
			}
		}
		
		// Trap error
		function testMediaplayer_err(msg, url, line) {
			checkWmpIndivid();
		}
		
		function checkWmpIndivid(){
			if (browserscontactform == "Internet Explorer"){
			
				var drmVersion = '';
				//testmeddelande.innerHTML = 'Kollar DRM version.';
				
				var WMPindivid = false;
			
				if (netobj == 'undefined') {
				// Force failure.
					drmVersion = '';
				} else {
					drmVersion = netobj.GetDRMSecurityVersion();
				}
				
				if (drmVersion != ''){
					var arDrmVersion1 = drmVersion.split('.', 2);
					var arDrmVersion2 = drmVersion.split('.', 4);
					
					var sDrmVersion =  arDrmVersion1.join('.');
					var drmMajorVersion = parseFloat(sDrmVersion);
					if (drmMajorVersion >= 2.2) {
						// Fourth version digit is set to 1 if individualized
						if (arDrmVersion2[3] == 1) {
							document.getElementById('Individualisation').value = "Ja";
						}
						else{
							document.getElementById('Individualisation').value = "Nee";
						}
					}
				} else {
						document.getElementById('Individualisation').value = "Nee";
				}
			}
			else{
				document.getElementById('Individualisation').value = "Kon niet gemeten worden";
			}
		}
	}

	//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;
	}
	function maakJaar(datum) {
		var y= datum.getFullYear();
		var yearstring = y;
		return yearstring;
	}
	
	// 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/tmnachtclubomotxt.gif')";
					}
				else{
					document.getElementById('btnthuisbios').style.backgroundImage="url('/images/tmthuisbiosomotxt.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('btntrailers').style.backgroundImage="url('/images/tmtrailersomotxt.gif')";
				//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/tmnachtclubomotxt.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" || subject == "emailadres") {
				document.getElementById('mijngegevens').style.display="block";
			}
			if (subject == "divx" || subject == "divx_afspelen" || subject == "divx_register" || subject == "divx_to_go") {
				document.getElementById('divx').style.display="block";
			}
		}
		
	}
	
	//detect browser - wordt dit nog gebruikt???
	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 - heb ik even laten staan omdat deze functie overal in de templates staat
	function replaceImgpng(img, id){
	}

	// less pretty, but needed for some starratings, because no unique ID is present - heb ik even laten staan omdat deze functie overal in de templates staat
	function replaceImg(url,target,img,imgblank,title,align,valign){
	}

	// 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"; 
		/*}*/
	}
	// special one for FRS
	function replaceImgAIFRS(img){
			document.getElementById(img).src = "/images/FRS/" + img + ".gif"; 
	}
	
	// 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=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	
		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";
		
		document.getElementById('detailtab1').className=document.getElementById('detailtab1').className.replace('aiboxcontent1','aiboxcontent2');
		document.getElementById('detailtab2').className=document.getElementById('detailtab2').className.replace('aiboxcontent1','aiboxcontent2');
		document.getElementById('detailtab3').className=document.getElementById('detailtab3').className.replace('aiboxcontent1','aiboxcontent2');
		document.getElementById('detailtab'+watt+'').className=document.getElementById('detailtab'+watt+'').className.replace('aiboxcontent2','aiboxcontent1');
	}

	// 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";

		document.getElementById('detailtab1').className=document.getElementById('detailtab1').className.replace('aiboxcontent1','aiboxcontent2');
		document.getElementById('detailtab2').className=document.getElementById('detailtab2').className.replace('aiboxcontent1','aiboxcontent2');
		document.getElementById('detailtab'+wat+'').className=document.getElementById('detailtab'+wat+'').className.replace('aiboxcontent2','aiboxcontent1');
	}

	// 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()) + 1;
	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 Frontpage///////

// scroller op frontpage
	var delayb4scroll=4000; //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
	var marqueespeed=1; //Specify marquee scroll speed (larger is faster 1-10)
	var pauseit=1; //Pause marquee onMousever (0=no. 1=yes)?
	var tim;

	var copyspeed=marqueespeed;
	var pausespeed=(pauseit==0)? copyspeed: 0;
	var actualheight='';
	
	function scrollmarquee(){
		if (document.getElementById('track').value == "") {
			if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) {
				cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px";
			}
			else {
				cross_marquee.style.top=parseInt(marqueeheight)-8+"px";
			}
		}
	}
	
	//init()
	function initializemarquee(){
		if (document.getElementById("listboxje_content")){
			
		cross_marquee=document.getElementById("listboxje_content");
		cross_marquee.style.top=0;
		marqueeheight=document.getElementById("listboxje").offsetHeight;
		actualheight=cross_marquee.offsetHeight;
		if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
			cross_marquee.style.height=marqueeheight+"px";
			cross_marquee.style.overflow="scroll";
			return
		}
		setTimeout('lefttime=setInterval("scrollmarquee()",100)', delayb4scroll);
			}
	}
	
	//event listener
	if (window.addEventListener) {
		window.addEventListener("load", initializemarquee, false);
	}
	else if (window.attachEvent) {
		window.attachEvent("onload", initializemarquee);
	}
	else if (document.getElementById) {
		window.onload=initializemarquee;
	}

