<!--
/********************** 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;



// This scripts sets a default text in the status and title bar
function setDefaultText()
	{
	if (langueActuelle == "fr")
		{
		txt = "ARKANNA STUDIO - SUISSE";
		window.defaultStatus= txt;
		document.title= txt;
		}
	else
		{
		txt = "ARKANNA STUDIO - 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()	
	{
	// affiche le compteur caché de xiti
	hsh = new Date();
	hsd = document;
	hsi = '<a href="http://www.xiti.com/xiti.asp?s=145089"';
	hsi += ' TARGET="_top"><img width="39" height="25" border=0 ';
	hsi += 'src="http://logv24.xiti.com/hit.xiti?s=145089';
	hsi += '&p=&hl=' + hsh.getHours() + 'x' + hsh.getMinutes() + 'x' + hsh.getSeconds();
	if(parseFloat(navigator.appVersion)>=4)
		{
		Xiti_s=screen;
		hsi += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;
		}
	// hsd.writeln(hsi + '&ref=' + hsd.referrer.replace('&', '$') + '" title="Mesurez votre audience"></a>');
	i1 = new Image ; i1.src = 'http://logv24.xiti.com/hit.xiti?s=145089&p=&';
	}

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+"/");
	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 == "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 == "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"); 
	} 	
	
-->
