<!--  Comment Form Validation
function validateform(){
//Name Field Check
if (document.add_comment.Pername.value == ''){
alert("Please enter your name");
document.add_comment.Pername.focus();
document.add_comment.Pername.style.background = 'Yellow';
return false;
}
//comment_text Field Check
if (document.add_comment.comment_text.value == ''){
alert("Please type your comment");
document.add_comment.comment_text.focus();
document.add_comment.comment_text.style.background = 'Yellow';
return false;
}
/*//if (!(stripped.length == 10)) {
//alert("מס' הטלפון יכול להכיל עד 10 ספרות");
//document.InsertCustomer.Tel.focus();
//document.InsertCustomer.Tel.style.background = 'Yellow';
//return false;
//} 
//Email Field Check
if (document.InsertCustomer.Email.value == '' || document.InsertCustomer.Email.value == null){
alert("הקלד כתובת דואר אלקטרוני");
document.InsertCustomer.Email.focus();
return false;
}
if (!emailcheck(document.InsertCustomer.Email.value)){
alert("הקלד כתובת דואר אלקטרוני חוקית");
document.InsertCustomer.Email.focus();
document.InsertCustomer.Email.select();
return false;
}
*/
//Security Code Field Check
if (document.add_comment.code.value == ''){
alert("Please enter to security code");
document.add_comment.code.focus();
document.add_comment.code.style.background = 'Yellow';
return false;
}
return true;
}
/*
function emailcheck(str){
accept = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
for (h=0; h < str.length ;h++){
if (accept.indexOf(str.charAt(h))<0){
return (false);
}
}
if (document.images){
pat = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
pat_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!str.match(pat) && str.match(pat_two)){
return (-1);
}
}
}
*/
//-->
