/*  Identity JS Shiznit 
 *  (c) 2006 Michael Sharon 
 *	Do whatever you like with this code. I doubt it's useful. :)
/*--------------------------------------------------------------------------*/

function tryLogin(){
	
	var codename = $F('loginCodename'); 
	var password = $F('loginPassword'); 
	
	var d = $('busyWidget'); 
	d.innerHTML = '<img src="/images/loading.gif" width="32" height="32" /> Logging in... '; 
	
	var url = '/libs/xml.php'; 
	var pars = 'login=1&codename=' + codename + '&password=' + password; 
	
	var myAjax = new Ajax.Updater(
								  'loginWidget', 
								  url, 
								  {
									  method: 'get', 
									  parameters: 'pars', 
								  }); 	
	return false; 
}

//remove text
function removeText(input, text)
{
	if(input.value == text)
	{
		input.value = "";
	}else
		return false;
}

// confirm reset
function confirmReset()
{
 var sure= confirm("Do you really want to reset the game?");
 if (sure== true)
 {
   window.location="?p=admin&reset=1";
 }
 else
 {
  //window.location="/?p=admin";
 }
}