
				

function changeImg(id,type){
	var xmlhttp=false;
				if(window.XMLHttpRequest) 
				{ 
					xmlhttp = new XMLHttpRequest();
					if (xmlhttp.overrideMimeType) 
					{
						xmlhttp.overrideMimeType("text/xml");
					}
				}
				else if (window.ActiveXObject) {
					try{
						xmlhttp=new ActiveXObject("microsoft.xmlhttp");
					}
					catch(e){
						xmlhttp=new ActiveXObject("MsXml2.XmlHttp") ;
					}
				}
	xmlhttp.onreadystatechange=function()
			{
				if(4==xmlhttp.readyState)
				{	
					if(200==xmlhttp.status)
					{
						var strret=xmlhttp.responseText;
						document.getElementById(type).innerHTML=strret;
					}
				}
			}
	var url="Ajax/initImage.cfm?id="+id+"&type="+type;
	xmlhttp.open('GET',url,false);
	xmlhttp.send(null);
	
}



function initNews(gameid){
	var xmlhttp=false;
				if(window.XMLHttpRequest) 
				{ 
					xmlhttp = new XMLHttpRequest();
					if (xmlhttp.overrideMimeType) 
					{
						xmlhttp.overrideMimeType("text/xml");
					}
				}
				else if (window.ActiveXObject) {
					try{
						xmlhttp=new ActiveXObject("microsoft.xmlhttp");
					}
					catch(e){
						xmlhttp=new ActiveXObject("MsXml2.XmlHttp") ;
					}
				}
	xmlhttp.onreadystatechange=function()
			{
				if(4==xmlhttp.readyState)
				{	
					if(200==xmlhttp.status)
					{
							var strret=xmlhttp.responseText;
				
					//document.getElementById('divnews').innerHTML=strret;
					//var arrayNews=strret.split("@");
//					strret="<p><span style='font-size:17px; font-weight:bold;'>"+arrayNews[0]+"</span><br>"+arrayNews[1]+"</p>";
					document.getElementById('divnews').innerHTML=strret;
					}
				}
			}
			
	var url="Ajax/initNews.cfm?gameid="+gameid;
	//alert(url+"---new");
	xmlhttp.open('GET',url,false);
	xmlhttp.send(null);

}



//<!---产品select--->
		function initSelectProduct(action,serverid){
			var xmlhttp=false;
				if(window.XMLHttpRequest) 
				{ 
					xmlhttp = new XMLHttpRequest();
					if (xmlhttp.overrideMimeType) 
					{
						xmlhttp.overrideMimeType("text/xml");
					}
				}
				else if (window.ActiveXObject) {
					try{
						xmlhttp=new ActiveXObject("microsoft.xmlhttp");
					}
					catch(e){
						xmlhttp=new ActiveXObject("MsXml2.XmlHttp") ;
					}
				}

				var url="/Ajax/initSelect.cfm?action=product&serverid="+serverid+"&id="+document.getElementById("GameNameListID").value;
				
				
				while(document.getElementById("ProductNameListID").options.length>0)
				{
					document.getElementById("ProductNameListID").remove(0)
				}		
				var opt=document.createElement("OPTION");
						opt.text="---Loading...---";
						opt.value="0";
						document.getElementById("ProductNameListID").options.add(opt);
						opt.selected=true;
			xmlhttp.onreadystatechange=function()
			{
				if(4==xmlhttp.readyState)
				{	
					if(200==xmlhttp.status)
					{
				/*var strret="";
				
							var front="<select name='ProductNameListID' id='ProductNameListID' style=' background-color:#FFFFCC; width:250px; font-size:12px; color:#333333; font-family:Tahoma; height:20px;'><option value='0'>--- Please select ---</option>";
							var bak="</select>";
							strret=front+xmlhttp.responseText+bak;
							document.getElementById("product").innerHTML=strret;
							
							}*/

					document.getElementById("ProductNameListID").remove(0);

							
						var str=xmlhttp.responseText;
						document.getElementById("ProductNameListID").selectedIndex=-1;
						var rightstr=str.split("$$$");
						var arrayStr=rightstr[0].split("|");
						var i;
						var opt=document.createElement("OPTION");
						opt.text="---Please select your Quantity---";
						opt.value="0";
						document.getElementById("ProductNameListID").options.add(opt);
						opt.selected=true;
						if(arrayStr.length-1>0)
						{
							for(i=0;i<arrayStr.length-1;i++)
							{
								var arrayName=new Array(1);
								arrayName=arrayStr[i].split("@");
								var opt=document.createElement("OPTION");
								opt.text=arrayName[1];
								opt.value=arrayName[0];
								document.getElementById("ProductNameListID").options.add(opt);
							}
						}
					
				
			//var url="Ajax/initSelect.cfm?action="+"product"+"&serverid="+serverid+"&id="+document.getElementById("GameNameListID").value;
			
			//var url="Ajax/getProductList.cfm?";
			
			
			
			}
			}
			
		}
		xmlhttp.open('GET',url,true);
			xmlhttp.send(null);
}
		
		
		
		
		
	//	<!---载入新闻列表--->
function initNewsList(gameid){
	var xmlhttp=false;
	var url="Ajax/initNewsList.cfm?gameid="+gameid;
	if(window.XMLHttpRequest) 
				{ 
					xmlhttp = new XMLHttpRequest();
					if (xmlhttp.overrideMimeType) 
					{
						xmlhttp.overrideMimeType("text/xml");
					}
				}
				else if (window.ActiveXObject) 
				{
					try{
						xmlhttp=new ActiveXObject("microsoft.xmlhttp");
					}
					catch(e){
						xmlhttp=new ActiveXObject("MsXml2.XmlHttp") ;
					}
				}
	xmlhttp.onreadystatechange=function()
			{

				if(4==xmlhttp.readyState)
				{	
					if(200==xmlhttp.status)
					{
							var strret=xmlhttp.responseText;
							document.getElementById('divnewslist').innerHTML=strret;
					
					}
				}
			}
	xmlhttp.open('GET',url,true);
	xmlhttp.send(null);


}


/*function changeGame(id){
	
	
		xmlhttp.onreadystatechange=function()
			{
				if(4==xmlhttp.readyState)
				{	
					if(200==xmlhttp.status)
					{
						
				}
			}
				var strret;
			var url="Ajax/initSelect.cfm?action="+"game"+"&id="+id;
						xmlhttp.open('GET',url,false);
						xmlhttp.send(null);
						
						var front="<select name='GameNameListID' id='GameNameListID' style=' background-color:#FFFFCC; width:250px; font-size:12px; color:#333333; font-family:Tahoma; height:20px;' onchange='initSelect(this.value,\"server\",\"server\")'>";
						var bak="</select>";
						strret=front+xmlhttp.responseText+bak;
						document.getElementById('game').innerHTML=strret;
						initSelect(id,'server','Server');
						initSelectProduct("product",document.getElementsByName("ServerNameListID")[0].value);
		}*/