function OpenDownPoker(loc)
{
        parent.isDownload = true;
        url="http://es.pacificpoker.com/PokerInstaller?" + sCut + "&dl="+loc;
        window.open(url,"popDown","width=1,height=1,top=0,left=0");
        document.location.href = "/new888/home.htm?page=download_short_poker&" + sCut;      
}

function NoDownUK(ver,loc)
{
   openGame('1',loc)
}

function OpeneCograEs()
{
        var w = 496;
        var h = 506;
        var l = (window.screen.width-w)/2;
        var t = (window.screen.height-h)/2;
        window.open("/new888/lang/es/texts/ecogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}

function changeImage(class_postfix, id, class_name)
{
    var tmpMainPic = document.getElementById(id);    
    tmpMainPic.className=class_name + class_postfix;
}

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";

    window.open(filename + "?" + sCut ,null,
    "height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,resize=no,left="+l+",top="+t);
}
// patch for OpenGame
var serial = sSerial;
function OpenCasino(location)
{
        sCut = sCut+ '&dl=' + location;
        var UKWindow="";
        var windowY = ((screen.availHeight-561)/2);
        var windowX = ((screen.width-804)/2);
        parent.isDownload = true;
        if (sIC !="0")
        {
                if(UKWindow){UKWindow.close();}
                UKWindow = window.open("/ukpopup.htm?" + sCut ,"Offline","width=795,height=545,left="+windowX+",top="+windowY+",resizable=no,status=no,scrollbars=no,toolbar=no,menubar=no");
        }
        else
        {
            //function code in nodownload_js.htm
            openGame('1',location);
        }
}



function OpenInfo(sLang)
{
    var w = 405;
    var h = 252;
    var LocationString;
    var l = (window.screen.width-w)/2 - 12;
    var t = (window.screen.height-h)/2 - 12;
    var windowprops = "location=no,status=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
    var filename = "http://www.pacificpoker.com/pokerinfo.htm" + "?lang=" + sLang;
    var pokerinfo = window.open(filename,"PokerInfo",windowprops);
}

function menuOpen(src)
{
    src.className="menuOver";   
}

function menuClose(src)
{
    src.className="menuOut";
}

function Download(loc)
{
    OpenDownCasino(loc);
}

function ChangeIMG(IMG,name)
{

    var index = name.indexOf("-over.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 + "-over.gif";
   }


    IMG.src = sPicName;

}
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 OpenSport()
{
    try{
      ntptEventTag("ev=open_sport_from_es");
     }
     catch(err){}
     window.open("http://www.888sport.com/?"+sCut);
}


function open_xmass()
{
    try{
      ntptEventTag("ev=promo_xmass_888_ES");
     }
     catch(err){}
     window.open("http://promo.888.com/santacruise/es/?"+sCut );
}

function OpenRightNow()
{
     var w = 582;
     var h = 702;
     var l = (window.screen.width-w)/2;
     var t = (window.screen.height-h)/2;
     window.open("http://888-external-es.custhelp.com?p_pv=1.1&p_prods=1","faq","resizable=no,status=no,scrollbars=yes,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}

function OpenRightNowPoker()
{
      var w = 582;
      var h = 702;
      var l = (window.screen.width-w)/2;
      var t = (window.screen.height-h)/2;
      window.open("http://888-external-es.custhelp.com?p_pv=1.4&p_prods=4","faq","resizable=no,status=no,scrollbars=yes,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}