在提交PHP表单之前检查文本字段的内容

I have a form on a web page with an email address text box that has default text 'enter your email address'.

Attached to an image on the form was a function called myfunc() that simply submitted the form. What I'm trying to do is adapt this form, so that IF the email text box still contains the default text 'enter your email address' then rather than submitting the form, a hidden div is shown (or similar). At the moment I'm testing by using a redirect in this part.

Can anyone see what I've done wrong with my javascript? I thought it would be quite simiple.

<!--Javascript to submit form onclicking submit div-->
<script type="text/javascript">
    function myfunc () {
        var searchtext = document.getElementById("emailsubmit").value;
        var frm = document.getElementById("myemailform");
        if (searchtext=='enter your email address')
        {
        window.location.href = "http://stackoverflow.com";
        }
        else 
        {
            frm.submit();
        }
}
</script>

My form:

  <form action="functions/function-email.php" method="post" name="myemailform" id="myemailform">
      <input type="text" id="emailsubmit" name="email" onfocus="if(this.value=='enter your email address') this.value = ''" onblur="if(this.value=='') this.value = 'enter your email address'" value="enter your email address" size="50" maxlength="50">

    <div class="send_request_button" >
    <img src="images/purple.png" width="400" height="100" onClick="myfunc();"/>
    </div>

  </form>

Instead of using

<input type="text" id="emailsubmit" name="email" onfocus="if(this.value=='enter your email address') this.value = ''" onblur="if(this.value=='') this.value = 'enter your email address'" value="enter your email address" size="50" maxlength="50">

you should use placeholder(its HTML5), that way you don't have to check for default text.

<input type="text" id="emailsubmit" name="email" placeholder="enter your email address" size="50" maxlength="50">