var ShowPopup = true;
var byFlag = false; //for welcome message
var PopupWindow = false; //for welcome message
var FlagAr = sFlag.split("");
if (FlagAr[0]=="1"){byFlag = true;}
if (FlagAr[0]=="3"){byFlag = true;}

 function OpenDownPoker(loc)
{
        setDownloadStatus();
                
        document.location.href = "/?page=download_short_poker&" + sCutParams + "&dl=" + loc;
        if (sLang == 'it')
            url="http://" + ItalyDomainPoker + "/PokerInstaller?" +sCutParams + "&dl="+loc;
        else
            url="http://" + sLang + ".pacificpoker.com/PokerInstaller?" +sCutParams + "&dl="+loc;

        window.open(url,"popDown","width=1,height=1,top=0,left=0");
        
        

}

function OpenDownPokerPrevious (loc,lang)
{

        if (lang=="es"){
           url="http://setupspcp1.888.com/setups/support/full/es/10.3008/pacificpokersetup.exe" ;  
        }
        if (lang=="da"){
           url="http://setupspcp1.888.com/setups/support/full/da/10.1511/pacificpokersetup.exe";  
        }    
        if (lang=="fr"){
           url="http://setupspcp1.888.com/setups/support/full/fr/10.1505/pacificpokersetup.exe" ;  
        }
        if (lang=="it"){
           url="http://setupspcp1.888.com/setups/support/full/it/10.1506/pacificpokersetup.exe" ;  
        }  
           if (lang=="en"){
           url="http://www.pacificpoker.com/PokerInstaller?" + sCutParams + "&dl="+loc;
        }
        setDownloadStatus();
        
        window.open(url,"popDown","width=1,height=1,top=0,left=0");
        document.location.href = "/?page=download_short_poker&" + sCutParams;
}





function DetectUK(path,loc) //for welcome message
{
    OpenDownCasino(loc);
}

function changeImage(class_postfix, id, class_name)
{
    var tmpMainPic = document.getElementById(id);    
    tmpMainPic.className=class_name + class_postfix;
}

function ContactUs()
{
        var w = 793;
        var h = 517;
        var l = 1; 
        var t = 1; 

        var LocationString= "http://www.pacificpoker.com/?page=contactus&flag=1100";
        var x = window.open(LocationString,"contactUsWnd","status=no,toolbar=no,menubar=no,location=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h)   
}