// 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 assoc=document.forms[0].SrchScope;
	var search=window.location.search;
	if (search=="") {
		search=window.location.pathname;
	}
	
	if (search=="") {
		window.location=strLink;
    }	else {
	    var sourceParm=search.split("&source=");
	    if (sourceParm[1]!=undefined) {
	    	var sourceVal=sourceParm[1].split("&");
	    	var sourceOut="&source=" + sourceVal[0];
    	} else {
	    	var sourceOut="";
    	}	
    	if (assoc!=undefined) {
	    	var assocOut="&assoc=" + assoc.value;
    	} else {
    		var assocParm=search.split("&assoc=");
    		if (assocParm[1]!=undefined) {
	    		var assocVal=assocParm[1].split("&");
	    		var assocOut="&assoc=" + assocVal[0];
    		} else {
	    		var assocOut="";
    		}
		}
    	window.location=strLink + assocOut + sourceOut;
    }

 	
}