<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}






function switchImage(imgName, imgSrc) {
  if (document.images) {
    if (imgSrc != "none") {
      document.images[imgName].src = imgSrc;
    }
  }
}

MM_reloadPage(true);






// RETRIEVE GET VARIABLES FROM URL
// Combined with the document.write() method, you can actually add dynamic content to regular HTML.
// Given a choice, server side processing of form variables is preferable. 


function getVar(name) {
	get_string = document.location.search;         
	return_value = '';

	do { //This loop is made to catch all instances of any get variable.
		name_index = get_string.indexOf(name + '=');

		if(name_index != -1) {
			get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index);

			end_of_value = get_string.indexOf('&');
			if(end_of_value != -1)                
				value = get_string.substr(0, end_of_value);                
			else                
				value = get_string;                

			if(return_value == '' || value == '')
				return_value += value;
			else
				return_value += ', ' + value;
		}
	} while(name_index != -1)

	//Restores all the blank spaces.
	space = return_value.indexOf('+');
	while(space != -1) { 
		return_value = return_value.substr(0, space) + ' ' + 
		return_value.substr(space + 1, return_value.length);
							 
		space = return_value.indexOf('+');
	}

	return(return_value);
}



function selectOption(num) {
	var selObj = document.getElementById('betreft');
	selObj.selectedIndex = num;
}




function validate(thisForm) {
var	formError = false;

    if (thisForm.naam.value =="") {
        alert("Er is geen naam ingevuld."); 
        thisForm.naam.focus();
		formError = true;
        return false;
    }

   var mail=thisForm.email.value
   if (thisForm.email.value =="" && thisForm.telefoon.value =="") {
        alert("Er is geen telefoonnummer of \ne-mailadres ingevuld.\n\nVul een telefoonnummer of een\neen e-mailadres in zodat we\ncontact met u kunnen opnemen");   
        thisForm.email.focus(); 
		formError = true;
        return false;
   }

   if (thisForm.email.value !="" && mail.indexOf("@") == -1) {
        alert("Dit is geen geldig e-mail adres");
        thisForm.email.focus(); 
		formError = true;
        return false;
   }

	if (thisForm.bericht.value =="") {
        alert("Het veld \"Je bericht\" is niet ingevuld"); 
        thisForm.bericht.focus();
		formError = true;
        return false;
    }

    return true;

}

function validate_saf(thisForm) {
var	formError = false;

    if (thisForm.nameSender.value =="") {
        alert("Er is geen afzender naam ingevuld."); 
        thisForm.nameSender.focus();
		formError = true;
        return false;
    }
   var mail=thisForm.emailSender.value
   if (thisForm.emailSender.value =="") {
        alert("Er is geen afzender e-mail adres ingevuld.");   
        thisForm.emailSender.focus(); 
		formError = true;
        return false;
   }
   if (thisForm.emailSender.value !="" && mail.indexOf("@") == -1) {
        alert("Het afzender e-mail adres is geen geldig e-mail adres");
        thisForm.emailSender.focus(); 
		formError = true;
        return false;
   }
    if (thisForm.nameRecipient.value =="") {
        alert("Er is geen naam van de ontvanger ingevuld."); 
        thisForm.nameRecipient.focus();
		formError = true;
        return false;
    }
   var mailR=thisForm.emailRecipient.value
   if (thisForm.emailRecipient.value =="") {
        alert("Er is geen e-mail adres van de ontvanger ingevuld.");   
        thisForm.emailRecipient.focus(); 
		formError = true;
        return false;
   }
   if (thisForm.emailRecipient.value !="" && mailR.indexOf("@") == -1) {
        alert("Het e-mail adres van de ontvanger is geen geldig e-mail adres");
        thisForm.emailRecipient.focus(); 
		formError = true;
        return false;
   }

    return true;

}

function validate_voorwaarden(thisForm) {
var	formError = false;

	if (!thisForm.voorwaarden.checked) {
        alert("Om te kunnen bestellen moet je akkoord gaan met onze leveringsvoorwaarden."); ; 
        thisForm.voorwaarden.focus();
		formError = true;
        return false;
    }

    return true;

}




function changeForm(thisForm) {

	var selecteditem = thisForm.selectedIndex;
	var selecteditemvalue = thisForm[selecteditem].text;
	var error = false;

	if (selecteditemvalue == 'anders ...') {
		document.getElementById ('anders_namelijk').style.display = "inline";
		document.getElementById ('labelfor_anders_namelijk').style.display = "inline";
		document.getElementById ('anders_namelijk').value = 'wat dan?';
	} else {
		error = 'OEPS \n' + selecteditem + '\n' + selecteditemvalue;	
		document.getElementById ('anders_namelijk').value = '';
		document.getElementById ('anders_namelijk').style.display = "none";
		document.getElementById ('labelfor_anders_namelijk').style.display = "none";
	}

	if (error) {
		alert (error);
	} else {
		alert('HELEMAAL OK \n' + selecteditem + '\n' + selecteditemvalue);
	}

}

function changeFormProps(thisForm) {

	var selecteditem = thisForm.selectedIndex;
	var selecteditemvalue = thisForm[selecteditem].text;
	var error = false;

	if (selecteditemvalue == 'anders ...') {
		document.getElementById ('anders_namelijk').style.display = "block";
		document.getElementById ('anders_namelijk').value = 'wat dan?';
	} else {
		error = 'OEPS \n' + selecteditem + '\n' + selecteditemvalue;	
		document.getElementById ('anders_namelijk').value = '';
		document.getElementById ('anders_namelijk').style.display = "none";
	}
/*
	if (error) {
		alert (error);
	} else {
		alert('HELEMAAL OK \n' + selecteditem + '\n' + selecteditemvalue);
	}
*/
}


	
/* PRINT FUNCTIONS*/

/* Algemene print functionaliteit */
function printContent(content)
{
  
  var contents , arrElementTemp , arrAttributesTemp , iCounter , iCounter2
  contents = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
  contents = contents + "<html>";
  contents = contents + "<head>";
  contents = contents + "<title>" + document.title + " (print)</title>";
  contents = contents + "<title>print deze pagina</title>";
  contents = contents + "<meta http-equiv=\"Pragma\" content=\"no-cache\" >";
  // contents = contents + "<meta http-equiv=\"refresh\" content=\"0\">";
  contents = contents + "<meta http-equiv=\"Expires\" content=\"-1\" >";
  contents = contents + "<link href=\"http://www.hbo-nieuws.nl/pit/css/print.css\" rel=\"stylesheet\" type=\"text/css\">";
  contents = contents + "<script src=\"http://www.hbo-nieuws.nl/pit/sifr.js\" type=\"text/javascript\"></script>";
  contents = contents + "<script src=\"http://www.hbo-nieuws.nl/pit/sifr-config.js\" type=\"text/javascript\"></script>";
  
  
  

  
  
  /*
  contents = contents + "<script language=\"JavaScript\">";
  contents = contents + "function reloadbeforeprint() {";
  contents = contents + "self.document.reload()";
  contents = contents + "}";
  contents = contents + "</script>";
  */


/* even simpel houden
  arrElementTemp = document.getElementsByTagName('LINK') ;
  for (iCounter = 0 ; iCounter < arrElementTemp.length ; iCounter++) {
    contents = contents + "<" + arrElementTemp.item(iCounter).tagName ;
    arrAttributesTemp = arrElementTemp.item(iCounter).attributes ;
    for (iCounter2 = 0 ; (iCounter2 < arrAttributesTemp.length) ; iCounter2++) {
      if ( ((arrAttributesTemp.item(iCounter2).value + '') != 'null') && (arrAttributesTemp.item(iCounter2).value != '') ){
        contents = contents + " " + arrAttributesTemp.item(iCounter2).name + "=\"" + arrAttributesTemp.item(iCounter2).value + "\"" ;
      }
    }
    contents = contents + ">" ;
  }
*/
  contents = contents + "</head>";
  contents = contents + "<body style=\"background:#FFFFFF\">";
  contents = contents + "<div align=\"left\" id=\"logo\" class=\"printLogoBox\">";
  contents = contents + "<img src=\"http://www.hbo-nieuws.nl/pit/img/jdtravel_logo_print.jpg\" alt=\"jdtravel\" hspace=\"4\" vspace=\"0\" border=\"0\" />";
  contents = contents + "</div>";
  contents = contents + "<div align=\"left\" id=\"print\" class=\"textBox\">";

  contents = contents + document.getElementById(content).innerHTML;
  contents = contents + "</div>";
  contents = contents + "<p><a href=\"javascript:window.print();\" >";
  contents = contents + "<img src=\"http://www.hbo-nieuws.nl/pit/img/print.gif\" alt=\"\" vspace=\"4\" border=\"0\" title=\"Afdrukken\" />"; 
  contents = contents + "</a>";
  contents = contents + "<a href=\"javascript:window.close();\" >";
  contents = contents + "<img src=\"http://www.hbo-nieuws.nl/pit/img/close.gif\" alt=\"\" hspace=\"4\" vspace=\"4\" border=\"0\" title=\"Sluit venster\" />"; 
  contents = contents + "</a></p>"; 
  
  contents = contents + "</body>";
  contents = contents + "</html>";


  var printwindow = window.open("","printVenster","");
  // printwindow.document.title = document.title;
  printwindow.document.write(contents);
  printwindow.location.reload();
  
  }
	
//-->
