var aColorTopMenu = new Array()

function getObj(name)
{
    if (document.getElementById) {
       this.obj = document.getElementById(name);
       this.style = document.getElementById(name).style;
    } else if (document.all) {
       this.obj = document.all[name];
       this.style = document.all[name].style;
    } else if (document.layers) {
       this.obj = document.layers[name];
       this.style = document.layers[name];
    }

	var name = '';
	var no = 0;
	for (var i in elId) {
	    name += i + "\n";
	    no++;
	    if (no >10) {
	    	alert(name);
	        name = "";
		no = 0;
	     }
	}
    	alert(name);


}

function InitColor(){
	var elId = document.getElementById('tblMenu');
	var i
	total = elId.rows[0].cells.length

	for(i=0;i<total;i++){
		aColorTopMenu[i]="#ffffff"
	}
}

function HighLightMenu(menu){
	var elId = document.getElementById('tblMenu');
	total = elId.rows[0].cells.length

	var i
	for(i=0;i<total;i++){
//	    alert(i+" "+elId.rows[0].cells[i].id+"=="+menu.id)
		if(elId.rows[0].cells[i].id==menu.id){
			elId.rows[0].cells[i].style.color="#ffcc66"
		}else{
			elId.rows[0].cells[i].style.color="#ffffff"
		}		
	}
	SaveCurrentColors()

}

function SaveCurrentColors(){
	var elId = document.getElementById('tblMenu');
	total = elId.rows[0].cells.length

	var i
	for(i=0;i<total;i++){
		aColorTopMenu[i] = elId.rows[0].cells[i].style.color
	}
}

function ShadeMenu(menu){
//	menu.style.cursor='hand'
	menu.style.cursor='pointer'
	menu.style.color="#000080"
}

function UnShadeMenu(){
	var elId = document.getElementById('tblMenu');
	total = elId.rows[0].cells.length

	var i
	for(i=0;i<total;i++){
		elId.rows[0].cells[i].style.color=aColorTopMenu[i]
	}
}






