
function getModulList()
{
	var htmlContent = "";
	var queryDoc = getMsgCtn("FindModule");
	var paramNode = queryDoc.createElement("request");
	queryDoc.documentElement.appendChild(paramNode);
	paramNode.setAttribute("pkID","-1");
	paramNode.setAttribute("moduleGrade","-1");
	paramNode.setAttribute("patternID","-1");
	paramNode.setAttribute("docID","-1");
	paramNode.setAttribute("delFlag","0");
	paramNode.setAttribute("docNumPerPage","-1");
	paramNode.setAttribute("upperModule","-1");
	paramNode.setAttribute("pageSize","-1");
	paramNode.setAttribute("pageNum","-1");		
	var proxy = new XMLProxy();
	var xmlDom = proxy.send("./ValidateNosession.aspx",queryDoc);
	if(checkResponse(xmlDom,1) != "0000")
	{	
	 	moduleList.outerHTML = "<table width=200 border=0 align='center' cellpadding=1 cellspacing=0 id='moduleList'> <tbody><tr><td>"+ htmlContent +"</td></tr></tbody></table>";
	}	
	var node = null;
	try
	{
		node = xmlDom.selectSingleNode("/message/list");
	}
	catch(e)
	{
		alert('服务器返回信息不完整');
	 	moduleList.outerHTML = "<table width=200 border=0 align='center' cellpadding=1 cellspacing=0 id='moduleList'> <tbody><tr><td>"+ htmlContent +"</td></tr></tbody></table>";
	}		
	node = xmlDom.documentElement.selectSingleNode("/message/list/module");
	if(node == null)
	{
	 moduleList.outerHTML = "<table width=200 border=0 align='center' cellpadding=1 cellspacing=0 id='moduleList'> <tbody><tr><td>"+ htmlContent +"</td></tr></tbody></table>";
	}
	else
	{
		var t = 1;
		while(node != null)
		{
			if(node.getAttribute("pkID")!="37"&&node.getAttribute("pkID")!="58")
			{
				htmlContent+="<tr>";
				htmlContent+="<td align=middle  background='images/index_5.gif' height=32  width=190 >";
				
				if(node.getAttribute("pkID")=="31")
					htmlContent+="<a  href=\"reportRoad.aspx?ID="+ node.getAttribute("pkID")+"\"><span class='T1'>"+node.getAttribute("moduleName")+"</span></a></td>"
				else
					htmlContent+="<a  href=\"contentList.aspx?ID="+ node.getAttribute("pkID")+"\"><span class='T1'>"+node.getAttribute("moduleName")+"</span></a></td>";
				
				htmlContent+="</tr>";
				t++;
			}
			node=node.nextSibling;
		}
		moduleList.outerHTML = "<table width=180 border=0 align='center' cellpadding=1 cellspacing=0 id='moduleList'> <tbody>"+ htmlContent +"</tbody></table>";
	}	
	
}
function getVoteList()
{
	var queryDoctest = getMsgCtn("FindVote");	
	var paramNodetest = queryDoctest.createElement("request");
	queryDoctest.documentElement.appendChild(paramNodetest);	
	paramNodetest.setAttribute("fId","-1");
	paramNodetest.setAttribute("voteNum","-1");
	paramNodetest.setAttribute("votePercent","-1");
	paramNodetest.setAttribute("pageNum","-1");
	var proxytest = new XMLProxy();
	var xmlDomtest = proxytest.send("./ValidateNosession.aspx",queryDoctest);	
	checkResponse(xmlDomtest,1);
	var nodetest = null;
	try
	{
		nodetest = xmlDomtest.selectSingleNode("/message/list/vote");
	}
	catch(e)
	{
		alert('服务器返回信息不完整');		
		nodetest = null;
		return;
	}
	
	if(nodetest == null)
	{
					
		return;
	}
	else
	{
		var htmlContent = "";
		var t=1;
		while(nodetest!=null)
		{
			if(t==1)
			{
				htmlContent+="<tr align='center' valign='middle'>"+			
				"<td width='40%' align='right'><input type='radio' name='radiobutton' value='"+nodetest.getAttribute("fId")+"' id = vote"+nodetest.getAttribute("fId")+" checked>&nbsp;&nbsp;</td>"+
				"<td align=left width='60%'>"+nodetest.getAttribute("columnName")+"</td>";
			}
			else
			{
				htmlContent+="<tr align='center' valign='middle'>"+			
				"<td width='40%' align='right'><input type='radio' name='radiobutton' value='"+nodetest.getAttribute("fId")+"' id = vote"+nodetest.getAttribute("fId")+" >&nbsp;&nbsp;</td>"+
				"<td align=left width='60%'>"+nodetest.getAttribute("columnName")+"</td>";
			}
			htmlContent+="</tr>";
			t++;
			nodetest=nodetest.nextSibling;
		}
		htmlContent+="<tr align='center' valign='middle'>"+
					  "<td colspan='2' align='center'><img src='images/vote_submit.gif' width='50' height='20' onClick='javascript:submitVote()'>&nbsp;&nbsp;&nbsp;<img src='images/vote_result.gif' width='50' height='20' onclick = 'javascript:voteOpenpage("+t+")'>"+
					  "</td>"+
					  "</tr>";
	voteList.outerHTML = "<table width='90%'  border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF' id='VoteList'>"+ htmlContent +"</table>";
	
	}
}

function submitVote()
{
	var _fId = "";
	for(var i=0;i<document.Form1.length;++i)
	{
		if(document.Form1.elements[i].checked==true)
		{
			_fId = document.Form1.elements[i].value;
		}
	}
	queryDoc = getMsgCtn("AddVote");
	paramNode = queryDoc.createElement("request");
	queryDoc.documentElement.appendChild(paramNode);
	paramNode.setAttribute("fId",_fId);
	infer = "提交成功";
	var proxy = new XMLProxy();
	var xmlDom = proxy.send("./ValidateNosession.aspx",queryDoc);
	if(checkResponse(xmlDom,1) == "0000")
	{
		alert(infer);
	}
}
function voteOpenpage(t) 
{
	var w2=555;//????????
	var h2=82+t*20;//????????
	var w3=window.screen.width/2-w2/2;
	var h3=window.screen.height/2-h2/2;
	window.open("voteShow.htm","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+ w2 +",height="+ h2 +",left="+ w3 +",top="+ h3 +"");

}
function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
function MM_showHideLayers()
 { //v6.0
 
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
	obj.visibility=v; }
}
function changeto(highlightcolor)
{
	source=event.srcElement
	if (source.tagName=="TR"||source.tagName=="TABLE")
	return
	while(source.tagName!="TD")
	source=source.parentElement
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
	source.style.backgroundColor=highlightcolor
	
}

function changeback(originalcolor)
{
	if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
	return
	if (event.toElement!=source)
	source.style.backgroundColor=originalcolor
	
}
