function checkFormContact() { if(document.getElementById('fullName').value=="" || document.getElementById('fullName').value=="שם מלא") { alert("נא למלא שם מלא"); document.getElementById('fullName').focus(); return false; } if(document.getElementById('phone').value!='' && document.getElementById('phone').value!="טלפון") { if(!checkPhone(document.getElementById('phone').value)) { alert("הטלפון אינו תקין"); document.getElementById('phone').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", 'שם מלא'); }); $("#phone").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", 'הודעה'); }); });