/** javascript 參數執行函式
 *  javascript parameter execution function
 *
 *	data:Set object array
 *	[
 *		{
 *			id:html attribute id string(Optional)
 *			type:execute type
 *				(even/odd/first/last/clset/find/not/filter/eq/
 *				 hide/show/focus/select/click/change/scivw/
 *				 remove/empty/trgr/trgrhr/val/html/
 *				 append/before/after/addcls/rmvcls/css/
 *				 attr/prop/insbfe/insafr/
 *				 eval/log/msg/locatn/winopn/ajax)
 *			estr:search string or print string or html attribute id string or
 *				 execute string or csweb ajax type(get/post/file)
 *			vstr:attribute string or set html id array or window open parameters or
 *				 csweb ajax pary object(csweb_ajax_basic)
 *		}
 *	]
 *	tobj:$(this)
 */
function csweb_ajax_jqenge(data, tobj){
	if(!isck_ARRAY(data) && !isck_OBJECT(data)) return;
	if(isck_OBJECT(data)) data = [data];
	var tid = null,
		ck0ary = ['even','odd','first','last','clset',
				  'find','not','filter','eq','rmnull',
				  'hide','show','focus','select','click',
				  'change','scivw','remove','empty','trgr',
				  'trgrhr','val','html','append','before',
				  'after','addcls','rmvcls','css','attr',
				  'prop','insbfe','insafr',
				  'eval','log','msg','locatn','winopn',
				  'ajax'],
		ck1ary = ['even','odd','first','last','clset',
				  'find','not','filter','eq','rmnull'],
		ck2ary = ['hide','show','focus','select','click',
				  'change','scivw','remove','empty','trgr',
				  'trgrhr','val','html','append','before',
				  'after','addcls','rmvcls','css','attr',
				  'prop','insbfe','insafr'],
		ck3ary = ['eval','log','msg','locatn','winopn',
				  'ajax'];
	for(var i = 0; i < data.length; i++){
		if((!data[i].type) || ck0ary.indexOf(data[i].type) == -1) continue;
		if(isck_STRING(data[i].id,'Y')){
			if(data[i].id == 'this' && (tobj)) tid = tobj;
			else if($(data[i].id).length > 0) tid = $(data[i].id);
		}
		if(ck1ary.indexOf(data[i].type) != -1){
			if(!tid) continue;
			try{
				tid = csweb_ajax_jqenge_tid(
						  tid,
						  data[i].type,
						  ((isck_STRING(data[i].estr)) ? data[i].estr : null)
					  );
			}catch(e){
				console.log('error:'+e+'('+i.toString()+')');
			}
		}else if(ck2ary.indexOf(data[i].type) != -1){
			if(!tid) continue;
			try{
				csweb_ajax_jqenge_act(
					tid,
					data[i].type,
					((isck_STRING(data[i].estr)) ? data[i].estr : null),
					(((data[i].vstr) || data[i].vstr == 0) ? data[i].vstr : null),
					tobj
				);
			}catch(e){
				console.log('error:'+e+'('+i.toString()+')');
			}
		}else if(ck3ary.indexOf(data[i].type) != -1){
			try{
				csweb_ajax_jqenge_new(
					data[i].type,
					((isck_STRING(data[i].estr)) ? data[i].estr : null),
					(((data[i].vstr) || data[i].vstr == 0) ? data[i].vstr : null),
					tobj
				);
			}catch(e){
				console.log('error:'+e+'('+i.toString()+')');
			}
		}
	}
}