//window.onload=afficheFirst;
// ---------------------------------------
// Variables de détection du navigateur
// ---------------------------------------
PS_ns4 =(document.layers)? true : false;
PS_ie  =(document.all)? true:false;
PS_ns6 = 0;
var PS_browserType = navigator.appName
var PS_browserVersion = parseInt(navigator.appVersion)
if (PS_browserType == "Netscape" && PS_browserVersion>=5)
	PS_ns6 = true;
var detect_temp = navigator.userAgent.toLowerCase();
var topIE4=250;
var topNS4=250;
//marge=5;
marge=-100;
step=0.1;
Opacity_depart = 0;
var Opacity = Opacity_depart;
var temps_transition = 100;

/* ---------------------------------
	-- afficheFisrt()             --
	--------------------------------*/
function afficheFirst(){
	if (PS_browserType=="Netscape") {
		if (PS_ns4) {
			eval("document.zoneCOL.visibility='show'");
		} else if (PS_ns6) {
			document.getElementById("zoneCOL").style.visibility = "visible";
		}
	} else if (PS_ie){
		document.all.zoneCOL.style.visibility="visible";
	}
	document.getElementById("zoneCOL").style.top = marge+'px';
	if (PS_ie) {
		if (window.opera) {
			document.getElementById("zoneCOL").style.opacity = (Opacity_depart/100);
		} else {
			document.getElementById("zoneCOL").style.filter = "alpha(style=0,opacity=" + Opacity_depart + ")";
		}
	} else {
		document.getElementById("zoneCOL").style.opacity = Opacity_depart/100;
		document.getElementById("zoneCOL").style.MozOpacity = Opacity_depart/100;
	}
	setTimeout("afficheCOL()",temps_transition);
};

/* ---------------------------------
	-- afficheCOL()               --
	--------------------------------*/
function afficheCOL() {
/*	if (PS_browserType=="Netscape") {
		if (PS_ns4) {
			difference = window.innerHeight-document.zoneCOL.document.height;
			hauteur=(pageYOffset+window.innerHeight-document.zoneCOL.document.height-difference);
			eval("document.zoneCOL.top="+hauteur);
		} else if (PS_ns6) {
			//largeur=window.innerWidth-420;
			difference = window.innerHeight-document.getElementById("zoneCOL").style.height;
			hauteur=(pageYOffset+window.innerHeight-document.getElementById("zoneCOL").style.height-difference);
			//document.getElementById("zoneCOL").style.width=largeur;
			//document.getElementById("zoneCOL").style.top= hauteur;
		}
	} else if (PS_ie){
		var hauteur = parseInt((document.body.scrollTop+marge-document.all.zoneCOL.offsetTop)*step);
		if (isNaN(hauteur)) hauteur=0;
			//document.all.zoneCOL.style.pixelTop+=hauteur;
	}*/

		Opacity+= (100-Opacity_depart)/(Math.abs(marge))*(100-Opacity_depart)*step;
		if (Opacity>100) {
			Opacity = 100;
		}
		if (PS_ie) {
			if (window.opera) {
				document.getElementById("zoneCOL").style.opacity = (Opacity/100);
			} else {
				document.getElementById("zoneCOL").style.filter = "alpha(style=0,opacity=" + Opacity + ")";
			}
		} else {
			document.getElementById("zoneCOL").style.opacity = Opacity/100;
			document.getElementById("zoneCOL").style.MozOpacity = Opacity/100;
		}


		if (document.getElementById("zoneCOL").style.top.replace('px', '')-(marge*step)>0) {
			document.getElementById("zoneCOL").style.top=0;
			if (PS_ie) {
				if (window.opera) {
					document.getElementById("zoneCOL").style.opacity = 1;
				} else {
					document.getElementById("zoneCOL").style.filter = "alpha(style=0,opacity=" + "100" + ")";
				}
			} else {
				document.getElementById("zoneCOL").style.opacity = 1;
				document.getElementById("zoneCOL").style.MozOpacity = 1;
			}
		} else {
			var h_temp = document.getElementById("zoneCOL").style.top.replace('px', '') - (marge*step);
			document.getElementById("zoneCOL").style.top= h_temp+'px';
			setTimeout("afficheCOL()",temps_transition);
		}
}

/* ---------------------------------
	-- hideCOL()               --
	--------------------------------*/
function hideCOL() {
	document.getElementById('zoneCOL').style.visibility='hidden';
}

/* ---------------------------------
	-- OpenPopup()               --
	--------------------------------*/
function OpenPopup(url, w, h) {
	var szParams = "toolbar=no,,width=" + w + ",height=" + h + ",scrollbars=1,resize=no";
	win = window.open(url,"newwin", szParams);
}
