        parent.sExit = sLook == "35" ? "Find out now why everyone is playing Poker - at Pacific Poker!" : "Find out now why everyone is playing Poker - at Pacific Poker!";
        CorentLang = 'en';
        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,relpath)
        {                
                document.location.href = "/?page=download_short_poker&" + sCut + "&dl=" + loc;
                if (sLang == 'it')
                    url="http://" + ItalyDomainPoker + "/PokerInstaller?" +sCut + "&dl="+loc;
                else
                    url="http://www.pacificpoker.com/PokerInstaller?" +sCut + "&dl="+loc;
              
                window.open(url,"popDown","width=1,height=1,top=0,left=0");
        }
                
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 OpeneCogra()
		{
			var w = 496;
			var h = 506;
			var l = (window.screen.width-w)/2;
			var t = (window.screen.height-h)/2;
			window.open("../../new888/lang/en/texts/ecogra.htm","eCogra","resizable=yes,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h);
		}
                function OpenPCPeCogra()
		{
			var w = 520;
			var h = 520;
			var l = (window.screen.width-w)/2;
			var t = (window.screen.height-h)/2;
			window.open("../../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 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 = 793;
			var h = 517;
			var l = 1; //(window.screen.width-w)/2;
			var t = 1; //(window.screen.height-h)/2;
			var LocationString ="";
			if(brand=="casino")
				LocationString = "../../new888/lang/en/texts/contactusform/contactus.htm?" + sCut;
			else
				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)   
		}
function Select1_onclick()
{
        var lang=document.getElementById("LangBox").value;
        if (lang !="none")
        {
            if (lang=="en" ||  lang=="es" ||  lang=="fr" ||  lang=="sv" ||  lang=="nl" ||  lang=="pt" || lang=="de"  || lang=="da" || lang=="tr" || lang=="jp" || lang=="el") 
            {
                window.location.href = "http://www.888.com/gpr/?" + sCutLangSt + "&lang=" + lang;
            }
            else if (lang=="it")
            {
                window.location.href = "http://" + ItalyDomain +"/gpr/?" + sCutLangSt + "&lang=" + lang;
            }
            else
            {
                window.top.location.href =  "/?" + sCutLangSt + "&lang=" + lang;           
            }
        }
        
}

function timeimgs(numb)
 { // Reusable timer
    thetimer = setTimeout("imgturn('" +numb+ "')", 2000);
}

function imgturn(numb) 
{ // Reusable image turner
    if (document.images) 
    {
        var tmpMainPic = document.getElementById("main_pic");

        if (numb == "4") 
        { // This will loop the image
            tmpMainPic.src = eval("pic_04.Src");
            timeimgs('1');
        }
        else 
        { 
           tmpMainPic.src=eval( "pic_0" + numb + ".Src");
           timeimgs(numb = ++numb);
        }
    }
}

function putCookie(cookieName,cookieValue,expireMiliSeconds)
{
    var myLocation = window.location.hostname;
    var d = new Date();
    d.setTime(d.getTime() + expireMiliSeconds);
    document.cookie = cookieName + "=" + cookieValue + ";expires=" + d.toGMTString() + ";path=/";
}

function DetectUK(path,loc) //for welcome message - french
{
    OpenDownCasino(loc,'');
}
