// by Rain
var ajaxHttpRequest = false;

function ajaxInit() {
	if(window.XMLHttpRequest) { //Mozilla, Opera, ...
		ajaxHttpRequest = new XMLHttpRequest();
		if(ajaxHttpRequest.overrideMimeType) {
			ajaxHttpRequest.overrideMimeType("text/xml");
		}
	}
	else if(window.ActiveXObject) { //IE
		try{
			ajaxHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e) {
			try{
				ajaxHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e) {
			}
		}
	}
	if(!ajaxHttpRequest) {
		window.alert("不能创建XMLHttpRequest对象实例");
		return false;
	}
}

function ajaxSendPost(url, values, processRequest) {
	ajaxHttpRequest.open("POST",url,true);
	ajaxHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajaxHttpRequest.send(values);
	ajaxHttpRequest.onreadystatechange = processRequest;
}

/*
function ajaxSendGet(url) {
	ajaxHttpRequest.open("GET",url,true);
	ajaxHttpRequest.send(null);
	ajaxHttpRequest.onreadystatechange = processRequest;
}
*/
function GetPage(page) {
	var values = "page=" + page
	ajaxSendPost("/AjaxServer.asp?"+getpara(), values, processSendRequest);
}
function processSendRequest() {
	if(ajaxHttpRequest.readyState==4) {
		if(ajaxHttpRequest.status==200) {
			if(ajaxHttpRequest.responseText!="") {
				ReTextStr = ajaxHttpRequest.responseText;
				if (ReTextStr.indexOf('||')>0)
					{
					alert(ReTextStr.split("||")[1]);
					if (ReTextStr.split("||")[0]=='-9')
						GetE("ob_codeimg").src=GetE("ob_codeimg").src +'&t='+ Math.random();
					}
				else
					{
					var WTextContent = document.getElementById("show_content");
					WTextContent.innerHTML=ReTextStr;
					}

			}
		}
		else {
			alert("您请求的页面有异常");
		}
	}
}

function SaveAdvisory(page) {
	if (document.AdvisoryForm.title.value=="")
		alert('主题不能为空!');
	else
	{
	var sName = escape(document.AdvisoryForm.name.value);
	var sClassid = escape(document.AdvisoryForm.classid.value); 
	var sContact = escape(document.AdvisoryForm.contact.value); 
	var sTitle = escape(document.AdvisoryForm.title.value); 
	var sContent = escape(document.AdvisoryForm.content.value); 
	var sAdvisoryCode = escape(document.AdvisoryForm.AdvisoryCode.value);
	var sob_codename =  escape(document.AdvisoryForm.ob_codename.value);
	var values = "name=" + sName + "&classid=" + sClassid + "&contact=" + sContact + "&title=" + sTitle + "&content=" + sContent + "&codestr=" + sAdvisoryCode + "&ob_codename=" + sob_codename
	ajaxSendPost("/AjaxServer.asp?action=saveadvisory", values, processSendRequest);
	}
}


function SaveConsultation(page) {
	if (GetE("title").value=="")
		alert('主题不能为空!');
	else
	{
	var sName = escape(GetE("name").value);
	var sConsid = escape(GetE("consid").value); 
	var sContact = escape(GetE("contact").value); 
	var sTitle = escape(GetE("title").value); 
	var sContent = escape(GetE("content").value); 
	var sConsCode = escape(GetE("ConsCode").value);
	var sob_codename =  escape(GetE("ob_codename").value);
	var values = "name=" + sName + "&consid=" + sConsid + "&contact=" + sContact + "&title=" + sTitle + "&content=" + sContent + "&codestr=" + sConsCode + "&ob_codename=" + sob_codename
	ajaxSendPost("/AjaxServer.asp?action=saveconsultation", values, processSendRequest);
	}
}

function SaveMgap(page) {
	if ((GetE("ipt_title").value=="") || (GetE("ipt_purpose").value=="") || (GetE("ipt_content").value==""))
		alert('带*号为必添项!');
	else
	{
		var sType=escape(read_radio("ipt_type"));
		var sTitle=escape(GetE("ipt_title").value);
		var sPurpose=escape(GetE("ipt_purpose").value);
		var sContent=escape(GetE("ipt_content").value);	
		var sMgapappCode = escape(GetE("MgapappCode").value);
		var sob_codename =  escape(GetE("ob_codename").value);
		var sReplytype=escape(read_radio("ipt_replytype"));
		var sReceivetype=escape(read_radio("ipt_receivetype"));
		var values="ipt_type=" + sType + "&ipt_title=" + sTitle + "&ipt_purpose=" + sPurpose + "&ipt_content=" + sContent + "&CodeStr=" + sMgapappCode + "&ob_codename=" + sob_codename + "&ipt_replytype=" + sReplytype + "&ipt_receivetype=" + sReceivetype ;
		if (read_radio("ipt_type")=="1" )
		{

			var sName=escape(GetE("ipt_name").value);
			var sPhone=escape(GetE("ipt_phone").value);
			var sCadtype=escape(GetE("ipt_cardtype").value);
			var sCardnum=escape(GetE("ipt_cardnum").value);
			var sComp=escape(GetE("ipt_comp").value);
			var sAddress=escape(GetE("ipt_address").value);
			var sPostcode=escape(GetE("ipt_postcode").value);
			var sEmail=escape(GetE("ipt_email").value);
			values+="&ipt_name=" + sName + "&ipt_phone=" + sPhone + "&ipt_cardtype=" + sCadtype + "&ipt_cardnum=" + sCardnum + "&ipt_comp=" + sComp + "&ipt_address=" + sAddress + "&ipt_postcode=" + sPostcode + "&ipt_email=" + sEmail ;
		}
		else
		{
			var sCompname=escape(GetE("ipt_comyname").value);  
			var sDepcode=escape(GetE("ipt_depcode").value);
			var sbusinesslicense=escape(GetE("ipt_businesslicense").value);
			var sRep=escape(GetE("ipt_rep").value);
			var sContactname=escape(GetE("ipt_contactname").value);
			var sContacephone=escape(GetE("ipt_contactphone").value);
			var sContectmail=escape(GetE("ipt_contactmail").value);
			values+="&ipt_comyname=" + sCompname + "&ipt_depcode=" + sDepcode + "&ipt_businesslicense=" + sbusinesslicense + "&ipt_rep=" + sRep + "&ipt_contactname=" + sContactname + "&ipt_contactphone=" + sContacephone + "&ipt_contactmail=" + sContectmail ;
		}
		ajaxSendPost("/AjaxServer.asp?action=savemgap", values, processSendRequest);
	}
}

function SearchMgapApp() {
	if (GetE('ipt_name').value=='')
		{
		alert('姓名不能为空!');
		GetE('ipt_name').focus;
		return false;
		}
	if (GetE('ipt_psw').value=='')
		{
		alert('查询密码不能为空!');
		GetE('ipt_name').focus;
		return false;
		}
	if (GetE('SearchMgapappCode').value=='')
		{
		alert('验证码不能为空!');
		GetE('ipt_name').focus;
		return false;
		}			
	var sName = escape(GetE('ipt_name').value);
	var sPassword = escape(GetE('ipt_psw').value);
	var sapptype = escape(read_radio('ipt_apptype'));
	var sSearchMgapappCode = escape(GetE('SearchMgapappCode').value);
	var sob_codename =  escape(GetE('ob_codename').value);	
	var values = "name=" + sName + "&password=" + sPassword + "&CodeStr=" + sSearchMgapappCode + "&ob_codename=" + sob_codename + "&apptype=" + sapptype
	ajaxSendPost("/AjaxServer.asp?action=searchmgapstate", values, processSendRequest);
}


function SaveVote(voteid)
{
	var optidlist = read_radio("optionid");
	window.open ("/ajaxserver.asp?action=savevote&optid="+optidlist+"&voteid="+voteid, "newwindow", "height=450, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
}

function ViewVote(voteid)
{
	window.open ("/ajaxserver.asp?action=showvote&voteid="+voteid, "newwindow", "height=450, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
}
//判断div
function chkdiv(divid){
	var chkid=document.getElementById(divid);
	if(chkid != null){return true; }
	else {return false; }
}

	
function Insert_SiteNav_Line(){
	if (chkdiv("sitenav_line")){
		var htmlstr="<table width=100% class=navtab border=0 cellpadding=0 cellspacing=0>";
		htmlstr += "<tr>";
		htmlstr += "<td class=navtd align=center><a href=index.shtml class=sitenav>首 页</a></td>";
		for (i=0;i<siteclass.length;i++){
			if (siteclass[i][4]=="0")
			{
				
				htmlstr += "<td class=navtd align=center><a href=cmd.shtml?action=" + siteclass[i][2] + "&classid=" + siteclass[i][0] + " class='sitenav'>" + siteclass[i][1] + "</a></td>";
				
			}
		}
		htmlstr += "</tr></table>";
		document.getElementById("sitenav_line").innerHTML=htmlstr;
	}
}
function Insert_SonNav_Vertical(classid){
	if (chkdiv("sonnav_vertical")){
		thisclassstr="";
		sonclassstr="";
		htmlstr="";
		parentclassid=classid;
		if (parentclassid!="")
		{
			for (i=0;i<siteclass.length;i++){
				if (siteclass[i][0]==parentclassid && siteclass[i][2]!="sonpage")
					{
						thisclassstr+="        <span class=classtitle2>" + siteclass[i][1] + "</span>";
					}
				if ((siteclass[i][0].substring(0,parentclassid.length)==parentclassid && siteclass[i][0].length==parentclassid.length+4 && siteclass[i][2]!='sonpage') || ((siteclass[i][0]==parentclassid) && (siteclass[i][2]=='sonpage')))
				{
				

					if (siteclass[i][2]=="sonpage")
						sonclassstr += "          <div class='tree_root'><span><img src='/skin/001/images/biao2.gif' > <a href=page_" + siteclass[i][3] + ".shtml?action=" + siteclass[i][2] + "&classid=" + siteclass[i][4] + " class=titi2>" + siteclass[i][1] + "</a></span></div>";
					else
						{
						sonclassstr += "          <div class='tree_root' onClick=Insert_Tree_Son('" + siteclass[i][0] + "')><span><img src='/skin/001/images/biao2.gif' > <a href=# class=titi2 onClick='ajaxSendPost(\"/AjaxServer.asp?action=info&classid=" + siteclass[i][0] + "\", \"page=1\", processSendRequest)'>" + siteclass[i][1] + "</a></span></div>";
						sonclassstr += "          <div id='tree_" + siteclass[i][0] + "' isload='unload'></div>"
						}
				}
			}
			htmlstr+="<table border='0' cellspacing='0' cellpadding='0'>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_top' align='center'>";
			htmlstr+=thisclassstr;
			htmlstr+="    </td>";
			htmlstr+="  </tr>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_mid'>";
			htmlstr+=sonclassstr;
			htmlstr+="    </td>";
			htmlstr+="  </tr>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_Bottom'></td>";
			htmlstr+="  </tr>";
			htmlstr+="</table>";        			
		}
		document.getElementById("sonnav_vertical").innerHTML=htmlstr;
	}	
}
function Insert_Tree()
{
	if (chkdiv("sonnav_vertical")){
		thisclassstr="";
		sonclassstr="";
		htmlstr="";
		parentclassid=getQueryString("classid");
		if (parentclassid!="")
		{
			for (i=0;i<siteclass.length;i++){
				if (siteclass[i][0]==parentclassid && siteclass[i][2]!="sonpage")
					{
						thisclassstr+="        <span class=classtitle2>" + siteclass[i][1] + "</span>";
					}
				if ((siteclass[i][0].substring(0,parentclassid.length)==parentclassid && siteclass[i][0].length==parentclassid.length+4 && siteclass[i][2]!='sonpage') || ((siteclass[i][0]==parentclassid) && (siteclass[i][2]=='sonpage')))
				{
				

					if (siteclass[i][2]=="sonpage")
						sonclassstr += "          <div class='tree_root'><span><img src='/skin/001/images/biao2.gif' > <a href=page_" + siteclass[i][3] + ".shtml?action=" + siteclass[i][2] + "&classid=" + siteclass[i][4] + " class=titi2>" + siteclass[i][1] + "</a></span></div>";
					else
						if (siteclass[i][2]=="link")
							sonclassstr += "          <div class='tree_root'><span><img src='/skin/001/images/biao2.gif' > <a href=" + siteclass[i][5] + " class=titi2>" + siteclass[i][1] + "</a></span></div>";
						else
						{
						sonclassstr += "          <div class='tree_root' onClick=Insert_Tree_Son('" + siteclass[i][0] + "')><span><img src='/skin/001/images/biao2.gif' > <a href=# class=titi2 onClick='ajaxSendPost(\"/AjaxServer.asp?action=info&classid=" + siteclass[i][0] + "\", \"page=1\", processSendRequest)'>" + siteclass[i][1] + "</a></span></div>";
						sonclassstr += "          <div id='tree_" + siteclass[i][0] + "' isload='unload'></div>"
						}
						
				}
			}
			htmlstr+="<table border='0' cellspacing='0' cellpadding='0'>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_top' align='center'>";
			htmlstr+=thisclassstr;
			htmlstr+="    </td>";
			htmlstr+="  </tr>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_mid'>";
			htmlstr+=sonclassstr;
			htmlstr+="    </td>";
			htmlstr+="  </tr>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_Bottom'></td>";
			htmlstr+="  </tr>";
			htmlstr+="</table>";        			
		}
		document.getElementById("sonnav_vertical").innerHTML=htmlstr;
	}	

}



function Insert_Tree_Son(parentclassid)
{
	var sonclassstr="";
	if (parentclassid!="")
	{
		if (GetE('tree_'+parentclassid).isload=="unload")
		{
			for (i=0;i<siteclass.length;i++)
			{

					if ((siteclass[i][0].substring(0,parentclassid.length)==parentclassid && siteclass[i][0].length==parentclassid.length+4 && siteclass[i][2]!='sonpage') || ((siteclass[i][0]==parentclassid) && (siteclass[i][2]=='sonpage')))
					{
						sonclassstr += "      <ul>";
						if (siteclass[i][2]=="sonpage")
							sonclassstr += "          <li><a href=page_" + siteclass[i][3] + ".shtml?action=" + siteclass[i][2] + "&classid=" + siteclass[i][4] + " class=titi2>" + siteclass[i][1] + "</a></li>";
						else
							sonclassstr += "          <li onClick=Insert_Tree_Son('" + siteclass[i][0] + "')><a href=# class=titi2 onClick='ajaxSendPost(\"/AjaxServer.asp?action=info&classid=" + siteclass[i][0] + "\", \"page=1\", processSendRequest)'>" + siteclass[i][1] + "</a></li>";
							sonclassstr += "<div id='tree_" + siteclass[i][0] + "' isload='unload'></div>";
						sonclassstr += "        </ul>";
						
					}			
			}
			if (sonclassstr!="")
				document.getElementById("tree_"+parentclassid).innerHTML=sonclassstr;
			document.getElementById('tree_'+parentclassid).isload="load";
			document.getElementById('tree_'+parentclassid).style.display="block";
		}
		else
			if (document.getElementById('Tree_'+parentclassid).style.display=="none")
				document.getElementById('Tree_'+parentclassid).style.display="block";
			else
				document.getElementById('Tree_'+parentclassid).style.display="none";
	}

}



function Mgap_Insert_Tree()
{
	if (chkdiv("sonnav_vertical")){
		thisclassstr="";
		sonclassstr="";
		htmlstr="";
		parentclassid=getQueryString("classid");
		if (parentclassid!="")
		{
			for (i=0;i<siteclass.length;i++){
				
				if (siteclass[i][0]==parentclassid && siteclass[i][2]!="sonpage")
					{
						thisclassstr+="        <span class=classtitle2>" + siteclass[i][1] + "</span>";
					}
				if ((siteclass[i][0].substring(0,parentclassid.length)==parentclassid && siteclass[i][0].length==parentclassid.length+4 && siteclass[i][2]!='sonpage') || ((siteclass[i][0]==parentclassid) && (siteclass[i][2]=='sonpage')))
				{
				

					if (siteclass[i][2]=="sonpage")
						sonclassstr += "          <div class='tree_root'><span><a href=cmd.shtml?action=mgapinfo&classid=" + siteclass[i][4] + "&id=" + siteclass[i][3] + " class=titi2>" + siteclass[i][1] + "</a></span></div>";
					else
						{
						if (siteclass[i][2]=="link")
							sonclassstr += "          <div class='tree_root'><span><a href='" + siteclass[i][5] + "' class=titi2 >" + siteclass[i][1] + "</a></span></div>";
						else
						
							{
							sonclassstr += "          <div class='tree_root' onClick=Insert_Mgap_Tree_Son('" + siteclass[i][0] + "')><span><a href=# class=titi2 onClick='ajaxSendPost(\"/AjaxServer.asp?action=mgapinfolist&classid=" + siteclass[i][0] + "\", \"page=1\", processSendRequest)'>" + siteclass[i][1] + "</a></span></div>";
							sonclassstr += "          <div id='tree_" + siteclass[i][0] + "' isload='unload'></div>"
							}
						}
				}
			}
			htmlstr+="<table border='0' cellspacing='0' cellpadding='0'>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_top' align='center'>";
			htmlstr+=thisclassstr;
			htmlstr+="    </td>";
			htmlstr+="  </tr>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_mid'>";
			htmlstr+=sonclassstr;
			htmlstr+="    </td>";
			htmlstr+="  </tr>";
			htmlstr+="  <tr>";
			htmlstr+="    <td class='SonNav_Bottom'></td>";
			htmlstr+="  </tr>";
			htmlstr+="</table>";        			
		}
		document.getElementById("sonnav_vertical").innerHTML=htmlstr;
	}	

}

function Insert_Mgap_Tree_Son(parentclassid)
{
	var sonclassstr="";
	if (parentclassid!="")
	{
		if (document.getElementById('Tree_'+parentclassid).isload=="unload")
		{
			for (i=0;i<siteclass.length;i++)
			{
					if (siteclass[i][0].substring(0,parentclassid.length)==parentclassid && siteclass[i][0].length==parentclassid.length+4)
					{
						sonclassstr += "      <ul>";
						if (siteclass[i][2]=="sonpage")
							sonclassstr += "          <li><a href=page_" + siteclass[i][3] + ".shtml?action=" + siteclass[i][2] + "&classid=" + siteclass[i][4] + " class=titi2>" + siteclass[i][1] + "</a></li>";
						else
							sonclassstr += "          <li onClick=Insert_Tree_Son('" + siteclass[i][0] + "')><a href=# class=titi2 onClick='ajaxSendPost(\"/AjaxServer.asp?action=mgapinfolist&classid=" + siteclass[i][0] + "\", \"page=1\", processSendRequest)'>" + siteclass[i][1] + "</a></li>";
							sonclassstr += "<div id='tree_" + siteclass[i][0] + "' isload='unload'></div>";
						sonclassstr += "        </ul>";
						
					}			
			}
			if (sonclassstr!="")
				document.getElementById("Tree_"+parentclassid).innerHTML=sonclassstr;
			document.getElementById('Tree_'+parentclassid).isload="load";
			document.getElementById('Tree_'+parentclassid).style.display="block";
		}
		else
			if (document.getElementById('Tree_'+parentclassid).style.display=="none")
				document.getElementById('Tree_'+parentclassid).style.display="block";
		//	else
		//		document.getElementById('Tree_'+parentclassid).style.display="none";
	}

}

function SearchMgapInfo(page) {
	var sTitle = escape(GetE('title').value);
	var sContent = escape(GetE('content').value);
	var sTextno = escape(GetE('textno').value);
	var sDep = escape(GetE('dep').value);
	var sServialnum = escape(GetE('servialnum').value);
	var sStartdate = escape(GetE('start_date').value);
	var sEnddate =  escape(GetE('end_date').value);
	var sClassid = escape(GetE('classid').value);
	var values = "title=" + sTitle + "&content=" + sContent + "&textno=" + sTextno + "&dep=" + sDep + "&servialnum=" + sServialnum + "&start_date=" + sStartdate + "&end_date=" + sEnddate + "&classid=" + sClassid
	ajaxSendPost("/AjaxServer.asp?action=mgapinfolist", values, processSendRequest);
}





function MenuTabActive(MenuTabId,ActiveNum,TabCount)
{
	for (i=0;i<TabCount;i++)
	{
		var ActiveMenuTab= eval("document.all."+MenuTabId+"_tab"+i);
		var ActiveMenuPage= eval("document.all."+MenuTabId+"_page"+i);
		if (i==ActiveNum)
			{
				
				ActiveMenuTab.className="oTabBtnActive";
				ActiveMenuPage.style.display="block";
			}
		else
			{
				ActiveMenuTab.className="oTabBtn";
				ActiveMenuPage.style.display="none";
		
			}
	}

}
function Aiv367_Scroll(objname,id,scrollBoxHeight,scrollWaitTime,scrollSpeed) 
{ 
	this.objname=objname; 
	this.id=id; 
	this.scrollBoxHeight=scrollBoxHeight; 
	this.scrollWaitTime=scrollWaitTime; 
	this.scrollSpeed=scrollSpeed; 
	this.scrollStop=false; 
	this.dom=document.getElementById(this.id); 
	this.dom.style.height=this.scrollBoxHeight; 
	this.dom.innerHTML+=this.dom.innerHTML; 
	this.dom.onmouseover=new Function(this.objname+".scrollStop=true"); 
	this.dom.onmouseout=new Function(this.objname+".scrollStop=false"); 
	Aiv367_Scroll.prototype.BeginScroll = function () 
		{ 
			if(this.scrollStop==false) this.dom.scrollTop+=this.scrollSpeed; 
			if(this.dom.scrollTop>=this.dom.scrollHeight/2){this.dom.scrollTop=0;} 
			if(this.dom.scrollTop%this.scrollBoxHeight==0) 
				{ 
					setTimeout(eval("'"+this.objname+".BeginScroll()'"),this.scrollWaitTime); 
				} 
			else 
				{ 
					setTimeout(eval("'"+this.objname+".BeginScroll()'"),20); 
				} 
		}; 
}

function checnull(frm,str)
{
  re=/^\s{0,}$/
  if(re.test(frm.value))
	{
       alert(str)
	  frm.focus()
	  return false
	}else
	{
      return true
	}
}

//取得页面参数
function getpara(){
	var str,parastr
	str = window.location.search;
	parastr = str.substring(1);
	return parastr;
}

function getQueryString(questname){
	var str,parastr,queryarr,i,returnstr 
	str = window.location.search;
	parastr = str.substring(1);
	queryarr = parastr.split("&");
	returnstr="";
	for (i=0;i<queryarr.length;i++)
	{
		if (queryarr[i].split("=")[0]==questname)
			{
				returnstr = queryarr[i].split("=")[1];
			}
	}
	return returnstr;
}
function showreply(titleid)
{

	var tid=titleid;
	var std= document.getElementById('rid'+titleid)
	if (std.style.display=='none')
	{

		std.style.display='block';
		if (std.isload!='true')
			{
			var values = "msgid=" + titleid ;
			ajaxSendPost("/AjaxServer.asp?action=msgreply", values, "");
			std.isload='true';		
			}
	}
	else
	{
		std.style.display='none';
	}
}

function processMsgRequest(msgid) {
	if(ajaxHttpRequest.readyState==4) {
		if(ajaxHttpRequest.status==200) {
			if(ajaxHttpRequest.responseText!="") {
				var ReTextStr = ajaxHttpRequest.responseText;
				var MsgContent = document.getElementById("hit_" + msgid);
				MsgContent.text=ReTextStr;
			}
		}
		else {
			alert("您请求的页面有异常");
		}
	}
}

function read_radio(rname){
	var temp=document.getElementsByName(rname);
	for (i=0;i<temp.length;i++){
    if(temp[i].checked){
      return temp[i].value;
      }
 	}
}
function read_checkbox(rname){
	var str=''  
	var temp=document.getElementsByName(rname);
	for (i=0;i<temp.length;i++){
    if(temp[i].checked){
      if (str==''){str=temp[i].value}else{str=str+','+temp[i].value}
      }
 	}
	return str;
}

function GetE( elementId )
{
	return document.getElementById( elementId )  ;
}

//初始化ajax
ajaxInit();
