function rowOverEffect(object) {
  if (object.className == 'menuNormal') object.className = 'menuNormalOver';
  if (object.className == 'menuNormalEDL') object.className = 'menuNormalEDLOver';
  if (object.className == 'menuSelected') object.className = 'menuSelectedOver';
  if (object.className == 'menuSelectedEDL') object.className = 'menuSelectedEDLOver';
}

function rowOutEffect(object) {
  if (object.className == 'menuNormalOver') object.className = 'menuNormal';	
  if (object.className == 'menuSelectedOver') object.className = 'menuSelected';
  if (object.className == 'menuSelectedEDLOver') object.className = 'menuSelectedEDL';
  if (object.className == 'menuNormalEDLOver') object.className = 'menuNormalEDL';	
}

function reDirect(link) {
   window.location = link;
  	//document.open();
	//document.write ('<meta http-equiv="refresh" content="0;URL='+ link +'">');
	//document.close();	
}


function writeEmbedObject(eoString) {
    document.write(eoString);
}

function writeFlash(s,w,h,variables) {
  var flashContent = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="'+w+'" HEIGHT="'+h+'" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
  + '<PARAM NAME="MOVIE" VALUE="'+s+'">'
  + '<PARAM NAME="PLAY" VALUE="true">'
  + '<PARAM NAME="LOOP" VALUE="false">'
  + '<PARAM NAME="QUALITY" VALUE="high">'
  + '<PARAM NAME="MENU" VALUE="false">'
  + '<PARAM NAME="allowScriptAccess" VALUE="sameDomain">'
  + '<PARAM NAME="menu" VALUE="false">'
  + '<PARAM NAME="scale" VALUE="noborder">'
  + '<PARAM NAME="wmode" VALUE="transparent">'
  + '<PARAM NAME="bgcolor" VALUE="#ffffff">'
  + '<EMBED SRC="'+s+'" WIDTH="'+w+'" HEIGHT="'+h+'" '+variables+'></EMBED>'
  + '</OBJECT>';
  
    document.write(flashContent);
}

function openSinglePayment(ProductID){
	var w = 708;
	var h = 525;
	var t = 0;
	var l = 0;
	window.open('single_payment_popup.php?ProductID=' + ProductID,'loading','width=' + w + ',height=' + h + ',top=' + t + ',left=' + l + 'location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no');

	//Load movie in iframe load. Located in header.php
	//load.window.location= url;
}

function Init(){
	var iMaxWidth = window.screen.width;
	var iMaxHeight = window.screen.height;
	if (self.innerWidth){
		if( self.innerWidth < (iMaxWidth - 12) ){
			self.outerHeight = iMaxHeight - 26;
			self.innerWidth = iMaxWidth - 12;
			self.moveTo(0,0);
	}
}
	else if(window.document.body.offsetWidth){
		if( window.document.body.offsetWidth < (iMaxWidth - 8) ){
			window.resizeTo( iMaxWidth, (iMaxHeight - 24) );
			self.moveTo(0,0);
	}
}
	
	openSwitchpoint1();
}
function openSwitchpoint(type, productid, userid){
	var w = 640;
	var h = 375;
	var t = window.screen.height/2 - h/2;
	var l = window.screen.width/2 - w/2;
	//var sURL = 'http://direct.switchpoint.nl/sites/ajaxbreedbandportal1_ne_ppc/licentie.asp?type='+type+'&userid='+userid+'&ContentIDs='+contentid;
	var sURL = 'http://direct.switchpoint.nl/sites/ajaxbreedbandportal'+type+'_ne_ppc/savesub.php?userid='+userid+'&ProductID='+productid;
	
	window.open(sURL,'switchpoint1','width=' + w + ',height=' + h + ',top=' + t + ',left=' + l + ',location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no');
	
}
function openSwitchpointDag(userid, language_id){
	var w = 560;
	var h = 375;
	var t = window.screen.height/2 - h/2;
	var l = window.screen.width/2 - w/2;
	//var sURL = 'http://direct.switchpoint.nl/sites/ajaxbreedbandportal1_ne_ppc/licentie.asp?type='+type+'&userid='+userid+'&ContentIDs='+contentid;
	var sURL = 'http://direct.switchpoint.nl/sites/ajax-internettv_dag_ppc/switchpoint_callback_day.php?userid='+userid+'&language_id='+language_id;
	
	window.open(sURL,'switchpoint1','width=' + w + ',height=' + h + ',top=' + t + ',left=' + l + ',location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no');
	
}



function loadmovie(url){
	var w = 708;
	var h = 525;
	var t = 0;
	var l = 0;
	window.open(url,'loading','width=' + w + ',height=' + h + ',top=' + t + ',left=' + l + ',location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no');

	//Load movie in iframe load. Located in header.php
	//load.window.location= url;
}	

function loginCheck(){
		if (document.getElementById('user').value == "Gebruikersnaam"){
			alert("Er is geen geldige gebruikersnaam ingevoerd.");
			return false;
		}else{
			document.form.submit();
		}
}
function loginCheck2(){
		if (document.getElementById('user2').value == "Email adres"){
			alert("Er is geen geldige gebruikersnaam ingevoerd.");
			return false;
		}else{
			document.form2.submit();
		}
}

function enterCheck(){
		if (window.event && window.event.keyCode == 13){
			//submitForm();
		}else{
			return !(window.event && window.event.keyCode == 13);
		}
}
function submitForm() {
		if (document.getElementById('search').value.length < 3){
			alert ('Zoekwoord moet minimaal uit 3 karakters bestaan.');
		}else{
			if (document.getElementById('search').value == ' Titel'){
				alert ('Geef een zoekwoord op.');
			}else{
				//document.zoekform.submit();
				synopsis.location='inc_showcategory.php?search='+document.getElementById('search').value;
			}
		}
}
function checkEmail(){
		email = document.getElementById('email').value;
		if (email == "" || email == "Emailadres"){
			alert('U heeft geen emailadres ingevoerd!');
		}else{
			if (!email.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi)){
				alert('Ongeldig E-mailadres!');
			}else{
				document.forgotpassword.submit();
			}
		}
}
function payment_redirect(url){
	location = url;
}
