function gotoPage(page, id, type)
{
	Ajax.call('comment.php?act=gotopage', 'page=' + page + '&id=' + id + '&type=' + type, gotoPageResponse, 'GET', 'JSON');
}

function gotoPageResponse(result)
{
	document.getElementById("ECS_COMMENT").innerHTML = result.content;
}

function changeIndexGame(game)
{
	Ajax.call('ajax.php?action=indexPullGame','id=' + game, indexPullGameResponse, 'GET', 'XML');
	Ajax.call('ajax.php?action=indexGetServer','id=' + game , indexPullServersResponse, 'GET', 'XML');
	Ajax.call('ajax.php?action=indexPullQuantity','id=' + game + '&type=1' , indexPullQuantityResponse, 'GET', 'XML');
	Ajax.call('ajax.php?action=listAllProductsID','id=' + game , listAllProductsResponse, 'GET', 'XML');
	Ajax.call('ajax.php?action=indexProductsPriceServer','id=' + game , indexPriceResponse, 'GET', 'XML');

}
   function changeGame(game)
   {
   	if(game != ""){
			ajaxresponse("indexPullServers", "changegame/id/"+game);
			
//			document.getElementById("indexPullServers").innerHTML = 'sfewoifjeiowf';
//			var s = document.getElementById("indexPullServers").innerHTML;
//			alert(s);
			//document.getElementById("indexPullServers").innerHTML = 'weofjiowfjiow';
//   			Ajax.call('/changegame/id/' + game , indexPullServersResponse, 'GET', 'XML');
   	}
   }
  function changeserver(serverid)
   {
//	Ajax.call('ajax.php?action=indexProductsPriceServer','id=' + serverid , indexPullServersResponse, 'GET', 'XML');
//	alert(serverid);
//		Ajax.call('ajax.php?action=indexGetServer','id=' + serverid , indexPullServersResponse, 'GET', 'XML');
		Ajax.call('ajax.php?action=indexPullQuantity','id=' + serverid  + '&type=2' , indexPullQuantityResponse, 'GET', 'XML');
   		Ajax.call('ajax.php?action=listAllProductsID','id=' + serverid  + '&type=2'  , listAllProductsResponse, 'GET', 'XML');
   		Ajax.call('ajax.php?action=indexProductsPriceServer','id=' + serverid  + '&type=2'  , indexPriceResponse, 'GET', 'XML');
//   	ajaxresponse("indexPullQantity", "action=indexPullQantity&game="+$("IndexGameID").value+"&server="+serverid);
//   	ajaxresponse("indexPrice", "action=indexProductsPriceServer&server="+serverid);

//   	ajaxresponse("listAllProductsID", "action=listAllProductsID&server="+serverid);
   	$("ContactInfoID").style.display = '';
   }
   // 选择下拉 产品数量
   function changeqantity(products_id)
   {
   		Ajax.call('ajax.php?action=indexPrice','id=' + serverid  + '&type=2'  , indexPriceResponse, 'GET', 'XML');
   	ajaxresponse("indexPrice", "action=indexProductsPrice&products_id="+products_id);
   }
function indexPullGameResponse(result){
	var content;
	content = getXMLNote(result,'root');
	$("indexPullGame").innerHTML = content;
}
function indexPullServersaaaaResponse(result){
//	var content;
//	alert(result);
//	content = getXMLNote(result,'root');
	$("indexPullServers").innerHTML = 'content';
}

function listAllProductsResponse(result){
	var content;
	content = getXMLNote(result,'root');
	$("listAllProductsID").innerHTML = content;
//	document.getElementById("listAllProductsID").innerHTML = result.getElementsByTagName("root")[0].childNodes[0].nodeValue;
}
function indexPriceResponse(result){
	var content;
	content = getXMLNote(result,'root');
	$("indexPrice").innerHTML = content;
//	document.getElementById("indexPrice").innerHTML = result.getElementsByTagName("root")[0].childNodes[0].nodeValue;
}
function indexProductsPrice(){
	
}