/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
var UpUp=0;
var x=230;
var y=105;

function showHand(object) {
        document.getElementById(object).style.cursor = 'nw-resize';
        return true;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
function ShowUp(object)
{
     if (document.all && document.all[object]) {
         document.all[object].style.posLeft = x;
         document.all[object].style.posTop = y;
         document.all[object].style.zIndex = UpUp;
         UpUp++;
         document.all[object].style.visibility = 'visible';
     }
     else if (document.layers && document.layers[object] != null) {
         document.layers[object].left = x;
         document.layers[object].top = y;
         document.layers[object].zIndex = UpUp;
         UpUp++;
         document.layers[object].visibility = 'visible';
     }
     else if (document.getElementById && (document.getElementById(object) !=null))
     {
        document.getElementById(object).style.left = x;
        document.getElementById(object).style.top = y;
        document.getElementById(object).style.zIndex = UpUp;
        UpUp++;
        document.getElementById(object).style.visibility = 'visible';
     };
}
function ShowUp1(object)
{
     if (document.all && document.all[object]) {
         document.all[object].style.visibility = 'visible';
     }
     else if (document.layers && document.layers[object] != null) {
         document.layers[object].visibility = 'visible';
     }
     else if (document.getElementById && (document.getElementById(object) !=null))
     {
        document.getElementById(object).style.visibility = 'visible';
     };
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
function HideDown(object)
{
     if (document.all && document.all[object]) {
         document.all[object].style.posLeft = x;
         document.all[object].style.posTop = y;
         document.all[object].style.zIndex = UpUp-1;
         UpUp++;
         document.all[object].style.visibility = 'hidden';
     }
     else if (document.layers && document.layers[object] != null) {
         document.layers[object].left = x;
         document.layers[object].top = y;
         document.layers[object].zIndex = UpUp-1;
         UpUp++;
         document.layers[object].visibility = 'hidden';
     }
     else if (document.getElementById && (document.getElementById(object) !=null))
     {
        document.getElementById(object).style.left = x;
        document.getElementById(object).style.top = y;
        document.getElementById(object).style.zIndex = UpUp-1;
        UpUp++;
        document.getElementById(object).style.visibility = 'hidden';
     }
}
function HideDown1(object)
{
     if (document.all && document.all[object]) {
         document.all[object].style.visibility = 'hidden';
     }
     else if (document.layers && document.layers[object] != null) {
         document.layers[object].visibility = 'hidden';
     }
     else if (document.getElementById && (document.getElementById(object) !=null))
     {
        document.getElementById(object).style.visibility = 'hidden';
     }
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */




/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
/* %                                  % */
/* %  FIX FOR THE NETSCAPE RESIZE BUG % */
/* %                                  % */
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
function WM_netscapeCssFix()
  {
      // This part was inspired by Matthew_Baird@wayfarer.com
      // It gets around another unfortunate bug whereby Netscape 
      // fires a resize event when the scrollbars pop up. This 
      // checks to make sure that the window's available size 
      // has actually changed.

      if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth ||
              document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight)
          {
          document.location = document.location;
          }
  }

  function WM_netscapeCssFixCheckIn()
  {
      // This function checks to make sure the version of Netscape 
      // in use contains the bug; if so, it records the window's 
      // width and height and sets all resize events to be handled 
      // by the WM_netscapeCssFix() function.

      if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4))
          {
          if (typeof document.WM == 'undefined')
              {
              document.WM = new Object;
              }

          if (typeof document.WM.WM_scaleFont == 'undefined')
              {
              document.WM.WM_netscapeCssFix = new Object;
              document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
              document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
              }

          window.onresize = WM_netscapeCssFix;
          }
  }

  WM_netscapeCssFixCheckIn()


/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
/* %                                  % */
/* %  FIX FOR THE NETSCAPE RESIZE BUG % */
/* %                                  % */
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~                                  ~ */
/* ~         Added May 1 2001         ~ */
/* ~                                  ~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
function openPromoWindow(myUrl) {
	myHeight=310;
	myWidth=250;
	myWindow = window.open(myUrl,'ThisWindow',"directories=0,height="+myHeight+",width="+myWidth+",location=0,menubar=0,resizable=0,scrollbars=0,status=1,toolbar=0,screenX=300,screenY=250,top=250,left=300");
};



/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~                                  ~ */
/* ~         Added May 9 2001         ~ */
/* ~                                  ~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

/* ========================================================== */
function Rollover(image_name, newSrc) {
                if (document.images) {
                        document.images[image_name].src = newSrc;
                        }
        }
/* ========================================================== */
/* THIS IS THE CODE FOR THE PRODUCT ROTATION ON THE PRODUCTS  */
/* PAGE. PLEASE LEAVE IT BE. THANKS!                          */
var imageSpecifiers = new Array ( 'fl','r','b','l','f');
var arrLimit = imageSpecifiers.length;
var w = new Array();
w['green']=0; w['red']=0; w['blue']=0;
myPre = 'images/prod_shot_'
mySuf = '.jpg';
function rotateImages(myCol,imgName,myInc) {
	if ((w[myCol]+myInc) > arrLimit-1)
		{w[myCol]=0}
	else if ((w[myCol]+myInc) < 0)
		{w[myCol]=arrLimit-1}
	else
		{w[myCol]=w[myCol]+myInc};
Rollover(imgName,(myPre+myCol+'_'+imageSpecifiers[w[myCol]]+mySuf));
}
/* ========================================================== */
function WM_preloadImages() {

// WM_preloadImages()
// LOADS IMAGES INTO THE BROWSER'S CACHE FOR LATER USE.
// Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);

  // DON'T BOTHER IF THERE'S NO DOCUMENT.IMAGES
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // LOOP THROUGH ALL THE ARGUMENTS.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // FOR EACH ARG, CREATE A NEW IMAGE.
      document.WM.loadedImages[arg] = new Image();
      // THEN SET THE SOURCE OF THAT IMAGE TO THE CURRENT ARGUMENT.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}
/* ========================================================== */

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~                                  ~ */
/* ~         Added April 1 2005       ~ */
/* ~                                  ~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

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_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];}
}

/* ========================================================== */