function PopupCentrer(page,largeur,hauteur,file) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page+"?file="+file,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+", menubar=no,resizable=no,scrollbars=no,statusbar=no");
}


function RunFoo(swf, largeur, hauteur , couleur, nom) {
	document.write("  <object type=\"application/x-shockwave-flash\" data=\""+swf+"\" width=\""+largeur+"\" height=\""+hauteur+"\"><param name=\"movie\" value=\""+swf+"\" />  </object>");


}
function reset_champ(form, champ){
		document[form][champ].value="";
}
function verif_champ(){
		 for(i=0; i<document.forms[0].elements.length; ++i)
			  if(document.forms[0].elements[i].value == "")  {
					alert("Tous les champs n'ont pas été remplis!");
						document.forms[0].elements[i].focus();
						return false;
			   }
		  return true;
}


function recup_langue(){
	var url = window.location.href;
	if (url.indexOf("/en")!=-1){
			langue="en";
		}
		else {
			if (url.indexOf("/de")!=-1){
				langue="de";
			}
			else {
				if (url.indexOf("/nl")!=-1){
					langue="nl";
				}
				else {
					langue="fr";
				}				
			}			
		}		
	return langue;
}


function make_url_form(num_categorie,page_php){
	//document.write("../categorie40/fr/recherche-construction-bois.php");
	return "../categorie"+num_categorie+"/"+recup_langue()+"/"+page_php;
}


function test_submit() {
    if (document.forms[0].action=="") return false;
	return true ;
}


function go_page(page)
{
    document.forms[0].action = page;
    document.forms[0].submit();
}

