// JavaScript Document

function validate_form ( )
{
	valid = true;
	
	document.contactfbd.security.value=document.contactfbd.security.value.toUpperCase();

        if ( document.contactfbd.cName.value == "" )
        {
                alert ( "Please fill in the 'Name' box." );
                valid = false;
        }
        
                if ( document.contactfbd.cEmail.value == "" )
        {
                alert ( "Please fill in the 'Email Address' box." );
                valid = false;
        }
        
                if ( document.contactfbd.cComments.value == "" )
        {
                alert ( "Please enter a message in the 'Comments' box." );
                valid = false;
        }
		
				if ( document.contactfbd.security.value != document.contactfbd.secCode.value )
        {
                alert ( "The Validation Key entered is incorrect. Please Try Again." );
                valid = false;
        }

return valid; }

function validate_referral ( )
{
	valid = true;
	
	document.referform.security.value=document.referform.security.value.toUpperCase();

        if ( document.referform.cPatientName.value == "" )
        {
                alert ( "Please fill in the 'Patient Name' box." );
                valid = false;
        }
        
                if ( document.referform.cPatientHomePhone.value == "" )
        {
                alert ( "Please fill in the 'Patient Home Phone number' box." );
                valid = false;
        }
        
                if ( document.referform.cPatientCellphone.value == "" )
        {
                alert ( "Please fill in in the 'Patient Cell Phone' box." );
                valid = false;
        }
		   		if ( document.referform.cDiagnosis.value == "" )
        {
                alert ( "Please fill in in the 'Patient Diagnosis' box." );
                valid = false;
        }
				if ( document.referform.cDoctor.value == "" )
        {
                alert ( "Please fill in in the 'Doctor' box." );
                valid = false;
        }
				if ( document.referform.cEmail.value == "" )
        {
                alert ( "Please fill in in the 'Email' box." );
                valid = false;
        }
				if ( document.referform.cDoctorPhone.value == "" )
        {
                alert ( "Please fill in in the 'Doctor Phone' box." );
                valid = false;
        }
				if ( document.referform.cDate.value == "" )
        {
                alert ( "Please fill in in the 'Date' box." );
                valid = false;
        }
				if ( document.referform.security.value != document.referform.secCode.value )
        {
                alert ( "The Validation Key entered is incorrect. Please Try Again." );
                valid = false;
        }

return valid; }
