
   function OpenAndDownload(location,brandName)
{
    try {
        ntptAddPair("dl",location);
        ntptEventTag("ev=download_" + brandName);
     }catch(err){}
    //this to avoid javascript errors in SWOT pages
     try {
     setDownloadStatus();
    }catch(err){} 
    var sURLreg = "/it/downloadclient.htm?"+ "dl=" + location + "&DownloadBrand=" + brandName;
    window.open(sURLreg,"popDown","width=1,height=1,top=0,left=0");

    if (brandName == "poker")
          window.open("http://www.pacificpoker.com/en/download_short.htm");
    else if (brandName == "casinog2")
           window.open("http://www.888.com/?page=download_short");
    else if (brandName == "towertorneosg2")
           window.open("http://www.888.com/?page=download_short");
}

function setDownloadStatus()
{
    setCookie("downloaded","1","/");
}




   var nav = navigator.appVersion;
var  isIE = "0"
if (nav.indexOf("IE")>0)
  isIE = "1";   

 function openLangs() {
         if(document.getElementById){
          var el = document.getElementById('langs');
          if(el.style.display != "block"){    
             el.style.display = "block";
             el.style.top = "16px";
             el.style.left = "67px";
          }else{
             el.style.display = "none";
           }
        }
    }
    
    function changeColor(obj,status) {
        if (status=="on") {
            obj.style.background = '#333333';
            obj.style.color = '#ffffff';
        } else {
             obj.style.background = '#444444';
            obj.style.color = '#989898';
         }
     }    
     
                       
     function closeList(event) 
     {
          if (isIE == 1)
          {
            if(event.srcElement.id == "langs")
            {
              var langs = document.getElementById('langs');
              langs.style.display = "none";
            }
          }
          else
          {
              var langs = document.getElementById('langs');
              langs.style.display = "none";
          }
      }


   function OpeneCogra()
{
    var w = 493;
    var h = 503;

    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2;
    window.open("http://www.888.com/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 OpenPokerDownload(sCut)
{
     document.location.href ="http://www.pacificpoker.com/en/download_short.htm?"+"&dl=1053";
     window.open( "/http://www.pacificpoker.com/PokerInstaller?lang=en&" + "&dl=1053", "popupDown","width=1,height=1,top=0,left=0");
}


function ContactUs()
{

        var w = 793;
        var h = 517;
        var LocationString = "";
            LocationString = "http://www.pacificpoker.com/en/contactusform/contactus.htm";
        var l = 1; //(window.screen.width-w)/2;
        var t = 1; //(window.screen.height-h)/2;
        window.open(LocationString,"contactUsWnd","status=no,toolbar=no,menubar=no,location=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h)

}

