function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function getPop(thePath) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(thePath, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=840,height=800,left = 112,top = -16');");
}

// Preload images
//MM_preloadImages('/img/header/pool_tables_f2.gif','/img/header/matching_furniture_f2.gif','/img/header/poker_f2.gif','/img/header/bars_stools_f2.gif','/img/header/game_tables_f2.gif','/img/header/lights_f2.gif','/img/header/accessories_f2.gif','/img/header/massage_chairs_f2.gif','/img/header/home_f2.gif','/img/header/shopping_cart_f2.gif');
MM_preloadImages('/images/pool_collections_on.gif','/images/poker_on.gif','/images/home_bar_on.gif','/images/cues_on.gif','/images/game_tables_on.gif','/images/lights_on.gif','/images/accessories_on.gif','/images/new_arrivals_on.gif','/images/sports_on.gif');


// Global variables
var isDOM=document.getElementById?1:0;
var isIE=document.all?1:0;
var isNS4=(navigator.appName=='Netscape'&&!isDOM)?1:0;
var lastDivName = 'Empty';

// Submenu DIV swapping function.
function swapSubmenu(name) {
  nextDiv = 'submenu' + name;
  lastDiv = 'submenu' + lastDivName;

  if (isDOM) {
    document.getElementById(lastDiv).style.visibility = "hidden";
  } else if (isIE) {
    eval(lastDiv + '.style.visibility = "hidden"');
  } else if (isNS4) {
    eval('document.' + lastDiv + '.visibility = "hidden"');
  }

  if (isDOM) {
    document.getElementById(nextDiv).style.visibility = "visible";
  } else if (isIE) {
    eval(nextDiv + '.style.visibility = "visible"');
  } else if (isNS4) {
    eval('document.' + nextDiv + '.visibility = "show"');
  }

  lastDivName = name;
}


function OpenCertDetails()
{
	thewindow = window.open('https://www.thawte.com/cgi/server/certdetails.exe?code=USRECTX3', 'anew', config='height=500,width=500,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes');
}


function setSize(){
   //alert('width = ' + document.all['myId'].clientWidth + ' height = ' +  document.all['myId'].clientHeight);
   document.images.fspace.height = document.getElementById('myId').clientHeight;
   document.getElementById('desc2').style.top = document.getElementById('myId').clientHeight+125;
}

function setReviewSize(){
   //alert('width = ' + document.all['myId'].clientWidth + ' height = ' +  document.all['myId'].clientHeight);
   document.images.fspace.height = document.all['myId'].clientHeight;
}

function setSize2(){
   //alert('width = ' + document.all['myId'].clientWidth + ' height = ' +  document.all['myId'].clientHeight);
   document.images.fspace.height = document.all['proddesc'].clientHeight;
}

function setSize3(){
   //alert('width = ' + document.all['myId'].clientWidth + ' height = ' +  document.all['myId'].clientHeight);
   document.images.fspace.height = document.all['myId'].clientHeight;
}
