/**
	 *参数含义及作用：主要用于一个标签影响一个标签的情况
	 *srcObj:代表标签本身；
	 *actionUrl:代表要进行ajax交互的action
	 * targetObjId:ajax相应后，影响到的目标select的id,也就是说要级连的标签的id；
	 * mapKey:在action中定义ｍａｐ时用到的ｋｅｙ；
	 *blankString:在首行要显示的字符；
	 */ 
	function processSelect(srcObj,action,targetObjId,mapKey,blankString)
	{
		options={
	  		needBlank:true,	//是否需要在首行添加一个空白选项,default:false
	  		blankOption: blankString,	//如果需要空白选项空白选项的显示文字,default:"-"
	  		valueKey:"id",		//value对应的对象属性名,default:"id"
	  		textKey:"name",		//text对应的对象属性名,default:"name"
	  		isMap:false 		//在Json对象中存储的是对象列表还是Map格式(不需要设置valueKey和textKey).default:对象列表
	 };
		var targetObj=document.getElementById(targetObjId);
		var deferred = top.dojo.xhrGet(
		{
			url: action,
			preventCache:true,
			handleAs: 'json-comment-optional',
			load: function(jsonResult,ioArgs)
			{	
				if(typeof jsonResult!=="object"||!ioArgs.xhr.getResponseHeader("Content-Type").include("json"))
				{
					return;
				}
				top.buptnu.html.Select.loadData(jsonResult.dataMap[mapKey],targetObj,options);
			}
		});
	}
	/**
	 *参数含义及作用：主要用于一个标签影响两个标签的情况；
	 *actionUrl:代表要进行ajax交互的action
	 * oneParamter及twoParamter以json形式书写，包括如下项：
	 * targetObjId:ajax相应后，影响到的目标select的id,也就是说要级连的标签的id；
	 * mapKey:在action中定义ｍａｐ时用到的ｋｅｙ；
	 *blankString:在首行要显示的字符；
	 * 例如：
	 * oneParamter={
	 *    mapKey:"test";
	 *    targetObj:"id";
	 *    blankString:"请输入";
	 * }
	 */ 
	 	function processeActionSelect(action,oneParamter)//action可以自定义
	{
		options={
	  		needBlank:true,	//是否需要在首行添加一个空白选项,default:false
	  		blankOption: "",	//如果需要空白选项空白选项的显示文字,default:"-"
	  		valueKey:"id",		//value对应的对象属性名,default:"id"
	  		textKey:"name",		//text对应的对象属性名,default:"name"
	  		isMap:false 		//在Json对象中存储的是对象列表还是Map格式(不需要设置valueKey和textKey).default:对象列表
	 	};
		var deferred = top.dojo.xhrGet(
		{
			url: action,
			preventCache:true,
			handleAs: 'json-comment-optional',
			load: function(jsonResult,ioArgs)
			{
				
				if(typeof jsonResult!=="object"||!ioArgs.xhr.getResponseHeader("Content-Type").include("json"))
				{
					return;
				}
				if(jsonResult.dataMap[oneParamter.mapKey]=="specialfalse")
				{
					alert("该中心此招生计划没有这个专业");
				}
				else{
				options.blankOption=oneParamter.blankString;
				top.buptnu.html.Select.loadData(jsonResult.dataMap[oneParamter.mapKey],document.getElementById(oneParamter.targetObj),options);
				}
			}
		});
	}
	 
	function processDupSelect(action,oneParamter,twoParamter)
	{
		options={
	  		needBlank:true,	//是否需要在首行添加一个空白选项,default:false
	  		blankOption: "",	//如果需要空白选项空白选项的显示文字,default:"-"
	  		valueKey:"id",		//value对应的对象属性名,default:"id"
	  		textKey:"name",		//text对应的对象属性名,default:"name"
	  		isMap:false 		//在Json对象中存储的是对象列表还是Map格式(不需要设置valueKey和textKey).default:对象列表
	 	};
		var deferred = top.dojo.xhrGet(
		{
			url: action,
			preventCache:true,
			handleAs: 'json-comment-optional',
			load: function(jsonResult,ioArgs)
			{
				if(typeof jsonResult!=="object"||!ioArgs.xhr.getResponseHeader("Content-Type").include("json"))
				{
					return;
				}
				options.blankOption=oneParamter.blankString;
				top.buptnu.html.Select.loadData(jsonResult.dataMap[oneParamter.mapKey],document.getElementById(oneParamter.targetObj),options);
				options.blankOption=twoParamter.blankString;
				top.buptnu.html.Select.loadData(jsonResult.dataMap[twoParamter.mapKey],document.getElementById(twoParamter.targetObj),options);
				
			}
		});
	}
	
	function processThreeSelect(action,oneParamter,twoParamter,threeParamter)
	{
		options={
	  		needBlank:true,	//是否需要在首行添加一个空白选项,default:false
	  		blankOption: "",	//如果需要空白选项空白选项的显示文字,default:"-"
	  		valueKey:"id",		//value对应的对象属性名,default:"id"
	  		textKey:"name",		//text对应的对象属性名,default:"name"
	  		isMap:false 		//在Json对象中存储的是对象列表还是Map格式(不需要设置valueKey和textKey).default:对象列表
	 	};
		var deferred = top.dojo.xhrGet(
		{
			url: action,
			preventCache:true,
			handleAs: 'json-comment-optional',
			load: function(jsonResult,ioArgs)
			{
				if(typeof jsonResult!=="object"||!ioArgs.xhr.getResponseHeader("Content-Type").include("json"))
				{
					return;
				}
				options.blankOption=oneParamter.blankString;
				top.buptnu.html.Select.loadData(jsonResult.dataMap[oneParamter.mapKey],document.getElementById(oneParamter.targetObj),options);
				options.blankOption=twoParamter.blankString;
				top.buptnu.html.Select.loadData(jsonResult.dataMap[twoParamter.mapKey],document.getElementById(twoParamter.targetObj),options);
				options.blankOption=threeParamter.blankString;
				top.buptnu.html.Select.loadData(jsonResult.dataMap[threeParamter.mapKey],document.getElementById(threeParamter.targetObj),options);
			}
		});
	}
