function bgChange(m,lin,img) {
	document.getElementById(m).src=img;
	document.getElementById(lin).style.color="#FC9204";
}

function bg1Change(m,lin,img) {
	document.getElementById(m).src=img;
	document.getElementById(lin).style.color="#96AEBE";
}



function Is () 
{
	var agt=navigator.userAgent.toLowerCase(); 
	// *** BROWSER VERSION *** 
    this.major = parseInt(navigator.appVersion); 
    this.minor = parseFloat(navigator.appVersion); 

    this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
    this.nav2 = (this.nav && (this.major == 2)); 
    this.nav3 = (this.nav && (this.major == 3)); 
    this.nav4 = (this.nav && (this.major == 4)); 
    this.nav4up = (this.nav && (this.major >= 4)); 
    this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
    this.nav5 = (this.nav && (this.major == 5)); 
    this.nav5up = (this.nav && (this.major >= 5)); 

    this.ie   = (agt.indexOf("msie") != -1); 
    this.ie3  = (this.ie && (this.major < 4)); 
    this.ie4  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
    this.ie4up  = (this.ie  && (this.major >= 4)); 
    this.ie5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
    this.ie5up  = (this.ie  && !this.ie3 && !this.ie4); 

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser 
    // or if this is the first browser window opened.  Thus the 
    // properties is.aol, is.aol3, and is.aol4 aren't 100% reliable. 
    this.aol   = (agt.indexOf("aol") != -1); 
    this.aol3  = (this.aol && this.ie3); 
    this.aol4  = (this.aol && this.ie4); 

    this.opera = (agt.indexOf("opera") != -1); 
    this.webtv = (agt.indexOf("webtv") != -1); 

    // *** JAVASCRIPT VERSION CHECK *** 
    if (this.nav2 || this.ie3) this.js = 1.0 
    else if (this.nav3 || this.opera) this.js = 1.1 
    else if ((this.nav4 && (this.minor <= 4.05)) || this.ie4) this.js = 1.2 
    else if ((this.nav4 && (this.minor > 4.05)) || this.ie5) this.js = 1.3 
    else if (this.nav5) this.js = 1.4 
    // NOTE: In the future, update this code when newer versions of JS 
    // are released. For now, we try to provide some upward compatibility 
    // so that future versions of Nav and IE will show they are at 
    // *least* JS 1.x capable. Always check for JS version compatibility 
    // with > or >=. 
    else if (this.nav && (this.major > 5)) this.js = 1.4 
    else if (this.ie && (this.major > 5)) this.js = 1.3 
    // HACK: no idea for other browsers; always check for JS version with > or >= 
    else this.js = 0.0; 

    // *** PLATFORM *** 
    this.win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) ); 
    this.win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1)); 
    this.win16 = ((agt.indexOf("win16")!=-1) || 
                  (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || 
                  (agt.indexOf("windows 16-bit")!=-1) ); 

    this.win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) || 
                  (agt.indexOf("windows 16-bit")!=-1)); 

    this.win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1)); 
    this.winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1)); 
    this.win32 = ( this.win95 || this.winnt || this.win98 || 
                   ((this.major >= 4) && (navigator.platform == "Win32")) || 
                   (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1) ); 

    this.os2   = ((agt.indexOf("os/2")!=-1) || 
                  (navigator.appVersion.indexOf("OS/2")!=-1) || 
                  (agt.indexOf("ibm-webexplorer")!=-1)); 

    this.mac    = (agt.indexOf("mac")!=-1); 
    this.mac68k = (this.mac && ((agt.indexOf("68k")!=-1) || 
                               (agt.indexOf("68000")!=-1))); 
    this.macppc = (this.mac && ((agt.indexOf("ppc")!=-1) || 
                               (agt.indexOf("powerpc")!=-1))); 
} 
var is; 
var isIE3Mac = false; 
// this section is designed specifically for IE3 for the Mac 
if ((navigator.appVersion.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1) && (parseInt(navigator.appVersion)==3)) 
       isIE3Mac = true; 
else is = new Is();

function positionMenu()
{
  ch = ((document.body.clientHeight < document.documentElement.clientHeigh && document.body.clientHeight > 0) || (!document.documentElement.clientHeigh));
  t = ch ? document.body.clientHeight : document.documentElement.clientHeight;
  iniSlideMenuY += (t - 205);
  if (document.getElementById) {
    var mnu = document.getElementById('kl82');	
    mnu.style.top = iniSlideMenuY + "px";
    mnu.style.visibility = 'visible';
  }
  else if (is.nav4up) {
    document.slideMenu.top = iniSlideMenuY;
    document.slideMenu.visibility = 'show';
  }
  else if (is.ie4up) {
    document.all.slideMenu.style.pixelTop = iniSlideMenuY;
    document.all.slideMenu.style.visibility = 'visible';
  }
  else if (is.opera) {
    var mnu = document.getElementById('kl82');	
    mnu.style.top = iniSlideMenuY + "px";
    mnu.style.visibility = 'visible';
  }
  iniSlideMenuY =0;
}

onLoad = function()
{
  positionMenu();
  if (is.nav4up) {
    controlSlideMenu();
  }
  else if (is.ie4up) {
    window.onscroll = controlSlideMenu;
  } else if (is.opera){
    controlSlideMenu();
  }
}

var iniSlideMenuY=0;

function controlSlideMenu()
{
  var topOfClientArea;
  // Get current value of top of client area
  if (is.nav4up || is.opera) {
    topOfClientArea = window.pageYOffset;
  }
  else if (is.ie4up) {
	ch = ((document.body.scrollTop < document.documentElement.scrollTop && document.body.scrollTop > 0) || (!document.documentElement.scrollTop));
    topOfClientArea = ch ? document.body.scrollTop : document.documentElement.scrollTop;
  }
  ch = ((document.body.clientHeight < document.documentElement.clientHeigh && document.body.clientHeight > 0) || (!document.documentElement.clientHeigh));
  t = ch ? document.body.clientHeight : document.documentElement.clientHeight;
  topOfClientArea += (t - 205);

  slideElementTo('kl82', topOfClientArea + iniSlideMenuY);

  if (is.nav || is.opera) {
    setTimeout("controlSlideMenu()",250);
  }
}

var slideTarget=0, elementSliding=false;

function slideElementTo(elementId, yPosition)
{
  slideTarget = yPosition;
  if (!elementSliding) {
    slideElement(elementId);
  }
}

function slideElement(elementId)
{
  var delta, elementY;

  // Get the element's current y position
  if (document.getElementById) {
    var ele = document.getElementById(elementId);
    elementY = parseInt(ele.style.top);
  }
  else if (is.nav4up) {
    elementY = document.layers[elementId].top;
  }
  else if (is.ie4up) {
    elementY = document.layers[elementId].top;
  }
  else if (is.opera) {
    var ele = document.getElementById(elementId);
    elementY = parseInt(ele.style.top);
  }
  else {
    return;
  }
  // Set the busy-bit
  elementSliding = true;
  // Move slower as the element gets
  // closer to the target position
  delta = Math.abs(elementY - slideTarget) / 2;
  if (delta < 1) delta = 1;
  // Determine the direction to move,
  // up or down, and move one delta
  if (elementY < slideTarget) {
    moveElementTo(elementId, elementY + delta);
  }  
  else if (elementY > slideTarget) {
    moveElementTo(elementId, elementY - delta);
  }
  else {
    // When the element reaches its target position
    // turn busy-bit off and return
    elementSliding = false;
    return;
  }
  // Until the element reaches its target,
  // continue to reschedule a call to this function
  setTimeout("slideElement('"+elementId+"')",50);
}

function moveElementTo(elementId, yPosition)
{
  if (document.getElementById) {
    var ele = document.getElementById(elementId);
    ele.style.top = yPosition + "px";
  }
  else if (is.nav4up) {
    document.layers[elementId].top = yPosition;
  }
  else if (is.ie4up) {
    document.all[elementId].style.pixelTop = yPosition;
  }
  else if (is.opera) {
    var ele = document.getElementById(elementId);
    ele.style.top = yPosition + "px";
  }
}
