/*------------------------------------------------------------------------------------------
server.ajax.js
da peng
dp165137419@163.com
------------------------------------------------------------------------------------------*/



function ServerHandle(strRequestUrl, jsonMode) {
	  if (jsonMode['productId'] == undefined) return false;
		var productId = parseInt(jsonMode['productId']);
		var sendData = '';
		if (isNaN(productId)) return false;
		if (jsonMode['serverType'] != undefined) {
		    var serverType = parseInt(jsonMode['serverType']);
				if (isNaN(serverType) || serverType == 0) {
				    sendData = {'productId':productId};
				} else {
					  sendData = {'productId':productId, 'serverType':serverType};
				}
		} else {
			  sendData = {'productId':productId};
		}
		var htmlServerId = jsonMode['htmlServerId'] == undefined ? '#salesServer' : jsonMode['htmlServerId'];
		
		
		
		$.ajax({
        type: 'POST', 
				url: strRequestUrl, 
				data: sendData, 
				dataType: 'html', 
				error: function (a, b) {
				    alert(b);
				}, 
				success: function (data) {
						$(htmlServerId).html(data);
				}
		});
}
