function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}

showSub=function(node){
	this.node=$(node.id+'_sub');
	this.father=$(node.id);
	if (this.node.style.display=='block'){
		this.father.className='major';
		this.node.style.display='none';
	}else{
		this.father.className='majordown';
		this.node.style.display='block';
	}
}

window.onload=function(){
	this.loc=unescape(window.location);
	this.loc=this.loc.replace(/^.+context\//,'');
	this.loc=this.loc.replace(/\/.+\/$/,'');
	this.maj_num=$('menu_n').value;
	for (i=0;i<this.maj_num; i++){
		if(this.loc==$('n'+i).title){
			$('n'+i+'_sub').className='sub display';
			$('n'+i).className='majordown';
			break;
		}
	}
}