
function validate_indexform ()
{
    valid = true;
   	var emailPat=/^(.+)@(.+)\.(.+)$/;
     if ( document.index.name.value == "First Name" )
    {
        alert ( "Please enter your Name" );
        
		document.index.name.focus();
		return  false;
    }
	
	else if ( document.index.phone.value == "Phone Number")
    {
        alert ( "Please enter your Phone Number" );
        document.index.phone.focus();
		return  false;
    }
	
    else if ( document.index.email.value == "Email Address" )
    {
        alert ( "Please enter your Email Address" );
        document.index.email.focus();
		return  false;
    }
	else if (document.index.email.value.search(emailPat)==-1)
  	{
    alert ( "Please enter a valid Email Address" );
        document.index.email.focus();
		return  false;
 	}
      
	
   
	
	else if ( document.index.comments.value == "Comments")
    {
        alert ( "Please enter your Comments");
       document.index.comments.focus();
		return  false;
    }
	else{
	alert("Thank you for contacting us, one of our Patient Coordinator will get back to you shortly.");
	}
			
  
   
}







//Validating the Contact Us Form

function validate_contactform ()
{
    valid = true;
   	var emailPat=/^(.+)@(.+)\.(.+)$/;
     if ( document.contact.name.value == "" )
    {
        alert ( "Please enter your Name" );
        
		document.contact.name.focus();
		return  false;
    }
	
	else if ( document.contact.phone.value == "")
    {
        alert ( "Please enter your Phone Number" );
        document.contact.phone.focus();
		return  false;
    }
	
    else if ( document.contact.email.value == "" )
    {
        alert ( "Please enter your Email Address" );
        document.contact.email.focus();
		return  false;
    }
	else if (document.contact.email.value.search(emailPat)==-1)
  	{
    alert ( "Please enter a valid Email Address" );
        document.contact.email.focus();
		return  false;
 	}
      
	
   
	
	/*<!--else if ( document.contact.comments.value == "")
    {
        alert ( "Please enter your Comments");
       document.contact.comments.focus();
		return  false;
    }-->*/
	else{
	alert("Thank you for contacting us, one of our Patient Coordinator will get back to you shortly.");
	}
			
  
   
}
