
var dropShow=false
var currentID

function dropdown(el)
{
	if(dropShow)
	{
		dropFadeOut()
	}
	else
	{
		currentID=el
		el.style.visibility="visible"
		dropFadeIn()
	}
}

function dropFadeIn()
{//選單淡入的效果
	if(currentID.filters.alpha.opacity<100)
	{
		currentID.filters.alpha.opacity+=20
		fadeTimer=setTimeout("dropFadeIn()",50)
	}
	else
	{
		dropShow=true
		clearTimeout(fadeTimer)
	}
}

function dropFadeOut()
{//選單淡出的效果
	if(currentID.filters.alpha.opacity>0)
	{
		clearTimeout(fadeTimer)
		currentID.filters.alpha.opacity-=20
		fadeTimer=setTimeout("dropFadeOut()",50)
	}
	else
	{
		dropShow=false
		currentID.style.visibility="hidden"
	}
}

function dropdownHide()
{
	if(dropShow)
	{
		dropFadeOut()
		dropShow=false
	}
}


function hiLight(el,x)
{//高亮度顯示指標位置
	if(dropShow)
	{

		for(i=0;i<el.parentElement.childNodes.length;i++)
		{
			el.parentElement.childNodes(i).className="link_record0"
		}
			
		el.className=""+x+""
	}
}

function CheckMe(el)
{//替換顯示內容
	el.parentElement.parentElement.childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).innerHTML=el.innerHTML
}
document.onclick=dropdownHide
