function ReadClass(cssIndex, ruleIndex, property, optionalID){
	if(!document.getElementById){ 
		return false; 
	};
	if(optionalID){
		return (!document.getElementById(optionalID))?
		false:(document.getElementById(optionalID)[property])
	};
	if(!document.styleSheets.length){ return false ;}
	
	cssIndex=(cssIndex && !isNaN(parseFloat(cssIndex)))? parseFloat(cssIndex):0;
	ruleIndex=(ruleIndex && !isNaN(parseFloat(ruleIndex)))? parseFloat(ruleIndex):0;
	
	if(cssIndex>document.styleSheets.length-1){ return false; };
	var RULES=( typeof(document.styleSheets[0].rules)!="undefined" )?"rules":"cssRules";
	if(ruleIndex>document.styleSheets[cssIndex][RULES].length-1){ return false; };
	
	return document.styleSheets[cssIndex][RULES][ruleIndex].style[property];
}

function MenuItemSelect(){
	if(arguments.length){
		row=arguments[0];
	}
	row.bgColor=ReadClass(0,5,'color');
}

function MenuItemUnSelect(row){
	row.bgColor=ReadClass(0,3,'color');
}

function ChangeDocumentTitle(title){
	document.title=title;
}