﻿var uName = document.getElementById("uName");
uName.onfocus = function() { if (this.value == valueOne) { this.value = ""; } }
uName.onblur = function() { if (this.value == "") { this.value = valueOne; } }

var uPassword = document.getElementById("uPassword");
uPassword.onfocus = function() { if (this.value == valueTwo) { this.value = ""; } }
uPassword.onblur = function() { if (this.value == "") { this.value = valueTwo; } }
uPassword.value = valueTwo;

function userLoginSend() {
    window.location = "userLoginControl.aspx?" + mkgEncode(document.getElementById('uName').value) + "|" + mkgEncode(document.getElementById('uPassword').value);
}

function UserLoginKeyPress(evt) {
    evt = (evt) ? evt : (window.event) ? event : null;
    var charCode = 0;
    if (evt) {
        charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
    }
    if (charCode == 13) {
        userLoginSend();
    }
}
