
var ifrContentsTimer;

var mouseState = false;

var ver = navigator.appVersion;


function makeflash(Url,Width,Height,mainNum,subNum)
{   
  document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + Width + "\" height=\"" + Height + "\">"); 
  document.writeln("<param name=\"movie\" value=\"" + Url + "\">"); 
  document.writeln("<param name=\"quality\" value=\"high\" />");     
  document.writeln("<param name=\"wmode\" value=\"transparent\">"); 
  document.write("<param name='menu' value='false'>");
  document.writeln("<embed autostart=\"false\" src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">"); 
  document.write("<param name=\"FlashVars\" value=\"mainNum="+mainNum+"&subNum="+subNum+"\">");	
  document.writeln("</object>");     
}


function makeflv(flv,flvimg,domain,domain2,autostart)
{
	var Url = "/flash/handyplayer.swf";
	var Width = 240;
	var Height = 340;
  document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + Width + "\" height=\"" + Height + "\">"); 
  document.write("<param name=\"movie\" value=\"" + Url + "\">"); 
  document.write("<param name=\"quality\" value=\"high\" />");     
  document.write("<param name=\"allowfullscreen\" value=\"true\" />");     
  document.write("<param name=\"flashvars\" value=\"file="+domain2+"/flv/"+flv+"&image="+domain+"/bbs/filebox/flvimg/"+flvimg+"&volume=90&overstretch=false&usefullscreen=true&autostart="+autostart+"\">");
  document.write("<embed autostart=\"false\" src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">"); 
  document.write("</object>");     
}

function makeflv2(flv,flvimg,domain,domain2,autostart, wid, hei)
{
	var Url = "/flash/handyplayer.swf";
	var Width = wid;
	var Height = hei;
  document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + Width + "\" height=\"" + Height + "\">"); 
  document.write("<param name=\"movie\" value=\"" + Url + "\">"); 
  document.write("<param name=\"quality\" value=\"high\" />");     
  document.write("<param name=\"allowfullscreen\" value=\"true\" />");     
  document.write("<param name=\"flashvars\" value=\"file="+domain2+"/flv_touch/"+flv+"&image="+domain+"/bbs/filebox/flvimg_touch/"+flvimg+"&volume=90&overstretch=false&usefullscreen=true&autostart="+autostart+"\">");
  document.write("<embed autostart=\"false\" src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">"); 
  document.write("</object>");     
}

function makeflv3(flv,flvimg,domain,domain2,autostart, wid, hei)
{
	var Url = "/flash/handyplayer.swf";
	var Width = wid;
	var Height = hei;
  document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + Width + "\" height=\"" + Height + "\">"); 
  document.write("<param name=\"movie\" value=\"" + Url + "\">"); 
  document.write("<param name=\"quality\" value=\"high\" />");     
  document.write("<param name=\"allowfullscreen\" value=\"true\" />");     
  document.write("<param name=\"flashvars\" value=\"file="+domain2+"/flv/"+flv+"&image="+domain+"/bbs/filebox/flvimg/"+flvimg+"&volume=90&overstretch=false&usefullscreen=true&autostart="+autostart+"\">");
  document.write("<embed autostart=\"false\" src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">"); 
  document.write("</object>");      
}

function go_login(arg)
{
	if(confirm("¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ã·Á¸é ·Î±×ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù. ·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?"))
	{
		location.href="/bbs/member_login.php?url="+encodeURIComponent(arg);
	}
}

function div_hide(arg, arg2) {
	mouseState = false;
	setTimeout("div_doAction('"+arg+"')", arg2);
}


function div_tens(arg) {
	var objLayer=document.getElementById(arg);
	mouseState = true;
	
	objLayer.style.display="";
	
	
}

function div_show(arg) {
	var objLayer=document.getElementById(arg);
	mouseState = true;
	
	if(objLayer.style.display==''){
		objLayer.style.display="none";
	}
	else {
		objLayer.style.display="";
	}
	show_position2(arg,300,800);
	
}

function div_doAction(arg) {
	var objLayer=document.getElementById(arg);
	if(!mouseState) {
		objLayer.style.display='none';
	}
}

function resizeRetry() 
{ //ÀÌ¹ÌÁö°°ÀÌ ·Îµù½Ã°£ÀÌ °É¸®´Â °ÍµéÀÌ ·ÎµùµÈÈÄ ´Ù½Ã ÇÑ¹ø ¸®»çÀÌÁî
	if(document.body.readyState == "complete") 
	{ 
		clearInterval(ifrContentsTimer); 
	}
	else 
	{ 
		resizeFrame(); 
	} 
} 
function resizeFrame()//ÆäÀÌÁö°¡ ·ÎµùµÇ¸é ¹Ù·Î ¸®»çÀÌÁî..
{  
	var h = parseInt(document.body.scrollHeight)+10;
	if(h<600)
	{
		h=600;
	}
	self.resizeTo(document.body.scrollWidth + (document.body.offsetWidth-document.body.clientWidth), h); 
} 

function resizeFrame_content()//ÆäÀÌÁö°¡ ·ÎµùµÇ¸é ¹Ù·Î ¸®»çÀÌÁî..
{  
	var h = parseInt(document.body.scrollHeight)+10;
	if(h<50)
	{
		h=50;
	}
	self.resizeTo(760, h+10); 
} 

function show_position(arg1, arg2, arg3) {
	var objLayer=document.getElementById(arg1);
	mouseStatus = true;
	document.getElementById(arg1).style.display='';
	if(document.body.clientWidth > 1024)
	{ 
		document.getElementById(arg1).style.left=document.body.clientWidth/2+arg2;
	} 
	else 
	{ 
		document.getElementById(arg1).style.left=arg3;
	}
}

function show_position2(arg1, arg2, arg3) {
	var objLayer=document.getElementById(arg1);
	mouseStatus = true;
	if(document.body.clientWidth > 1024)
	{ 
		document.getElementById(arg1).style.left=document.body.clientWidth/2+arg2;
	} 
	else 
	{ 
		document.getElementById(arg1).style.left=arg3;
	}
}

function position_replace(){
    if(document.body.clientWidth > 1000)
	{ 
		document.all.floater.style.left=document.body.clientWidth/2-630;
		document.all.right_top_banner.style.left=document.body.clientWidth/2+500;
		document.all.login_right.style.left=document.body.clientWidth/2+500;
		//show_position("today_login", 53, 493);
		document.all.floater.style.display="";
		//document.all.following_down_banner.style.left=document.body.clientWidth/2;
		//document.getElementById("following_down_banner").style.top=document.body.scrollTop+document.body.clientHeight-20;
		
	} 
	else 
	{ 
		document.all.right_top_banner.style.left="1010px";
		document.all.login_right.style.left="1010px";
		document.all.floater.style.display="none";
		//document.all.following_down_banner.style.left=document.body.clientWidth/2;
		//document.getElementById("following_down_banner").style.top=document.body.scrollTop+document.body.clientHeight-20;
		
	}
}

function position_replace2(){
    if(document.body.clientWidth > 1000)
	{ 
		document.all.floater.style.left=document.body.clientWidth/2-630;
		document.all.right_top_banner.style.left=document.body.clientWidth/2+500;
		document.all.login_right.style.left=document.body.clientWidth/2+500;
		//show_position("today_login", 53, 493);
		document.all.floater.style.display="";
		document.all.overhotbox.style.left=document.body.clientWidth/2+300;
		//document.all.following_down_banner.style.left=document.body.clientWidth/2;
		//document.getElementById("following_down_banner").style.top=document.body.scrollTop+document.body.clientHeight-20;
		//document.getElementById("backskin_left1").style.left = document.body.clientWidth/2-835;
		//document.getElementById("backskin_left2").style.left = document.body.clientWidth/2+630;

	} 
	else 
	{ 
		document.all.right_top_banner.style.left="1010px";
		document.all.login_right.style.left="1010px";
		document.all.floater.style.display="none";
		//document.all.overhotbox.style.display="";
		document.all.overhotbox.style.left="800px";
		//document.all.following_down_banner.style.left=document.body.clientWidth/2;
		//document.getElementById("following_down_banner").style.top=document.body.scrollTop+document.body.clientHeight-20;
		//document.getElementById("backskin_left1").style.display = "none";
		//document.getElementById("backskin_left2").style.left = "1135px";

	}

	

}


function global1()
{
	location.href="/index.html";
}
function global2()
{
	location.href="/sub9/menu1.html";
}
function global3()
{
	location.href="/sub5/menu5.html";
}
function global4()
{
	location.href="/sub9/menu4.html";
}
function global5()
{
	location.href="/sub2/menu6.html";
}

function check_outlogin()
{
	if(!form_outlogin.user_id.value)
	{
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		form_outlogin.user_id.focus();
		return false;
	}
	if(!form_outlogin.user_pass.value)
	{
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		form_outlogin.user_pass.focus();
		return false;
	}
}

function open_portfolio()
{
	window.open('/portfolio/portfolio.php','portfolio','width=845,height=700,left=75,top=0,scrollbars=yes')
}

function open_sitemap()
{
	window.open('/inc/sitemap.html','sitemap','width=600,height=450,left=50,top=50')
}

function open_map()
{
	window.open('/sub1/map.html','map','width=527,height=481,left=50,top=50')
}




//*** »çÀÌµåºä start ***//
var home_url     = "http://tjlink.co.kr";
var g4_path      = "..";
var g4_bbs       = "bbs";
var g4_bbs_img   = "img";
var g4_url       = "http://tjlink.co.kr";
var g4_is_member = "";
var g4_is_admin  = "";
var g4_bo_table  = "tipntech";
var g4_sca       = "";
var g4_charset   = "euc-kr";
var g4_is_gecko  = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie     = navigator.userAgent.toLowerCase().indexOf("msie") != -1;

if (typeof(SIDEVIEW_JS) == 'undefined') // ÇÑ¹ø¸¸ ½ÇÇà
{
    if (typeof g4_is_member == 'undefined')
        alert('g4_is_member º¯¼ö°¡ ¼±¾ðµÇÁö ¾Ê¾Ò½À´Ï´Ù. js/sideview.js');
    if (typeof g4_path == 'undefined')
        alert('g4_path º¯¼ö°¡ ¼±¾ðµÇÁö ¾Ê¾Ò½À´Ï´Ù. js/sideview.js');

    var SIDEVIEW_JS = true;

    // ¾Æ·¡ÀÇ ¼Ò½ºÄÚµå´Â daum.net Ä«ÆäÀÇ ÀÚ¹Ù½ºÅ©¸³Æ®¸¦ Âü°íÇÏ¿´½À´Ï´Ù.
    // È¸¿øÀÌ¸§ Å¬¸¯½Ã È¸¿øÁ¤º¸µîÀ» º¸¿©ÁÖ´Â ·¹ÀÌ¾î
    function insertHead(name, text, evt) 
    {
        var idx = this.heads.length;
        var row = new SideViewRow(-idx, name, text, evt);
        this.heads[idx] = row;
        return row;
    }

    function insertTail(name, evt) 
    {
        var idx = this.tails.length;
        var row = new SideViewRow(idx, name, evt);
        this.tails[idx] = row;
        return row;
    }

    function SideViewRow(idx, name, onclickEvent) 
    {
        this.idx = idx;
        this.name = name;
        this.onclickEvent = onclickEvent;
        this.renderRow = renderRow;
        
        this.isVisible = true;
        this.isDim = false;
    }

    function renderRow() 
    {
        if (!this.isVisible)
            return "";
        
        var str = "<tr height='22' onmouseover=this.style.backgroundColor='#E4FF75'; onmouseout=this.style.backgroundColor='';><td id='sideViewRow_"+this.name+"' style='padding-top:3'><span id='sideview'>¤ý"+this.onclickEvent+"</span></td></tr>";
        return str;
    }

    function showSideView(curObj, mb_id, name, board_id, user_id, is_friend) 
    {
        var sideView = new SideView('nameContextMenu', curObj, mb_id, name, board_id, user_id, is_friend);
        sideView.showLayer();
    }

	function showSideView2(curObj, mb_id, name, board_id, user_id, is_friend, game_no) 
    {
        var sideView = new SideView2('nameContextMenu', curObj, mb_id, name, board_id, user_id, is_friend, game_no);
        sideView.showLayer();
    }

	function showSideView3(curObj, mb_id, name, user_id, is_friend) 
    {
		
        var sideView = new SideView3('nameContextMenu', curObj, mb_id, name, user_id, is_friend);
        sideView.showLayer();

    }

    function SideView(targetObj, curObj, mb_id, name, board_id, user_id, is_friend) 
    {
        this.targetObj = targetObj;
        this.curObj = curObj;
        this.mb_id = mb_id;
        name = name.replace(/¡¦/g,"");
        this.name = name;
        this.board_id = board_id;
        this.user_id = user_id;
        this.showLayer = showLayer;
        this.makeNameContextMenus = makeNameContextMenus;
        this.heads = new Array();
        this.insertHead = insertHead;
        this.tails = new Array();
        this.insertTail = insertTail;
        this.getRow = getRow;
        this.hideRow = hideRow;		
        this.dimRow = dimRow;
    

				this.insertTail("memo", "<a href=javascript:myhome('"+mb_id+"')>ÇÁ·ÎÇÊº¸±â</a>");
				if(user_id)
				{
					this.insertTail("mail", "<a href=javascript:letter_send('"+mb_id+"')>ÂÊÁöº¸³»±â</a>");
				}
				if(user_id && !is_friend)
				{					
					this.insertTail("homepage", "<a href=javascript:add_friend('"+name+"','"+mb_id+"')>Ä£±¸µî·ÏÇÏ±â</a>");
				}
				if(is_friend)
				{
					this.insertTail("del_friend", "<a href=javascript:del_friend('"+name+"','"+mb_id+"')>Ä£±¸Á¦¿ÜÇÏ±â</a>");
				}
				if(user_id){
					this.insertTail("give_candy", "<a href=javascript:gift_candy_list('"+mb_id+"')>Äµµð¼±¹°ÇÏ±â</a>");
				}

				if(!is_friend)
				{
					this.insertTail("info", "<a href=\"/bbs/list.php?search=nickname&board_id="+board_id+"&key_word="+name+"\">´Ð³×ÀÓÀ¸·Î°Ë»ö</a>");
				}
    }

	function SideView2(targetObj, curObj, mb_id, name, board_id, user_id, is_friend, game_no) 
    {
        this.targetObj = targetObj;
        this.curObj = curObj;
        this.mb_id = mb_id;
        name = name.replace(/¡¦/g,"");
        this.name = name;
        this.board_id = board_id;
        this.user_id = user_id;
        this.showLayer = showLayer;
        this.makeNameContextMenus = makeNameContextMenus;
        this.heads = new Array();
        this.insertHead = insertHead;
        this.tails = new Array();
        this.insertTail = insertTail;
        this.getRow = getRow;
        this.hideRow = hideRow;		
        this.dimRow = dimRow;
    

				this.insertTail("memo", "<a href=javascript:myhome('"+mb_id+"')>ÇÁ·ÎÇÊº¸±â</a>");
				if(user_id)
				{
					this.insertTail("mail", "<a href=javascript:letter_send('"+mb_id+"')>ÂÊÁöº¸³»±â</a>");
				}
				if(user_id && !is_friend)
				{					
					this.insertTail("homepage", "<a href=javascript:add_friend('"+name+"','"+mb_id+"')>Ä£±¸µî·ÏÇÏ±â</a>");
				}
				if(is_friend)
				{
					this.insertTail("del_friend", "<a href=javascript:del_friend('"+name+"','"+mb_id+"')>Ä£±¸Á¦¿ÜÇÏ±â</a>");
				}
				if(user_id){
					this.insertTail("give_candy", "<a href=javascript:gift_candy_list('"+mb_id+"')>Äµµð¼±¹°ÇÏ±â</a>");
				}
				if(!is_friend)
				{
					this.insertTail("info", "<a href=\"/bbs/list.php?search=nickname&board_id="+board_id+"&game_no="+game_no+"&key_word="+name+"\">´Ð³×ÀÓÀ¸·Î°Ë»ö</a>");
				}
    }

	function SideView3(targetObj, curObj, mb_id, name, user_id, is_friend) 
    {
		
        this.targetObj = targetObj;
        this.curObj = curObj;
        this.mb_id = mb_id;
        name = name.replace(/¡¦/g,"");
        this.name = name;

        this.user_id = user_id;
		
        this.showLayer = showLayer;
				
        this.makeNameContextMenus = makeNameContextMenus;
        this.heads = new Array();
        this.insertHead = insertHead;
        this.tails = new Array();
	
        this.insertTail = insertTail;
        this.getRow = getRow;
        this.hideRow = hideRow;		
        this.dimRow = dimRow;
		    

				this.insertTail("memo", "<a href=javascript:myhome2('"+mb_id+"')>ÇÁ·ÎÇÊº¸±â</a>");
				if(user_id)
				{
					this.insertTail("mail", "<a href=javascript:letter_send('"+mb_id+"')>ÂÊÁöº¸³»±â</a>");
				}					
    }

    function showLayer() 
    {
        clickAreaCheck = true;
        var oSideViewLayer = document.getElementById(this.targetObj);
        var oBody = document.body;
            
        if (oSideViewLayer == null) {
            oSideViewLayer = document.createElement("DIV");
            oSideViewLayer.id = this.targetObj;
            oSideViewLayer.style.position = 'absolute';
            oBody.appendChild(oSideViewLayer);
        }
        oSideViewLayer.innerHTML = this.makeNameContextMenus();
        
        if (getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + oSideViewLayer.scrollHeight + 5 > oBody.scrollHeight)
            oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - oSideViewLayer.scrollHeight;
        else
            oSideViewLayer.style.top = getAbsoluteTop(this.curObj) + this.curObj.offsetHeight;

        oSideViewLayer.style.left = getAbsoluteLeft(this.curObj) - this.curObj.offsetWidth + 14;

        divDisplay(this.targetObj, 'block');

        selectBoxHidden(this.targetObj);
    }

    function getAbsoluteTop(oNode)
    {
        var oCurrentNode=oNode;
        var iTop=0;
        while(oCurrentNode.tagName!="BODY") {
            iTop+=oCurrentNode.offsetTop - oCurrentNode.scrollTop;
            oCurrentNode=oCurrentNode.offsetParent;
        }
        return iTop;
    }

    function getAbsoluteLeft(oNode)
    {
        var oCurrentNode=oNode;
        var iLeft=0;
        iLeft+=oCurrentNode.offsetWidth;
        while(oCurrentNode.tagName!="BODY") {
            iLeft+=oCurrentNode.offsetLeft;
            oCurrentNode=oCurrentNode.offsetParent;
        }
        return iLeft;
    }


    function makeNameContextMenus() 
    {
        var str = "<table border='0' cellpadding='1' cellspacing='0' width='115' style='border:1px solid #E3E7E0;' bgcolor='#fdfdfd'>";
        
        var i=0;
        for (i=this.heads.length - 1; i >= 0; i--)
            str += this.heads[i].renderRow();
       
        var j=0;
        for (j=0; j < this.tails.length; j++)
            str += this.tails[j].renderRow();
        
        str += "</table>";
        return str;
    }

    function getRow(name) 
    {
        var i = 0;
        var row = null;
        for (i=0; i<this.heads.length; ++i) 
        {
            row = this.heads[i];
            if (row.name == name) return row;
        }

        for (i=0; i<this.tails.length; ++i) 
        {
            row = this.tails[i];
            if (row.name == name) return row;
        }
        return row;
    }

    function hideRow(name) 
    {
        var row = this.getRow(name);
        if (row != null)
            row.isVisible = false;
    }

    function dimRow(name) 
    {
        var row = this.getRow(name);
        if (row != null)
            row.isDim = true;
    }
    // Internet Explorer¿¡¼­ ¼¿·ºÆ®¹Ú½º¿Í ·¹ÀÌ¾î°¡ °ãÄ¥½Ã ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º µÚ·Î ¼û´Â Çö»óÀ» ÇØ°áÇÏ´Â ÇÔ¼ö
    // ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º¸¦ Ä§¹üÇÏ¸é ¼¿·ºÆ® ¹Ú½º¸¦ hidden ½ÃÅ´
    // <div id=LayerID style="display:none; position:absolute;" onpropertychange="selectBoxHidden('LayerID')">
    function selectBoxHidden(layer_id) 
    {
        //var ly = eval(layer_id);
        var ly = document.getElementById(layer_id);

        // ·¹ÀÌ¾î ÁÂÇ¥
        var ly_left   = ly.offsetLeft;
        var ly_top    = ly.offsetTop;
        var ly_right  = ly.offsetLeft + ly.offsetWidth;
        var ly_bottom = ly.offsetTop + ly.offsetHeight;

        // ¼¿·ºÆ®¹Ú½ºÀÇ ÁÂÇ¥
        var el;

        for (i=0; i<document.forms.length; i++) {
            for (k=0; k<document.forms[i].length; k++) {
                el = document.forms[i].elements[k];    
                if (el.type == "select-one") {
                    var el_left = el_top = 0;
                    var obj = el;
                    if (obj.offsetParent) {
                        while (obj.offsetParent) {
                            el_left += obj.offsetLeft;
                            el_top  += obj.offsetTop;
                            obj = obj.offsetParent;
                        }
                    }
                    el_left   += el.clientLeft;
                    el_top    += el.clientTop;
                    el_right  = el_left + el.clientWidth;
                    el_bottom = el_top + el.clientHeight;

                    // ÁÂÇ¥¸¦ µûÁ® ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º¸¦ Ä§¹üÇßÀ¸¸é ¼¿·ºÆ® ¹Ú½º¸¦ hidden ½ÃÅ´
                    if ( (el_left >= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) || 
                         (el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||
                         (el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) ||
                         (el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) )
                        el.style.visibility = 'hidden';
                }
            }
        }
    }

    // °¨Ãß¾îÁø ¼¿·ºÆ® ¹Ú½º¸¦ ¸ðµÎ º¸ÀÌ°Ô ÇÔ
    function selectBoxVisible() 
    {
        for (i=0; i<document.forms.length; i++) 
        {
            for (k=0; k<document.forms[i].length; k++) 
            {
                el = document.forms[i].elements[k];    
                if (el.type == "select-one" && el.style.visibility == 'hidden')
                    el.style.visibility = 'visible';
            }
        }
    }


    function getAbsoluteTop(oNode)
    {
        var oCurrentNode=oNode;
        var iTop=0;
        while(oCurrentNode.tagName!="BODY") {
            iTop+=oCurrentNode.offsetTop - oCurrentNode.scrollTop;
            oCurrentNode=oCurrentNode.offsetParent;
        }
        return iTop;
    }


    function getAbsoluteLeft(oNode)
    {
        var oCurrentNode=oNode;
        var iLeft=0;
        iLeft+=oCurrentNode.offsetWidth;
        while(oCurrentNode.tagName!="BODY") {
            iLeft+=oCurrentNode.offsetLeft;
            oCurrentNode=oCurrentNode.offsetParent;
        }
        return iLeft;
    }

    function divDisplay(id, act) 
    {
        selectBoxVisible();

        document.getElementById(id).style.display = act;
    }

    function hideSideView() 
    {
        if (document.getElementById("nameContextMenu"))
            divDisplay ("nameContextMenu", 'none');
    }

    var clickAreaCheck = false;
    document.onclick = function() 
    {
        if (!clickAreaCheck) 
            hideSideView();
        else 
            clickAreaCheck = false;
    }
}


function gift_candy_list(arg) {
	window.open('/bbs/candy_move.php?no=&user_id='+arg+'&mode=candy_move', 'nickname', 'width=400, height=370, top=50, left=100, scrollbars=no, resizable=no');
}

function myhome(home_id)
{
	var left = (screen.width-700)/2;
	var top = 10;
	window.open("/mypage/myhome.php?home_id="+home_id,"myhome","width=700,height=664,left="+left+",top="+top);
}

function myhome2(home_id)
{
	var left = (screen.width-700)/2;
	var top = 10;
	var win = window.open("/mypage/myhome.php?home_id="+home_id,"","width=700,height=664,left="+left+",top="+top);
	win.opener =parent.opener;
}

function letter_send(s_id)
{
	window.open("/mypage/letter/letter_send.php?s_id="+s_id,"letter_send","width=350,height=350,scrollbars=no");
}
function add_friend(name,friend_id)
{
	var left = (screen.width-250)/2;
	var top = (screen.height-150)/2;

	if(confirm(name+"´ÔÀ» Ä£±¸·Î µî·ÏÇÏ½Ã°Ú½À´Ï±î?"))
	{
		window.open("/mypage/add_friend_success.php?friend_id="+friend_id,"add_friend_success","width=250,height=150,left="+left+",top="+top);
	}
}
function del_friend(name,friend_id)
{
	var left = (screen.width-250)/2;
	var top = (screen.height-150)/2;

	if(confirm(name+"´ÔÀ» Ä£±¸¿¡¼­ Á¦¿ÜÇÏ½Ã°Ú½À´Ï±î?"))
	{
		window.open("/mypage/del_friend_success.php?friend_id="+friend_id+"&name="+name,"add_friend_success","width=250,height=150,left="+left+",top="+top);
	}
}
//*** »çÀÌµåºä end ***//

//*** ½ºÅ©·¦ ***//
function scrap(board_id,board_no,board_writer,game_no)
{
	if(confirm("ÇöÀç °Ô½Ã¹°À» ½ºÅ©·¦ ÇÏ½Ã°Ú½À´Ï±î?    "))
	{
		location.href="post.php?mode=scrap&board_id="+board_id+"&board_no="+board_no+"&board_writer="+board_writer+"&game_no="+game_no;
	}
}
function scrap_del(no)
{
	if(confirm("½ºÅ©·¦¿¡¼­ Á¦¿Ü ÇÏ½Ã°Ú½À´Ï±î?    "))
	{
		location.href="post.php?mode=scrap_del&no="+no;
	}
}



//*** ½æ³×ÀÏÀÌ¹ÌÁö ¸¶¿ì½º ¿À¹ö ±âº» 80px ***//
function popup_menu1(content){
	menu_box.style.pixelLeft =event.clientX + 15 + document.body.scrollLeft ;
	menu_box.style.pixelTop = event.clientY + 22 + document.body.scrollTop ;

	text ='<table border="0" cellpadding="0" cellspacing="0" bgcolor="#fefefe" style="width:300px;font-size:9pt;">';
	text += '<tr><td style="padding:5px;border:1px solid #aaaaaa" >'+content+'</td></tr>'
	text += '</tr></table>';
	menu_box.innerHTML=text;
} 

function popup_menu2(content){
	menu_box.style.pixelLeft =event.clientX + 15 + document.body.scrollLeft ;
	menu_box.style.pixelTop = event.clientY + 22 + document.body.scrollTop ;

	text ='<table border="0" cellpadding="0" cellspacing="0" bgcolor="#f9f9f9" style="width:150px;font-size:9pt;">';
	text += '<tr><td style="padding:5px;border:1px solid #cccccc" >'+content+'</td></tr>'
	text += '</tr></table>';
	menu_box.innerHTML=text;
} 

function popup_out1(){ 
menu_box.style.pixelLeft = 0;
menu_box.style.pixelTop = 0;
menu_box.innerHTML='' 
} 

function thumb_move(){ 
message.style.posLeft = event.x - 25 + document.body.scrollLeft
message.style.posTop = event.y - 140 + document.body.scrollTop 
} 

function thumb_over(str,str2){ 
var text;
text ='<table align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="" style="font-size:9pt; border-width:0; border-color:black; border-style:solid; word-break:break-all;" class=shadow>';
text += '<tr><td align=center><img src=/bbs/filebox/member/thumb1/'+str+' width=120 height=90 style="border:1 solid #333333"><br><tr><td bgcolor=#2B9E18 align=center style=font-family:Tahoma;font-size:8pt;color:#ffffff align=center>'+str2+'</td></tr></td></tr></table>';
message.innerHTML=text 
} 

function thumb_over2(str,str2){ 
var text;
text ='<table align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="" style="font-size:9pt; border-width:0; border-color:black; border-style:solid; word-break:break-all;" class=shadow>';
text += '<tr><td align=center><img src='+str+' width=120 height=90 style="border:1 solid #333333"><br><tr><td bgcolor=#2B9E18 align=center style=font-family:Tahoma;font-size:8pt;color:#ffffff align=center>'+str2+'</td></tr></td></tr></table>';
message.innerHTML=text 
} 

function thumb_out(){ 
message.innerHTML='' 
} 

//*** ÅØ½ºÆ®¿À¹ö ***//
function text_move(){ 
message.style.posLeft = event.x - 25 + document.body.scrollLeft
message.style.posTop = event.y - 140 + document.body.scrollTop 
} 
function text2_move(mx,my){ 
message.style.posLeft = event.x +(mx) + document.body.scrollLeft
message.style.posTop = event.y +(my) + document.body.scrollTop 
} 

function text_over(str){ 
var text;
text ='<table align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="" style="font-size:9pt; border:7 solid #E8D3B6; word-break:break-all;" class=shadow_black>';
text += '<tr><td><img src='+str+'></td></tr></table>';
message.innerHTML=text 
} 

function text_out(){ 
message.innerHTML='' 
} 


//** ±ÛÀÚ ¹«ºê **//

function str_move(){ 
message.style.posLeft = event.x - 25 + document.body.scrollLeft
message.style.posTop = event.y - 50 + document.body.scrollTop 
} 

function str_out(){ 
message.innerHTML='' 
} 

function str_over(str){ 
var text;
text ='<table align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="" style="font-size:9pt; border:1 solid #E8D3B6; word-break:break-all;" class=shadow_black>';
text += '<tr><td>'+str+'</td></tr></table>';
message.innerHTML=text 
} 

//ÀÌ¹ÌÁö ¿À¹ö
function img_over(str){ 
	img_box.style.posLeft = event.x + 70 + document.body.scrollLeft;
	img_box.style.posTop = event.y - 30 + document.body.scrollTop;
	var text;
	text ='<table align="center" border="0" cellpadding="0" cellspacing="0">';
	text += '<tr><td align=center><img src='+str+' style="border:1 solid #333333"><tr></table>';
	img_box.innerHTML=text 
} 

function img_out(){
	img_box.innerHTML='' 
} 

//*** °¢Á¾ ÆË¾÷ ÀÎÆ÷ ***//
function info_grade()
{
	window.open("/information/grade.html","grade","width=430,height=500,scrollbars=yes")
}

function opener_link(board_id,no)
{
	parent.opener.location.href="/bbs/view.php?board_id="+board_id+"&no="+no;
}

function opener_link2(board_id,no,game_no)
{
	parent.opener.location.href="/bbs/view.php?board_id="+board_id+"&no="+no+"&game_no="+game_no;
}

function opener_link3(board_id,no,game_no,guild_name)
{
	parent.opener.location.href="/bbs/view.php?board_id="+board_id+"&no="+no+"&game_no="+game_no+"&guild_name="+guild_name;
}

function open_grammer(str)
{
	str = str.replace("\n"," ");
	window.open('http://dic.bizforms.co.kr/data/WebSpell_ISAPI.dll?check&text1='+str,'','width=440,heiht=500,scrollbars=yes');
}

//*** ºÏ¸¶Å© ***//
function my_bookmark()
{
	var width = 650;
	var height = 500;
	var scrollbars = "yes";

	var left = (screen.width-width)/2;
	var top = (screen.height-height)/2;
	window.open("/mypage/bookmark_list.php","bookmark","width="+width+",height="+height+",left="+left+",top="+top+",scrollbars="+scrollbars);
}
function no_bookmark()
{
	alert('ºÏ¸¶Å©¸¦ »ç¿ëÇÏ½Ã·Á¸é ·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä. ');
}

//*** ÇÖÅ° ***//
function my_hotkey()
{
	var width = 650;
	var height = 500;
	var scrollbars = "yes";

	var left = (screen.width-width)/2;
	var top = (screen.height-height)/2;
	window.open("/mypage/hotkey_list.php","hotkey","width="+width+",height="+height+",left="+left+",top="+top+",scrollbars="+scrollbars);
}
function no_hotkey()
{
	alert('´ÜÃàÅ°¸¦ »ç¿ëÇÏ½Ã·Á¸é ·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä. ');
}


function zoom_img(file_name,folder_name)
{	
	window.open("/bbs/zoom.php?file_name="+file_name+"&folder_name="+folder_name,"zoom_img","scrollbars=yes");
}
function zoom_editor(file_name)
{	
	window.open("/bbs/zoom_editor.php?file_name="+file_name,"zoom_editor","scrollbars=yes");
}


//**** ÇÚµð ÆË¾÷(ÀÏ¹ÝÆË¾÷) ****//
function hd_popup(folder_name,file_name,width,height,scrollbars)
{
	var left = (screen.width-width)/2;
	var top = (screen.height-height)/2-30;
	window.open("/"+folder_name+"/"+file_name,folder_name,"width="+width+",height="+height+",left="+left+",top="+top+",scrollbars="+scrollbars);
}


//*** È­Æó´ÜÀ§·Î º¯È¯ ***//
function Comma(number) 
{
	number = '' + number;
	if (number.length > 3) 
	{
		var mod = number.length % 3;
		var output = (mod > 0 ? (number.substring(0,mod)) : '');
		for (i=0 ; i < Math.floor(number.length / 3); i++) 
		{
			if ((mod == 0) && (i == 0))
					output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
			else
					output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
		}
		return (output);
	}
	else return number;
}

//*** µ¿¿µ»ó ÆË¾÷ ***//
function view_game_movie(game_no)
{
	var left = (screen.width-281)/2;
	var top = (screen.height-387)/2;
	window.open("/games/game_movie.php?game_no="+game_no,"","width=281,height=387,left="+left+",top="+top);
}

function open_intro()
{
	if(handy_intro.style.display=="none")
	{
		handy_intro.style.display = "";
	}
	else	handy_intro.style.display="none";
}
function hide_intro()
{
	handy_intro.style.display = "none";
}

function view_download(no)
{
	window.open('/games/down_popup.php?no='+no,'down_popup','width=417,height=300,top=100,left=100,scrollbars=yes')
}

/////////////////ÄíÅ°°ª ¹Þ¾Æ¿À±â(Ã·¿¡ ¿ÀÇÂÇÒ°ÇÁö ¿©ºÎ¿¡ÇÊ¿ä) ////////////////////
function getCookie(name)
{
	var nameOfCookie =name+"=";
	var x = 0;
	while(x<= document.cookie.length)
	{
		var y=(x+nameOfCookie.length);

		if(document.cookie.substring(x,y)==nameOfCookie)
		{
		if((endOfCookie=document.cookie.indexOf(";",y))==-1)
		endOfCookie=document.cookie.length;
		return unescape(document.cookie.substring(y,endOfCookie));
		}
		x=document.cookie.indexOf(" ",x)+1;

		if(x ==0)
		break;
	}
	return "";
}

function setCookie( name, value, expiredays ) 
{ 

  var todayDate = new Date(); 
  if (expiredays=="0")
  {
	todayDate.setDate( todayDate.getDate() + expiredays ); 
  }
  else {
	todayDate.setDate( todayDate.getDate() + Number(expiredays) ); 
  }

  document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
} 

function setCookie2( name, value, expirehours ) 
{ 
  var todayDate = new Date(); 
  todayDate.setHours( todayDate.getHours() + Number(expirehours) ); 
  document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
} 

 function setCookie3( name, value, expiredays ){
	var todayDate = new Date(); 
	todayDate.setMinutes( todayDate.getMinutes() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
}

function closeWin2(layer, day) 
{ 
  eval("setCookie('"+layer+"', 'done' , '"+day+"')");	//1Àº ÇÏ·çµ¿¾È »õÃ¢À» ¿­Áö ¾Ê°Ô ÇÕ´Ï´Ù.
  document.getElementById(layer).style.display='none';
} 

function closeWin(layer, day) 
{ 
  eval("setCookie('"+layer+"', 'done' , '"+day+"')");	//1Àº ÇÏ·çµ¿¾È »õÃ¢À» ¿­Áö ¾Ê°Ô ÇÕ´Ï´Ù.
  self.close();
} 



/*  ¼î¹Ú½º  */
var is_bond = 0;

function show_box(str){
	if(is_bond==0 || str!=temp_str)
	{
		temp_str = str;
		x = event.clientX + document.body.scrollLeft;
		y = event.clientY + 15 + document.body.scrollTop;
		move_box.style.display = '';
		move_box.style.pixelLeft = x;
		move_box.style.pixelTop = y;
		move_box.innerHTML = str;
	}
	
	is_bond = 1;
}

function close_box(str){
	setTimeout("cut_chain()", 2000)
			is_bond = 0;
}

function cut_chain(){
	if(is_bond==0){
		move_box.style.display = 'none';
		move_box.style.pixelLeft = 0;
		move_box.style.pixelTop = 0;
		move_box.innerHTML=''
	}
}



// ÀÚµ¿¿Ï¼º ½ÃÀÛ //
var count = 0;
var id_count = 0;
var tid = null;
var prev_word = null;
var word = null;
var target = 1;
var isit_move = 0;

function ac()
{
	var xhr = null;
	if (window.XMLHttpRequest)
	{
		xhr = new XMLHttpRequest();

		if (xhr.overrideMimeType)
			xhr.overrideMimeType('text/xml');
	}
	else if (window.ActiveXObject)
	{
		try
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e1)
		{
			try
			{
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2) { }
		}
	}

	if (xhr)
	{
		xhr.onreadystatechange = function()
		{
			if (xhr.readyState == 4)
			{
				//var c = parseInt(document.getElementById("count").innerHTML);
				//document.getElementById("count").innerHTML = c + 1;
				clearResult();
				eval(xhr.responseText);
				//document.getElementById("dice").innerHTML=xhr.responseText;
			}
		}
	
		xhr.open("GET", "/inc/z.php?w=" + word + "&t=" + target, true); 
		xhr.send(null);
	}
	
}



function ac_move(){
	var t = document.getElementById("res");
	div = document.getElementById("popup_auto");
	word = document.getElementById("keyword").value;
	total_row=t.rows.length;

	if(word.length>=1){
	Key=window.event.keyCode;
	switch(Key){ 
		/*
		case 34: //page´Ù¿î
			if(count!=0){
				eval("document.all.tr_"+count+".style.background='#FAFAFA';");
			}
			else count=1;
			count += 8;
			isit_count=count%8;
			if(count>total_row) {
				count = total_row-1; break;
			}
			popup.scrollTop = popup.scrollTop+120;
			eval("document.all.tr_"+count+".style.background='#eeeeee';");
			break;
		case 33: //pageup
			if(count!=0){
				eval("document.all.tr_"+count+".style.background='#FAFAFA';");
			}
			else count=1;
			count -= 8;
			isit_count=count%8;
			if(count < 1) {
				count = 1; break;
			}
			popup.scrollTop = popup.scrollTop-120;
			eval("document.all.tr_"+count+".style.background='#eeeeee';");
			break;*/
		case 40:  //¹æÇâÅ° ¾Æ·¡
			count++;
			if(count>total_row) {
				count--; break;
			}
			isit_move++;
			before=count-1;
			a=eval("document.getElementById(\"tr_"+count+"\").childNodes[0].tagName");		
			if(a == "HR"){  // °æ°è¼±ÀÌ¸é ÇÑ¹ø ±×³É ¶Ù¾î³Ñ±â´Â ½Ä
				count++;
				if(isit_move == 9){
					popup_auto.scrollTop = popup.scrollTop+18;
				}
				else isit_move++;
				//if( isit_move == 9){
				//	isit_move--;
				//}
			}
			eval("document.all.tr_"+count+".style.background='#eeeeee';");
			eval("document.all.tr_"+before+".style.background='#FAFAFA';");
			if(isit_move == 9){			// ³¡À» ³Ñ¾î°¡¸é ÀÌµ¿
				popup_auto.scrollTop = popup_auto.scrollTop+18;
			}
			if( isit_move == 9){
				isit_move--;
			}
			break;
		case 38:  // À§
			count--;
			if(count < 1) {
				count++; break;
			}
			isit_move--;			
			prev=count+1;
			a=eval("document.getElementById(\"tr_"+count+"\").childNodes[0].tagName");
			if(a == "HR"){ // °æ°è¼±ÀÌ¸é ÇÑ¹ø ±×³É ¶Ù¾î³Ñ±â´Â ½Ä
				count--;
				if(isit_move == 0){
					popup_auto.scrollTop = popup_auto.scrollTop-18;
				}
				else isit_move--;
			}
			eval("document.all.tr_"+count+".style.background='#eeeeee';");
			eval("document.all.tr_"+prev+".style.background='#FAFAFA';");
			if(isit_move == 0){		//¸ÇÀ§¿¡ ÀÖÀ¸¸é À§·Î ÀÌµ¿
				popup_auto.scrollTop = popup_auto.scrollTop-18;
			}
			if( isit_move == 0){
				isit_move++;
			}
			break;
		case 13:  //¿£ÅÍ
			a=eval("document.all.tr_"+count);
			document.all.keyword.value=a.innerHTML;
			break;
	}
	}
}

function gogo(e)
{
	
	word = document.getElementById("keyword").value;
	inputField = document.getElementById("keyword");
	completeDiv = document.getElementById("popup_auto");
	nameTableBody = document.getElementById("res");

	if (!word.length || word.charAt(0) == ' ')
	{
		clearResult();
		prev_word = "";
		return;
	}
	
	if (prev_word != word)
	{
		prev_word = word;
		ac();
	}
}

function timep()
{
	tid = window.setInterval("gogo()", 10);
}

function clr()
{
	clearResult();	
	window.clearInterval(tid); 
	tid = null;
}

function sel(n)
{
	target = n;
}
function addLine(){
	id_count++;
	var tbody = document.getElementById("res_body");
	var row = document.createElement("TR");
	var col = document.createElement("TD");
	var hr = document.createElement("HR");

	hr.className = "single";

	col.style.width = "200px;";
	col.appendChild(hr);	
	col.id="tr_"+id_count;

	row.appendChild(col);
	tbody.appendChild(row);
}

function addRow(name) {
	setOffsets();
	id_count++;
	var tbody = document.getElementById("res_body");
	var row = document.createElement("TR");
	var col = document.createElement("TD");

	col.onmouseout = function(){ this.style.background="#FAFAFA"; }
	col.onmouseover = function(){ this.style.cursor="hand"; this.style.background="#f0f0f0"; }
	col.onfocus = function(){ this.style.background="#eeeeee"; }
	col.onclick = function(){ document.getElementById("keyword").value=name; location.href('/games/search.php?section=&keyword='+document.getElementById("keyword").value); }
	col.style.width= "200px";
	col.style.paddingLeft = "7px";
	col.appendChild(document.createTextNode(name));	
	col.id="tr_"+id_count;

	row.appendChild(col);
	tbody.appendChild(row);
}


function addRow2(name) {
	setOffsets();
	id_count++;
	var tbody = document.getElementById("res_body");
	var row = document.createElement("TR");
	var col = document.createElement("TD");
	
	col.onmouseout = function(){ this.style.background="#FAFAFA"; }
	col.onmouseover = function(){ this.style.cursor="hand"; this.style.background="f0f0f0"; }
	col.onclick = function(){ document.getElementById("keyword").value=name; location.href('/games/search.php?keyword='+document.getElementById("keyword").value); }
	col.style.width= "200px";
	col.style.paddingRight = "7px";
	col.align= "right";
	col.appendChild(document.createTextNode(name));	
	col.id="tr_"+id_count;

	row.appendChild(col);
	tbody.appendChild(row);
}
function totalRow(total){
	nameTableBody = document.getElementById("res");
	if(total <= 8){
		document.getElementById("popup_auto").style.height=nameTableBody.scrollHeight;
		document.getElementById("popup_auto").style.overflowY="hidden";
	}
	else {
		document.getElementById("popup_auto").style.height="147px";
		document.getElementById("popup_auto").style.overflowY="auto";
	}
}

function setOffsets() {
           // var end = inputField.offsetWidth;
            var left= calculateOffsetLeft(inputField);
            var top = calculateOffsetTop(inputField)+ inputField.offsetHeight;

            completeDiv.style.border = "#cccccc 1px solid";
            completeDiv.style.left = left + "px";
            completeDiv.style.top = top + "px";
			completeDiv.style.width = 200 + "px";
			completeDiv.style.background = "#FAFAFA";
            //nameTable.style.width = 200 + "px";
			//nameTable.style.height = 200 + "px";
}
function calculateOffsetLeft(field) {
	return calculateOffset(field, "offsetLeft");
}
function calculateOffsetTop(field) {
	return calculateOffset(field, "offsetTop");
}
function calculateOffset(field, attr) {
	var offset = 0;
	while(field) {
		offset += field[attr]; 
		field = field.offsetParent;
	}
	return offset;
}


function clearResult()
{
	completeDiv.style.border = "#000000 0px solid";
	completeDiv.style.background = "";
	var t = document.getElementById("res")
 

	var len = t.rows.length;
	if (len >= 1)
	{
		while (len--)
			t.deleteRow(t.childNodes[len]);
	}
	id_count=0;
	count=0;
	isit_move=0;
}

var swit=0;
function mouseOnOut(num)
{
	swit=num;
}
function flashDiv()
{
	if(swit==1){ popup_auto.style.visibility='visible'; }
	else { popup_auto.style.visibility='hidden'; }
}
//ÀÚµ¿¿Ï¼º ³¡


//ÇÃ·¡½¬¿¡¼­  link[1] = "javascript:a1();";
//ÇÃ·¡½¬¿¡¼­  on (release){     getURL("javascript:a1();");     }
//<a href="javascript:a1();">

//´ë¸Þ´º¸µÅ©
function a1(){	location.href="http://www.handy.co.kr/bbs/list.php?board_id=newgame";}
function a2(){	location.href="http://www.handy.co.kr/bbs/list.php?board_id=advertise";}
function a3(){	location.href="http://www.handy.co.kr/download/rank/sub.php?operator=skt";}
function a4(){	location.href="http://www.handy.co.kr/bbs/list.php?board_id=freegame&is_ing=on";}
function a5(){	location.href="http://www.handy.co.kr/trial/sub.php";}
function a6(){	location.href="http://www.handy.co.kr/bbs/list.php?board_id=free";}
function a7(){	location.href="http://www.handy.co.kr/download/rank/sub.php?operator=kt";}
function a8(){	location.href="http://www.handy.co.kr/download/rank/sub.php?operator=lgt";}
function a9(){	location.href="http://www.handy.co.kr/games/game_analysis.php";}


//ÇÃ·¡½¬¹è³Ê
function b1(){	location.href="http://www.handy.co.kr/bbs/list.php?board_id=worldcup";}

//Ajax ÆäÀÌÁö ÀúÀå ½ÃÀÛ

function ajax_save(file, arg1, arg2, arg3, arg4, arg5)
{
	var xhr = null;
	if (window.XMLHttpRequest)
	{
		xhr = new XMLHttpRequest();

		if (xhr.overrideMimeType)
			xhr.overrideMimeType('text/xml');
	}
	else if (window.ActiveXObject)
	{
		try
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e1)
		{
			try
			{
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2) { }
		}
	}

	if (xhr)
	{
		xhr.onreadystatechange = function()
		{
			if (xhr.readyState == 4)
			{

				var res_Text = xhr.responseText;
				var find_script = res_Text.split('<script>');
				if(find_script[1]){
					var script_text = find_script[1].split('</script>');
					if(script_text[0]){
						eval(script_text[0]);
					}
				}
							
			}
		}
		
		xhr.open("POST", file, true); 
		xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');   
		xhr.setRequestHeader('Cache-Control','no-cache, must-revalidate');
		xhr.setRequestHeader('Pragma','no-cache');
		

		//xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xhr.send("arg1="+arg1+"&arg2="+arg2+"&arg3="+arg3+"&arg4="+arg4+"&arg5="+arg5);
	}
	
	
}

//Ajax ÆäÀÌÁö ºÒ·¯¿À±â ½ÃÀÛ

function ajaxpage(id, file, arg1, arg2, arg3, arg4, arg5)
{
	var xhr = null;
	if (window.XMLHttpRequest)
	{
		xhr = new XMLHttpRequest();

		if (xhr.overrideMimeType)
			xhr.overrideMimeType('text/xml');
	}
	else if (window.ActiveXObject)
	{
		try
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e1)
		{
			try
			{
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2) { }
		}
	}

	if (xhr)
	{
		xhr.onreadystatechange = function()
		{
			if (xhr.readyState == 4)
			{
				//var c = parseInt(document.getElementById("count").innerHTML);
				//document.getElementById("count").innerHTML = c + 1;
				clearResult_ajax(id);
				var res_Text = xhr.responseText;
				var find_script = res_Text.split('<script>');
				if(find_script[1]){
					var script_text = find_script[1].split('</script>');
					if(script_text[0]){
						eval(script_text[0]);
					}
				}
				document.getElementById(id).style.display='';
				document.getElementById(id).innerHTML=res_Text;
			}
		}
	
		xhr.open("GET", file+"?id="+ id +"&arg1=" + arg1 + "&arg2=" + arg2 + '&arg3=' + arg3 + "&arg4=" + arg4 +"&arg5=" + arg5, true); 
		xhr.setRequestHeader('Content-Type','text/html;charset=euc-kr');   
		xhr.setRequestHeader('Cache-Control','no-cache, must-revalidate');
		xhr.setRequestHeader('Pragma','no-cache');
		xhr.send(null);
	}
	
	
}

function ajaxload(file, arg1, arg2, arg3, arg4, arg5)
{
	var xhr = null;
	if (window.XMLHttpRequest)
	{
		xhr = new XMLHttpRequest();

		if (xhr.overrideMimeType)
			xhr.overrideMimeType('text/xml');
	}
	else if (window.ActiveXObject)
	{
		try
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e1)
		{
			try
			{
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2) { }
		}
	}

	if (xhr)
	{
		xhr.onreadystatechange = function()
		{
			if (xhr.readyState == 4)
			{
				//var c = parseInt(document.getElementById("count").innerHTML);
				//document.getElementById("count").innerHTML = c + 1;

				var res_Text = xhr.responseText;
				var find_script = res_Text.split('<script>');
				if(find_script[1]){
					var script_text = find_script[1].split('</script>');
					if(script_text[0]){
						eval(script_text[0]);
					}
				}
			}
		}
	
		xhr.open("GET", file+"?&arg1=" + arg1 + "&arg2=" + arg2 + '&arg3=' + arg3 + "&arg4=" + arg4 +"&arg5=" + arg5, true); 
		xhr.setRequestHeader('Content-Type','text/html;charset=euc-kr');   
		xhr.setRequestHeader('Cache-Control','no-cache, must-revalidate');
		xhr.setRequestHeader('Pragma','no-cache');
		xhr.send(null);
	}

}

function clearResult_ajax(arg)
{
	var t = document.getElementById(arg);
	t.innerHTML = "";
}

function create_ajax(arg1, arg2){
	var t = document.getElementById(arg1);
	t.innerHTML = arg2;
}

//Ajax ÆäÀÌÁö ºä ³¡


//MM_swap
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//´Ù¿î·Îµå
function skt_down(normal_no, touch_no, file_name, game_no, game_name){
	window.open("/download/skt/popup.php?normal_no="+normal_no+"&touch_no="+touch_no+"&file_name="+file_name+"&game_no="+game_no+"&game_name="+game_name,"", "width=410, height=415");
}

function skt_down_current(normal_no, touch_no, file_name, game_no, game_name){
	location.href="/download/skt/popup.php?normal_no="+normal_no+"&touch_no="+touch_no+"&file_name="+file_name+"&game_no="+game_no+"&game_name="+game_name;
}


function skt_present(normal_no, touch_no, file_name, game_no, game_name){
	window.open("/download/skt/present.php?normal_no="+normal_no+"&touch_no="+touch_no+"&file_name="+file_name+"&game_no="+game_no+"&game_name="+game_name+"&present=1","", "width=410, height=415");
}

function kt_down(no){
	window.open("/download/kt/record.php?no="+no,"", "width=410, height=415");
}

function kt_present(no){
	window.open("/download/kt/record.php?no="+no+"&present=1","", "width=410, height=415");
}

function lgt_down(no){
	window.open("/download/lgt/record.php?no="+no);
}

function lgt_present(no){
	window.open("/download/lgt/record.php?no="+no+"&present=1");
}


/* Àü±¤ÆÇ */
var Toggle =1;
function DWtop(chk, arg) {  
	Toggle = 0;  

	switch(chk) {
		case 1:
		arg.stop();
		break;

		case 2:
		arg.stop();
		break;
	}
}

function DWstart(chk, arg) {  
	Toggle = 1;  

	switch(chk) {
		case 1:
		arg.start();
		break;

		case 2:
		arg.start();
		break;
	}
}