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("the_usernameright",username);
			ChangeState("realbal",cur_symbol+bal);
			ChangeState("realbal1",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 == "EPG"))
	{
		location.href=built_url+"/bingo/info/epagado_deposit.thtml";		
	}
	else if((ctype == "BTR"))
	{
		location.href=built_url+"/bingo/account/bank_transfer_deposit.thtml";
	}
	else if((ctype == "UKA"))
	{
		location.href=built_url+"/bingo/account/ukashdeposit.thtml";
	}
	else if((ctype == "NET"))
	{
		location.href=built_url+"/bingo/account/netellerdeposit.thtml";
	}
	else if((ctype == "MB"))
	{
		location.href=built_url+"/bingo/account/moneybookers_deposit.thtml";
	}
	else if((ctype == "PSC"))
	{
		location.href=built_url+"/bingo/account/paysafedeposit.thtml";
	}
	else 
	{
			location.href=built_url+"/bingo/account/deposit.thtml"
	}
}

function checkwithdraw()
{
	
	if(levelId == 1)
	{
		location.href=built_url+"/bingo/registration/registration_step2.thtml";
	}
	else if((ctype == "EPG"))
	{
		location.href=built_url+"/bingo/info/epagado_withdraw.thtml";		
	}
	
	else if((ctype == "PSC")&&(bal > 10))
	{
		location.href="/commonsys/withdraw/WithdrawView.do";
	}
	else if((ctype == "NET")&&(bal > 10))
	{
		location.href=built_url+"/bingo/account/neteller_withdrawal_cheque.thtml";
	}
	else if((ctype == "MB")&&(bal > 10))
	{
		location.href=built_url+"/bingo/account/moneybookers_withdrawal.thtml";

	}
	else if((levelId == 2)&&(bal < 10))
	{
		alert("Guthaben reicht nicht für Abhebung aus");
	}
	else
	{
		location.href="/commonsys/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("Sie haben nicht genug Treuepunkte zum Einlösen");
	}
	else
	{
		location.href=built_url+"/bingo/account/redeem.thtml";
  }
}

function changeexpdate()
{
  location.href=built_url+"/bingo/account/editcardexp.thtml"
}