﻿
var string=window.location.href;
var getit = new Array();
    
    if ( string.indexOf('1') == -1  )
    
    {
        var getit = string.split("gobbledygookaward.com/");
        //var getit = string.split("concomm2.com/");
        
    }

    else
    
    {   
        var getit=string.split("1");
        
    }
    
    if (getit[1] == "EntryForm.html" )
    
    {

		function formValidate(theForm)
		{
		
		  if (theForm.entryName.value == "" || theForm.entryName.value == "Name of entry")
		  {
		    alert("Please enter a name for the \"Name of entry\" field.");
		    theForm.entryName.focus();
		    return (false);
		  }
		
		  if (theForm.entryURL.value == "" || theForm.entryURL.value == "URL of entry")
		  {
		    alert("Please enter a valid URL for the \"URL of entry\" field.");
		    theForm.entryURL.focus();
		    return (false);
		  }
				
		  //if (theForm.reason1.checked == false && theForm.reason2.checked == false && theForm.reason3.checked == false && theForm.reason4.checked == false) 
		  //{
		  //  alert("Please check one or more one of the \" Reason for the entry\" fields.");
		  //  theForm.reason1.focus();
		  //  return (false);
		  //}
		  
		  //if (theForm.type1.checked == false && theForm.type2.checked == false && theForm.type3.checked == false ) 
		  //{
		  //  alert("Please check one or more of the \" Industry Type\" fields.");
		  //  theForm.type1.focus();
		  //  return (false);
		  //}
  
		  if (theForm.comment.value == "" )
		  {
		    alert("Please enter a comment in the \"Entry\" field.");
		    theForm.comment.focus();
		    return (false);
		  }
		    
		  if (theForm.submittedBy.value == "" || theForm.submittedBy.value == "Your name")
		  {
		    alert("Please enter your name in the \"Your name\" field.");
		    theForm.submittedBy.focus();
		    return (false);
		  }

		  if (theForm.Email.value == "" || theForm.Email.value == "Email")
		  {
		    alert("Please enter a value for the \"Email\" field.");
		    theForm.Email.focus();
		    return (false);
		  }

		  if (theForm.repeatEmail.value == "" || theForm.repeatEmail.value == "Repeat email")
		  {
		    alert("Please enter a value for the \"Repeat email\" field.");
		    theForm.repeatEmail.focus();
		    return (false);
		  }

		  if (theForm.repeatEmail.value !== theForm.Email.value )
		  {
		    alert("Please check the email addresses you entered for the \"Email\" and \"Repeat email\" fields.");
		    theForm.repeatEmail.focus();
		    return (false);
		  }
		  
		  theForm.d[1].value = theForm.Email.value;
		  
		  return (true);        
		}
		
}
