/******************************************************************************
* maastuinen.js                                                               *
*                                                                             *
* Last update: May 21, 2008												  *
*                                                                             *
******************************************************************************/

/* Images pre loader */
function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
	  document[imgName].style.cursor = 'pointer';
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
	  document[imgName].style.cursor = 'auto';
    }
 }

/* Meer Informatie Contact Form */
function checkForm()
 {
 	var done = true;
	var elem;
	
	elem = document.getElementById("firstnameerror");
	if (document.contactform.firstname.value == "") {
		done = false;
		elem.style.display = "inline";
	} else {
		elem.style.display = "none";
	}
	elem = document.getElementById("lastnameerror");
	if (document.contactform.lastname.value == "") {
		done = false;
		elem.style.display = "inline";
	} else {
		elem.style.display = "none";
	}
	elem = document.getElementById("emailerror");
	if (document.contactform.email.value == "") {
		done = false;
		elem.style.display = "inline";
	} else {
		elem.style.display = "none";
	}
		
  	if (done) document.contactform.submit();
 }
 
function resetForm()
 {
 	document.contactform.naam.value = "";
	document.contactform.contactpersoon.value = "";
	document.contactform.adres.value = "";
	document.contactform.postcode.value = "";
	document.contactform.woonplaats.value = "";
	document.contactform.telefoon.value = "";
	document.contactform.email.value = ""
 }
/* End Contact Form */

function f_open_window_max( aURL, aWinName )
 {
   	var wOpen;
   	var sOptions;

   	sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
   	sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
   	sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
   	sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

   	wOpen = window.open( '', aWinName, sOptions );
   	wOpen.location = aURL;
   	wOpen.focus();
   	wOpen.moveTo( 0, 0 );
   	wOpen.resizeTo( screen.availWidth, screen.availHeight );
   	return wOpen;
 }
