//ÀÌ¹ÌÁö ·Ñ ¿À¹ö
function menuOn(imgEl)
{
	imgEl.src = imgEl.src.replace(".gif", "_ov.gif");
}

function menuOut(imgEl)
{
	imgEl.src = imgEl.src.replace("_ov.gif", ".gif");
}


//window open script
function window_open(theURL,winName,features) 
{ 
  window.open(theURL,winName,features);
}

//horizen ticker
function initTicker(container) {
	mover = container.getElementsByTagName("p").item(0);
	text = mover.getElementsByTagName("span").item(0);
	
	// set
	mover.style.position = "absolute";
	mover.style.margin = "0 0 0 0";
	mover.style.left = "0px";
	mover.leftPosition = 0;
	mover.style.width = text.childNodes.item(0).length + "em";	// stretch width
	textWidth = text.offsetWidth;

	if (textWidth > container.offsetWidth) {	// enough space for move
		// duplicate text
		mover.style.width = textWidth * 2 + "px";
		mover.innerHTML += mover.innerHTML;
		
		// set action
		mover.tickerAction = window.setInterval(
			function()
			{
				if (mover.leftPosition * -1 > textWidth) {
					mover.leftPosition = -1;
				} else {
					mover.leftPosition -= 1;
				}
				mover.style.left = mover.leftPosition + "px";
			}
		, 40);
	}
}


function getElementsByClass(_class, el_id) {
	var parent, els, returnArr = new Array(), i = 0;
	parent = (el_id) ? document.getElementById(el_id) : document;
	els = parent.getElementsByTagName('*') || parent.all;
	for (i; i < els.length; i++)
		if (els[i].className == _class) 
			returnArr[returnArr.length] = els[i];
	return returnArr;
}

//¸ÞÀÎÆäÀÌÁö ·Ñ¿À¹ö °Ô½ÃÆÇ
function view_main_board(param1, param2 ,param3)
{
   var i;
   var obj=getElementsByClass(param1, param3);   
   for (i=0; i<obj.length; i++)
   {
     if (param2==i)
	 {
	   obj[i].style.display="block";	   
	 }
	 else
	 {
	   obj[i].style.display="none";	 
	 }
   }   
}

