var ShowPopup = true;
parent.sExit = "Find out now why everyone is playing Poker - at Pacific Poker!";
CorentLang = 'de';
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)
{
        setDownloadStatus();  
        document.location.href = "http://www.pacificpoker.com/de/download_short.htm?" + sCut ;
        url="http://www.pacificpoker.com/PokerInstaller?" +sCut + "&dl="+loc;
        window.open(url,"popDown","width=1,height=1,top=0,left=0");
}


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 ContactUs(brand)
{
        var w= (window.screen.width-2);
        var h = (window.screen.height-2);
        var locationString="http://de.pacificpoker.com/de/online-poker-help/contact--3,4.htm?" + sCut;
        window.open(locationString,"888com","resizable=yes,status=yes,location=yes,scrollbars=auto,toolbar=yes,menubar=yes,left=0,top=0,width=" + w + ",height=" + h);
}

function Select1_onclick()
{
        var LangPath=LangBox.value; 
        LangBox.selectedIndex=1;
        if (LangPath !="none")
        { 
                  window.top.location.href =  "/?" + sCutLang + "&lang=" + LangPath;           
        }        
}

function openPage(pageName)
{
        var w= (window.screen.width-2);
        var h = (window.screen.height-2);
        var locationString="/?page=" + pageName + "&" + sCut;
        window.open(locationString,"888com","resizable=yes,status=yes,location=yes,scrollbars=auto,toolbar=yes,menubar=yes,left=0,top=0,width=" + w + ",height=" + h);
}

function openPageSite2(pageName)
{
      var w= (window.screen.width-2);
        var h = (window.screen.height-2);
        if (pageName=='about' ){
              var locationString="http://de.pacificpoker.com/de/online-poker-fairness/aboutus--4,4.htm?" + sCut;
        }
       if (pageName=='gettingstarted' ){
              var locationString="http://de.pacificpoker.com/de/playing-poker-online/download-and-install--1.htm?" + sCut;
        }
        window.open(locationString,"888com","resizable=yes,status=yes,location=yes,scrollbars=auto,toolbar=yes,menubar=yes,left=0,top=0,width=" + w + ",height=" + h);
}

function openPageLocal(pageName,promotions)
{
        var w= (window.screen.width-2);
        var h = (window.screen.height-2);
        var locationString=pageName + "?" + sCut + "&promotions=" + promotions;
        window.location.href=locationString;
}

function addParams(a)
{
    
    //because players club opens in a new window we must not
    //concatinate parameters if it already has ones.
    if(a.href.indexOf("playersclub.888")==-1 ||  a.href.indexOf("?")==-1)
    {
        if(a.href.lastIndexOf("/") ==  a.href.length -1)
            a.href+="?" + sCut;
        else
            a.href+="&" + sCut;
    }
}

function addParamsLocal(a)
{
    a.href+="?" + sCut;
}

function OpenPlayersClub(brand)
{       
    var w= (window.screen.width-5);
    var h = (window.screen.height-5);
    if (brand=='casino')    
        window.open("http://playersclub.888.com/?" + sCut,"888PlayersClub","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes,left=0,top=0,width=" + w + ",height=" + h);
    else if (brand=='poker')    
        window.open("http://playersclub.pacificpoker.com/?" + sCut,"PacificPokerPlayersClub","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes,left=0,top=0,width=" + w + ",height=" + h);
}
