function isEmail(strEmail) {
	if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
		return true;
	else
		return false;
}


function  validateRequest()
{

theForm=document.Request;
ok=1;

for (i=0; i<theForm.length; i++)
{
//alert(theForm.elements[i].name +" "+theForm.elements[i].className+" "+theForm.elements[i].value);
if( (theForm.elements[i].className=="fieldmandatory") && (theForm.elements[i].value=="")){
theForm.elements[i].focus();
alert("Please fill in all mandatory fields");
return false;
ok=0;
}
}
	if (isEmail(theForm.mail.value) ){
	}else{
	theForm.mail.focus();
alert("Please enter a valid email address");
return false;
ok=0;
	}



if(ok==1){
	theForm.submit();
	return true;
	}else
	{
	return false;
	}

}
