function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}

this.oldmenu="false";
this.oldbouton="false";
this.oldcontenu="false";
efface_menu = -1;

function entre(nom)
{
chemin="images/";
document.images[nom].src=chemin+nom+"_f2.jpg";
this.oldbouton=nom;
}

function sort()
{
if(this.oldbouton!="false")
{document.images[oldbouton].src=chemin+oldbouton+".jpg";
this.oldbouton="false";}
}

function gentre(nom)
{
chemin="images/";
document.images[nom].src=chemin+nom+"_f2.jpg";
this.oldbouton=nom;
}

function gsort()
{
if(this.oldbouton!="false")
{document.images[oldbouton].src=chemin+oldbouton+".jpg";
this.oldbouton="false";}
}




function b_entre(nom)
{
chemin="images/index/";
document.images[nom].src=chemin+nom+"_f2.jpg";
this.oldbouton=nom;
}

function b_sort()
{
if(this.oldbouton!="false")
	{
	document.images[oldbouton].src=chemin+oldbouton+".jpg";
	this.oldbouton="false";
	}
}


function montre(nomlayer)
{
	hideit(false,nomlayer);
	this.oldmenu=nomlayer;
}


function cache()
{

if(this.oldmenu!="false")
	{
	hideit(true,oldmenu);
	this.oldmenu="false";
	}
if (efface_menu > -1)
	{
	clearTimeout(efface_menu);
	}
if(this.oldbouton!="false")
{document.images[oldbouton].src=chemin+oldbouton+".jpg";
this.oldbouton="false";}
}


function timeout()
{
efface_menu=setTimeout("cache()", 250);
}


function cleartime()
{
clearTimeout(efface_menu);
}


function montre_contenu(numlayer)
{
	hideit(false,'fond_bloqueur');
	hideit(false,'fond_general');
	hideit(false,'titre_contenu'+numlayer);
	hideit(false,'new_contenu'+numlayer);
	this.oldcontenu=numlayer;
}


function cache_contenu()
{
if(this.oldcontenu!="false")
	{
	hideit(true,'fond_bloqueur');
	hideit(true,'fond_general');
	hideit(true,'titre_contenu'+oldcontenu);
	hideit(true,'new_contenu'+oldcontenu);
	this.oldcontenu="false";
	}
}


//Verification Champs Formulaire
function verifie_contact(formulaire) {
var chaine = "";

if (formulaire.nom.value ==''){ chaine += "- Nom\n"; }
if (formulaire.prenom.value ==''){ chaine += "- Prenom\n"; }
if (formulaire.adresse.value ==''){ chaine += "- Adresse\n"; }
if (formulaire.cp.value ==''){ chaine += "- Code postal\n"; }
if (formulaire.ville.value ==''){ chaine += "- Ville\n"; }
if (formulaire.pays.value ==''){ chaine += "- Pays\n"; }
if (formulaire.email.value ==''){ chaine += "- Email\n"; }
if (formulaire.message.value ==''){ chaine += "- Message\n"; }

if (chaine)
        {
        alert("ERREUR\nLes champs suivants doivent etre completes :\n" + chaine);
        return false;
        }

else { return true;}
}


//Verification E-mail
function verifie_email(objet)
	{
	resultat = true;
	
	if ((objet.value.length > 0) & (objet.value.length < 7))
		{
		resultat = false;
		}
	
	var nb1 = objet.value.indexOf("@");
	var nb2 = objet.value.lastIndexOf("@");
	
	if((nb1 != nb2)||(nb1 == '-1'))
		{
		resultat = false;
		}
		
	var adr_temp = objet.value.substring(nb1+1,objet.value.length);
	var nbdot = adr_temp.lastIndexOf(".");
	var elem1 = objet.value.substring(0,nb1);
	var elem2 = adr_temp.substring(0,nbdot);
	var elem3 = adr_temp.substring(nbdot+1,objet.value.length);
	
	if((elem1.length==0)||(elem1.indexOf(" ")!=-1))
		{
		resultat = false;
		}
		
	if((elem2.length<2)||(elem2.indexOf(" ")!=-1))
		{
		resultat = false;
		}
		
	if((elem3.length<2)||(elem3.length>3)||(elem3.indexOf(" ")!=-1))
		{
		resultat = false;
		}
		
	if (resultat == false)
		{
		alert("Cet E-mail n'est pas valide");
		Gimefocus(objet);
		}
	}

function Gimefocus(objet)
{
objet.value="";
objet.focus();
}


function ShowHideZone(zone_name)
	{
	object = GetJSObject(zone_name);
	zstatus = object.style.display;	
	if(zstatus == "none") { zstatus = "block"; } else { zstatus = "none"; }		
	object.style.display = zstatus;
	return false;
	}
	
	
	
	
function GetJSObject(object_name,mode)
	{
	if(document.all) 
		{
		if(mode == "div") { object = document.all(object_name).style; } else { object = document.all(object_name); }
		}
	else if(document.getElementById) { object = document.getElementById(object_name); }
	return object;
	}
	
	
function hideit(action,nom_layer) {
  if (document.layers) {
    // Netscape 4 stuff
    var cible = document.layers[nom_layer];
  } else if (document.getElementById) {
    // IE 5 and Netscape 6
    var cible = document.getElementById(nom_layer);
  } else if (document.all) {
    // IE 4 ??
    var cible = document.all(nom_layer);
  } else {
    alert("Probl&egrave;me avec votre navigateur");
  }
  if (cible.style) 
  {
    // IE4 ??, IE5, Netscape 6

    if (action) { cible.style.visibility = "hidden"; } 
	else { cible.style.visibility = "visible"; }
  } 
  else {
    // Netscape 4
    if (action) { cible.visibility = "hide";} 
	else { cible.visibility = "show"; }
  }
}

function popup(chemin)
{
html = '<HTML><HEAD><title>chambre de sˇjour avec vue</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="text.css"></HEAD><body><CENTER><a href="#" onClick="window.close()" class="lienmarine"><IMG SRC="'+chemin+'" BORDER=0 NAME=monImage border="0" onLoad="window.resizeTo(document.monImage.width+60,document.monImage.height+100); window.moveTo((screen.width-document.monImage.width)/2,5)"><br></a></CENTER></BODY></HTML>';
ouvrirImage = window.open('','_blank','toolbar=0,location=0,menuBar=0,scrollbars=0,resizable=0');
ouvrirImage.document.write(html);
}
