﻿$(document).ready(function(){
    init();
})

var init = function() {
	try {
		$(".login_pass").focus(function(){
			  
			theid= $(this).attr("id");
			thename = $(this).attr("name");
			$(this).replaceWith("<input name='"+thename+"' id='"+theid+"' class='login_pass' type='password' style='width:190px;' onkeypress=\"javascript:if (event.keyCode == 13) {__doPostBack('dnn$ctr507$LoginForm$btnLogin','');}\"  />")
			$(".login_pass").focus();
		});
	}
	catch(err) {}
}

function clearTextBox(sCompare, txt) {
    var txtBox = dnnPrefix + "_" + txt;
    if (document.getElementById(txtBox).value == (sCompare)) {
        document.getElementById(txtBox).value = "";
    }
    return false;
}

function clickButton(e, buttonid){
      var evt = e ? e : window.event;
      var bt = document.getElementById(buttonid);
      if (bt){
          if (evt.keyCode == 13){
                bt.click();
                return false;
          }
      }
    }
