
function PaiPaiSystemClass (_ClassType)
{
	this.SC = PaiPai_SystemClass,
	this.ClassType = _ClassType ,//顶级
	this.BigClass = 0,
	this.SubClass =0,
	
	this.Fill = function(Select_Id,DefaultValue)//填充下拉框
	{
		var _this = this;
		var s = "";
		var i = 0;
		var data = null;
		var data_2 = null;
		s +='<option value="0">请选择</option>\r\n';
		for( var i in _this.SC)
		{
			data = _this.SC[i];
			if(_this.SC[i]["ClassType"]==_this.ClassType)
			{
				data = _this.SC[i]["BigClass"];
				for( var j in data)
				{
					data_2 = data[j];
					s +='<option value="'+ data_2["Id"] +'"';
					if(data_2["Id"]==DefaultValue) s +=' selected ';
					s +='>'+ data_2["Name"] +'</option>\r\n';
					
				}
			}
		}
		jQuery("#"+Select_Id).html(s);
	},
	this.Fill_Sub = function (Select_Id,BigClassId,DefaultValue)
	{
		var _this = this;
		var s = "";
		var i = 0;
		var data = null;
		var data_2 = null;
		var data_3 = null;
		
		
		s +='<option value="0">请选择</option>\r\n';
		
		for( var i in _this.SC)
		{
			data = _this.SC[i];
			if(_this.SC[i]["ClassType"]==_this.ClassType)
			{
				data = _this.SC[i]["BigClass"];
				for( var j in data)
				{
					if(data[j].Id==BigClassId)
					{
						data_2 = data[j]["SubClass"];
						
						for( var k in data_2)
						{
							data_3 = data_2[k];
							s +='<option value="'+ data_3["Id"] +'"';
							if(data_3["Id"]==DefaultValue) s +=' selected ';
							s +='>'+ data_3["Name"] +'</option>\r\n';
						}
					}
					
				}
			}
		}
		jQuery("#"+Select_Id).html(s);
	}
}