//IE6 Flicker Bug
try {document.execCommand('BackgroundImageCache', false, true);} catch(e) {}

// °øÅë ÇÃ·¡½¬
function Cji_Flash(Url, wd, ht, swfId, wm, vars) {// °æ·Î,°¡·Î,¼¼·Î,ID,Åõ¸í,º¯¼ö
	var TxtSwf = "" ;
	TxtSwf += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0' width='"+ wd +"' height='"+ ht +"' id='"+ swfId +"'>" ;
	TxtSwf += "<param name='movie' value='"+ Url +"'>" ;
	TxtSwf += "<param name='wmode' value='"+ wm +"'>" ;
	TxtSwf += "<param name='FlashVars' value='" + vars + "'>" ;
	TxtSwf += "<param name='allowScriptAccess' value='always'>" ;
	TxtSwf += "<param name='allowFullScreen' value='true'>" ;
	TxtSwf += "<param name='quality' value='high'>" ;
	TxtSwf += "<param name='menu' value='false'>" ;
	TxtSwf += "<embed src='"+ Url +"' width='"+ wd +"' height='"+ ht +"' wmode='"+ wm +"' name='"+ swfId +"' FlashVars='"+ vars +"' allowScriptAccess='always' allowFullScreen='true'  quality='high' menu='false' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed>" ;
	TxtSwf += "</object>" ;
	document.write (TxtSwf);
	var CK_Flash;
	var Swf_Div = document.getElementById(swfId+"_div");
	var Swf_Cnt = document.getElementById(swfId+"_cnt");
	if(Swf_Cnt){
		try{
			if(window.ActiveXObject){
				for( var i = 10; i >= 1; i-- )
		        {
					CK_Flash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + i + "');");
					if(CK_Flash) break;
		        }
				if(!CK_Flash) CK_Flash = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
			}else{ 
				CK_Flash = navigator.plugins["Shockwave Flash"].description;
			}
		}catch(e){}

		if(!CK_Flash) {
			Swf_Div.style.display = "none";
			Swf_Cnt.style.display = "block";
		} else {
			Swf_Cnt.style.display = "none";
			Swf_Div.style.display = "block";
		}
	}
}

// ¸¶¿ì½º ·Ñ¿À¹öÀÌ¹ÌÁö
var currentImg;
function Cji_ImgOn(imgEl){
	var name = imgEl.src;
	if( name.indexOf("on.gif") <= 0 ) {
		imgEl.src = name.replace(".gif", "on.gif");
	} else {
		currentImg = imgEl;
	}
}

function Cji_ImgOut(imgEl){
	if( currentImg != imgEl ) {
		imgEl.src = imgEl.src.replace("on.gif", ".gif");
	}
}

// °øÅë FAQ
function Cji_Faq(obj){
	var Faq_dtList = document.getElementById("CJGameFaq").getElementsByTagName("dt");
	var Faq_ddList = document.getElementById("CJGameFaq").getElementsByTagName("dd");
	for (i=0;i<Faq_dtList.length;i++) {
		if(obj.parentNode.parentNode==Faq_dtList[i]){
		Faq_ddList[i].style.display = (Faq_ddList[i].style.display != "block" ? "block" : "none")
		Faq_dtList[i].className = (Faq_dtList[i].className != "on" ? "on" : "")
		} else {
		Faq_ddList[i].style.display = "none"
		Faq_dtList[i].className = ""
		}
	}
}

// Å¬·¡½º ³×ÀÌ¹Ö º¯°æ
function Cji_ClassOn(m_id,m_tag){
	var mList = document.getElementById(m_id).getElementsByTagName(m_tag)
	for (i=0;i<mList.length;i++) {
		old_class="";
		mList[i].onmouseover = function() {
		old_class = this.className;
		this.className = this.className + " on";
		}
		mList[i].onmouseout = function() {
		this.className = old_class;
		}
	}
}

// °øÅë ÅÇ
function Cji_Tab(m_id){
	bg_class = "k1"
	var cName = document.getElementById(m_id).className + " " + bg_class
	document.getElementById(m_id).className = cName
	var tList = document.getElementById(m_id).getElementsByTagName("a");

	for (i=0;i<tList.length;i++) {
		TabPlay = function() {
			for (y=0;y<tList.length;y++) {
			tList[y].className = "";
			document.getElementById(m_id + "_sub" + (y+1)).style.display = "none";
			if(this==tList[y]){x=y+1}
			}
			this.className = this.className + "on";
			document.getElementById(m_id + "_sub" + x).style.display = "block";
			document.getElementById(m_id).className = cName.replace(bg_class,"k" + x)
			return false;
		}
		tList[i].onclick = TabPlay;
		if(arguments[1]=="Mover"){tList[i].onmouseover = TabPlay;}
	}
}


// °øÅë »õÃ¢À¸·Î ¿­±â
function Cji_NewWindow() {

    var pURL    = arguments[0];
    var pName   = arguments[1];

    try {
        var popup = window.open(pURL, pName);
        if (popup != null || !popup.close) popup.focus();
    } catch(e) {
        alert("ÆË¾÷Â÷´Ü ¼³Á¤À» Ç®¾îÁÖ¼¼¿ä.\n[¹æ¹ý: µµ±¸-ÆË¾÷Â÷´Ü »ç¿ë¾ÈÇÔ Å¬¸¯]");
    }
    return popup;
}

// ÆÄ¶ó¹ÌÅÍ Àû¿ë
function Cji_Parameter(paramName){
	var pmt = location.search;
	if (pmt.length>1&&pmt.indexOf("?")>-1){ pmt = pmt.substring(1,pmt.length);}
	var param = pmt.split("&");
	var paramValue = "";
	for (var i=0; i<param.length; i++) {
		if (param[i].indexOf("=")>-1) {
			var pName = param[i].split("=")[0];
			var pValue = param[i].split("=")[1];
			if (pName==paramName) {
				paramValue = pValue;
				break;
			}
		}
	}
	return paramValue;
}


/* 101003 °³Æí Ãß°¡*/
function Cji_Class(name,type){
	var r = [];
	var re = new RegExp("(|\\s)" + name + "(\\s|$)");
	var e = document.getElementsByTagName(type||"*")
	for(var j=0;j<e.length;j++){ if(re.test(e[j].className)) r.push(e[j]) }
	return r
}
function Cji_DivShow(div_id){
	document.getElementById(div_id).style.display = "block";
}
function Cji_DivHide(div_id){
	document.getElementById(div_id).style.display = "none";
}

function iecompat(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}
function SwfId(str){ return (navigator.appName == "Microsoft Internet Explorer")? document.getElementById(str) : document.getElementsByName(str)[0] }

function Cji_FlashCompany() {
 return "Áñ°Å¿î °ÔÀÓ¼¼»ó ³Ý¸¶ºí!";
}
