function toframe()
{
	if (this.document == top.document)
	{
		location.href = "index.html";
	}
	init();
}


var color_out = "#abb";
var color_over = "#933";
var color_default = "#abb";
var color_selected = "#308090";
var selected_index = 0;
function changeCell(cell)
{
return;
	row=cell.parentNode;
	for(i=0;i<row.cells.length;i++)
	{
		if(i==selected_index)
		{
			row.children.tags('TD')[i].children.tags('A')[0].style.color = color_selected;
		}else{
			row.children.tags('TD')[i].children.tags('A')[0].style.color = color_default;
		}
	}
}

function mClick(cell)
{
      selected_index=cell.cellIndex;
	  changeCell(cell);
//	  alert(cell.children.length);
      cell.children.tags('A')[0].click();
}

function mOver(cell)
{
	//  cell.style.cursor = 'hand';
      cell.style.color = color_over;
}

function mOut(cell)
{
		for(i=0; i < mCount; i++)
		if (cell.id == MenuNames[i])
		{
			if(menuSelected == i)
			{
				cell.style.color = color_selected;
			}
			else
			{
//		alert("cell.id = " + cell.id);
				cell.style.color = color_default;
			}
		}
}

var InitFlag;
var MenuNames = new Array();
var mCount;
var menuSelected;
function init()
{
	if(InitFlag) return;
	var linkList = new Array();
	linkList = document.getElementsByTagName("a");
	j = 0;
	for(i=0; i<linkList.length; i++)
	{
		if(linkList[i].id)
		{
			MenuNames[j] = linkList[i].id;
			j++;
		}
	}
	mCount = j;
}

function setMenu(mName)
{
	init();
	for(i=0; i<mCount; i++)
	{
		elem = document.getElementById(MenuNames[i]);
		if(mName.indexOf(MenuNames[i]) >= 0)
		{
			elem.style.color = color_selected;
			menuSelected = i;
//		alert("menuSelected = " + i);
		}
		else
		{
			elem.style.color = color_default;
		}
	}
}


