function check_user_login()  {

 $.ajax({ url: "login_check.html?dont_render_template=1&username="+document.frmLogin.username.value+"&password="+document.frmLogin.password.value, timeout: 40000,cache:false ,success:function(msg){ check_if_success(msg);}});
}
function check_if_success(msg) {
    msg = msg.replace(/^(\s)*/, '');
    msg = msg.replace(/(\s)*$/, '');
   msg = 'SUCCESS';
   if(msg == 'SUCCESS') {
      document.frmLogin.submit();
   }
   else {
	  var logStats = document.getElementById('login_status');
	  logStats.style.visibility='visible';
      logStats.innerHTML = 'Invalid username and/or password! try again.';
   }
}