var popupMenu = Class.create();
popupMenu.prototype = {
	initialize:function(options)
	{
		this._className = options._className; 
		this._id = "";
		this._id2 = "";
		this._gb = "";
		this._value1 = "";
		this._value2 = "";
		this._value3 = "";
		this.flag = false;//º»ÀÎÀÇ ÇÊ¸íÀÏ °æ¿ì true
		this.isFlag = (options.isFlag) ? options.isFlag : false;
		Event.observe(document, 'mousedown', this.tiphide.bind(this));
	},
	
	tipParm:function(tipValue)
	{
		this._id = tipValue._id;
		this._gb = tipValue._gb;
		this._value1 = tipValue._value1;
		this._vlaue2 = tipValue._value2;
		this._value3 = tipValue._value3;
		this.isFlag = (tipValue.isFlag) ? tipValue.isFlag : false;
		
		this.tipshow();
	},

	tipshow:function()
	{
		if(!Element.visible(this._id))
		{
			this._id2 = this._id;
			this._html = "<table width=90 border=0 cellpadding=0 cellspacing=1 bgcolor=777777 onMouseOver='"+this._className+".tipover()' onMouseOut='"+this._className+".tipout()'>";
			this._html += "<tr>";
			this._html += "	<td bgcolor=FFFFFF style=padding:3 5 3 5;>";
			this._html += "	  <table width=100% border=0 cellpadding=0 cellspacing=0 class=D_text_s>";

			if(this._gb == "groupconf")
			{
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_grpReName('"+this._value1+"');><font color=666666>±×·ì¸íº¯°æ</font></a></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_grpDelete('"+this._value1+"');><font color=666666>±×·ì»èÁ¦</font></a></td>";
				this._html += "		</tr>";
			}
			
			if(this._gb == "frdconf")
			{
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_TagSend('"+this._value1+"');><font color=666666>ÂÊÁö¾²±â</font></a></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_frdDelete('"+this._value1+"','"+this._vlaue2+"');><font color=666666>Ä£±¸»èÁ¦</font></a></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_grpChange('"+this._value1+"');><font color=666666>±×·ìº¯°æ</font></a></td>";
				this._html += "		</tr>";				
			}
			
			if(this._gb == "bbsconf")
			{
				
				if(this._value1.indexOf("@")>-1){
					
					this._html += "		<tr>";
					this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><font color=666666>ÇÁ·ÎÇÊº¸±â</font></td>";
					this._html += "		</tr>";
					this._html += "		<tr>";
					this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
					this._html += "		</tr>";
					this._html += "		<tr>";
					this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><font color=666666>Ä£±¸Ãß°¡</font></td>";
					this._html += "		</tr>";
					this._html += "		<tr>";
					this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
					this._html += "		</tr>";
					this._html += "		<tr>";
					this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><font color=666666>ÂÊÁö¾²±â</font></td>";
					this._html += "		</tr>";				
					this._html += "		<tr>";
					this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
					this._html += "		</tr>";
					this._html += "		<tr>";
					this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href="+this._value3+" target=_blank><font color=666666>´Ù¸¥±Ûº¸±â</font></a></td>";
					this._html += "		</tr>";
				}else{
					this._html += "		<tr>";
					this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_profileView('"+this._value1+"');><font color=666666>ÇÁ·ÎÇÊº¸±â</font></a></td>";
					this._html += "		</tr>";
					this._html += "		<tr>";
					this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
					this._html += "		</tr>";
					
					if(this.isFlag == 'true')//º»ÀÎÀÏ °æ¿ì
					{
						this._html += "		<tr>";
						this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href='/mypage/comm/frdManage.jsp'><font color=666666>Ä£±¸°ü¸®</font></a></td>";
						this._html += "		</tr>";
						this._html += "		<tr>";
						this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
						this._html += "		</tr>";
						this._html += "		<tr>";
						this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href='/mypage/comm/tagViewR.jsp'><font color=666666>ÂÊÁö°ü¸®</font></a></td>";
						this._html += "		</tr>";				
						this._html += "		<tr>";
						this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
						this._html += "		</tr>";
					}
					else//º»ÀÎÀÌ ¾Æ´Ò°æ¿ì
					{
						this._html += "		<tr>";
						this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_frdAdd('"+this._value1+"');><font color=666666>Ä£±¸Ãß°¡</font></a></td>";
						this._html += "		</tr>";
						this._html += "		<tr>";
						this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
						this._html += "		</tr>";
						this._html += "		<tr>";
						this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_TagSend('"+this._value1+"');><font color=666666>ÂÊÁö¾²±â</font></a></td>";
						this._html += "		</tr>";				
						this._html += "		<tr>";
						this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
						this._html += "		</tr>";
					}
					this._html += "		<tr>";
					this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href="+this._value3+" target=_blank><font color=666666>´Ù¸¥±Ûº¸±â</font></a></td>";
					this._html += "		</tr>";
					if(this._vlaue2 == "Y"){
					this._html += "		<tr>";
					this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
					this._html += "		</tr>";
					this._html += "		<tr>";
					this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:document.location.replace('http://mini.thinkpool.com/"+this._value1+"');><font color=666666>¹Ì´ÏÈ¨¹Ù·Î°¡±â</font></a></td>";
					this._html += "		</tr>";
					}
				}
			}			
			
			if(this._gb == "mypageconf")
			{
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_profileView('"+this._value1+"');><font color=666666>ÇÁ·ÎÇÊº¸±â</font></a></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_frdAdd('"+this._value1+"');><font color=666666>Ä£±¸Ãß°¡</font></a></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:comm_TagSend('"+this._value1+"');><font color=666666>ÂÊÁö¾²±â</font></a></td>";
				this._html += "		</tr>";				
				if(this._vlaue2 == "Y"){
				this._html += "		<tr>";
				this._html += "		  <td height=1 background=http://img.thinkpool.com/mypage/comm/mypage/bbs_dot_line.gif class=D_text_s></td>";
				this._html += "		</tr>";
				this._html += "		<tr>";
				this._html += "		  <td height=15 class=D_text_s style=padding-top:2;><a href=javascript:document.location.replace('http://mini.thinkpool.com/"+this._value1+"');><font color=666666>¹Ì´ÏÈ¨¹Ù·Î°¡±â</font></a></td>";
				this._html += "		</tr>";
				}
			}
			
			this._html += "	  </table>";
			this._html += "	</td>";
			this._html += "  </tr>";
			this._html += "</table>";
			$(this._id2).innerHTML = this._html;
			Element.show(this._id2);
		}
	},

	mouseDown:function()
	{
		this.flag = false;
	},

	tipover:function()
	{
		this.flag = true;
	},

	tipout:function()
	{
		this.flag = false;
	},

	tiphide:function()
	{
		if(this._id2 != "" && this._id2 != null && !this.flag) Element.hide(this._id2);
	}
};