﻿/* 
  ------------------------------------------------
  PopMenu Magic menu scripts
  Copyright (c) 2004-2006 Project Seven Development
  www.projectseven.com
  Version: 1.0.3
  ------------------------------------------------
*/
var p7PMp,p7PMct;
function P7_setPM(){ //v1.0.3 by PVII-www.projectseven.com
 var i,d='',h="<sty"+"le type=\"text/css\">",tA=navigator.userAgent.toLowerCase();if(window.opera){
 if(tA.indexOf("opera 5")>-1||tA.indexOf("opera 6")>-1){return;}}if(document.getElementById){
 for(i=1;i<20;i++){d+='ul ';h+="\n#p7PMnav "+d+"{position:absolute;left:-9000px;}";}
 document.write(h+"\n<"+"/sty"+"le>");}}P7_setPM();
function P7_initPM(){ //v1.0 by PVII-www.projectseven.com
 var i,g,tD,tA,tU,pp,lvl,ev,tn=navigator.userAgent.toLowerCase();if(window.opera){
 if(tn.indexOf("opera 5")>-1||tn.indexOf("opera 6")>-1){return;}}else if(!document.getElementById){return;}
 p7PMp=arguments;p7PMct=new Array;tD=document.getElementById('p7PMnav');if(tD){tA=tD.getElementsByTagName('A');
 for(i=0;i<tA.length;i++){tA[i].p7PMcl=p7PMct.length;p7PMct[p7PMct.length]=tA[i];g=tA[i].parentNode.getElementsByTagName("UL");
 tA[i].p7PMsub=(g&&g[0])?g[0]:false;ev=tA[i].getAttribute("onmouseover");if(!ev||ev=='undefined'){tA[i].onmouseover=function(){
 P7_PMtrig(this);};}ev=tA[i].getAttribute("onfocus");if(!ev||ev=='undefined'){tA[i].onfocus=function(){P7_PMtrig(this);};}
 if(tA[i].p7PMsub){pp=tA[i].parentNode;lvl=0;while(pp){if(pp.tagName&&pp.tagName=="UL"){lvl++;}pp=pp.parentNode;}
 tA[i].p7PMlv=lvl;}}tD.onmouseout=P7_PMclose;P7_PMopen();}
}
function P7_PMtrig(a){ //v1.0.3 by PVII-www.projectseven.com
 var b,t;if(document.p7PMt){clearTimeout(document.p7PMt);}document.p7PMa=1;b=(a.p7PMsub)?'P7_PMshow(':'P7_PMtg(';
 t='document.p7PMt=setTimeout("'+b+a.p7PMcl+')",160)';eval (t);
}
function P7_PMshow(a,bp){ //v1.0.3 by PVII-www.projectseven.com
 var u,lv,oft,ofr,uw,uh,pp,aw,ah,adj,mR,mT,wW=0,wH,w1,w2,w3,sct,pw,lc,pwv,xx=0,yy=0,wP=true;
 var iem=(navigator.appVersion.indexOf("MSIE 5")>-1)?true:false,dce=document.documentElement,dby=document.body;document.p7PMa=1;
 if(!bp){P7_PMtg(a);}u=p7PMct[a].p7PMsub;if(u.p7pmax&&u.p7pmax==1){return;}u.p7pmax=1;lv=(p7PMp[0]==1&&p7PMct[a].p7PMlv==1)?true:false;
 p7PMct[a].className=p7PMct[a].className.replace("p7PMtrg","p7PMon");oft=parseInt(p7PMp[3]);ofr=parseInt(p7PMp[4]);
 uw=u.offsetWidth;uh=u.offsetHeight;pp=p7PMct[a];aw=pp.offsetWidth;ah=pp.offsetHeight;while(pp){xx+=(pp.offsetLeft)?pp.offsetLeft:0;
 yy+=(pp.offsetTop)?pp.offsetTop:0;if(window.opera||navigator.userAgent.indexOf("Safari")>-1){
 if(p7PMct[a].p7PMlv!=1&&pp.nodeName=="BODY"){yy-=(pp.offsetTop)?pp.offsetTop:0;}}pp=pp.offsetParent;}
 if(iem&&navigator.userAgent.indexOf("Mac")>-1){yy+=parseInt(dby.currentStyle.marginTop);}adj=parseInt((aw*ofr)/100);mR=(lv)?0:aw-adj;
 adj=parseInt((ah*oft)/100);mT=(lv)?0:(ah-adj)*-1;w3=dby.parentNode.scrollLeft;if(!w3){w3=dby.scrollLeft;}w3=(w3)?w3:0;
 if(dce&&dce.clientWidth){wW=dce.clientWidth+w3;}else if(dby){wW=dby.clientWidth+w3;}if(!wW){wW=0;wP=false;}wH=window.innerHeight;
 if(!wH){wH=dce.clientHeight;if(!wH||wH<=0){wH=dby.clientHeight;}}sct=dby.parentNode.scrollTop;if(!sct){sct=dby.scrollTop;if(!sct){
 sct=window.scrollY?window.scrollY:0;}}pw=xx+mR+uw;if(pw>wW&&wP){mR=uw*-1;mR+=10;if(lv){mR=(wW-xx)-uw;}}lc=xx+mR;if(lc<0){mR=xx*-1;}
 pw=yy+uh+ah+mT-sct;pwv=wH-pw;if(pwv<0){mT+=pwv;if(uh>wH){mT=(yy+ah-sct)*-1;}}u.style.marginLeft=mR+'px';u.style.marginTop=mT+'px';
if(p7PMp[2]==1){if(!iem){P7_PManim(a,20);}}u.className="p7PMshow";
 P7_hideSelect(1);
}
function P7_PMhide(u){ //v1.0.3 by PVII-www.projectseven.com
 var i,tt,ua;u.p7pmax=0;u.className="p7PMhide";ua=u.parentNode.firstChild;ua.className=ua.className.replace("p7PMon","p7PMtrg");
}
function P7_PMtg(a,b){ //v1.0.3 alpha by PVII-www.projectseven.com
 var i,u,tA,tU,pp;tA=p7PMct[a];pp=tA.parentNode;while(pp){if(pp.tagName=="UL"){break;}pp=pp.parentNode;}if(pp){
 tU=pp.getElementsByTagName("UL");for(i=tU.length-1;i>-1;i--){if(b!=1&&tA.p7PMsub==tU[i]){continue;}else{P7_PMhide(tU[i]);}}}
}
function P7_PMclose(evt){ //v1.0.3 by PVII-www.projectseven.com
 var pp,st,tS,m=true;evt=(evt)?evt:((event)?event:null);st=document.p7PMa;if(st!=-1){if(evt){
 tS=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;if(tS){pp=tS.parentNode;while(pp){if(pp&&pp.id&&pp.id=="p7PMnav"){m=false;
 document.p7PMa=1;break;}pp=pp.parentNode;}}if(m){document.p7PMa=-1;if(document.p7PMt){clearTimeout(document.p7PMt);}
 document.p7PMt=setTimeout("P7_PMclr()",360);}}}
}
function P7_PMclr(){ //v1.0.3 by PVII-www.projectseven.com
 var i,tU,tUU;document.p7PMa=-1;tU=document.getElementById('p7PMnav');if(tU){tUU=tU.getElementsByTagName("UL");if(tUU){
 for(i=tUU.length-1;i>-1;i--){P7_PMhide(tUU[i]);}}}
  P7_hideSelect(0);
  }
function P7_PManim(a,st){ //v1.0.3 by PVII-www.projectseven.com
 var g=p7PMct[a].p7PMsub,sp=30,inc=20;st=(st>=100)?100:st;g.style.fontSize=st+"%";if(st<100){st+=inc;setTimeout("P7_PManim("+a+","+st+")",sp);}
}
function P7_PMmark(){document.p7PMop=arguments;}
function P7_PMopen(){ //v1.0.3 by PVII-www.projectseven.com
 var i,x,tA,op,pp,wH,tA,aU,r1,k=-1,kk=-1,mt=new Array(1,'','');if(document.p7PMop){mt=document.p7PMop;}op=mt[0];if(op<1){return;}
 tA=document.getElementById('p7PMnav').getElementsByTagName("A");wH=window.location.href;r1=/index\.[\S]*/i;for(i=0;i<tA.length;i++){
 if(tA[i].href){aU=tA[i].href.replace(r1,'');if(op>0){if(tA[i].href==wH||aU==wH){k=i;kk=-1;break;}}if(op==2){if(tA[i].firstChild){
 if(tA[i].firstChild.nodeValue==mt[1]){kk=i;}}}if(op==3 && tA[i].href.indexOf(mt[1])>-1){kk=i;}if(op==4){for(x=1;x<mt.length;x+=2){
 if(wH.indexOf(mt[x])>-1){if(tA[i].firstChild&&tA[i].firstChild.data){if(tA[i].firstChild.data==mt[x+1]){kk=i;break;}}}}}}}k=(kk>k)?kk:k;
 if(k>-1){pp=tA[k].parentNode;while(pp){if(pp.nodeName=="LI"){pp.firstChild.className="p7PMmark"+" "+pp.firstChild.className;}
 pp=pp.parentNode;}}if(kk>-1){document.p7PMad=1;}P7_PMadma();P7_PMadmb();
}
function P7_PMadma(){ //v1.0.3 by PVII-www.projectseven.com
 var s,ss,i,j,a,g,b,c,d,t,h,tA,b,tP,r1,r2,tI,bA,aA,tB=new Array(),bC='',x=0,ur=1,mt=document.p7PMad;g=document.getElementById("p7PMnav");
 b=document.getElementById("pmmcrumb");if(g&&b){c=b.getElementsByTagName("A");if(c&&c[0]){tP=c[0].parentNode.childNodes;r1=/<a/i;r2=/\/a>/i;
 tI=c[0].parentNode.innerHTML;j=tI.search(r1);bA=tI.substring(0,j);j=tI.search(r2);aA=tI.substring(j+3);bC+=(bA)?bA:'';s=(aA)?aA:' &gt ';
 if(!c[0].id||c[0].id!="pmmcn"){if(c[0].href!=window.location.href){tB[0]=c[0];x++;ur=2;}}tA=g.getElementsByTagName("A");for(i=0;i<tA.length;i++){
 if(tA[i].className.indexOf("p7PMmark")>-1){tB[x]=tA[i];x++;}}for(i=0;i<tB.length;i++){ss=(i>0)?s:'';a=(i==tB.length-1)?0:1;
 d=(i==0&&c[0].id)?'id="'+c[0].id+'" ':' ';t=tB[i].firstChild.nodeValue;if(a==1||mt==1||x<ur){bC+=ss+'<a '+d+'hr'+'ef="'+tB[i].href+'">'+t+'</a>';
 }else{bC+=ss+t;}}if(mt==1||i<ur){ss=(i>0)?s:'';bC+=ss+document.title;}c[0].parentNode.innerHTML=bC;}}
}
function P7_PMadmb(){ //v1.0.3 by PVII-www.projectseven.com
 var h='',g,i,tA,b,m=false;g=document.getElementById("p7PMnav");b=document.getElementById("pmmnext");if(g&&b){tA=g.getElementsByTagName("A");
 for(i=tA.length-1;i>-1;i--){if(tA[i].className.indexOf("p7PMmark")>-1){m=true;break;}}if(m){if(i<tA.length-1){i++;}else{i=0;}
 while(tA[i].href==window.location.href+"#"||tA[i].href=="javascript:;"){i++;if(i>tA.length-1){
 i=0;break;}}b.href=tA[i].href;b.innerHTML=tA[i].firstChild.nodeValue;}}	
}

function P7_hideSelect(a){ //v1.0 by PVII
  var g,h=(a==1)?"hidden":"visible";
  if(document.getElementsByTagName){
  g=document.getElementsByTagName("select");
  if(g){for(var i=0;i<g.length;i++){
  g[i].style.visibility=h;}}}
  }
  
var menuLevel = 0;

function WinOpen2(mylink, windowname)
{
	var href;
		
	href=mylink.href;
	window.open(href, windowname,'height=665,width=500,resizable=1,left=300,top=200,scrollbars=yes');

	return false;
}

function expandSubMenu(element, menuLevel, prefix)
{
	var parentLi = element.parentNode;
			
	for (var i = 0; i < parentLi.childNodes.length; i++)
	{
      	if (parentLi.childNodes[i].className == prefix + menuLevel + "Hidden")
       	{
	        parentLi.childNodes[i].className = prefix + menuLevel + "Shown";
        }
	    else if (parentLi.childNodes[i].className == prefix + menuLevel + "Shown")
	    {
    	    parentLi.childNodes[i].className = prefix + menuLevel + "Hidden";
        }
	}
	
    changeImage(element);
}

function esm(element)
{
    if (element.parentNode.className == "wmh")
    {
    	var parentLi = element.parentNode.parentNode;
	}
    else
    {
    	var parentLi = element.parentNode;
	}
			
	for (var i = 0; i < parentLi.childNodes.length; i++)
	{
      	if (parentLi.childNodes[i].className == "wm1h")
       	{
	        parentLi.childNodes[i].className = "wm1s";
        }
	    else if (parentLi.childNodes[i].className == "wm1s")
	    {
    	    parentLi.childNodes[i].className = "wm1h";
        }
	}
	
    ci(element);
}

function expandSubtractSubMenu(event, menuLevel, prefix)
{
    var element;
    if (!event.target)
    {
        element = event.srcElement;
    }
    else
    {
        element = event.target;
    }
    
	var parentLi = element.parentNode.parentNode;

    closeAllSiblingMenus(parentLi, menuLevel, prefix);		

    if (findColumnId(element) == "bettingmenucolumn1")
    {
        closeAllChildMenus(document.getElementById("bettingmenucolumn2"), menuLevel, prefix);
    }
    else
    {
        closeAllChildMenus(document.getElementById("bettingmenucolumn1"), menuLevel, prefix);
    }

	for (var i = 0; i < parentLi.childNodes.length; i++)
	{
	    if (parentLi.childNodes[i].tagName == "DIV")
	    {
	        var parentDiv = parentLi.childNodes[i];
        	for (var j = 0; j < parentDiv.childNodes.length; j++)
	        {
              	if (parentDiv.childNodes[j].className == prefix + menuLevel + "Hidden")
       	        {
	                parentDiv.childNodes[j].className = prefix + menuLevel + "Shown";
	                changeImageOfUl(parentDiv.childNodes[j]);
                }
	            else if (parentDiv.childNodes[j].className == prefix + menuLevel + "Shown")
	            {
    	            parentDiv.childNodes[j].className = prefix + menuLevel + "Hidden";
	                changeImageOfUl(parentDiv.childNodes[j]);
                }
            }
	    }
    }
    
    if (checkOpenChildMenu(menuLevel, prefix))
    {
	    hideSelects(1);
    }
    else
    {
    	hideSelects(0);
    }
    
    event.cancelBubble = true;
	if (event.stopPropagation)
	{
	    event.stopPropagation();
	}
}


function essm(event)
{
    var element;
    if (!event.target)
    {
        element = event.srcElement;
    }
    else
    {
        element = event.target;
    }
    
    
    var currentClassName = element.className;
    
    var tableElement = element;
    while( tableElement.tagName != 'TABLE' )
    {
        tableElement = tableElement.parentNode;
    }
    
    var ulList = tableElement.getElementsByTagName('ul');  //find al ul with class bmls and hide them
    for( var x=0; x<ulList.length; x++ )
    {
        if( ulList[x].className == 'bm1s' )
        {
            ulList[x].className = 'bm1h';
        }
    }
    
    var divList = tableElement.getElementsByTagName('div');  //find all divs with minus sign, change them to plus sign.
    for( var x = 0; x<divList.length; x++ )
    {
        if( divList[x].className == 'smms i' )
        {
            divList[x].className = 'smps i';
        }
    }
    
	var parentLi = element.parentNode.parentNode;

	//var targetDiv = parentLi.parentNode.childNodes[1].childNodes[0];
	
	//change the plus sign to a minus sign, if required.
	if( currentClassName == 'smps i' )
	{
	    element.className = 'smms i';
	}

	
    /*
    if (parentLi.tagName == "DIV")
    {
        casm(parentLi.parentNode);
    }
    else
    {
        casm(parentLi);
    }

    if (findColumnId(element) == "bettingmenucolumn1")
    {
        cacm(document.getElementById("bettingmenucolumn2"));
    }
    else
    {
        cacm(document.getElementById("bettingmenucolumn1"));
    }
    */

    if( currentClassName == 'smps i' )
    {
	    for (var i = 0; i < parentLi.childNodes[0].childNodes.length; i++)
	    {
	        //if (parentLi.childNodes[i].tagName == "DIV")
	        if (parentLi.childNodes[0].childNodes[i].className == "bmfd")
	        {
	            var parentDiv = parentLi.childNodes[0].childNodes[i];
        	    for (var j = 0; j < parentDiv.childNodes.length; j++)
	            {
              	    if (parentDiv.childNodes[j].className == "bm1h")
       	            {
	                    parentDiv.childNodes[j].className = "bm1s";
	                    ciul(parentDiv.childNodes[j]);
                    }
	                else if (parentDiv.childNodes[j].className == "bm1s")
	                {
    	                parentDiv.childNodes[j].className = "bm1h";
	                    ciul(parentDiv.childNodes[j]);
                    }
                }
	        }
        }
    }
    
    if (cocm())
    {
	    hideSelects(1);
    }
    else
    {
    	hideSelects(0);
    }
    
    event.cancelBubble = true;
	if (event.stopPropagation)
	{
	    event.stopPropagation();
	}
}

function closeAllSiblingMenus(element, menuLevel, prefix)
{
    var parentUl = element.parentNode;
	for (var i = 0; i < parentUl.childNodes.length; i++)
	{
	    if (parentUl.childNodes[i].tagName == "LI" && parentUl.childNodes[i] != element)
	    {
            var ulList = parentUl.childNodes[i].getElementsByTagName("ul");
       	    for (var j = 0; j < ulList.length; j++)
            {
                if (ulList[j].className == prefix + menuLevel + "Shown")
                {
                    ulList[j].className = prefix + menuLevel + "Hidden";
	                changeImageOfUl(ulList[j]);
   	            }
            }
    	}
	}
}

function casm(element)
{
	var targetDiv = element.childNodes[1].childNodes[0];
	
	if( targetDiv.className == 'smms i' )
	{
	    targetDiv.className = 'smps i';
	}
	else
	{
	    targetDiv.className = 'smms i';
	}


    var parentUl = element.parentNode;
	for (var i = 0; i < parentUl.childNodes.length; i++)
	{
	    if (parentUl.childNodes[i].tagName == "LI" && parentUl.childNodes[i] != element)
	    {
            var ulList = parentUl.childNodes[i].getElementsByTagName("ul");
       	    for (var j = 0; j < ulList.length; j++)
            {
                if (ulList[j].className == "bm1s")
                {
                    ulList[j].className = "bm1h";
	                ciul(ulList[j]);
   	            }
            }
    	}
	}
}

function checkOpenChildMenu(menuLevel, prefix)
{
    var ulList = document.getElementById("bettingmenu").getElementsByTagName("ul");
	for (var i = 0; i < ulList.length; i++)
	{
   	    if (ulList[i].className == prefix + menuLevel + "Shown"
   	        && ulList[i].parentNode.parentNode.parentNode.parentNode.className == prefix + "0")
        {
   	        return true;
        }
	}
	
	var divList = document.getElementById("bettingmenu").getElementsByTagName("ul");
	for( var x=0; x<divList.length; x++ )
	{
	    if( divList[x].className == 'smms i' )
	    {
	        divList[x].className == 'smps i';
	    }
	}
	
	return false;
}

function cocm()
{
    var ulList = document.getElementById("bettingmenu").getElementsByTagName("ul");
	for (var i = 0; i < ulList.length; i++)
	{
   	    if (ulList[i].className == "bm1s"
   	        && ulList[i].parentNode.parentNode.parentNode.parentNode.className == "bm0")
        {
   	        return true;
        }
	}
	
	return false;
}

function closeBettingMenu()
{
        closeAllChildMenus(document.getElementById("bettingmenucolumn2"), "1", "bmc");
        closeAllChildMenus(document.getElementById("bettingmenucolumn1"), "1", "bmc");
    	hideSelects(0);
}

function cbm()
{
        cacm(document.getElementById("bettingmenucolumn2"));
        cacm(document.getElementById("bettingmenucolumn1"));
    	hideSelects(0);
}

function closeAllChildMenus(element, menuLevel, prefix)
{
    var ulList = element.getElementsByTagName("ul");
	for (var i = 0; i < ulList.length; i++)
	{
   	    if (ulList[i].className == prefix + menuLevel + "Shown")
        {
   	        ulList[i].className = prefix + menuLevel + "Hidden";
	        changeImageOfUl(ulList[i]);
        }
	}
}

function cacm(element)
{
    if (element == null)
    {
        return;
    }
    
    var ulList = element.getElementsByTagName("ul");
	for (var i = 0; i < ulList.length; i++)
	{
   	    if (ulList[i].className == "bm1s")
        {
   	        ulList[i].className = "bm1h";
	        ciul(ulList[i]);
        }
	}
	
	var divList = element.getElementsByTagName("div");
	for( var x=0; x<divList.length; x++ )
	{
	    if( divList[x].className == 'smms i' )
	    {
	        divList[x].className = 'smps i';
	    }
	}		
}

function findColumnId(element)
{
    if (element.parentNode.id == "bettingmenucolumn1" || element.parentNode.id == "bettingmenucolumn2")
    {
        return element.parentNode.id;
    }
    return findColumnId(element.parentNode);
}

function findNodeWithParentNodeClassName(element, className)
{
    if (element.parentNode.className != className)
    {
        findNodeWithParentNodeClassName(element.parentNode, className);
    }
    
    return element;
}

function changeImageOfUl(element)
{
    var spanParent = element.parentNode.parentNode;
    for (var i = 0; i < spanParent.childNodes.length; i++)
    {
        if (spanParent.childNodes[i].tagName == "SPAN")
        {
            var imageParent = spanParent.childNodes[i];
            for (var j = 0; j < imageParent.childNodes.length; j++)
            {
                if (imageParent.childNodes[j].tagName == "IMG")
                {
                    var imageElement = imageParent.childNodes[j];
		            if (imageElement.src.match( /plus_sign/ ))
		            {
			            imageElement.src = "/images/ps_minus_sign_blue.gif";
		            }
		            else if (imageElement.src.match( /minus_sign/ ))
		            {
			            imageElement.src = "/images/ps_plus_sign_blue.gif";
		            }
                    break;
                }
            }
            break;
        }
    }
}

function ciul(element)
{
    var spanParent = element.parentNode.parentNode;
    for (var i = 0; i < spanParent.childNodes.length; i++)
    {
        if (spanParent.childNodes[i].tagName == "SPAN")
        {
            var imageParent = spanParent.childNodes[i];
            for (var j = 0; j < imageParent.childNodes.length; j++)
            {
                if (imageParent.childNodes[j].tagName == "IMG")
                {
                    var imageElement = imageParent.childNodes[j];
		            if (imageElement.src.match( /\/i\/p.gif/ ))
		            {
			            imageElement.src = "/i/m.gif";
		            }
		            else if (imageElement.src.match( /\/i\/m.gif/ ))
		            {
			            imageElement.src = "/i/p.gif";
		            }
                    break;
                }
            }
            break;
        }
    }
}

function changeImage(element)
{
	var imageList = element.getElementsByTagName("img");
	var imageListCount = imageList.length;
	var currentElement;
	
	for (var i = 0; i < imageListCount; i++)
	{
		currentElement = imageList[i];
		if (currentElement.src.match( /plus_sign/ ) && currentElement.parentNode == element)
		{
			currentElement.src = "/images/ps_minus_sign_blue.gif";
		}
		else if (currentElement.src.match( /minus_sign/ ) && currentElement.parentNode == element)
		{
			currentElement.src = "/images/ps_plus_sign_blue.gif";
		}
	}
}

function ci(element)
{
    if( element.className == "mps i" )
    {
        element.className = "mms i";
    }
    else if( element.className == "mpsh i" )
    {
        element.className = "mmsh i"
    }
    else if( element.className == "mpsm i" )
    {
        element.className = "mmsm i";
    }
    else if( element.className == "mpsmh i" )
    {
        element.className = "mmsmh i";
    }
    else if( element.className == "mms i" )
    {
        element.className = "mps i";
    }
    else if( element.className == "mmsh i" )
    {
        element.className = "mpsh i";
    }
    else if( element.className == "mmsm i" )
    {
        element.className = "mpsm i";
    }
    else if( element.className == "mmsmh i" )
    {
        element.className = "mpsmh i";
    }
    
    return;
}
function hideSelects(hideBoolean)
{
    var selectElement; 
    var hiddenSetting = (hideBoolean == 1) ? "hidden" : "visible";
    if (document.getElementsByTagName)
    {
        selectElement = document.getElementsByTagName("select");
        if(selectElement)
        {
            for (var i = 0; i < selectElement.length ; i++)
            {
                selectElement[i].style.visibility = hiddenSetting;
            }
        }
    }
}
  
//<script language="javascript">

/***********************************************
* Highlight Table Cells Script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
* Source adapted by H. de Haas for PinnacleSports.com
***********************************************/

//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior = "TR"

var ns6 = document.getElementById&&!document.all
var ie = document.all

function changeto(e,highlightcolor) {
  source = ie? event.srcElement : e.target
  
  if (source.tagName == "TABLE")
    return

while(source.tagName != highlightbehavior && source.tagName != "HTML")
  source = ns6 ? source.parentNode : source.parentElement

if (source.style.backgroundColor != highlightcolor && String(source.id).search(/ignore/i) == -1)
  source.className = "AlternatingData3";
}

function contains_ns6(master, slave) { //check if slave is contained by master
  if (slave)
    while (slave.parentNode)
      if ((slave = slave.parentNode) == master)
        return true;
  return false;
}

function changeback(e,originalcolor) {
  if (ie && (event.fromElement.contains(event.toElement) || source.contains(event.toElement) || String(source.id).search(/ignore/i) != -1) || source.tagName=="TABLE")
    return
  else if (ns6&&(contains_ns6(source, e.relatedTarget)||String(source.id).search(/ignore/i) != -1))
    return
  
  if (ie && event.toElement != source || ns6 && e.relatedTarget != source)
    source.className = "AlternatingData1";
    
  if (ie && event.type == 'mousewheel' || ns6 && e.type == 'mousewheel')
		alert('mouse!');
}




/* 

  ================================================
  PVII TabPanel scripts
  Copyright (c) 2006 Project Seven Development
  www.projectseven.com
  Version: 1.0.8
  ================================================
  
*/

var p7tpa=new Array();
var isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);
function P7_setTP(){ //v1.0.8 by PVII-www.projectseven.com
 var i,h="<sty"+"le type=\"text/css\">\n";h+=".p7TP_tabs{display: block;}.p7TPcontent div{display:none;}\n";
 h+=".p7TPcontent div div{display:block;}\n";if(document.getElementById){for(i=1;i<11;i++){
 h+="#p7tpc"+i+"_1 {display:block;}\n";}h+="\n<"+"/sty"+"le>";document.write(h);}
}
P7_setTP();
function P7_initTP(){ //v1.0.8 by PVII-www.projectseven.com
 var i,j,tb,tD,tP,tA,pb="p7TP";if(!document.getElementById){return;};p7tpa=arguments;
 for(i=1;i<11;i++){tb=pb+i;tP=document.getElementById(tb);if(tP){tD=tP.getElementsByTagName("DIV");
 if(tD){for(j=0;j<tD.length;j++){if(tD[j].id&&tD[j].id.indexOf("p7tpb")==0){
 tA=tD[j].getElementsByTagName("A");if(tA[0]){tA[0].p7tpn=new Array(i,tD[j].id);
 tA[0].onclick=function(){return P7_TPtrig(this);};}}}}}}
}
function P7_TPtrig(a){ //v1.0.8 by PVII-www.projectseven.com
 var i,tD,tA,tC,c,d,sb,an=p7tpa[1],wP,h,cP,ch,hD,hh;if(typeof(a)!='object'){c=a.replace("p7tpc","p7tpb");
 d=document.getElementById(c);if(d){a=d.getElementsByTagName("A")[0];}}if(a.p7tpn){
 tD=document.getElementById(a.p7tpn[1]);if(tD){tA=tD.parentNode.getElementsByTagName("A");
 if(an==29&&!isIE5){wP=P7_getCD(a);h=P7_getPH(wP);cP=getTPc(a);ch=P7_getPH(cP);hD=h-ch;
 if(window.opera){P7_setPW(wP);}wP.style.height=h+"px";wP.style.overflow="hidden";}
 for(i=0;i<tA.length;i++){if(tA[i].p7tpn){sb=tA[i].p7tpn[1].replace("p7tpb","p7tpc");
 tC=document.getElementById(sb);if(tA[i]==a){tA[i].className="down";
 document.getElementById(tA[i].p7tpn[1]).className="down";if(tC){if(an>0&&an!=29){
 tC.style.visibility="hidden";tC.style.display="block";setTimeout("P7_TPanim('"+tC.id+"')",100);}
 else{tC.style.display="block";}if(an==29&&!isIE5){hh=P7_getPH(tC);P7_TPglide(tC.id,h,hh+hD);}}}
 else{tA[i].className='';document.getElementById(tA[i].p7tpn[1]).className='';if(tC){
 tC.style.display="none";}}}}}}if(typeof(P7_colH2)=='function'){P7_colH2();}
 if(typeof(P7_colH)=='function'){P7_colH();}return false;
}
function P7_TPanim(iD){ //v1.0.8 by PVII-www.projectseven.com
 var i,f,tC,g=new Array(),an=p7tpa[1],ob=document.getElementById(iD);tC=ob.parentNode;
 if(!tC.filters){ob.style.opacity="0.10";ob.style.visibility='visible';
 P7_TPfadeIn(ob.id,0.00);return;}f='progid:DXImageTransform.Microsoft.';d=' Duration=1';
g[0]='Fade';
g[1]='Fade';
g[2]='Wipe(GradientSize=0.5, wipeStyle=0, motion="forward"'+d+')';
g[3]='Pixelate(MaxSquare=50,Duration=1,Enabled=false'+d+')';
g[4]='RandomDissolve('+d+')';
g[5]='Iris(irisstyle="SQUARE", motion="in"'+d+')';
g[6]='Iris(irisstyle="SQUARE", motion="out"'+d+')';
g[7]='Iris(irisstyle="CIRCLE", motion="in"'+d+')';
g[8]='Iris(irisstyle="CIRCLE", motion="out"'+d+')';
g[9]='Blinds(direction="up", bands=1'+d+')';
g[10]='Blinds(direction="down", bands=1'+d+')';
g[11]='Blinds(direction="right", bands=1'+d+')';
g[12]='Blinds(direction="left", bands=1'+d+')';
g[13]='Barn(orientation="vertical", motion="in"'+d+')';
g[14]='Barn(orientation="vertical", motion="out"'+d+')';
g[15]='Barn(orientation="horizontal", motion="in"'+d+')'
g[16]='Barn(orientation="horizontal", motion="out"'+d+')'
g[17]='Strips(motion="leftdown"'+d+')';
g[18]='Strips(motion="leftup"'+d+')';
g[19]='Strips(motion="rightdown"'+d+')';
g[20]='Strips(motion="rightup"'+d+')';
g[21]='RadialWipe(wipeStyle="clock"'+d+')';
g[22]='RadialWipe(wipeStyle="wedge"'+d+')';
g[23]='RadialWipe(wipeStyle="radial"'+d+')';
g[24]='Slide(slideStyle="PUSH", bands=1'+d+')';
g[25]='Slide(slideStyle="SWAP", bands=5'+d+')';
g[26]='Slide(slideStyle="HIDE", bands=1'+d+')';
g[27]='Wheel(spokes=4'+d+')';
g[28]='Wheel(spokes=16'+d+')';
 an=(an>g.length)?3:an;f+=g[an];tC.style.filter=f;if(tC.filters.length<1){
 p7tpa[1]=0;ob.style.visibility='visible';return;}tC.filters[0].Apply();
 ob.style.visibility='visible';tC.filters[0].Play();
}
function P7_TPfadeIn(id,op){ //v1.0.8 by PVII-www.projectseven.com
 var d=document.getElementById(id);op+=.05;op=(op>=1)?1:op;d.style.opacity=op;
 if(op<1){setTimeout("P7_TPfadeIn('"+id+"',"+op+")",60);}
}
function P7_getPH(d){ //v1.0.8 by PVII-www.projectseven.com
 var h,nh,dh,oh;d.style.height="auto";oh=d.offsetHeight;d.style.height=oh+"px";
 nh=d.offsetHeight;if(oh!=nh){nh=(oh-(nh-oh));}d.style.height="auto";return nh;
}
function P7_setPW(d){ //v1.0.8 by PVII-www.projectseven.com
 var w,nw,dw,ow;d.style.width="auto";ow=d.offsetWidth;d.style.width=ow+"px";
 nw=d.offsetWidth;if(ow!=nw){nw=(ow-(nw-ow));}d.style.width=nw+"px";
}
function P7_getCD(a){ //v1.0.8 by PVII-www.projectseven.com
 var g,tP=a.p7tpn[1].replace("p7tpb","p7tpc");g=document.getElementById(tP);return g.parentNode;
}
function getTPc(a){ //v1.0.8 by PVII-www.projectseven.com
 var i,tA,cD,tC=null;tA=a.parentNode.parentNode.getElementsByTagName("A");
 for(i=0;i<tA.length;i++){if(tA[i].className && tA[i].className=="down"){
 cD=tA[i].p7tpn[1].replace("p7tpb","p7tpc");tC=document.getElementById(cD);break;}}
 return tC;
}
function P7_TPglide(pn,ch,th){ //v1.0.8 by PVII-www.projectseven.com
 var tt,inc,dy=10,w,m;w=document.getElementById(pn).parentNode;m=(ch<=th)?0:1;
 tt=Math.abs(parseInt(Math.abs(th)-Math.abs(ch)));inc=(tt*.15<1)?1:tt*.15;
 inc=(m==1)?inc*-1:inc;w.style.height=ch+"px";
 if(ch==th){w.style.height="auto";w.style.overflow="visible";}else{ch+=inc;
 if(m==0){ch=(ch>=th)?th:ch;}else{ch=(ch<=th)?th:ch;}if(w.p7tpG){clearTimeout(w.p7tpG);}
 w.p7tpG=setTimeout("P7_TPglide('"+pn+"',"+ch+","+th+")",dy);}
}


/* 

  ================================================
  PVII Accordian Panel scripts
  Copyright (c) 2007 Project Seven Development
  www.projectseven.com
  Version: 1.0.3 
  ================================================
 
*/
var p7AB=false;
var p7ABi=false;
function P7_setAB(){ //v1.0.3 by PVII-www.projectseven.com
 if(!document.getElementById){return;}var h,tA=navigator.userAgent.toLowerCase();
 if(window.opera){if(tA.indexOf("opera 5")>-1||tA.indexOf("opera 6")>-1){return;}}
 h=String.fromCharCode(60,115,116,121,108,101,32,116,121,112,101,61,34,116,101,120,116,47,99,115,115,34,62,46,112,55,65,66,99,111,110,116,101,110,116,123,100,105,115,112,108,97,121,58,110,111,110,101,59,125,60,47,115,116,121,108,101,62);
 h+='\n'+String.fromCharCode(60,33,45,45,91,105,102,32,108,116,101,32,73,69,32,55,93,62,60,115,116,121,108,101,62,46,112,55,65,66,44,46,112,55,65,66,32,100,105,118,123,122,111,111,109,58,49,48,48,37,59,125,60,47,115,116,121,108,101,62,60,33,91,101,110,100,105,102,93,45,45,62);
 h+='\n'+String.fromCharCode(60,33,45,45,91,105,102,32,108,116,101,32,73,69,32,54,93,62,60,115,116,121,108,101,62,46,112,55,65,66,44,46,112,55,65,66,99,111,110,116,101,110,116,44,46,112,55,65,66,116,114,105,103,32,97,123,104,101,105,103,104,116,58,49,37,59,125,60,47,115,116,121,108,101,62,60,33,91,101,110,100,105,102,93,45,45,62);
 document.write(h);
}
P7_setAB();
function P7_opAB(){ //v1.0.3 by PVII-www.projectseven.com
 var x,c,tC,ab,tB;if(document.getElementById){ab='p7ABW'+arguments[0];tB=document.getElementById(ab);
 tB.p7Aba=arguments;x=arguments[3];if(x>0&&x<11){c='p7ABc'+arguments[0]+'_'+x;
 tC=document.getElementById(c);if(tC){tC.style.display='block';}}if(!p7ABi){p7ABi=true;
 if(window.addEventListener){window.addEventListener("load",P7_initAB,false);}
 else if(document.addEventListener){document.addEventListener("load",P7_initAB,false);}
 else if(window.attachEvent){window.attachEvent("onload",P7_initAB);}
 else if(typeof window.onload=='function'){var p7loadit=onload;window.onload=function(){
 p7loadit();P7_initAB();};}else{window.onload=P7_initAB;}}}
}
function P7_initAB(){ //v1.0.3 by PVII-www.projectseven.com
 var i,j,ab,tB,tD,tA,op,ob,tg;if(!document.getElementById){return;}
 for(i=10;i>0;i--){ab='p7ABW'+i;tB=document.getElementById(ab);if(tB){tA=tB.getElementsByTagName("A");
 tg='p7ABt'+i;for(j=0;j<tA.length;j++){if(tA[j].id && tA[j].id.indexOf(tg)==0){tA[j].onclick=function(){
 return P7_ABtrig(this);};tA[j].p7ABstate=0;tA[j].p7ABpr=ab;}}ob=i+'_'+tB.p7Aba[3];P7_ABopen(ob);}}
 p7AB=true;P7_ABurl();
}
function P7_ABopen(s){ //v1.0.3 by PVII-www.projectseven.com
 var a,g,d='p7ABt'+s;a=document.getElementById(d);g=s.split("_");
 if(g&&g.length>1&&g[1]==99){a=P7_randAB(g[0]);}
 if(g&&g.length>1&&g[1]=='a'){P7_ABall(s);
 }else{if(a&&a.p7ABpr){if(a.p7ABstate==0){P7_ABtrig(a);}}}
}
function P7_ABclose(s){ //v1.0.3 by PVII-www.projectseven.com
 var a,d='p7ABt'+s;a=document.getElementById(d);
 if(a&&a.p7ABpr){if(a.p7ABstate==1){P7_ABtrig(a);}}
}
function P7_ABclick(s){ //v1.0.3 by PVII-www.projectseven.com
 var a,d='p7ABt'+s;a=document.getElementById(d);if(a&&a.p7ABpr){P7_ABtrig(a);}
}
function P7_randAB(r){ //v1.0.3 by PVII-www.projectseven.com
 var i,k,j=0,d,dd,tA,a,rD=new Array();dd='p7ABW'+r;d=document.getElementById(dd);
 if(d){tA=d.getElementsByTagName("A");for(i=0;i<tA.length;i++){if(tA[i].p7ABpr&&tA[i].p7ABpr==dd){
 rD[j]=tA[i].id;j++;}}if(j>0){k=Math.floor(Math.random()*j);a=document.getElementById(rD[k]);}}return a;
}
function P7_ABall(s){ //v1.0.3 by PVII-www.projectseven.com
 var i,m,d,dd,st,et,tA,g=s.split("_");if(g&&g.length==2){st=parseInt(g[0]);
 if(st){et=st+1;}else{st=1;et=11;}m=p7AB;p7AB=false;for(i=st;i<et;i++){dd='p7ABW'+i;
 d=document.getElementById(dd);if(d){tA=d.getElementsByTagName("A");for(j=0;j<tA.length;j++){
 if(tA[j].p7ABpr && tA[j].p7ABpr==dd){if(g[1]=='a'&&tA[j].p7ABstate==0){P7_ABtrig(tA[j]);}
 else if(g[1]=='c'&&tA[j].p7ABstate==1){P7_ABtrig(tA[j]);}}}}}p7AB=m;}
}
function P7_ABurl(){ //v1.0.3 by PVII-www.projectseven.com
 var i,h,s,x,d='pab';if(document.getElementById){h=document.location.search;
 if(h){h=h.replace('?','');s=h.split(/[=&]/g);if(s&&s.length){
 for(i=0;i<s.length;i+=2){if(s[i]==d){x=s[i+1];if(x){P7_ABopen(x);}}}}}
 h=document.location.hash;if(h){x=h.substring(1,h.length);
 if(x && x.indexOf("pab")==0){P7_ABopen(x.substring(3));}}}
}
function P7_ABtrig(a){ //v1.0.3 by PVII-www.projectseven.com
 var i,j=null,op,pD,ad,aT,m=true,cp='p7ABc'+a.p7ABpr.substring(a.p7ABpr.length-1);
 var iD=a.id.replace('t','c'),tD=document.getElementById(iD);
 if(tD){m=false;pD=document.getElementById(a.p7ABpr);op=pD.p7Aba;
 if(op[4]==1&&op[1]==1&&a.p7ABstate==1){return m;}tD=pD.getElementsByTagName("DIV");
 for(i=0;i<tD.length;i++){if(tD[i].id&&tD[i].id.indexOf(cp)>-1){if(tD[i].id==iD){j=i;
 if( a.className=="p7ABtrig_down"){a.p7ABstate=0;a.className='';P7_ABhide(tD[j],op);
 }else{a.p7ABstate=1;a.className="p7ABtrig_down";P7_ABshow(tD[j],op);}
 }else{if(op[1]==1){ad=tD[i].id.replace('c','t');aT=document.getElementById(ad);
 aT.className='';aT.p7ABstate=0;P7_ABhide(tD[i],op);}}}}}P7_checkEQH();return m;
}
function P7_checkEQH(){ //v1.0.3 by PVII-www.projectseven.com
 if(typeof(P7_colH2)=='function'){P7_colH2();}if(typeof(P7_colH)=='function'){P7_colH();}
}
function P7_ABshow(d,op){ //v1.0.3 by PVII-www.projectseven.com
 var h,wd,wP,isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);
 if(p7AB&&op[2]==3){d.style.display='block';P7_ABfadeIn(d.id,0);}
 else if((p7AB&&op[2]==1||p7AB&&op[2]==2)&&!isIE5){wd=d.id.replace("c","w");
 wP=document.getElementById(wd);if(P7_hasOverflow(d)||P7_hasOverflow(wP)){
 d.style.display='block';return;}wP.style.overflow="hidden";wP.style.height="1px";
 d.style.display='block';h=d.offsetHeight;P7_ABglide(wd,1,h,op[2]);}else{d.style.display='block';}
}
function P7_ABhide(d,op){ //v1.0.3 by PVII-www.projectseven.com
 var h,wd,wP,isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);
 if((p7AB&&op[2]==1||p7AB&&op[2]==2)&&!isIE5){wd=d.id.replace("c","w");
 wP=document.getElementById(wd);if(d.style.display!="none"){
 if(P7_hasOverflow(d)||P7_hasOverflow(wP)){d.style.display='none';return;}
 h=wP.offsetHeight;wP.style.overflow="hidden";P7_ABglide(wd,h,0,op[2]);}
 }else{d.style.display='none';}
}
function P7_hasOverflow(ob){ //v1.0.3 by PVII-www.projectseven.com
 var s,m;s=ob.style.overflow;if(!s){if(ob.currentStyle){s=ob.currentStyle.overflow;
 }else if(document.defaultView.getComputedStyle(ob,"")){
 s=document.defaultView.getComputedStyle(ob,"").getPropertyValue("overflow");}}
 m=(s&&s=='auto')?true:false;return m;
}
function P7_ABfadeIn(id,op){ //v1.0.3 by PVII-www.projectseven.com
 var d=document.getElementById(id);op+=.05;op=(op>=1)?1:op;
 if((navigator.appVersion.indexOf("MSIE")>-1)){d.style.filter='alpha(opacity='+op*100+')';
 }else{d.style.opacity=op;}if(op<1){setTimeout("P7_ABfadeIn('"+id+"',"+op+")",40);}
}
function P7_ABglide(dd,ch,th,p){ //v1.0.3 by PVII-www.projectseven.com
 var w,m,d,wd,wC,tt,dy=10,inc=10,pc=.15;
 d=document.getElementById(dd);m=(ch<=th)?0:1;
 if(p==1){tt=Math.abs(parseInt(Math.abs(th)-Math.abs(ch)));inc=(tt*pc<1)?1:tt*pc;}
 inc=(m==1)?inc*-1:inc;d.style.height=ch+"px";if(ch==th){if(th==0){
 wd=d.id.replace("w","c");wC=document.getElementById(wd);wC.style.display="none";d.style.height="auto";
 }else{d.style.height="auto";}P7_checkEQH();}else{ch+=inc;if(m==0){ch=(ch>=th)?th:ch;
 }else{ch=(ch<=th)?th:ch;}if(d.p7abG){clearTimeout(d.p7abG);}
 d.p7abG=setTimeout("P7_ABglide('"+dd+"',"+ch+","+th+","+p+")",dy);}
}

function FixAccordionInTabPanel(nrOfItems)
{
    var styleText = "<style type=\"text/css\">\n";
    for (var i = 1; i <= nrOfItems; i++)
    {
        styleText += "#p7ABc1_" + i + " {display:none;}\n";
    }
    styleText += "\n</style>";
    document.write(styleText);
}


function WebForm_FireDefaultButton(event, target)
{
//start custom
    var element = event.target || event.srcElement;
    __defaultFired = false;
    if (!__defaultFired && event.keyCode == 13 && !(element && (element.tagName.toLowerCase() == "textarea")))
    {
//end custom
        var defaultButton;
        if (__nonMSDOMBrowser)
        {
            defaultButton = document.getElementById(target);
        }
        else
        {
            defaultButton = document.all[target];
        }
        if (defaultButton && typeof defaultButton.click != "undefined")
        {
            __defaultFired = true;
            defaultButton.click();
            event.cancelBubble = true;
            if (event.stopPropagation)
            {
                event.stopPropagation();
            }
            return false;
        }
    }
    return true;
}


//ps_m_scirpts_v1_6.js
//<script language="javascript">

function popup(mylink, windowname)
{
  if (!window.focus)
    return true;
  var href;
  if (typeof(mylink) == 'string')
    href=mylink;
  else
    href=mylink.href;
  window.open(href, windowname,'height=530,width=550,resizable=yes,left=100,top=5,scrollbars=yes');
  return false;
}


function betterpopup(mylink, windowname, options)
{
    if (! window.focus)
    {
	    return true;
    }
    if (typeof(mylink) == "string")
    {
        href=mylink;
    }
    else
    {
        href=mylink.href;
    }
    window.open(href, windowname, options);
    return false;
}

function update_frame(myoptions)
{
  var destination = myoptions[myoptions.selectedIndex].value;
  
  if (destination == "null")
  {
    return true;
  }
  
  window.location = destination; 
  myoptions.selectedIndex = 0;

  return true;
}

// Change the location to the selected Wagering Menu drop down option
// If the current URL is encrypted (https), unencrypt the target URL
function WMNv(o)
{
  var sLocation = new String();
  
  if (String(location.protocol).search(/https/) != -1)
  {
    sLocation = "http://" + String(location.host) + "/members/";
  }
  
  var myoptions = o.options;
  var sScript   = String(myoptions[myoptions.selectedIndex].value).substr(0,1);
  var sQP			  = String(myoptions[myoptions.selectedIndex].value).substr(1);
  
  switch(sScript)
  {
		case "0":
			sScript = "gameselection";
			break;
		case "n":
			sScript = "gameselection_new";
			break;
		case "1":
			sScript = "ContestMemberMenu";
			break;
		case "2":
			sScript = "cnContestSelection";
			break;
		case "3":
			sScript = "vwguestlines";
			break;
		case "4":
			sScript = "guestContestLines";
			break;
		case "5":
			sScript = "ContestGuestMenu";
			break;
		case "6":
			sScript = "guestShowTeamSearch";
			break;
		case "7":
			sScript = "showTeamSearch";
			break;			
		case "8":
			sScript = "gameselectiontotal";
			break;		
		case "9":
			sScript = "vwguestlinestotal";
			break;					
		case "a":
			sScript = "vwgameselectionallevents";
			break;		
		case "b":
			sScript = "gameselectionallevents";
			break;					
			
  }
  
  sQP = sQP.replace(/s=/gi, "sportType=").replace(/st=/gi, "sportSubType=").replace(/d=/gi, "descr=").replace(/c=/gi, "contestType=").replace(/c2=/gi, "contestType2=").replace(/c3=/gi, "contestType3=");
  
  var sURL = sScript + ".asp?" + sQP;
  
  var destination = sLocation + sURL;
  
  if ((destination == "null") || (destination == ""))
  {
    return;
  }
  
  window.location = destination;
}
  
//Start Casino button code
var winCasino = null;

function openCasino(){
     if (winCasino && (!winCasino.closed)){
         winCasino.focus();
     }
     else{
         var strFeatures = 
 "resizable=1,scrollbars=0,toolbar=0,location=0,directories=0,menubar=0,status=0,width=780,height=520,top=100,left=100"; 

         var objDate = new Date();
         var lngQuery = objDate.getTime();
         var strFile = "../getdata.asp?cachebust=" + lngQuery.toString();
         winCasino = window.open(strFile, "wincasino", strFeatures);
         window.setTimeout(stageFocus, 1000);
     }
 }

function stageFocus()
{
  winCasino.focus();
}
//End Casino button code
//end ps_m_scirpts_v1_6.js

//geometry.js
//javascript that helps determine size of window, view port, etc.
//helps position the circle notice.
var Geometry = {};
if (window.innerWidth) { // All browsers but IE
    Geometry.getViewportWidth = function( ) { return window.innerWidth; };
    Geometry.getViewportHeight = function( ) { return window.innerHeight; };
    Geometry.getHorizontalScroll = function( ) { return window.pageXOffset; };
    Geometry.getVerticalScroll = function( ) { return window.pageYOffset; };
}
else if (document.documentElement && document.documentElement.clientWidth) {
    // These functions are for IE 6 when there is a DOCTYPE
    Geometry.getViewportWidth =
        function( ) { return document.documentElement.clientWidth; };
    Geometry.getViewportHeight =
        function( ) { return document.documentElement.clientHeight; };
    Geometry.getHorizontalScroll =
        function( ) { return document.documentElement.scrollLeft; };
    Geometry.getVerticalScroll =
        function( ) { return document.documentElement.scrollTop; };
}
else if (document.body.clientWidth) {
    // These are for IE4, IE5, and IE6 without a DOCTYPE
    Geometry.getViewportWidth =
        function( ) { return document.body.clientWidth; };
    Geometry.getViewportHeight =
        function( ) { return document.body.clientHeight; };
    Geometry.getHorizontalScroll =
        function( ) { return document.body.scrollLeft; };
    Geometry.getVerticalScroll =
        function( ) { return document.body.scrollTop; };
}
//end geometry.js

//main.js
//should be investigated to see if we use any of this script
/*
 Please leave this notice.
 DHTML tip message version 1.2 copyright Essam Gamal 2003 (http://migoicons.tripod.com, migoicons@hotmail.com)
 All modifications are done in the style.js you should not modify this file.  Created on : 06/03/2003
 Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.com)
*/ 

var ua = navigator.userAgent
var ps = navigator.productSub 
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
var nn6 = (dom&&!ie5)? 1:0
var sNav = (nn4||nn6||ie4||ie5)? 1:0
var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var PX = (nn6)? "px" :"" 

if(sNav)
{
	window.onresize = ReloadTip
	document.onmousemove = MoveTip
	if(nn4)
		document.captureEvents(Event.MOUSEMOVE) 
}	

if(nn4||nn6)
{
	mx = "e.pageX"
	my = "e.pageY"
	scl = "window.pageXOffset"
	sct = "window.pageYOffset"	
	if(nn4)
	{
		obj = "document.TipLayer."
		sl = "left"
		st = "top"
		ih = "clip.height"
		iw = "clip.width"
		vl = "'show'"
		hl = "'hide'"
		sv = "visibility="
	}
	else obj = "document.getElementById('TipLayer')."
} 

if(ie4||ie5)
{
	obj = "TipLayer."
	mx = "event.x"
	my = "event.y"
	scl = "eval(doc_root).scrollLeft"
	sct = "eval(doc_root).scrollTop"
	if(ie5)
	{
		mx = mx+"+"+scl 
		my = my+"+"+sct
	}
}

if(ie4||dom)
{
	sl = "style.left"
	st = "style.top"
	ih = "offsetHeight"
	iw = "offsetWidth"
	vl = "'visible'"
	hl = "'hidden'"
	sv = "style.visibility="
}

if(ie4||ie5||ps>=20020823)
{
	ww = "eval(doc_root).clientWidth"
	wh = "eval(doc_root).clientHeight"
}	 
else
{ 
	ww = "window.innerWidth"
	wh = "window.innerHeight"
	evlh = eval(wh)
	evlw = eval(ww)
	sbw=15
}

function applyCssFilter()
{
	if(cssFilters&&FiltersEnabled)
	{ 
		var dx = " progid:DXImageTransform.Microsoft."
		TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"
	}
}

function stm(t,s)
{
  if(sNav)
  {
  	if(t.length<2||s.length<25)
	{
		var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
		if(t.length<2&&s.length<25) 
			alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
		else if(t.length<2)
			alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
		else if(s.length<25)
			alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")
 	}
  	else 
	{
		var ab = "" ;var ap = ""
		var titCol = (s[0])? "COLOR='"+s[0]+"'" : ""
		var txtCol = (s[1])? "COLOR='"+s[1]+"'" : ""
		var titBgCol = (s[2])? "BGCOLOR='"+s[2]+"'" : ""
		var txtBgCol = (s[3])? "BGCOLOR='"+s[3]+"'" : ""
		var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : ""	
		var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : ""
		var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : ""
		var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : ""   
		var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : ""
		if(!s[8])  s[8] = "Verdana,Arial,Helvetica"
		if(!s[9])  s[9] = "Verdana,Arial,Helvetica"					
		if(!s[12]) s[12] = 1
		if(!s[13]) s[13] = 1
		if(!s[14]) s[14] = 200
		if(!s[16]) s[16] = 0
		if(!s[17]) s[17] = 0
		if(!s[18]) s[18] = 10
		if(!s[19]) s[19] = 10
		hs = s[11].toLowerCase() 
		if(ps==20001108)
		{
			if(s[2])
				ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
			ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"
		}
		
		var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
		
		var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : ""
		
		var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
		
		if(nn4) 
		{
			with(eval(obj+"document"))
			{
				open()
				write(txt)
				close()
			}
		}
		else eval(obj+"innerHTML=txt")
		tbody = 
		{
			Pos:s[10].toLowerCase(), 
			Xpos:s[18],
			Ypos:s[19], 
			Transition:s[20],
			Duration:s[21], 
			Alpha:s[22],
			ShadowType:s[23].toLowerCase(),
			ShadowColor:s[24],
			Width:parseInt(eval(obj+iw)+3+sbw)
		}
		if(ie4)
		{ 
			TipLayer.style.width = s[14]
	 		tbody.Width = s[14]
		}
		Count=0	
		move=1
 	 }
  }
}

function MoveTip(e) {
	if(move) 
	{
		var X,Y,MouseX = eval(mx),MouseY = eval(my);
		tbody.Height = parseInt(eval(obj+ih)+3)
		tbody.wiw = parseInt(eval(ww+"+"+scl));
		tbody.wih = parseInt(eval(wh+"+"+sct))
		var xRelative  = ((tbody.wiw - 675) / 2) - 40 - tbody.Xpos;

		switch(tbody.Pos)
		{
			case "pinnacle" : X=xRelative; Y=MouseY+tbody.Ypos - 30; break
			case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break
			case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break
			case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break	
			case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break		
			default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos
		}

		if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width
		if(tbody.wih<tbody.Height+Y+sbw) 
		{
			if(tbody.Pos=="float"||tbody.Pos=="fixed")
				Y = tbody.wih-tbody.Height-sbw
			else
				Y = MouseY-tbody.Height
		}
		
		if(X<0)
			X=0 
		eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
		ViewTip()
	}
}

function ViewTip()
{
  	Count++
	if(Count == 1)
	{
		if(cssFilters&&FiltersEnabled)
		{	
			for(Index=28; Index<31; Index++)
			{
				TipLayer.filters[Index].enabled = 0 
			}
			
			for(s=0; s<28; s++)
			{ 
				if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop()
			}
			
			if(tbody.Transition == 51)
				tbody.Transition = parseInt(Math.random()*50)
			
			var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0
			var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0
			var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0 
			
			if(tbody.Alpha>0&&tbody.Alpha<100)
			{
	  			TipLayer.filters[28].enabled = 1
	  			TipLayer.filters[28].opacity = tbody.Alpha
			}

			if(tbody.ShadowColor&&tbody.ShadowType == "simple")
			{
	  			TipLayer.filters[29].enabled = 1
	  			TipLayer.filters[29].color = tbody.ShadowColor
			}
			else if(tbody.ShadowColor&&tbody.ShadowType == "complex")
			{
	  			TipLayer.filters[30].enabled = 1
	  			TipLayer.filters[30].color = tbody.ShadowColor
			}

			if(applyTrans||advFilters)
			{
				eval(obj+sv+hl)
	  			if(applyTrans) TipLayer.filters[0].transition = tbody.Transition
	  			TipLayer.filters[which].duration = tbody.Duration 
	  			TipLayer.filters[which].apply()
			}
		}
 		eval(obj+sv+vl)
		if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play()
		if(hs == "sticky") move=0
  	}
}

function stickyhide() {
	eval(HideTip)
}

function ReloadTip() {
	 if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
	 else if(hs == "sticky") eval(HideTip)
}

function htm()
{
	if(sNav)
	{
		if(hs!="keep")
		{
			move=0; 
			if(hs!="sticky") eval(HideTip)
		}	
	} 
}
//end main.js

//circleNotice.js
function circleNotice( target, maximum, event )
{
	//this depends on a div with and id of circleTip present in the document.

	var clientY = 0;
	var scrollTop = 0;
	scrollTop = document.documentElement.scrollTop;

	if( event.clientY )
	{ 
		clientY = event.clientY - 15;
	}

	var table = '<table border=0 width="60" cellpadding="0" cellspacing="0"><tr><td style="font-size: 11px; font-family: arial; font-weight: bold; color: white; background-color: #FF6600; text-align: center;">Maximum</td></tr>';
	table += '<tr><td style="text-align: center; font-family: arial; font-size: 11px; center; background-color: #E8E8FF;">';
	table += Math.floor(maximum);
	table += '</td></tr></table>';
	var divId = document.getElementById("circleTip");
	divId.innerHTML = table;
	divId.style.top = clientY + scrollTop + 'px';

	if( !window.event )
	{
		divId.style.left = Math.floor(Geometry.getViewportWidth()/2 - 387) + 'px';
	}

	divId.style.display = "block";

	if (event.stopPropagation)
	{
		event.stopPropagation( ); // DOM Level 2
	}
	else if( event )
	{
		event.cancelBubble = true;
	}
}

function hideCircleNotice()
{
	var divId = document.getElementById("circleTip");
	divId.style.display = "none";
}
//circleNotice.js