function checkMail(Obj)
	{
	var x = Obj.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x))
		{
		return true; 
		}
	else 
		{
		return false;
		}
	}	

function VideLogin()
	{
	var ObjForm=document.FormNavTop; 
	ObjForm.Login.value="";
	}
function VidePass()
	{
	var ObjForm=document.FormNavTop; 
	ObjForm.Pass.value="";
	}

function ValideFormNavTop()
	{
	var ObjForm=document.FormNavTop;
	var YaEror=false;
		if(ObjForm.Login.value=="" || ObjForm.Login.value=="Pseudo")
			{
			YaEror=true;
			AlertTh('Login');
			ObjForm.Login.focus();
			return;
			}
		else
			{
			DeAlertTh('Login');
			}	
		if(ObjForm.Pass.value=="")
			{
			YaEror=true;
			AlertTh('Pass');
			ObjForm.Pass.focus();
			return;
			}
		else
			{
			DeAlertTh('Pass');
			}
	
	ObjForm.action="verification.htm";
	ObjForm.submit();
	}

function ValideFormInscription()
	{
	var ObjForm=document.FormInscription;
	pw1 = ObjForm.ConfPass2.value;
	pw2 = ObjForm.PassFomrulaire.value;
		var YaEror=false;
		if(ObjForm.UserName.value=="")
			{
			YaEror=true;
			AlertTh('UserName');
			ObjForm.UserName.focus();
			return;
			}
		else
			{
			DeAlertTh2('UserName');
			}
		if(ObjForm.PassFomrulaire.value=="")
			{
			YaEror=true;
			AlertTh('PassFomrulaire');
			ObjForm.PassFomrulaire.focus();
			return;
			}
		else
			{
			DeAlertTh2('PassFomrulaire');
			}	
		if(ObjForm.ConfPass2.value=="" || pw1 != pw2)
			{
			YaEror=true;
			AlertTh('ConfPass2');
			alert("Comfirmez votre mot de passe SVP");
			ObjForm.ConfPass2.focus();
			return;
			}
		else
			{
			DeAlertTh2('ConfPass2');
			}
		if(ObjForm.Name.value=="")
			{
			YaEror=true;
			AlertTh('Name');
			ObjForm.Name.focus();
			return;
			}
		else
			{
			DeAlertTh2('Name');
			}
		if(ObjForm.FirstName.value=="")
			{
			YaEror=true;
			AlertTh('FirstName');
			ObjForm.FirstName.focus();
			return;
			}
		else
			{
			DeAlertTh2('FirstName');
			}
		if(ObjForm.Address.value=="")
			{
			YaEror=true;
			AlertTh('Address');
			ObjForm.Address.focus();
			return;
			}
		else
			{
			DeAlertTh2('Address');
			}
		if(ObjForm.Mail.value=="")
			{
			YaEror=true;
			AlertTh('Mail');
			ObjForm.Mail.focus();
			return;
			}
		else
			{
			DeAlertTh2('Mail');
			}
		if(ObjForm.Town.value=="")
			{
			YaEror=true;
			AlertTh('Town');
			ObjForm.Town.focus();
			return;
			}
		else
			{
			DeAlertTh2('Town');
			}
		if(ObjForm.State.value=="")
			{
			YaEror=true;
			AlertTh('State');
			ObjForm.State.focus();
			return;
			}
		else
			{
			DeAlertTh2('State');
			}
		if(ObjForm.ZipCode.value=="")
			{
			YaEror=true;
			AlertTh('ZipCode');
			ObjForm.ZipCode.focus();
			return;
			}
		else
			{
			DeAlertTh2('ZipCode');
			}
		if(ObjForm.Country.value=="")
			{
			YaEror=true;
			AlertTh('Country');
			ObjForm.Country.focus();
			return;
			}
		else
			{
			DeAlertTh2('Country');
			}
		if(ObjForm.TechnicalContact.value=="")
			{
			YaEror=true;
			AlertTh('TechnicalContact');
			ObjForm.TechnicalContact.focus();
			return;
			}
		else
			{
			DeAlertTh2('TechnicalContact');
			}
		
	ObjForm.action="DonnesFormulaire.htm";
	ObjForm.submit();
	}

function CheckNum(Obj)
	{
	StringDec="12345678901"
	ValueUpdate=Obj.value
	NewAddCaractere=ValueUpdate.substring(ValueUpdate.length-1,ValueUpdate.length)
		if(StringDec.indexOf(NewAddCaractere)>=0)
			{
			CalculePrix(Obj)
			}
		else
			{
			Obj.value=Obj.value.replace(NewAddCaractere,'')
			}	
	}


function AlertTh(Obj)
	{
	getObj(Obj).className='redtextarea';
	}
function DeAlertTh(Obj)
	{
	getObj(Obj).className='textarea';
	}
function DeAlertTh2(Obj)
	{
	getObj(Obj).className='textarea2';
	}
function OpenLelay(Id)
{
if(getObj(Id).style.display=='')
{
getObj(Id).style.display='none';
}
else
{	
getObj(Id).style.display='';
}
}


