function CF(val, id)
{
	document.getElementById("cur_val").value = val;
	
	if (document.getElementById(id).value == val) {
	document.getElementById(id).value = '';
	if (id == "Password1" || id == "Password2" || id == "password") document.getElementById(id).type = "password";
	}
}

function CB(id)
{
	if (document.getElementById(id).value == '')
	{
	document.getElementById(id).value = document.getElementById("cur_val").value;
	if (id == "Password1" || id == "Password2" || id == "password") document.getElementById(id).type = "text";
	}
}

function Avatars() 
{
document.write('<input type="radio" name="Avatar" value="1" checked="checked"><img src="http://holdem.ru/img/avatars/avatar1.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="2"><img src="http://holdem.ru/img/avatars/avatar2.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="3"><img src="http://holdem.ru/img/avatars/avatar3.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="4"><img src="http://holdem.ru/img/avatars/avatar4.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="5"><img src="http://holdem.ru/img/avatars/avatar5.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="6"><img src="http://holdem.ru/img/avatars/avatar6.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="7"><img src="http://holdem.ru/img/avatars/avatar7.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="8"><img src="http://holdem.ru/img/avatars/avatar8.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="9"><img src="http://holdem.ru/img/avatars/avatar9.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="10"><img src="http://holdem.ru/img/avatars/avatar10.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="11"><img src="http://holdem.ru/img/avatars/avatar11.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="12"><img src="http://holdem.ru/img/avatars/avatar12.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="13"><img src="http://holdem.ru/img/avatars/avatar13.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="14"><img src="http://holdem.ru/img/avatars/avatar14.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="15"><img src="http://holdem.ru/img/avatars/avatar15.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="16"><img src="http://holdem.ru/img/avatars/avatar16.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="17"><img src="http://holdem.ru/img/avatars/avatar17.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="18"><img src="http://holdem.ru/img/avatars/avatar18.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="19"><img src="http://holdem.ru/img/avatars/avatar19.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="20"><img src="http://holdem.ru/img/avatars/avatar20.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="21"><img src="http://holdem.ru/img/avatars/avatar21.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="22"><img src="http://holdem.ru/img/avatars/avatar22.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="23"><img src="http://holdem.ru/img/avatars/avatar23.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="24"><img src="http://holdem.ru/img/avatars/avatar24.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="25"><img src="http://holdem.ru/img/avatars/avatar25.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="26"><img src="http://holdem.ru/img/avatars/avatar26.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="27"><img src="http://holdem.ru/img/avatars/avatar27.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="28"><img src="http://holdem.ru/img/avatars/avatar28.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="29"><img src="http://holdem.ru/img/avatars/avatar29.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="30"><img src="http://holdem.ru/img/avatars/avatar30.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="31"><img src="http://holdem.ru/img/avatars/avatar31.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="32"><img src="http://holdem.ru/img/avatars/avatar32.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="33"><img src="http://holdem.ru/img/avatars/avatar33.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="34"><img src="http://holdem.ru/img/avatars/avatar34.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="35"><img src="http://holdem.ru/img/avatars/avatar35.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="36"><img src="http://holdem.ru/img/avatars/avatar36.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="37"><img src="http://holdem.ru/img/avatars/avatar37.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="38"><img src="http://holdem.ru/img/avatars/avatar38.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="39"><img src="http://holdem.ru/img/avatars/avatar39.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="40"><img src="http://holdem.ru/img/avatars/avatar40.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="41"><img src="http://holdem.ru/img/avatars/avatar41.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="42"><img src="http://holdem.ru/img/avatars/avatar42.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="43"><img src="http://holdem.ru/img/avatars/avatar43.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="44"><img src="http://holdem.ru/img/avatars/avatar44.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="45"><img src="http://holdem.ru/img/avatars/avatar45.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="46"><img src="http://holdem.ru/img/avatars/avatar46.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="47"><img src="http://holdem.ru/img/avatars/avatar47.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="48"><img src="http://holdem.ru/img/avatars/avatar48.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="49"><img src="http://holdem.ru/img/avatars/avatar49.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="50"><img src="http://holdem.ru/img/avatars/avatar50.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="51"><img src="http://holdem.ru/img/avatars/avatar51.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="52"><img src="http://holdem.ru/img/avatars/avatar52.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="53"><img src="http://holdem.ru/img/avatars/avatar53.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="54"><img src="http://holdem.ru/img/avatars/avatar54.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="55"><img src="http://holdem.ru/img/avatars/avatar55.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="56"><img src="http://holdem.ru/img/avatars/avatar56.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="57"><img src="http://holdem.ru/img/avatars/avatar57.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="58"><img src="http://holdem.ru/img/avatars/avatar58.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="59"><img src="http://holdem.ru/img/avatars/avatar59.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="60"><img src="http://holdem.ru/img/avatars/avatar60.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="61"><img src="http://holdem.ru/img/avatars/avatar61.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="62"><img src="http://holdem.ru/img/avatars/avatar62.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="63"><img src="http://holdem.ru/img/avatars/avatar63.png" alt="" /><br />');
document.write('<input type="radio" name="Avatar" value="64"><img src="http://holdem.ru/img/avatars/avatar64.png" alt="" /><br />');
}

function GetBalance()
{
	Ext.Ajax.request
	({
		url: 'index.php?get_balance',
		success: function(response, options)
				{
				Ext.getDom("balance").innerHTML = (response.responseText);
                },
		failure: function()
				{

                }

	});
setTimeout("GetBalance()", 3000);
}

function GetChipsResult()
{
var code = document.getElementById('code').value;
	Ext.Ajax.request
	({
		url: 'http://holdem.ru/includes/get_chips.php?result&code=' + code,
		success: function(response, options)
				{
				Ext.getDom("result").innerHTML = (response.responseText);
                },
		failure: function()
				{

                }

	});
}

	function CreateTracker()
	{
	var tracker_title = document.getElementById('tracker_title').value;

	Ext.Ajax.request
	({
		url: 'http://holdem.ru/includes/pages/friends.php?tracker=' + tracker_title,
		success: function(response, options)
				{
				Ext.getDom('answer').innerHTML = (response.responseText);
				if ((response.responseText).indexOf("создан") != -1) Ext.getDom('tracker_text').style.display = 'none';;
                },
		failure: function()
				{

                }
	});
	};

