function login_username(){	
	if(document.getElementById('login_user').value == "Username"){
		document.getElementById('login_user').select();
	}	
}

function login_password(){	
	if(document.getElementById('login_pass').value == "Password"){
		document.getElementById('login_pass').select();
	}	
}


var xmlhttp_login;

function login_AJAX()
{
xmlhttp_login = null;
if (window.XMLHttpRequest)
  {// code for all new browsers
  xmlhttp_login = new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE5 and IE6
  xmlhttp_login = new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp_login!=null)
  {
	  user = document.getElementById('login_user').value;
	  pass = hex_md5(document.getElementById('login_pass').value);
//	  alert(pass);
  url = "js/AJAX/login.php?user="+user+"&pass="+pass;
  xmlhttp_login.onreadystatechange=state_Change_login;
  xmlhttp_login.open("GET",url,true);
  xmlhttp_login.send(null);
	  return false;
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}


function state_Change_login()
{
if (xmlhttp_login.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp_login.status==200)
    {// 200 = "OK"
	eval(xmlhttp_login.responseText)
    }
  else
    {
    alert("Problem retrieving XML data:" + xmlhttp_login.statusText);
    }
  }
}