
function removeChar(s,x)
{var tmp=''
for(i=0;i<s.length;i++)
{var c=s.charAt(i)
if(c!=x)tmp=tmp+c}
return tmp}
function isBlankSpaces(s)
{var tmp=''
for(i=0;i<s.length;i++)
{var c=s.charAt(i)
if(c!=' ')return false;}
return true;}
function FIsValidEmail(email){var i;if(email.length<4)
return false;else if(email.lastIndexOf('\'')!=-1)
return false;else if((i=email.lastIndexOf('@'))==-1)
return false;else{var tail=email.substring(i+1,email.length);if(tail.length<3)
return false;else if((i=tail.lastIndexOf('.'))==-1)
return false;else{var tailend=tail.substring(i+1,tail.length);if(tailend.length==0)
return false;}}
return true;}
function validate()
{var f=document.frmTheForm
var strEmail=""+f.email.value;var strFirstName=""+f.firstName.value;var strLastName=""+f.lastName.value;var sOut=""
if((strFirstName=="")||(isBlankSpaces(strFirstName)))
sOut+="\n   * "+"Enter your first name"
if((strLastName=="")||(isBlankSpaces(strLastName)))
sOut+="\n   * "+"Enter your last name"
if(f.connection.selectedIndex==0)
sOut+="\n   * "+"Specify your connection type"
if(!FIsValidEmail(strEmail))
sOut+="\n   * "+"Enter a valid e-mail address"
var sDesc=""+f.description.value
sDesc=removeChar(sDesc,' ')
if(sDesc=="")
sOut+="\n   * "+"Enter a detailed description of your problem"
var sTemp=""+f.description.value
if(sTemp.length>2500)
sOut+="\n   * "+"Shorten your detailed problem description to 2500 characters or less."
if(sOut!="")
{sOut="The form is incomplete. Please complete the changes listed below and submit again."+sOut
alert(sOut)
return false}
return true}