 
// MouseOver Script

var openTab = null;
var openTabNum = null;
 
function RotateImage(imgName,imgNum,show) {
	CheckTabs();
	imgName.src = menu01Counter[imgNum].src;
	if(!(show)){ 
		openTabNum = imgNum;
		openTab = imgName;
	} else {
		openTabNum = null;
		openTab = null;
	}
	//the show parameter tells whether the tab is on or off
}
 
 function CheckTabs() {
   
 	if ((openTabNum == null) && (openTab == null)) {
		return true;
	}
	//alert ("name: " + openTab + " num: " + openTabNum);
	openTab.src = menu01Counter[(openTabNum) - 1].src;
	openTab = null;
	openTabNum = null;
  } 
  var openMenu = null;


  /* Show or hide a menu.
    - Called as a result of clicking on the always visible item.
    - sMenuId is the Id of the HTML element to show/hide.
    - when a menu is shown, it's id is stored in 'openMenu' for later use
  */
  function ToggleMenu(sMenuId, show, evt) {
    var e = (window.event) ? window.event : evt;
    e.cancelBubble = true;


    if ((openMenu != null) && (openMenu != sMenuId)) 
    {
      /* a menu is currently showing, and it's not the one passed in */
      CheckMenu(openMenu);
    }
    /* get the element in question */
    var oEL = document.getElementById(sMenuId);
    if (oEL) {
      switch(show) {
        case false:
          /* it's currently visible. hide it */
          oEL.style.display = 'none';
          openMenu = null;
          return false;
          break;
        default:
          /* it's hidden. show it. */
          oEL.style.display = 'block';
          openMenu = sMenuId;
          return false;
      }
    }
    return true;
  }
 
  /* Hide the currently shown menu.
    - Called as a result of clicking anywhere on the page except for the menu title or the menu itself.
    - uses 'openMenu' to reference the currently shown menu.
  */
  function CheckMenu() {
    if (openMenu == null) {
      /* there's no menu visible */
      return true;
    }
    /* get the element in question */
    var oEL = document.getElementById(openMenu);
    if (oEL) {
      /* hide it */
      oEL.style.display = 'none';
      openMenu = null;
    }
  }
  
 function ContentON(contentName,imgName,imgNum) {
	 contentName.style.display = 'block';
	 imgName.src = menu01Counter[imgNum].src;
 }
 
 function ContentOFF(contentName,imgName,imgNum) {
 	contentName.style.display = 'none';
	imgName.src = menu01Counter[imgNum].src;
 }
 
 function MenuItemActive(currTable,currColor){
	currTable.style.background = currColor;
	currTable.style.cursor = "hand";
	currTable.style.cursor = "pointer";
	

}

function MenuItemNotActive(currTable,currColor){
	currTable.style.background = currColor;
	currTable.style.cursor = "default";
}

function _image_popWin(URL, WW, WH, ele) {
var myLeft = (screen.width-WW)/2;
var myTop = (screen.height-WH)/2;
    
window.open(URL,'imagewin','toolbar=no,addressbar=no,menu=no,statusbar=no,scrollbars=yes,width=' + WW + ',height=' + WH + ',left=' + myLeft + ',top=' + myTop);
}

function SendToFriend(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0,scrollbars=0,location=0,statusbars=0,menubars=0,resizable=0,width=460,height=549,left=200,top=80');");
}

function openWindow(newWindow){
 
  window.open(newWindow, "myFile", "height=300, width=500, scrollbars=no, top=0");
  }

function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

