// BEGIN: Unica Page Tag 
function IncludeJavaScript(jsFile)
{
    document.write('<script type="text/javascript" src="'+ jsFile + '"></script>'); 
}
IncludeJavaScript('/clientscripts/unica/ntpagetag.js');
// END Unica Page Tag 


var windPop = null;

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 langForEnNDL(lang)
{
    var langArray = ['bg', 'cs', 'da', 'et', 'el', 'it', 'jp', 'lv', 'lt', 'hu', 'nl', 'pl', 'pt', 'ro'];
    for (var i=0; i<langArray.length; i++) 
    {
        if (langArray[i] == lang)
            return true;
    }
    return false;
}
    
function langForEntrypop(lang)
{
    var langArray = ['en','de','pt','es'];
    for (var i=0; i<langArray.length; i++) 
    {
        if (langArray[i] == lang)
            return true;
    }
    return false;
}

function openGame(Status,location)
{       

    var w = 795;
    var h = 545;
    var LocationString;
    var l = (window.screen.width-w)/2;
    var t = (window.screen.height-h)/2;
    
    var DownScut = getParams(location);
   
    var filename = "";   
    if (sLang == "es" || sLang == "de" || sLang == "fr" || sLang == "en" || sLang == "ru")
        LocationString = "http://ndl.888.com/poker/flashpoker_real/application/RLFLashPoker.html?langid=" + sLang + "&brand=1&skin=4&" + DownScut;
    else if (langForEnNDL(sLang))
        LocationString = "http://ndl.888.com/poker/flashpoker_real/application/RLFLashPoker.html?langid=en&brand=1&skin=4&" + DownScut; 
    else
        LocationString = "http://ndl.888.com/poker/flashpoker_real/application/RLFLashPoker.html?langid=" + sLang + "&brand=1&skin=0&" + DownScut;
                                  
    if (window.screen.availWidth==800)
    {
            l = 0;
            t = 0;
            w = window.screen.availWidth;
            h = window.screen.availHeight;
    }
    
	reportOptimizer();
	
    var windowprops = "location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
    var popup = window.open(LocationString,"PokerGame",windowprops);
}

function Terminology(strTerm)
{
    var sLang=getLang();
    if (sLang == 'de' || sLang == 'en' || sLang == 'es' || sLang == 'pt' || sLang == 'nl' || sLang == 'el' || sLang == 'lv' || sLang == 'ru' || sLang == 'pl' || sLang == 'cs' || sLang == 'et')
        window.document.location.href="../terminology--2,7.htm#"+strTerm;
    else
        window.document.location.href="../terminology--2,6.htm#"+strTerm;
}


function PokerTutorial(dl)
{
        var w = 794;
        var h = 530;
        //var l = (window.screen.width-w)/2;
        //var t = (window.screen.height-h)/2;
        var Location;
        //204.92.99.140
        Location = "http://standalone.888.com/pokertutorial/pokertutorial.htm?"+ GetsCut('') +"&dl="+dl;
        window.open(Location,"","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=0,top=0,width=" + w + ",height=" + h);
}

function check_mail(str)
{
        var myRegExp = /^([a-zA-Z0-9_\-])+([a-zA-Z0-9_\.\-])*\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})$/
        if( ! str.match( myRegExp ) )
        {
                return false
        }
        return true
}
        
function check_name(str)
{
        var myRegExp = /^[^;~\^&\*!<>"\/|%\?@$0-9\+=\{\}\(\)\[\]\\]*$/ 
        if( ! str.match( myRegExp ) )
                return false

        return true
}

function check_str(str)
{
        var myRegExp = /^[^;~\^&\*!<>"\/|%\?@$\+=\{\}\(\)\[\]\\]*$/
        if( ! str.match( myRegExp ) )
                return false

        return true
}

function check_num(str)
{
        var myRegExp = /^[0-9]{4,9}$/
        if( ! str.match( myRegExp ) )
                return false

        return true
}

function check_phonenum(str)
{
    if(str ==  "")
        return  true
     else
     {
        var myRegExp = /^[0-9\-]{1,20}$/
        if( ! str.match( myRegExp ) )
                return false
     }
    return true
}

if (window.addEventListener) // for fire fox add event for scroll
{
    window.addEventListener("DOMMouseScroll", window_onscroll, true); 
//      window.addEventListener("load", setPosition, true); 
}
var scrollID = "divDownload";

function window_onscroll()
{
    var scrollDiv = document.getElementById("scrollDiv");
    if (scrollDiv)
    {
        var pictTop = getPosY(scrollDiv);
    }
    if (navigator.appName=="Netscape")
    {
       if(document.getElementById(scrollID))
        {
                var newTop=document.body.scrollTop+50;
                if (newTop>pictTop)
                {
                 
                        document.getElementById(scrollID).style.top=newTop;
                        document.getElementById(scrollID).style.position="absolute"
                }
                else
                {
                        window.document.getElementById(scrollID).style.top=pictTop;
                }
                setTimeout("window_onscroll()",5000);
        } 
    }
    else
    {
        if(document.all && document.getElementById) //added for IE4
        {
            if(document.getElementById(scrollID))
                    {
                            var newTop=document.body.scrollTop+20;
                            if (newTop>pictTop)
                            {
                                    document.getElementById(scrollID).style.top=newTop;
                            }
                            else
                            {
                                    window.document.getElementById(scrollID).style.top=pictTop;
                            }
                    }
        }
        else if(document.all && !document.getElementById) //added for IE4
        {
            if(document.all[scrollID])
                document.all[scrollID].style.top=document.body.scrollTop+pictTop;
        }
    }
}

function setPosition()
{
    var divDownload = document.getElementById("divDownload");
    var scrollDiv = document.getElementById("scrollDiv");
    var isFirefox = 0;
    if (sUserAgent.indexOf("Firefox")>0)
        isFirefox = 1;
    if( document.getElementById && divDownload !=null)
    {
        //var picLeft = getPosX(scrollDiv);
        divDownload.style.position = "absolute";
        var pos;
        if (isFirefox)
        {
            if (sLang=="en" || sLang=="et"  || sLang=="lv"  || sLang=="el" || sLang=="ru" || sLang == "bg"){
                pos = (document.body.offsetWidth - 770)/2;
            }else{
                pos = (document.body.offsetWidth - 770)/2 + 15;
            }
        }
        else
        {
            if (sLang=="en" || sLang=="et"  || sLang=="lt"  || sLang=="lv"  || sLang=="ru" || sLang=="cs" || sLang=="hu" || sLang=="pl" || sLang=="jp" || sLang=="ro" || sLang=="bg" || sLang=="el" ){
                pos = (document.body.offsetWidth - 770)/2 - 10 ;
            }else if (sLang=="da" || sLang=="de" || sLang=="es" || sLang=="fr" ||sLang=="it" || sLang=="nl" || sLang=="pt" || sLang=="sv"){
                 pos = (document.body.offsetWidth - 770)/2 + 6;
            }else{
                pos = (document.body.offsetWidth - 770)/2 + 4 ;
            }
        }
        if(pos < 10){pos=10;}
       divDownload.style.left = pos;             
    }  
     if (navigator.appName=="Netscape")
    {
       window_onscroll();
    }
}

function getPosY(obj)
{
    var curtop = 0;
    while (obj.offsetParent)
    {
      curtop += obj.offsetTop;
      obj = obj.offsetParent;
    }

    return curtop;
}

function getPosX(obj)
{
    var curleft = 0
    while (obj.offsetParent)
    {
      curleft += obj.offsetLeft
      obj = obj.offsetParent;
    }
   
    return curleft
}

function changeSR(newSr)
{
    setCookie("cookieSr",newSr,"/");
    setCookie("cookieSrChanged",newSr,"/");
}

function isSrChanged()
{
    var cookieSr = getCookie("cookieSr")
    if(cookieSr)
        return true;
    
    return false;
}

function setDownloadStatus()
{
    setCookie("downloaded","1","/");
}

function isDownload()
{
    if( getCookie("downloaded") )
        return true;
    return false;
}

function isLangChanged()
{
    var cookieLang = getCookie("langChanged");
    if(cookieLang == '1')
        return true;
    else
        return false;
}

function isShowEntryPopup()
{
    if( getCookie("showPopup") )
        return true;
    return false;
}

var ShowPopup = true;

function mouseDown()
{
    var theEvent = window.event || arguments.callee.caller.arguments[0];
    var ref = "";
    var srcEl = theEvent.srcElement || theEvent.target;
     //this is an hack for the menu - not to display message
    if (srcEl.className=="subon" && srcEl.nodeName=="TD"  && srcEl != null )
    {
        ShowPopup = false;
        return;
    }
    //check if the element that was pressed was an anchor
    while ((srcEl != null) && (srcEl.tagName != "A") && (srcEl.tagName != "AREA") && (srcEl.tagName != "BODY"))
            srcEl = srcEl.parentElement || srcEl.parentNode;
   
    if ((srcEl.tagName == "A") || (srcEl.tagName == "AREA") &&(srcEl != null))
    {
        ShowPopup = false;
    }
   
}

function beforeUnload()
{  
    if (ShowPopup)
    {
        OpenExitPage();
    }   
}

function openPokerSchool()
{
    var w = (window.screen.width-5);
    var h = (window.screen.height-10);
    var Location;
    Location = "http://school.pacificpoker.com/?"+ GetsCut('');
    window.open(Location,"_blank","");
}

function OpenExitPage()
{
    if ( "undefined" == typeof(sFlag) || null == sFlag) {
        return false;
    }
        
    var FlagAr = sFlag.split("");
     if(!document.layers && isDownload()== false && isLangChanged()==false)
    {
            var sLang = getLang();
            
            
            if(bExitToCON)
            {                    
                    var fileName = "/" + sLang + "/exitpage.htm";
                    var w = 770;
                    var h = 485;
                    var l = (window.screen.width-w)/2;
                    var t = (window.screen.height-h)/2;            
                    window.open(fileName,'ExitPage',"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,height=" + h + ",width=" + w + ",left="+l+",top="+t);
            }
             else  if(FlagAr[3]=="3")
            {            
                var w = 800;
                var h = 600;
                var l = (window.screen.width-w)/2;
                var t = (window.screen.height-h)/2;
                window.open('/exitpage.htm?'+sCut,'ExitPage',"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,height=" + h + ",width=" + w + ",left="+l+",top="+t);
            }   
            else if(FlagAr[3]=="4")
            {
                    var w = 788;
                    var h = 364;
                    var l = (window.screen.width-w)/2;
                    var t = (window.screen.height-h)/2;
                    window.open('http://www.littlewoodspoker.com/webpagesincludes/exit.htm?'+sCut,'ExitPage',"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,height=" + h + ",width=" + w + ",left="+l+",top="+t);
            }
            /*else if(!arrFlags3)
            {                                
                if ( sLang=="et" )
                    window.open('http://wsop.888poker.com/wsop/ee/8ways.htm?' + sCutLang);
                else if ( sLang=="cs" )    
                    window.open('http://wsop.888poker.com/wsop/cz/8ways.htm?' + sCutLang);
                else    
                    window.open('http://wsop.888poker.com/wsop/' + sLang + '/8ways.htm?' + sCutLang);         
           }  */
		   
    }
}

function langChange()
{
        if (document.all.LangBox.value!="none")
        {   
           setCookie("langChanged","1","/");
           var tmpLocation = "";
           if (document.all.LangBox.value == 'en')
           {
                tmpLocation = "http://www.pacificpoker.com/?lang=en";
           }
           else
           {
             tmpLocation = "http://" + document.all.LangBox.value + ".pacificpoker.com";
           }
           top.location.href=tmpLocation;
        }       
}

function affiliates(lang,trcode)
{
  window.open("http://affiliates.888.com/?lang="+lang+"&trcode="+trcode+"&sr="+getSR(),"_blank","");
}

function rewards()
{
  window.open("http://www.888poker.com/rewards/introduction/?" + sCut,"_blank","");
}

function MeettheVIPTeam()
{
  window.open("http://www.888poker.com/vip/meet-the-vip-team.htm?" + sCut,"_blank","");
}

function openPageinNewWin(url)
{
  var pageUrl = url + "?" + sCut;
  window.open(pageUrl,"_blank","");
}


function OpeneCogra()
{
    var w = 493;
    var h = 503;
    //if( sLang == "fr" ){w = 530;      h = 557;}       
    //else if( sLang == "it" ){w = 530;h = 565;}
    //else if( sLang == "es" ){w = 525;h = 585;}
    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 OpeneCograPT()
{
        var w = 520;
        var h = 520;
        //if( sLang == "fr" ){w = 530;  h = 557;}       
        //else if( sLang == "it" ){w = 530;h = 565;}
        //else if( sLang == "es" ){w = 525;h = 585;}
        var l = (window.screen.width-w)/2;
        var t = (window.screen.height-h)/2;
    window.open("http://www.888.com/new888/lang/" +"pt" + "/texts/pcpEcogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
}

function openSponsorships(lang)
{   
    var Location;
    if (lang == 'en')
        Location = "http://www.888.com/site2/casino/sponsorships.htm?"+ GetsCut('');
    else if (lang=='de')
        Location = "http://de.888.com/de/casino/ausponsoring.htm?" + GetsCut('');
    else    
        Location = "http://www.888.com/?page=sponsorships&"+ GetsCut('');
    window.open(Location,"_blank","");
}

function DownloadPt(location,lang)
{
	reportOptimizer();
	
     window.open( "/PokerInstaller?lang=" + lang + "&" +  getsCutLang() +  "&dl=" + location, "popupDown","width=1,height=1,top=0,left=0");
     window.location.href = "/pt/download_short.htm?dl=" + location;
}


function OpenPokerDownload(sCut)
{
//Demo Only client
//    document.location.href ="http://free-888.com/en/download_poker.htm?"+sCut+"&dl=1053";
//    window.open("http://www.free-888r.com/PokerInstaller?Real=1&" + sCut + "&dl=1053","popDown","width=1,height=1,top=0,left=0");
    
	reportOptimizer();
	
     document.location.href ="http://www.pacificpoker.com/en/download_short.htm?"+sCut+"&dl=1053";
     window.open( "/PokerInstaller?lang=en&" +  getsCutLang() +  "&dl=1053", "popupDown","width=1,height=1,top=0,left=0");
}


function openTermsGift(id)
{
    var terms=document.getElementById("terms" + id); 
    terms.style.display="inline"; 
    var termsLabel=document.getElementById("openterms" + id); 
    termsLabel.style.display="none"; 
}

function closeTermsGift(id)
{
    var terms=document.getElementById("terms" + id); 
    terms.style.display="none"; 
    var termsLabel=document.getElementById("openterms" + id); 
    termsLabel.style.display="inline"; 
}

//foe pwc reports (iTech)
function ShowPdfReport(Val,sImgPath)
{
    if(Val != "0")
    {
        var tmpObj= document.getElementById("ReportImg");
        tmpObj.src=sImgPath + "/images/pwc/pwc_" + Val + ".gif";
        tmpObj.height=800;
        tmpObj.width=580;   
    }
}

function openItechReport(Val)
{
     if (Val == 'Jun07' || Val == 'May07' || Val == 'Apr07' || Val == '043007' || Val == '033007' || Val == '023007')
    {
        var url="http://www.itechlabs.com.au/certificates/Cassava/CON_audit_report_" + Val + ".pdf";
        window.open(url,"itech","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes");

        var tmpObj= document.getElementById("textLink");
        tmpObj.href="http://www.itechlabs.com.au/certificates/Cassava/CON_audit_report_" + Val + ".pdf";  
     }
     else
    {
        var url="http://www.itechlabs.com.au/certificates/Cassava/Cassava_RTP_audit_report_" + Val + ".pdf";
        window.open(url,"itech","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes");
    
        var tmpObj= document.getElementById("textLink");
        tmpObj.href="http://www.itechlabs.com.au/certificates/Cassava/Cassava_RTP_audit_report_" + Val + ".pdf";     
    }
}


function openItechQReport(Val)
{
    if(Val != "0") {

    var url="http://www.itechlabs.com.au/certificates/Cassava/RNG_report_" + Val + ".pdf";
    window.open(url,"itech","resizable=yes,status=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes");
    
    var tmpObj= document.getElementById("textLink");
    tmpObj.href="http://www.itechlabs.com.au/certificates/Cassava/RNG_report_" + Val + ".pdf";    
    }
}

function openPrintVersion(lang)
 {
        var w = 795;
        var h = 620;
        var LocationString;
        var l = (window.screen.width-w)/2;
        var t = (window.screen.height-h)/2;

        var filename = "";
        LocationString = "/" + lang + "/online-poker-help/money-transfers-Internal-Table-ForPrint.htm";

        if (window.screen.availWidth==800)
        {
                l = 0;
                t = 0;
                w = window.screen.availWidth;
                h = window.screen.availHeight;
        }

        var windowprops = "location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
        var popup = window.open(LocationString,"PokerGame",windowprops);
    
    
    }


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 ChangeMenuIMG(name) {
    var menuImg = document.getElementById(name);
    ChangeIMG(menuImg,menuImg.src)
}

function OpenDownCasino(dl)
{
	reportOptimizer();

    window.open("http://www.888.com/?page=download_short&"+sCut);
    window.open("http://www.888.com/CasinoInstaller?" + sCut +"&dl=" + dl,"popDown","width=1,height=1,top=0,left=0");
}


var lastTD = "";
function onmouseOverDiv(obj,className)
{
        obj.style.display = 'block';
        lastTD.className = className;
}
function onmouseOutDiv(obj,className)
{
        obj.style.display = 'none';
        lastTD.className = className;
}
function showSubMenu(objTd , name)
{
        lastTD=objTd;  // last td on menu bar
        var objDiv = document.getElementById (name);
        objDiv.style.display = (objDiv.style.display == "none" || objDiv.style.display == "")? "block" : "none";
        objDiv.style.left = getPosX(objTd) + "px";
        objDiv.style.top = getPosY(objTd)  + objTd.offsetHeight;
        objDiv.style.zIndex = 9;        
}
function hideMenu(name)
{
        var objDiv = document.getElementById (name);
        objDiv.style.display = "none";
}
function getPosX(obj)
{
        var curleft = 0;
        while (obj.offsetParent)
        {
          curleft += obj.offsetLeft;
          obj = obj.offsetParent;
        }
        return curleft;
}
function getPosY(obj)
{
        var curtop = 0;
        while (obj.offsetParent)
        {
          curtop += obj.offsetTop;
          obj = obj.offsetParent;
        }
        return curtop;
}
function changeColor(obj,color)
{
    var ob=document.getElementById(obj);
    if(ob != null)
    {
        ob.style.backgroundColor = color;
    }
}
function displayObj(element) 
{
    document.getElementById("cll=ssna");
}
function nextPage(id)
 {
     for( var i=1; i<=35;i++)
    {
        var current = document.getElementById('page'+i);
        current.style.display='none';
      }

      var next = document.getElementById('page'+id);
      next.style.display='block';
}



//For Registration test:
function openReg(rl) {
    
    setDownloadStatus();
    var isUnknown = "1";
    if (unknown == "false")
        isUnknown = "0";

   LocationString = "https://reg.888.com/registrationscreens/registrationscreen.aspx?"+sCutLang+"&RL=" +rl+ "&version=p-1-ENG&brand=1&orientation=2&mode=3&platform=700&Lang=ENG&unknown="+isUnknown;
    l = 0;
    t = 0;
    w = 800;
    h = window.screen.height-100;//750;    

	reportOptimizer();
	
    var windowprops = "location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
    var popup = window.open(LocationString,"PokerGame",windowprops);
    popup.focus();
}
function OpenRigntNow()
{
     var url = "http://888-external-en.custhelp.com/app/home/prod/4/";
    var langsArr = ['es','fr','nl','de','fr','it'];
    for (i in langsArr)
    {
        if (sLang == langsArr[i])
        {
            url = "http://888-external-" + sLang +".custhelp.com/app/home/prod/4/";
        }
    }
    windowFeatures = "scrollbars=1,top=0,left=0,resizable=yes,width="+(screen.width)+",height="+(screen.height); 
    newWindow=window.open(url,'faq',windowFeatures)
    newWindow.focus();  
}
   
function openPromotions()
{
  window.location.href="/" + getLang() + "/promotions/all-promotions--7,1.htm";
}


function ShowBanner(banner)
{
    var myCode= getsANID()+ "i" + banner;
    var myCut = "lang=" + sLang + "&s=" + sSession + "&sr=" + getSR() + "&st=" + sSiteTest + "&ic=" + sIC + "&bc=" + sBC + "&se=" + sSESerial;
    var location = "/PokerInstaller?"+ myCut + "&anid=" + myCode;
    document.location.href = "/" + getLang() +  "/download_short.htm?" + myCut + "&anid=" + myCode;
    window.open(location,"popDown","width=1,height=1,top=0,left=0");
}

var termsVis = false;
function openExpDiv() {
    if (termsVis) {
		document.getElementById("expander").innerHTML="+";		
        document.getElementById("footerTextExp").style.display='none';
        termsVis = false;
    } else {
		document.getElementById("expander").innerHTML="&#8722";
        document.getElementById("footerTextExp").style.display='block';
        termsVis = true;
    }
}

var termsVis2 = false;
function openExpDiv2() {
    if (termsVis2) {
        document.getElementById("footerTextExp").style.display='none';
        document.getElementById("expand1imgMinus").style.display='none';
        document.getElementById("expand1imgPlus").style.display='inline';

        termsVis2 = false;
    } else {
        document.getElementById("footerTextExp").style.display='block';
        document.getElementById("expand1imgMinus").style.display='inline';
        document.getElementById("expand1imgPlus").style.display='none';

        termsVis2 = true;
    }
}
var termsVis3 = false;
function openExpDiv3() {
    if (termsVis3) {
        document.getElementById("footerTextExp3").style.display='none';
        document.getElementById("expand2imgMinus").style.display='none';
        document.getElementById("expand2imgPlus").style.display='inline';

        termsVis3 = false;
    } else {
        document.getElementById("footerTextExp3").style.display='block';
        document.getElementById("expand2imgMinus").style.display='inline';
        document.getElementById("expand2imgPlus").style.display='none';

        termsVis3 = true;
    }
}
/*for entry popup test in En home page*/
function getParams(loc) {			   
        return "lang=" + sLang + "&sr=" + sSerial + "&anid=" + sANID + "&ic=" + sIC + "&se=" + sSESerial +"&dl=" + loc + getDlp();
}

function getDlp() {
  var dlp = '';
  
  try {
    dlp = encodeURIComponent(document.location.href);
    dlp = dlp.replace(/\./gi, "%2E");
  }
  catch (err) { }
  
  return (dlp != '' ? ('&dlp=' + dlp) : '');
}

function sendUnicaEvent(msg)
{
      try 
      {
         ntptEventTag("ev=" + msg);
      }
      catch(err){}
}

function openNoDownload(loc)
{       
 
   openGame('1',loc);
}


function openDownload(loc)
{
    Download(loc);
}
/**************************************************
 * dom-drag.js
 * 09.25.2001
 * www.youngpup.net
 * Script featured on Dynamic Drive (http://www.dynamicdrive.com) 12.08.2005
 **************************************************
 * 10.28.2001 - fixed minor bug where events
 * sometimes fired off the handle, not the root.
 **************************************************/

var Drag = {

	obj : null,

	init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
	{
		o.onmousedown	= Drag.start;

		o.hmode			= bSwapHorzRef ? false : true ;
		o.vmode			= bSwapVertRef ? false : true ;

		o.root = oRoot && oRoot != null ? oRoot : o ;

		if (o.hmode  && isNaN(parseInt(o.root.style.left  ))) o.root.style.left   = "0px";
		if (o.vmode  && isNaN(parseInt(o.root.style.top   ))) o.root.style.top    = "0px";
		if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right  = "0px";
		if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";

		o.minX	= typeof minX != 'undefined' ? minX : null;
		o.minY	= typeof minY != 'undefined' ? minY : null;
		o.maxX	= typeof maxX != 'undefined' ? maxX : null;
		o.maxY	= typeof maxY != 'undefined' ? maxY : null;

		o.xMapper = fXMapper ? fXMapper : null;
		o.yMapper = fYMapper ? fYMapper : null;

		o.root.onDragStart	= new Function();
		o.root.onDragEnd	= new Function();
		o.root.onDrag		= new Function();
	},

	start : function(e)
	{
		var o = Drag.obj = this;
		e = Drag.fixE(e);
		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
		o.root.onDragStart(x, y);

		o.lastMouseX	= e.clientX;
		o.lastMouseY	= e.clientY;

		if (o.hmode) {
			if (o.minX != null)	o.minMouseX	= e.clientX - x + o.minX;
			if (o.maxX != null)	o.maxMouseX	= o.minMouseX + o.maxX - o.minX;
		} else {
			if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
			if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
		}

		if (o.vmode) {
			if (o.minY != null)	o.minMouseY	= e.clientY - y + o.minY;
			if (o.maxY != null)	o.maxMouseY	= o.minMouseY + o.maxY - o.minY;
		} else {
			if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
			if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
		}

		document.onmousemove	= Drag.drag;
		document.onmouseup		= Drag.end;

		return false;
	},

	drag : function(e)
	{
		e = Drag.fixE(e);
		var o = Drag.obj;

		var ey	= e.clientY;
		var ex	= e.clientX;
		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
		var nx, ny;

		if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
		if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
		if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
		if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);

		nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
		ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));

		if (o.xMapper)		nx = o.xMapper(y)
		else if (o.yMapper)	ny = o.yMapper(x)

		Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
		Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
		Drag.obj.lastMouseX	= ex;
		Drag.obj.lastMouseY	= ey;

		Drag.obj.root.onDrag(nx, ny);
		return false;
	},

	end : function()
	{
		document.onmousemove = null;
		document.onmouseup   = null;
		Drag.obj.root.onDragEnd(	parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), 
									parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
		Drag.obj = null;
	},

	fixE : function(e)
	{
		if (typeof e == 'undefined') e = window.event;
		if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
		if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
		return e;
	}
};

/**************************************************
end dom-drag.js
 **************************************************/
 /**************************************************
AjaxController.js
 **************************************************/
 //function getJacks(tree)
//{
//    alert("in ajax getJacks");
//}
function getPokerActiveTables()
{
// Obtain an XMLHttpRequest instance
  var req = newXMLHttpRequest();
  //alert(req);
  var host = window.location.host;
  // Set the handler function to receive callback notifications
  // from the request object
  var handlerFunction = getReadyStateHandlerActiveTables(req,create);
  req.onreadystatechange = handlerFunction;

  // Open an HTTP POST connection to the shopping cart servlet.
  // Third parameter specifies request is asynchronous.
  
  req.open("POST", "http://" + host + "/PokerInfo", true);

  // Specify that the body of the request contains form data
  req.setRequestHeader("Content-Type", 
                       "application/x-www-form-urlencoded");

  // Send form encoded data stating that I want to add the 
  // specified item to the cart.
  req.send("");
 
   //window.setTimeout("getPokerActiveTables()", 10000);
}
function getPokerTablesInfo()
{
// Obtain an XMLHttpRequest instance
  var req = newXMLHttpRequest();
  //alert(req);
  var host = window.location.host;
  //alert(host);
  // Set the handler function to receive callback notifications
  // from the request object
  var handlerFunction = getReadyStateHandler(req, parseTableInfo);
  req.onreadystatechange = handlerFunction;

  // Open an HTTP POST connection to the shopping cart servlet.
  // Third parameter specifies request is asynchronous.
  
  req.open("POST", "http://" + host + "/PokerInfo", true);

  // Specify that the body of the request contains form data
  req.setRequestHeader("Content-Type", 
                       "application/x-www-form-urlencoded");

  // Send form encoded data stating that I want to add the 
  // specified item to the cart.
  req.send("f=0");
 
   window.setTimeout("getPokerTablesInfo()", 300000);
}
function jpts()
{
    var req = newXMLHttpRequest();
    var host = window.location.host;
   
    var handlerFunction = getReadyStateHandlerJackpots(req, getJacks);
    req.onreadystatechange = handlerFunction;
    req.open("POST", "http://" + host + "/GetPokerJackpots", true);
    req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    req.send("");

    window.setTimeout("jpts()", 1000*60*3);
}


function newXMLHttpRequest() 
{
    var xmlreq = false;
    if (window.XMLHttpRequest) 
    {
        // Create XMLHttpRequest object in non-Microsoft browsers
        xmlreq = new XMLHttpRequest();
    } 
    else 
    //if(window.ActiveXObject != null)
    {
        // Create XMLHttpRequest via MS ActiveX
        try
        {
          // Try to create XMLHttpRequest in later versions
          // of Internet Explorer
          xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
        } 
        catch (e1) 
        {
          // Failed to create required ActiveXObject
    //alert("Failed to create required ActiveXObject");
          try {
            // Try version supported by older versions
            // of Internet Explorer
            xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
          } 
          catch (e2)
          {

            // Unable to create an XMLHttpRequest with ActiveX
           // alert(" Unable to create an XMLHttpRequest with ActiveX");
          }
        }
    }
    
    return xmlreq;
}

function getReadyStateHandler(req, responseXmlHandler) 
{
// Return an anonymous function that listens to the 
// XMLHttpRequest instance
    return function () 
    {

        // If the request's status is "complete"
        if (req.readyState == 4) 
        {

              // Check that a successful server response was received
              if (req.status == 200) 
             {

                // Pass the XML payload of the response to the 
                // handler function
                
                responseXmlHandler(req.responseXML);

              } 
               else 
              {
                // An HTTP problem has occurred
                //alert("HTTP error1: "+req.status);
              }
        }
    }
}
function getReadyStateHandlerActiveTables(req, responseXmlHandler) 
{
// Return an anonymous function that listens to the 
// XMLHttpRequest instance
    return function () 
    {

        // If the request's status is "complete"
        if (req.readyState == 4) 
        {

              // Check that a successful server response was received
              if (req.status == 200) 
             {

                // Pass the XML payload of the response to the 
                // handler function
                responseXmlHandler(req.responseXML);
                

              } 
               else 
              {
                // An HTTP problem has occurred
                //alert("HTTP error2: "+req.status);
              }
        }
    }
}

function getReadyStateHandlerJackpots(req, responseXmlHandler) 
{
// Return an anonymous function that listens to the 
// XMLHttpRequest instance
    return function () 
    {

        // If the request's status is "complete"
        if (req.readyState == 4) 
        {

              // Check that a successful server response was received
              if (req.status == 200) 
             {

                // Pass the XML payload of the response to the 
                // handler function
                responseXmlHandler(req.responseXML);
                

              } 
               else 
              {
                // An HTTP problem has occurred
                //alert("HTTP error2: "+req.status);
              }
        }
    }
}
/**************************************************
end AjaxController.js
 **************************************************/
/**************************************************
PlayersCount.js
 **************************************************/ 
 function parseTableInfo(tree)
{
    var TYPE_HOLDEM = "100";
    var TYPE_OMAHA = "102";
    var TYPE_OMAHAHL = "104";
    var TYPE_7STUD = "106";
    var TYPE_7STUDHL = "108";
    var game = null;
    var objectElement = null;
    var totalData = null;
    var totalPlayers = "";
    var totalTables  = "";
    var isValidData = true;
    
    objectElement = tree.getElementsByTagName("PI")[0];
    if(objectElement!=null)
    {
        game = objectElement.getElementsByTagName("g");
        totalData = objectElement.getElementsByTagName("a")[0];
    }
    var nTexas = "";
    var nOmaha = "";
    var nOmahaHL = "";
    var n7Cards = "";
    var n7CardsHL = "";
    if(game!=null)
    {
        for(i=0;i<game.length;i++)
        {

            if(game[i].getAttribute("n")==TYPE_HOLDEM)
                nTexas = game[i].getAttribute("p");
            if(game[i].getAttribute("n")==TYPE_OMAHA)
                nOmaha = game[i].getAttribute("p");
            if(game[i].getAttribute("n")==TYPE_OMAHAHL)
                nOmahaHL = game[i].getAttribute("p");
            if(game[i].getAttribute("n") == TYPE_7STUD)
                n7Cards = game[i].getAttribute("p");
            if(game[i].getAttribute("n") == TYPE_7STUDHL)
                n7CardsHL = game[i].getAttribute("p");
        }
        
        totalPlayers = totalData.getAttribute("p");
        totalTables = totalData.getAttribute("t");

    }
    else
    {
        isValidData=false;
    }
    
    if(isValidData)
    {
        var sLang = getLang();
		if(sLang=="es"){
			return false;
		}
		if(sLang=="sv"){
			return false;
		}
		if(sLang=="fr")
		{
			return false;
			//document.getElementById("total").innerHTML = "&nbsp;<a class='r14b' href='javascript:Download(\"59\");'><span style='color:#00fd01; font-weight:bold'>" + totalPlayers + "</span> joueurs r\u00E9partis sur <span style='color:#00fd01; font-weight:bold'>" + totalTables + 
			//"</span> tables de Poker.</a>&nbsp;";
		}
		else if(sLang=="da")
		{
			return false;
			//document.getElementById("total").innerHTML = "&nbsp;<a class='r14b' href='javascript:Download(\"59\");'><span style='color:#00fd01; font-weight:bold'>" + totalPlayers + "</span> spillere ved <span style='color:#00fd01; font-weight:bold'>" + totalTables + "</span> pokerborde. Velkommen hos Pacific Poker!</a>&nbsp;";
		}
		
		else
                {
			document.getElementById("total").innerHTML = "&nbsp;<a class='r14b' href='javascript:Download(\"59\");'><span style='color:#00fd01; font-weight:bold'>" + totalPlayers + "</span> players on <span style='color:#00fd01; font-weight:bold'>" + totalTables + "</span> tables are playing right now!</a>&nbsp;";
		}
		/*
        if(nTexas==null) nTexas="0";
            document.getElementById("texas").innerHTML = "<b>" + nTexas + "</b><br>players";
        if(nOmaha==null)nOmaha="0";
            document.getElementById("omaha").innerHTML = "<b>" + nOmaha + "</b><br>players";
        if(nOmahaHL==null)nOmahaHL="0";
            document.getElementById("omahaHL").innerHTML = "<b>" + nOmahaHL + "</b><br>players";
        if(n7Cards==null)n7Cards="0";
            document.getElementById("cards").innerHTML = "<b>" + n7Cards + "</b><br>players";
        if(n7CardsHL==null)n7CardsHL="0";
            document.getElementById("cardsHL").innerHTML = "<b>" + n7CardsHL + "</b><br>players";
*/
    }
}
var DDSPEED = 10;
var DDTIMER = 15;

// main function to handle the mouse events //
function ddMenu(id,d){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  clearInterval(c.timer);
  if(d == 1){
    clearTimeout(h.timer);
    if(c.maxh && c.maxh <= c.offsetHeight){return}
    else if(!c.maxh){
      c.style.display = 'block';
      c.style.height = 'auto';
      c.maxh = c.offsetHeight;
      c.style.height = '0px';
    }
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }else{
    h.timer = setTimeout(function(){ddCollapse(c)},50);
  }
}

// collapse the menu //
function ddCollapse(c){
  c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}

// cancel the collapse if a user rolls over the dropdown //
function cancelHide(id){
  var h = document.getElementById(id + '-ddheader');
  var c = document.getElementById(id + '-ddcontent');
  clearTimeout(h.timer);
  clearInterval(c.timer);
  if(c.offsetHeight < c.maxh){
    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
  }
}

// incrementally expand/contract the dropdown and change the opacity //
function ddSlide(c,d){
  var currh = c.offsetHeight;
  var dist;
  if(d == 1){
    dist = (Math.round((c.maxh - currh) / DDSPEED));
  }else{
    dist = (Math.round(currh / DDSPEED));
  }
  if(dist <= 1 && d == 1){
    dist = 1;
  }
  c.style.height = currh + (dist * d) + 'px';
  c.style.opacity = currh / c.maxh;
  c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
  if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){
    clearInterval(c.timer);
  }
}
/**************************************************
end PlayersCount.js
 **************************************************/
/**************************************************
AC_RunActiveContent.js
 **************************************************/ 
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
/**************************************************
end AC_RunActiveContent.js
 **************************************************/  
/**************************************************
flash.js
 **************************************************/  
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');
}

function displayStaticImage(altImgPath)
{ 
      
      document.write('<map  name="pokerMainImg"><area shape ="rect" coords ="0,0,570,230" href ="javascript:openDownload(\'1192\');" title="Free Poker Download">');
      document.write('<area shape ="rect" coords ="143,155,211,241"  href ="javascript:openWSOP();"  title="Leran More"></map>');
      document.write('<img src="' + altImgPath + '" alt="Free Poker Download" title="Free Poker Download" usemap="#pokerMainImg" border=0/>');        
}

function openpoker()
{
     openDownload('1192');
}

function OpenLink(){
				url = "http://promo.888.com/888day_winner09/en/?"+sCut;
                window.open(url);
                }

function openWSOP()
{
  url = "http://wsop.888poker.com/wsop/en/8ways.htm?"+sCut;
  window.open(url);
}
                
function playFlash(flahsPath,altImgPath)
{
    if (MM_FlashCanPlay)
    {
            if (AC_FL_RunContent == 0) 
            {
                    alert("This page requires AC_RunActiveContent.js.");
            } 
            else 
            {
                    AC_FL_RunContent(
                            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                            'width', '570',
                            'height', '290',
                            'src', flahsPath,
                            'quality', 'high',
                            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                            'align', 'middle',
                            'play', 'true',
                            'loop', 'true',
                            'scale', 'showall',
                            'wmode', 'transparent',
                            'devicefont', 'false',
                            'id', '888day_PCPpromotion_EN',
                            'bgcolor', '#000000',
                            'name', '888day_PCPpromotion_EN',
                            'menu', 'true',
                            'allowFullScreen', 'false',
                            'allowScriptAccess','always',
                            'movie', flahsPath,
                            'salign', ''
                            ); //end AC code
                }
        }
        else
        {
            displayStaticImage(altImgPath);
        }
  }
/**************************************************
end flash.js
 **************************************************/    


function showFlash(flashPath,flashWidth, flashHeight)
{
        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="' + flashWidth + '" height="' + flashHeight + '" id="flash_id" align="middle" VIEWASTEXT>');
        document.write('<param name="movie" value="' + flashPath + '" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#000000" />');
        document.write('<param name="wmode" VALUE="transparent" />');
        document.write('<param name="allowScriptAccess" value="always" />');
        document.write('<embed src="'+ flashPath + '"  wmode="transparent" quality="high" bgcolor="#000000" width="' + flashWidth + '" height="' + flashHeight + '" name="flash_id" allowScriptAccess="always" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>');
}

