function openHistory () { window.open('http://games.bet365.com/Redirect/History','bethistory', 'width=800,height=600,scrollbars=yes,resizable=yes'); } function openAccount (url) { if (typeof evOpenAccountOpened != "undefined") { evOpenAccountOpened(); } var width = 516, height = 670; if (document.all) var xMax = screen.width, yMax = screen.height; else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight; else var xMax = 1024, yMax=768; var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2; window.open(url, 'blank', 'location=no,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset,true).focus(); } function lostLogin (url) { var width = 516, height = 670; if (document.all) var xMax = screen.width, yMax = screen.height; else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight; else var xMax = 1024, yMax=768; var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2; window.open(url, 'blank', 'location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no,width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset,true).focus(); } function deposit(sessionid) { var width = 516, height = 670; if (document.all) var xMax = screen.width, yMax = screen.height; else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight; else var xMax = 1024, yMax=768; var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2; window.open('http://games.bet365.com/Redirect/Topup?fb=1', 'blank', 'status=yes,location=no,menubar=no,resizable=yes,scrollbars=auto,toolbar=no,width=630,height=775,top=123,left=128',true).focus(); } function withdraw(url) { var width = 516, height = 670; if (document.all) var xMax = screen.width, yMax = screen.height; else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight; else var xMax = 1024, yMax=768; var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2; window.open(url, 'blank', 'location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no,width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset,true).focus(); } function statement(url) { var width = 516, height = 670; if (document.all) var xMax = screen.width, yMax = screen.height; else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight; else var xMax = 1024, yMax=768; var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2; window.open(url, 'blank', 'location=no,menubar=no,resizable=no,scrollbars=yes,toolbar=no,width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset,true).focus(); } function loginAndPlayForReal(gameId) { window.location.href = '/GameFramework/WebIntegration/GamePlayRedirect.jsp?game=' + gameId ; } // events function evPopupClosed() { } function openHelp(gameId, language){ var gameInfo = Game[gameId]; if (typeof(gameInfo) != "undefined") { var width = 799, height = 650; if (document.all) var xMax = screen.width, yMax = screen.height; else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight; else var xMax = 1024, yMax=768; var scrolls = "yes"; var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2; if (gameId.indexOf ("CGS") == 0 ) { scrolls = "yes"; width = 416; } var lindex = {ENG:1,ZHTW:2,DEU:5,ITA:6,DAN:7,SWE:8,NOR:9,ZHCN:10,SPA:3,BUL:19,GRE:20,POL:21,POR:22,ROM:23,CZE:24,HUN:25,SVK:26} var lan = language.split("-").join(""); var name = gameInfo.name.split(":").join(""); name = name.split("!").join(""); name = name.split(".").join(""); name = name.split("_").join(""); window.open('http://games.bet365.com/GamesHelp.aspx?gameId=' + gameId+'&lng='+lindex[lan], name + 'help', 'location=no,menubar=no,resizable=yes,scrollbars=' + scrolls + ',toolbar=no,width='+width+',height='+height+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset,true).focus(); } return false; } function openBank(sessionid) { if(sessionid != 'null') window.open('http://games.bet365.com/Redirect/Bank', 'Bank', 'status=yes,location=no,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,width=630,height=775,top=123,left=128',true).focus(); } var alertmsg = null; function playForReal(alertmsg_) { window.onunload = function() { if(alertmsg!=null) alert(alertmsg); } alertmsg = alertmsg_; window.close(); } var Bet365GameInfo = [ {gameId:'HILO', gameWidth: 810, gameHeight: 596}, {gameId:'HILOGAMBLER', gameWidth: 810, gameHeight: 596}, {gameId:'KENO', gameWidth: 810, gameHeight: 596}, {gameId:'PINBALL', gameWidth: 810, gameHeight: 596}, {gameId:'POOL42', gameWidth: 810, gameHeight: 596}, {gameId:'THINKPOKER', gameWidth: 810, gameHeight: 596}, {gameId:'ACESHIGH', gameWidth: 810, gameHeight: 596}, {gameId:'BOULE', gameWidth: 810, gameHeight: 596}, {gameId:'HOLDEMORFOLDEM', gameWidth: 810, gameHeight: 596}, {gameId:'MINIMAHJONG', gameWidth: 810, gameHeight: 596}, {gameId:'SPINWIN', gameWidth: 810, gameHeight: 596}, {gameId:'TRIPLECHANCEHILO', gameWidth: 810, gameHeight: 596}, {gameId:'VHR', gameWidth: 700, gameHeight: 511}, {gameId:'FORTUNE36', gameWidth: 808, gameHeight: 596}, {gameId:'THREECARD', gameWidth: 810, gameHeight: 596}, {gameId:'MATCHBINGO', gameWidth: 810, gameHeight: 596}, {gameId:'RACETOAGRAND', gameWidth: 810, gameHeight: 596}, {gameId:'ALADDINSTREASURE', gameWidth: 810, gameHeight: 596}, {gameId:'GAMESHOWHILO', gameWidth: 810, gameHeight: 596}, {gameId:'LASERESCAPE', gameWidth: 810, gameHeight: 596}, {gameId:'BINGOKENO', gameWidth: 810, gameHeight: 596}, {gameId:'BINGOKENOEXTREME', gameWidth: 810, gameHeight: 596}, {gameId:'SQUARES', gameWidth: 810, gameHeight: 596}, {gameId:'TABLEKENO', gameWidth: 810, gameHeight: 596}, {gameId:'KWIKKALUKI', gameWidth: 810, gameHeight: 596}, {gameId:'CASINODICE', gameWidth: 810, gameHeight: 596}, {gameId:'ROLLEM', gameWidth: 810, gameHeight: 596}, {gameId:'S4P_JIGSAWPUZZLE', gameWidth: 810, gameHeight: 596}, {gameId:'S4P_PICTUREFIND', gameWidth: 810, gameHeight: 596}, {gameId:'S4P_PICTURESHUFFLE', gameWidth: 810, gameHeight: 596}, {gameId:'HOLLYWOODSTARS', gameWidth: 810, gameHeight: 596}, {gameId:'GOLDENGOAL', gameWidth: 810, gameHeight: 596}, {gameId:'HATTRICK', gameWidth: 810, gameHeight: 596}, {gameId:'FORMULAWON', gameWidth: 810, gameHeight: 596}, {gameId:'SCRATCHKIOSK', gameWidth: 810, gameHeight: 596}, {gameId:'INBETWEENFOOTBALL', gameWidth: 810, gameHeight: 596}, {gameId:'TTFOOTBALLLEGENDS', gameWidth: 810, gameHeight: 596}, {gameId:'TTFOOTBALLSTARS', gameWidth: 810, gameHeight: 596}, {gameId:'TTFOOTBALLMANAGERS', gameWidth: 810, gameHeight: 596}, {gameId:'TTHORROR', gameWidth: 810, gameHeight: 596}, {gameId:'TTJETS', gameWidth: 810, gameHeight: 596}, {gameId:'TTCELEBRITIES', gameWidth: 810, gameHeight: 596}, {gameId:'DEALORNODEAL', gameWidth: 808, gameHeight: 596}, {gameId:'VIRTUALHORSES', gameWidth: 800, gameHeight: 614}, {gameId:'VIRTUALDOGS', gameWidth: 800, gameHeight: 614}, {gameId:'BLACKJACKSTANDORBUST', gameWidth: 810, gameHeight: 596}, {gameId:'PINBALLROULETTE', gameWidth: 810, gameHeight: 596}, {gameId:'BLACKORWHITE', gameWidth: 810, gameHeight: 596}, {gameId:'BIRTHDAYSURPRISE', gameWidth: 810, gameHeight: 596}, {gameId:'SPINIT', gameWidth: 810, gameHeight: 596}, {gameId:'GOLDENCLOVER', gameWidth: 809, gameHeight: 596}, {gameId:'CRACKTHESAFE', gameWidth: 810, gameHeight: 596}, {gameId:'FOURPLAY', gameWidth: 810, gameHeight: 596}, {gameId:'BINGOFORTUNE', gameWidth: 810, gameHeight: 596}, {gameId:'DEALORNODEALJACKPOT', gameWidth: 808, gameHeight: 596}, {gameId:'BALTIMOREDROP', gameWidth: 810, gameHeight: 596}, {gameId:'DEALORNODEALINSTANT', gameWidth: 810, gameHeight: 596}, {gameId:'PINBALLDELUXE', gameWidth: 810, gameHeight: 596}, {gameId:'JPM_BULLSEYE', gameWidth: 750, gameHeight: 545}, {gameId:'JPM_CATCHPHRASE', gameWidth: 750, gameHeight: 560}, {gameId:'JPM_BATTLESHIPS', gameWidth: 750, gameHeight: 530}, {gameId:'JPM_NEWSTIME', gameWidth: 750, gameHeight: 530}, {gameId:'JPM_HANGMAN', gameWidth: 805, gameHeight: 664}, {gameId:'JPM_FOOTBALLQUIZ', gameWidth: 805, gameHeight: 684}, {gameId:'TOWERPOWER', gameWidth: 810, gameHeight: 596}, {gameId:'REELDEAL', gameWidth: 819, gameHeight: 635}, {gameId:'CARDROULETTE', gameWidth: 810, gameHeight: 596}, {gameId:'KILLERACE', gameWidth: 810, gameHeight: 596}, {gameId:'TEXASCHOOSEEM', gameWidth: 810, gameHeight: 596}, {gameId:'ROULETTE', gameWidth: 810, gameHeight: 596}, {gameId:'BLACKJACK', gameWidth: 792, gameHeight: 596}, {gameId:'JPM_ROFORTUNE', gameWidth: 745, gameHeight: 530}, {gameId:'AROUNDTHEWORLD', gameWidth: 767, gameHeight: 596}, {gameId:'KINGARTHUR', gameWidth: 767, gameHeight: 596}, {gameId:'GOLDRUSHSHOWDOWN', gameWidth: 778, gameHeight: 596}, {gameId:'PHARAOHSTREASURE', gameWidth: 767, gameHeight: 596}, {gameId:'VIRTUALFOOTBALL', gameWidth: 810, gameHeight: 596}, {gameId:'FRUITYSUPERNOVA', gameWidth: 771, gameHeight: 596}, {gameId:'ALIENSUPERNOVA', gameWidth: 771, gameHeight: 596}, {gameId:'SHUTTHEBOX', gameWidth: 798, gameHeight: 596}, {gameId:'TEXASPREDICTOR', gameWidth: 733, gameHeight: 596}, {gameId:'ROUTETORICHES', gameWidth: 798, gameHeight: 594}, {gameId:'BATTLESHIPBONANZA', gameWidth: 799, gameHeight: 596}, {gameId:'CHRISTMASPRESENT', gameWidth: 810, gameHeight: 596}, {gameId:'STARSIGNSUPERNOVA', gameWidth: 771, gameHeight: 596}, {gameId:'CHAINREACTORS', gameWidth: 810, gameHeight: 596}, {gameId:'CASHBLOX', gameWidth: 810, gameHeight: 593}, {gameId:'F1X2_FOOTBALL', gameWidth: 780, gameHeight: 600}, {gameId:'GOLDENBALLSSCRATCH', gameWidth: 810, gameHeight: 596}, {gameId:'BIGBROTHERPYRAMID', gameWidth: 810, gameHeight: 596}, {gameId:'BIGBROTHERSCRATCH', gameWidth: 799, gameHeight: 596}, {gameId:'GOLDENBALLS', gameWidth: 760, gameHeight: 618}, {gameId:'RUBIKS', gameWidth: 810, gameHeight: 581}, {gameId:'AMAZONWILD', gameWidth: 797, gameHeight: 611}, {gameId:'CLEOPATRA', gameWidth: 770, gameHeight: 726}, {gameId:'MONOPOLYPASSGO', gameWidth: 770, gameHeight: 726}, {gameId:'LUCKYSTAR', gameWidth: 810, gameHeight: 596}, {gameId:'GENERATOR', gameWidth: 733, gameHeight: 596}, {gameId:'HILOPOKER', gameWidth: 800, gameHeight: 590}, {gameId:'JPM_MILLIONAIRE', gameWidth: 750, gameHeight: 545}, {gameId:'RGROULETTE', gameWidth: 781, gameHeight: 590}, {gameId:'NG_100MCHAMPION_34', gameWidth: 800, gameHeight: 600}, {gameId:'NG_3WOW_41', gameWidth: 800, gameHeight: 600}, {gameId:'NG_BINGO_18', gameWidth: 800, gameHeight: 600}, {gameId:'NG_BINGOBONANZA_23', gameWidth: 800, gameHeight: 600}, {gameId:'NG_BOWLING_11', gameWidth: 800, gameHeight: 600}, {gameId:'NG_CASHFARM_50', gameWidth: 800, gameHeight: 600}, {gameId:'NG_CHAMPAGNE_40', gameWidth: 800, gameHeight: 600}, {gameId:'NG_CLUBPEARL_33', gameWidth: 800, gameHeight: 600}, {gameId:'NG_DANCINGDOMINO_42', gameWidth: 800, gameHeight: 600}, {gameId:'NG_DARTS_28', gameWidth: 800, gameHeight: 600}, {gameId:'NG_DISCOKENO_49', gameWidth: 800, gameHeight: 600}, {gameId:'NG_FANTASYFOREST_4', gameWidth: 800, gameHeight: 600}, {gameId:'NG_GENIE_6', gameWidth: 800, gameHeight: 600}, {gameId:'NG_GOLDENISLAND_12', gameWidth: 800, gameHeight: 600}, {gameId:'NG_GONEFISHING_25', gameWidth: 800, gameHeight: 600}, {gameId:'NG_HILO_38', gameWidth: 800, gameHeight: 600}, {gameId:'NG_HIPPODROME_27', gameWidth: 800, gameHeight: 600}, {gameId:'NG_JUNGLEJOY_45', gameWidth: 800, gameHeight: 600}, {gameId:'NG_KNIGHTSBATTLE_54', gameWidth: 800, gameHeight: 600}, {gameId:'NG_THELOSTMAYA_53', gameWidth: 800, gameHeight: 600}, {gameId:'NG_LUCKY21_20', gameWidth: 800, gameHeight: 600}, {gameId:'NG_LUCKYDIAMONDS_13', gameWidth: 800, gameHeight: 600}, {gameId:'NG_MEGASAFE_5', gameWidth: 800, gameHeight: 600}, {gameId:'NG_MISTERJOKER_43', gameWidth: 800, gameHeight: 600}, {gameId:'NG_POKERKING_21', gameWidth: 800, gameHeight: 600}, {gameId:'NG_ROULETTE_7', gameWidth: 800, gameHeight: 600}, {gameId:'NG_ROYALPOKER_31', gameWidth: 800, gameHeight: 600}, {gameId:'NG_ROYALSLOTS_39', gameWidth: 800, gameHeight: 600}, {gameId:'NG_SCRATCHNROLL_17', gameWidth: 800, gameHeight: 600}, {gameId:'NG_SLOT777_10', gameWidth: 800, gameHeight: 600}, {gameId:'NG_SLOTSPYRAMID_8', gameWidth: 800, gameHeight: 600}, {gameId:'NG_SLOTSUPER7_19', gameWidth: 800, gameHeight: 600}, {gameId:'NG_SPLASHCASH_35', gameWidth: 800, gameHeight: 600}, {gameId:'NG_SUMMERFUN_24', gameWidth: 800, gameHeight: 600}, {gameId:'NG_SUPERCHANCE_36', gameWidth: 800, gameHeight: 600}, {gameId:'NG_TREASUREISLAND_3', gameWidth: 800, gameHeight: 600}, {gameId:'NG_WORLDCUP_16', gameWidth: 800, gameHeight: 600}, {gameId:'NG_XO_46', gameWidth: 800, gameHeight: 600}, {gameId:'NG_ZODIAC_15', gameWidth: 800, gameHeight: 600}, {gameId:'BIGBROTHERSLOT', gameWidth: 769, gameHeight: 590}]; function reopenGameBet365(gameid, options) { var gameInfo = null; var found = false; for(i = 0; i < Bet365GameInfo.length; i++) { var b365gi = Bet365GameInfo[i]; if(String(b365gi.gameId) == String(gameid)) { gameInfo = b365gi; found = true; break; } } if(found) { var baseURL = '/GameFramework/play.jsp'; // if baseURL is not defined set it to ''. If there is if (typeof(options)!="undefined" && typeof(options.baseURL) != "undefined" && options.baseURL != null) { baseURL = options.baseURL; } var language = 'ENG'; if (typeof(options)!="undefined" && typeof(options.language)!= 'undefined' && options.language!="") { language = options.language; } var format = ""; if (typeof(options)!="undefined" && typeof(options.format)!= 'undefined' && options.format!="") { format = "&format=" + options.format; } var myW = 0, myH = 0, d = window.document.documentElement, b = window.document.body; if( window.innerWidth ) { myW = window.innerWidth; myH = window.innerHeight; } else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; } else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; } if( window.opera && !document.childNodes ) { myW += 16; } var deltaWidth = gameInfo.gameWidth - myW; var deltaHeight = gameInfo.gameHeight- myH ; if (typeof(options)=="undefined" || (options.sessionId=='' || typeof(options.sessionId)=="undefined") || options.sessionId == null || options.sessionId == 'null') { var gameURL = baseURL; gameURL += '?game='; gameURL += gameInfo.gameId; gameURL += format; gameURL += "&language=" + language; location.href = gameURL; window.resizeBy(deltaWidth, deltaHeight); } else { var mode=(options.mode=='' || typeof(options.mode)=="undefined")?'':'&mode='+options.mode; var gameURL = baseURL; gameURL += '?game='; gameURL += gameInfo.gameId; gameURL += '&sessionid='; gameURL += options.sessionId; gameURL += mode; gameURL += format; gameURL += "&language=" + language; location.href = gameURL; window.resizeBy(deltaWidth, deltaHeight); } } else { reopenGame(gameid, options); } }