function IsChar(sText,Label)
{

   var ValidChars = "a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ";
   var IsChar=true;
   var Char;
   for (i = 0; i < sText.length && IsChar == true; i++) 
   { 
      Char = sText.charAt(i); 
      if(ValidChars.indexOf(Char) == -1) 
      {
         IsChar = false;
      }
   }
   if(!IsChar)
   	alert(Label+ " must be alphabets")
   return IsChar;
}

function IsFax(sText,Label)
{
   var ValidChars = "0123456789-()";
   var IsNumber=true;
   var Char;
   if(sText=="") {alert(Label+ " Should not be Empty");return false}
   for (i = 0; i < sText.length && IsNumber == true; i++) 
   { 
      Char = sText.charAt(i); 
      if(ValidChars.indexOf(Char) == -1) 
      {
         IsNumber = false;
      }
   }
    if(!IsNumber)
   	alert(Label+ " Must Be in Format eg:229-230-4443 or (229)-230-4443")
   return IsNumber;
}

function checkemail(val){
var str=val
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Please input a valid email address!")
testresults=false
}
return (testresults)
}