//************************************************************************
//Fonctions
//************************************************************************
function ShadowWave()
{
	if(document.getElementById && window.print)
		{
		document.getElementById("ejs_brouille").style.filter="shadow(color=#ffe4d2,direction=45,enabled=1)";
		}
}

function fullwin(){
	var msg;
	msg='Confirmez-vous le passage du site du Groupe Eurower en plein écran ?\n\n';
	msg=msg+'Revenez en mode normal en appuyant sur Alt+F4 ...';
	if (confirm(msg)==true)
	{
	window.open(location.href,"","fullscreen,scrollbars")
	}
}

//************************************************************************
//Menu contextuel
//************************************************************************
function displayMenu() {
	whichDiv=event.srcElement;
	menu1.style.leftPos+=10;
	menu1.style.posLeft=event.clientX+window.document.body.scrollLeft;
	menu1.style.posTop=event.clientY+window.document.body.scrollTop;
	menu1.style.display="";
	menu1.setCapture();
}
function switchMenu() {
	el=event.srcElement;
	if (el.className=="menuItem") {
		el.className="highlightItem";
	} else if (el.className=="highlightItem") {
		el.className="menuItem";
	}
}
function clickMenu() {
   menu1.releaseCapture();
   menu1.style.display="none";
   el=event.srcElement;
   if (el.id=="mnueurower") {
		tableau = new Array()
		chaine = new String();
		tableau = location.href.split("/");
		chaine =tableau[0]+"//"+tableau[2]+"/";
		location.href=chaine;
   } else if (el.id=="mnufullwin") {
      fullwin();
   } else if (el.id=="mnuemail") {
		location.href="mailto:eurower@eurower.com";
   }
}

//************************************************************************
//Degrade
//************************************************************************
var hexa = "0123465789ABCDEF";

function DecToHexa(DecNb) {
	x = Math.floor(DecNb / 16);
	h = hexa.charAt(x);
	x = DecNb % 16;
	h += hexa.charAt(x);
	return h;
}

function Degrade(dr,dg,db,fr,fg,fb,texte) {
	steps = texte.length;
	cr = dr; cg = dg; cb = db;
	sr = (fr - dr) / steps;
	sg = (fg - dg) / steps;
	sb = (fb - db) / steps;
	for (var x = 0; x <= steps; x++) {
		document.write('<FONT COLOR="#' + DecToHexa(cr) + DecToHexa(cg) + DecToHexa(cb) + '">');
		document.write(texte.charAt(x));
		document.write('</FONT>');
		cr += sr; cg += sg; cb += sb;
	}
}

//************************************************************************
//Tests
//************************************************************************
function TestNavigateur(){
	//document.all=Vrai si IE sinon undefined
	//document.layers=Vrai si Netscape undefined
	//document.all ET document.layers=Faux si Mozilla
	//Mozilla sera traite comme Netscape

	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)

	msg="ver: "+this.ver+"\n";
	msg=msg+"dom: "+this.dom+"\n";
	msg=msg+"ie5: "+this.ie5+"\n";
	msg=msg+"ie4: "+this.ie4+"\n";
	msg=msg+"ns5: "+this.ns5+"\n";
	msg=msg+"ns4: "+this.ns4+"\n";
	msg=msg+"bw: "+this.bw+"\n";

	alert(msg);
	alert("All:"+document.all);
	alert("Layers:"+document.layers);
}
//************************************************************************
//
//************************************************************************