﻿requestAjax = new function()
{
	this._serviceUrl = "Server.asp";
	var rnd = Math.random();

	//解决回调函数中，this引用无效的问题
	this.bind = function(instance, method)
	{
		return function()
		{
			method.apply(instance, arguments);
		}
	}
	this.getProduct = function(id,page,skey,stype)//获取问题分类列表
	{
		rnd++;
		Request.sendGET(this._serviceUrl + "?action=product&id=" + id + "&page=" + page + "&skey=" + skey + "&stype=" + stype + "&session=" + rnd,this.bind(this, this._getProductCallback),null,null,null);
	}
	this._getProductCallback = function(req)//获取问题分类列表后的回调函数
	{
	    $("product").innerHTML=req.responseText;//显示问题分类列表
	}
}
