// Variables globales

var chemin ="";


//---------------------------//
// Detailed Browser Sniffing //
//---------------------------//

function Is()
{
var agent = navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
this.ns2 = (this.ns && (this.major == 3));
this.ns3 = (this.ns && (this.major == 3));
this.ns4b = (this.ns && (this.minor < 4.04));
this.ns4 = (this.ns && (this.major >= 4));
this.ns6 = (this.ns && (this.major >= 5));
this.ie = (agent.indexOf("msie") != -1);
this.ie3 = (this.ie && (this.major == 2));
this.ie4 = (this.ie && (this.major >= 4));
this.ie5  = (this.ie && (agent.indexOf("msie 5")!=-1));
this.op3 = (agent.indexOf("opera") != -1);
this.win = (agent.indexOf("win")!=-1);
this.mac = (agent.indexOf("mac")!=-1);
this.unix = (agent.indexOf("x11")!=-1);
}

var is = new Is();

//-------------------------------------------------------//
// Initialisation de variables pour manipuler les layers //
//-------------------------------------------------------//

function InitVar()
{
if(is.ns4)
	{
	doc = "document";
	sty = "";
	htm = ".document";
	}
else if(is.ie4)
	{
	doc = "document.all";
	sty = ".style";
	htm = "";
	}
}


//------------------------------------------------------------//
// Rendre visible ou invisible un layer                       //
// layer_id : identifiant du layer                            //
//------------------------------------------------------------//

function ShowHideLayer()
{
var nb_arg = ShowHideLayer.arguments;
InitVar();

for (var i=0 ; i<nb_arg.length ; i++)
	{
	layer_id = nb_arg[i];
	layer_objet = eval(doc + '["' + layer_id + '"]' + sty);

	if ((layer_objet.visibility == "show") || (layer_objet.visibility == "visible"))
		{
		layer_objet.visibility = "hidden";
		}
	else if ((layer_objet.visibility == "hide") || (layer_objet.visibility == "hidden"))
		{
		layer_objet.visibility = "visible";
		}
	}

}
//-----------------------//
// Fonction MACROMEDIA   //
// Détection du browser  //
//-----------------------//

function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { //v4.0
  var newURL='', verStr=navigator.appVersion, app=navigator.appName, version = parseFloat(verStr);
  if (app.indexOf('Netscape') != -1) {
    if (version >= NSvers) {if (NSpass>0) newURL=(NSpass==1)?URL:altURL;}
    else {if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;}
  } else if (app.indexOf('Microsoft') != -1) {
    if (version >= IEvers || verStr.indexOf(IEvers) != -1)
     {if (IEpass>0) newURL=(IEpass==1)?URL:altURL;}
    else {if (IEnoPass>0) newURL=(IEnoPass==1)?URL:altURL;}
  } else if (OBpass>0) newURL=(OBpass==1)?URL:altURL;
  if (newURL) { window.location=unescape(newURL); document.MM_returnValue=false; }
}



