function loadinit()
{
party_req();
join_req();
}

function party_req(){
	var ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/party.asp?action=partyr&sortid="+escape(sortid);
	ajaxobj.callback=function(xmlobj) {
	var response = xmlobj.responseText.split("$$");
	my_getbyid("hits").innerHTML =response[0];
	my_getbyid("mark").innerHTML =response[1];
	my_getbyid("Img").innerHTML =response[2];
	my_getbyid("Join").innerHTML =response[3];
	my_getbyid("Time").innerHTML =response[4];
		if (parseInt(response[4])>=1){
			my_getbyid("showmsg").innerHTML ="报名进行中，赶紧提交报名！";
			}
		else{
			my_getbyid("showmsg").innerHTML ="报名结束,请等待下次活动！";
			}
		}
	ajaxobj.send();
}

function join_req(){
	var ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/party.asp?action=partyj&maxtop=10&sortid="+escape(sortid);
	ajaxobj.callback=function(xmlobj) {
	var response = xmlobj.responseText.split("$$");
	if (response[0]!='0'){
	my_getbyid("list").innerHTML =response[0];
	my_getbyid("Man").innerHTML =response[1];
	my_getbyid("Fam").innerHTML =response[2];
	my_getbyid("more").innerHTML ='';
	}else{my_getbyid("list").innerHTML =response[1];}
	}
	ajaxobj.send();
}

function mark_req(page){
	my_getbyid("list").innerHTML =template;
	var ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/data.asp?action=mark&Maxpage=10&MaxTop=0&Table=2&skin=0&Order=0&page="+escape(page)+"&sortid="+escape(sortid);
	ajaxobj.callback=function(xmlobj) {
	var response = xmlobj.responseText.split("$$");
	if (response[0]!='0'){
	my_getbyid("list").innerHTML =response[0];
	my_getbyid("Userid").value =response[3];
	my_getbyid("Password").value =response[4];
	if (response[2]!=0){
		 var pagediv=PageList(page,splitn,response[1],response[2],'mark_req');
		 my_getbyid("more").innerHTML =pagediv+"<a href=javascript:remark(0);>发表评论</a>";
		 }else{my_getbyid("more").innerHTML ="<a href=javascript:remark(0);>发表评论</a>";}
	}else{my_getbyid("list").innerHTML =response[1];}
	}
	ajaxobj.send();
}

function Img_req(){
	var ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/party.asp?action=partyimg&maxtop=5&sortid="+escape(sortid);
	ajaxobj.callback=function(xmlobj) {
	var response = xmlobj.responseText.split("$$");
	my_getbyid("list").innerHTML =response[0];
	my_getbyid("more").innerHTML ='';
	}
	ajaxobj.send();
}

function joinin(step)
{
var ajaxobj=new AJAXRequest;
ajaxobj.method="POST"; 
ajaxobj.url="/httpreq/party.asp?action=join&sortid="+escape(sortid)+"&step="+escape(step)
ajaxobj.callback=function(xmlobj) {
var response = xmlobj.responseText;
my_getbyid("showmsg").innerHTML =response;
}
ajaxobj.send();
}
function other_req(t)
{
var ajaxobj=new AJAXRequest;
ajaxobj.method="POST"; 
ajaxobj.url="/httpreq/party.asp?action=showr&step="+t+"&sortid="+escape(sortid);
ajaxobj.callback=function(xmlobj) {
var response = xmlobj.responseText;
if (t=='1'){
setDisplay("readann",0);
my_getbyid("pa_ann").innerHTML =response;
}
else
{
my_getbyid("list").innerHTML =response;
}
}
ajaxobj.send();
}
function remark(s)
{
setDisplay("remark",s)
}
function refreshRand() {
	my_getbyid('refreshRand').src ="/getcode.asp?random="+Math.random();
}
