<!--
var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav6up = (is_nav && (is_major >= 5));
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie4up  = (is_ie && (is_major >= 4));


/*
 * function get_browser_height()
 * Deze functie geeft de hoogte van het browservenster terug in pixels
 */

function get_browser_height(){
  
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else {
		if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else {
			if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
		}
	}

	return(myHeight);
} // function get_browser_height


/*
 * function reset_input_value(input_element){
 * Deze functie 'reset' de value van het zoekform wanneer je met de muis erin klikt
 */
function reset_input_value(input_element){

	if(input_element.value=='type zoekterm'){
		input_element.value=''
	}

} // function reset_input_value

/*
 * function checkImgOver(this_image){
 * Voor de mouseover van een plaatje via een regexpression wordt _1.gif vervangen door _2.gif voor this_image
 */
function checkImgOver(this_image){
	re=new RegExp('_1.','gi');
	this_image.src = this_image.src.replace(re,"_2.");
} // function checkImgOver

/*
 * function checkImgOut(this_image){
 * Voor de mouseout van een plaatje : _1.gif wordt teruggezet voor this_image
 */
function checkImgOut(this_image){
	re=new RegExp('_2.','gi');
	this_image.src = this_image.src.replace(re,"_1.");
} // function checkImgOut

function checkInputOver(this_element){
		this_element.style.color="#FFFFFF";
		this_element.style.backgroundColor="#F5AE3E";
}

function checkInputOut(this_element){
		this_element.style.color="#FFFFFF";
		this_element.style.backgroundColor="#3D4781";	
}

function checkTdOver(this_element,td_element){
		this_element.style.color="#FFFFFF";
		document.getElementById(td_element).style.backgroundColor="#FF8C3F";
}

function checkTdOut(this_element,td_element){
		this_element.style.color="#858585";
		document.getElementById(td_element).style.backgroundColor="#FFFFFF";		
}

/*
 * function stretch_body(){
 * Na het inladen van de pagina wordt de body gestretched naar de hoogte van de browser
 * met een stretch plaatje die een bepaalde hoogte wordt gegeven
 */
function stretch_body(){
	if(document.getElementById('stretcher')){
		document.getElementById('stretcher').style.height = get_browser_height()-300;
	}
}


function validate_contact_form(thisform){

	with(thisform){
		if(empty_validation(titel,"U dient nog een titel in te geven")==false){titel.focus(); return false;}
		if(empty_validation(bericht,"U dient nog een bericht in te geven")==false){bericht.focus(); return false;}			
		if(telefoon_validation(telefoon,"U dient uw telefoonnummer nog in te geven")==false){telefoon.focus(); return false;}			
		if(email_validation(email,"U dient een geldig emailadres in te geven")==false){email.focus(); return false;}
		if(empty_validation(naam,"U dient uw naam nog in te geven")==false){naam.focus(); return false;}			
	}
} // function validate_contact_form

/***************************************
	Input Validatie functies
*****************************************/

function swap_check_value(checkbox){
	if(checkbox.value==0){
		checkbox.value=1;
	} else {
		checkbox.value=0;
	} // if..else
	
} // function swap_check_value

/*************************************************/

function select_validation(entered, alertbox) {
 
   with(entered){
    if (value==null || value=="NULL" || value=="null"){
      if (alertbox!=""){
        alert(alertbox);
      } // if
      return false;
    } else {
        return true;
      } // if .. else
   } // if .. else
   
 } // function select_validation

/*************************************************/

function value_validation(entered, min, max, alertbox, datatype) {

 with (entered){
  checkvalue=parseFloat(value);
  if (datatype){
   smalldatatype=datatype.toLowerCase();
   if (smalldatatype.charAt(0)=="i"){
    checkvalue=parseInt(value)};
   }
  
   if ((parseFloat(min)==min && checkvalue<min) || (parseFloat(max)==max && checkvalue>max) || value!=checkvalue){
    if (alertbox!=""){
     alert(alertbox);
    }
   return false;
 } else {
     return true;
   }
 }
} //function value_validation

/*************************************************/

function radio_validation(radiobuttons, alertbox){
  
  var ingevuld=false;
  for(teller=0;teller<radiobuttons.length;teller++){
   if(radiobuttons[teller].checked==true){ingevuld=true;}
  }

  if(ingevuld){
    return true;
  } else {
       if (alertbox!=""){
         alert(alertbox);
       }
       return false;
    }
  
 } //  function radio_validation

/*************************************************/

function empty_validation(entered, alertbox){

  with(entered){
   if (value==null || value==""){
     if (alertbox!=""){
       alert(alertbox);
     }
     return false;
   } else {
       return true;
     }
  }
  
} // function emptyvalidation

/*************************************************/

function checkbox_validation(entered, alertbox){

  with(entered){
   if (checked==false){
     if (alertbox!=""){
       alert(alertbox);
     }
     return false;
   } else {
       return true;
     }
  }
  
} // function emptyvalidation

/*************************************************/

function email_validation(entered, alertbox) {

  with (entered) {
   apos=value.indexOf("@"); 
   dotpos=value.lastIndexOf(".");
   lastpos=value.length-1;
   if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) {
    if (alertbox){
     alert(alertbox);
    }
    return false;
   } else {
      return true;
     }
  }
} // function email_validation

/*************************************************/

function length_validation(entered,min,max,alertbox){

 if(entered.value.length<=min){
 	 alert(alertbox);
 	 return false;
  }
 
 return true;
 
} // function length_validation

/*************************************************/

function stringtype_validation(str,alertbox){

 if(integer_validation(str.value)==true){
 	if (alertbox!=""){
       alert(alertbox);
     }
 	return false;
 } else {
    return true;
   }
} // function stringtype_validation

/*************************************************/

function integer_validation(str){
	
  var i = parseInt (str);
  if (isNaN (i)){
    return false;
  }	

  i = i . toString ();
  if (i != str){

    return false;
  }	
  
  return true;

} //function integer_validation

/*************************************************/

function telefoon_validation(entered, alertbox){
	
	var geldig_telefoonnummer=true;
	var aantal_geldige_nummers=0;

	if(entered.value.length>9){
		
		for(teller=0;teller<entered.value.length;teller++){
			if(!isNaN(parseInt(entered.value.substr(teller,1)))){
				aantal_geldige_nummers++;
			} // if
		} // for
		
		if(aantal_geldige_nummers!=10){
			geldig_telefoonnummer=false;
		}
		
	} else {
		geldig_telefoonnummer=false;
	} // if..else
	

	if(!geldig_telefoonnummer){
		if (alertbox!=""){
			alert(alertbox);
		} // if
		return false;
	} else {
		return true;
	}
} // function telefoon_validation

/*************************************************/

function postcode_validation(entered, alertbox){

	var geldige_postcode = true;
	var aantal_geldige_cijfers = 0;
	var aantal_geldige_letters = 0;
	
	var re = new RegExp (' ', 'gi') ;
	var postcode_string = entered.value.replace(re, '');
	
	if(postcode_string.length!=6){
		geldige_postcode = false;
	} else {
		
		var postcode_nummer = postcode_string.substr(0,4);
		var postcode_letters = postcode_string.substr(4,2);

		if(!integer_validation(postcode_nummer)){
			geldige_postcode = false;
		}
		
		if(!stringtype_validation(postcode_letters)){
			geldige_postcode = false;				
		}
	} // if..else
	
	if(geldige_postcode){
		return true;
	} else {
		if (alertbox!=""){
			alert(alertbox);
		} // if
		return false;
	}
	
} // function postcode_validation

//****************************************//
// een div verbergen of laten zien als de functie wordt aangeroepen
// geef het id van de div mee aan de functie
//****************************************//
function swap_div(div){
	if(document.getElementById(div).style.display=='block'){
		document.getElementById(div).style.display='none';
	} else {
		document.getElementById(div).style.display='block';
	} 
}

function stretch(){

	if(document.getElementById('stretcher')){
		document.getElementById('stretcher').height = get_browser_height()-111;
	}

}

//-->
