<!--
/********************** DEBUT VARIABLES GLOBALES*************************/

var urlActuelle = document.location.href.split("/"); // tableau contenant l'URL actuelle
var langueActuelle ; // déclaration de la langue actuelle
var langueCible ;

// affectation de la langue courante
if ((urlActuelle[urlActuelle.length-2] != "fr")&(urlActuelle[urlActuelle.length-2] != "en"))
	{
	langueActuelle = urlActuelle[urlActuelle.length-3];		
	}
else
	{
	langueActuelle = urlActuelle[urlActuelle.length-2];
	}

/*********************FIN VARIABLES GLOBALES***************************/

/****************DEBUT Scripts toujours exécutés**********************/
// n'affiche pas les erreurs javascript (utiliser en phase de production)
function stopError()
	{
	return true;
	}
window.onerror=stopError;

oncontextmenu="return false";
onselectstart="return false";
ondragstart="return false";

// This scripts sets a default text in the status and title bar
function setDefaultText()
	{
	if (langueActuelle == "fr")
		{
		txt = "Liane Models - Agence de mannequins et photomodèles, Lausanne, Suisse";
		window.defaultStatus= txt;
		document.title= txt;
		}
	else
		{
		txt = "Liane Models - Model agency, Lausanne, Switzerland";
		window.defaultStatus= txt;
		document.title= txt;
		}
	}

setDefaultText();

/*This scripts maximize the window to the monitor*/
function MaximizeWindow()
	{
	top.window.moveTo(0,0);
	if (document.all)
		{
		top.window.resizeTo(screen.availWidth,screen.availHeight);
		}
	else if (document.layers||document.getElementById)
		{
		if (top.window.outerHeight < screen.availHeight||top.window.outerWidth < screen.availWidth)
			{
			top.window.outerHeight = screen.availHeight;
			top.window.outerWidth = screen.availWidth;
			}
		}
	}

MM_reloadPage(true);

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();
	}

function LoadXiti()
	{
	doc = document;
	datejour = new Date();
	serveur = '21';
	compte = '108796'
	source = 'http://logv'+serveur+'.xiti.com/hit.xiti?s='+compte;
	source += '&p=&hl=' + datejour.getHours() + 'x' + datejour.getMinutes() + 'x' + datejour.getSeconds();
	Xiti_s = screen;
	source += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;
	source += '&ref=' + doc.referrer.replace('&', '$');
	logo = new Image ;
	logo.src = source; //préchargement image
	//alert(source);
	}

LoadXiti();

// fonctions qui désactivent le right-click sur >=IE4 et >=NS6
var message="";
function clickIE()
	{
	if (document.all)
		{
		(message);
		return false;
		}
	}
	
function clickNS(e)
	{
	if (document.layers||(document.getElementById&&!document.all))
		{
		if (e.which==2||e.which==3)
			{
			(message);
			return false;
			}
		}
	}
	if (document.layers) 
		{
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS;
		}
	else
		{
		document.onmouseup=clickNS;
		document.oncontextmenu=clickIE;
		}

document.oncontextmenu=new Function("return false")

/****************FIN Scripts toujours exécutés**********************/

function changeLangue()
	{
	if (langueActuelle == "fr")
		langueCible = "en" ;
	else
		langueCible = "fr" ;
	var newURL = new String();
	newURL = document.location.href.split("/"+langueActuelle+"/").join("/"+langueCible+"/");
	//alert(newURL)
	document.location = newURL ;
	}

function IsV6()
	{
	/*return true si browser en version 6, false sinon*/
	if (navigator.appName.indexOf("Netscape") >= 0)
		return(parseInt(navigator.appVersion) >= 5);
	else
		return(navigator.appVersion.indexOf("6.") >= 0);	
	}

function afficheMain()
	{
	if (IsV6())
		document.body.style.cursor = "pointer" ;
	}

function cacheMain()
	{
	if (IsV6())
		document.body.style.cursor = "auto" ;
	}

/* Affichage dynamique des switches - flèches*/

var urlActuelle = document.location.href.split("/");
var section = urlActuelle[urlActuelle.length-2];

function RubriqueOff(imageCible)
	{
	if((section == "f")||(section == "m")||(section == "new_faces")||(section == "e")||(section == "hotesses")||(section=="p30")||(section=="contact_pro")||(section=="contact_pro_e")||(section=="contact_model")||(section=="contact_model_e"))
		{
		imageCible.src = "../../common/img/fleche_off.gif" ;
		}
	else
		{
		imageCible.src = "../common/img/fleche_off.gif";
		}
	}
	
function RubriqueOn(imageCible)
	{
	
	if((section == "f")||(section == "m")||(section == "new_faces")||(section == "e")||(section == "hotesses")||(section=="p30")||(section=="contact_pro")||(section=="contact_pro_e")(section=="contact_model")||(section=="contact_model_e"))
		{
		imageCible.src = "../../common/img/fleche_on.gif" ;
		}
	else
		{
		imageCible.src = "../common/img/fleche_on.gif";
		}
	}

// changement opacité d'image (IE5) -  rend visible une image à 100
function makevisible(cur,which)
	{
	if (which==0)
		{
		cur.filters.alpha.opacity=100 ;
		cur.style.borderColor="#1D94C2";
		}
	else
		{
		cur.filters.alpha.opacity=80 ;
		// cur.style.borderColor="#19338F";
		}
	}
	
// lance une popup adaptée à la taille d'une image	
function PopupPic(sPicURL)
	{ 
    window.open( "popup.html?"+sPicURL, "auto", "resizable=1,HEIGHT=200,WIDTH=200"); 
	} 	
	
-->