/******************************************************************************
* maastuinen.js                                                               *
*                                                                             *
* Last update: May 21, 2008												  *
*                                                                             *
******************************************************************************/
	$(document).ready(function() {
		/* Fancy Box Constructor */
		$("a.impressions_gallery").fancybox({
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'titlePosition' 	: 'over',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
			}
		});
		/* Fancy Box Constructor */
	});

	/* 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("naamerror");
		if (document.contactform.naam.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.straat.value = "";
		document.contactform.nummer.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;
	 }

