
//ÅÇ¸Þ´º
function toggleLayers(showIds, hideIds)
{
    for(var i in hideIds)
        document.getElementById(hideIds[i]).style.display = 'none';
    for(var i in showIds)
        document.getElementById(showIds[i]).style.display = 'block';
}

//Á¡¼±¾ø¾Ö±â
function allblur()
{
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin = allblur;

//·Ñ¿À¹ö
function bt(id,after) 
{ 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+after+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
} 

//ÀÌ¸ð¼Ç¾ÆÀÌÄÜ
function getEmotionIcon(color)
{
	var icon = "";
	
	icon += "<TABLE CELLSPACING=0 CELLPADDING=0>";
	icon += "<TR BGCOLOR='"+color+"'>";

	for(var i = 1; i < 17; i++)
	{
		icon += "<TD ID='emotion_td_"+i+"' STYLE='border:1 solid "+color+";' onclick=\"getSelectEm("+i+",'"+color+"')\"><IMG ID='emotion_img_"+i+"' SRC='../../images/common/"+i+".gif' STYLE='cursor:hand;filter:alpha(opacity=40),gray();' HSPACE=0 VSPACE=0></TD>";
	}
	
	icon += "</TR>";
	icon += "</TABLE>";

	document.write(icon);
	
	// ÃÊ±âÈ­
	document.getElementById('emotion_td_1').style.border = '1 solid #FFFFFF';
	document.getElementById('emotion_td_1').style.background = '#ffffff';
	document.getElementById('emotion_img_1').style.filter = 'none';	
	if (document.getElementById('iconVal') != null) {
		document.getElementById('iconVal').value = 1; 
	}		
}

//ÀÌ¸ð¼Ç¾ÆÀÌÄÜ__ ÀÌ¹ÌÁö °æ·Î../
function getEmotionIcon2(color) 
{
	var icon = "";
	
	icon += "<TABLE CELLSPACING=0 CELLPADDING=0>";
	icon += "<TR BGCOLOR='"+color+"'>";

	for(var i = 1; i < 17; i++)
	{
		icon += "<TD ID='emotion_td_"+i+"' STYLE='border:1 solid "+color+";' onclick=\"getSelectEm("+i+",'"+color+"')\"><IMG ID='emotion_img_"+i+"' SRC='../images/common/"+i+".gif' STYLE='cursor:hand;filter:alpha(opacity=40),gray();' HSPACE=0 VSPACE=0></TD>";
	}
	
	icon += "</TR>";
	icon += "</TABLE>";

	document.write(icon);
	
	// ÃÊ±âÈ­
	document.getElementById('emotion_td_1').style.border = '1 solid #FFFFFF';
	document.getElementById('emotion_td_1').style.background = '#ffffff';
	document.getElementById('emotion_img_1').style.filter = 'none';	
	if (document.getElementById('iconVal') != null) {
		document.getElementById('iconVal').value = 1; 
	}	
}

//ÀÌ¸ð¼Ç¼±ÅÃ
function getSelectEm(g,color)
{
	if (document.getElementById('iconVal') != null) {
		document.getElementById('iconVal').value = g; 
	}

	for(var i = 1; i < 17; i++)
	{
		if(i == g)
		{
			document.getElementById('emotion_td_' + i).style.border = '1 solid #FFFFFF';
			document.getElementById('emotion_td_' + i).style.background = '#ffffff';
			document.getElementById('emotion_img_' + i).style.filter = 'none';
		}
		else {
			document.getElementById('emotion_td_' + i).style.border = '1 solid '+color;
			document.getElementById('emotion_td_' + i).style.background = color;
			document.getElementById('emotion_img_' + i).style.filter = 'alpha(opacity=40),gray()';
		}
	}
}

function openwin(theURL, w, h, title, bScroll)
{
	var scroll = "auto";
	if ( ! bScroll ) scroll = "no";
	var feature = 'width=' + w + ',height=' + h + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=' + scroll + ',resizable=no';
	window.open(theURL, title, feature);
}

function openwin_Privacy()
{
	openwin('/Web/Members/Privacy.aspx', 554, 628, 'Privacy', false);
}

function openwin_UseRule()
{
	openwin('/Web/Members/UseRule.aspx', 554, 628, 'UseRule', false);
}

function open_history()
{
	openwin('/Web/Club/Historyroom.html', 10, 10, 'history', false);
}

function open_history1()
{
	openwin('/Web/Club/Historyroom1.html', 10, 10, 'history', false);
}

function RdolistNullChk(frm,msg)
{
    var cnt = 0;
    var val = "";   
            
    for(i=0 ; i<frm.length ; i++)
    {
        if(frm[i].checked)
        {            
            cnt++;
        }
    }    
            
    if(parseInt(cnt)==0)
    {
        alert(msg);
        return false;
    }
    return true;
}

function mov_view(wd,ht,url)
{
	if ( url != "" )
	{
		document.write('<Object ID="mediaPlayer" WIDTH="'+wd+'" HEIGHT="'+ht+'" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" STANDBY="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject">');
		document.write('<PARAM NAME="fileName" VALUE="'+url+'">');
		document.write('<PARAM NAME="animationatStart" VALUE="true">');
		document.write('<PARAM NAME="transparentatStart" VALUE="true">');
		document.write('<PARAM NAME="autoStart" VALUE="true">');
		document.write('<PARAM NAME="showControls" VALUE="true">');
		document.write('</OBJECT>');		
	}
}


function accesslog(groupcd, menucd)
{
	var now = new Date();
	var hh = now.getHours();
	if ( hh < 10 ) hh = "0" + hh;
	var mm = now.getMinutes();
	if ( mm < 10 ) mm = "0" + mm;
	var ss = now.getSeconds();
	if ( ss < 10 ) ss = "0" + ss;
	var tm = " " + hh + mm + ss;
    document.write("<iframe marginWidth='0' marginHeight='0'  ");
    document.write("	src='/web/AccessLog.aspx?groupcd=" + groupcd + "&menucd=" + menucd + "&tm=" + tm + "' frameBorder='0' width='0'  ");
    document.write("	scrolling='no' height='0' topmargin='0'>  ");
    document.write("	</iframe>  ");
}

