function closePopUp(obj){
	eval('document.getElementById("'+obj+'").style.visibility="hidden"');
}
function showPopUp(obj,type,e,str_1,str_2,str_3){
//showPopUp(obj,type,e,id)
//obj		div目标id号
//type		层的样式[1:fck编辑器|2:未登陆提示|3:参加活动|4:提示实名认证|5:携带人数参加活动|6:全站登陆框|9:自定义登陆框|||||||]
//e			event
//str_1		活动id
//str_2		_SGLOBAL[refer]
//str_3		uchome_formhash

	if (type == 1) {//只用到前二个参数
		var w = document.body.clientWidth / 2 - 300 + "px";
		var h = document.documentElement.scrollTop + 100 + "px";
	}else if (type == 8) {//[没有event],obj,type,e[width],str_1[height],str_2[topheight],str_3[...]
		var w = document.body.clientWidth / 2 - (e / 2) + "px";
//		var h = document.documentElement.scrollTop + (window.screen.availHeight / 2) - ((str_1 + str_2) / 2) + "px";
		var h = document.documentElement.scrollTop + str_2 + "px";
//		alert("h="+h);
	}else if (type == 9) {//obj,type,e,str_1[width],str_2[height],str_3[DIV内容]
		e=e||event;
		alert("scrolltop="+document.documentElement.scrollTop);
		alert("mousey="+e.clientY);

//if (e.clientY + 10 + eval(str_2) > document.body.clientHeight)
		if (e.clientY - 25 - eval(str_2) < 0) {
			var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		alert("现在的h1="+h);
		}else {
			var h = document.documentElement.scrollTop + e.clientY - eval(str_2) -130 - 24 + "px";
		alert("现在的h2="+h);
		}
		var w = document.documentElement.scrollLeft + (e.clientX - 180) + "px";
		var objs = eval('document.getElementById("'+obj+'")');
//		objs.style.position = "absolute";//absolute|relative
//		objs.style.zindex = "10";//absolute|relative
		objs.style.width = eval(str_1) + "px";
		objs.style.height = eval(str_2) + "px";
		objs.innerHTML = str_3;
	}else if (type == 2) {//只用到前三个参数
		e=e||event;
		var w = document.documentElement.scrollLeft + (e.clientX - 180) + "px";
		var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		var objs = eval('document.getElementById("'+obj+'")');
		objs.style.width = "190px";
		objs.style.height = "70px";
		var inH = "";
		inH += "<TABLE bgColor=\"#FFAE4A\" align=center border=0 cellSpacing=0 cellPadding=0 style=\"width:190px;height:70px;BORDER-BOTTOM: #f8ffff 1px outset;  BORDER-RIGHT: #f8ffff 1px outset;\">";
		inH += "<tr>";
		inH += "	<td valign=middle align=center>";
		inH += "	<TABLE bgColor=\"#fefefe\" align=center width=184 height=64 border=0 cellSpacing=0 cellPadding=0>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 8px;\">";
		inH += "			<font style=\"font-size:15px;\"><b>消息</b></font>";
		inH += "		</td>";
		inH += "		<td align=right style=\"padding:0 8px 0 0;\">";
		inH += "			<a href=\"javascript:void(0)\" onclick=\"javascript:closePopUp('addevent');\" style=\"text-decoration:none;\">关闭</a>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td colspan=2 style=\"padding:0 0px 0 8px;\">";
//		inH += "			<a href=\"/home/cp.php?ac=z_login\" id=\"z_login\" onclick=\"ajaxmenu(event, this.id, 1);closePopUp('addevent');\" style=\"color: black;\">你需要先登陆才能进行本操作</a>";
		inH += "			<a href=\"javascript:void(0)\" id=\"z_login\" onclick=\"javascript:showPopUp('addevent','6',event,'"+str_1+"','"+str_2+"',' "+str_3+" ');window.setTimeout('login_box.username.focus()',500);\" style=\"color: black;\">你需要先登陆才能进行本操作</a>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	</TABLE>";
		inH += "	</td>";
		inH += "</tr>";
		inH += "</table>";
		objs.innerHTML = inH;
	}else if (type == 3) {//所有参数都有使用
		e=e||event;
		var w = document.documentElement.scrollLeft + (e.clientX - 180) + "px";
		var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		var objs = eval('document.getElementById("'+obj+'")');
		objs.style.width = "190px";
		objs.style.height = "110px";
		var inH = "";
		inH += "<form method=\"post\" name=\"eventform\" action=\"/home/cp.php?ac=event&op=join&id="+str_1+"\" onclick=\"closePopUp('addevent');\">";
		inH += "<TABLE bgColor=\"#FFAE4A\" align=center border=0 cellSpacing=0 cellPadding=0 style=\"width:190px;height:110px;BORDER-BOTTOM: #f8ffff 1px outset;  BORDER-RIGHT: #f8ffff 1px outset;\">";
		inH += "<tr>";
		inH += "	<td valign=middle align=center>";
		inH += "	<TABLE bgColor=\"#fefefe\" align=center width=184 height=104 border=0 cellSpacing=0 cellPadding=0>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<font style=\"font-size:14px;\"><b>你确定参加此活动吗？</b></font>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<p class=\"btn_line\"><br />";
		inH += "				<input type=\"hidden\" name=\"refer\" value=\""+str_2+"\">";
		inH += "				<input type=\"submit\" name=\"joinsubmit\" value=\"确定\" class=\"submit\" />";
		inH += "				<input type=\"button\" name=\"btnclose\" value=\"取消\" onclick=\"hideMenu();\" class=\"button\" />";
		inH += "			</p>";
		inH += "			<input type=\"hidden\" name=\"formhash\" value=\""+str_3+"\" />";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	</TABLE>";
		inH += "	</td>";
		inH += "</tr>";
		inH += "</table>";
		inH += "</form>";
		objs.innerHTML = inH;
	}else if (type == 5) {//所有参数都有使用
		e=e||event;
		var w = document.documentElement.scrollLeft + (e.clientX - 210) + "px";
		var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		var objs = eval('document.getElementById("'+obj+'")');
		objs.style.width = "240px";
		objs.style.height = "140px";
		var inH = "";
		inH += "<form method=\"post\" name=\"eventform\" action=\"/home/cp.php?ac=event&op=join&id="+str_1+"\">";
		inH += "<TABLE bgColor=\"#FFAE4A\" align=center border=0 cellSpacing=0 cellPadding=0 style=\"width:240px;height:140px;BORDER-BOTTOM: #f8ffff 1px outset;  BORDER-RIGHT: #f8ffff 1px outset;\">";
		inH += "<tr>";
		inH += "	<td valign=middle align=center>";
		inH += "	<TABLE bgColor=\"#fefefe\" align=center width=234 height=134 border=0 cellSpacing=0 cellPadding=0>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<font style=\"font-size:14px;\"><b>你确定参加此活动吗？</b></font>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<span>携带人数</span>";
		inH += "			<input name=\"fellow\" type=\"text\" size=\"4\" value=\"0\" /><br>";
		inH += "			<span class=\"tiptext\">（如果你带朋友参加，请注明携带人数）</span>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<p class=\"btn_line\"><br />";
		inH += "				<input type=\"hidden\" name=\"refer\" value=\""+str_2+"\">";
		inH += "				<input type=\"submit\" name=\"joinsubmit\" value=\"确定\" class=\"submit\" onclick=\"closePopUp('addevent');\" />";
		inH += "				<input type=\"button\" name=\"btnclose\" value=\"取消\" onclick=\"closePopUp('addevent');\" class=\"button\" />";
		inH += "			</p>";
		inH += "			<input type=\"hidden\" name=\"formhash\" value=\""+str_3+"\" />";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	</TABLE>";
		inH += "	</td>";
		inH += "</tr>";
		inH += "</table>";
		inH += "</form>";
		objs.innerHTML = inH;
	}else if (type == 7) {//所有参数都有使用
		e=e||event;
		var w = document.documentElement.scrollLeft + (e.clientX - 210) + "px";
		var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		var objs = eval('document.getElementById("'+obj+'")');
		objs.style.width = "270px";
		objs.style.height = "165px";
		str_2 = str_2.replace(/\[hzg_br\]/g,'\n');
		var inH = "";
		inH += "<form method=\"post\" name=\"eventform\" action=\"/home/cp.php?ac=event&op=join&id="+str_1+"\">";
		inH += "<TABLE bgColor=\"#FFAE4A\" align=center border=0 cellSpacing=0 cellPadding=0 style=\"width:270px;height:165px;BORDER-BOTTOM: #f8ffff 1px outset;  BORDER-RIGHT: #f8ffff 1px outset;\">";
		inH += "<tr>";
		inH += "	<td valign=middle align=center>";
		inH += "	<TABLE bgColor=\"#fefefe\" align=center width=264 height=159 border=0 cellSpacing=0 cellPadding=0>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:3px 0 0 12px;\">";
		inH += "			<font style=\"font-size:14px;\"><b>参加活动前，请先填写报名信息</b></font>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:3px 0px 0 12px;width: 253px;\">";
		inH += "			<span>报名信息（请按活动发起者给出的模板填写）</span>";
		inH += "			<textarea name=\"template\" rows=\"4\" style=\"width: 242px;\">"+str_2+"</textarea>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<p class=\"btn_line\"><br />";
		inH += "				<input type=\"hidden\" name=\"refer\" value=\".\">";
		inH += "				<input type=\"submit\" name=\"joinsubmit\" value=\"确定\" class=\"submit\" onclick=\"closePopUp('addevent');\" />";
		inH += "				<input type=\"button\" name=\"btnclose\" value=\"取消\" onclick=\"closePopUp('addevent');\" class=\"button\" />";
		inH += "			</p>";
		inH += "			<input type=\"hidden\" name=\"formhash\" value=\""+str_3+"\" />";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	</TABLE>";
		inH += "	</td>";
		inH += "</tr>";
		inH += "</table>";
		inH += "</form>";
		objs.innerHTML = inH;
	}else if (type == 10) {//所有参数都有使用
		e=e||event;
		var w = document.documentElement.scrollLeft + (e.clientX - 210) + "px";
		var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		var objs = eval('document.getElementById("'+obj+'")');
		objs.style.width = "270px";
		objs.style.height = "205px";
		str_2 = str_2.replace(/\[hzg_br\]/g,'\n');
		var inH = "";
		inH += "<form method=\"post\" name=\"eventform\" action=\"/home/cp.php?ac=event&op=join&id="+str_1+"\">";
		inH += "<TABLE bgColor=\"#FFAE4A\" align=center border=0 cellSpacing=0 cellPadding=0 style=\"width:270px;height:205px;BORDER-BOTTOM: #f8ffff 1px outset;  BORDER-RIGHT: #f8ffff 1px outset;\">";
		inH += "<tr>";
		inH += "	<td valign=middle align=center>";
		inH += "	<TABLE bgColor=\"#fefefe\" align=center width=264 height=199 border=0 cellSpacing=0 cellPadding=0>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:3px 0 0 12px;\">";
		inH += "			<font style=\"font-size:14px;\"><b>参加活动前，请先填写报名信息</b></font>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<span>携带人数</span>";
		inH += "			<input name=\"fellow\" type=\"text\" size=\"4\" value=\"0\" /><br>";
		inH += "			<span class=\"tiptext\">（如果你带朋友参加，请注明携带人数）</span>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:3px 0px 0 12px;width: 253px;\">";
		inH += "			<span>报名信息（请按活动发起者给出的模板填写）</span>";
		inH += "			<textarea name=\"template\" rows=\"4\" style=\"width: 242px;\">"+str_2+"</textarea>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 12px;\">";
		inH += "			<p class=\"btn_line\"><br />";
		inH += "				<input type=\"hidden\" name=\"refer\" value=\".\">";
		inH += "				<input type=\"submit\" name=\"joinsubmit\" value=\"确定\" class=\"submit\" onclick=\"closePopUp('addevent');\" />";
		inH += "				<input type=\"button\" name=\"btnclose\" value=\"取消\" onclick=\"closePopUp('addevent');\" class=\"button\" />";
		inH += "			</p>";
		inH += "			<input type=\"hidden\" name=\"formhash\" value=\""+str_3+"\" />";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	</TABLE>";
		inH += "	</td>";
		inH += "</tr>";
		inH += "</table>";
		inH += "</form>";
		objs.innerHTML = inH;
	}else if (type == 6) {//所有参数都有使用
		e=e||event;
		var w = document.body.clientWidth / 2 - 90 + "px";
		var h = document.documentElement.scrollTop + 150 + "px";
//		var w = document.documentElement.scrollLeft + (e.clientX - 180) + "px";
//		var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		var objs = eval('document.getElementById("'+obj+'")');
		objs.style.width = "200px";
		objs.style.height = "150px";
		var inH = "";
		inH += "<form id=\"login_box\" name=login_box action=\"/batch.login.php?action=login\" method=\"post\">";
		inH += "<TABLE bgColor=\"#FFAE4A\" align=center border=0 cellSpacing=0 cellPadding=0 style=\"width:200px;height:150px;BORDER-BOTTOM: #f8ffff 1px outset;  BORDER-RIGHT: #f8ffff 1px outset;\">";
		inH += "<tr>";
		inH += "	<td valign=middle align=center>";
		inH += "	<TABLE bgColor=\"#fefefe\" align=center width=194 height=144 border=0 cellSpacing=0 cellPadding=0>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 8px;\" height=40>";
		inH += "			<font style=\"font-size:15px;\"><b>用户登陆</b></font>";
		inH += "			<input type=\"hidden\" name=\"formhash\" value=\""+str_1+"\" />";
		inH += "			<input id=\"cookietime\" type=\"hidden\" value=\""+str_2+"\" name=\"cookietime\" class=\"input_remember\" />";
		inH += "			<input type=\"hidden\" value=\""+str_3+"\" name=\"loginsubmit\" />";
		inH += "		</td>";
		inH += "		<td align=right style=\"padding:0 8px 0 0;\">";
		inH += "			<a href=\"javascript:void(0)\" onclick=\"javascript:closePopUp('addevent');\" style=\"text-decoration:none;\">关闭</a>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td colspan=2 align=center height=26 style=\"padding:0 0px 0 8px;\">";
		inH += "		用户名：<input type=text tabindex=\"1\" style=\"color:#6B6E63;font-weight: bold;font-size:15px;width:110px;\" name=\"username\" id=\"username\"><br/>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td colspan=2 align=center height=26 style=\"padding:0 0px 0 8px;\">";
		inH += "		密　码：<input type=password tabindex=\"2\" name=\"password\" style=\"color:#6B6E63;font-weight: bold;font-size:15px;width:110px;\">";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td colspan=2 height=52 align=center valign=middle>";
		inH += "		<input class=\"input_search\" type=\"submit\" value=\"登录\" name=\"loginsubmit\"/>　<input class=\"input_search\" type=\"button\" value=\"取消\" onclick=\"javascript:closePopUp('addevent');\"/>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	</TABLE>";
		inH += "	</td>";
		inH += "</tr>";
		inH += "</table>";
		inH += "</form>";
		objs.innerHTML = inH;
	}else if (type == 4) {//只用到前三个参数
		e=e||event;
		var w = document.documentElement.scrollLeft + (e.clientX - 190) + "px";
		var h = document.documentElement.scrollTop + e.clientY + 12 + "px";
		var objs = eval('document.getElementById("'+obj+'")');
		objs.style.width = "200px";
		objs.style.height = "90px";
		var inH = "";
		inH += "<TABLE bgColor=\"#FFAE4A\" align=center border=0 cellSpacing=0 cellPadding=0 style=\"width:200px;height:90px;BORDER-BOTTOM: #f8ffff 1px outset;  BORDER-RIGHT: #f8ffff 1px outset;\">";
		inH += "<tr>";
		inH += "	<td valign=middle align=center>";
		inH += "	<TABLE bgColor=\"#fefefe\" align=center width=194 height=84 border=0 cellSpacing=0 cellPadding=0>";
		inH += "	<tr>";
		inH += "		<td align=left style=\"padding:0 0px 0 8px;\">";
		inH += "			<font style=\"font-size:15px;\"><b>消息</b></font>";
		inH += "		</td>";
		inH += "		<td align=right style=\"padding:0 8px 0 0;\">";
		inH += "			<a href=\"javascript:void(0)\" onclick=\"javascript:closePopUp('addevent');\" style=\"text-decoration:none;\">关闭</a>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	<tr>";
		inH += "		<td colspan=2 style=\"padding:0 0px 0 8px;\" align=left>";
		inH += "			您需要填写真实姓名后才能进行当<br/>前操作，<a href=\"/home/cp.php?ac=profile\" onclick=\"javascript:closePopUp('addevent');\" target=_blank>点这里设置真实姓名</a>。</a>";
		inH += "		</td>";
		inH += "	</tr>";
		inH += "	</TABLE>";
		inH += "	</td>";
		inH += "</tr>";
		inH += "</table>";
		objs.innerHTML = inH;
	}
	eval('document.getElementById("'+obj+'").style.left="'+w+'"');
	eval('document.getElementById("'+obj+'").style.top="'+h+'"');
	eval('document.getElementById("'+obj+'").style.visibility=""');
}