// JavaScript Document
function getQueryString(name)
	{
	if(location.href.indexOf("?")==-1 || location.href.indexOf(name+'=')==-1)
	{return'';}
	var queryString = location.href.substring(location.href.indexOf("?")+1);
	var parameters = queryString.split("&"); 
	var pos, paraName, paraValue;
	for(var i=0; i<parameters.length; i++)
	{
		pos = parameters[i].indexOf('=');
		if(pos == -1)
		{continue; } 
		paraName = parameters[i].substring(0, pos);paraValue = parameters[i].substring(pos + 1);
		 if(paraName == name){return unescape(paraValue.replace(/\+/g, " "));}}return'';
	}
	
	

	
	function ShowNewsList()
	{
		var newId =getQueryString("id");
		if(newId == "")
		{
			HTMLCode="";
			xmlDoc = newslist.XMLDocument;
			var childs = xmlDoc.documentElement.childNodes;
			var str="";
			
			for(i=0;i<childs.length;i++)
			{
				str=childs(i).getAttribute("id");
				HTMLCode += "<ul style='margin:9 0 0 23px '>"; 
				HTMLCode += "<li><a href='index.html?id="+str+"' onClick=ShowNews()>";
				
				HTMLCode += "<p><span>";
				HTMLCode += childs(i).childNodes(0).text+ "</span></p>";
				HTMLCode += "</a></li>"; 
				HTMLCode += "</ul>";
				
				if(i>4)
					break; 
			}
			
	
			DispalyNews.innerHTML = HTMLCode;
		}else{
			HTMLCode="";
			xmlDoc = newslist.XMLDocument;
		
			var childs = xmlDoc.documentElement.childNodes;
			
			for(i=0;i<childs.length;i++)
			{
				if(childs(i).getAttribute("id")==newId)
				{
					HTMLCode += "<br><hr><span style='font-size:13px; font-family:'幼圆';'><b><blockquote>"+childs(i).childNodes(0).text+"</blockquote></b></span>";
					HTMLCode += "<p style='font-family:Verdana, Arial, Helvetica, sans-serif';><blockquote>"+childs(i).childNodes(1).text+"</blockquote></p>";
					HTMLCode += "<blockquote><p align='right'>"+childs(i).childNodes(3).text+"</p></blockquote><hr>";
				}
				else{
					continue;
				}
			}
			
			showNews.innerHTML = HTMLCode;
		}
	}
	
	
	function ShowInfoList()
	{

		var infoId =getQueryString("infoid");
		if(infoId == "")
		{
			
				text1="";
				text2="";
				text3="";

				xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
        		xmlDoc.async = false;
        		xmlDoc.load("db/Information.xml");
       			if(xmlDoc == null)
        		{
          			alert('您的浏览器不支持xml文件读取,于是本页面禁止您的操作,推荐使用IE5.0以上可以解决此问题!');
    				return;
        		}
				
				var childs = xmlDoc.documentElement.childNodes;
						
				var str="";
			
				str1=childs(0).getAttribute("id");
				str2=childs(1).getAttribute("id");
				str3=childs(2).getAttribute("id");
				
				text1 += "<a href='index.html?infoid="+str1+"'onClick=ShowNews()>";
				text1 += childs(0).childNodes(0).text;
				text1 += "</a>";
				text1 += "<span>"+childs(0).childNodes(1).text+"</span>"; 
				
				text2 += "<a href='index.html?infoid="+str2+"'onClick=ShowNews()>";
				text2 += childs(1).childNodes(0).text;
				text2 += "</a>"; 
				text2 += "<span>"+childs(1).childNodes(1).text+"</span>"; 
				
				text3 += "<a href='index.html?infoid="+str3+"'onClick=ShowNews()>";
				text3 += childs(2).childNodes(0).text;
				text3 += "</a>"; 
				text3 += "<span>"+childs(2).childNodes(1).text+"</span>"; 
				
				infodiv.innerHTML="<img src='images/3_pic2.jpg' align='left' style='margin:3 11 0 0px' width='140' height='61'><br>"+text1+"<br><br style='line-height:5px'><p align='right'><img src='images/arrow1.gif' align='bottom' style='margin-right:4px' width='5' height='6'><a href='index.html?infoid="+str1+"'onClick=ShowNews()>read more</a></p><img src='images/3_pic3.jpg' align='left' style='margin:3 11 0 0px' width='140' height='61'><br>"+text2+"<br><br style='line-height:5px'><p align='right'><img src='images/arrow1.gif' align='bottom' style='margin-right:4px' width='5' height='6'><a href='index.html?infoid="+str2+"'onClick=ShowNews()>read more</a></p><img src='images/3_pic4.jpg' align='left' style='margin:3 11 0 0px' width='140' height='61'>"+text3+"<br style='line-height:5px'><p align='right'><img src='images/arrow1.gif' align='bottom' style='margin-right:4px' width='5' height='6'><a href='index.html?infoid="+str3+"'onClick=ShowNews()>read more</a></p>";
		}else{
				HTMLCode="";
				xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
        		xmlDoc.async = false;
        		xmlDoc.load("db/Information.xml");
       			if(xmlDoc == null)
        		{
          			alert('您的浏览器不支持xml文件读取,于是本页面禁止您的操作,推荐使用IE5.0以上可以解决此问题!');
    				return;
        		}
		
				var childs = xmlDoc.documentElement.childNodes;
			
				for(i=0;i<childs.length;i++)
				{
					if(childs(i).getAttribute("id")==infoId)
					{
						HTMLCode += "<br><hr><span style='font-size:13px; font-family:'幼圆';'><b><blockquote>"+childs(i).childNodes(0).text+"</blockquote></b></span>";
						HTMLCode += "<p style='font-family:Verdana, Arial, Helvetica, sans-serif';><blockquote>"+childs(i).childNodes(1).text+"</blockquote></p>";
						HTMLCode += "<blockquote><p align='right'>"+childs(i).childNodes(3).text+"</p></blockquote><hr>";
					}
					else
					{
						continue;
					}
			}
			
			showNews.innerHTML = HTMLCode;
		}
	
	}
	
	