// link dotted-border none

function autoBlur(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="/img") 
document.body.focus(); 
} 
document.onfocusin=autoBlur; 


// PNG24
function setPng24(obj) { 
    obj.width=obj.height=1; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');";
    obj.src='';  
    return ''; 
}

// select Style htc file loading
function selStyleChange(){
	var cate_rootObj = document.all["collection"];

	if ( cate_rootObj != "" && cate_rootObj != null  )
	{
		cate_rootObj.style.behavior ="url(../js/selectBox.htc)";
		cate_rootObj.style.width = 60;
		cate_rootObj.style.height = 20;
	}
	
}

function jumpToLink(vD)
{
	if ( vD == 1 )	{

		switch ( leftMenu_param )
		{
		case 'quest':
			jumpUrl = '../quest/arenazone.html';
			break;
		case 'entertainment':
			jumpUrl = '../entertainment/concert.html';
			break;
		case 'tournament':
			jumpUrl = '../tournament/starcraft_1.html';
			break;
		case 'facilities':
			jumpUrl = '../facilities/wowzone.html';
			break;
		case 'news':
			jumpUrl = '../news/index.do?bseq=237353';
			break;
		case 'participate':
			jumpUrl = '../participate/intro.html';
			break;
		case 'minimap':
			jumpUrl = '../minimap/index.html';
			break;
		case 'registration':
			jumpUrl = '../registration/index.html';			
			break;
		}

	} else {
		jumpUrl = '../index.html';
	}
		

	location.href = jumpUrl;
}



/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : fReplace(Å¸°Ù ¹®ÀÚ¿­,¹Ù²Ü¹®ÀÚ,¹Ù²ð¹®ÀÚ)
	ÇÔ¼ö±â´É : ¹®ÀÚ¿­¿¡¼­ Æ¯Á¤ ¹®ÀÚ¸¦ ÁöÁ¤ÇÑ ¹®ÀÚ·Î ¸ðµÎ ¹Ù²Þ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.02.12
	¼öÁ¤ÀÏ : 2007.02.12
-------------------------------------------------------------------------------------------------------*/
function fReplace(tString,vT,rT)
{
	var nR = tString.split(vT).length - 1;

	for ( j=0; j<nR; j++ )
	{
		strReplace = tString.replace(vT,rT);
		tString = strReplace;
	}	

	return tString;
}


/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : oTextCreator(content,linkUrl,className,id)
	ÇÔ¼ö±â´É : Text object¸¦ CreateÇÔ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.03.06
	¼öÁ¤ÀÏ : 2007.03.26
-------------------------------------------------------------------------------------------------------*/
function oTextCreator(content,linkUrl,className,id)
{
	oText = document.createElement('SPAN');

	if ( content !=null && content !='' )
	{
		if ( className !=null && className !='' )
			oText.setAttribute('class',className);
	
		if ( id !=null && id !='' )
			oText.setAttribute('id',id);
		
		oText.innerHTML = content;

		if ( linkUrl !=null && linkUrl !='' )
		{
			oTextA = oACreator(linkUrl,'','');
			oTextA.appendChild(oText);
			oText = oTextA;
		}
	}
	
	return oText;
}


/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : oImgCreator(imgSrc,linkUrl,wV,hV,className)
	ÇÔ¼ö±â´É : Text object¸¦ CreateÇÔ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.03.06
	¼öÁ¤ÀÏ : 2007.03.26
-------------------------------------------------------------------------------------------------------*/
function oImgCreator(imgSrc,linkUrl,wV,hV,className)
{
	if ( imgSrc !=null && imgSrc !='' )
	{
		oIMG = document.createElement('IMG');
		oIMG.src = imgSrc;
		
		if ( wV !=null && wV !='' )
			oIMG.setAttribute('width',wV);
			
		if ( hV !=null && hV !='' )
			oIMG.setAttribute('height',hV);
			
		if ( className !=null && className !='' )
			oIMG.setAttribute('class',className);
			
		if ( linkUrl !=null && linkUrl !='' )
		{
			oImgA = oACreator(linkUrl,'','');
			oImgA.appendChild(oIMG);
			oIMG = oImgA;
		}

		return oIMG;

	}
}


/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : oTableCreator(id,className)
	ÇÔ¼ö±â´É : <TABLE> object¸¦ CreateÇÔ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.03.06
	¼öÁ¤ÀÏ : 2007.03.26
-------------------------------------------------------------------------------------------------------*/
function oTableCreator(id,className)
{	
	oTable = document.createElement('TABLE');

	if ( id !=null && id !='' )
		oTable.id = id;
	
	if ( className !=null && className !='' )
		oTable.setAttribute('class',className);
		
	return oTable;
}


/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : oTrCreator(id,className)
	ÇÔ¼ö±â´É : <TR> object¸¦ CreateÇÔ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.03.06
	¼öÁ¤ÀÏ : 2007.03.26
-------------------------------------------------------------------------------------------------------*/
function oTrCreator(id,className)
{	
	oTR = document.createElement('TR');

	if ( id !=null && id !='' )
		oTR.id = id;
	
	if ( className !=null && className !='' )
		oTR.setAttribute('class',className);
	
	return oTR;
}


/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : oTdCreator(id,className)
	ÇÔ¼ö±â´É : <TD> object¸¦ CreateÇÔ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.03.06
	¼öÁ¤ÀÏ : 2007.03.26
-------------------------------------------------------------------------------------------------------*/
function oTdCreator(id,className)
{
	oTD = document.createElement('TD');

	if ( id !=null && id !='' )
		oTD.id = id;
	
	if ( className !=null && className !='' )
		oTD.setAttribute('class',className);
		
	return oTD;
}


/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : oACreator(shref,className)
	ÇÔ¼ö±â´É : <A> object¸¦ CreateÇÔ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.03.06
	¼öÁ¤ÀÏ : 2007.03.26
-------------------------------------------------------------------------------------------------------*/
function oACreator(shref,className)
{
	if ( shref !=null && shref !='' )
	{
		oA = document.createElement('A');
		oA.href = shref;
		
		if ( className !=null && className !='' )
			oA.setAttribute('class',className);
			
	}

	return oA;
}


/*-------------------------------------------------------------------------------------------------------
	ÇÔ¼öÀÌ¸§ : oBrCreator(shref,className)
	ÇÔ¼ö±â´É : <A> object¸¦ CreateÇÔ
	ÀÛ¼ºÀÚ : Ockkyoung.leem
	ÀÛ¼ºÀÏ : 2007.03.06
	¼öÁ¤ÀÏ : 2007.03.26
-------------------------------------------------------------------------------------------------------*/
function oBrCreator()
{
	oBr = document.createElement('BR');
	return oBr;
}