            function onSubmit(){
           var name = document.getElementById('name').value;
           var email = document.getElementById('mail').value;
           var phone = document.getElementById('phone').value;
           var work = document.getElementById('work').options[document.getElementById('work').selectedIndex].value;
           var notes = document.getElementById('notes').value;
           var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
           var phoneRegex = /^\d{10}$/;
           if(name == "" || name.length < 3){
             $("#notification_2").hide();
             $('#name').css({"border":"red 1px solid"});
             $('.notification').fadeIn();
             return false;
           }
           if(email =="" || !email.match(filter)){
             $("#notification_2").hide();
             $('#mail').css({"border":"red 1px solid"});
             $('.notification').fadeIn();
             return false
             }
          /* if(phone == "" || phone.length < 6 || isNaN(phone)){
             $("#notification_2").hide();
             $('#phone').css({"border":"red 1px solid"});
             $('.notification').fadeIn();
             return false
             }
          /* if(work == 0){
             $("#notification_2").hide();
             $('#work').css({"border":"red 1px solid"});
             $('.notification').fadeIn();
             return false
           }
           */

           /*
           if(notes.length < 3){
             $("#notification_2").hide();
             $('#notes').css({"border":"red 1px solid"});
             $('.notification').fadeIn();
             return false
           }*/

           var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone + '&work=' + work + '&notes='+notes;
           $.ajax({
                        type: "GET",
                        url: "mail.php",
                        data: dataString,
                        success: function() {
                        $("#p").hide();
                        $(".notification").hide();
                        $("#formulari").hide();
                        $("#notification_2").fadeIn();
                        $('#message').html('<b style="color: #009933;">Thank You !</b><br />We ve received your message, please allow up to 48 hours for a reply.<p>In the mean time..<br><a href="get-in-touch.php" style="color:#629ce9;"><b>Have a look at some our work</b><img src="image/linkIkon.png" border="0"></a></p>').hide().fadeIn(1500);
                      }
                    });
                return false;
           }


