function submitForm(){
	msg = '                                           ';
	if ( typeof(MyFormS) == 'undefined' )
	MyFormS = document.MyFormS;
	var theForm = MyFormS;

   for(i=0; i<theForm.elements.length; i++){
   	 if ( theForm.elements[i].type == 'text' )
   	  theForm.elements[i].value= trim(theForm.elements[i].value);
   }
  

	
	
	var regmail = /^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]{2,})+$/;
    if ( MyFormS.name.value.replace(/ /ig,"").length == 0 ){
    	msg += 'الرجاء ادخال الاسم';
    	alert(msg);
    	MyFormS.name.focus();
    	return false;
    } else if (MyFormS.email.value.replace(/ /ig,"").length == 0 ){
    	msg += 'الرجاء ادخال البريد الإلكتروني';
    	alert(msg);
       	MyFormS.email.focus();
       	return false;
    }else if(regmail.test(MyFormS.email.value) == false ){
        msg += 'الرجاء ادخال بريد الكتروني صحيح';
    	alert(msg);
       	MyFormS.email.focus();
    	return false;
    }else if(MyFormS.comment.value.replace(/ /ig,"").length == 0 ){
        msg += 'الرجاء ادخال التعليق';
    	alert(msg);
       	MyFormS.comment.focus();
    	return false;
    }else if(MyFormS.comment.value.replace(/ /ig,"").length > 1000 ){
        msg += 'يجب ان لايزيد التعليق عن 1000 حرف';
    	alert(msg);
       	MyFormS.comment.focus();
    	return false;
    }
    MyFormS.submit();
	
}

