// Javascripts CINREL.NET

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImagesindex() {
	if (document.images) {
		index_11_over = newImage("images/index_11-over.gif");
		index_13_over = newImage("images/index_13-over.gif");
		index_16_over = newImage("images/index_16-over.gif");
		index_19_over = newImage("images/index_19-over.gif");
		index_22_over = newImage("images/index_22-over.gif");
		preloadFlag = true;
	}
}

function preloadImages() {
	if (document.images) {
		default_11_over = newImage("images/default_11-over.gif");
		default_13_over = newImage("images/default_13-over.gif");
		default_16_over = newImage("images/default_16-over.gif");
		default_19_over = newImage("images/default_19-over.gif");
		default_22_over = newImage("images/default_22-over.gif");
		preloadFlag = true;
	}
}


/*************
** COMBOBOX **
*************/
function go()
{
	box = document.forms[0].navi;
	destination = box.options[box.selectedIndex].value;
	if (destination)
		location.href = destination;
}


bgcolor='#FFFFFF';
bgcolor2='#456c9d';
document.write('<style type="text/css">');
document.write('.popper { position: absolute; VISIBILITY: hidden; z-index:3; }')
document.write('#topmenu { position: absolute; top: 108px;  z-index:10; }');
document.write('A:hover.ejsmenu {color: #ffffff; text-decoration:none;}');
document.write('A.ejsmenu {color: #000000; text-decoration:none;}');
document.write('</style>');
document.write('<div style="position:absolute; height:25"><DIV class=popper id=topdeck></DIV>');

/******
 LIENS
******/

zlien = new Array;
zlien[0] = new Array;
zlien[1] = new Array;
zlien[2] = new Array;
zlien[0][0] = '<A HREF="presentation.php" target="_top" CLASS=ejsmenu>Pr&eacute;sentation</A>';
zlien[0][1] = '<A HREF="salons.php" target="_top" CLASS=ejsmenu>Salons</A>';
zlien[0][2] = '<A HREF="presse.php" target="_top" CLASS=ejsmenu>Presse</A>';
zlien[1][0] = '<A HREF="ipbx.php" target="_top" CLASS=ejsmenu>IPBX Centrex</A>';
zlien[1][1] = '<A HREF="hebergement.php" target="_top" CLASS=ejsmenu>H&eacute;bergement de lignes</A>';
/* zlien[1][2] = '<A HREF="automateappels.php" CLASS=ejsmenu>Automate d\'appels</A>'; */
zlien[2][0] = '<A HREF="phoneserver.php" target="_top" CLASS=ejsmenu>PHONE SERVER&reg;</A>';
zlien[2][1] = '<A HREF="planificationressources.php" target="_top" CLASS=ejsmenu>Planification des ressources</A>';
zlien[2][2] = '<A HREF="cti.php" target="_top"  CLASS=ejsmenu>CTI</A>';

/*** ADAPTATION AUX DIFFERENTS NAVIGATEURS ***/
var adapt = 0;
if ( navigator.appName != "Microsoft Internet Explorer" && screen.width > 1024) {
	adapt = (screen.width - 1024) / 2;
}
/*********************************************/

var nava = document.layers;
var dom = document.getElementById;
var iex = document.all;
if (nava)
	skn = document.topdeck;
else if (dom)
	skn = document.getElementById("topdeck").style;
else if (iex)
	skn = topdeck.style;
else
	alert("Le menu ne peut pas être chargé, car votre navigateur est incompatbile.\nVeuillez utiliser le menu en haut à droite.");

function pop(msg,posx,posy,width)
{
	skn.visibility = "hidden";
	a = true;
	skn.left = (posx + adapt);
	skn.top = posy;
	var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="+bgcolor+" WIDTH="+width+" ID=\"topmenu\" style=\"border-style:solid; border-width:2px; border-color:#000000;\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>";
	pass = 0;
	while (pass < msg.length)
	{
		content += "<TR><TD BGCOLOR="+bgcolor+" onMouseOver=\"this.style.background='"+bgcolor2+"'\" onMouseOut=\"this.style.background='"+bgcolor+"'\" HEIGHT=20><FONT SIZE=1 FACE=\"Verdana\">&nbsp;&nbsp;"+msg[pass]+"</FONT></TD></TR>";
		pass++;
	}
	content += "</TABLE></TD></TR></TABLE>";
	if (nava)
  	{
		skn.document.write(content);
	  	skn.document.close();
	  	skn.visibility = "visible";
  	}
    else if (dom)
  	{
	  	document.getElementById("topdeck").innerHTML = content;
	  	skn.visibility = "visible";
  	}
    else if (iex)
  	{
	  	document.all("topdeck").innerHTML = content;
	  	skn.visibility = "visible";
  	}
}

function kill()
{
	skn.visibility = "hidden";
}

document.onclick = kill;
document.write('</div>');
