/*************************************************************
 * Made by: Toine Holtmann   								 *
 * Copyright: FYEO Medical - 2007							 *
 ************************************************************/
function Confirm(){ 
	var DoConfirm = confirm("Weet u zeker dat u wilt uitlogen?"); 
    	if (DoConfirm) {
    		return true;
		} 
    	else{ 
    		return false;
		} 
} 

check = []; //this is an array that stores all the true/false values for each checkbox 

function checkBox(id) 
    { 

    if(check[id] != true) //if a value is not true, use this rather than == false, 'cos the first time no value will be set and it will be undefined, not true or false 
        { 
        document.getElementById('imgCheck' + id).src = "/images/form/checkTrue.gif"; //change the image 
        document.getElementById('inputCheck' + id).value = "true"; //change the field value 
        check[id] = true; //change the value for this checkbox in the array 
        } 
    else 
        { 
        document.getElementById('imgCheck' + id).src = "/images/form/checkFalse.gif"; 
        document.getElementById('inputCheck' + id).value = "false"; 
        check[id] = false; 
        } 
    }
    

function CheckForm(){
	if (!document.form.voornaam.value){

		alert("U bent vergeten uw voornaam in te vullen.");

		document.form.voornaam.focus();
	} else if (!document.form.achternaam.value) {

		alert("U bent vergeten uw achternaam in te vullen.");

		document.form.achternaam.focus();
	} else if (!document.form.adres.value) {

		alert("U bent vergeten uw adres in te vullen.");

		document.form.adres.focus();
	} else if (!document.form.postcode.value) {

		alert("U bent vergeten uw postcode in te vullen.");

		document.form.postcode.focus();
	} else if (!document.form.plaats.value) {

		alert("U bent vergeten uw woonplaats in te vullen.");

		document.form.plaats.focus();
	} else if (!document.form.telefoon.value) {

		alert("U bent vergeten uw telefoonnummer in te vullen.");

		document.form.telefoon.focus();
	} else if (!document.form.email.value) {

		alert("U bent vergeten uw email in te vullen.");

		document.form.email.focus();
	} else if (document.forms[0].gevonden.selectedIndex == 0) {

		alert("U bent vergeten aan te geven hoe u ons heeft gevonden.");

		document.forms[0].gevonden.focus();
	} else {

		document.form.submit();
	}
}

function CheckFormMailMedia(){
	if (!document.form.voornaam.value){

		alert("U bent vergeten uw voornaam in te vullen.");

		document.form.voornaam.focus();
	} else if (!document.form.achternaam.value) {

		alert("U bent vergeten uw achternaam in te vullen.");

		document.form.achternaam.focus();
	} else if (!document.form.adres.value) {

		alert("U bent vergeten uw adres in te vullen.");

		document.form.adres.focus();
	} else if (!document.form.postcode.value) {

		alert("U bent vergeten uw postcode in te vullen.");

		document.form.postcode.focus();
	} else if (!document.form.plaats.value) {

		alert("U bent vergeten uw woonplaats in te vullen.");

		document.form.plaats.focus();
	} else if (!document.form.telefoon.value) {

		alert("U bent vergeten uw telefoonnummer in te vullen.");

		document.form.telefoon.focus();
	} else if (!document.form.email.value) {

		alert("U bent vergeten uw email in te vullen.");

		document.form.email.focus();
	} else {

		document.form.submit();
	}
}

function openVideo(titel,play_id){
	
	var so = new SWFObject('http://www.fyeomedical.nl/flash/videoplayer.swf','mpl','600','300','7');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addParam("wmode","opaque");
	so.addVariable('height','300');
	so.addVariable('width','600');
	so.addVariable('displaywidth','400');
	so.addVariable('file','http://www.fyeomedical.nl/movies/' + titel + '.xml');
	so.addVariable('id','' + play_id);
	so.addVariable('frontcolor','0x004236'); 
	so.addVariable('lightcolor','0x004236');
	so.addVariable('backcolor','0xdfe8e5');
	so.addVariable('thumbsinplaylist','false'); 
	so.addVariable('shuffle','false');  
	so.addVariable('repeat','list');
	so.addVariable('shownavigation','true');
	so.addVariable('showdigits','true');
	so.addVariable('autostart','false');
	so.write('vervolg_animatie');
}

function pollIt(){
	if (document.getElementById('listscount')) {
		var lists = parseInt(document.polledform.listscount.value);
		make_sortable(lists);
	}
	else
	setTimeout("pollIt()", 60);
}