// JavaScript Document
var homePageGames=[
{"Name":"Plum Royale", "LaunchCode":"javascript:openGamePage('PlumRoyale20ST','obs')", "imageName":"plumRoyale.gif"},	
{"Name":"X Factor", "LaunchCode":"javascript:openGamePage('XFactor','obs')", "imageName":"xFactor.gif"}, 
{"Name":"Atlantis", "LaunchCode":"javascript:openGamePage('Atlantis')", "imageName":"atlantis.gif"},
{"Name":"Dead Mans Chest", "LaunchCode":"javascript:openGamePage('DeadMansChest20ST','obs')", "imageName":"deadMansChest.gif"},
{"Name":"Chain Reactors", "LaunchCode":"javascript:openGamePage('ChainReactors','obs')", "imageName":"chainReactors.gif"}
];

function writeHomePageGames(){
// header & link
if(session_id == 'null'){gameLink = built_url +'/bingo/lobby/top-games/index1.thtml'}
else{gameLink = built_url +'/bingo/lobby/top-games/index.thtml'}
document.write('<div id="homeGameHeader">Spela v&aring;ra toppspel</div><div id="homeGameLink"><a href="'+gameLink+'" title="Visa alla" >Visa alla</a></div>');
document.write('<div style="clear:both;"></div>');
// row of 5 blocks of games
for (i=0; i<5; i++){
if(session_id == 'null'){gameLink = built_url +'/bingo/registration/registration_step1.thtml'}
else{gameLink = homePageGames[i].LaunchCode}
document.write('<div class="blhighlight" style="float:left;');
if (i<4){document.write('margin-right:11px;');}
document.write('"><div class="brhighlight"><div class="tlhighlight"><div class="trhighlight">');
document.write('<a href="'+gameLink+'" title="'+homePageGames[i].Name +'" onfocus="this.blur();">');
document.write('<img src="'+built_url+'/bingo/images/homePageGames/'+homePageGames[i].imageName +'" height="90" width="145" border="0" alt="'+homePageGames[i].Name +'">');
document.write('</a>');
document.write('<div class ="homeGameTitle"><a href="'+gameLink+'" title="'+homePageGames[i].Name +'" onfocus="this.blur();" class="footerLink">'+homePageGames[i].Name +'</a></div>');
document.write('</div></div></div></div>');
}
}
