function addLoadEvent(func) {
    var oldonload = window.onload;
    if(typeof window.onload != 'function'){
        window.onload = func;
    }
    else{
        window.onload = function(){
            oldonload();
            func();
        }
    }
}
addLoadEvent(function(){2010-02-06
    //list_rank3("btm_best","OL");
    link_target();
});

if (typeof(COMMON_JS) == 'undefined') { // ÇÑ¹ø¸¸ ½ÇÇà
    var COMMON_JS = true;

    // Àü¿ª º¯¼ö
    var errmsg = "";
    var errfld;

    // ÇÊµå °Ë»ç
    function check_field(fld, msg) 
    {
        if ((fld.value = trim(fld.value)) == "") 			   
            error_field(fld, msg);
        else
            clear_field(fld);
        return;
    }

    // ÇÊµå ¿À·ù Ç¥½Ã
    function error_field(fld, msg) 
    {
        if (msg != "")
            errmsg += msg + "\n";
        if (!errfld) errfld = fld;
        fld.style.background = "#BDDEF7";
    }

    // ÇÊµå¸¦ ±ú²ýÇÏ°Ô
    function clear_field(fld) 
    {
        fld.style.background = "#FFFFFF";
    }

    function trim(s)
    {
        var t = "";
        var from_pos = to_pos = 0;

        for (i=0; i<s.length; i++)
        {
            if (s.charAt(i) == ' ')
                continue;
            else 
            {
                from_pos = i;
                break;
            }
        }

        for (i=s.length; i>=0; i--)
        {
            if (s.charAt(i-1) == ' ')
                continue;
            else 
            {
                to_pos = i;
                break;
            }
        }	

        t = s.substring(from_pos, to_pos);
        //				alert(from_pos + ',' + to_pos + ',' + t+'.');
        return t;
    }

    // ÀÚ¹Ù½ºÅ©¸³Æ®·Î PHPÀÇ number_format Èä³»¸¦ ³¿
    // ¼ýÀÚ¿¡ , ¸¦ Ãâ·Â
    function number_format(data) 
    {
        
        var tmp = '';
        var number = '';
        var cutlen = 3;
        var comma = ',';
        var i;
       
        len = data.length;
        mod = (len % cutlen);
        k = cutlen - mod;
        for (i=0; i<data.length; i++) 
        {
            number = number + data.charAt(i);
            
            if (i < data.length - 1) 
            {
                k++;
                if ((k % cutlen) == 0) 
                {
                    number = number + comma;
                    k = 0;
                }
            }
        }

        return number;
    }

    // »õ Ã¢
    function popup_window(url, winname, opt)
    {
        window.open(url, winname, opt);
    }


    // Æû¸ÞÀÏ Ã¢
    function popup_formmail(url)
    {
        opt = 'scrollbars=yes,width=417,height=385,top=10,left=20';
        popup_window(url, "wformmail", opt);
    }

    // , ¸¦ ¾ø¾Ø´Ù.
    function no_comma(data)
    {
        var tmp = '';
        var comma = ',';
        var i;

        for (i=0; i<data.length; i++)
        {
            if (data.charAt(i) != comma)
                tmp += data.charAt(i);
        }
        return tmp;
    }

    // »èÁ¦ °Ë»ç È®ÀÎ
    function del(href) 
    {
        if(confirm("ÇÑ¹ø »èÁ¦ÇÑ ÀÚ·á´Â º¹±¸ÇÒ ¹æ¹ýÀÌ ¾ø½À´Ï´Ù.\n\nÁ¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) 
            document.location.href = href;
    }

    // ÄíÅ° ÀÔ·Â
    function set_cookie(name, value, expirehours, domain) 
    {
        var today = new Date();
        today.setTime(today.getTime() + (60*60*1000*expirehours));
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
        if (domain) {
            document.cookie += "domain=" + domain + ";";
        }
    }

    // ÄíÅ° ¾òÀ½
    function get_cookie(name) 
    {
        var find_sw = false;
        var start, end;
        var i = 0;

        for (i=0; i<= document.cookie.length; i++)
        {
            start = i;
            end = start + name.length;

            if(document.cookie.substring(start, end) == name) 
            {
                find_sw = true
                break
            }
        }

        if (find_sw == true) 
        {
            start = end + 1;
            end = document.cookie.indexOf(";", start);

            if(end < start)
                end = document.cookie.length;

            return document.cookie.substring(start, end);
        }
        return "";
    }

    // ÄíÅ° Áö¿ò
    function delete_cookie(name) 
    {
        var today = new Date();

        today.setTime(today.getTime() - 1);
        var value = get_cookie(name);
        if(value != "")
            document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString();
    }

    // ÀÌ¹ÌÁöÀÇ Å©±â¿¡ µû¶ó »õÃ¢ÀÇ Å©±â°¡ º¯°æµË´Ï´Ù.
    // zzzz´Ô²²¼­ ¾Ë·ÁÁÖ¼Ì½À´Ï´Ù. 2005/04/12
    function image_window(img)
    {
        var w = img.tmp_width; 
        var h = img.tmp_height; 
        var winl = (screen.width-w)/2; 
        var wint = (screen.height-h)/3; 

        if (w >= screen.width) { 
            winl = 0; 
            h = (parseInt)(w * (h / w)); 
        } 

        if (h >= screen.height) { 
            wint = 0; 
            w = (parseInt)(h * (w / h)); 
        } 

        var js_url = "<script language='JavaScript1.2'> \n"; 
            js_url += "<!-- \n"; 
            js_url += "var ie=document.all; \n"; 
            js_url += "var nn6=document.getElementById&&!document.all; \n"; 
            js_url += "var isdrag=false; \n"; 
            js_url += "var x,y; \n"; 
            js_url += "var dobj; \n"; 
            js_url += "function movemouse(e) \n"; 
            js_url += "{ \n"; 
            js_url += "  if (isdrag) \n"; 
            js_url += "  { \n"; 
            js_url += "    dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n"; 
            js_url += "    dobj.style.top  = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n"; 
            js_url += "    return false; \n"; 
            js_url += "  } \n"; 
            js_url += "} \n"; 
            js_url += "function selectmouse(e) \n"; 
            js_url += "{ \n"; 
            js_url += "  var fobj      = nn6 ? e.target : event.srcElement; \n"; 
            js_url += "  var topelement = nn6 ? 'HTML' : 'BODY'; \n"; 
            js_url += "  while (fobj.tagName != topelement && fobj.className != 'dragme') \n"; 
            js_url += "  { \n"; 
            js_url += "    fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n"; 
            js_url += "  } \n"; 
            js_url += "  if (fobj.className=='dragme') \n"; 
            js_url += "  { \n"; 
            js_url += "    isdrag = true; \n"; 
            js_url += "    dobj = fobj; \n"; 
            js_url += "    tx = parseInt(dobj.style.left+0); \n"; 
            js_url += "    ty = parseInt(dobj.style.top+0); \n"; 
            js_url += "    x = nn6 ? e.clientX : event.clientX; \n"; 
            js_url += "    y = nn6 ? e.clientY : event.clientY; \n"; 
            js_url += "    document.onmousemove=movemouse; \n"; 
            js_url += "    return false; \n"; 
            js_url += "  } \n"; 
            js_url += "} \n"; 
            js_url += "document.onmousedown=selectmouse; \n"; 
            js_url += "document.onmouseup=new Function('isdrag=false'); \n"; 
            js_url += "//--> \n"; 
            js_url += "</"+"script> \n"; 

        var settings;

        if (g4_is_gecko) {
            settings  ='width='+(w+10)+','; 
            settings +='height='+(h+10)+','; 
        } else {
            settings  ='width='+w+','; 
            settings +='height='+h+','; 
        }
        settings +='top='+wint+','; 
        settings +='left='+winl+','; 
        settings +='scrollbars=no,'; 
        settings +='resizable=yes,'; 
        settings +='status=no'; 


        win=window.open("","image_window",settings); 
        win.document.open(); 
        win.document.write ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset="+g4_charset+"'>\n"); 
        var size = "ÀÌ¹ÌÁö »çÀÌÁî : "+w+" x "+h;
        win.document.write ("<title>"+size+"</title> \n"); 
        if(w >= screen.width || h >= screen.height) { 
            win.document.write (js_url); 
            var click = "ondblclick='window.close();' style='cursor:move' title=' "+size+" \n\n ÀÌ¹ÌÁö »çÀÌÁî°¡ È­¸éº¸´Ù Å®´Ï´Ù. \n ¿ÞÂÊ ¹öÆ°À» Å¬¸¯ÇÑ ÈÄ ¸¶¿ì½º¸¦ ¿òÁ÷¿©¼­ º¸¼¼¿ä. \n\n ´õºí Å¬¸¯ÇÏ¸é ´ÝÇô¿ä. '"; 
        } 
        else 
            var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n Å¬¸¯ÇÏ¸é ´ÝÇô¿ä. '"; 
        win.document.write ("<style>.dragme{position:relative;}</style> \n"); 
        win.document.write ("</head> \n\n"); 
        win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#dddddd style='cursor:arrow;'> \n"); 
        win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+img.src+"' width='"+w+"' height='"+h+"' border=0 class='dragme' "+click+"></td></tr></table>");
        win.document.write ("</body></html>"); 
        win.document.close(); 

        if(parseInt(navigator.appVersion) >= 4){win.window.focus();} 
    }

    // a ÅÂ±×¿¡¼­ onclick ÀÌº¥Æ®¸¦ »ç¿ëÇÏÁö ¾Ê±â À§ÇØ
    function win_open(url, name, option)
    {
        var popup = window.open(url, name, option);
        popup.focus();
    }

    // ¿ìÆí¹øÈ£ Ã¢
    function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2)
    {
        url = g4_path + "/" + g4_bbs + "/zip.php?frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_zip2="+frm_zip2+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2;
        win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1");
    }

    // ÂÊÁö Ã¢
    function win_memo(url)
    {
        if (!url)
            url = g4_path + "/" + g4_bbs + "/memo.php";
        win_open(url, "winMemo", "left=0,top=0,width=820,height=500,scrollbars=1");
    }

    // Æ÷ÀÎÆ® Ã¢
    function win_point(url)
    {
        win_open(g4_path + "/" + g4_bbs + "/point.php", "winPoint", "left=20, top=20, width=616, height=635, scrollbars=1");
    }

    // ½ºÅ©·¦ Ã¢
    function win_scrap(url)
    {
        if (!url)
            url = g4_path + "/" + g4_bbs + "/scrap.php";
        win_open(url, "scrap", "left=20, top=20, width=616, height=500, scrollbars=1");
    }

    // ÆÐ½º¿öµå ºÐ½Ç Ã¢
    function win_password_forget()
    {
        win_open(g4_path + "/" + g4_bbs + "/password_forget.php", 'winPasswordForget', 'left=50, top=50, width=616, height=500, scrollbars=1');
    }

    // ÄÚ¸àÆ® Ã¢
    function win_comment(url)
    {
        open_popup(url, "_blank", 800, 600, 0, 0, 1);
    }

    // Æû¸ÞÀÏ Ã¢
    function win_formmail(mb_id, name, email)
    {
		if (g4_charset.toLowerCase() == 'euc-kr')
	        win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+name+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=500, scrollbars=0");
		else
	        win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+encodeURIComponent(name)+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0");
    }

    // ´Þ·Â Ã¢
    function win_calendar(fld, cur_date, delimiter, opt)
    {
        if (!opt)
            opt = "left=50, top=50, width=240, height=230, scrollbars=0,status=0,resizable=0";
        win_open(g4_path+"/" + g4_bbs + "/calendar.php?fld="+fld+"&cur_date="+cur_date+"&delimiter="+delimiter, "winCalendar", opt);
    }

    // ¼³¹®Á¶»ç Ã¢
    function win_poll(url)
    {
        if (!url)
            url = "";
        win_open(url, "winPoll", "left=50, top=50, width=616, height=500, scrollbars=1");
    }

    // ÀÚ±â¼Ò°³ Ã¢
    function win_profile(mb_id)
    {
        win_open(g4_path+"/" + g4_bbs + "/profile.php?mb_id="+mb_id, 'winProfile', 'left=50,top=50,width=620,height=510,scrollbars=1');
    }

    var last_id = null;
    function menu(id)
    {
        if (id != last_id)
        {
            if (last_id != null)
                document.getElementById(last_id).style.display = "none";
            document.getElementById(id).style.display = "block";
            last_id = id;
        }
        else
        {
            document.getElementById(id).style.display = "none";
            last_id = null;
        }
    }

    function textarea_decrease(id, row)
    {
        if (document.getElementById(id).rows - row > 0)
            document.getElementById(id).rows -= row;
    }

    function textarea_original(id, row)
    {
        document.getElementById(id).rows = row;
    }

    function textarea_increase(id, row)
    {
        document.getElementById(id).rows += row;
    }

    // ±Û¼ýÀÚ °Ë»ç
    function check_byte(content, target)
    {
        var i = 0;
        var cnt = 0;
        var ch = '';
        var cont = document.getElementById(content).value;

        for (i=0; i<cont.length; i++) {
            ch = cont.charAt(i);
            if (escape(ch).length > 4) {
                cnt += 2;
            } else {
                cnt += 1;
            }
        }
        // ¼ýÀÚ¸¦ Ãâ·Â
        document.getElementById(target).innerHTML = cnt;

        return cnt;
    }

    // ºê¶ó¿ìÀú¿¡¼­ ¿ÀºêÁ§Æ®ÀÇ ¿ÞÂÊ ÁÂÇ¥
    function get_left_pos(obj)
    {
        var parentObj = null;
        var clientObj = obj;
        //var left = obj.offsetLeft + document.body.clientLeft;
        var left = obj.offsetLeft;

        while((parentObj=clientObj.offsetParent) != null)
        {
            left = left + parentObj.offsetLeft;
            clientObj = parentObj;
        }

        return left;
    }

    // ºê¶ó¿ìÀú¿¡¼­ ¿ÀºêÁ§Æ®ÀÇ »ó´Ü ÁÂÇ¥
    function get_top_pos(obj)
    {
        var parentObj = null;
        var clientObj = obj;
        //var top = obj.offsetTop + document.body.clientTop;
        var top = obj.offsetTop;

        while((parentObj=clientObj.offsetParent) != null)
        {
            top = top + parentObj.offsetTop;
            clientObj = parentObj;
        }

        return top;
    }

    function flash_movie(src, ids, width, height, wmode)
    {
        var wh = "";
        if (parseInt(width) && parseInt(height)) 
            wh = " width='"+width+"' height='"+height+"' ";
        return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>";
    }

    function obj_movie(src, ids, width, height, autostart)
    {
        var wh = "";
        if (parseInt(width) && parseInt(height)) 
            wh = " width='"+width+"' height='"+height+"' ";
        if (!autostart) autostart = false;
        return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>";
    }

    function doc_write(cont)
    {
        document.write(cont);
    }
}



function upload_img() {
	document.outside_img.submit();
}
function link_target() {
    if (document.getElementById('writeContents')) {
        var target = '_blank';
        var link = document.getElementById('writeContents').getElementsByTagName("a");
        for(i=0;i<link.length;i++) {
            link[i].target = target;
        }
    }
}
function insertFlash(swf, width, height, bgcolor, id, flashvars)
{
	var strFlashTag = new String();

	if (navigator.appName.indexOf("Microsoft") != -1)
	{
		strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		strFlashTag += 'id="' + id + '" width="' + width + '" height="' + height + '">';
		strFlashTag += '<param name="movie" value="' + swf + '"/>';

		if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
		strFlashTag += '<param name="quality" value="best"/>';
		strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
		strFlashTag += '<param name="menu" value="false"/>';
		strFlashTag += '<param name="salign" value="LT"/>';
		strFlashTag += '<param name="scale" value="noscale"/>';
		strFlashTag += '<param name="wmode" value="transparent"/>';
		strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
		strFlashTag += '</object>';
	}
	else
	{
		strFlashTag += '<embed src="' + swf + '" ';
		strFlashTag += 'quality="best" ';
		strFlashTag += 'bgcolor="' + bgcolor + '" ';
		strFlashTag += 'width="' + width + '" ';
		strFlashTag += 'height="' + height + '" ';
		strFlashTag += 'menu="false" ';
		strFlashTag += 'scale="noscale" ';
		strFlashTag += 'id="' + id + '" ';
		strFlashTag += 'salign="LT" ';
		strFlashTag += 'wmode="transparent" ';
		strFlashTag += 'allowScriptAccess="sameDomain" ';
		if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
		strFlashTag += 'type="application/x-shockwave-flash" ';
		strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
		strFlashTag += '</embed>';
	}

	document.write(strFlashTag);
}
// insertAfter
function insertAfter(newElement, targetElement){
    var parent = targetElement.parentNode;
    if(parent.lastChild == targetElement){
        parent.appendChild(newElement);
    }else{
        parent.insertBefore(newElement, targetElement.nextSibling);
    }
}
// addClass
function addClass(element, value){
    if(!element.className){
        element.className = value;
    }else{
        newClassName = element.className;
        newClassName+= " ";
        newClassName+= value;
        element.className = newClassName;
    }
}
// png alpha channels : PNG ÀÌ¹ÌÁö Ç¥ÇöÀ» À§ÇÑ ÇÊÅÍ¸µ Àû¿ë (FOR IE~6 ONLY)
function setPng24(obj) {
    obj.width=obj.height=1;
    obj.url=obj.src;
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');";
    obj.src='';
    return '';
}
function first(elem){
    elem = elem.firstChild;
    return (elem && elem.nodeType != 1) ? next(elem) : elem;
}
function next(elem){
    do{
        elem = elem.nextSibling;
    }while (elem && elem.nodeType != 1);
        return elem;
}
function prev(elem){
    do{
        elem = elem.previousSibling;
    }while (elem && elem.nodeType != 1);
        return elem;
}
function open_popup(openUrl, popId, popWidth, popHeight, popLeft, popTop, scroll){
    if (!openUrl || !popId || !popWidth || !popHeight) return false;
    var popOption = 'width=' + popWidth + ", height=" + popHeight + "titlebars=no, menubar=no, toolbar=no, location=no, status=yes, left=" + popLeft + ", top=" + popTop + ", scrollbars=" + scroll + ", resizable=no";
    return window.open(openUrl, popId, popOption);
}
// ¸®½ºÆ® °ü·Ã JS 2009-11-02
function list_rank(obj)
{
    if(!obj) return false;
    if(!document.getElementById) return false;
    if(!document.getElementsByTagName) return false;

    var list_parent = document.getElementById(obj);
    var list = new Array();
    list_cnt = 0;

    for(var a=0; a<list_parent.childNodes.length; a++)
    {
        var list_p = list_parent.childNodes;
        if(list_p[a].nodeType != 1)
            continue;
        else{
            if(list_p[a].nodeName.indexOf("OL") > -1 || list_p[a].nodeName.indexOf("UL") > -1){
                list[list_cnt] = list_p[a]
                list_cnt++;
            }
        }
    }
    var elemHead = new Array();
    pos_left = 0;
    for(var b=0; b<list.length; b++)
    {
        list[b].style.display = "none";
        elemHead[b] = prev(list[b]);
        elemHead[b].style.left = pos_left + "px";
        pos_left += elemHead[b].clientWidth;
        elemHead[b].onclick = function(){
            for(var c=0; c<elemHead.length; c++)
            {
                elemHead[c].className = null;
                next(elemHead[c]).style.display = "none";
            }
            if(!this.getAttribute("class") || !this.className){
                this.className = "on";
            }else{
                this.className += " on";
            }
            next(this).style.display = "block";
        }
        
        var list_item = list[b].getElementsByTagName("li");
        for(var i=0; i<list_item.length; i++)
        {
            list_item[i].j = i;
            list_item[i].onmouseover = function(){
                this.className = "n" + (this.j+1) + "_on";
            }
            list_item[i].onmouseout = function(){
                this.className = "n" + (this.j+1);
            }
        }
    }
     if(elemHead[0].getAttribute("class") || elemHead[0].className){
        elemHead[0].className = "on";
    }else{
        elemHead[0].className += " on";
    }
    list[0].style.display = "block";
}

function list_rank3(obj, listType)
{
	if(!obj && !listType) return false;
	if(!document.getElementById) return false;
	if(!document.getElementsByTagName) return false;

	var list_parent = document.getElementById(obj);
	if(!list_parent) return false;
	var list = list_parent.getElementsByTagName(listType);
	var descDiv;
	for(var i=0; i<list.length; i++)
	{
		var list_item = list[i].getElementsByTagName("LI");
		for(var j=0; j<list_item.length; j++)
		{
			list_item[j].n = j;
			list_item[j].onmouseover = function(){
				this.className = "n" + (this.n+1) + "_on";
				var childs = this.childNodes;
				for(var k=0; k<childs.length; k++)
				{
					if(childs[k].nodeType != 1){
						continue;
					}else{
						descDiv = childs[k];
					}
				}
				//alert(descDiv.nodeName);
				descDiv.style.display = "block";
			}
			list_item[j].onmouseout = function(){
				this.className = "n" + (this.n+1);
				var childs = this.childNodes;
				for(var k=0; k<childs.length; k++)
				{
					if(childs[k].nodeType != 1){
						continue;
					}else{
						descDiv = childs[k];
					}
				}
				descDiv.style.display = "none";
			}
		}
	}
}
function stripeTable(elem){
    if(!document.getElementById) return false;
    if(!document.getElementsByTagName) return false;
    if(!document.getElementById(elem)) return false;
    var tables = document.getElementById(elem);
    var odd = true;
    var rows = tables.getElementsByTagName("tr");
    for(var i=0; i<rows.length; i++)
    {
        if(odd == true){
            addClass(rows[i], "odd");
            odd = false;
        }else{
            odd = true;
        }
    }
}
function highlightRows(elem){
    if(!document.getElementById) return false;
    if(!document.getElementsByTagName) return false;
    if(!document.getElementById(elem)) return false;
    var tables = document.getElementById(elem);
    var rows = tables.getElementsByTagName("tr");
    for(var i=0; i<rows.length; i++)
    {
        rows[i].oldClassName = rows[i].className;
        rows[i].onmouseover = function(){
            addClass(this, "highlight");
        }
        rows[i].onmouseout = function(){
            this.className = this.oldClassName;
        }
    }
}
function setCookie( name, value, expiredays ) {
    var todayDate = new Date();
    todayDate.setDate( todayDate.getDate() + expiredays );
    document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function notice(){
    var noticebox = document.getElementById("notice2010a");
    var close_1day = document.getElementById("close_1day");
    var close = document.getElementById("close");

    cookiedata = document.cookie;
    if(cookiedata.indexOf("notice=done") == -1) {
        noticebox.style.display = "block";
    }else {
        noticebox.style.display = "none";
        return;
    }
    close.onclick = function() {
        noticebox.style.display = "none";
    }
    close_1day.onclick = function() {
        setCookie("notice", "done" , 1);
        noticebox.style.display = "none";
    }
}
function login_box(){
    var login_box = document.getElementById("login_box");
    if(status == 1) {
        login_box.style.display = "none";
        status = 0;
        return;
    }
    login_box.style.display = "block";
    elems = login_box.getElementsByTagName("*");
    for(var i=0; i<elems.length; i++)
    {
        if(elems[i].getAttribute("name") != "mb_id") {
            continue;
        }
        elems[i].focus();
    }
    status = 1;
}
function modify_box(){
    var login_box = document.getElementById("login_box");
    if(status == 1) {
        login_box.style.display = "none";
        status = 0;
        return;
    }
    login_box.style.display = "block";
    elems = login_box.getElementsByTagName("*");
    for(var i=0; i<elems.length; i++)
    {
        if(elems[i].getAttribute("name") != "mb_password") {
            continue;
        }
        elems[i].focus();
    }
    status = 1;
}
// ¸®Æ÷Æ®2.0 ·Î±×ºÐ¼®ÄÚµå ½ÃÀÛ
var JsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://");
var uname = escape('º£ÀÌ½ºº¼ÆÄÅ©');
document.write(unescape("%3Cscript id='log_script' src='" + JsHost + "jujak99.weblog.cafe24.com/weblog.js?uid=jujak99_1&uname="+uname+"' type='text/javascript'%3E%3C/script%3E"));
// ¸®Æ÷Æ®2.0 ·Î±×ºÐ¼®ÄÚµå ¿Ï·á

// Google Analytics Start
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
	var pageTracker = _gat._getTracker("UA-7202918-1");
	pageTracker._trackPageview();
} catch(err) {}
// Google Analytics end