function checkSubmit()
{
	myForm=document.demande_plaquette;

	myForm.human_user.value=humanUser;
	clearTimeout(TimeSpentOnPage);
	myForm.time_spent.value=timeSpent;
	myForm.submit();
}

//check the validity of an email address
function isMailValid(e) 
{
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
	
	for(i=0; i < e.length ;i++)
	{
		if(ok.indexOf(e.charAt(i))<0)
		{ 
			return (false);
		}	
	} 
	
	if (document.images)
	{
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) 
		{
			return (-1);
		}
	} 
}

humanUser=0;

function validateMouseAction()
{
	humanUser=1;
	//alert (humanUser + " - " + timeSpent);
}

timeSpent=0;
function countTimeSpentOnPage()
{
	timeSpent+=500;
	TimeSpentOnPage=setTimeout("countTimeSpentOnPage()",500);
}
TimeSpentOnPage=setTimeout("countTimeSpentOnPage()",500);


