
//¸®½ºÆ® ·Ñ¿À¹ö ½ºÅ¸ÀÏ º¯°æ.

document.onmouseover = doOver;	//¸¶¿ì½º ¿À¹ö½Ã ÇÔ¼ö È£Ãâ.
document.onmouseout  = doOut;	//¸¶¿ì½º ¾Æ¿ô½Ã ÇÔ¼ö È£Ãâ.
var clsName = 'song_list'; 		//TRÅÂ±×³»ÀÇ id Name.
var idValue = '';

function doOver() 
{
	var toEl = getReal(window.event.toElement, 'className', clsName);
	var em = toEl;
	
	if (em != idValue)
	{
		var cDisabled = em.cDisabled;
		cDisabled = (cDisabled != null); 
	
		
	
		if ((em.className == clsName) && !cDisabled)
			setcolor(em);
	}
}

function doOut() 
{
	var fromEl = getReal(window.event.fromElement, 'className', clsName);
	var em = fromEl;
	
	if (em != idValue)
	{
		var cDisabled = em.cDisabled;
		cDisabled = (cDisabled != null); 

		var cToggle = em.cToggle;
		toggle_disabled = (cToggle != null); 

		if ((em.className == clsName) && !cDisabled) 
			restore(em);
	}
}

function getReal(em, type, value) 
{
	temp = em;
	while ((temp != null)) 
	{
		if (eval('temp.' + type) == value) 
		{
			em = temp;
			return em;
		}
		temp = temp.parentElement;
	}
	return em;
}

function restore(em) 
{
	with (em.style) {
		backgroundColor = "";
		//color="";
	}
}

function setcolor(em) 
{
	with (em.style) {
		backgroundColor = "#f7f7f7";
		//color = "";
	}
}

function check(n)
{
	if (frmList.elements.length>1)
		var EL=frmList.music_idx[n];
	else
		var EL=frmList.music_idx;

	if (EL.checked)
		EL.checked = false;
	else
		EL.checked = true;
	
	ChkIt(EL)
}

function ChkIt(EL)
{
	if (EL.checked)
		setStyle(EL);
	else
		resStyle(EL);
}

function setStyle(E){
	while (E.tagName != "TR")
	{
		E=E.parentElement;
	}
	E.className = "H";
	with (E.style) {
		backgroundColor = "#f7f7f7";
		//color = "";
	}
}

function resStyle(E)
{
	while (E.tagName != "TR")
	{
		E = E.parentElement;
	}
	E.className = clsName;
	with (E.style) {
		backgroundColor = "";
		//color = "";
	}
}


