
function clickMenu(numberVar){
			targetDiv = document.getElementById("subMenu"+numberVar);

			if (targetDiv.style.display=="block"){
				targetDiv.style.display="inline";
				}
			else {
				if (targetDiv.style.display=="inline"){
					targetDiv.style.display="none";
					alert("Text is now 'none'. It will reappear in three seconds.");
					window.setTimeout("blueText.style.display='block';",3000,"JavaScript");
					}
				else {
					targetDiv.style.display="block";
					}
				}
}

//showdetails for 2nd hand//
 function showdetail(idVar){
	navRoot = document.getElementById("itemList");
	for (i=1; i<=navRoot.childNodes.length/2; i++) {
		targetDiv = document.getElementById("item_"+ i);
		targetDescription = document.getElementById("detail_"+ i); 
		if(idVar.substring(5) == i){
			targetDiv.className="hider";
			targetDescription.className="displayer";
		}else{
			targetDiv.className="displayer";
			targetDescription.className="hider";
		}
	}
}

//formvalidation
function validate_form ( )
{
    valid = true;
	error_msg = ""
	
    if ( document.contact_form.contact_name1.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form.contact_name1.id +" in te vullen\r\n" );
        valid = false;
    }
	
	
		
	if ( document.contact_form.contact_email.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form.contact_email.id +" in te vullen\r\n" );		
		valid = false;
    }else{
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = document.contact_form.contact_email.value;
		
		if(reg.test(address) == false) {
      		error_msg += ( "Gelieve het veld "+ document.contact_form.contact_email.id +" correct in te vullen\r\n" );
			valid = false;
   		}
		
	}
	
	
	if(valid==false){
		alert(error_msg);
	}

    return valid;
}

//formvalidation
function validate_form3 ( )
{

    valid = true;
	error_msg = ""
    if ( document.contact_form3.contact_name1.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form3.contact_name1.id +" in te vullen\r\n" );
        valid = false;
    }
	
	if ( document.contact_form3.contact_name2.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form3.contact_name2.id +" in te vullen\r\n" );
        valid = false;
    }
	
	
	if ( document.contact_form3.contact_email.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form3.contact_email.id +" in te vullen\r\n" );		
		valid = false;
    }else{
		apos=document.contact_form3.contact_email.value.indexOf("@");
		dotpos=document.contact_form3.contact_email.value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) {
		   error_msg += ( "Gelieve een correct "+ document.contact_form3.contact_email.id +" in te vullen\r\n" );
		   valid = false;
		 }
	}
	
	
	
	if(valid==false){
		alert(error_msg);
	}

    return valid;
}

//formvalidation
function validate_form4 ( )
{

    valid = true;
	error_msg = ""
	
	
	if ( document.contact_form4.contact_email.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form4.contact_email.id +" in te vullen\r\n" );		
		valid = false;
    }else{
		apos=document.contact_form4.contact_email.value.indexOf("@");
		dotpos=document.contact_form4.contact_email.value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) {
		   error_msg += ( "Gelieve een correct "+ document.contact_form4.contact_email.id +" in te vullen\r\n" );
		   valid = false;
		 }
	}
	
	
	
	if(valid==false){
		alert(error_msg);
	}

    return valid;
}

function validate_form5 ( )
{
	
    valid = true;
	error_msg = ""
	
	
    if ( document.order_form.naam.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.order_form.naam.id +" in te vullen\r\n" );
        valid = false;
    }
	
	
	if ( document.order_form.adres.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.order_form.adres.id +" in te vullen\r\n" );
        valid = false;
    }
	

	if ( document.order_form.postcode.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.order_form.postcode.id +" in te vullen\r\n" );
        valid = false;
    }
	

	if ( document.order_form.gemeente.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.order_form.gemeente.id +" in te vullen\r\n" );
        valid = false;
    }
	
	if ( document.order_form.land.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.order_form.land.id +" in te vullen\r\n" );
        valid = false;
    }
	
	
	if ( document.order_form.telefoon.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.order_form.telefoon.id +" in te vullen\r\n" );
        valid = false;
    }	
	
	
	
	if ( document.order_form.email.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.order_form.email.id +" in te vullen\r\n" );		
		valid = false;
    }else{
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = document.order_form.email.value;
		
		if(reg.test(address) == false) {
      		error_msg += ( "Gelieve het veld "+ document.order_form.email.id +" correct in te vullen\r\n" );
			valid = false;
   		}
		
	}
	

	if ( document.order_form.AlgemeneVoorwaarden.checked == false )
    {
        error_msg += ( "Gelieve akkoord te gaan met de algemene voorwaarden\r\n" );
    	valid = false;
    }
	
	
	
	if(valid==false){
		alert(error_msg);
	}

    return valid;
}

//formvalidation
function validate_form7 ( )
{

	
    valid = true;
	error_msg = ""
	
	
	
	
	if ( document.contact_form7.contact_email.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form7.contact_email.id +" in te vullen\r\n" );		
		valid = false;
    }else{
		apos=document.contact_form7.contact_email.value.indexOf("@");
		dotpos=document.contact_form7.contact_email.value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) {
		   error_msg += ( "Gelieve een correct "+ document.contact_form7.contact_email.id +" in te vullen\r\n" );
		   valid = false;
		 }
	}
	
	if ( document.contact_form7.contact_name1.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form7.contact_name1.id +" in te vullen\r\n" );
        valid = false;
    }	
	
	if ( document.contact_form7.contact_telephone.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form7.contact_telephone.id +" in te vullen\r\n" );
        valid = false;
    }	
	
	
	
	
	if(valid==false){
		alert(error_msg);
	}

    return valid;
}

//formvalidation
function validate_form8( )
{

    valid = true;
	error_msg = ""
    if ( document.contact_form8.contact_name.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form8.contact_name.id +" in te vullen\r\n" );
        valid = false;
    }
	
	if ( document.contact_form8.contact_email.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form8.contact_email.id +" in te vullen\r\n" );		
		valid = false;
    }else{
		apos=document.contact_form8.contact_email.value.indexOf("@");
		dotpos=document.contact_form8.contact_email.value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) {
		   error_msg += ( "Gelieve een correct "+ document.contact_form8.contact_email.id +" in te vullen\r\n" );
		   valid = false;
		 }
	}
	
	if ( document.contact_form8.contact_name2.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form8.contact_name2.id +" in te vullen\r\n" );
        valid = false;
    }
	
	if ( document.contact_form8.contact_email2.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form8.contact_email2.id +" in te vullen\r\n" );		
		valid = false;
    }else{
		apos=document.contact_form8.contact_email2.value.indexOf("@");
		dotpos=document.contact_form8.contact_email2.value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) {
		   error_msg += ( "Gelieve een correct "+ document.contact_form8.contact_email2.id +" in te vullen\r\n" );
		   valid = false;
		 }
	}
	
	

	
	
	
	if(valid==false){
		alert(error_msg);
	}

    return valid;
}

//formvalidation
function validate_search ( )
{
    valid = true;
	error_msg = "";
	
	
	if ( document.contact_form.searchVar.value == "" )
    {
        error_msg += ( "Gelieve het veld "+ document.contact_form.searchVar.id +" in te vullen\r\n" );
        valid = false;
    }	
	
	
	if(valid==false){
		alert(error_msg);
	}

    return valid;
}


//formvalidation
function detail_form()
{
// alert(document.detailform.sublist.value);
  window.location="detail.php?id="+document.detailform.sublist.value;
	
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}