function changelanguage(t){
// A METTRE EN PLACE POUR INDEX.PHP	window.location='index.php?'+t;
	window.location='index.php?lang='+t;  // A RETIRER APRES INDEX1.PHP
}
function changecountry(c){
// A METTRE EN PLACE POUR INDEX.PHP	window.location='http://www.eliterent.'+c;
	window.location='http://www.eliterent.com/index.php?location='+c;  // A RETIRER APRES INDEX1.PHP
}
function ouvre_popup(page) {
   window.open(page,"ELITE","menubar=no, status=no, scrollbars=no, menubar=no, rezisable=yes, width=570, height=550");
}

//including_mainmenu.php

function menumontre(n){
	var max=6;
	for(i=1;i<=max;i++){
		var m="numb"+i;
		var dis="none";
		if(m==n) dis="block";
		document.getElementById(m).style.display=dis;
	}
}
function titleblack(pa){
	for(p=1;p<=6;p++){
		var parentnb="parent"+p;
		if(p==pa) col='#ffe391'; else col='#fff';
		document.getElementById(parentnb).style.color=col;
	}
}
 // end
 
 // including/bloc_search.php
function submitform_mod( secured, lang, servername ) {
		// URL REWRITING /////////////////////////////
		// solution 2 : définir l'url en ajax
		if (document.getElementById("QB_type2").checked){
			if (secured == 0) { 
        document.quicksearch.action="http://"+servername+"/pages/fleet.php?&target=cs&idcou="+document.quicksearch.id_country2.value+"&idcat="+document.quicksearch.QB_CATEGORY2.value+"&ll="+lang;
		  } else {
        document.quicksearch.action="https://"+servername+"/pages/fleet.php?&target=cs&idcou="+document.quicksearch.id_country2.value+"&idcat="+document.quicksearch.QB_CATEGORY2.value+"&ll="+lang;
      }
    }else{
    if (secured == 0) {
			document.quicksearch.action="http://"+servername+"/pages/fleet.php?&target=cr&idcou="+document.quicksearch.id_country.value+"&idcat="+document.quicksearch.QB_CATEGORY.value+"&idbra="+document.quicksearch.QB_BRAND.value+"&ll="+lang;
		} else {
      document.quicksearch.action="https://"+servername+"/pages/fleet.php?&target=cr&idcou="+document.quicksearch.id_country.value+"&idcat="+document.quicksearch.QB_CATEGORY.value+"&idbra="+document.quicksearch.QB_BRAND.value+"&ll="+lang;  
    }
    }
    document.quicksearch.submit();
	}



	function change_div() {
	   if (document.getElementById("QB_type1").checked ) {
		 document.getElementById("car_rental").style.display = "block";
		 document.getElementById("chauffered_service").style.display = "none";
		 document.quicksearch.id_country2.value="";
		 document.quicksearch.QB_CATEGORY.value="0";
		 document.quicksearch.QB_BRAND.value="0";
		 document.quicksearch.QB_SERVICE.value="0";
		 document.quicksearch.QB_CATEGORY2.value="0"; 
	   }
	   else {
		 document.getElementById("car_rental").style.display = "none";
		 document.getElementById("chauffered_service").style.display = "block";
		 document.quicksearch.id_country.value="";
		 document.quicksearch.QB_CATEGORY.value="0";
		 document.quicksearch.QB_BRAND.value="0";
		 document.quicksearch.QB_SERVICE.value="0";
		 document.quicksearch.QB_CATEGORY2.value="0";
	   }
	}

function file(fichier) {
	// fonction ajax pour envoi données get
	if(window.XMLHttpRequest) // FIREFOX
		xhr_object = new XMLHttpRequest();
	else 	if(window.ActiveXObject) // IE
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);
	xhr_object.open("GET", fichier, false);
	xhr_object.send(null);
	if(xhr_object.readyState == 4) return(xhr_object.responseText);
		else return(false);
}
 // end
 
 //including/menu_contact.php
 	function cree_mail(mym1,mym2,mym3) 
	{
		var mailto = "mailto:";
		var complete = mailto+mym1+mym2+mym3;
		//alert("coucou"+complete);
		window.location.replace(complete);
	}
 // end
 
 
 // fleet
 function showConditions(sUrl)
{
    var newWindow = window.open(sUrl,'Elite_conditions',"width=450, height=550, toolbar=no,resizable=no,scrollbars=yes,dependent=yes");
}

 // end
 
 
 
