function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

// Send mail catalogue
function submitcatalogue () 
{
	if (fcatalogue.nom.value == ""){ 
        alert ("Veuillez remplir votre nom" )
        fcatalogue.nom.focus()        
		 return;}
	else if (fcatalogue.prenom.value == ""){ 
        alert ("Veuillez remplir votre prénom" )
        fcatalogue.prenom.focus()        
		 return;}
	else if (fcatalogue.email.value == ""){ 
        alert ("Veuillez remplir votre courrier électronique" )
        fcatalogue.email.focus()        
		 return;}
	else if ((fcatalogue.email.value.indexOf('@', 0) == -1) || (fcatalogue.email.value.indexOf('.') == -1)){ 
        alert ("Votre courrier électronique est incorrect" )
        fcatalogue.email.focus()        
		 return;}
	else{
	document.fcatalogue.submit();
        return;}
}	
//end -->
// Send mail contact
function submitcontact () 
{
	if (fcontact.nom.value == ""){ 
        alert ("Veuillez remplir votre nom" )
        fcontact.nom.focus()        
		 return;}
	else if (fcontact.prenom.value == ""){ 
        alert ("Veuillez remplir votre prénom" )
        fcontact.prenom.focus()        
		 return;}
	else if (fcontact.email.value == ""){ 
        alert ("Veuillez remplir votre courrier électronique" )
        fcontact.email.focus()        
		 return;}
	else if ((fcontact.email.value.indexOf('@', 0) == -1) || (fcontact.email.value.indexOf('.') == -1)){ 
        alert ("Votre courrier électronique est incorrect" )
        fcontact.email.focus()        
		 return;}
	else if (fcontact.vmessage.value == ""){ 
        alert ("Veuillez remplir votre message" )
        fcontact.vmessage.focus()        
		 return;}
	else{
	document.fcontact.submit();
        return;}
}	
//end -->

//pop up
function popup(mypage){
	var h = 320;
	var w = 400;
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars=no,';
	settings +='resizable=no ,';
	settings +='status=yes ,';
	win=window.open(mypage,"popup",settings);
	if(parseInt(navigator.appVersion) >= 4)
		{win.window.focus();}
}

