// © ATELIER 33 / ALL RIGHTS RESERVED / 2001 / http://www.atelier33.com / contact@atelier33.com
//                                          CLIENT SIDE                                        \\
//=============================================================================================\\
//VAR
	NumNav=12;
	NavBgColor="#FF9933";
//----------------------
function hideshow(which)
{
	if (!document.getElementById|document.all){return}
	else
		{
		if (document.getElementById){oWhich = eval ("document.getElementById('" + which + "')")}
		else 						{oWhich = eval ("document.all." + which)}
		}
	window.focus();
	if (oWhich.style.display=="none"){oWhich.style.display=""}
	else							 {oWhich.style.display="none"}
}
//----------------------
function GetNav(which)
{
	var whichTemp = ""
	for (i=1; i<=NumNav  ; i++)
    	{
		whichTemp = "NAV"+i; oWhich = GetDaID(whichTemp);
		if (whichTemp==which){oWhich.style.backgroundColor=NavBgColor;}
		else				  {oWhich.style.backgroundColor="";}
		}
}
//----------------------
function GetDaID(which)
{
	if (!document.getElementById|document.all){return}
	else
		{
		if (document.getElementById){oWhich = eval ("document.getElementById('" + which + "')")}
		else						{oWhich = eval ("document.all." + which)}
		}
	window.focus(); return oWhich;
}
//----------------------
function GetArt(which, DaMax)
{
	var ArtTemp = ""; var whichTemp = "";
	for (j=1; j<=DaMax ; j++)
		{
		ArtTemp = "ART"+j;
		for (i=1; i<=2  ; i++)
    		{			
			whichTemp = ArtTemp+"-"+i; oWhich = GetDaID(whichTemp);	window.focus();
			if (ArtTemp==which)
				{
				if (oWhich.style.display=="none"){oWhich.style.display=""}
				else					         {oWhich.style.display="none"}
				}
			else
				{
				if (i==1){oWhich.style.display=""}
				else	 {oWhich.style.display="none"}
				}
			}
		}
		
}
//----------------------
function GetImg(which, DaAction)
{
	oWhich = GetDaID(which); window.focus();
	if (DaAction=="show"){alert("show"); oWhich.style.display=""}
	else				 {alert("hide"); oWhich.style.display="none"}
}
//----------------------
function check_empty(text){return (text.length > 0);}
//----------------------
function check_email(adresse)
{
	if ((adresse == "") || (adresse.indexOf ('@') == -1) || (adresse.indexOf ('.') == -1)){return false;}
    else {return true;}
}
//----------------------
function MM_callJS(jsStr) {return eval(jsStr)}
//----------------------
function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v3.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1) ok=(plugins && plugins[plgIn]);
  else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.open('phppages/main01.htm','PHP','resizable=yes,width=775,height=505');;
}
//----------------------
function FormReset()
{
	Dis=document.Form01;
	Dis.Nom.value = ""; Dis.Prenom.value = ""; Dis.Societe.value = "";
	Dis.Tel.value = ""; Dis.Fax.value = ""; Dis.Email.value = "";
	Dis.Adresse.value = ""; Dis.Commentaires.value = "";
}
//----------------------
function FormEtudeReset()
{
	Dis=document.Form01;
	Dis.Nom.value = ""; Dis.Prenom.value = ""; Dis.Form01.Societe.value = "";
	Dis.Email.value = ""; Dis.Tel.value = ""; Dis.Form01.Fax.value = ""; Dis.Adresse.value = "";
	Dis.RefType[0].checked = false; Dis.RefType[1].checked = false; Dis.RefType[2].checked = false;
	Dis.PayType.checked = false; Dis.Veille.checked = false; Dis.SiteUrl.value = "http://www.";
	Dis.SiteTheme.value = ""; Dis.SiteMots.value = ""; document.Form01.SiteLang.value = "";
	Dis.Commentaires.value = "";
} 
//----------------------
function SelfResizeTo(DaX, DaY){self.resizeTo(DaX, DaY);}
//---------------------------
function PrevDoc(DaLoc, DaDoc, DaType)
{
	if (DaLoc != "" && DaDoc !="" && DaType !="")
		{winPop = window.open ('/a_menu/pop_docprev.asp?reqloc='+DaLoc+'&reqdoc='+DaDoc+'&reqtype='+DaType+'','POP','menubar=no,scrollbars=yes,resizable=yes,status=no,width=300,height=300');}
	else
		{alert('Erreur : \n\nAbsence de référence\nLa tâche demandée ne peut être effectuée.')}
}
//---------------------------
function PrevModImg(DaLoc, DaDoc, DaType, DaNum)
{
	if (DaLoc != "" && DaDoc !="" && DaType!="" && DaNum !="")
		{winPop = window.open ('/a_menu/pop_docprev.asp?reqloc='+DaLoc+'&reqdoc='+DaDoc+'&reqtype='+DaType+'&reqnum='+DaNum+'','POP','menubar=no,scrollbars=yes,resizable=yes,status=no,width=300,height=300');}
	else
		{alert('Erreur : \n\nAbsence de référence\nLa tâche demandée ne peut être effectuée.')}
}
//---------------------------
function ResetPrivate()
{Dis=document.FormPrivate; Dis.ReqLog.value="Login"; Dis.ReqPass.value="Pass"}
//---------------------------
function ResetFaqSearch()
{Dis=document.FormFaqSearch; Dis.ReqExp.value=""; Dis.ReqTheme.selectedIndex=0;}
//---------------------------
function ResetActuSearch()
{Dis=document.FormActuSearch; Dis.ReqExpActu.value="";}
//---------------------------
function ResetRefSearch()
{Dis=document.FormRefSearch; Dis.ReqRefType.selectedIndex=0;}
//---------------------------
function ResetModSearch()
{Dis=document.FormModSearch; Dis.ReqModType.selectedIndex=0;}
//---------------------------
function ResetDocsSearch()
{Dis=document.FormDocsSearch; Dis.ReqExpDocs.value="" ;Dis.ReqDocsType.selectedIndex=0;}
//---------------------------
