/**********************************************************
Fonction affichage menu déroulant horizontal
**********************************************************/
function montre(id) { 
     if (document.getElementById) { 
         document.getElementById(id).style.display="block"; 
        } else if (document.all) { 
         document.all[id].style.display="block"; 
        } else if (document.layers) { 
         document.layers[id].display="block"; 
        } } 

function cache(id) { 
     if (document.getElementById) { 
         document.getElementById(id).style.display="none"; 
        } else if (document.all) { 
         document.all[id].style.display="none"; 
        } else if (document.layers) { 
         document.layers[id].display="none"; 
        } } 
		
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


/**********************************************************
FIN Fonction affichage menu déroulant horizontal
**********************************************************/
/**********************************************************
Affichage PNG sous IE
**********************************************************/
/*if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent)
{
	document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
	window.attachEvent("onload", fnLoadPngs);
}
*/
function fnLoadPngs()
{
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--)
	{
		if (itsAllGood && img.src.match(/\.png$/i) != null)
		{
			var src = img.src;
			var div = document.createElement("DIV");
			div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')"
			div.style.width = img.width + "px";
			div.style.height = img.height + "px";
			img.replaceNode(div);
		}
		img.style.visibility = "visible";
	}
}
/*
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	window.attachEvent("onload", alphaBackgrounds);
}
*/
function alphaBackgrounds(){
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
	for (i=0; i<document.all.length; i++){
		var bg = document.all[i].currentStyle.backgroundImage;
		if (itsAllGood && bg){
			if (bg.match(/\.png/i) != null){
				var mypng = bg.substring(5,bg.length-2);
				document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
				document.all[i].style.backgroundImage = "url('/assets/images/x.gif')";
			}
		}
	}
}

/**********************************************************
FIN Affichage PNG sous IE
**********************************************************/
/**********************************************************
Affichage POP UP
**********************************************************/

function ouvreFenetre(page, largeur, hauteur)
	{
	window.open(page, "", "scrollbars=yes,menubar=no,toolbar=no,resizable=yes,width=" + largeur + ",height=" + hauteur +",top=100,left=100");
	}
/**********************************************************
FIN Affichage POP UP
**********************************************************/
/**********************************************************
Affichage POP UP taille photo
**********************************************************/


function ImageMax(chemin)
   {
   i1 = new Image;
   i1.src = chemin;
   html = '<html><head><title>ImageMax</title></head><body scroll="no" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" onBlur="top.close()"><IMG src="'+chemin+'" BORDER=0 NAME=ImageMax onLoad="window.resizeTo(document.ImageMax.width+10,document.ImageMax.height+60)"></body></html>';
   popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
   popupImage.document.open();
   popupImage.document.write(html);
   popupImage.document.close()
   };
/**********************************************************
FIN Affichage POP UP taille photo
**********************************************************/

// Affichage d'un Objet déclaré dans le document... 
//---------------------------------------------- 
function Affiche_OBJ(){ 
  var Arg = arguments; // Récup liste des arguments passée à la fonction 
  var Obj; 
  for( var i=0; i< Arg.length; i++){ // On parcours la liste 
    Obj = document.getElementById( Arg[i]); // Récup Objet correspondant 
    if( Obj){ 
      Obj.style.visibility = "visible"; 
      //-- Ou autre méthode 
       
    } 
  } 
} 
//---------------------------------------------- 
// Masquage d'un Objet déclaré dans le document... 
//---------------------------------------------- 
function Masque_OBJ(){ 
  var Arg = arguments; // Récup liste des arguments passée à la fonction 
  var Obj; 
  for( var i=0; i< Arg.length; i++){ // On parcours la liste 
    Obj = document.getElementById( Arg[i]); // Récup Objet correspondant 
    if( Obj){ 
      
      //-- Ou autre méthode 
      Obj.style.visibility = "hidden"; 
    } 
  } 
} 


//---------------------------------------------- 
// Variante Masquage d'un Objet déclaré dans le document... 
//---------------------------------------------- 

function toggle(eltId)
{
            var elt = document.getElementById(eltId);
            elt.style.display = (elt.style.display == "block") ? "none" : "block";
}




//---------------------------------------------- 
// Texte clignotant 
//---------------------------------------------- 
 i=0;
 function couleur()
 {
 tabColoris = new Array ("#11138A","#ff6000");// Vous pouvez changer les couleurs ou en rajouter
 if (i+1 == tabColoris.length) i=0;
 else i++;
 document.getElementById("clignote").setAttribute('color',tabColoris[i]);
 setTimeout("couleur()",1500);
 }

/**********************************************************
Enregistrer le site sur favoris  "Changer l'adresse du site dans le script"
**********************************************************/

function favoris() { 
if ( navigator.appName != 'Microsoft Internet Explorer' ) 
{ window.sidebar.addPanel("Fernandes Immobilier - Agence immobilière des Yvelines - Les Mureaux -","http://www.fernandesimmobilier.fr/",""); } 
else { window.external.AddFavorite("http://www.fernandesimmobilier.fr/","Fernandes Immobilier - Agence immobilière des Yvelines - Les Mureaux -"); } } 

/**********************************************************
Fin Enregistrer le site sur favoris
**********************************************************/

