/* Fonctions communes fred brunet js */
/*UpdateDdec2008*/

var naviName = navigator.appName;


function changeImage(nomImg, src)
	{
	document.images[nomImg].src = src;
	}
function changeImages0(indimg)
	{
	document.images[TImgName0[indimg]].src = TImgSource0[indimg];
	document.images[TImgNameT[indimg]].src = TImgSourceT0[indimg];
	}
function changeImages1(indimg)
	{
	document.images[TImgName0[indimg]].src = TImgSource1[indimg];
	document.images[TImgNameT[indimg]].src = TImgSourceT1[indimg];
	}
function OpenA(pPlace, pTop, pLeft)
	{
	rePosition("ASK", pTop, pLeft);
	rePosition("WHO", (pTop + 94), (pLeft + 117 ));
	rePosition("CLO", (pTop + 275), (pLeft + 275));

	document.getElementById('CLO').style.visibility = "visible";
	document.getElementById('WHO').style.visibility = "visible";
	document.getElementById('ASK').style.visibility = "visible";
	
	document.getElementById('WHOTOP').style.color = "";
	document.getElementById('WHOFOOT').style.color = "";

	if (pPlace=="1")
		{
		document.getElementById('WHOTOP').style.color = "#FFFF00";		
		}
	else
		{
		document.getElementById('WHOFOOT').style.color = "#FFFF00";		
		}
	
	if (flagopendoor!=0)
		{
	  	document.getElementById('FYS').src = FACTORY1.src;
  		}

	}
function CloseA()
	{
	document.getElementById('CLO').style.visibility = "hidden";
	document.getElementById('WHO').style.visibility = "hidden";
	document.getElementById('ASK').style.visibility = "hidden";
	document.getElementById('WHOTOP').style.color = "";
	document.getElementById('WHOFOOT').style.color = "";

	if (flagopendoor!=0)
		{
	  	document.getElementById('FYS').src = FACTORY1.src;
  		}

	}
function rePosition(RefId, pTop, pLeft)
	{
	document.getElementById(RefId).style.top = pTop;
	document.getElementById(RefId).style.left = pLeft;
	}
function rePositionR(RefId, pTop, pRight)
	{
	document.getElementById(RefId).style.top = pTop;
	document.getElementById(RefId).style.left = pRight;
	}
function UserAlert(typeA)
	{
	if (flagopendoor!=0)
		{
		document.getElementById('FYS').src = FACTORY1.src;
		}

	switch (typeA)
		{
		case 1 :
			alert("Not Yet Finished, Coming Soon/Pas encore terminé, bientôt")
			break;
		case 2 :
			alert("Not Available / Indisponible")
			break;
		}
	}
function OpenNewWindow(page, largeur, hauteur) 
	{
	if (flagopendoor!=0)
		{
 		document.getElementById('FYS').src = FACTORY1.src;
  		}
	FNewWin= window.open(page, "", "scrollbars=yes,menubar=yes,toolbar=yes,resizable=yes,status=yes,location=no,directories=yes,width=" 
              + largeur + ",height=" + hauteur);
	}

function OpenMSG(page, largeur, hauteur) 
	{
	FBMSG= window.open(page, "", "scrollbars=no,menubar=no,toolbar=no,resizable=no,width=" 
        + largeur + ",height=" + hauteur);
      	FBMSG.focus();
	}
