var timersmprod;
var timersmabout;

function ControlV1()
{
	var testok = 0;	
	if (document.form10.email.value == "") 	{
		testok = 1;
		alert("Please enter a valid email address.");
		document.form10.email.focus();
	}	else if (document.form10.name.value == "") 	{
		testok = 1;
		alert("Please enter your name.");
		document.form10.name.focus();
	} 	else if (document.form10.cie.value == "") 	{
		testok = 1;
		alert("Please enter your company name.");
		document.form10.cie.focus();
	}	else if (document.form10.email.value.indexOf("@") < 1 || document.form10.email.value.lastIndexOf(".") < 3 || document.form10.email.value.length < 5 || document.form10.email.value.substring(document.form10.email.value.lastIndexOf(".")).length < 2 || document.form10.email.value.substring(document.form10.email.value.lastIndexOf(".")).length > 5) {
		testok = 1;
		alert("Please enter a valid email address.");
		document.form10.email.focus();
	} if(testok == 0) {
		return(true);
	} else { return(false); }
}

function ControlV1fr()
{
	var testok = 0;	
	if (document.form10.email.value == "") 	{
		testok = 1;
		alert("SVP saisir un courriel valide.");
		document.form10.email.focus();
	}	else if (document.form10.name.value == "") 	{
		testok = 1;
		alert("SVP indiquer votre nom.");
		document.form10.name.focus();
	} 	else if (document.form10.cie.value == "") 	{
		testok = 1;
		alert("SVP indiquer votre entreprise.");
		document.form10.cie.focus();
	}	else if (document.form10.email.value.indexOf("@") < 1 || document.form10.email.value.lastIndexOf(".") < 3 || document.form10.email.value.length < 5 || document.form10.email.value.substring(document.form10.email.value.lastIndexOf(".")).length < 2 || document.form10.email.value.substring(document.form10.email.value.lastIndexOf(".")).length > 5) {
		testok = 1;
		alert("SVP saisir un courriel valide.");
		document.form10.email.focus();
	} if(testok == 0) {
		return(true);
	} else { return(false); }
}

function preload() {
	var images = new Array();

	images[1] = new Image();
	images[1].src = "images/btn-brochure-o.gif";
	
	images[2] = new Image();
	images[2].src = "images/btn-request-o.gif";
}

function showsm(idsm) {
	if(idsm=="smabout") {
		clearTimeout(timersmabout); 
	} else {
		clearTimeout(timersmprod); 
	}
	document.getElementById(idsm).style.visibility='visible';
}

function hidesm(idsm) {
	if(idsm=="smabout") {
		timersmabout = window.setTimeout("document.getElementById('"+idsm+"').style.visibility='hidden'",350);
	} else {
		timersmprod = window.setTimeout("document.getElementById('"+idsm+"').style.visibility='hidden'",350);
	}
}


/*
function viewsm() {
	clearTimeout(timersm); 
	document.getElementById('sm-components').className='viewimg';
}

function viewsmfr() {
	clearTimeout(timersm); 
	document.getElementById('sm-components-fr').className='viewimg';
}

function hidesm() {
	timersm = window.setTimeout("document.getElementById('sm-components').className='hideimg'",1000);
}

function hidesmfr() {
	timersm = window.setTimeout("document.getElementById('sm-components-fr').className='hideimg'",1000);
}*/
