// JavaScript Document
// Witten by  Yom Chouloute RCI 9/17/2007

function MM_reloadPage(init) 
{  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

function checkform(form)
{
// variables  declarations

var filter, str, temp_name, submitted_Form; 
submitted_Form=document.forms['contactus'];

str=submitted_Form.f4.value;

filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/

for (i = 0; i < submitted_Form.elements.length;  i++ )
			 {
			 temp_name = submitted_Form.elements[i].name;
			 
			  if (submitted_Form.elements[i].value=="" && i==3)
					{
					alert ('You have a missing Field !');
					return false;
					}
			 }

//if ( (submitted_Form.f3.value.length < 7) || (submitted_Form.f3.value.length > 20) )
//		    {
//		  	alert("Please enter a valid phone number");
//			submitted_Form.f5.focus();
//		    return false ;
//	        }
//      else 
        if ( filter.test(str) == false) 
    	   {
 		   alert("Please input a valid email address!")
           submitted_Form.f4.focus();
		   return false;
		   }		  
        submitted_Form.f9.value=1;

return true;
}
