// JavaScript Documentfunction popupcentree(page,largeur,hauteur,options)
function popupcentree(page,largeur,hauteur,options)
{
var top=(screen.height-hauteur)/2;
var left=(screen.width-largeur)/2;
window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
function getChecked(NomFormulaire,NomRadio)
{
if (document.all) 
var entiteBalayee =  eval('document.all.'+ NomFormulaire+'.'+NomRadio);
else
var entiteBalayee =  document.getElementById(NomFormulaire).eval(NomRadio);
 for (var i=0; i<entiteBalayee.length;i++) 
         if (entiteBalayee[i].checked) return entiteBalayee[i].value;
return "";
}
function venteGo() {
	document.getElementById('formRecherche').action = "vente.php";
	document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
	document.getElementById('formRecherche').submit();
}
function LocationGo() {
		document.getElementById('formRecherche').action = "location.php";
		document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
		document.getElementById('formRecherche').submit();
}
function LocationSaisonGo() {
		document.getElementById('formRecherche').action = "location_saisonniere.php";
		document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
		document.getElementById('formRecherche').submit();
}
function NeufGo() {
		document.getElementById('formRecherche').action = "programme_neuf.php";
		document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
		document.getElementById('formRecherche').submit();
}

function recherche(selecteur){
	var rchk = getChecked('formRecherche','radiobutton');
	if (rchk == 'Vente') {
		document.getElementById('formRecherche').radiobutton.elements[0].checked = True;
		document.getElementById('formRecherche').action = "vente.php";
		document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
		document.getElementById('formRecherche').submit();
	}
	
	if(rchk == 'Location') {
		document.getElementById('formRecherche').action = "location.php";
		document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
		document.getElementById('formRecherche').submit();
	}
	if(rchk == 'LocationSaison') {
		document.getElementById('formRecherche').action = "location_saisonniere.php";
		document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
		document.getElementById('formRecherche').submit();
	}
	if(rchk == 'Neuf') {
		document.getElementById('formRecherche').action = "programme_neuf.php";
		document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.	getElementById('selectTri').selectedIndex].value;
		document.getElementById('formRecherche').submit();
	}
}
//-->
function tri(ActionPage) {
	document.getElementById('formRecherche').trievalue.value = document.getElementById('selectTri').options[document.getElementById('selectTri').selectedIndex].value;
	document.getElementById('formRecherche').action = ActionPage;
	document.getElementById('formRecherche').submit();
}
function EcrireCookie(nom, valeur)
{
	var argv=EcrireCookie.arguments;
	var argc=EcrireCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=nom+"="+escape(valeur)+
	((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
	((path==null) ? "" : ("; path="+path))+
	((domain==null) ? "" : ("; domain="+domain))+
	((secure==true) ? "; secure" : "");

}
function setK(nom, valeur,Reponse) {
date=new Date;
date.setMonth(date.getMonth()+1);
EcrireCookie(nom, valeur,date)
EcrireCookie(nom+'REP','-1',date)
	alert('Message mémorisé pendant un mois');
}
function EffaceCookie(nom)
{
date=new Date;
date.setFullYear(date.getFullYear()-1);
EcrireCookie(nom,null,date);
EcrireCookie(nom+'REP',null,date);
window.location.reload( false );
}
function EmbedImage()
{ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="350"><param name="movie" value="intro.swf"><param name="quality" value="high"><embed src="intro.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="350"></embed></object>');
}
function EmbedMenu()
{ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="45"><param name="movie" value="menu.swf"><param name="quality" value="high"><embed src="menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="45"></embed></object>');
}
function embedPub1()
{ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="130"> <param name="movie" value="diapo01.swf"><param name="quality" value="high"><embed src="diapo01.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="130"></embed></object>');
}
function EmbedAccess()
{ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http:/<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="310"><param name="movie" value="acces.swf"><param name="quality" value="high"><embed src="acces.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="310"></embed></object>');
}