//
//  THIS FILE IS SERVED FROM COMMONAPACHE SERVER.
//
var temp = "no";
	var path= location.pathname;
	var built_url = location.protocol+"//"+location.host+"/"+path.split("/")[1];


function clrForm()
{
	if(temp == 'no' )
	{
		document.loginform.username.value="";
		//document.getElementById("pass").innerHTML= '<input name="password" class="CC_field" autocomplete="off" onfocus="javascript:clrForm();" type="password" size="13"  title="Please enter your Login name"/>';
		document.getElementById("pass").innerHTML= '<input name="password" class="log_field" autocomplete="off" onfocus="javascript:clrForm();" type="password" title="Please enter your Login name"/>';
		document.loginform.username.focus();
	}
	temp = "yes";
}

function pageOnload ()
{
	if (location.search.indexOf("confirm=invalid")==-1)
	{
	if(temp == 'no')
		{
		document.loginform.username.value="Login name";
		document.loginform.password.value="Password";
		}
	}

}
if(session_id == 'null')
{

	if (location.href.indexOf("bingo/home/")!=-1)
		window.onload = pageOnload;
}


//Start log component
//by Patrick Voet
//text variables used in login component
var logWelcomeText = "Welcome";
var logUserNameLabel = "Login name:";
var logPassNameLabel = "Password:";
var logUserFormDefault = "Login name";
var logPassFormDefault = "password";
var logButtonLabel = "Login";
var logForgottenText = "Forgot your password?";
var logRegisterText = "Register";
var logEditAccountText = "My Account";
var logLogOutText = "Log out";
var lognewUserText ="";
var logBalanceText ="Balance";
var logBonusText ="Bonus Money";
var logLoyaltyText ="Loyalty Points";
var logDepositButtonText ="Deposit";
var logWithdrawButtonText ="Withdraw";
var logMyAccountButtonText ="My Account";


function logInComponent(){
try{
if(session_id == 'null'){
document.write('<div id="log_in_area">');
document.write('<div id="log_welcome">'+logWelcomeText+'</div>');
document.write('<div id="log_forgotten"><a href="'+built_url+'/bingo/registration/forgotten.thtml" title="'+logForgottenText+'">'+logForgottenText+'</a></div>');
document.write('<form action="/commonsys/home/loginAction.do" method="POST" autocomplete="off" name="loginform">');
document.write('<div id="log_name_label">'+logUserNameLabel+'</div>');
document.write('<div id="log_name"><input class="log_field" name="username" type="text" autocomplete="off" onfocus="javascript:clrForm();"/></div>');
document.write('<div id="log_pass_label">'+logPassNameLabel+'</div>');
document.write('<div id="pass"><input class="log_field"  name="password" type="password" onfocus="javascript:clrForm();"/></div>');
document.write('<div id="Error"></div>');
document.write('<div id="log_submit"><input type="hidden" name="rememberChk" /><input type="submit" value="'+logButtonLabel+'" onclick="javascript: return Validate()" class="log_button"/></div>');
document.write('</form>');
document.write('<div id="log_register"><a href="'+built_url+'/bingo/registration/registration_step1.thtml" title="'+logRegisterText+'">'+logRegisterText+'</a></div>');
document.write('<div id="log_newUserText">'+lognewUserText+'</div>');
if (location.search.indexOf("confirm=invalid")==-1){
document.loginform.username.value=logUserFormDefault;
document.loginform.password.value=logPassFormDefault;
}
document.write('</div>');
}else{
document.write('<div id="log_account_area">');
//balance
document.write('<div id="log_balance">');
document.write('<div class="log_account_title">'+logBalanceText+'</div>');
document.write('<div class="log_account_amount"><span id="header_realbal">000000</span></div>');
document.write('</div>');
		
//bonus
document.write('<div id="log_bonus">');
document.write('<div class="log_account_title">'+logBonusText+'</div>');
document.write('<div class="log_account_amount"><span id="header_bonbal">000000</span></div>');
document.write('</div>');
		
//points
document.write('<div id="log_points">');
document.write('<div class="log_account_title">'+logLoyaltyText+'</div>');
document.write('<div class="log_account_amount"><span id="header_loyalty">000000</span></div>');
document.write('</div>');	

//buttons
document.write('<div id="log_account_buttons">');
document.write('<a href="javascript:checkdeposit();" class="button_deposit" title="'+logDepositButtonText+'">'+logDepositButtonText+'</a>');
document.write('<a href="javascript:checkwithdraw();" class="button_withdraw" title="'+logWithdrawButtonText+'">'+logWithdrawButtonText+'</a>');
document.write('<a href="/bidbingo/bingo/account/edit_account.thtml" class="button_editaccount" title="'+logMyAccountButtonText+'">'+logMyAccountButtonText+'</a>');
document.write('<a href="/commonsys/login/logout.do" onclick="javascript:return CloseGameWindow();" class="button_logout" title="'+logLogOutText+'">'+logLogOutText+'</a>');
document.write('</div>');
document.write('</div>');
}
}catch(e){
alert(e);
}
}
//End log component


//bookmark function
function addBookmark(title,url) {
if (window.sidebar) { 
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

var validuser;
var request_flag = true;
function Validate()
{
	if(request_flag)
	{		
		
			if(document.loginform.password.type == 'text')
			{
				alert('Please enter a valid Login name and password');
				return false;
			}
			var username = document.loginform.username.value;
			var password = document.loginform.password.value
			if((username==null) || (username==""))
			{  
				alert("Enter the Login name");
				document.loginform.username.focus();
				return false;
			}
			else if((password==null) || (password==""))
			{
				alert("Enter the Password");
				document.loginform.password.focus();
				return false;
			}
			else if(isValidPasswd(password,username)==-1)
			{
				document.loginform.password.focus();
				return false;
			}
			else
			{
				var val = isValidPasswd(document.loginform.password.value, document.loginform.password.value);
				if(val != 0)
					return false;
				request_flag = false;
				//document.getElementById("login").disabled=true;
				var hardCodedURL = location.host; 
				var strPathname = location.pathname;
				var action_path = strPathname.split("/");
				var action_url="http://"+hardCodedURL+"/"+action_path[1];
				if((hardCodedURL.indexOf("demo") != -1 ) || (hardCodedURL.indexOf("test") != -1 ))
					hardCodedURL = "testgaming.st-minver.com";	
				else
					hardCodedURL = "bingo.st-minver.com";	

				action_url="https://"+hardCodedURL;		
				document.loginform.action = action_url + "/commonsys/home/loginAction.do";	
				document.loginform.method="POST";
				return true;
			}
		}
		else
		{
			alert("Request is in progress");
			//return false;
		}

}

function ImageURL()
{	
	if(session_id != 'null')
	{
		if(isDynamicLobby == "true")
		{
			document.location=built_url+"/bingo/lobby/index.thtml";
		}
		else
		{
			//document.location="../../login/BingoLogin.do";
			document.location=built_url+"/bingo/lobby/top-games/"; // by madhava Monday, March 06, 2006
		}
	}
	else
	{
		document.location = built_url+"/bingo/registration/login.thtml";
	}
}

function registerAlertOrLobby()
{
	if(session_id != 'null')
	{ 
		if(isDynamicLobby == "true")
			document.location=built_url+"/bingo/lobby/index.thtml";
		else
			location.href=built_url+"/bingo/lobby/top-games/"; // by madhava Monday, March 06, 2006
	}
	else
	{
		alert('We\'d love you to try our games, but please register first.');
		location.href=built_url+"/bingo/registration/registration_step1.thtml";
	}
}

function registerOrLobby()
{
	if(session_id != 'null')
	{ 
		if(isDynamicLobby == "true")
			document.location=built_url+"/bingo/lobby/index.thtml";
		else
			location.href=built_url+"/bingo/lobby/top-games/"; // by madhava Monday, March 06, 2006
	}
	else
	{
		location.href=built_url+"/bingo/registration/registration_step1.thtml";
	}
}

function launchOrRegister(gameType,provider)
{	
	if(session_id != 'null')
	{ 
		openGamePage(gameType,provider);
	}
	else
	{
		location.href=built_url+"/bingo/registration/registration_step1.thtml";
	}
}

function launchAlertOrRegister(gameType,provider)
{	
	if(session_id != 'null')
	{ 
		openGamePage(gameType,provider);
	}
	else
	{
		alert('We\'d love you to try our games, but please register first.');
		location.href=built_url+"/bingo/registration/registration_step1.thtml";
	}
}

function PlayNowURL()
{	
		
	if(session_id != 'null')
	{ 
		if(isDynamicLobby == "true")
		{
			document.location=built_url+"/bingo/lobby/index.thtml";
		}
		else
		{
			//location.href="../../login/BingoLogin.do";
			location.href=built_url+"/bingo/lobby/top-games/"; // by madhava Monday, March 06, 2006
		}
	}else
	{
			alert('We\'d love you to try our games, but please register first.');
			location.href=built_url+"/bingo/registration/registration_step1.thtml";
	}
}
 
function ChangeState(id,message)
{
		if(document.getElementById(id))
			document.getElementById(id).innerHTML = message;
}

function ChangeVisibility(tagid,thevisiblity)
	{
		if(document.getElementById(tagid))
			document.getElementById(tagid).style.visibility = thevisiblity;
	}

function CloseGameWindow()
{
			allowResize = "no";
			// Start at top left
			LeftPosition = 0;
			TopPosition = 0;
			// Go almost full-screen for Flash Bingo
			myHeight = (screen.height) ? (screen.height-145) : 0;
			myWidth = myHeight * 1.375;

			// Set the left and top window position to zero if logic above has produced a value less than zero
			if (LeftPosition < 0) {	LeftPosition = 0;}
			if (TopPosition < 0) {	TopPosition = 0;}
			// Configure other window properties
			winProps = "left="+LeftPosition+",top="+TopPosition+",width="+myWidth+",height="+myHeight+",location=0,scrollbars=0,menubar=0,toolbar=0,resizable=" + allowResize;
	var win_ref = window.open("../../pre_refresh.jsp", "Logout", winProps);
	win_ref.close();
	window.event.returnValue = true;
	return true;
}
//title for the 
//document.title='Ask Bingo ';

function isValidPasswd(pw, username){
  if(pw.length == 0){
    alert("Please enter a valid password.");
    return -1;
  } else if (pw.length > 30) {
    alert("Please enter a valid password");
    return -1;
  }else if (pw.length < 6) {
    alert("Please enter a valid password");
    return  -1;
  }/* else if ((username.length > 2) && (pw.indexOf(username) >= 0) ){
    alert("Please enter a valid password");
    return -1;
  } */else {
    return 0;
  }
}

function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}


// function addTrackTag(){
	// var request_protocol	= location.protocol;
	// var request_pathname	= location.pathname;
	// var request_querString  = location.search;
	// if(request_pathname.indexOf("/deposit/bonushistory.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_bonushistory_10"/>');
	// }
	// if(request_pathname.indexOf("/community/index.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_community_10"/>');
	// }
	// if(request_pathname.indexOf("/account/edit_account.thtml") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_editaccount_10"/>');
	// }
	// if(request_pathname.indexOf("/info/index.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_gettingstarted_10"/>');
	// }
	// if(request_pathname.indexOf("/info/help.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_help_10"/>');
	// }
	// if(request_pathname.indexOf("info/help_banking.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_helpbanking_10"/>');
	// }
	// if(request_pathname.indexOf("/info/help_bonus.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_helpbonus_10"/>');
	// }
	// if(request_pathname.indexOf("/info/help_gameplay.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_helpgameplay_10"/>');
	// }
	// if(request_pathname.indexOf("/info/help_gettingstarted.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_helpgettingstarted_10"/>');
	// }
	// if(request_pathname.indexOf("/info/help_privacy.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_helpsecurity_10"/>');
	// }
	// if(request_pathname.indexOf("/home/index.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_indexpage_10" />');
	// }
	// if(request_pathname.indexOf("/registration/login.htm") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_loginpage_10"/>');
	// }
	// if(request_pathname.indexOf("/promotions/index.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_promotions_10"/>');
	// }
	// if(request_pathname.indexOf("/registration/step1FinishedView.thtml") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_regcomplete_10"/>');
	// }	
	// if(request_pathname.indexOf("/registration/registration_step1.thtml") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_regpage1_10"/>');
	// }	
	// if(request_pathname.indexOf("/info/sitemap.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_sitemap_10"/>');
	// }	
	// if(request_pathname.indexOf("/timetable/index.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_timetable_10"/>');
	// }
	
	// if(request_querString.indexOf("Deposit") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_deposithistory_10"/>');
	// }
	// if(request_querString.indexOf("Withdraw") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_withdrawal_10"/>');
	// }
	// if(request_querString.indexOf("Transaction") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_transactions_10"/>');
	// }
	// if(request_pathname.indexOf("/account/deposit.thtml") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_opencheckdeposit_10"/>');
	// }
	// if(request_pathname.indexOf("/account/edit_account.thtml") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_editaccount_10"/>');
	// }
	// if(request_pathname.indexOf("/account/withdrawal_cheque.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_opencheckwithdrawal_10"/>');
	// }
	// if(request_pathname.indexOf("/account/withdrawal.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_opencheckwithdrawal_10"/>');
	// }
	// if(request_pathname.indexOf("/lobby/index.html") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_openbingogamescreen_10"/>');
	// }
	// if(request_pathname.indexOf("/login/Login.do") != -1)
	// {
		// document.write('<img height="1" width="1" src="'+request_protocol+'//switch.atdmt.com/action/cdkcht_opengamescreen_10"/>');
	// }
// }
//addTrackTag();

function Validate1()
{
	location.href=built_url+"/bingo/registration/registration_step1.thtml";
	return false;
}
function getCookie()
{
	 var dc = document.cookie;
	 var c = dc.split(';');
	 var value='';
	 if(c.length > 0)
		{
			for(var i =0; i< c.length;i++)
			{
				var key = trim(c[i].split('=')[0]);
				if(key == 'TRADEDOUBLER')
				{
					//alert(c[i].split('=')[0]);
					//alert(c[i].split('=')[1]);
					value = c[i].split('=')[1];
				}
			}
		}
	return  value;
}

if(location.search == "?cookie")
{
	alert(document.cookie);
	//getCookie()
}

try
{
	//alert(currentContext);
	var parentUrl = location.href;
	//alert(parentUrl.indexOf("/home/index.html"));
		var splitString = "/bingo/";
		//added for implementing MSN Frame in Royal Bingo site.
		var isMsnUrl = false;
		if(parentUrl.indexOf('/landing-pages/msn/')!=-1)
			isMsnUrl=true;
		var urlToSend = parentUrl.split(splitString)[0]+splitString
		//alert(urlToSend);
		var img = new Image();
		img.src = "/commonsys/details.jsp?url="+urlToSend+"&isMsnUrl="+isMsnUrl;
		//alert(img.src) ;
	 
	/*if(parentUrl.indexOf(currentContext) == -1)
	{
		var splitString = "/bingo/";
		var urlToSend = parentUrl.split(splitString)[0]+splitString
		//alert(urlToSend);
		var img = new Image();
		img.src = "/commonsys/details.jsp?url="+urlToSend;
	}*/
}
catch(e){}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=590,height=600,left = 365,top = 180');");
}
function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=590,height=600,left = 365,top = 180');");
}

function popUpShort(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=590,height=400,left = 365,top = 180');");
}

//Peters New Lobby Button ;

//copy image;
function playButton()
{
	try
	{
		if(session_id == 'null')
		{		
			document.write('<a href="/bidbingo/bingo/registration/registration_step1.thtml"><img src="/bidbingo/bingo/images/bt_sign_up.gif" width="150" height="66" border="0" alt="Online Bingo &#8250; Play now" style="cursor:hand"/></a>');
		}
		else
		{
			if(isDynamicLobby == "true")
			{
				document.write('<a href="/bidbingo/bingo/lobby/index.thtml"><img src="/bidbingo/bingo/images/bt_play_bingo2.gif" width="150" height="66" border="0" alt="Online Bingo &#8250; Play now" style="cursor:hand"/></a>');
			}
			else
			{
				document.write('<a href="/bidbingo/bingo/lobby/top-games/"><img src="/bidbingo/bingo/images/bt_play_bingo2.gif" width="150" height="66" border="0" alt="Online Bingo &#8250; Play now" style="cursor:hand"/></a>');
			}
			
		}
	}
	catch(e)
	{
			document.write('<a href="/bidbingo/bingo/registration/registration_step1.thtml"><img src="/bidbingo/bingo/images/bt_sign_up.gif" width="150" height="66" border="0" alt="Online Bingo &#8250; Play now" style="cursor:hand"/></a>');
			//alert(e);
		//location.href="../maintenance/maintenance.html";
	}
}

function bingoNav()
{
	try
	{
		if(session_id == 'null')
		{	
			//alert('1');
			if(isDynamicLobby == "true")
			{	
				document.write('<li id="topnav_bingoandgames"><a title="Bingo &amp; Games" href="/bidbingo/bingo/lobby/index1.thtml"><span class="topnavtext"></span></a></li>');
			}
			else
			{
				document.write('<li id="topnav_bingoandgames"><a title="Bingo &amp; Games" href="/bidbingo/bingo/lobby/top-games/index1.thtml"><span class="topnavtext"></span></a></li>');
			}
		}
		else
		{	
			if(isDynamicLobby == "true")
			{	
				document.write('<li id="topnav_bingoandgames"><a title="Bingo &amp; Games" href="/bidbingo/bingo/lobby/index.thtml"><span class="topnavtext"></span></a></li>');
			}
			else
			{
				document.write('<li id="topnav_bingoandgames"><a title="Bingo &amp; Games" href="/bidbingo/bingo/lobby/top-games/index.thtml"><span class="topnavtext"></span></a></li>');
			}
		}
	}
	catch(e)
	{
			if(isDynamicLobby == "true")
			{	
				document.write('<li id="topnav_bingoandgames"><a title="Bingo &amp; Games" href="/bidbingo/bingo/lobby/index1.thtml"><span class="topnavtext"></span></a></li>');
			}
			else
			{
				document.write('<li id="topnav_bingoandgames"><a title="Bingo &amp; Games" href="/bidbingo/bingo/lobby/top-games/index1.thtml"><span class="topnavtext"></span></a></li>');
			}
			//alert(e);
		//location.href="../maintenance/maintenance.html";
	}
}
//copy end;

function joinNowNav()
{
	try
	{
		if(session_id == 'null')
		{	
			document.write('<li id="topnav_joinnow"><a title="Join Bid bingo" href="/bidbingo/bingo/registration/registration_step1.thtml"><span class="topnavtext"></span></a></li>');
		}
		else
		{
			if(isDynamicLobby == "true")
			{	
				document.write('<li id="topnav_playnow"><a title="Play Now" href="/bidbingo/bingo/lobby/index.thtml"><span class="topnavtext"></span></a></li>');
			}
			else
			{
				document.write('<li id="topnav_jplaynow"><a title="Play Now" href="/bidbingo/bingo/lobby/top-games/index.thtml"><span class="topnavtext">Play Now</span></a></li>');
			}		
		}
	}
	catch(e)
	{
		document.write('<li id="topnav_joinnow"><a title="Join Bid bingo" href="/bidbingo/bingo/registration/registration_step1.thtml"><span class="topnavtext">Join Now</span></a></li>');
		//alert(e);
		//location.href="../maintenance/maintenance.html";
	}
}


function playNowButtonLink()
{
	try
	{
		if(session_id == 'null')
		{	
			document.write('<a title="Play" title="We\'d love you to try our games, but please register first." class="button_play nopadding" href="javascript:alert(\' We would love you to try our games, but please register first. \');location.href=\'/bidbingo/bingo/registration/registration_step1.thtml\'"><span class="displace">Play</span></a>');
		}
		else
		{
			document.write('<a title="Play" class="button_play nopadding" href="/bidbingo/bingo/lobby/index.thtml"><span class="displace">Play</span></a>');
		}
	}
	catch(e)
	{
		document.write('<a title="Play" class="button_play nopadding" href="/bidbingo/bingo/registration/registration_step1.thtml"><span class="displace">Play</span></a>');
		//alert(e);
		//location.href="../maintenance/maintenance.html";
	}
}


function myAccountNav()
{
    try
    {
        if(session_id != 'null')
        {        
            if(isMyAccountCheckEnabled == 'Y' && isPlayerSegmentMatched=='true')
			{
				if(isDynamicLobby == "true"){	
					document.write('<div class="navbutton" id="navbg"><a href="'+built_url+'/bingo/lobby/index.thtml?popup" title="My Account">My Account</a></div>');
				}else{
					document.write('<div class="navbutton" id="navbg"><a href="'+built_url+'/bingo/lobby/top-games/?popup" title="My Account">My Account</a></div>');
				}                
			}
        }
    }
    catch(e)
    {
            //do nothing
    }
}

		

function idVerificationNav()
{
    try
    {
		if(session_id != 'null')
        {        
            /*if(isDocsUpload!='Y' && isUploadApp=='Y')
                document.write('<div class="navbutton" id="navbg"><a href="'+built_url+'/bingo/account/uploadbankdetails.thtml" title="ID Verification">ID Document Upload</a></div>');
            */
			//alert("isDocUploadEnabled==>"+isDocUploadEnabled);

			if(isDocUploadEnabled == 'Y')
				document.write(' | <a href="/bidbingo/bingo/account/newuploadpage.thtml" class="footer">ID Document Upload</a>');
			else if(isDocsUpload!='Y' && isUploadApp=='Y')
				document.write(' | <a href="/bidbingo/bingo/account/uploadbankdetails.thtml" class="footer">ID Document Upload</a>');

        }
    }
    catch(e)
    {
            //do nothing
    }
}

