// JavaScript Document

function Disp_Active_Menu()
	{
	var currLocation = window.location.toString(); // Returns the string representation of the Location object's URL. 
	var n = 0, myAnchor = ""; existAnchor = "";
	
	// take out "&" in the end of URL for display menu inthe window in Firefox and Netscape
	if (currLocation.substr(currLocation.length-1)=="&") {
		currLocation = currLocation.substring(0, currLocation.length-1)
		}
	
	// get the menu id from the URL
	if (currLocation.indexOf("#m") < 0) {
		n = currLocation.indexOf("pElementID="); 
		myAnchor = "#m" + currLocation.substring(n+11, n+14); 
		}
	
	// if no existing anchor
	if (currLocation.indexOf("#") < 0) {		
		// set the DOM location (URL) with the anchor id (menu id)
		window.location.replace(currLocation + myAnchor);
		} 
	else {
		n = currLocation.indexOf("#"); 
		existAnchor = currLocation.substring(n, currLocation.length);		
		currLocation = currLocation.substring(0, n);
		
		window.location.replace(currLocation+existAnchor);
		}
	}
