function $(id) {if (document.getElementById) {return document.getElementById(id);} else if (document.all) {return document.all[id];} else if (document.layers) {return document.layers[id];} else {return null;}}

/* public ajax request function */
var Ajax={xmlhttp:function(){try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP');}catch(e){return new XMLHttpRequest();}}}};
Ajax.Request=function(){if (arguments.length<2) return;var _p={asynchronous:true,method:"GET",parameters:""};for (var key in arguments[1]){_p[key]=arguments[1][key];}var _x=Ajax.xmlhttp();var _url=arguments[0];if(_p["parameters"].length>0) _p["parameters"] += '&_=';if(_p["method"].toUpperCase()=="GET")_url += (_url.match(/\?/) ? '&' : '?') + _p["parameters"];_x.open(_p["method"],_url,_p["asynchronous"]);_x.onreadystatechange = function(){if (_x.readyState==4){if(_x.status==200){_p["onComplete"]?_p["onComplete"](_x):"";}else{_p["onError"]?_p["onError"](_x):"";}}}
_x.setRequestHeader("If-Modified-Since","0");
if(_p["method"].toUpperCase()=="POST")_x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_x.send(_p["method"].toUpperCase()=="POST" ? _p["parameters"] : null);};//
/* public ajax request function */

/* lightbox function */
var isIE = (document.all) ? true : false;var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);var Class = {create: function() {return function() { this.initialize.apply(this, arguments); }}};var Extend = function(destination, source) {for (var property in source) {destination[property] = source[property];}};var Bind = function(object, fun) {return function() {return fun.apply(object, arguments);}};var Each = function(list, fun){for (var i = 0, len = list.length; i < len; i++) { fun(list[i], i); }};var Contains = function(a, b){return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16);};
var OverLay = Class.create();OverLay.prototype = {initialize: function(options) {this.SetOptions(options);this.Lay = $(this.options.Lay) || document.body.insertBefore(document.createElement("div"), document.body.childNodes[0]);this.Color = this.options.Color;this.Opacity = parseInt(this.options.Opacity);this.zIndex = parseInt(this.options.zIndex);with(this.Lay.style){ display = "none"; zIndex = this.zIndex; left = top = 0; position = "fixed"; width = height = "100%"; }if(isIE6){this.Lay.style.position = "absolute";this._resize = Bind(this, function(){this.Lay.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px";this.Lay.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px";});this.Lay.innerHTML = '<iframe style="position:absolute;top:0;left:0;width:100%;height:100%;filter:alpha(opacity=0);"></iframe>'}},SetOptions: function(options) {this.options = {Lay: null,Color: "#CCC",Opacity: 0,zIndex: 1000};Extend(this.options, options || {});},Show: function() {if(isIE6){ this._resize(); window.attachEvent("onresize", this._resize); }with(this.Lay.style){isIE ? filter = "alpha(opacity:" + this.Opacity + ")" : opacity = this.Opacity / 100;backgroundColor = this.Color; display = "block";}},Close: function() {this.Lay.style.display = "none";if(isIE6){ window.detachEvent("onresize", this._resize); }}};
var LightBox = Class.create();LightBox.prototype = {initialize: function(box, options) {this.Box = $(box);this.OverLay = new OverLay(options);this.SetOptions(options);this.Fixed = !!this.options.Fixed;this.Over = !!this.options.Over;this.Center = !!this.options.Center;this.onShow = this.options.onShow;this.Box.style.zIndex = this.OverLay.zIndex + 1;this.Box.style.display = "none";if(isIE6){this._top = this._left = 0; this._select = [];this._fixed = Bind(this, function(){ this.Center ? this.SetCenter() : this.SetFixed(); });}},SetOptions: function(options) {this.options = {Over: true,Fixed: true,Center:	true,onShow:	function(){}};Extend(this.options, options || {});},SetFixed: function(){this.Box.style.top = document.documentElement.scrollTop - this._top + this.Box.offsetTop + "px";this.Box.style.left = document.documentElement.scrollLeft - this._left + this.Box.offsetLeft + "px";this._top = document.documentElement.scrollTop; this._left = document.documentElement.scrollLeft;},SetCenter: function(){this.Box.style.marginTop = document.documentElement.scrollTop - this.Box.offsetHeight / 2 + "px";this.Box.style.marginLeft = document.documentElement.scrollLeft - this.Box.offsetWidth / 2 + "px";},Show: function(options) {this.Box.style.position = this.Fixed && !isIE6 ? "fixed" : "absolute";this.Over && this.OverLay.Show();this.Box.style.display = "block";if(this.Center){this.Box.style.top = this.Box.style.left = "50%";if(this.Fixed){this.Box.style.marginTop = - this.Box.offsetHeight / 2 + "px";this.Box.style.marginLeft = - this.Box.offsetWidth / 2 + "px";}else{this.SetCenter();}}if(isIE6){if(!this.Over){this._select.length = 0;Each(document.getElementsByTagName("select"), Bind(this, function(o){if(!Contains(this.Box, o)){ o.style.visibility = "hidden"; this._select.push(o); }}))}this.Center ? this.SetCenter() : this.Fixed && this.SetFixed();this.Fixed && window.attachEvent("onscroll", this._fixed);}this.onShow();},Close: function() {this.Box.style.display = "none";this.OverLay.Close();if(isIE6){window.detachEvent("onscroll", this._fixed);Each(this._select, function(o){ o.style.visibility = "visible"; });}}};
document.write("<form id=\"iForm\" method=\"post\" action=\"\" onsubmit=\"return false;\"><dl id=\"iWindows\" class=\"lightbox\"><dt id=\"iTitle\">网页对话框</dt><dd id=\"iContent\">LightBox v1.1.3</dd><dd class=\"lightbot\"><span id=\"iButton\"></span><input name=\"ibc\" id=\"ibc\" type=\"button\" value=\"关闭窗口\" onclick=\"javascript:box.Close();\" /></dd></dl></form>");
var box = new LightBox("iWindows");
/* lightbox function */

var pics = '';var links = '';var texts = '';function ati(url, img, title){if(pics != ''){pics = "|" + pics;links = "|" + links;texts = "|" + texts;}pics = escape(img) + pics;links = escape(url) + links;texts = title + texts;}function slidshow(l,a,b,c){var focus_width=a;var focus_height=b;var text_height=c;var swf_height = focus_height+text_height;document.write('<embed src="'+l+'images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"/>');}

/* public user login function */
function submit_log(ref){var unm=$("xname").value;var upw=$("xpwd").value;var xrd=$("rndcode").value;if (unm==""){$("urt").innerHTML="×";$("urt").className="red";$("urt").title="请输入您注册时的用户名";alert("请输入您注册时的用户名");$("xname").focus();}else{$("urt").innerHTML="√";$("urt").className="green";$("urt").title="";if (upw==""){$("pwt").innerHTML="×";$("pwt").className="red";$("pwt").title="请输入密码";alert("请输入密码");$("xpwd").focus();}else{$("pwt").innerHTML="√";$("pwt").className="green";$("pwt").title="";$("loginfo").innerHTML="正在验证...";$("_log").disabled=true;var myAjax = new Ajax.Request("./ajx.asp",{method:"get",parameters:"m=5&a="+escape(unm)+"&b="+escape(upw)+"&c="+escape(xrd),onComplete:function(xmlhttp){var rep=xmlhttp.responseText;switch (rep){case "error":$("loginfo").className="red";$("loginfo").innerHTML="验证不匹配！";alert("该用户名不存在或密码错误！");$("_log").disabled=false;break;case "errcode":$("loginfo").className="green";$("loginfo").innerHTML="帐户已登录";alert("验证码不匹配！");reloadcode("rdimg");$("_log").disabled=false;break;case "ok":$("urt").className="reg_b";$("_log").disabled=true;$("loginfo").innerHTML="验证通过！转接中...";if (ref==""||ref=="log"){ref="u_article.asp";}setTimeout("urljump('"+ref+"')",1000);break;}}});}}return false;}
/* public user login function */

function $logout(){var myAjax = new Ajax.Request("../UCenter/ajax.asp",{method:"get",parameters:"m=6",onComplete:function(xmlhttp){var rep=xmlhttp.responseText;parent.location.href="./";}});}

/* public user register function */
function stip(obj,cls,info){var h="highlight";if (cls!="red"){h="";}$("tb"+obj).className=h;$("at"+obj).className=cls;$("at"+obj).innerHTML=info;}
function stipx(obj,cls,info){$("at"+obj).className=cls;$("at"+obj).innerHTML=info;}

function $cuser(unm){if (unm.length<=5){stipx(1,"red","(请输入您要注册的帐户名，至少输入6位)");}else{$("at1").innerHTML="(验证中...)";var myAjax = new Ajax.Request("ajx.asp",{method:"get",parameters:"m=4&a="+unm,onComplete:function(xmlhttp){var rep=xmlhttp.responseText;if (rep=="error"){stipx(1,"red","(您输入的帐户已存在，请换一个再试)");$("@__@").value="1";}else{stipx(1,"green","(恭喜您！该帐户尚未被注册)");$("@__@").value="0";}}});}}

function CharMode(iN){if (iN>=48 && iN <=57){return 1;}if (iN>=65 && iN <=90){return 2;}if (iN>=97 && iN <=122){return 4;}else{return 8;}}function bitTotal(num){modes=0;for (i=0;i<4;i++){if (num & 1){modes++;}num>>>=1;}return modes;}function cStrong(sPW){if (sPW.length<=4){return 0;}Modes=0;for (i=0;i<sPW.length;i++){Modes|=CharMode(sPW.charCodeAt(i));}return bitTotal(Modes);}
function pwSth(pwd){if (pwd.length<=5){stipx(2,"red","(请输入您的密码且长度不得少于6位)");}else{$("at2").className="gray";var lv=cStrong(pwd);switch(lv) {case 0:$("at2").innerHTML="(<font color=\"red\">密码强度：弱</font>)";break;case 1:$("at2").innerHTML="(<font color=\"red\">密码强度：弱</font>)";break;case 2:$("at2").innerHTML="(<font color=\"green\">密码强度：中</font>)";break;default:$("at2").innerHTML="(<font color=\"blue\">密码强度：强</font>)";}}return;}
function reckpwd(pwd){if (pwd==""){stipx(3,"red","(请再次输入您的密码)");}else{if ($("ATField2").value!=pwd){stipx(3,"red","(您两次输入的密码不一致)");}else{stipx(3,"","")}}}

function cmail(m){var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;var flag=pattern.test(m);if (flag){$("at4").innerHTML="";return true;}else{stipx(4,"red","(输入邮箱格式不正确！)");return false;}}

function sub_reg(){
	if ($("ATField1").value.length<=5){
		stip(1,"red","(请输入您要注册的帐户名，至少输入6位)");
	}else{
		if ($("@__@").value=="1"){
			stip(1,"red","(您输入的帐户已存在，请换一个再试)");
		}else{
			stip(1,"green","(恭喜您！该帐户尚未被注册)");
			if ($("ATField2").value.length<=5){
				stip(2,"red","(请输入您的密码且长度不得少于6位)");
			}else{
				stip(2,"gray","(6~15位字符)");
				if ($("ATField3").value!=$("ATField2").value){
					stip(3,"red","(您两次输入的密码不一致)");
				}else{
					stip(3,"gray","");
					if (cmail($("ATField4").value)==false){
						stip(4,"red","(输入邮箱格式不正确！)");
					}else{
						stip(4,"green","正确");
						if ($("ATField5").value==""){
							stip(5,"red","(请输入您的姓名)");
						}else{
							stip(5,"gray","(为方便联系，请填写您的真实姓名)");
							if ($("ATField11").value==""){
								stip(6,"red","<br />(请正确选择您所在的学校)");
							}else{
								stip(6,"gray","");
								if ($("ATField12").value==""){
									stip(7,"red","(请选择您的参赛组别)");
								}else{
									stip(7,"gray","(完中或9年一贯制学校请选择您当前就读的类型)");
									if ($("ATField13").value==""){
										stip(8,"red","(请填写您当前所在班级)");
									}else{
										stip(8,"gray","(格式形如：初一(3)班 或 三(4)班)");
										$("reg_tip").style.display="";
										$("regsub").disabled=true;
										var submix=$("yzm").value+"$$"+$("ATField0").value+"$$"+$("ATField1").value+"$$"+$("ATField2").value+"$$"+$("ATField4").value+"$$"+$("ATField5").value+"$$"+$("ATField6").value+"$$"+$("ATField7").value+"$$"+$("ATField8").value+"$$"+$("ATField9").value+"$$"+$("ATField10").value+"$$"+$("ATField11").value+"$$"+$("ATField12").value+"$$"+$("ATField13").value+"$$$$"+$("ATField15").value+"$$"+$("ATField16").value+"$$"+$("ATField17").value+"$$"+$("ATField18").value;
										var myAjax = new Ajax.Request(
										"ajx.asp",
										{
											method:"get",
											parameters:"m=1&a="+escape(submix),
											onComplete:function(xmlhttp){
												var rep=xmlhttp.responseText;
												if (rep=="success"){
													$("reg_tip").className="green";
													$("reg_tip").innerHTML="注册成功！";
													alert("注册成功！欢迎成为本站会员！\n\n点击确定立即转向作品发布页面");
													urljump('u_article.asp');
												}else{
													alert("您输入的验证码有误，请重新输入");
													reloadcode("rdimg");
													$("reg_tip").style.display="none";
													$("yzm").value="";
													$("yzm").focus();
													$("regsub").disabled=false;
												}
											}
										}
										);
									}
								}
							}
						}
					}
				}
			}
		}
	}
	return false;
}
/* public user register function */

function clearx(obj,str){$("ATField"+obj).options.length=0;$("ATField"+obj).options[0]=new Option(str,"");}
function $sel(m,ids,idx,obj){
	var myAjax = new Ajax.Request("ajx.asp",{method:"get",parameters:"m="+m+"&a="+escape(ids)+"&b="+escape(idx),onComplete:function(xmlhttp){BuildSel(unescape(xmlhttp.responseText),"ATField"+obj)}});
}
function BuildSel(str,obj){$(obj).options.length=0;var arrstr = new Array();var arrstr2 = new Array();arrstr = str.split(",");for(var i=0;i<arrstr.length;i++){arrstr2 = arrstr[i].split("+");$(obj).options[$(obj).options.length]=new Option(arrstr2[1],arrstr2[0])}}

function urljump(url){parent.location.href=url;}
function reloadcode(obj){$(obj).setAttribute('src','../public/RndCode.asp?'+Math.random());}

function report(id){
	var cont=$("cont").value;
	if (cont==""||cont=="如本页显示异常，请在此提交问题描述..."){
		alert("您还什么都没写呢");
		$("cont").value="";
		$("cont").focus();
	}else if(cont.length>100){
		alert("描述内容请不要超过100个字");
		$("cont").focus();
	}else{
		$("_rep").disabled=true;
		var myAjax = new Ajax.Request("ajx.asp",{method:"get",parameters:"m=14&a="+id+"&b="+escape(cont),onComplete:function(xmlhttp){var rep=xmlhttp.responseText;
		switch (rep){
		case "ok":
			alert("问题描述已提交！我们会尽快核实并解决该问题\n\n感谢您的参与");
			break;
		case "err":
			alert("错误：您已经提交过问题了！");
			$("_rep").disabled=false;
			break;
		}
}});
	}
	return false;
}

function cksc(){
	if ($("ATField11").value==""){
		alert("请正确选择您的学校");
		$("ATField11").focus();
		return false;
	}else{
		$("myxx").action="school.asp?xxdm="+$("ATField11").value;
		return true;
	}
}

function change_zd(zd){if (zd==1){$("zd_s").style.display="none";$("zd_t").style.display="";}else{$("zd_s").style.display="";$("zd_t").style.display="none";}}
function $myzd(aid){var ms=$("myzd").value;if (ms==""){alert("请填写您的指导老师");$("myzd").focus();}else{if (ms.length>5){alert("名字不得超过5字");$("myzd").focus();}else{var myAjax = new Ajax.Request("ajx.asp",{method:"get",parameters:"m=12&a="+escape(ms)+"&b="+aid,onComplete:function(xmlhttp){var rep=xmlhttp.responseText;if (rep=="error"){alert("出现未知错误！");}else{$("s_txt").innerHTML=ms;change_zd(0);}}});}}return false;}

function iVote(i,t,u,b,m,x){
	if (b==m){
		alert("○rz...自己不能给自己投票！");
	}else{
		$("iTitle").innerHTML="作品投票";
		$("iContent").innerHTML="标题："+t+"<br />作者："+u+"<div style=\"color:red;line-height:30px;border-top:1px solid #DDD;\">本次活动严禁任何形式的刷票行为，欢迎监督并举报恶意投票行为</div><div>一句话简评：<br /><input type=\"text\" id=\"quot\" style=\"width:380px;border:1px solid #CCC;height:16px;line-height:16px;\" /></div>验证码：<input type=\"text\" id=\"rdc\" class=\"rdc\" /> <img id=\"rdimg\" src=\"RndCode.asp\" style=\"cursor:pointer;\" onclick=\"reloadcode('rdimg');\" alt=\"看不清？点此重新生成验证码\" align=\"absmiddle\" /> <span id=\"iTip\"></span>";
		reloadcode("rdimg");
		$("iButton").innerHTML="<input type=\"submit\" id=\"iVote\" value=\"投我一票\" onclick=\"iChk('"+i+"','"+u+"','"+b+"','"+x+"');return false;\" />&nbsp;&nbsp;";
		box.Show();
	}
}
function iChk(i,u,b,x){
	if ($("rdc").value==""){
		$("iTip").style.display="";
		$("iTip").innerHTML="请输入4位验证码！";
		$("rdc").focus();
	}else{
		$("iTip").style.display="none";
		//if (confirm("单击确定进行投票")){
			$("iVote").disabled=true;
			$("iTip").style.display="";
			$("iTip").innerHTML="正在提交数据，请稍后...";
			var myAjax = new Ajax.Request("ajx.asp",{method:"get",parameters:"m=6&a="+escape($("quot").value)+"&b="+escape($("rdc").value)+"&c="+escape(i)+"&e="+escape(u)+"&f="+escape(b)+"&g="+escape(x),onComplete:function(xmlhttp){var rep=xmlhttp.responseText;
			switch (rep){
			case "ok":
				$("iTip").style.display="none";
				alert("投票成功！感谢您的参与\n\n请继续支持其他优秀作品");
				box.Close();
				break;
			case "errcode":
				$("iTip").innerHTML="验证码错误！";
				alert("Error:验证码输入错误！");
				reloadcode("rdimg");
				$("iVote").disabled=false;
				$("rdc").value="";
				$("rdc").focus();
				break;
			case "isvoted":
				$("iTip").style.display="none";
				alert("Error:您已投过该作品了，不可重复投票");
				box.Close();
				break;
			}
}});
		//}
	}
}


function iScore(i,t,u,b,m){
	if (b==m){
		alert("○rz...自己不能给自己评分！");
	}else{
		$("iTitle").innerHTML="给作品评分";
		$("iContent").innerHTML="标题："+t+"<br />作者："+u+"<div style=\"color:red;line-height:30px;border-top:1px solid #DDD;\" id=\"iTip\">请输入60~99之间的任意一个整数，请客观评价该作品，禁止恶意评分</div>您的分数：<input type=\"text\" id=\"score\" class=\"rdc\" />　验证码：<input type=\"text\" id=\"rdc\" class=\"rdc\" /> <img id=\"rdimg\" src=\"RndCode.asp\" style=\"cursor:pointer;\" onclick=\"reloadcode('rdimg');\" alt=\"看不清？点此重新生成验证码\" align=\"absmiddle\" />";
		reloadcode("rdimg");
		$("iButton").innerHTML="<input type=\"submit\" id=\"iScore\" value=\"提交评分\" onclick=\"iChk2("+i+");return false;\" />&nbsp;&nbsp;";
		box.Show();
	}
}
function iChk2(i){
	var score=$("score").value;
	if (score==""){score="0";}
	if (parseInt(score)<60||parseInt(score)>99){
		$("iTip").style.display="";
		$("iTip").innerHTML="请输入60~99之间的任意一个整数";
		$("score").focus();
	}else{
		if ($("rdc").value==""){
			$("iTip").style.display="";
			$("iTip").innerHTML="请输入4位验证码！";
			$("rdc").focus();
		}else{
			$("iTip").style.display="none";
			$("iScore").disabled=true;
			$("iTip").style.display="";
			$("iTip").innerHTML="正在提交数据，请稍后...";
			var myAjax = new Ajax.Request("ajx.asp",{
				method:"get",parameters:"m=8&a="+escape(score)+"&b="+escape($("rdc").value)+"&c="+i,onComplete:function(xmlhttp){
					var rep=xmlhttp.responseText;
					switch (rep){
					case "ok":
						$("iTip").innerHTML="评分成功！";
						alert("您的评分已提交！感谢您对该作品的支持");
						box.Close();
						break;
					case "errcode":
						$("iTip").innerHTML="验证码错误！";
						alert("Error:验证码输入错误！");
						reloadcode("rdimg");
						$("iScore").disabled=false;
						$("rdc").value="";
						$("rdc").focus();
						break;
					case "isscored":
						$("iTip").innerHTML="评分失败";
						alert("Error:该作品您已评过分了");
						box.Close();
						break;
					}
				}
			});

		}
	}
}


function iTS(i,t){
	$("iTitle").innerHTML="举报作品";
	$("iContent").innerHTML="投诉："+t+"<br />投诉内容：<div style=\"color:red;line-height:25px;\" id=\"iTip\">100字以内，如抄袭、恶意投票等，请提供具体的证据以便我们核查</div><input type=\"text\" id=\"words\" style=\"width:380px;border:1px solid #CCC;height:16px;line-height:16px;\" /><br />验证码：<input type=\"text\" id=\"rdc\" class=\"rdc\" /> <img id=\"rdimg\" src=\"RndCode.asp\" style=\"cursor:pointer;\" onclick=\"reloadcode('rdimg');\" alt=\"看不清？点此重新生成验证码\" align=\"absmiddle\" />";
	reloadcode("rdimg");
	$("iButton").innerHTML="<input type=\"submit\" id=\"iTS\" value=\"举报作品\" onclick=\"iChk3("+i+");return false;\" />&nbsp;&nbsp;";
	box.Show();
}
function iChk3(i){
	var words=$("words").value;
	if (words.length==0||words.length>100){
		$("iTip").style.display="";
		$("iTip").innerHTML="请输入您的投诉内容，不超过100字";
		$("words").focus();
	}else{
		if ($("rdc").value==""){
			$("iTip").style.display="";
			$("iTip").innerHTML="请输入4位验证码！";
			$("rdc").focus();
		}else{
			$("iTip").style.display="none";
			$("iTS").disabled=true;
			$("iTip").style.display="";
			$("iTip").innerHTML="正在提交，请稍后...";
			var myAjax = new Ajax.Request("ajx.asp",{
				method:"get",parameters:"m=9&a="+escape(words)+"&b="+escape($("rdc").value)+"&c="+i,onComplete:function(xmlhttp){
					var rep=xmlhttp.responseText;
					switch (rep){
					case "ok":
						$("iTip").innerHTML="评分成功！";
						alert("您的投诉已受理，我们将会根据您的描述进行核实并尽快处理\n\n感谢您的关注");
						box.Close();
						break;
					case "errcode":
						$("iTip").innerHTML="验证码错误！";
						alert("Error:验证码输入错误！");
						reloadcode("rdimg");
						$("iTS").disabled=false;
						$("rdc").value="";
						$("rdc").focus();
						break;
					}
				}
			});

		}
	}
}

function $commck(){
	if ($("commbox").value.length<6||$("commbox").value.length>100){
		alert("评论内容请不少于6个字，且不高于100字");
		$("commbox").focus();
	}else{
		$("commsubmit").disabled=true;
		var myAjax = new Ajax.Request("ajx.asp",{method:"get",parameters:"m=7&a="+escape($("commbox").value)+"&b="+escape($("valicode").value)+"&c="+$("curid").value+"&d="+escape($("xdm").value)+"&e="+escape($("autc").value),onComplete:function(xmlhttp){var rep=xmlhttp.responseText;

			switch (rep){
			case "ok":
				alert("您的评论已成功发表！");
				window.location.href=location.href;
				break;
			case "errcode":
				alert("Error:验证码输入错误！");
				reloadcode("rdimage");
				$("commsubmit").disabled=false;
				$("valicode").value="";
				$("valicode").focus();
				break;
			case "nowater":
				alert("Orz请不要灌纯净水...");
				reloadcode("rdimage");
				$("commsubmit").disabled=false;
				$("valicode").value="";
				$("valicode").focus();
				break;
			}
}});
	}
	return false;
}

function chg(){
	if ($("keyword").className=="sch0"){
		$("keyword").value="";
		$("keyword").className="sch1";
	}
}
function getx(o){
	var s;
	switch (o){
		case "1":
		s="请输入文章的编号或者标题";
		break;
		case "2":
		s="请输入作者的姓名，如“张三”";
		break;
		case "3":
		s="请输入学校名称";
		break;
	}
	if ($("keyword").className=="sch1"&&$("keyword").value==""){
		$("keyword").className="sch0";
		$("keyword").value=s;
	}else{
		if ($("keyword").value!=s&&$("keyword").className=="sch0"){
			$("keyword").value=s;
		}
	}
}
function xsearch(){
	if ($("keyword").className=="sch0"||$("keyword").value==""){
		alert("请输入您要检索的关键字");
		$("keyword").className="sch1";
		$("keyword").value="";
		$("keyword").focus();
		return false;
	}else{
		location.href="search.asp?a="+$("alex").value+"&keyword="+escape($("keyword").value);
		return false;
	}
}

function $action(a,b,c,d,e){
	switch (a){
	case "1":
		c=c.split("|");
		d=d.split("|");
		document.write ("<a href=\"../Ucenter/space.asp?uid="+c[1]+"\" target=\"_blank\">"+c[0]+"</a> 上传了一篇作品：<a href=\"jump.asp?t=2&a="+c[1]+"\" target=\"_blank\">"+d[0]+"</a> <span>("+e+")</span>");
		break;
	case "2":
		c=c.split("|");
		document.write ("<a href=\"../Ucenter/space.asp?uid="+c[1]+"\" target=\"_blank\">"+c[0]+"</a> 报名参加了活动 <span>("+e+")</span>");
		break;
	case "3":
		d=d.split("|");
		if (c=="|0"){
			document.write ("来自 "+b+" 的网友给 <a href=\"jump.asp?t=2&a="+d[1]+"\" target=\"_blank\">"+d[0]+"</a> 的作品投上了一票 <span>("+e+")</span>");
		}else{
			c=c.split("|");
			document.write ("<a href=\"../Ucenter/space.asp?uid="+c[1]+"\" target=\"_blank\">"+c[0]+"</a> 给 <a href=\"jump.asp?t=2&a="+d[1]+"\" target=\"_blank\">"+d[0]+"</a> 的作品投上了一票 <span>("+e+")</span>");
		}
		break;
	case "4":
		d=d.split("|");
		if (c=="|0"){
			document.write ("来自 "+b+" 的网友评论了 <a href=\"jump.asp?t=2&a="+d[1]+"\" target=\"_blank\">"+d[0]+"</a> 的文章 <span>("+e+")</span>");
		}else{
			c=c.split("|");
			document.write ("<a href=\"../Ucenter/space.asp?uid="+c[1]+"\" target=\"_blank\">"+c[0]+"</a> 评论了 <a href=\"jump.asp?t=2&a="+d[1]+"\" target=\"_blank\">"+d[0]+"</a> 的文章 <span>("+e+")</span>");
		}
		break;
	}
}

function ckpwd(){
	var x=$("oripwd").value;
	var y=$("npwd").value;
	var z=$("newpwd").value;
	if (x==""){
		$("ori").style.display="";
		$("oripwd").focus();
	}else{
		$("ori").style.display="none";
		if (y==""||z==""){
			$("orz").style.display="";
			$("npwd").focus();
		}else{
			if (y!=z){
				$("orz").style.display="";
				$("orz").innerHTML="您两次输入的密码不一致";
				$("newpwd").focus();
			}else{
				$("orz").style.display="";
				$("orz").innerHTML="正在提交...请稍后...";

				var myAjax = new Ajax.Request(
				"ajx.asp",
				{
					method:"get",
					parameters:"m=99&a="+escape(x)+"&b="+escape(z),
					onComplete:function(xmlhttp){
						var rep=xmlhttp.responseText;
						if (rep=="ok"){
							alert("您的新密码已设置成功！下次将使用该密码登录");
							location.href="?s=s";
						}else{
							$("result").style.display="block";
						}
					}
				}
				);
			}
		}
	}
	return false;
}