function checkFeedbackForm(){
var theForm=document.forms[0];
var blnCheck=true;
var Err=' ';

	if(String(Trim(theForm.txtfirstname.value)).length>149){
		blnCheck=false;
		Err='Your First Name Is Too Long \n\n A Limit Of 150 Characters Has Been Breached. \n\n Please Reduce And Try Again.';
	}
	if((blnCheck==true)&&(String(Trim(theForm.txtfirstname.value)).length==0)){
		blnCheck=false;
		Err='Please Enter Your First Name.';
	}
	if((blnCheck==true)&&(String(Trim(theForm.txtlastname.value)).length>149)){
		blnCheck=false;
		Err='Your Last Name Is Too Long \n\n A Limit Of 150 Characters Has Been Breached. \n\n Please Reduce And Try Again.';
	}
	if((blnCheck==true)&&(String(Trim(theForm.txtlastname.value)).length==0)){
		blnCheck=false;
		Err='Please Enter Your Last Name.';
	}
	if((blnCheck==true)&&(String(Trim(theForm.txtemail.value)).length==0)){
		blnCheck=false;
		Err='Please Enter Your Email Address.';
	}
	if((blnCheck==true)&&(isEmailAddr(Trim(theForm.txtemail.value))!=true)){
		blnCheck=false;
		Err='Your Email Address Does Not Appear To Be Valid \n\n Please Check And Try Again.';
	}
	if((blnCheck==true)&&(String(Trim(theForm.txacomments.value)).length==0)){
		blnCheck=false;
		Err='Please Enter A Comment.';
	}
	if((blnCheck==true)&&(String(Trim(theForm.txacomments.value)).length>449)){
		blnCheck=false;
		Err='A Maximun Length For Comments Of 450 Characters Has Been Breached. \n\n Please Reduce And Try Again.';
	}
	if(blnCheck!=true){
		alert(Err);
	}
	
	return blnCheck;

}
function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function Trim(str){
	return RTrim(LTrim(str));
}

function LTrim(str){
var whitespace = new String(" \t\n\r");
var s = new String(str);
	if (whitespace.indexOf(s.charAt(0)) != -1) {
	    var j=0, i = s.length;
	    while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
	        j++;
	    s = s.substring(j, i);
	}
return s;
}

function RTrim(str){
var whitespace = new String(" \t\n\r");
var s = new String(str);
    if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
        var i = s.length - 1;       // Get length of string
        while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
            i--;
        s = s.substring(0, i+1);
    }
    return s;
}