﻿function layerOn (id) {
	var el = document.getElementById(id);
	el.style.display = (el.style.display == 'none') ? 'block' : 'none';
	return false;
}

function cghName (id) {
	var target = document.getElementById(id);
	if (target.className.indexOf('setQuery_sm') > -1 ) target.className="setQuery";
	else target.className="setQuery setQuery_sm";
}

function cghBg (id) {
	var target = document.getElementById(id);
	if (target.className.indexOf('setQueryDev_sm') > -1 ) target.className="setQueryDev";
	else target.className="setQueryDev setQueryDev_sm";
}

function writeSwf(files, width, height,flag) {
	var wmode = (flag == 1) ? 'window' : 'transparent';
	var sTag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ width + '" height="'+ height + '" id="'+ name +'" align="middle">'
		+ '<param name="allowScriptAccess" value="always" />'
		+ '<param name="movie" value="' + files + '" />'
		+ '<param name="quality" value="high" />'
		+ '<param name="wmode" value="'+wmode+'">'
		+ '<param name="Menu" value="false">'
		+ '<embed wmode="transparent" src="' + files + '" quality="high" bgcolor="#ffffff" width="' + width + '" height="'+ height +'" name="'+ name +'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect="true" Menu="false" /></object>';
	document.write (sTag);
	//eval("window." + name + " = document.getElementById('" + name + "');");
}

function swf (src, w, h)
{
    html = '';
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" WIDTH="'+w+'" HEIGHT="'+h+'">';
	html += '<PARAM NAME=movie VALUE="'+src+'">';
	html += '<PARAM NAME=quality VALUE=high>';
	html += '<PARAM NAME="wmode" value="transparent" />';
	html += '<EMBED src="'+src+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"  WIDTH="'+w+'" HEIGHT="'+h+'"></EMBED>';
	html += '</OBJECT>';
	document.write(html);
}

// IE6 ?뚮━而ㅻ쾭洹??⑥튂
try { document.execCommand("BackgroundImageCache",false,true) } catch (e) {};

function chgTab15() {
	var eight = document.getElementById('age18');
	var fifty = document.getElementById('age15');
	eight.style.display = 'none';
	fifty.style.display = 'block';
}
function chgTab18() {
	var eight = document.getElementById('age18');
	var fifty = document.getElementById('age15');
	eight.style.display = 'block';
	fifty.style.display = 'none';
}


function setGuildData (val, search_type, url) { 
    
    switch(search_type)
    {
        case 'minible':
            goMinibl(url);
            break;
        case 'guild':
            openWindow(url,'Guild','');
            break;
        default:
            return;
    }
	var setArea = document.getElementById('guildValue');
	setArea.innerHTML=val;
	return false;
}

// 2009-12-07 ?꾩쟾怨쇱젣 寃?됱쓣 ?꾪빐 異붽?
function setWorkData(val, search_type) {
    
	var setArea = document.getElementById('setValue');
	setArea.innerHTML=val;
	return false;
}