<!--
var SERVER_IP = "78.96.224.50";
var SERVER_PORT = "80";

function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?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)
	return this
}

function initmove(sqlImg, ldapImg) {
	if (!bw.ns4)
	{
		objSql = document.getElementById(sqlImg)
		objLdap = document.getElementById(ldapImg)
		newHeight = 20
		mylayer = new DynLayer("divSQL");
		mylayer.parabola = new Parabola("mylayer","parabola");
		mylayer.parabola.play(objSql, newHeight, 1, -479, 115, 20, 1);
		mylayera = new DynLayer("divLDAP");
		mylayera.parabola = new Parabola("mylayera","parabola");
		mylayera.parabola.play(objLdap, newHeight, 1, -657, 218, 28, 1);
	}
	return true;
}

function ChangeImage(objImgName, strImgName)
{
	objImgName.src = strImgName;
	return true;
}

function MM_reloadPage(init) {
	if (init == true)
		with (navigator) {
			if ((appName=="Netscape") && (parseInt(appVersion)==4)) {
				document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage;
			}
		}
	else
		if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
			location.reload();
}

function RunEChartURL(url)
{
	if (SERVER_PORT=="80")
		url = "http://" + SERVER_IP + url;
	else
		url = "http://" + SERVER_IP + ":" + SERVER_PORT + url;
	RunURL(url)
}

// executes the given URL in a separate window
function RunURL(url)
{
	nWidth = window.screen.availWidth - 102
	nHeight = window.screen.availHeight - 220
	window.open(url, '_blank','menubar=yes,toolbar=yes,location=no,directories=yes,status=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=' + nWidth + ',height=' + nHeight + ',left=50,top=50');
}

// paints the navigation bar trail, whose length depends on the window height.
function setHeight(trail)
{
	if (bw.ie6 || bw.ie5)
	{
		objTrail = document.getElementById(trail)
		while (document.body.offsetHeight > document.body.scrollHeight)
			objTrail.height += document.body.offsetHeight - document.body.scrollHeight
	}
	else if (bw.ns5)
	{
		objTrail = document.getElementById(trail)
		while (window.innerHeight > document.height)
			objTrail.height += window.innerHeight - document.height
	}
}

// calls various functions, depending on the given values
function initDoc(move, sqlImg, ldapImg, nbTrail)
{
	if (move)
		initmove(sqlImg, ldapImg)
	if (nbTrail)
		setHeight(nbTrail)
}

// computes the page address linked to the image PEOPLE.GIF of the page SITEMAP.HTML
function goBack()
{
	window.history.back()
}

// makes the link to point to an email address based on the given user
function mailtoSimulator(link, user)
{
	link.href = "mailto:" + user + "@" + server
}

// returns an email address based on the given user
function getEmail(user)
{
	return user + "@" + server
}

// writes the hidden email related form fields
function getEmailFormFields(addr1, addr2, addr3)
{
	document.write('<INPUT type="hidden" name="FROM" value="' + getEmail(addr1) + '">')
	document.write('<INPUT type="hidden" name="TO" value="' + getEmail(addr1) + ';' + getEmail(addr2))
	if (addr3)
		document.write(';' + getEmail(addr3))
	document.write('">')

	document.write('<INPUT type="hidden" name="txtEmailEstwest" value="' + adminEmail + '">')

	document.write('<mailtoinput type="hidden" NAME="sendto" VALUE="' + getEmail(addr1) + '">')
	document.write('<mailtoInput type="hidden" NAME="email" Value="' + getEmail(addr1) + '">')
}

function ShowAnother(obj, target)
{
	target.value = '';
	target.disabled = true;
	if (obj.options[obj.selectedIndex].value == 'Autre')
	{
		target.disabled = false;
		target.focus();
	}
}

function ShowProjet(obj, target)
{
	target.value = '';
	target.disabled = true;
	if (obj.options[obj.selectedIndex].value != 'ligne blanche')
	{
		target.disabled = false;
		target.focus();
	}
}

function IsValidEmail(email)
{
	// valid format "a@b.cd"
	var invalidChars = " /;,:";
	var i;
	var badChar;
	var atPos;
	var periodPos;

	if (email == "")
		return false;
	for (i=0; i< invalidChars.length; i++)
	{
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) > -1)
			return false;
	}
	atPos = email.indexOf("@", 1)
	// there must be one "@" symbol
	if (atPos == -1)
		return false;
	// and only one "@" symbol
	if (email.indexOf("@", atPos+1) != -1)
		return false;
	// and at least one "." after the "@"
	periodPos = email.indexOf(".",atPos)
	if(periodPos == -1)
		return false;
	// and at least one character between "@" and "."
	if (atPos + 2 > periodPos)
		return false;
	if (periodPos + 3 > email.length)
		return false;
	return true;
}

function ClearInput(txt)
{
	// this function clears a text by removing trailing spaces
	a = txt;
	while (a.charAt(a.length - 1) == ' ')
		a = a.substring(0, a.length - 2);
	return a;
}

function CheckFields()
{
	// e-Chart Directory
	cboxAO = document.frmDemo.optAO
	cboxEditeurs = document.frmDemo.optEditeurs
	if (cboxAO && cboxAO.options[cboxAO.selectedIndex].value == "ligne blanche")
	{
		alert("Sélectionnez la version.")
		cboxAO.focus();
		return false
	}
	if (cboxEditeurs && cboxEditeurs.options[cboxEditeurs.selectedIndex].value == "ligne blanche")
	{
	}

	// ServerWeb
	/*
	document.frmDemo.txtServerWeb.value = ClearInput(document.frmDemo.txtServerWeb.value);
	if ((document.frmDemo.optServerWeb.options[document.frmDemo.optServerWeb.selectedIndex].value == 'ligne blanche') || (document.frmDemo.optServerWeb.options[document.frmDemo.optServerWeb.selectedIndex].value == 'Autre' && document.frmDemo.txtServerWeb.value.length == 0))
	{
		document.frmDemo.optServerWeb.focus();
		if (document.frmDemo.optServerWeb.options[document.frmDemo.optServerWeb.selectedIndex].value == 'Autre')
			document.frmDemo.txtServerWeb.focus();
		alert('Vous n\'avez pas renseigné: Server Web, dans la rubrique Platforme technique du serveur Web');
		return false;
	}
	*/	
	document.frmDemo.txtNom.value = ClearInput(document.frmDemo.txtNom.value);
	if (document.frmDemo.txtNom.value.length == 0)
	{
		document.frmDemo.txtNom.focus();
		alert('Vous n\'avez pas renseigné Nom');
		return false;
	}
	/*
	document.frmDemo.txtPrenom.value = ClearInput(document.frmDemo.txtPrenom.value);
	if (document.frmDemo.txtPrenom.value.length == 0)
	{
		document.frmDemo.txtPrenom.focus();
		alert('Vous n\'avez pas renseigné Prénom');
		return false;
	}
	*/
	document.frmDemo.txtFonction.value = ClearInput(document.frmDemo.txtFonction.value);
	if (document.frmDemo.txtFonction.value.length == 0)
	{
		document.frmDemo.txtFonction.focus();
		alert('Vous n\'avez pas renseigné Fonction');
		return false;
	}
	/*
	document.frmDemo.txtCompagnie.value = ClearInput(document.frmDemo.txtCompagnie.value);
	if (document.frmDemo.txtCompagnie.value.length == 0)
	{
		document.frmDemo.txtCompagnie.focus();
		alert('Vous n\'avez pas renseigné Compagnie');
		return false;
	}
	*/
	document.frmDemo.txtEmail.value = ClearInput(document.frmDemo.txtEmail.value);
	if (document.frmDemo.txtEmail.value.length == 0)
	{
		document.frmDemo.txtEmail.focus();
		alert('Vous n\'avez pas renseigné: Email');
		return false;
	}

	if ( (document.frmDemo.txtEmail.value.length != 0) && (!IsValidEmail(document.frmDemo.txtEmail.value)))
	{
		document.frmDemo.txtEmail.focus();
		alert('Syntaxe Email invalide');
		return false;
	}

	document.frmDemo.txtTelephone.value = ClearInput(document.frmDemo.txtTelephone.value);
	if (document.frmDemo.txtTelephone.value.length == 0)
	{
		document.frmDemo.txtTelephone.focus();
		alert('Vous n\'avez pas renseigné: Téléphone');
		return false;
	}

	document.frmDemo.txtVille.value = ClearInput(document.frmDemo.txtVille.value);
	if (document.frmDemo.txtVille.value.length == 0)
	{
		document.frmDemo.txtVille.focus();
		alert('Vous n\'avez pas renseigné: Ville');
		return false;
	}
	/*
	document.frmDemo.txtPays.value = ClearInput(document.frmDemo.txtPays.value);
	if (document.frmDemo.txtPays.value.length == 0)
	{
		document.frmDemo.txtPays.focus();
		alert('Vous n\'avez pas renseigné: Pays');
		return false;
	}
	*/
	return true;
}

var adminEmail = "yscherman@estwest.com";
//var adminEmail = "aserban@softinspire.com";
var server = "estwest.com";
bw=new checkBrowser()
MM_reloadPage(true);

// -->
