 var MM_contentVersion = 6;
var MM_FlashCanPlay;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}    
        
         parent.sExit = sLook == "35" ? "Find out now why everyone is playing Poker - at Pacific Poker!" : "Find out now why everyone is playing Poker - at Pacific Poker!";
        CorentLang = 'en';
        function OpenPopUp()
        {
            var w = 314;
            var h = 459;
            var l = (window.screen.width-w)/2;
            var t = (window.screen.height-h)/2; 
            var filename = "../../new888/popupgames.htm?" + sCut;

            window.open(filename + "?" + sCut,null,
            "height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,resize=no,left="+l+",top="+t);
        }
        function OpenDownPoker(loc,relpath)
        {
                //document.location.href = relpath + "download.htm?" + sCut;
                url="http://www.pacificpoker.com/PokerInstaller?" +sCut + "&dl="+loc;
                window.open(url,"popDown","width=1,height=1,top=0,left=0");
                document.location.href = "/site2/poker/download.htm?" + sCut;

        }
              
         function OpenDownCasinoReg(loc,extraInfo)
        {                
                document.location.href = "/site2/casino/download.htm?" + sCut;
                url="../../CasinoInstaller?"+ sCut + "&dl="+loc + "&" + extraInfo;
                window.open(url,"popDown","width=1,height=1,top=0,left=0");
        } 

function oldHPshowFlash(flashPath)
{
     if (MM_FlashCanPlay)
    {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="567" height="147" id="main_image_colors_final" align="middle" VIEWASTEXT>');
        document.write('<param name="allowScriptAccess" value="always" />');
        document.write('<param name="movie" value="' + flashPath +'" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="' + flashPath +'" wmode="transparent"  quality="high" bgcolor="#ffffff" width="567" height="147" name="mov_slide" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
        document.write(' <a href="javascript:down(\'casino\');" name="rotate" id="rotate"><img id="rotateImg" src="' + sImgPath + '888-hp/main_image_casino.gif" border=0/>');    
        //rotateImages(0);
    }
}

function showFreeSpinsTopFlash(flashPath)
{
     if (MM_FlashCanPlay)
    {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="567" height="147" id="main_image_colors_final" align="middle" VIEWASTEXT>');
        document.write('<param name="allowScriptAccess" value="always" />');
        document.write('<param name="movie" value="' + flashPath +'" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="' + flashPath +'" wmode="transparent"  quality="high" bgcolor="#ffffff" width="567" height="147" name="mov_slide" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
        document.write('<a href="javascript:OpenLink();"><img src="' + sImgPath + '888-hp/8M_888main_top_default.gif" border=0/>');    
    }
}

function casinoTabFreeSpinsFlash(flashPath)
{
     if (MM_FlashCanPlay)
    {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="552" height="210" id="main_image_colors_final" align="middle" VIEWASTEXT>');
        document.write('<param name="allowScriptAccess" value="always" />');
        document.write('<param name="movie" value="' + flashPath +'" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="' + flashPath +'" wmode="transparent"  quality="high" bgcolor="#ffffff" width="552" height="210" name="mov_slide" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
		document.write('<a href="javascript:OpenLink();"><img src="' + sImgPath + 'casino/8m_CasinoTab_default.gif" border=0/>');    
    }
}

function AuHPshowFlash(flashPath)
{
     if (MM_FlashCanPlay)
    {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="546" height="147" id="main_image_colors_final" align="middle" VIEWASTEXT>');
        document.write('<param name="allowScriptAccess" value="always" />');
        document.write('<param name="movie" value="' + flashPath +'" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="' + flashPath +'" wmode="transparent"  quality="high" bgcolor="#ffffff" width="546" height="147" name="mov_slide" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
        document.write(' <a href="javascript:down(\'casino\');" name="rotate" id="rotate"><img id="rotateImg" src="' + sImgPath + '888-hp/main_image_casino.gif" border=0/>');    
        //rotateImages(0);
    }
}
function showFlashXmassPromo(flashPath)
{
     if (MM_FlashCanPlay)
    {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="179" height="369" id="888main_promo_xmas2008" align="middle" VIEWASTEXT>');
        document.write('<param name="allowScriptAccess" value="always" />');
        document.write('<param name="movie" value="' + flashPath +'" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="' + flashPath +'" wmode="transparent"  quality="high" bgcolor="#ffffff" width="179" height="369" name="mov_slide" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
        document.write(' <a href="javascript:OpenPromo();" name="rotate" id="rotate"><img id="rotateImg" src="' + sImgPath + '888-hp/888hp_promotion.gif" border=0/>');    
        //rotateImages(0);
    }
}

function pokerTabShowFlash(flashPath)
{
     if (MM_FlashCanPlay)
    {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="485" height="213" id="main_image_colors_final" align="middle" VIEWASTEXT>');
        document.write('<param name="allowScriptAccess" value="always" />');
        document.write('<param name="movie" value="' + flashPath +'" />');
        document.write('<param name="wmode" value="transparent" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="' + flashPath +'" wmode="transparent"  quality="high" bgcolor="#ffffff" width="485" height="213" name="mov_slide" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
    }
    else
    {
        document.write(' <a href="javascript:down(\'casino\');" name="rotate" id="rotate"><img id="rotateImg" src="' + sImgPath + '888-hp/main_image_casino.gif" border=0/>');    
        //rotateImages(0);
    }
}
function activateFlash(){
    window.open("http://www.888.com/wpc/2008/en/?"+sCut);
}


function OpeneCogra(){
    var w = 496;
    var h = 506;
    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2;
    window.open("/new888/lang/en/texts/ecogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}
function OpeneCograCasino(page){
    var w = 496;
    var h = 506;
    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2;
    if (page =='casino'){
         window.open("/new888/lang/en/texts/ecogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
    }
    else{
        window.open("/new888/lang/en/texts/888ecogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
    }
}
function OpenPCPeCogra(){
    var w = 520;
    var h = 520;
    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2;
    window.open("/new888/lang/en/texts/pcpEcogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}
function ChangeIMG(IMG,name){
    var index = name.indexOf("_o.gif");
    var sPicName="";
    if (index!=-1){
        sPicName= name.substr(0,index);
        sPicName = sPicName + ".gif"
    }
    else{
        index = name.indexOf(".gif");
        sPicName= name.substr(0,index);
        sPicName = sPicName + "_o.gif";
    }
    IMG.src = sPicName;
}

function ChangeMenuIMG(name) {
    var menuImg = document.getElementById(name);
    ChangeIMG(menuImg,menuImg.src)
}

    function ContactUs(brand)
    {
            if(brand=="casino")
                     OpenRigntNow();
            else
                     OpenRigntNowPoker();

    }
    
function Select1_onclick()
{
   
    
        var LangPath=document.getElementById("LangBox").value;
      
        if (LangPath !="none")
        {           
            if (sGoPage == "bbc_bonus")
            {
                if (LangPath == "da" || LangPath == "de" || LangPath == "en" || LangPath == "es" || LangPath == "fr" || LangPath == "it" || LangPath == "sv")
                    window.top.location.href =  "/?" + sCutLangSt + "&page=bbc_bonus&lang=" + LangPath;   
                else
                    window.top.location.href =  "/?" + sCutLangSt + "&lang=" + LangPath;           
            }        
            else
            {
                window.top.location.href =  "/?" + sCutLangSt + "&lang=" + LangPath;           
            }
        }
        
}

function timeimgs(numb)
 { // Reusable timer
    thetimer = setTimeout("imgturn('" +numb+ "')", 2000);
}

function imgturn(numb) 
{ // Reusable image turner
    if (document.images) 
    {
        var tmpMainPic = document.getElementById("main_pic");

        if (numb == "4") 
        { // This will loop the image
            tmpMainPic.src = eval("pic_04.Src");
            timeimgs('1');
        }
        else 
        { 
           tmpMainPic.src=eval( "pic_0" + numb + ".Src");
           timeimgs(numb = ++numb);
        }
    }
}

function putCookie(cookieName,cookieValue,expireMiliSeconds)
{
    var myLocation = window.location.hostname;
    var d = new Date();
    d.setTime(d.getTime() + expireMiliSeconds);
    document.cookie = cookieName + "=" + cookieValue + ";expires=" + d.toGMTString() + ";path=/";
}

/*-------------------*/

function menuOpen(src)
{
    src.className="menuOver";   
}

function menuClose(src)
{
    src.className="menuOut";
}

function ChangeIMGDwl_on()
{      
    var tmp = document.getElementById('downIMG');
    tmp.src = sImgPath+'888download_menu_o.gif';
}

function ChangeIMGDwl_off()
{
    var tmp = document.getElementById('downIMG');
    tmp.src = sImgPath+'888download_menu.gif';
}

function OpenDownBgmn(loc)
{
    var w = 802;
    var h = 602;
    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2;
    filename = "http://ndl.888.com/bg/?" + sCutNoST + "&st=256&dl="+loc;
    window.open(filename,null, "height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,resize=no,left="+l+",top="+t);
}


function PopPhoneBgmn(Content,name)
{
    var PhoneWindow
   
    var tmp = document.getElementById(name);
    if(tmp.selectedIndex!=0)
    {
        PhoneWindow = window.open('','',"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=360,height=170,left=320,top=320");
        PhoneWindow.document.write('<html><head><title>Contact Support by Telephone -888 Backgammon</title></head><body bgcolor="#4b9e3b"><table width="100%" align="center"><tr><td valign="middle"><br><a style="color:#ffffff;FONT-WEIGHT: bold;FONT-SIZE: 12px;FONT-FAMILY: Verdana;" >' + Content + '</a></td></tr></table></body></html>');
    }
}

function PopPhoneBingo(Content,name)
{
    var PhoneWindow
   
    var tmp = document.getElementById(name);
    if(tmp.selectedIndex!=0)
    {
        PhoneWindow = window.open('','',"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=360,height=170,left=320,top=320");
        PhoneWindow.document.write('<html><head><title>Contact Support by Telephone -888 Bingo</title></head><body bgcolor="#4b9e3b"><table width="100%" align="center"><tr><td valign="middle"><br><a style="color:#ffffff;FONT-WEIGHT: bold;FONT-SIZE: 12px;FONT-FAMILY: Verdana;" >' + Content + '</a></td></tr></table></body></html>');
    }
}

function Terminology(strTerm)
{
    window.document.location.href="/site2/backgammon/terminology.htm#"+strTerm;
}

function OpenBingoTutorial()
{
    var filename = "http://info.thejoyofbingo.com/howto/bingo_howto_888.php?prod=888&sr=" + sSerial;
    var w = 640;
    var h =480;
    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2;
    window.open(filename,null, "height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,resize=no,left="+l+",top="+t);
}

function OpenPacificPokerPage(path)
{
    var currentDomain = location.host;  
    var pcpDomain = "";
    if (currentDomain.indexOf("10.20.40") >  -1) 
        pcpDomain ="10.20.40.14:5500/";
    else if (currentDomain.indexOf(".stage") >  -1) 
        pcpDomain ="newstage.pacificpoker.com/";
    else if (currentDomain.indexOf(".888.com") >  -1)
    {
        if (sLang == "en")   
            pcpDomain = "www.pacificpoker.com/";
        else
            pcpDomain = sLang + ".pacificpoker.com/";
    }
   else if (currentDomain.indexOf(".dev") >  -1) 
   {
       var pos = currentDomain.indexOf(":");
       var port = currentDomain.substring(pos+1);
       var startPos = currentDomain.indexOf("casino.");
       var endPos = currentDomain.indexOf(".dev");
       pcpDomain = "newpoker." + currentDomain.substring(startPos+7, endPos) + ".dev:" + port + "/"; 
   }
   
    var fullPath = "http://" + pcpDomain + sLang + "/" + path + "?" + sCut;
        alert (fullPath);
    window.open(fullPath ,'newwindow') 
}


var t;
function scrollGame(direction) {
    changeGame(direction);
    if (direction=="right")
        t=setTimeout("scrollGame('right')",800);
    else
        t=setTimeout("scrollGame('left')",800);
}

function stopScrollGame() {
    clearTimeout(t);
}

function changeGame(direction) {

var gamesNum =5;

var gameImage = document.getElementById("bonus");
var imageName =gameImage.src;
var index = imageName.substring(imageName.indexOf("con_img")+7,imageName.indexOf("con_img")+8);


    if (direction=="right") {
        if (gamesNum-index==0) index=1;
        else index = (index-0)+1;
    }
    else if  (direction=="left") {
        if (index-1==0) index=gamesNum;
         else index = index-1;
    }
     gameImage.src= (sLook != "35") ? sImgPath+"888-hp/con_img"+index+".gif" :  sImgPath+"888-hp/con_img"+index+"_uk.gif";
}

//for 2 rows' links
function changeLinkColor(linkNum,color) {
    document.getElementById("link"+linkNum+"a").style.color = color;
    if (linkNum == '2')
        document.getElementById("link"+linkNum+"b").style.color = color;
}

function rotateImagesOld(i) {
    var t;
    var brands = new Array("casino","bingo","sport","poker");

    if (i == brands.length) i=0;

    imageCommandOld(brands[i]);
    i = i+1;
    t=setTimeout("rotateImagesOld("+ i +")",3000);
}

function imageCommandOld(brand) {
    document.getElementById("rotate").href = "javascript:downOld('"+brand+"')";
    document.getElementById("rotateImg").src = sImgPath + "main_image_" + brand+".v1.gif";
}

function downOld(brand) {

    if (brand == "casino")
        OpenDownCasino('1379');
    else if (brand=="poker")
        OpenDownPoker('1380');
    else if (brand=="bingo")
        window.open("http://www.888ladies.com/?"+sCut);
     else if (brand=="sport")
        window.open("http://www.888sport.com/bet?"+sCut);
}

function open888dayPoker()
{
    try{
                  ntptEventTag("888_tabPoker_EN");
         }
     catch(err){}
     window.open("https://emails.888.com/888day/poker/en/?" + sCut);
}

function open888dayCasino()
{
    try{
                  ntptEventTag("888_tabCasino_EN");
         }
     catch(err){}
     window.open("https://emails.888.com/888day/casino/en/?" + sCut);
}

function open888dayHomePage()
{
    try{
                  ntptEventTag("888_main_image_EN ");
         }
     catch(err){}
     window.open("http://promo.888.com/888day/en/?"+sCut);
}

function OpenBingo()
{
    try{
      ntptEventTag("ev=open_bingo_from_en");
     }
     catch(err){}
     window.open("http://www.888ladies.com?"+sCut );
}

function OpenBingoGetStarted()
{
    try{
      ntptEventTag("ev=open_bingo_from_en");
     }
     catch(err){}
     window.open("http://www.888ladies.com/skin/register.php?"+aParam+"&"+sCut );
}

function OpenBingoPromotions()
{
    try{
      ntptEventTag("ev=open_bingo_from_en");
     }
     catch(err){}
     window.open("http://www.888ladies.com/skin/promotions/promotionsTopTreats.php?"+sCut);
}

function OpenSport()
{
    try{
      ntptEventTag("ev=open_sport_from_en");
     }
     catch(err){}
     window.open("http://www.888sport.com/?"+sCut);
}

function OpenGames()
{
    try{
      ntptEventTag("ev=open_games_from_en");
     }
     catch(err){}
     var params = "lang=" + sLang + "&s=" + sSession + "&os=" + sSession +"&sr=" + sSerial +"&osr=" + sSerial + "&flag=" + sFlag + "&un=" + Unknown + "&ic=" + sIC +"&st=" + sSiteTest + "&bc=" + sBC + "&anid=" + sANID + "&se=" + sSEserial +  "&currency=" + currency;
     window.open("http://www.888games.com/?"+params);
}

/********this is for affliliate rediect ********/
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) 
			return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

function setCookie(name,value)
{
    var argv = setCookie.arguments;
    var argc = setCookie.arguments.length;
    var path = (argc > 2) ? argv[2] : null;
    var expires = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;

    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain))
}

function setRedirectStatus(value)
{
    setCookie("RedirectToCon",value,"/");
}


/*
   in case first entrence to page return -1
   in case cookie is set to 0 (no need to reidrect) return 0
   in case cookie is set to 1 (already visited the page and need to be redirected) return 1   
*/
function isRedirect()
{
    var returnValue = "-1";
    //in no cookie (first time). 
    if (getCookie("RedirectToCon") == null)
       returnValue = "-1";
    //user has cookie form previous entrence to the page.
    else if( getCookie("RedirectToCon") == '0')
        returnValue = "0";
    else if( getCookie("RedirectToCon") == '1')
        returnValue = "1";
    //alert ('returnValue=' + returnValue);
    return returnValue;
}

function redirectToCon()
{
    var bRedirectToCon = "false";  
    var bRedirect = isRedirect(); 
    //preform the test.
    if (bRedirect == "-1" && sLang == "en" && ( Number(sSerial) >=310000 &&  Number(sSerial) <= 399999 ) )
    {
        var randomnumber=Math.floor(Math.random()*9);                
        //50% raffle
        if (randomnumber < 5)
            doRedirectToCon();
        else        
            setRedirectStatus('0');        
    }
    //returned visitor that has to be redirected.
    else if (bRedirect == "1" && sLang == "en" && ( Number(sSerial) >=310000 &&  Number(sSerial) <= 399999 ) )
    {
        doRedirectToCon();
    }
    else
    {
        setRedirectStatus('0');
    }
}

function doRedirectToCon()
{
    parent.isDownload = true;//in oredr to avoid exit popup confirm.
    setRedirectStatus('1');    
    parent.window.location.href="http://www.casino-on-net.com/?" + sCut;
}

function OpenFromCasinoTab()
{
    try{
      ntptEventTag("ev=promo_888_casino_tab");
     }
     catch(err){}
     window.open("http://promo.888.com/santacruise/?"+sCut );
}

function OpenPromo()
{
    try{
      ntptEventTag("ev=promo_888hp_image");
     }
     catch(err){}
     window.open("http://promo.888.com/triplecard/?"+sCut );
}

 function OpenRegistration(rgUnknown,rl)
        {
            var w = 800;
            var h = 1000;
            var l = (window.screen.width-w)/2;
            var t = (window.screen.height-h)/2;             
        var filename = "https://www.secured-registration.com/registrationscreens/registrationscreen.aspx?lang=ENG&version=s-8-ENG&unknown=" + rgUnknown + "&orientation=4&systemnameid=0&brand=8&mode=1&platform=700&view=888UK&" + sCut;
            if (rl != '0')
            {    
                filename = filename + "&rl=" + rl;
                 try{
                  ntptEventTag("ev=open_sport_from_en");
                 }
                 catch(err){}    
            }
            window.open(filename,null,
            "height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resize=no,left="+l+",top="+t);
        }


function open_xmass()
{
    try{
      ntptEventTag("ev=promo_xmass_888_EN");
     }
     catch(err){}
     window.open("http://promo.888.com/santacruise/?"+sCut );
}
 function openpoker() {
           OpenDownPoker("1703");
}
function OpenRigntNow()
{
      //var w = 620;
      var w = 580;
      //var h = 730;
      var h = 700;
      var l = (window.screen.width-w)/2;
      var t = (window.screen.height-h)/2;
      window.open("http://888-external-en.custhelp.com/cgi-bin/888_external_en.cfg/php/enduser/std_alp.php?p_pv=1.1&p_prods=1&prod_lvl1=1","faq","resizable=no,status=no,scrollbars=yes,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}
function OpenRigntNowPoker()
{
       //var w = 620;
       var w = 580;
       //var h = 730;
       var h = 700;
        var l = (window.screen.width-w)/2;
        var t = (window.screen.height-h)/2;
        window.open("http://888-external-en.custhelp.com/cgi-bin/888_external_en.cfg/php/enduser/std_alp.php?p_pv=1.4&p_prods=4&prod_lvl1=4","faq","resizable=no,status=no,scrollbars=yes,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}

var termsVis = false;
function openExpDiv() {
    if (termsVis) {
        document.getElementById("footerTextExp").style.display='none';
        document.getElementById("expand1imgMinus").style.display='none';
        document.getElementById("expand1imgPlus").style.display='block';

        termsVis = false;
    } else {
        document.getElementById("footerTextExp").style.display='block';
        document.getElementById("expand1imgMinus").style.display='block';
        document.getElementById("expand1imgPlus").style.display='none';

        termsVis = true;
    }
}
var termsVis1 = false;
function openExpDiv1() {
    if (termsVis1) {
        document.getElementById("footerTextExp1").style.display='none';
		document.getElementById("expand2imgMinus").style.display='none';
        document.getElementById("expand2imgPlus").style.display='block';
		
        termsVis1 = false;
    } else {
        document.getElementById("footerTextExp1").style.display='block';
		document.getElementById("expand2imgMinus").style.display='block';
        document.getElementById("expand2imgPlus").style.display='none';
		
        termsVis1 = true;
    }
}