/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
PLACEHOLDER = "Email Address";

window.$ = function(id) {
    return document.getElementById(id);
};

window.onload = function(e) {
    var emailInput = $("email");

    emailInput.value = PLACEHOLDER;
   
    emailInput.onblur = function() {
        if (!this.value || this.value == "") {
            this.value = PLACEHOLDER;
        }
        if (this.value != PLACEHOLDER) {
            this.className = "text";
        }
        else {
            this.className = 'text placeholder';
        }
    }

    emailInput.onfocus = function() {
    if (this.value == PLACEHOLDER) {
        this.value = "";
    }
        this.className = 'text';
    };
    if (window.message) {
        alert(window.message);
    }
};

