browserName=navigator.appName; 
browserVer=parseInt(navigator.appVersion);
  if ((browserName=="Netscape" && browserVer>=3) || (browserName=="Microsoft Internet Explorer" && browserVer>=4))    
  version="n3";
  else
    version="n2";
  if (version=="n3")
   {
     
     HomeOn= new Image(20,21);
     HomeOn.src="images/Buttons/Gold.gif";
     ContactOn= new Image(20,21);
     ContactOn.src="images/Buttons/Gold.gif";
     CouponOn= new Image(20,21);
     CouponOn.src="images/Buttons/Gold.gif";
     DancerOn= new Image(20,21);
     DancerOn.src="images/Buttons/Gold.gif";
     EntranceOn= new Image(20,21);
     EntranceOn.src="images/Buttons/Gold.gif";
     EventOn= new Image(20,21);
     EventOn.src="images/Buttons/Gold.gif";
     FoodOn= new Image(20,21);
     FoodOn.src="images/Buttons/Gold.gif";
     ForumOn= new Image(20,21);
     ForumOn.src="images/Buttons/Gold.gif";
     LinkOn= new Image(20,21);
     LinkOn.src="images/Buttons/Gold.gif";
     NewsOn= new Image(20,21);
     NewsOn.src="images/Buttons/Gold.gif";
     SurveyOn= new Image(20,21);
     SurveyOn.src="images/Buttons/Gold.gif";
     StoreOn= new Image(20,21);
     StoreOn.src="images/Buttons/Gold.gif";


     HomeOff= new Image(20,21);
     HomeOff.src="images/Buttons/Silver.gif";
     ContactOff= new Image(20,21);
     ContactOff.src="images/Buttons/Silver.gif";
     CouponOff= new Image(20,21);
     CouponOff.src="images/Buttons/Silver.gif";
     DancerOff= new Image(20,21);
     DancerOff.src="images/Buttons/Silver.gif";
     EntranceOff= new Image(20,21);
     EntranceOff.src="images/Buttons/Silver.gif";
     EventOff= new Image(20,21);
     EventOff.src="images/Buttons/Silver.gif";
     FoodOff= new Image(20,21);
     FoodOff.src="images/Buttons/Silver.gif";
     ForumOff= new Image(20,21);
     ForumOff.src="images/Buttons/Silver.gif";
     LinkOff= new Image(20,21);
     LinkOff.src="images/Buttons/Silver.gif";
     NewsOff= new Image(20,21);
     NewsOff.src="images/Buttons/Silver.gif";
     SurveyOff= new Image(20,21);
     SurveyOff.src="images/Buttons/Silver.gif";
     StoreOff= new Image(20,21);
     StoreOff.src="images/Buttons/Silver.gif";
             
   }

function lightup(imgName)
 {
   if (version=="n3")
    {
      imgOn=eval(imgName + "On.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (version=="n3")
    {
      imgOff=eval(imgName + "Off.src");
      document[imgName].src= imgOff;
    }
 }

//  Auto roll-OVER or pages that are active.
// Must be in Footer of page,

// extract the file name from a URL
//(if input is '/files/index.html', output is 'index')
function ROextractPageName(hrefString)
{
// //  var arr = hrefString.split('.');
// //  arr = arr[arr.length-2].split('/');
//  var arr = hrefString.split('/');
//  return arr[arr.length-1].toLowerCase();
  return hrefString;
}

// search through all the links in array, if one points to
// the same file, apply the class .current to it and to its
// parent
function ROsetActiveMenu(arr, crtPage)
{
  for(var i=0; i < arr.length; i++)
  if(ROextractPageName(arr[i].href) == crtPage)
  {

 if (arr[i].onmouseout!=null && arr[i].onmouseout!=null)
   {
    arr[i].onmouseout = arr[i].onmouseover ;
    arr[i].onmouseover();
   }    
   else
   {    arr[i].className = 'CurrentPage';
    arr[i].parentNode.className = 'CurrentPage';

   }
  }
}

// call this method from your page
function ROsetPage()
{
  if(document.location.href)
    hrefString = document.location.href;
      else
    hrefString = document.location;

//    if (document.getElementById('navbar')!=null)
//    {//alert(hrefString);
//    ROsetActiveMenu(document.getElementById('navbar').getElementsByTagName('a'),ROextractPageName(hrefString));
    ROsetActiveMenu(document.getElementsByTagName('a'),ROextractPageName(hrefString));
//    }
}

/* window 'load' attachment */
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

addLoadEvent(ROsetPage);