<!--
/*
==---------------------------------------------------------==
hMENU SYSTEM V1.0 (c) 2002-2003 Kevin Holmes
Used by permission
==---------------------------------------------------------==
*/

/* DECLARE variables used for menu system */
var Browser = new BrowserInfo();
var menuPopupTimer = null;
var menuDoFadeEffect = true;
var menuNavActiveImg = null;
var menuNavButtons = new Array();


/*
Section A: BROWSER DETECTION
*/
function BrowserInfo() {
	this.IsIE4 = false;
	this.IsIE5 = false;
	this.IsIE6 = false;
	this.IsIE55Up = false;
	this.IsIE5Up = false;
	this.IsIE4Up = false;
	this.IsNS4 = ( navigator.userAgent.indexOf( 'Mozilla/4' ) > -1 && navigator.appName == 'Netscape' ) ? true : false;
	this.IsNS6 = ( navigator.userAgent.indexOf( 'Netscape6/6' ) > -1 ) ? true : false;
	this.IsNS7 = ( navigator.userAgent.indexOf( 'Mozilla/5' ) > -1 && this.IsNS6 == false ) ? true : false;
	this.IsNS6Up = ( this.IsNS6 == true || this.IsNS7 == true ) ? true : false;
	this.IsNS7Up = ( this.IsNS7 == true ) ? true : false;
	this.IsSafari = ( navigator.userAgent.indexOf( 'Safari' ) > -1 ) ? true : false;
	
	this.IsUnsupported = false;
	this.Platform = navigator.platform.substr( 0, 3 ).toLowerCase();
	this.PlatformDetailed = navigator.platform;
	
	if( navigator.userAgent.indexOf( 'MSIE' ) > -1 ) {
		var appVer = parseInt( navigator.userAgent.substr( navigator.userAgent.indexOf( 'MSIE' ) + 5, 3 ) );
		eval( 'this.IsIE' + Math.floor( appVer ) + ' = true;' );
		if( appVer >= 4 ) { this.IsIE4Up = true; }
		if( appVer >= 5 ) { this.IsIE5Up = true; }
		if( appVer > 5 ) { this.IsIE55Up = true; }
	}
	else if( this.IsNS6Up == false && this.IsNS4 == false && this.IsSafari == false ) {
		this.IsUnsupported = true;
	}
}


/*
Section B: MENU STUFF
*/
function MenuSystem() {
	/* Add collection arrays */
	this.menus = new Array();
	this.activeMenus = new Array();

	/* Properties I: For all menus */
	this.activeMenuItem = null;
	this.menuCount = 0;	
	this.menuTimeout = 250;
	this.menuShadow = false;
	this.menuShadowWidth = 0;
	this.fadeMenuEffect = 0;
	this.fadeFirstOnly = false;
	this.fadeDuration = .5;

	/* Properties II: Defaults for menus (can be set in each menu) */
	this.defaultAlphaBegin = 85;
	this.defaultAlphaEnd = 85;
	this.defaultAlphaXBegin = 0;
	this.defaultAlphaXEnd = 100;
	this.defaultAlphaYBegin = 0;
	this.defaultAlphaYEnd = 100;
	this.defaultAlphaStyle = 0;
	this.defaultWidth = 600;
	this.defaultFont = 'verdana,arial,helvetica,ms sans-serif';
	this.defaultSize = '7pt';
	this.defaultBorderColor = '#185D9F';
	this.defaultBackColor = '#2F84C0';
	this.defaultForeColor = '#FFFFFF';
	this.defaultHiBackColor = '#FFFFFF';
	this.defaultHiForeColor = '#2EA6F6';
	
	/* Methods */
	this.createMenu = method_createMenu;
	this.Go = method_buildMenus;
}


function method_createMenu( menuName ) {
	if( menuName == '' ) { alert( 'Attempt to create menu failed: No menu name specified.' ); return; }
	this.menus[ menuName ] = new Menu();
	this.menus[ menuName ].Name = menuName;
	this.menus[ menuName ].x = 1;
	this.menus[ menuName ].y = 1;
	this.menus[ menuName ].width = this.defaultWidth;
	this.menus[ menuName ].alphaBegin = this.defaultAlphaBegin;
	this.menus[ menuName ].alphaEnd = this.defaultAlphaEnd;
	this.menus[ menuName ].alphaXBegin = this.defaultAlphaXBegin;
	this.menus[ menuName ].alphaXEnd = this.defaultAlphaXEnd;
	this.menus[ menuName ].alphaYBegin = this.defaultAlphaYBegin;
	this.menus[ menuName ].alphaYEnd = this.defaultAlphaYEnd;
	this.menus[ menuName ].alphaStyle = this.defaultAlphaStyle;	
	this.menus[ menuName ].font = this.defaultFont;
	this.menus[ menuName ].size = this.defaultSize;
	this.menus[ menuName ].borderColor = this.defaultBorderColor;
	this.menus[ menuName ].backColor = this.defaultBackColor;
	this.menus[ menuName ].foreColor = this.defaultForeColor;
	this.menus[ menuName ].hiBackColor = this.defaultHiBackColor;
	this.menus[ menuName ].hiForeColor = this.defaultHiForeColor;
	this.menus[ menuName ].activeMenuItem = null;
}


function Menu() {
	/* Add some properites */
	this.itemCount = 0;
	this.Name = "";
	this.imagePath = "images/nav/";
	this.menuItems = new Array();
	
	/* Add some methods */
	this.addMenuItem = method_addMenuItem;
}


function method_addMenuItem( Caption, URL, Target, Submenu ) {
	this.itemCount ++;
	this.menuItems[ this.itemCount ] = new MenuItem();
	this.menuItems[ this.itemCount ].Caption = Caption;
	this.menuItems[ this.itemCount ].URL = URL;
	this.menuItems[ this.itemCount ].Target = Target;
	this.menuItems[ this.itemCount ].Submenu = Submenu;
	
	var imageName = this.Name + "_option" + this.itemCount;
	this.menuItems[ this.itemCount ].ImageName = imageName;
	this.menuItems[ this.itemCount ].Over.src = this.imagePath + imageName + "_h.gif";
	this.menuItems[ this.itemCount ].Out.src = this.imagePath + imageName + ".gif";
}


function MenuItem() {
	this.Caption = null;
	this.URL = null;
	this.Target = null;
	this.Submenu = null;
	this.Over = new Image;
	this.Out = new Image;
}


/*
Section C: MENU DHTML GENERATION
*/
function method_buildMenus() {
	for( var thisMenu in this.menus ) {
		var thislayer = "";
		var itemCount = 0;
		var menuItemList = new Array();
		
		

		/* Build the list of menu items */
		var w2 = this.menus[ thisMenu ].width - 2;
		for( var thisMenuItem in this.menus[ thisMenu ].menuItems ) {
			itemCount++;
			var thisMenuItemObj = this.menus[ thisMenu ].menuItems[ thisMenuItem ];
			var layerHi = thisMenu + itemCount + '_hi';
			var layerLow = thisMenu + itemCount + '_low';
			if( Browser.IsNS4 ) {
				menuItemList.push( layerLow, layerHi );
				thislayer += "<layer style=\"padding:4px;\" name=\"" + layerLow + "\" bgcolor=\"" + this.menus[ thisMenu ].backColor + "\" width=" + w2 + " onMouseOver=\"this.parentLayer.layers[ '" + layerHi + "' ].visibility = 'show';\"><a href=\"" + thisMenuItemObj.URL + "\" style=\"color:" + this.menus[ thisMenu ].foreColor + ";text-decoration:none;font-family:" + this.menus[ thisMenu ].font + ";font-size:" + this.menus[ thisMenu ].size + ";\">" + thisMenuItemObj.Caption + "</a></layer>";
				thislayer += "<layer visibility='hide' style=\"padding:4px;\" name=\"" + layerHi + "\"  bgcolor=\"" + this.menus[ thisMenu ].hiBackColor + "\" width=" + w2 + " onMouseOver=\" menuItemHover( this, '" + thisMenu + "', '" + thisMenuItem + "', 1 ); \" onMouseOut=\"this.releaseEvents(Event.CLICK); menuItemHover( this, '" + thisMenu + "', '" + thisMenuItem + "', 0 ); this.visibility = 'hide';\"><a href=\"" + thisMenuItemObj.URL + "\" style=\"color:" + this.menus[ thisMenu ].hiForeColor + ";text-decoration:none;font-family:" + this.menus[ thisMenu ].font + ";font-size:" + this.menus[ thisMenu ].size + ";\">" + thisMenuItemObj.Caption + "</a></layer>";
			}
			else if( Browser.IsNS6Up || Browser.IsIE4 || Browser.IsIE5 || Browser.IsIE6 || Browser.IsSafari ) {
				var thisMenuItemObjCaption = thisMenuItemObj.Caption;
				if( thisMenuItemObj.Submenu != '' ) {
					thisMenuItemObjCaption = '<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%"><tr><td width="100%" style="color:' + this.menus[ thisMenu ].foreColor + ';font-family:' + this.menus[ thisMenu ].font + ';font-size:' + this.menus[ thisMenu ].size + '">' + thisMenuItemObjCaption + '</td><td align="right"><img src="images/nav/arrow.gif" width="16" height="9" alt="" border="0"></td></tr></table>';
				}
				var thisMenuSubitem = ( thisMenuItemObj.Submenu != '' ) ? ' menuPopupControl( \'' + thisMenu + '\', \'' + thisMenuItemObj.Submenu + '\', this );' : ' menuPopupControl( \'' + thisMenu + '\', \'\', this );';
				var menuItem_URL = thisMenuItemObj.URL.replace( /\'/, '\'\'' );
				thislayer += '<tr><td id="' + layerHi + '" name="' + layerHi + '" style="cursor:hand;cursor:pointer;padding:4px;background-color:' + this.menus[ thisMenu ].backColor + ';color:' + this.menus[ thisMenu ].foreColor + ';width=' + this.menus[ thisMenu ].width + ';font-family:' + this.menus[ thisMenu ].font + ';font-size:' + this.menus[ thisMenu ].size + ';" onClick="menuItemClick( \'' + menuItem_URL + '\' );" onMouseOver="menuItemHover( this, \'' + thisMenu + '\', \'' + thisMenuItem + '\', 1 );' + thisMenuSubitem + '">' + thisMenuItemObjCaption + '</td></tr>';
			}
		}

		/* Output the layer */
		if( Browser.IsNS4 ) {
			this.menus[ thisMenu ].layer = new Layer( this.menus[ thisMenu ].width );
			this.menus[ thisMenu ].layer.name = thisMenu;
			this.menus[ thisMenu ].layer.document.open( "text/html" );
			this.menus[ thisMenu ].layer.document.writeln( thislayer );
			this.menus[ thisMenu ].layer.document.close();
			this.menus[ thisMenu ].layer.left = this.menus[ thisMenu ].x + 1;
			this.menus[ thisMenu ].layer.top = this.menus[ thisMenu ].y;
			this.menus[ thisMenu ].layer.bgColor = this.menus[ thisMenu ].borderColor;
			this.menus[ thisMenu ].layer.visibility = 'hide';
			this.menus[ thisMenu ].layer.captureEvents( Event.MOUSEMOVE );
			this.menus[ thisMenu ].layer.onmousemove = menuPopupTimer_ns4_Stop;
			this.menus[ thisMenu ].layer.onmouseout = menuPopupTimer_ns4_Start;
			
			theseLayers = this.menus[ thisMenu ].layer.document.layers;
			var x_pos = 1;
			var y_pos = 1;
			for( var i = 0; i <= theseLayers.length - 2; i += 2 ) {
				theseLayers[ i ].left = x_pos;
				theseLayers[ i ].top = y_pos;
				theseLayers[ i ].clip.height = theseLayers[ i ].clip.height + 4;
				theseLayers[ i+1 ].left = x_pos;
				theseLayers[ i+1 ].top = y_pos;
				theseLayers[ i+1 ].clip.height = theseLayers[ i ].clip.height;
				y_pos += theseLayers[ i ].clip.height + 1;
			}
			this.menus[ thisMenu ].layer.clip.height = y_pos;
		}
		else if( Browser.IsNS6Up ) {
			temp = document.createElement( 'DIV' );
			temp.id = thisMenu;
			if( temp.setAttribute ) {
				temp.setAttribute( 'style', 'position:absolute;top:' + this.menus[ thisMenu ].y + ';left:' + this.menus[ thisMenu ].x + '; width:' + this.menus[ thisMenu ].width + ';background-color:' + this.menus[ thisMenu ].borderColor + ';visibility:hidden;' ); }
			else {
				temp.position = 'absolute';
				temp.top = this.menus[ thisMenu ].y;
				temp.left = this.menus[ thisMenu ].x;
				temp.width = this.menus[ thisMenu ].width;
				temp.visibility = 'hidden';
			}
			temp.innerHTML = "<table border=0 cellspacing=1 cellpadding=0 width=" + this.menus[ thisMenu ].width + ">" + thislayer + "</table>";

			document.body.appendChild( temp );
			this.menus[ thisMenu ].layer = document.getElementById( thisMenu );
			this.menus[ thisMenu ].layer.onmouseover = menuPopupTimer_Stop;
			this.menus[ thisMenu ].layer.onmouseout = menuPopupTimer_Start;
		}
		else if( Browser.IsIE4 || Browser.IsIE5 || Browser.IsIE6 || Browser.IsSafari ) {
			var menuEffects = '';
			if( Browser.IsIE6 ) {
				var menuShadow = 'progid:DXImageTransform.Microsoft.Shadow(Color=#cccccc,Direction=135,strength=' + menuSystemObject.menuShadowWidth + ')';
				var menuFadeEffects = new Array( '[No effect]', 'progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0, wipeStyle=0, motion=\'forward\',duration=' + menuSystemObject.fadeDuration + ')', 'progid:DXImageTransform.Microsoft.Fade(duration=' + menuSystemObject.fadeDuration + ')', 'progid:DXImageTransform.Microsoft.Stretch(stretchStyle=\'HIDE\',duration=' + menuSystemObject.fadeDuration + ')', 'progid:DXImageTransform.Microsoft.Inset(duration=' + menuSystemObject.fadeDuration + ')' );
				menuEffects = 'filter:progid:DXImageTransform.Microsoft.Alpha( Opacity=' + this.menus[ thisMenu ].alphaBegin + ', FinishOpacity=' + this.menus[ thisMenu ].alphaEnd + ', Style=' + this.menus[ thisMenu ].alphaStyle + ', StartX=' + this.menus[ thisMenu ].alphaXBegin + ',  FinishX=' + this.menus[ thisMenu ].alphaXEnd + ', StartY=' + this.menus[ thisMenu ].alphaYBegin + ', FinishY=' + this.menus[ thisMenu ].alphaYEnd + ')' + ( ( menuSystemObject.menuShadow == true ) ? menuShadow : '' ) + ( ( menuSystemObject.fadeMenuEffect > 0 ) ? menuFadeEffects[ menuSystemObject.fadeMenuEffect ] : '' )
			}
			thislayer = '<div id=' + thisMenu + ' style="position:absolute;top:' + this.menus[ thisMenu ].y + 'px;left:' + this.menus[ thisMenu ].x + 'px;width:' + this.menus[ thisMenu ].width + ';visibility:hidden;background-color:' + this.menus[ thisMenu ].borderColor + ';' + menuEffects + '"  onMouseOver="menuPopupTimer_Stop();" onMouseOut="menuPopupTimer_Start();"><table border=0 cellspacing=1 cellpadding=0>' + thislayer + '</table></div>\r';
			document.body.insertAdjacentHTML( "beforeEnd", thislayer );
			this.menus[ thisMenu ].layer = document.getElementById( thisMenu );
		}
	}
}


/*
Section D: USER INTERACTION
*/
function menuPopupClose( thisMenu, childMenu, thisMenuItem ) {

/*alert(
	"active Menu: "+ menuNavActiveImg  +"\n"+
	"menu Page: "+ strPrimaryMenu +"\n"+
	eval(strPrimaryMenu != menuNavActiveImg)
);*/

//	strPrimaryMenu declared at the top of each HTML page
if( menuNavActiveImg != null )
		if( menuNavActiveImg != '' && strPrimaryMenu != menuNavActiveImg ) {	menuRollImg( menuNavActiveImg, 'Normal' ); }
	menuNavActiveImg = '';
	menuPopupControl( thisMenu, childMenu, thisMenuItem );	
}

function menuItemHover( thisMenuItemLayer, thisMenu, thisMenuItemNum, state ) {
	if( state == 1 ) {
		if( Browser.IsNS6Up || Browser.IsIE4 || Browser.IsIE5 || Browser.IsIE6 || Browser.IsSafari ) {
			if( menuSystemObject.menus[ thisMenu ].activeMenuItem != null ) {
				menuSystemObject.menus[ thisMenu ].activeMenuItem.style.color = menuSystemObject.menus[ thisMenu ].foreColor;
				menuSystemObject.menus[ thisMenu ].activeMenuItem.style.background = menuSystemObject.menus[ thisMenu ].backColor;
				menuSystemObject.menus[ thisMenu ].activeMenuItem = null;
			}
			thisMenuItemLayer.style.color = menuSystemObject.menus[ thisMenu ].hiForeColor;
			thisMenuItemLayer.style.background = menuSystemObject.menus[ thisMenu ].hiBackColor;
		}
		menuSystemObject.menus[ thisMenu ].activeMenuItem = thisMenuItemLayer;
	}
	else {
		if( Browser.IsNS6Up || Browser.IsIE4 || Browser.IsIE5 || Browser.IsIE6 || Browser.IsSafari ) {
			menuSystemObject.menus[ thisMenu ].activeMenuItem.style.color = menuSystemObject.menus[ thisMenu ].foreColor;
			menuSystemObject.menus[ thisMenu ].activeMenuItem.style.background = menuSystemObject.menus[ thisMenu ].backColor;
		}

		menuSystemObject.menus[ thisMenu ].activeMenuItem = null;
	}
}

function menuItemClick( URL ) {
	var docObj = window.document;
	if( parent.frames ) { docObj = parent.document; }
	docObj.location.href = URL;
}


function toggleMenuVisibility( thisMenu, state ) {
    if( document.getElementById && document.getElementById( thisMenu ) ) {
		var thisState = ( state ) ? 'visible' : 'hidden';
        document.getElementById( thisMenu ).style.visibility = thisState;
    } else {
        if( document.layers && document.layers[ thisMenu ] ) {
			var thisState = ( state ) ? 'show' : 'hide';
            document.layers[ thisMenu ].visibility = thisState;
        } else {
            if( document.all && eval( 'document.all.' + thisMenu ) ) {
				var thisState = ( state ) ? 'visible' : 'hidden';
   	            eval( 'document.all.' + thisMenu + '.style.visibility = "' + thisState + '"' );
            }
        }
    }
}

function menuMouseEvent( Image, Event, Menu, Option ) {
	/* Highlight the arrow for the active menu item */
	if( Event == 'Over' || Event == 'Out' ) {
		this_image = getImage( Image );
		this_image.src = eval( 'menuSystemObject.menus[ Menu ].menuItems[ Option ].' + Event + '.src' );
	}
}

function menuPopupControl( thisMenu, childMenu, thisMenuItem ) {
	/* Close open windows above this one */
	if( menuSystemObject == null )
		return;

	var close_layer = false;
	menuPopupTimer_Stop();

	if( menuSystemObject.activeMenus.length > 0 ) {
		for( i = menuSystemObject.activeMenus.length - 1; i >= 0; i-- ) {
			if( menuSystemObject.activeMenus[ i ] == thisMenu )
				break;

			if( menuSystemObject.menus[ menuSystemObject.activeMenus[ i ] ] ) {
				if( Browser.IsNS4 ) {
					menuSystemObject.menus[ menuSystemObject.activeMenus[ i ] ].layer.visibility = 'hide';
					var lc = menuSystemObject.menus[ menuSystemObject.activeMenus[ i ] ].layer.document.layers;
					for( var j = 0; j < lc.length; j++ ) {
						if( lc[j].name.indexOf( "_hi" ) > -1 ) { lc[j].visibility = 'hide'; }
					} 
				}
				else if( Browser.IsIE4 || Browser.IsIE5 || Browser.IsNS6Up || Browser.IsSafari ) {
					menuSystemObject.menus[ menuSystemObject.activeMenus[ i ] ].layer.style.visibility = 'hidden';
				}
				else if( Browser.IsIE6 ) {
					menuFadeMenu( menuSystemObject.activeMenus[ i ], 'hidden' );
				}
				if( menuSystemObject.menus[ menuSystemObject.activeMenus[ i ] ].activeMenuItem != null ) { menuItemHover( null, menuSystemObject.activeMenus[ i ], 0, 0 ) };
			}
			//menuSystemObject.activeMenus.splice( i, 1 );
			//menuSystemObject.activeMenus.pop();
		}
	}
	var zIndex = menuSystemObject.activeMenus.length;

	/* Open the submenu if one was specified */
	if( childMenu != '' && menuSystemObject.menus[ childMenu ] ) {
		if( Browser.IsNS4 ) {
			menuSystemObject.menus[ childMenu ].layer.visibility = 'show';
		}
		else if( Browser.IsIE4 || Browser.IsIE5 || Browser.IsIE6 || Browser.IsNS6Up || Browser.IsSafari ) {
			menuDoFadeEffect = true;
			if( thisMenu != '' ) {
				if( Browser.IsNS6Up ) {
					menuSystemObject.menus[ childMenu ].layer.style.top = menuGetPageOffsetTop( thisMenuItem ) + 5;
					menuSystemObject.menus[ childMenu ].layer.style.left = menuGetPageOffsetLeft( thisMenuItem ) + parseInt( thisMenuItem.offsetWidth ) - 1;
				}
				else {
					menuSystemObject.menus[ childMenu ].layer.style.pixelTop = menuGetPageOffsetTop( thisMenuItem ) + 5;
					menuSystemObject.menus[ childMenu ].layer.style.pixelLeft = menuGetPageOffsetLeft( thisMenuItem ) + parseInt( thisMenuItem.style.width ) - 1;
				}
				menuSystemObject.menus[ childMenu ].layer.style.zIndex = zIndex;
			}
			menuFadeMenu( childMenu, 'visible' );
			menuDoFadeEffect = false;
		}
	
		menuSystemObject.activeMenus[ menuSystemObject.activeMenus.length ] = childMenu;
	}

}

function menuFadeMenu( thisMenu, state ) {
	if( menuSystemObject.menus[ thisMenu ].layer.style.visibility == state ) {
		return;
	}
	if( menuDoFadeEffect == true && Browser.IsIE6 ) {
		menuSystemObject.menus[ thisMenu ].layer.filters( menuSystemObject.menus[ thisMenu ].layer.filters.length - 1 ).apply();
	}
	menuSystemObject.menus[ thisMenu ].layer.style.visibility = state;
	if( menuDoFadeEffect == true && Browser.IsIE6 ) {
		menuSystemObject.menus[ thisMenu ].layer.filters( menuSystemObject.menus[ thisMenu ].layer.filters.length - 1 ).play();
	}
}

function menuPopupTimer_Start() {
	if( menuSystemObject == null )
		return;

	if( menuPopupTimer != null )
		clearTimeout( menuPopupTimer );

	if( Browser.IsNS4 )
		document.releaseEvents( Event.MOUSEMOVE );

	//if( menuSystemObject.activeMenus.length > 0 )
		menuPopupTimer = setTimeout( "menuDoFadeEffect = false; menuPopupClose( '', '' );", 250 );

}

function menuPopupTimer_Stop() {
	clearTimeout( menuPopupTimer );
}


function menuPopupTimer_ns4_Start() {
	if( menuSystemObject == null )
		return;

	document.captureEvents( Event.MOUSEMOVE );
	document.onmousemove = menuPopupTimer_Start();
}


function menuPopupTimer_ns4_Stop() {
	document.releaseEvents( Event.MOUSEMOVE );
	menuPopupTimer_Stop();
}

function menuGetPageOffsetLeft( el ) {
	var x = el.offsetLeft;
	if (el.offsetParent != null) { x += menuGetPageOffsetLeft( el.offsetParent ); }
	return x;
}

function menuGetPageOffsetTop( el ) {
	var y = el.offsetTop;
	if (el.offsetParent != null) { y += menuGetPageOffsetTop( el.offsetParent ); }
	return y;
}


/*
Section E: FUNCTIONS TO GET IMAGE POSITION
*/
function getImage( imageName ) {
	if( Browser.IsNS4 ) {
		var thisImage = new menuImagePrototype;
		var thisImageObj = menuFindImage( imageName, document );
		thisImage.x = thisImageObj.x;
		thisImage.y = thisImageObj.y;
		thisImage.height = thisImageObj.height;
		thisImage.width = thisImageObj.width;
		thisImage.Image = thisImageObj;
		return thisImage;
	}
	else if( Browser.IsIE4Up || Browser.IsNS6Up || Browser.IsSafari ) {
    	thisImage = new menuImagePrototype;
		var node = document.getElementById( imageName );
		//alert(node.width);
		//alert( node );
		if( !document.all && document.getElementById && node) {
			thisImage.Image = node.getAttribute( "image" );
			thisImage.width = parseInt( node.getAttribute( "width" ) );
			thisImage.height = parseInt( node.getAttribute( "height" ) );
		} 
		else if( document.all && document.getElementById && node ) { 
			thisImage.Image = node[ "image" ]; 
			thisImage.width = parseInt( node[ "width" ] );
			thisImage.height = parseInt( node[ "height" ] );
		}
		//alert( thisImage.height );
		thisImage.x = menuImageGetRealLeft( ( ( document.all ) ? document.all[ imageName ] : document.images[ imageName ] ) );
		thisImage.y = menuImageGetRealTop( ( ( document.all ) ? document.all[ imageName ] : document.images[ imageName ] ) );
		//alert( thisImage.x );
		return thisImage;
	}
	else {
		return null;
	}
}

function menuImagePrototype() {
	this.x = 0;
	this.y = 0;
	this.height = 0;
	this.width = 0;
	this.Image = '';
}

function menuFindImage( name, doc ) {
	var i, img;
	for( i = 0; i < doc.images.length; i++ ) { if( doc.images[i] && doc.images[i].name == name) { return doc.images[i]; } }
	for (i = 0; i < doc.layers.length; i++) { if( (img = findImage( name, doc.layers[i].document ) ) != null) { img.container = doc.layers[i]; return img; } }
	return null;
}

function menuImageGetRealLeft( thisImage ) {
	if( thisImage == null || thisImage == '' ) {
		return;
	}
	xPos = eval( thisImage ).offsetLeft;
	tempEl = eval( thisImage ).offsetParent;
  	while (tempEl != null) {
  		xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	}
	return xPos;
}

function menuImageGetRealTop( thisImage ) {
	if( thisImage == null || thisImage == '' ) {
		return;
	}
	yPos = eval( thisImage ).offsetTop;
	tempEl = eval( thisImage ).offsetParent;
	while (tempEl != null) {
  		yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
	return yPos;
}


/*
Section F: NETSCAPE RESIZE FIX
*/
function setFix() {
	if(!window.saveInnerWidth) {
    	window.onresize = resizeIt;
		window.saveInnerWidth = window.innerWidth;
		window.saveInnerHeight = window.innerHeight;
	}
}


function resizeIt() {
	if (saveInnerWidth != window.innerWidth || saveInnerHeight != window.innerHeight ) {
		document.location = document.location;
	}
}


/*
Section G: IMAGE ROLLOVER FUNCTIONS
*/
function menuRollImg( thisImage, thisState ) {
	if( menuNavActiveImg != '' && menuNavActiveImg != null ) {
		document.images[ menuNavActiveImg ].src = eval( 'menuNavButtons[ \'' + menuNavActiveImg + '\' ].Normal.src' );
	}
	
	if( document.images ) {
		document.images[ thisImage ].src = eval( 'menuNavButtons[ \'' + thisImage + '\' ].' + thisState + '.src' );
		menuNavActiveImg  = thisImage;
	}
}

function menuButtonPrototype( imgOver, imgNormal ) {
	this.Over = new Image;
	this.Over.src = imgOver;
	this.Normal = new Image;
	this.Normal.src = imgNormal;
}

// -->
