// show()
//
// Function: This function opens the menu and sets its position
function show( div, refpoint )
{
	var dom;
	if ( objElement ) hide(); // hide all other menus
	
	if ( NS4 ) { // Netscape 4 browser family..
		dom = d.layers[div];
		/* DROP THE FOLLOWING TWO LINES IF YOU POSITION THE MENU IN CSS */
		/* If you would like to change the refpoint id:s change it here also */
		if(d.layers['VSMRefPointNS'+refpoint]){
			dom.left = d.layers['VSMRefPointNS'+refpoint].pageX + 120; // you have to calculate these adjustment values by yourself
			dom.top = d.layers['VSMRefPointNS'+refpoint].pageY;
		}
		dom.visibility = "show";
	}
	else if ( NS6 ) { // Netscape 6 and Dom level 2 compatible browsers
		dom = d.getElementById( div );
		/* DROP THE FOLLOWING TWO LINES IF YOU POSITION THE MENU IN CSS */
		/* If you would like to change the refpoint id:s change it here also */
		if(d.getElementById('VSMRefPointIE'+refpoint)){
			dom.style.left = d.getElementById('VSMRefPointIE'+refpoint).offsetLeft + 120; // you have to calculate these adjustment values by yourself
			dom.style.top = d.getElementById('VSMRefPointIE'+refpoint).offsetTop;
		}
		dom.style.visibility = "visible";
	}
	else if ( IE4 || IE5 ) {
		dom = d.all[div];
		/* DROP THE FOLLOWING TWO LINES IF YOU POSITION THE MENU IN CSS */
		/* If you would like to change the refpoint id:s change it here also */
		if(d.all['VSMRefPointIE'+refpoint]){
			dom.style.pixelLeft = d.all['VSMRefPointIE'+refpoint].offsetLeft - 2; // you have to calculate these adjustment values by yourself
			dom.style.pixelTop = d.all['VSMRefPointIE'+refpoint].offsetTop;
		}
		dom.style.visibility = "visible";
	}
	
	dom.onmouseover = function(){if(nTimerID>-1){clearTimeout(nTimerID);nTimerID=-1;}}; // hook the timer
	dom.onmouseout = function(){spawnHide(div);};
}

// spawnHide()
//
// Function: This function starts the timer which eventually closes the menu
function spawnHide( div )
{
	if ( nTimerID > -1 ) {
		clearTimeout( nTimerID );
		nTimerID = -1;
	}
	
	if ( NS4 ) objElement = d.layers[div];
		else if ( NS6 ) objElement = d.getElementById(div);
		else if ( IE4 || IE5 ) objElement = d.all[div];
		
	nTimerID = setTimeout( "hide()", nTimerRate );
}

// hide()
//
// Function: This function hides the menu and destroys the timer that was set in spawnHide()
function hide()
{
	if ( nTimerID > -1 ) {
		clearTimeout( nTimerID );
		nTimerID = -1;
	}
	
	if ( NS4 ) objElement.visibility = "hidden";
		else if ( NS6 ) objElement.style.visibility = "hidden";
		else if ( IE4 || IE5 ) objElement.style.visibility = "hidden";
}

// mClk()
//
// Function: This function opens the link's location if parent cell is clicked
function mClk( e )
{
	if (IE4 || IE5) {
		d.location = e.all.tags('A').item(0).href;
	}
	else if (NS6) {
		d.location = e.getElementsByTagName('A').item(0).href;
	}
}
<!--
function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);
//-->

