// Java Document
function messageWindow(title, msg)
{
  var width="300", height="125";
  var left = (screen.width/2) - width/2;
  var top = (screen.height/2) - height/2;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var head = '<html><head><title>'+title+'</title><link href="styles.css" rel="stylesheet" type="text/css"></head>';
  var body = '<center><span class="bodyText">'+msg+'<br><br><input type="button" value="   Sera   " onClick="self.close()"></span></center></html>';
  var msgWindow = window.open("","msgWindow", styleStr);
  msgWindow.document.write(head + body);
}

function checkFormBehance() {
var error="";
var emailFilter=/^.+@.+\..{2,3}$/;

	if ((document.contactBehanceForm.name.value.length==0) || (document.contactBehanceForm.name.value==null)) 
	{ error +="Please enter your name.\n"; }
	if ((document.contactBehanceForm.lname.value.length==0) || (document.contactBehanceForm.lname.value==null)) 
	{ error +="Please enter your lastname.\n"; }
	if ((document.contactBehanceForm.telco.value.length==0) || (document.contactBehanceForm.telco.value==null)) 
	{ error +="Please enter your telephone or mobile.\n"; }
	if (!(emailFilter.test(document.contactBehanceForm.email.value)) || (document.contactBehanceForm.email.value.length==0) || (document.contactBehanceForm.email.value==null) ) 
	{ error +="Please enter a valid email address.\n"; }
	if ((document.contactBehanceForm.comment.value.length==0) || (document.contactBehanceForm.comment.value==null)) 
	{ error +="Please enter your comment\n"; }
	if(error != "")
	{ 
		alert(error);
		return false;
	}
}

/*function checkMailingForm() {
var error="";
var emailFilter=/^.+@.+\..{2,3}$/;

	if (!(emailFilter.test(document.mailingForm.email.value)) || (document.mailingForm.email.value.length==0) || (document.mailingForm.email.value==null) ) 
	{ error +="Por fabor yena un email valido.\n"; }
	if(error != "")
	{ 
		alert(error);
		return false;
	}
}*/