// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


function validate_form ( )
{
    valid = true;

    if ( document.contact_form.contact_name.value == "" )
    {
        alert ( "Please fill in the 'Your Name' box." );
        valid = false;
    }

    return valid;
}


function checkForm(){
 var _1=document.getElementById("comment_email").value;
 var _2=document.getElementById("comment_name").value;
 var _3=document.getElementById("comment_message").value;
 var _4=document.getElementById("comment_subject").value;
  
 if(_1.length==0||_2.length==0||_3.length==0||_4.length==0){
 alert("You must fill every part of this form to continue");
 }else{
 document.getElementById("contact_form").submit();
 } 
}

function clearField(thefield) {
	if (thefield.defaultValue==thefield.value){
		thefield.value = "";
	}
} 

function recallField(thefield) {
	if (thefield.value == ""){
		thefield.value = thefield.defaultValue;
	}
}