/***************************************************/
/* Code for showing and hiding layers for sub-menu display */
/* written by L. J. Sun  */

// first define these tabs for the sub-menu 	
tabs = new Array ();
tabs[0] = "cat1";
tabs[1] = "cat2";
/*tabs[2] = "cat3";
tabs[3] = "cat4";
tabs[4] = "cat5";
tabs[5] = "cat6";
tabs[6] = "cat7";
tabs[7] = "cat8";*/

//browser Name
browser = navigator.appName;
//browser version
version = navigator.appVersion.substring(0,1);
ie = "Microsoft Internet Explorer";
netscape = "Netscape";
if (version < 4 ) {
	msg = 'Your browser version does not meet the minimum requirement for navigation of this site.\n' + 'Please upgrade your broswer to either Internet Explorer 4.0 and above, or Netscape 4.0 and above.\n';
	alert(msg);
}

if(!window.saveInnerWidth) {
  window.onresize = resize;
  window.saveInnerWidth = window.innerWidth;
  window.saveInnerHeight = window.innerHeight;
}

function resize() {
    if (saveInnerWidth < window.innerWidth ||
        saveInnerWidth > window.innerWidth ||
        saveInnerHeight > window.innerHeight ||
        saveInnerHeight < window.innerHeight )
    {
        window.history.go(0);
    }
}
function show(tab) {
        if (browser == netscape) {
                document.layers[tab].visibility = 'visible';
        }
    else if (browser == ie) {
                document.all[tab].style.visibility = 'visible';
    }
}
function hide(tab) {
        if (browser == netscape) {
                document.layers[tab].visibility = 'hidden';
        }
        else if (browser == ie) {
                document.all[tab].style.visibility = 'hidden';
        }
}
function display(tab) {
      for (var i = 0; i < tabs.length; i++) {
              if (tabs[i] == tab) {
                      show(tabs[i]);   
              }
              else {
                      hide(tabs[i]);
              }
      }
}

/****************************************************************************/
/********* Generating the sub-menus see "menu_gen.js" ************************/
/* ***************************************************************************/