var nomnav = navigator.appName;
var etat_clignotant = 'croissant', compteur_clignotant = 0;
var clignotant_background = new Array();
clignotant_background[0] = '#76c31d';
clignotant_background[1] = '#6fad26';
clignotant_background[2] = '#699c2f';
clignotant_background[3] = '#638a37';
clignotant_background[4] = '#597538';
clignotant_background[5] = '#4f6338';
clignotant_background[6] = '#445234';
clignotant_background[7] = '#353d2c';
clignotant_background[8] = '#272b23';
clignotant_background[9] = '#181a16';
clignotant_background[10] = '#010002';

function saisie_champ(objet)
{
        objet.className = 'contact_input';
}
function saisie_champ_rappel(objet)
{
        objet.className = 'contact_input_rappel';
}
function retour_champ(objet)
{
        objet.className = 'contact_input';
}
function retour_champ_rappel(objet)
{
        objet.className = 'contact_input_rappel';
}
function saisie_textarea(objet)
{
        objet.className = 'contact_textarea';
}
function retour_textarea(objet)
{
        objet.className = 'contact_textarea';
}
function OuvrirFenetre(url, width, height)
{
  window.open(url,"_blank","toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width="+width+",height="+height);
}
function OuvrirImage(url, width, height)
{
  window.open(url,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width="+width+",height="+height);
}
function open_previsite()
{
        window.open('http://195.154.238.164/viewer/ng/classic/viewer.asp?Ref=ldf5788','Previsite','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=450,height=280');
}
function clignotant()
{
	if(etat_clignotant == "croissant")
	{
		if(compteur_clignotant == 10) etat_clignotant = "decroissant";
		else compteur_clignotant++;
	}
	else if(etat_clignotant == "decroissant")
	{
		if(compteur_clignotant == 0) etat_clignotant = "croissant";
		else compteur_clignotant--;
	}
	if(clignotant_background[compteur_clignotant]) document.getElementById('logo_visite').style.backgroundColor = clignotant_background[compteur_clignotant];
/*
	if(document.getElementById('logo_hotel').style.visibility = 'hidden')
	{
		setTimeout("document.getElementById('logo_hotel').style.visibility = 'visible';", 1000);
	}
	else
	{
		setTimeout("document.getElementById('logo_hotel').style.visibility = 'hidden';", 1000);
	}
*/
}

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 accueil(langue)
{
	if(langue == "fr") EcrireCookie('langue', '');
	else EcrireCookie('langue', 'uk');
	window.location.href = "accueil.php";
}
