/*-------------------------------------------------------------------------------------------*/
//concerne ie>3 + ns4/6 sous Mac 0s et ns4/6 sous Windows
//dleroy 31/01/02
var ShockMode = 0;
//if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) 
//{
//	if (navigator.plugins && navigator.plugins["Shockwave Flash"]) ShockMode = 1;
//}

//--------------------------Constructeur d'objets de sélection navigateurs/plateformes-----------------------
//dleroy 24/01/02

function TestNav() 
{
	this.pltfrm=navigator.platform;
	var nav = navigator.appName;
	this.agent=navigator.userAgent;
	if (nav=="Netscape") this.nav = "ns";
	else if (nav=="Microsoft Internet Explorer") this.nav = "ie";
	else this.nav = nav;
	this.version = parseInt(navigator.appVersion);  //???
	this.ns = (this.nav=="ns" && this.version>=4);
	this.ie = (this.nav=="ie" && this.version>=4);  //???
	this.min = (this.ns||this.ie);
	this.dom=document.getElementById?1:0; // ns6 et ie5/6
	this.ie5=(this.agent.indexOf("MSIE 5")>0 && this.dom && !this.opera5)?1:0; //???
	this.ie6=(this.agent.indexOf("MSIE 6")>0 && this.dom && !this.opera5)?1:0;  //???
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;   //???
	this.ns6=(this.dom && parseInt(this.version) >= 5) ?1:0; //
	this.ns4=(document.layers && !this.dom)?1:0;//
	//this.opera5=this.agent.indexOf("Opera 5")>0;
	//this.opera6=this.agent.indexOf("Opera")>0;
	this.navigateurs=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	this.mac=this.agent.indexOf("Mac")>-1;
	this.ns4Win = (this.nav=="ns" && this.version==4 && this.pltfrm=="Win32");//
	this.ns5Win = (this.nav=="ns" && this.version==5 && this.pltfrm=="Win32");//
	this.ns4Mac = (this.nav=="ns" && this.version==4 && this.pltfrm=="MacPPC");//
	this.ns5Mac = (this.nav=="ns" && this.version==5 && this.pltfrm=="MacPPC");	//
	this.ie4Win = (this.agent.indexOf('MSIE 4')>0 && this.pltfrm=="Win32");//	
	this.ie5Win = (this.agent.indexOf('MSIE 5')>0 && this.pltfrm=="Win32");
	this.ie6Win = (this.agent.indexOf('MSIE 6')>0 && this.pltfrm=="Win32");
	this.ie4Mac = (this.agent.indexOf('MSIE 4')>0 && this.pltfrm=="MacPPC");
	this.ie5Mac = (this.agent.indexOf('MSIE 5')>0 && this.pltfrm=="MacPPC");
	this.ie6Mac = (this.agent.indexOf('MSIE 6')>0 && this.pltfrm=="MacPPC");
	this.ieWin = (this.ie4Win || this.ie5Win || this.ie6Win);
	this.ieMac = (this.ie4Mac || this.ie5Mac ||  this.ie6Mac);
	this.Win = (this.pltfrm=="Win32");
	this.Mac = (this.pltfrm=="MacPPC");
	this.isFlashNS=(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)?true:false;
	this.flash=(navigator.plugins && navigator.plugins["Shockwave Flash"])?1:0;
	//this.flash5=(navigator.plugins && navigator.plugins["Shockwave Flash 5.0"])?1:0;
	//this.navOpera=(navigator.userAgent.substring(47,52)=="Opera")
}

var which = new TestNav() //Crée l'objet "TestNav"

//------------------------------- Recharge Netscape sur le redimensionnement -----------------------
//dleroy 24/01/02

function regenerate(){
window.location.reload();
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400);
}
if (which.ns){
window.onload=regenerate2()}
//else setTimeout("window.onresize=regenerate",400);

//-----------------------------------------Les ouvertures de popups----------------------------------------------------
function fenetre(url)
{
	window.open(url,'fenA','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=453,height=500,top=100,left=100,true');
}

/*------------------------------------- Compatibilité navigateurs ---------------------------------------*/
//shebu 16/11/00

var version=navigator.appVersion.charAt(0);
function getStyleTopObj(elt){
		var pTop;
		if (document.getElementById) pTop = document.getElementById(elt).style.top;
		else if (document.layers) pTop = document.layers[elt].top;
		else if (document.all) pTop = document.all[elt].style.pixelTop;
		return pTop;
}

function setStyleTopObj(elt,val) {
	if (document.getElementById) document.getElementById(elt).style.top = val+"px";
	else if (document.layers) document.layers[elt].top = val;
	else if (document.all) document.all[elt].style.pixelTop=val;
}

function getStyleObj(elt){
		var pStyle;
		if (document.getElementById) pStyle = document.getElementById(elt).style;
		else if (document.layers) pStyle = document.layers[elt];
		else if (document.all) {pStyle = document.all[elt].style;}
		return pStyle;
}

function getDivObj(elt){
		var pDiv;
		if (document.getElementById) pDiv = document.getElementById(elt);
		else if (document.layers) pDiv = document.layers[elt];
		else if (document.all) pDiv = document.all[elt];
		return pDiv;
}

var cVisible;var cHidden;

function setDhtmlConst() {
		if ((document.getElementById)||(document.all)) {cVisible = 'visible';cHidden = 'hidden';}
		else if (document.layers) {cVisible = 'show';cHidden = 'hide';}
}
setDhtmlConst();


