﻿function checkForm(theForm) {
	    err_str = "";
	
		if (!isIdNum(theForm.idNum.value)) {
			err_str = "*";
           document.getElementById('idNum').style.background = "#FFCCCC";               
        } else {
          document.getElementById('idNum').style.background = "white";
        }
        
		if (!isPasswd(theForm.pass.value)) {
			err_str = "*";
           document.getElementById('pass').style.background = "#FFCCCC";               
        } else {
          document.getElementById('pass').style.background = "white";
        }
        
		if (!isBdate(theForm.bDate.value)) {
			err_str = "*";
           document.getElementById('bDate').style.background = "#FFCCCC";               
        } else {
          document.getElementById('bDate').style.background = "white";
        }
        
        if (err_str != "") {
            err_str = "<b>נא למלא את השדות המסומנים, </b>";
        }
        
		if(err_str == "") {
			//alert("true");
	        //get('contacts_main_tbl').style.display='none';
	        //get('contacts_thanks_div').style.display='inline';
			return true;
		} else {
		    //err_str_len = err_str.length - 6;
		    //err_str = err_str.substring(0,err_str_len)
		    //document.getElementById('errorPlace').innerHTML = err_str + ".</b>"
			//document.getElementById('errorPlace').style.display = "inline"
			//alert("flase");
			return false;
		}
}
