// Menu Class
function MenuItem(name, url, newwin, ID, showInJSMenu) {

	var children = new Array();

	this.addChild=function(child) {
		children[children.length] = child;
	}

	this.getName= function() {
		return name;
	}

	this.getUrl= function() {
		return url;
	}

	this.getChildCount=function() {
		return children.length
	}

	this.getChild=function(i) {
		return children[i];
	}

	this.isNewWindow=function() {
		return newwin;
	}

	this.getID=function() {
		return ID;
	}

	this.showInJSMenu=function() {
		return showInJSMenu;
	}
	
}

function openLink(strLink) {
	//Notesism if the search is empty, then what I need is in the path
	var search=window.location.search;
	if (search=="") {
		search=window.location.pathname;
	}

	if (search=="") {
		window.location=strLink;
    }	else {
	    var sourceParm=window.location.search.split("&source=");
    	var sourceVal=sourceParm[1].split("&");
    	window.location=strLink + "&source=" + sourceVal[0];
    }

 	
}
