function setCookie( name, value, expiredays ) {
    var todayDate = new Date();
    todayDate.setDate( todayDate.getDate() + expiredays );
    document.cookie = name + "=" + escape( value ) + "; path=/" + "; domain=yahoo.com";
}

function getCookie(keyname)
{
    tmp=document.cookie +";";
    index1=tmp.indexOf(keyname,0);
    if(index1!=-1)
    {
            tmp=tmp.substring(index1,tmp.length);
            index2 = tmp.indexOf("=",0)+1;
            index3 = tmp.indexOf(";",index2);
            return(unescape(tmp.substring(index2,index3)));
    }
    return("");
}
var nickX;
var nickY;
var myid;
function nick_pos() {

	nickX = event.x + document.body.scrollLeft - 5;
	nickY = event.y + document.body.scrollTop  - 5;
	
    if (nickX > document.body.scrollWidth - 85) {

		nickX = nickX-(85 - (document.body.scrollWidth - nickX));
	}
}

function view_nick(id) {
	var obj = document.all.layer_nick;
	obj.style.left = nickX;
	obj.style.top  = nickY;

	if (obj.style.visibility == "hidden") {

		obj.style.visibility = "visible";	
	} else {

		obj.style.visibility = "hidden";	
	}    

    myid = id;
    window.status = '';
}

function view_nick_friend(id) {

	var obj = document.all.layer_nick_friend;
	obj.style.left = nickX;
	obj.style.top  = nickY;

	if (obj.style.visibility == "hidden") {

		obj.style.visibility = "visible";	
	} else {

		obj.style.visibility = "hidden";	
	}    

    myid = id;
    window.status = '';
}

// »ç¿ëÀÚ Á¤º¸
function go_userinfo() {

    close_nick();

    if (myid == '') {
     
        alert("¾ÆÀÌµð°¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù.");        
        return;
    }

   var url = '/USER/profile.html?henid=' + myid;

   var hWin = window.open(url, 'huserinfo', 'left=20, top=20, width=550, height=350, scrollbars=no');
   hWin.focus();

}

// ºí·Î±×
function go_blog() {

    close_nick();

    if (myid == '') {
     
        alert("¾ÆÀÌµð°¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù.");        
        return;
    }

	var url = "/common_module/check_blog.html?henid=" + myid;
	var hWin = window.open(url);
    hWin.focus();
}

// ÂÊÁöº¸³»±â
function go_memo() {

    close_nick();

    if (hlogin_id == '') {

        go_login_msg("·Î±×ÀÎ ÀÌÈÄ¿¡ ÂÊÁöº¸³»±â¸¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù.");
        return;
    }

	var url = "/common_module/memo_send.html?henid=" + myid;
	var hWin = window.open(url, "hmemopop","left=20, top=20, width=400,height=400");
    hWin.focus();
}


function go_creator() {

    top.location.href = 'http://kr.search.n2o.yahoo.com/search/list.html?cid=' + myid;
}


function close_nick() {

	var obj = document.all.layer_nick;
	obj.style.visibility = "hidden";

//	var objfriend = document.all.layer_nick_friend;
//	objfriend.style.visibility = "hidden";
}

function go_login_msg(msg) {

    alert(msg);    
}

document.write ('<div id="layer_nick" style="left:1;top:1;position:absolute;visibility:hidden;z-index:3">');
document.write ('<table width="70" border="0" cellspacing="0" cellpadding="1" bgcolor="B6B6B6" onmouseover="document.all.layer_nick.style.visibility=\'visible\'" onmouseout="document.all.layer_nick.style.visibility=\'hidden\'">');
document.write ('<tr>');
document.write ('<td align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" nowrap style="cursor:hand">');
document.write ('<tr> ');
document.write ('<td height="20" bgcolor="#ffffff" onMouseOver="this.style.background=\'#D8D8D8\';" onMouseOut="this.style.background=\'#FFFFFF\';"> &nbsp;<a href="javascript:go_blog()" onfocus="this.blur()"><font color="#404040">ºí·Î±×º¸±â</font></a></td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td background="http://img.yahoo.co.kr/n2o/main/n2o_bar.gif"><img src="http://img.yahoo.co.kr/n2o/main/n2o_dot.gif" width="1" height="1"></td>');
document.write ('</tr>');
/*
document.write ('<tr>');
document.write ('<td height="20" bgcolor="#ffffff" onMouseOver="this.style.background=\'#D8D8D8\';" onMouseOut="this.style.background=\'#FFFFFF\';"> &nbsp;<a href="javascript:go_userinfo()" onfocus="this.blur()"><font color="#404040">ÇÁ·ÎÇÊº¸±â</font></a></td>');
document.write ('</tr>');
*/
document.write ('<tr>');
document.write ('<td background="http://img.yahoo.co.kr/n2o/main/n2o_bar.gif"><img src="http://img.yahoo.co.kr/n2o/main/n2o_dot.gif" width="1" height="1"></td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td height="20" bgcolor="#ffffff" onMouseOver="this.style.background=\'#D8D8D8\';" onMouseOut="this.style.background=\'#FFFFFF\';"> &nbsp;<a href="javascript:go_memo()" onfocus="this.blur()"><font color="#404040">ÂÊÁöº¸³»±â</font></a></td>');
document.write ('</tr>');
document.write ('<tr>');
document.write ('<td background="http://img.yahoo.co.kr/n2o/main/n2o_bar.gif"><img src="http://img.yahoo.co.kr/n2o/main/n2o_dot.gif" width="1" height="1"></td>');
document.write ('</tr>');
document.write ('</table>');                            
document.write ('</td>');
document.write ('</tr>');
document.write ('</table>');
document.write ('</div>');


