function batasinput(e, t)
	{
	var key;
	var keychar;
	var kar;

	if(t==1) kar = "abcdefghijklmnopqrstuvwxyz0123456789";
	if(t==2) kar = "abcdefghijklmnopqrstuvwxyz";
	if(t==3) kar = "+-0123456789";
	if(t==4) kar = " abcdefghijklmnopqrstuvwxyz";
	if(t==5) kar = "abcdefghijklmnopqrstuvwxyz0123456789@_-.";
	if(t==6) kar = "abcdefghijklmnopqrstuvwxyz0123456789 .";

	if (window.event)
	   key = window.event.keyCode;
	else if (e)
	   key = e.which;
	else
	   return true;
	keychar = String.fromCharCode(key);
	keychar = keychar.toLowerCase();

	if ((key==null) || (key==0) || (key==8) || 
		(key==9) || (key==13) || (key==27) )
	   return true;

	else if (((kar).indexOf(keychar) > -1))
	   return true;
	else
	   return false;
	}

function bataspwd(e, t)
	{
	var key;
	var keychar;
	var kar = ' ';

	if (window.event)
	   key = window.event.keyCode;
	else if (e)
	   key = e.which;
	else
	   return true;
	keychar = String.fromCharCode(key);
	keychar = keychar.toLowerCase();

	if ((key==null) || (key==0) || (key==8) || 
		(key==9) || (key==13) || (key==27) )
	   return true;

	else if (((kar).indexOf(keychar) > -1))
	   return false;
	else
	   return true;
	}

function lookup(inputString) 
	{
	if(inputString.length == 0) 
		{
		// Hide the suggestion box.
		$('#suggestions').hide();
		} 
		else 
			{
			$.post("/index.php?mode=user&action=ajax&id=city", {name: ""+inputString+""}, function(data){
			if(data.length >0) 
				{
				$('#suggestions').show();
				$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup

function fill(thisValue) 
	{
	$('#inputString').val(thisValue);
	setTimeout("$('#suggestions').hide();", 200);
	}
