
	function isNonEmpty(obj)

{

    retval = false;

    for (var i = 0; i < obj.value.length; i++) {

        if (obj.value.substring(i, i + 1) != " ") {

            retval = true;

            break;

        }

    }

    return retval;

}


function check3(form)
{

	    if ((!document.getElementById('Internet_Search').checked)
	    && (!document.getElementById('Publication_Name').checked)
		&& (!document.getElementById('Word_of_mouth').checked)	    
		&& (!document.getElementById('Saw_a_Rhino_Building').checked)	    
		&& (!document.getElementById('Referral').checked)	    
		&& (!document.getElementById('Repeat_customer').checked)	    
		&& (!document.getElementById('Direct_Mail').checked))
	    {
			alert("You forgot to select <Where Did You Hear About Us?> option.");

			return false;
	    	
	    }

	    if ((document.getElementById('Internet_Search').checked)
		&& (document.getElementById('Direct_Mail').checked))
	    {
			alert("You can't choose both Internet and Direct Mail options.");

			return false;
	    	
	    }

	    
	    
	    
	 if(!isNonEmpty(form.all['Name'])) {

		alert("You forgot to fill <First Name> field.");

		return false;

    }

    if(!isNonEmpty(form.all['Last_Name'])) {

		alert("You forgot to fill <Last Name> field.");

		return false;

    }
    
    if(!isNonEmpty(form.all['Phone'])) {

		alert("You forgot to fill <Phone> field.");

		return false;

    }

  if(!isNonEmpty(form.all['Message'])) {

		alert("You forgot to fill <Message> field.");

		return false;

    }


	form.submit();
    return false;

}



function check1(form)
{
	
	    if ((!document.getElementById('Internet_Search').checked)
	    && (!document.getElementById('Publication_Name').checked)
		&& (!document.getElementById('Word_of_mouth').checked)	    
		&& (!document.getElementById('Saw_a_Rhino_Building').checked)	    
		&& (!document.getElementById('Referral').checked)	    
		&& (!document.getElementById('Repeat_customer').checked)	    
		&& (!document.getElementById('Direct_Mail').checked))
	    {
			alert("You forgot to select <Where Did You Hear About Us?> option.");

			return false;
	    	
	    }

	    if ((document.getElementById('Internet_Search').checked)
		&& (document.getElementById('Direct_Mail').checked))
	    {
			alert("You can't choose both Internet and Direct Mail options.");

			return false;
	    	
	    }
	    

    if(!isNonEmpty(form.all['Name'])) {

		alert("You forgot to fill <Name> field.");

		return false;

    }
    if(!isNonEmpty(form.all['Last_Name'])) {

		alert("You forgot to fill <Last Name> field.");

		return false;

    }
    if(!isNonEmpty(form.all['Address'])) {

		alert("You forgot to fill <Address> field.");

		return false;

    }
    if(!isNonEmpty(form.all['City'])) {

		alert("You forgot to fill <City> field.");

		return false;

    }
    if(!isNonEmpty(form.all['State'])) {

		alert("You forgot to fill <State> field.");

		return false;

    }
    if(!isNonEmpty(form.all['Zip'])) {

		alert("You forgot to fill <Zip> field.");

		return false;

    }
    if(!isNonEmpty(form.all['Day_Phone'])) {

		alert("You forgot to fill <Day Phone> field.");

		return false;

    }
    if(!isNonEmpty(form.all['country_building'])) {

		alert("You forgot to fill <County (Building Location)> field.");

		return false;

    }


  if(!isNonEmpty(form.all['email'])) {

		alert("You forgot to fill <E-Mail> field.");

		return false;

    }

    regexp = /^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@(((\[)?(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))(\])?))|((([a-zA-Z0-9\-])+\.)+([a-zA-Z\-])+))$/gi;

    if(isNonEmpty(form.all['email']) && (form.all['email'].value.search(regexp)==-1)) {

		alert("Incorrect <E-Mail>.");

		return false;

    }
    

	form.submit();
    return false;

}



function check2(form)
{

    if(!isNonEmpty(form.all['Name'])) {

		alert("You forgot to fill <Name> field.");

		return false;

    }
    if(!isNonEmpty(form.all['Address'])) {

		alert("You forgot to fill <Address> field.");

		return false;

    }
    if(!isNonEmpty(form.all['City'])) {

		alert("You forgot to fill <City> field.");

		return false;

    }
    if(!isNonEmpty(form.all['State'])) {

		alert("You forgot to fill <State> field.");

		return false;

    }
    if(!isNonEmpty(form.all['Zip'])) {

		alert("You forgot to fill <Zip> field.");

		return false;

    }
    if(!isNonEmpty(form.all['Phone'])) {

		alert("You forgot to fill <Phone> field.");

		return false;

    }

  if(!isNonEmpty(form.all['email'])) {

		alert("You forgot to fill <E-Mail> field.");

		return false;

    }

    regexp = /^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@(((\[)?(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))(\])?))|((([a-zA-Z0-9\-])+\.)+([a-zA-Z\-])+))$/gi;

    if(isNonEmpty(form.all['email']) && (form.all['email'].value.search(regexp)==-1)) {

		alert("Incorrect <E-Mail>.");

		return false;

    }

	form.submit();
    return false;

}




