var oId = null;
var oIds = new Array();
var oTitles = new Array();
var oOnclicks = new Array();

var activeLinkStyle = "activeMenu";
var inactiveLinkStyle = "inactiveMenu";

//var footer=document.getElementById('footer_container');
//var hrefs=footer.getElementsByTagName("A");
  
function initMenu(){
	for (var j = 0; j < hrefs.length; j++) {
		if (hrefs[j].getAttribute("id") != '' && hrefs[j].getAttribute("id") != null){
	   		id = hrefs[j].getAttribute("id").substr(0,4);
			if ( id == 'item') {
						oIds[j] = hrefs[j].getAttribute("id");
						oTitles[j] = hrefs[j].getAttribute("title");
						var onclick = hrefs[j].getAttribute("onclick");
						oOnclicks[j] = onclick;
			}
		}
	}
}

function setMenu(i){	
	for (var j=0; j<hrefs.length; j++) {
		if (hrefs[j].getAttribute("id") != '' && hrefs[j].getAttribute("id") != null){
			id = hrefs[j].getAttribute("id").substr(0,4);
			if ( id == 'item') {
				if (i != j) {
					var activeItem = document.getElementById('item_'+j);
					activeItem.className= activeLinkStyle;
					activeItem.setAttribute('onclick', oOnclicks[j]);
				} else if ( i == j){
					var inactiveItem = document.getElementById('item_'+i);
					inactiveItem.className=inactiveLinkStyle;
					inactiveItem.setAttribute('onclick', 'return false;');	
				}	
			}
		}
	}
}

function disableAllMenu(){ 	
	/*for (var i=0; i< hrefs.length; i++) {
		if (hrefs[i].getAttribute("id") != '' && hrefs[i].getAttribute("id") != null){
			id = hrefs[i].getAttribute("id").substr(0,4);
			if ( id == 'item') {
				var itemName = document.getElementById('item_'+i);
				itemName.className=inactiveLinkStyle;
				itemName.setAttribute('onclick', 'return false;');			
			}
		}
	}*/
}
