
function checkform(theform){

bo1=theform.name.value;
if(bo1==""){
alert("Name box is empty");
theform.name.select();
return false;
}


myRegExp = /http/;
hhtt=theform.description.value;


matchPos1 = hhtt.search(myRegExp);

if(matchPos1 != -1){
	alert("No spam thank you");
	return false;
	}








bo2=theform.tel.value;
bo3=theform.email.value;
if(bo2=="" && bo3==""){
alert("You need to fill in either a valid eMail or Phone No");

theform.tel.select();
return false;
}
//if(isNaN(bo2)){
//alert("Sorry if you wouldnt mind not having\nspaces or brackets in the telephone number thanks.\nOr possibly you have accidently inputed\nsomething other than numbers.");
//theform.tel.select();
//return false;
//}
if(bo3!=""){

if(bo3.indexOf("@") == -1){
alert("Your eMail address is incorrect\nRecheck and try again");
theform.email.select();
return false;
}
}
bo4=theform.reqs.value;
if(bo4==""){
alert("Please input your property requirements");
theform.reqs.select();
return false;
}
return validate_user_text(theform);
return validate_user_texttwo(theform);
}//eoffunc


<!--BEGIN WORD FILTER JAVASCRIPT-->


// Word Filter
// (c) 2002 Premshree Pillai
// Created : 23 June 2002
// http://www.qiksearch.com
// http://javascript.qik.cjb.net
// E-mail : qiksearch@rediffmail.com

var swear_words_arr=new Array("fuck","shite");
var swear_alert_arr=new Array;
var swear_alert_count=0;

function reset_alert_count()
{
 swear_alert_count=0;
}

function validate_user_text(theform)
{
 reset_alert_count();
 var compare_text=theform.reqs.value;
 for(var i=0; i<swear_words_arr.length; i++)
 {
  for(var j=0; j<(compare_text.length); j++)
  {
   if(swear_words_arr[i]==compare_text.substring(j,(j+swear_words_arr[i].length)).toLowerCase())
   {
    swear_alert_arr[swear_alert_count]=compare_text.substring(j,(j+swear_words_arr[i].length));
    swear_alert_count++;
   }
  }
 }
 var alert_text="";
 for(var k=1; k<=swear_alert_count; k++)
 {
  alert_text+="\n" + "(" + k + ")  " + swear_alert_arr[k-1];
 }
 if(swear_alert_count>0)
 {
  alert("The form cannot be submitted.\nThe following illegal words or symbols were found:\n_______________________________\n" + alert_text + "\n_______________________________");
  theform.reqs.select();
  return false
 }
 return validate_user_texttwo(theform);
}

function select_area()
{
 document.form1.user_text.select();
}

window.onload=reset_alert_count;





function validate_user_texttwo(theform)
{

 reset_alert_count();
 var compare_text=theform.comms.value;
 for(var i=0; i<swear_words_arr.length; i++)
 {
  for(var j=0; j<(compare_text.length); j++)
  {
   if(swear_words_arr[i]==compare_text.substring(j,(j+swear_words_arr[i].length)).toLowerCase())
   {
    swear_alert_arr[swear_alert_count]=compare_text.substring(j,(j+swear_words_arr[i].length));
    swear_alert_count++;
   }
  }
 }
 var alert_text="";
 for(var k=1; k<=swear_alert_count; k++)
 {
  alert_text+="\n" + "(" + k + ")  " + swear_alert_arr[k-1];
 }
 if(swear_alert_count>0)
 {
  alert("The form cannot be submitted.\nThe following illegal words or symbols were found:\n_______________________________\n" + alert_text + "\n_______________________________");
  theform.comms.select();
  return false
 }
 
}



function validate_user_textthree(theform)
{
ques=theform.qu.value;
if(ques==""){
alert("You haven't asked a question");
theform.qu.select();
return false;
}
eml=theform.em.value;
if(eml==""){
alert("You haven't filled in an eMail");
theform.em.select();
return false;
}
if(eml.indexOf("@") == -1 || eml.indexOf(".") == -1){
alert("Your eMail address is incorrect\nRecheck and try again");
theform.em.select();
return false;
}

 reset_alert_count();
 var compare_text=theform.qu.value;
 for(var i=0; i<swear_words_arr.length; i++)
 {
  for(var j=0; j<(compare_text.length); j++)
  {
   if(swear_words_arr[i]==compare_text.substring(j,(j+swear_words_arr[i].length)).toLowerCase())
   {
    swear_alert_arr[swear_alert_count]=compare_text.substring(j,(j+swear_words_arr[i].length));
    swear_alert_count++;
   }
  }
 }
 var alert_text="";
 for(var k=1; k<=swear_alert_count; k++)
 {
  alert_text+="\n" + "(" + k + ")  " + swear_alert_arr[k-1];
 }
 if(swear_alert_count>0)
 {
  alert("The form cannot be submitted.\nThe following illegal words or symbols were found:\n_______________________________\n" + alert_text + "\n_______________________________");
  theform.qu.select();
  return false
 }
 
}



<!--END WORD FILTER JAVASCRIPT-->










