var temp = "no";
	var path= location.pathname;
	var built_url = location.protocol+"//"+location.host+"/"+path.split("/")[1];
try
{
	var cur_symbol="&#163;";
	if(cur == "978")
		cur_symbol="&#8364;";

	ChangeState("uname",username);
	/*ChangeState("fname",firstname);
	ChangeState("lname",surname);
	ChangeState("pwd",'********');
	ChangeState("security",'********');
	ChangeState("email",email);
	if((news=='Y')&&(mime=='H'))
		{
			ChangeState("news",'YES,Html Format');
		}
		else  if((news=='Y')&&(mime=='T'))
		{
			ChangeState("news",'YES,Text Format');
		}
		else
		{
			ChangeState("news",'No,Thankyou.');
		}
	
 			ChangeState("addr1",house+','+street);
			ChangeState("addr2",town);
			ChangeState("addr3",pcode);
			ChangeState("country",country);
			ChangeState("pno",pno);
			ChangeState("mno",mno);
			ChangeState("cname",cname);
			ChangeState("cno",cno);
			ChangeState("csecurityno",'********');*/
			ChangeState("the_usernameright",username);
			ChangeState("realbal",cur_symbol+bal);
			ChangeState("bonbal",cur_symbol+bonus);
			ChangeState("tollypoints",points);
			ChangeState("loyalty",loyalty);


	if(levelId == '1')
	{
		ChangeState("carddetails","")
	}
}
catch(ignore)
{
	
}

function cardverify()
{
		if(bal>minChangeCardDepAmt)
		{
			location.href=built_url+"/bingo/account/card_accessdenied.thtml";
		}
		else
		{
			location.href=built_url+"/bingo/account/change_card.thtml";
		}

}

/*function checkdeposit()
{
	if(levelId == 1)
	{
		location.href=built_url+"/bingo/registration/registration_step2.thtml";
	}
	else if(ctype == "UKA")
	{
		 location.href =built_url+"/bingo/account/ukashdeposit.thtml";
	}
	else if(ctype == 'MB')
	{
		 location.href =built_url+"/bingo/account/moneybookers_deposit.thtml";
	}
	else if(ctype == "NET")
	{
		location.href =built_url+"/bingo/account/neteller_deposit.thtml";
	}
	else if((ctype == "EPG"))
	{
		location.href=built_url+"/bingo/corporate/info/12730/deposito-mediante-epagado.thtml";		
	}
	else if((ctype == "BTR"))
	{
		location.href=built_url+"/bingo/corporate/info/12469/deposito-mediante-transferencia-bancaria.thtml";

	}
	else if(ctype == 'PSC')
	{
		 location.href =built_url+"/bingo/account/paysafedeposit.thtml";
	}
	else if((ctype == "CTD"))
	{
		location.href=built_url+"/bingo/account/citadel_deposit.thtml";
	}
	else
	{
        location.href=built_url+"/bingo/account/deposit.thtml";
    }
	
}*/
function checkdeposit()
{
    if(levelId == 1) {
        location.href=built_url+"/bingo/registration/registration_step2.thtml";
    } else {
        location.href=built_url+"/deposit/depositView.do";
    }
}
function checkwithdraw()
{
	
	if(levelId == 1)
	{
		location.href=built_url+"/bingo/account/deposit.thtml";
	}
	else if((levelId == 2)&&(bal < 10))
	{
		alert("No hay suficientes fondos para efectuar el reintegro");
	}
	else
	{
		location.href=built_url+"/withdraw/WithdrawView.do";
	}
	
}

function allTransactions(transType)
{
if(levelId == 1)
{
	location.href=built_url+"/bingo/registration/registration_step2.thtml";
}
else
{

document.getElementById(transType).href=built_url+"/deposit/common_transactions.html?type="+transType;
NewWindow(document.getElementById(transType).href,'mywin','600','550','yes','center');
return false;
	}
}

function checkredeem()
{
    if(loyalty <= 0 )
	{
        alert("No tiene suficientes puntos para canjear");
	}
	else
	{
		location.href=built_url+"/bingo/account/redeem.thtml";
  }
}

function changeexpdate()
{
  location.href=built_url+"/bingo/account/editcardexp.thtml"
}