function checkFormContact() { if(document.getElementById('fullName').value=="" || document.getElementById('fullName').value=="שם מלא") { alert("נא למלא שם מלא"); document.getElementById('fullName').focus(); return false; } if(document.getElementById('email').value=="" || document.getElementById('email').value=='דוא"ל') { alert('נא למלא דוא"ל'); document.getElementById('email').focus(); return false; } if(document.getElementById('email').value != '' && document.getElementById('email').value!='דוא"ל') { if(!checkEmail(document.getElementById('email').value)) { alert('כתובת דוא"ל אינה תקינה'); document.getElementById('email').focus(); return false; } } if(document.getElementById('cellPhone').value!='' && document.getElementById('cellPhone').value!="טלפון נייד") { if(!checkPhone(document.getElementById('cellPhone').value)) { alert("הטלפון נייד אינו תקין"); document.getElementById('cellPhone').focus(); return false; } } return true; } $(function() { $("#fullName").focus(function() { if($(this).attr("value") == 'שם מלא') $(this).attr("value", ''); }).blur(function() { if($(this).attr("value") == '') $(this).attr("value", 'שם מלא'); }); $("#email").focus(function() { if($(this).attr("value") == 'דוא"ל') $(this).attr("value", '').css("direction", "ltr"); }).blur(function() { if($(this).attr("value") == '') $(this).attr("value", 'דוא"ל').css("direction", "rtl"); }); $("#cellPhone").focus(function() { if($(this).attr("value") == "טלפון נייד") $(this).attr("value", '').css("direction", "ltr"); }).blur(function() { if($(this).attr("value") == '') $(this).attr("value", "טלפון נייד").css("direction", "rtl"); }); $("#message").focus(function() { if($(this).attr("value") == 'הודעה') $(this).attr("value", ''); }).blur(function() { if($(this).attr("value") == '') $(this).attr("value", 'הודעה'); }); });