 <!--
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));
var lastclicked = "none";

var pointcursor = "";
if(is_nav6up){pointcursor = "pointer";}
if(is_ie4up){pointcursor = "hand";}

function check_menu_over(td){
	td.className = "menu_over";
	td.style.cursor = pointcursor;

	if(document.getElementById('submenu_01')){
		if(td.id=="wieiswie"){
			document.getElementById('submenu_01').style.display='block';
		} else {
			document.getElementById('submenu_01').style.display='none';
		}
	}

	if(document.getElementById('submenu_02')){
		if(td.id=="standpunten"){
			document.getElementById('submenu_02').style.display='block';
		} else {
			document.getElementById('submenu_02').style.display='none';
		}
	}

	if(document.getElementById('submenu_03')){
		if(td.id=="lijsttrekkers"){
			document.getElementById('submenu_03').style.display='block';
		} else {
			document.getElementById('submenu_03').style.display='none';
		}
	}

}

// functies voor het uitklapmenu
function hide_menu(){
	if(!mouse_on_submenu_01){
		document.getElementById('submenu_01').style.display = 'none';
	}
	if(!mouse_on_submenu_02){
		document.getElementById('submenu_02').style.display = 'none';
	}
	if(!mouse_on_submenu_03){
		document.getElementById('submenu_03').style.display = 'none';
	}
}

function check_submenu(){
	mouse_on_submenu_01 = false;
	mouse_on_submenu_02 = false;
	mouse_on_submenu_03 = false;
	setTimeout('hide_menu();',50);
}

function check_menu_out(td){
	if (td != lastclicked){
		td.className = "menu_out";
	}
}

function check_click(page){
	document.location.href = "/pagina/"+page;
}

// deze functie wordt bij het inladen van een pagina aangeroepen en zorgt dat de juiste menu knop ingedrukt staat
function check_button(tdname){
	if(document.getElementById(tdname)){
		if (tdname!='none'){
			document.getElementById(tdname).className = "menu_over";
			lastclicked = document.getElementById(tdname);
		}
	}
}

function openWin(url_name){
	myWin = window.open(file,"Popup","toolbar=no,status=no,width=300,height=400");
	myWin.moveTo(0,0);
}

 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;
      }
    }
  }

  myHeight = myHeight - 30;
  return(myHeight);

 }

//*********************************************
// popup_full_picture
//*********************************************

function popup_full_picture(image_id,image_title){

	var popup_url = 'http://www.pvdarotterdam.nl/popup_picture.php?image_id=' + image_id + '&image_title=' + image_title;
	myWin=open(popup_url,"popup","width=50,height=50,toolbar=0,location=0,directories=0,resizable=0,scrollbars=0,status=0,screenX=0,screenY=0");

} // popup_full_picture

function openWin(file){

	myWin=window.open(file,"Popup","toolbar=no,status=no,width=250,height=400");
	myWin.moveTo(0,0);

}

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

} // function swap_check_value

   //*********************************************
   // Form validatie script
   //*********************************************



function select_validation(entered, alertbox) {

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

} // 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 telefoonnummer_validation(nummer_01,nummer_02){

	regionr=nummer_01.value;
	nummer=nummer_02.value;

	if(regionr+nummer!=""){
		if((regionr.length+nummer.length)!=10){
			alert("U dient een geldig telefoonnummer in te voeren");
			return false;
		} else {
			if(regionr=="06"){
				alert("Het is niet toegestaan mobiele nummers in te voeren");
				return false;
			}
		}
	}

} // function telefoonnummer_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){
		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


// Functie voor het nieuwe menu, tabjes verspringen
function setTab(sState){

	var div = document.getElementById('nav');
	div.className = sState;

}

function checkFormValidatorField() {

    var element = document.getElementById('form_validator_field');
    if (element != null) {
        element.value = 'asjdklgiaf';
        console.log(element.value);
    }

}

/*
*
*    Slideshow
*
*/

//globale variabele voor de timer
var myTimer = {};
var iInterval = 10000;

function startSlideshow() {
    $('#pauze').unbind('click');
    $('#pauze').click(function() { pauzeerSlideshow(); return false; });
    getSlideshowImages(0);
}

function pauzeerSlideshow() {
    $('#pauze').html('Vervolg slideshow');
    $('#pauze').unbind('click');
    $('#pauze').click(function() { vervolgSlideshow(iInterval); return false; });
    $.clearTimer(myTimer);
    $('#slideshow .data').show();
}

function vervolgSlideshow() {
    $('#pauze').html('Pauzeer slideshow');
    $('#pauze').unbind('click');
    $('#pauze').click(function() { pauzeerSlideshow(); return false; });
    getSlideshowImages(iInterval);
}

function volgendeSlide() {
    $.clearTimer(myTimer);
    startSlideshow();
}

function getSlideshowImages(iSlideTime) {

    //haal met jquery een set foto's op uit de database
    $.get("getSlideshowImages.php", function(json){

        //ontspin data
        var data = $.evalJSON(json);

        //preload de plaatjes
        var mooi = new Image();
        var lelijk = new Image();
        mooi.src = data.foto_mooi;
        lelijk.src = data.foto_niet_mooi;

        //zet een timer om de plaatjes te wisselen
        myTimer = $.timer(iSlideTime, function() {

            //fade out
            $('#slideshow .data').fadeOut('normal', function() {

                //vervang oude waardes
                $('#naam').html(data.naam);
                $('#toelichting').html(data.toelichting);

                $('#foto_mooi').html('<img src="phpThumb/phpThumb.php?w=350&aoe=1&src=../'+data.foto_mooi+'" alt="'+data.foto_mooi_locatie+'"');
                $('#foto_niet_mooi').html('<img src="phpThumb/phpThumb.php?w=350&aoe=1&src=../'+data.foto_niet_mooi+'" alt="'+data.foto_niet_mooi_locatie+'"');

                $('#locatie_mooi i').html(data.foto_mooi_locatie);
                $('#locatie_niet_mooi i').html(data.foto_niet_mooi_locatie);

                //fade in
                $('#slideshow .data').fadeIn('normal');

            });

            //zet een nieuwe slide in werking
            getSlideshowImages(iInterval);

        });

    });

}

/*
*
*    Pictures on homepage
*
*/

function showPics(iInterval) {

    //haal met jquery een set foto's op uit de database
    $.get("getImage.php", function(json){

        //ontspin data
        var data = $.evalJSON(json);

        //preload de plaatjes
        var nieuweFoto = new Image();
        nieuweFoto.src = data.foto;

        //zet een timer om de plaatjes te wisselen
        myTimer = $.timer(iInterval, function() {

            //fade out
            $('#foto').fadeOut('normal', function() {

                //vervang foto
                $('#foto').html('<img src="phpThumb/phpThumb.php?w=200&aoe=1&h=200&src=../'+data.foto+'" alt=""');
                //fade in
                $('#foto').fadeIn('normal');

            });

            //zet een nieuwe slide in werking
            showPics(5000);

        });

    });

}

//-->