﻿var contentDiv = document.getElementById("for_content");
var dateDiv = document.getElementById("for_date");

initAll();

function initAll(){
	initGameList();
	
}

function initGameList(){
	contentDiv.innerHTML = '';
	$.ajax({
		type: "POST",
		url: GAME_UPD_LIST,
		dataType: "xml",
		success: function(list){
			if(list){
				var rows = transXmlToObj(list);
				var str = '';
				str += '<table cellspacing="0" cellpadding="2" width="640">';
				str += '<tbody> <tr> '
				str += '<td class="bottom1" style="width: 180px">&nbsp;&nbsp; 游戏名称</td> ';
				str += '<td class="bottom1" width="75">类别</td>';
				str += '<td class="bottom1" width="75">游戏大小</td>';
				str += '<td class="bottom1" width="50">更新时间</td>';
				
				str += '<td class="bottom1" width="20"> </td> ' ;
				
				str += '<td class="bottom1" style="width: 180px"> &nbsp;&nbsp; 游戏名称 </td> ' ;
				str += '<td class="bottom1" width="75">类别</td>';
				str += '<td class="bottom1" width="75">游戏大小</td>';
				str += '<td class="bottom1" width="50"> 更新时间 </td> </tr>';
				for(var i=0;i<rows.length;i++){
					try{
						var cell = rows[i].cell;
						str += ' <tr>';
						
						str += ' <td class="bottom"><img src="images/ico_04.gif" border="0" />';
						str += '<a target="_about" href="' + cell.url + '">';
						str += fmtGameName(cell.gameName) + '&nbsp;';
						str += '</a></td>';
						
						str += '<td class="bottom">';
						str += cell.pkgClass?cell.pkgClass:'&nbsp;' + '</td>';
						str += '<td class="bottom">';
						str += cell.pkgKbytes?cell.pkgKbytes:'&nbsp;' + '</td>';
						
						str += '<td class="bottom">';
						str += '<font color="#FF9200">' + cell.modifyTime + '</font></td>';
						
						str += '<td width="40" class="bottom"></td>';
						
						if(rows[++i]){
							cell = rows[i].cell;
							str += ' <td class="bottom"><img src="images/ico_04.gif" border="0" />';
							str += '<a target="_about" href="' + cell.url + '">';
							str += fmtGameName(cell.gameName) + '&nbsp;';
							str += '</a></td>';
							
							str += '<td class="bottom">';
							str += cell.pkgClass?cell.pkgClass:'&nbsp;' + '</td>';
							str += '<td class="bottom">';
							str += cell.pkgKbytes?cell.pkgKbytes:'&nbsp;' + '</td>';
							
							str += '<td class="bottom">';
							str += '<font color="#FF9200">' + cell.modifyTime + '</font></td>';
						}
						
						str += '</tr>';
					}catch(e){
					}
				}
				str += '</tbody> </table> </li> </ul>';
				contentDiv.innerHTML = str;
			}else{
			};
	 	 }
	});
}

/**
<table cellspacing="0" cellpadding="2" width="640">
	<tbody>
		<tr>
			<td class="bottom1" style="width: 155px">
				&nbsp;&nbsp; 游戏名称
			</td>
			<td class="bottom1" width="50">
				更新时间
			</td>
			<td class="bottom1" width="40">
			</td>
			<td class="bottom1" style="width: 155px">
				&nbsp;&nbsp; 游戏名称
			</td>
			<td class="bottom1" width="50">
				更新时间
			</td>
		</tr>
		<tr>
			<td width="155" class="bottom">
				<img src="images/ico_04.gif" border="0" />
				<a target="_about" href="http://www.huaxia2.com/main.html">
					华夏Ⅱonline </a>
			</td>
			<td width="50" class="bottom">
				<font color="#FF9200">15:05:29</font>
			</td>
			<td width="40" class="bottom">
			</td>
			<td width="155" class="bottom">
				<img src="images/ico_04.gif" border="0" />
				<a target="_about" href="http://tank.moliyo.com/"> 宝贝坦克 </a>
			</td>
			<td width="50" class="bottom">
				<font color="#FF9200">14:51:14</font>
			</td>
		</tr>
	</tbody>
</table>
**/