function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



///////////////////////////////////MENUS DES PAGES INTERIEURES////////////////////////////////////////////////////////
monMenu="temp"
monSousMenu="temp"

function rollOver(quelleImg, etat)
{
	document.images[quelleImg].src="../images/"+quelleImg+etat+".gif"
}

function rollOut(quelleImg)
{
	if (monMenu != quelleImg+"_roll.jpg" && monSousMenu != quelleImg+"_roll.jpg")
	{
		document.images[quelleImg].src="../images/"+quelleImg+".gif"
	}
}

function lightMenu(quelleImg)
{
	monMenu=quelleImg+"_roll.jpg"
	document.images[quelleImg].src="../images/"+quelleImg+"_o.gif"
}

function lightSousMenu(quelleImg)
{
	monSousMenu=quelleImg+"_roll.jpg"
	document.images[quelleImg].src="../images/"+quelleImg+"_o.gif"
}

/////////////////////////////////////MENU DE LA SPLASH PAGE///////////////////////////////////////////////////////////////////

function rollOverSp(quelleImg, etat)
{
	document.images[quelleImg].src="images/"+quelleImg+etat+".gif"
}

function rollOutSp(quelleImg)
{
	if (monMenu != quelleImg+"_roll.jpg")
	{
		document.images[quelleImg].src="images/"+quelleImg+".gif"
	}
}


/*- -- - - - - - - - - Cookies - - - --- - - -*/

function createLang(which)
{
	document.cookie='kealLang='+which+'; expires=Thu, 2 Aug 2090 20:47:11 UTC; path=/';
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function checkLang()
{
 maLang=readCookie('kealLang')
  maLang=String(maLang);

  if (maLang=="en")
  {
    document.location="en/home.asp"
  }
  else if (maLang=="fr")
  {
    document.location="fr/home.asp"
  }
}

function eraseCookie(kealLang) {
	createCookie('kealLang',"",-1);
}

/*- - - -  -- - - - - - CREATE FORM DIV- - - - - --- - - - - -*/

function createForm()
{

	var txt="";
	txt+="<h1 style='font-weight:bold; font-size:17px; color:#fca234; margin-bottom:8px;'>Information Request Form</h1>"
	txt+="<form action='buyHardwareProcess.asp' method='post'>"
	txt+="<table style='margin:0;padding:0;'><tr><td>Name : </td><td><INPUT size=26 maxlength=30 name='name' border=0></td></tr>";
	txt+="<tr><td>Email: </td><td><INPUT size=26 maxlength=128 name='email'></td></tr>";
	txt+="<tr><td>Phone : </td><td><INPUT size=26 maxlength=15 name='phone'></td></tr>";
	txt+="<tr><td valign='top'>Description : </td><td><TEXTAREA name=description rows=10></TEXTAREA></td></tr>";
	txt+="<tr><td><INPUT type=submit value='submit' id=submit1 name=submit1></td><td></td></tr></table></form>";


	if (!document.getElementById('divForm'))
	{
		//           ID            width   height  left  top
		creatediv("divForm",txt,"400px","200px","0px","160px")
	}
	else
	{
		closeDiv('divForm')
	}
}


function closeDiv(whichDiv)
{
	var d = document.getElementById(whichDiv);
 	document.body.removeChild(d);
}

function creatediv(id,html,width,height,left,top)

{

	var newdiv = document.createElement('div');
	var monContent=""
	newdiv.setAttribute('id',id);
	if(width)
	{
		newdiv.style.width = width;
	}
	if(height)
	{
		newdiv.style.height = height;
	}
	if((left || top)||(left && top))
	{
		newdiv.style.position = "absolute";
		if(left)
		{
			newdiv.style.left = "50%";
			

			monWidth=parseInt(width);
			maMarge=(monWidth-(monWidth*2))/2
			maMarge=""+maMarge+"px";
			newdiv.style.marginLeft = maMarge;
		}
		if(top)
		{
			newdiv.style.top = top;
		}
	}

	newdiv.style.background = "#FFFFFF";

	newdiv.style.border = "6px solid #fca234";

	newdiv.style.padding = "35px";

	newdiv.style.zIndex = 99;

	newdiv.style.PageBreakInside = "avoid";



	monContent += "<div style='font-size:14px; color:#000000;'>" + html + "</div>";

	

	//ajoute un X pour fermer la fenetre

	positionX=parseInt(width)+50;

	var id2 = '"' + id + '"';



	monContent += "<div style='position:absolute; top:5px; left:"+positionX+"px;'><a href='#' onClick='closeDiv("+id2+")' style='text-decoration:none; color:#fca234; font-size:11px; font-weight:bold;'>X</a></div>"

	
	newdiv.innerHTML=monContent;

	document.body.appendChild(newdiv);

}



















