//系统通用ＪＳ
//author: Jory

//系统通用变量
//系统虚拟目录的地址
var uaaSystemPath="http://www.uaa.cn/cms5root/pages/cn2";

var searchPageStrTemp=/\.page/
var pageNameStr=(window.location.href.substring(0,window.location.href.search(searchPageStrTemp))).split("\/")[(window.location.href.substring(0,window.location.href.search(searchPageStrTemp))).split("\/").length-1];

if(pageNameStr==""){
	searchPageStrTemp=/\.jsp/
	pageNameStr=(window.location.href.substring(0,window.location.href.search(searchPageStrTemp))).split("\/")[(window.location.href.substring(0,window.location.href.search(searchPageStrTemp))).split("\/").length-1];
}

//重新查询浮动窗显示
var floatZoneVsial = true;


//定义Select对象初始化数组
var selectObjArrData = new Array();


//兑现奖品库存暂缺策略
var swapScoreLack = new Array();
swapScoreLack[0] = 4;

//*****************************************************************************
//页面流程跳转及页面属性设置 开始


//奖品兑换流程定义开始
var swapPDList = 10133;
var swapPDGroupList = 12360;
var swapPDInfo = 12361;
var swapPD = 12362;



//服务栏目流程控制参数，及初始化
var pageSearchResult = "";
var pageSHSearch = "";
var pageSHInfoNum = "";
var pageYDNum = "";
var pageHYPGNum = "";
var pageTJYYDNum = "";
var xTypeStrQuery = "";


//页面属性设置初始化
var pageFWXMStr="";
var pageShowYY=true;

//美容装饰
if(pageNameStr=="tinsel"){
	pageShowYY=false;
	pageSearchResult=10815;
	pageSHSearch=10407;
	pageSHInfoNum=10408;
	pageYDNum=10410;
	pageHYPGNum=10409;
	pageTJYYDNum=10411;
	pageSHTJ=10876;
	xTypeStrQuery = "'B02'";
	pageFWXMStr="美容装饰服务项目"
}
//维修保养
else if(pageNameStr=="maintain" || pageNameStr=="insSearchList"){ 
	pageSearchResult=10814;
	pageSHSearch=10174;	
	pageSHInfoNum=10179;
	pageYDNum=10182;
	pageHYPGNum=10180;
	pageTJYYDNum=10183;
	pageSHTJ=10177;
	xTypeStrQuery = "'B03','B01'";
	pageFWXMStr="维修保养服务项目" 
}
//其它服务
else if(pageNameStr=="succor"){ 
	pageSearchResult=10816;
	pageSHSearch=10495;
	pageSHInfoNum=10496;
	pageYDNum=10498;
	pageHYPGNum=10497;
	pageTJYYDNum=10500;
	pageSHTJ=10878;
	xTypeStrQuery="'C02'";
	pageFWXMStr="其它服务项目"
	pageShowYY=false;
}
//特惠商户
else if(pageNameStr=="spserviceVendor"){ 
	pageSearchResult=10817;
	pageSHSearch=10191;
	pageSHInfoNum=10510;
	pageYDNum=10512;
	pageHYPGNum=10511;
	pageTJYYDNum=10514;
	pageSHTJ=10877; 
	xTypeStrQuery="SELECT XID FROM UAA.TVENDORTYPE WHERE XID LIKE 'D__'";
	pageShowYY=false;
}
//洗车
else if(pageNameStr=="carwash"){ 
	pageSearchResult=11762;
	pageSHSearch=11757;
	pageSHInfoNum=11763;
	pageYDNum=11764;
	pageHYPGNum=11765;
	pageTJYYDNum=10514;
	pageSHTJ=11760; 
	xTypeStrQuery="'B05'";
	pageShowYY=false;
}
//保险理赔
else if(pageNameStr=="insurance2"){ 
	pageSearchResult=11762;
	pageSHSearch=11757;
	pageSHInfoNum=11763;
	pageYDNum=12869;
	pageHYPGNum=12871;
	pageTJYYDNum=10514;
	pageSHTJ=11760; 
	xTypeStrQuery="'B05'";
	pageShowYY=true;
}



//页面流程跳转及页面属性设置 结束
//*****************************************************************************



//******************************************************************************************************************
//查询项目 开始 

//查询关键业务点类
function KeyPointClass(){
	
	//查询字段名 与数库保持一至
	this.fieldName;

	//显示字段中文名
	this.lableName;		

	//显示类别 如:文本框,下拉框
	this.showStyle = "SELECT";

	//SELECT对象的TYPE
	this.selectSize = 1;

	//SELECT对象是否需要所有选项
	this.selectNeedAll = true;

	//对象样式
	this.classStr = "";

	//文字查询按钮监听器
	this.textButtonAction = "";

	//地图查询按钮监听器
	this.mapButtonAction = "";

	//是否需要文本框的查询条件
	this.needMQuery = false;

	//连动对象
	this.dependonElement = new function(){

		//所依赖的关键业务点
		this.dependKeyPoint = -1;

		//所需查询对象库表名
		this.tableName = "";

		//所需查询的字段名
		this.fieldName = ""; 
		
		//显示字段值
		this.showFieldValue = 0;

		//显示字段字串
		this.showFieldText = 1;

		//SERVLET名称
		//this.servletName = systemPath.Vehicle_Dic;
		this.servletName = "systemPath.Vehicle_Dic";

		//WHERE条件策略
		this.wherePolicy = "";

		//SERVLET的ACTION名称
		this.actionName = "getT_dic_models_all";

		//提交对象
		this.aimFormObj = null;
	}

	//对象参数数组
	this.parmStyle = new Array();

	//对象参数类
	this.ParmStyle = function(){
		
		//参数名
		var parmName = "";

		//参数值
		var parmValue = "";
	}
}

//查询对象类
function QueryObj(){

	//Form对象
	this.aimFormObj;

	//结果BUFFER对象
	this.aimBuffer = "buffer";

	//Lable对象背景色
	this.lableBgColor = "#F8F8E7";

	//Lable字体色
	this.lableColor = "BLACK";

	//Lable对齐样式
	this.lableAlignStyle = "right";

	//Lable是否折行
	this.lableWrap = "nowrap";

	//Lable宽度
	this.lableWidth = "120";

	//边框色
	this.borderColor = "#CCCCCC";

	//字段背景色
	this.fieldBgColor ="#FFFFFF";

	//字段前景色
	this.fieldFColor ="blue";

	//字段宽度
	this.fieldWidth ="";

	//查询对象的宽度
	this.width = "100%";

	//设置查询对象列数
	this.colNum = 1;

	//地图查询
	this.mapNeed = false;

	//查询按钮文字
	this.buttonTxt = "　查询　"

	//文字查询按钮监听器
	this.textButtonAction = "onClickQueryButton";

	//地图查询按钮监听器
	this.mapButtonAction = "onClickMapQueryButton";

	//查询结果列表需要地图查询
	this.resultMapNeed = false;

	//Lable与字段是否显示于一个TD内
	// 1 -- 显示不同TD中
	// 0 -- 显示于相同TD中
	this.showLableFileType = 1;

	//查询对象描述对象  数组原素为KeyPointClass
	this.queryObj =  new Array();

	this.showQueryForm = function(showType,showElement){
		
		var i=0
		//建立结果集的TABLE对象
		resultTable = document.createElement("TABLE");
		resultTable.setAttribute("cellpadding","3");
		resultTable.setAttribute("cellspacing","1");  
		//resultTable.setAttribute("border","1");  
		resultTable.setAttribute("width",this.width); 
		resultTable.setAttribute("bgColor",this.borderColor)
		
		showQueryDic = showQueryResult[eval("Z_QUERY_" + pageNameStr.toUpperCase())];

		 
		filedCount = 0;

		for(i=0;i<showQueryDic.length;i++){

			if((typeof(showElement)!="undefined" && this.queryObj[showQueryDic[i]].showStyle == showElement) 
				|| typeof(showElement) == "undefined"){
 
				if(_9527parmIsTrue(this.queryObj[showQueryDic[i]].fieldName))
					_9527showThis = true;
				else
					_9527showThis = false;
				//如果为一列的最后一个元素,则新建一行
				if(i%this.colNum == 0)
					trObj = document.createElement("TR");
				
				//建立标签的TD对象
				tdLable = document.createElement("TD");
				tdLable.setAttribute("bgColor",this.lableBgColor);
				tdLable.setAttribute("align",this.lableAlignStyle);

				//设置TD的宽度
				tdLable.setAttribute("width",this.lableWidth);
		
				//设置TD高度
				tdLable.setAttribute("height","18");
				tdLable.innerHTML = "<font nowrap color='"+this.lableColor+"'>" + this.queryObj[showQueryDic[i]].lableName + ":</font>"

				//tdLable.setAttribute("nowrap","noWrap");

				//建立FIELD字段对象所属TD
				tdInput = document.createElement("TD");
				tdInput.setAttribute("bgColor",this.fieldBgColor);
				tdInput.setAttribute("align","left");
				tdInput.setAttribute("width",this.fieldWidth);
				tdInput.setAttribute("noWrap","noWrap")
				
				//FIELD对象类型
				inputTypeStr = "INPUT";
				if(this.queryObj[showQueryDic[i]].showStyle == "SELECT"){
					inputTypeStr = "SELECT";
				}

				//创建FIELD输入对象
				inputElement = document.createElement(inputTypeStr);
				if(this.queryObj[showQueryDic[i]].showStyle == "SELECT" && this.queryObj[showQueryDic[i]].selectNeedAll){
					inputElement.options.length = 1; 
					inputElement.options[0].text = "所有";
					inputElement.options[0].value = "";

					//alert(this.queryObj[showQueryDic[i]].selectSize)

				}
				
				if(this.queryObj[showQueryDic[i]].selectSize>1){
					inputElement.setAttribute("size",this.queryObj[showQueryDic[i]].selectSize);
					//alert("e")
				}

				inputElement.setAttribute("NAME",this.queryObj[showQueryDic[i]].fieldName);
				inputElement.setAttribute("ID",this.queryObj[showQueryDic[i]].fieldName);
				inputElement.setAttribute("TPYE",this.queryObj[showQueryDic[i]].showStyle);

				//循环添加复杂属性
				for(parmNum=0;parmNum<this.queryObj[showQueryDic[i]].parmStyle.length;parmNum++)	
					inputElement.setAttribute(this.queryObj[showQueryDic[i]].parmStyle[parmNum].parmName,this.queryObj[showQueryDic[i]].parmStyle[parmNum].parmValue);
	 
				//如果SHOWTYPE 为0 则显示上页提交此字段数据
				if(typeof(showType)!="undefined" && showType!=0){				
					//如果此属性为SELECT对象则显示_TEXT的值
					if(this.queryObj[showQueryDic[i]].showStyle == "SELECT"){	
						tdInputStr = xGetUnescapePara(this.queryObj[showQueryDic[i]].fieldName + "_TEXT");						
					}
					//否则直接显示此对象的值
					else
						tdInputStr = xGetUnescapePara(this.queryObj[showQueryDic[i]].fieldName);
					
					if(tdInputStr==""){
						tdInputStr="所有";
					}
					
					
					//如果要显示在同一TD中则
					if(this.showLableFileType == "0")
						tdLable.innerHTML += " <font color=" + this.fieldFColor + ">" + tdInputStr + "</font>";
					//如果要显示在不同TD中则
					else
						tdInput.innerHTML =  " <font color=" + this.fieldFColor + ">" + tdInputStr + "</font>";
				 

				}
				//否则添加FIELD输入对象
				else
					//添加INPUT对象
					tdInput.appendChild(inputElement);

				
				if((_9527showThis && typeof(showType)!="undefined" && showType!=0) ||  typeof(showType)=="undefined" || showType==0){
					//添加tdLable与tdInput
					trObj.appendChild(tdLable);
					
					//如果要显示在不同TD中则
					if(this.showLableFileType != "0")
						trObj.appendChild(tdInput);
				}
				
				//对此对象放入结果表中,相同对象覆盖
				resultTable.appendChild(trObj); 

				filedCount++;
			}
			
		} 

		//如果循环后所剩列数大于一,则合并TD
		tdRest = this.colNum - i%this.colNum; 
		if(tdRest>0 && this.colNum!=1 && this.showLableFileType != "0"){	 
			if(this.showLableFileType == "0")
				tdRestNum=tdRest;
			else
				tdRestNum=tdRest*2+1;

			tdInput.setAttribute("colspan",tdRestNum)
			

			trObj.appendChild(tdInput)
		}
 

		buttonTr = document.createElement("TR"); 
		buttonTd = document.createElement("TD");
		if(this.showLableFileType == "0")
			buttonTd.setAttribute("colspan",this.colNum);
		else
			buttonTd.setAttribute("colspan",this.colNum*2);

		buttonTd.setAttribute("align","center");
		buttonTd.setAttribute("bgColor",this.fieldBgColor);

		//文字查询按扭
		buttonElement = document.createElement("INPUT");
		buttonElement.setAttribute("class","button_fourText") ;
		buttonElement.setAttribute("type","button") ;
		buttonElement.setAttribute("value",this.buttonTxt) ;
		buttonElement.setAttribute("id","_buttonQuery");

		//地图查询按扭
		buttonMapElement = document.createElement("INPUT");
		buttonMapElement.setAttribute("class","button_fourText") ;
		buttonMapElement.setAttribute("type","button") ;
		buttonMapElement.setAttribute("value","地图查询") ;
		buttonMapElement.setAttribute("id","_buttonMapQuery");

		

		if(typeof(showType)!="undefined" && showType!="0"){
		
			buttonTd.innerHTML = "[ <a href='"+pageNameStr+'.page?cid='+pageSHSearch+"'>返回查询选择页</a> ]";
			//2005-10-2jjj 将此按钮功能暂时屏蔽（按照最新陆总文件内容要求）
			buttonTd.innerHTML = " ";
			//如果结果集列表中需要有地图查询功能
			//if(this.resultMapNeed){
				//buttonTd.innerHTML += "  [ <a href='javascript:showMapResult()'><b><font color=red>地图查询</font></b></a> ]"  
				buttonTd.innerHTML += " "  
				buttonTd.setAttribute("align","right");
			//}
		}
		else{
			buttonTd.appendChild(buttonElement);
			if(this.mapNeed)
				;//buttonTd.appendChild(buttonMapElement); 
		}

		buttonTr.appendChild(buttonTd);
		resultTable.appendChild(buttonTr);
 
	
		//把结果写入对象域中
		this.aimFormObj.innerHTML += resultTable.outerHTML;
 
		//对所依赖的联通对象添加动作监听器
		this.elementAttachEvent(showType,showElement); 

	}

	//对拥有连动关联的对象添加事件监听器与SERVLET 调用的方法
	this.elementAttachEvent =  function(showType,showElement){

		showQueryDic = showQueryResult[eval("Z_QUERY_" + pageNameStr.toUpperCase())];

		if(typeof(showType)!="undefined" && showType!="0") return;

		 
		eval(this.aimFormObj.name + "._buttonQuery").attachEvent("onclick",
			new Function(this.textButtonAction + "("+this.aimFormObj.name+")"));	 

		if(this.mapNeed)
			eval(this.aimFormObj.name + "._buttonMapQuery").attachEvent("onclick",
				new Function(this.mapButtonAction+"("+this.aimFormObj.name+")"));	 
 
		//对有所依赖关系的对象添加监听器与监听器处理函数
		for(i=0;i<showQueryDic.length;i++){
			
			//如果有对象与此对象关联 
			if((apendObjNum = this.hasAppendElement(showQueryDic[i]))>-1 
				&& typeof(eval(this.aimFormObj.name + "."  + this.queryObj[showQueryDic[i]].fieldName))!="undefined"){
				
				//添加ONCHANGE事件
				//添加Onchange事件时所依附对象数据提取
				eval(this.aimFormObj.name + "."  + this.queryObj[showQueryDic[i]].fieldName).attachEvent("onchange"
					,new Function("callServletForDict('"
					+this.queryObj[apendObjNum].dependonElement.servletName+"',"
					+"'"+ this.queryObj[apendObjNum].dependonElement.actionName +"',"
					+"'"+ this.queryObj[apendObjNum].dependonElement.fieldName +"',"+this.aimBuffer+",'"
					+this.queryObj[apendObjNum].dependonElement.wherePolicy + "')"));

				//alert(this.aimFormObj.name + "."  + this.queryObj[showQueryDic[i]].fieldName)
				
				//递归更新所依附对象数据的清空
				eval(this.aimFormObj.name + "."  + this.queryObj[showQueryDic[i]].fieldName).attachEvent("onchange",
					new Function("clearRelation('"+apendObjNum+"',"+this.queryObj[apendObjNum].selectNeedAll+")"));

				//添加提交Servlet后调用的方法
				document.write("<script language=javascript>" 
					+ "function on_" + this.queryObj[apendObjNum].dependonElement.actionName + "(){" 
					+ "fillArrToSelect(" + this.aimBuffer + "." + this.queryObj[apendObjNum].dependonElement.tableName.toLowerCase() 
					+ "s,"
					+ this.aimFormObj.name + "." + this.queryObj[apendObjNum].fieldName 
					+ "," + this.queryObj[apendObjNum].dependonElement.showFieldValue + "," 
					+ this.queryObj[apendObjNum].dependonElement.showFieldText + ","+this.queryObj[apendObjNum].selectNeedAll+");"
					+ "} "
					+ "<\/script>");				
 			}
		}   

		//循环FORM对象,去掉TEXT对象的回车提交功能
		for(formElementNum=0;formElementNum<this.aimFormObj.elements.length;formElementNum++){
			if(this.aimFormObj.elements[formElementNum].getAttribute("type") == "text"){
				this.aimFormObj.elements[formElementNum].attachEvent("onkeydown",new Function("if(event.keyCode==13) return false;"))
			}
		}
	}	 

	this.hasAppendElement = function(i){
		returnValue = -1; 
		for(objNum=0;objNum<this.queryObj.length;objNum++){  

			if(this.queryObj[objNum].dependonElement.dependKeyPoint==i){
				//alert(this.queryObj[objNum].fieldName)
				return objNum;
			}
		}
		return returnValue;
	}

	//得到FIELD对象的各种复杂参数
	this.getParmStr =  function (i){ 
		returnValue = "";
		for(ii=0;ii<this.queryObj[i].parmStyle.length;ii++){
			returnValue += "  " + this.queryObj[i].parmStyle[ii].parmName + "=\"" + this.queryObj[i].parmStyle[ii].parmValue + "\"";
		}
		return returnValue; 
	} 

}



function checkKeyCode(){

	if(event.keyCode==13){
		alert(event.keyCode);
		return false;
	}
	else
		return true;
}
//调用SERVSET
function callServletForDict(sevletName,actionName,fielddName,aimBuffer2,wherePolicy2){  
 
//	spBottom.innerHTML = aimBuffer2
	//_getDic3固定为地区名的Sevlet
	if(sevletName == "systemPath.Dictionary" && (wherePolicy2=="" || wherePolicy2==0)){

		callServerGet(eval(sevletName),actionName,"&where=" 
			+ "XCATALOG='地图区域编码' and xcode like '"	
			+ event.srcElement.options[event.srcElement.options.selectedIndex].value.substring(0,2) + "_'"
			+ "&orderby=XORDER");			 

	}
	else{ 

		whereStr = event.srcElement.options[event.srcElement.options.selectedIndex].value; 
		orderStr = "XID";
		if(wherePolicy2!="" && wherePolicy2!=0){ 
			//进行查询值的策略替换与执行
			wherePolicy2 = wherePolicy2.replace(/\{fieldValue\}/g,whereStr); 
			whereStr = eval(wherePolicy2); 
			
			orderStr = "XORDER";

			//return;
		}
		else{
			whereStr = fielddName+"='" + whereStr + "'"; 

		}

		callServerGet(eval(sevletName),actionName,"&where=" + whereStr + "&orderby=" + orderStr); 

		//spBottom.innerHTML = "&where=" + whereStr + "&orderby=" + orderStr
	}

	//alert(fielddName);
}


//适应深思系统的字典查询，把IN操作SQL语句改写为 or 操作
function getSplitSqlStr(strTemp,xTypeStr){
	var splitArr = xTypeStr.split(",");
	var returnValue = "";
	if(splitArr.length!=1){
		for(i=0;i<splitArr.length;i++)
			if(returnValue=="")
				returnValue += " " + strTemp + " = " + splitArr[i]
			else
				returnValue += " or " + strTemp + " = " + splitArr[i]
	}
	else
		returnValue = strTemp + " in (" + xTypeStr + ")";
	 
	return returnValue;
}


//设置SELECT对象的选中对象
function setSelected(aimObj,vType,strValue){
	if(typeof(aimObj)!="undefined"){
		for(i=0;i<aimObj.options.length;i++){
			if(vType==1 && aimObj.options[i].value == strValue) 
				aimObj.options[i].selected = true; 
			else if(aimObj.options[i].text == strValue) 
				aimObj.options[i].selected = true; 
		}
	}
}

//由于JS的监听器添加方法作用截开为全局域, 脱离对象固写死对象名.与QueryObj紧耦合,待以后更新
//清除关联对象列表
function clearRelation(objNum,selectNeedAll){
	 
	aimObj = eval("tvendorform."  + _9527QueryObj.queryObj[objNum].fieldName);

	if(typeof(aimObj)!="undefined"){
	
		aimObj.length=1;

		if(selectNeedAll){
			aimObj.options[0].value = "";
			aimObj.options[0].text = "所有";
		}
		else{
			aimObj.options[0].value = "";
			aimObj.options[0].text = "请选择";
		
		}
		//spBottom.innerHTML += _9527QueryObj.queryObj[objNum].fieldName + "<BR>"
		//alert(selectNeedAll)
		if((apendObjNum = _9527QueryObj.hasAppendElement(objNum))>-1)
			clearRelation(apendObjNum,_9527QueryObj.queryObj[apendObjNum].selectNeedAll)
	}
}

 

//建立查询对象
var _9527QueryObj = new QueryObj();


//查询配置字典
Z_FIELD_XCITY = 0;
Z_FIELD_XTRADEMARK = 1;
Z_FIELD_XBRAND = 2;
Z_FIELD_MODEL = 3;
Z_FIELD_SERVICETYPE = 4;
Z_FIELD_VENDORTYPE = 5;
Z_FIELD_AREAR = 6;
Z_FIELD_ZONE = 7;
Z_FIELD_XNAME = 8;
Z_FIELD_STREETNAME = 9;
Z_FIELD_AREARNAME = 10;
Z_FIELD_INS1 = 11;
Z_FIELD_INS2 = 12;
Z_FIELD_INS3 = 13;
Z_FIELD_OTHERSERVICE = 14;

//城市
_9527QueryObj.queryObj[Z_FIELD_XCITY] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_XCITY].fieldName = "xcity";
_9527QueryObj.queryObj[Z_FIELD_XCITY].lableName = "城市"; 
_9527QueryObj.queryObj[Z_FIELD_XCITY].parmStyle[0] = new _9527QueryObj.queryObj[0].ParmStyle();
_9527QueryObj.queryObj[Z_FIELD_XCITY].parmStyle[0].parmName = "Xdictionary";
_9527QueryObj.queryObj[Z_FIELD_XCITY].parmStyle[0].parmValue = "UAA,TDICTIONARY,XCODE,XNAME,XCATALOG='地图区域编码' AND XCODE LIKE '%00',XNAME";

//汽车生产厂家
_9527QueryObj.queryObj[Z_FIELD_XTRADEMARK] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_XTRADEMARK].fieldName = "xtrademark";
_9527QueryObj.queryObj[Z_FIELD_XTRADEMARK].lableName = "厂家或者品牌";  
_9527QueryObj.queryObj[Z_FIELD_XTRADEMARK].needMQuery = true;
_9527QueryObj.queryObj[Z_FIELD_XTRADEMARK].parmStyle[0] = new _9527QueryObj.queryObj[0].ParmStyle();
_9527QueryObj.queryObj[Z_FIELD_XTRADEMARK].parmStyle[0].parmName = "Xdictionary";
_9527QueryObj.queryObj[Z_FIELD_XTRADEMARK].parmStyle[0].parmValue = "uaa,T_DIC_TRADEMARK,XID,XID,1=1,XID";	

//汽车品牌
_9527QueryObj.queryObj[Z_FIELD_XBRAND] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_XBRAND].fieldName = "xbrand";
_9527QueryObj.queryObj[Z_FIELD_XBRAND].lableName = "汽车品牌";  
_9527QueryObj.queryObj[Z_FIELD_XBRAND].dependonElement.dependKeyPoint = Z_FIELD_XTRADEMARK;
_9527QueryObj.queryObj[Z_FIELD_XBRAND].dependonElement.tableName = 'T_DIC_SERIES';  
_9527QueryObj.queryObj[Z_FIELD_XBRAND].dependonElement.fieldName = 'XTRADEMARKID'; 
_9527QueryObj.queryObj[Z_FIELD_XBRAND].dependonElement.actionName = "getT_dic_seriess_all";
_9527QueryObj.queryObj[Z_FIELD_XBRAND].dependonElement.showFieldValue = 0;
_9527QueryObj.queryObj[Z_FIELD_XBRAND].dependonElement.showFieldText = 0;


//汽车型号
_9527QueryObj.queryObj[Z_FIELD_MODEL] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_MODEL].fieldName = "xmodel";
_9527QueryObj.queryObj[Z_FIELD_MODEL].lableName = "汽车型号";  
_9527QueryObj.queryObj[Z_FIELD_MODEL].dependonElement.dependKeyPoint = Z_FIELD_XBRAND; 
_9527QueryObj.queryObj[Z_FIELD_MODEL].dependonElement.tableName = 'T_DIC_MODEL';  
_9527QueryObj.queryObj[Z_FIELD_MODEL].dependonElement.fieldName = 'XSERIES';  

//服务商类型
_9527QueryObj.queryObj[Z_FIELD_VENDORTYPE] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_VENDORTYPE].fieldName = "xvendortype";
_9527QueryObj.queryObj[Z_FIELD_VENDORTYPE].lableName = "服务商类型";   
_9527QueryObj.queryObj[Z_FIELD_VENDORTYPE].parmStyle[0] = new _9527QueryObj.queryObj[0].ParmStyle(); 
_9527QueryObj.queryObj[Z_FIELD_VENDORTYPE].parmStyle[0].parmName = "Xdictionary";
_9527QueryObj.queryObj[Z_FIELD_VENDORTYPE].parmStyle[0].parmValue = "UAA,TVENDORTYPE,XID,XNAME," + getSplitSqlStr("XID",xTypeStrQuery) + ",xid";	

//服务项目
_9527QueryObj.queryObj[Z_FIELD_SERVICETYPE] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_SERVICETYPE].fieldName = "xservicetype";
_9527QueryObj.queryObj[Z_FIELD_SERVICETYPE].lableName = "服务项目";   
_9527QueryObj.queryObj[Z_FIELD_SERVICETYPE].parmStyle[0] = new _9527QueryObj.queryObj[0].ParmStyle();
_9527QueryObj.queryObj[Z_FIELD_SERVICETYPE].parmStyle[0].parmName = "Xdictionary";
_9527QueryObj.queryObj[Z_FIELD_SERVICETYPE].parmStyle[0].parmValue = "uaa,TDICTIONARY,xname,xname,XCATALOG='" + pageFWXMStr + "',xorder";	 
 
//服务商名称
_9527QueryObj.queryObj[Z_FIELD_XNAME] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_XNAME].fieldName = "xname";
_9527QueryObj.queryObj[Z_FIELD_XNAME].lableName = "服务商名称关键字";   
_9527QueryObj.queryObj[Z_FIELD_XNAME].showStyle = "TEXT"; 

//行政区
_9527QueryObj.queryObj[Z_FIELD_AREAR] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_AREAR].fieldName = "sZone";
_9527QueryObj.queryObj[Z_FIELD_AREAR].lableName = "行政区";   
_9527QueryObj.queryObj[Z_FIELD_AREAR].selectNeedAll = false;
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.dependKeyPoint = Z_FIELD_XCITY;
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.tableName = 'tdictionary';
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.fieldName = 'XNAME'; 
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.actionName = "getTdictionary1";
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.servletName = 'systemPath.Dictionary';   
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.wherePolicy = "\"XCATALOG=\\'地图区域编码\\' and xcode like "
						+"\\'\"+\"{fieldValue}\".substring(0,1)+\"_0\\' and xcode<>\\'{fieldValue}\\'\""
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.showFieldValue = 1;
_9527QueryObj.queryObj[Z_FIELD_AREAR].dependonElement.showFieldText = 2;
 
//地区名
_9527QueryObj.queryObj[Z_FIELD_ZONE] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_ZONE].fieldName = "sZoneName";
_9527QueryObj.queryObj[Z_FIELD_ZONE].lableName = "地区名";    
_9527QueryObj.queryObj[Z_FIELD_ZONE].selectNeedAll = false;
_9527QueryObj.queryObj[Z_FIELD_ZONE].dependonElement.dependKeyPoint = Z_FIELD_AREAR; 
_9527QueryObj.queryObj[Z_FIELD_ZONE].dependonElement.tableName = 'tdictionary';  
_9527QueryObj.queryObj[Z_FIELD_ZONE].dependonElement.fieldName = 'sZoneName';   
_9527QueryObj.queryObj[Z_FIELD_ZONE].dependonElement.servletName = 'systemPath.Dictionary';   
_9527QueryObj.queryObj[Z_FIELD_ZONE].dependonElement.actionName = 'getTdictionaryArr';  
_9527QueryObj.queryObj[Z_FIELD_ZONE].dependonElement.showFieldValue = 1;
_9527QueryObj.queryObj[Z_FIELD_ZONE].dependonElement.showFieldText = 2;


//街道名
_9527QueryObj.queryObj[Z_FIELD_STREETNAME] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_STREETNAME].fieldName = "streetName";
_9527QueryObj.queryObj[Z_FIELD_STREETNAME].lableName = "街道名";  
_9527QueryObj.queryObj[Z_FIELD_STREETNAME].showStyle = "TEXT"; 


//地区名字
_9527QueryObj.queryObj[Z_FIELD_AREARNAME] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_AREARNAME].fieldName = "areaName";
_9527QueryObj.queryObj[Z_FIELD_AREARNAME].lableName = "地区名字";  

//保险总公司
_9527QueryObj.queryObj[Z_FIELD_INS1] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_INS1].fieldName = "ins1";
_9527QueryObj.queryObj[Z_FIELD_INS1].lableName = "保险总公司";  

//保险分公司
_9527QueryObj.queryObj[Z_FIELD_INS2] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_INS2].fieldName = "ins2";
_9527QueryObj.queryObj[Z_FIELD_INS2].lableName = "保险分公司"; 


//保险支公司
_9527QueryObj.queryObj[Z_FIELD_INS3] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_INS3].fieldName = "ins3";
_9527QueryObj.queryObj[Z_FIELD_INS3].lableName = "保险支公司";  


//其它服务
_9527QueryObj.queryObj[Z_FIELD_OTHERSERVICE] = new KeyPointClass();
_9527QueryObj.queryObj[Z_FIELD_OTHERSERVICE].fieldName = "otherService";
_9527QueryObj.queryObj[Z_FIELD_OTHERSERVICE].lableName = "其它服务";  





//各栏目查询字段
Z_QUERY_MAINTAIN = 0;
Z_QUERY_TINSEL = 1;
Z_QUERY_OTHERSERVICE = 2;
Z_QUERY_SPSERVICEVENDOR = 3;
Z_QUERY_SUCCOR = 4;
Z_QUERY_CARWASH = 5;
Z_QUERY_INSSEARCHLIST = 6;

//维修保养  查询关键业务点配置
showQueryResult = new Array()
showQueryResult[Z_QUERY_MAINTAIN] = new Array()
showQueryResult[Z_QUERY_MAINTAIN][0] = Z_FIELD_XCITY;
showQueryResult[Z_QUERY_MAINTAIN][1] = Z_FIELD_AREAR;
showQueryResult[Z_QUERY_MAINTAIN][2] = Z_FIELD_ZONE;

showQueryResult[Z_QUERY_MAINTAIN][3] = Z_FIELD_XTRADEMARK;
showQueryResult[Z_QUERY_MAINTAIN][4] = Z_FIELD_XBRAND;
showQueryResult[Z_QUERY_MAINTAIN][5] = Z_FIELD_MODEL;
//showQueryResult[Z_QUERY_MAINTAIN][4] = Z_FIELD_SERVICETYPE;
showQueryResult[Z_QUERY_MAINTAIN][6] = Z_FIELD_VENDORTYPE;
showQueryResult[Z_QUERY_MAINTAIN][7] = Z_FIELD_STREETNAME; 
showQueryResult[Z_QUERY_MAINTAIN][8] = Z_FIELD_XNAME;

//美容装饰  查询关键业务点配置
showQueryResult[Z_QUERY_TINSEL] = new Array()
showQueryResult[Z_QUERY_TINSEL][0] = Z_FIELD_XCITY;
showQueryResult[Z_QUERY_TINSEL][1] = Z_FIELD_AREAR;
showQueryResult[Z_QUERY_TINSEL][2] = Z_FIELD_ZONE;
showQueryResult[Z_QUERY_TINSEL][3] = Z_FIELD_STREETNAME; 
showQueryResult[Z_QUERY_TINSEL][4] = Z_FIELD_SERVICETYPE;
showQueryResult[Z_QUERY_TINSEL][5] = Z_FIELD_XNAME;
//showQueryResult[Z_QUERY_TINSEL][5] = Z_FIELD_VENDORTYPE;
//showQueryResult[Z_QUERY_TINSEL][6] = Z_FIELD_XTRADEMARK;

//其它服务  查询关键业务点配置
showQueryResult[Z_QUERY_OTHERSERVICE] = new Array()
showQueryResult[Z_QUERY_OTHERSERVICE][0] = Z_FIELD_XCITY;
showQueryResult[Z_QUERY_OTHERSERVICE][1] = Z_FIELD_AREAR;
showQueryResult[Z_QUERY_OTHERSERVICE][2] = Z_FIELD_ZONE;
showQueryResult[Z_QUERY_OTHERSERVICE][3] = Z_FIELD_VENDORTYPE;
showQueryResult[Z_QUERY_OTHERSERVICE][4] = Z_FIELD_XNAME;
//showQueryResult[Z_QUERY_OTHERSERVICE][3] = Z_FIELD_XBRAND;
//showQueryResult[Z_QUERY_OTHERSERVICE][4] = Z_FIELD_MODEL;
//showQueryResult[Z_QUERY_OTHERSERVICE][5] = Z_FIELD_SERVICETYPE;
//showQueryResult[Z_QUERY_OTHERSERVICE][6] = Z_FIELD_XTRADEMARK;

//特惠商户  查询关键业务点配置
showQueryResult[Z_QUERY_SPSERVICEVENDOR] = new Array()
showQueryResult[Z_QUERY_SPSERVICEVENDOR][0] = Z_FIELD_XCITY;
showQueryResult[Z_QUERY_SPSERVICEVENDOR][1] = Z_FIELD_AREAR;
showQueryResult[Z_QUERY_SPSERVICEVENDOR][2] = Z_FIELD_ZONE;
showQueryResult[Z_QUERY_SPSERVICEVENDOR][3] = Z_FIELD_VENDORTYPE;
showQueryResult[Z_QUERY_SPSERVICEVENDOR][4] = Z_FIELD_XNAME;
//showQueryResult[Z_QUERY_SPSERVICEVENDOR][3] = Z_FIELD_XBRAND;
//showQueryResult[Z_QUERY_SPSERVICEVENDOR][4] = Z_FIELD_XTRADEMARK;
//showQueryResult[Z_QUERY_SPSERVICEVENDOR][5] = Z_FIELD_MODEL; 

//救援  查询关键业务点配置
showQueryResult[Z_QUERY_SUCCOR] = new Array()
showQueryResult[Z_QUERY_SUCCOR][0] = Z_FIELD_XCITY;
showQueryResult[Z_QUERY_SUCCOR][1] = Z_FIELD_XNAME;

//洗车  查询关键业务点配置
showQueryResult[Z_QUERY_CARWASH] = new Array()
showQueryResult[Z_QUERY_CARWASH][0] = Z_FIELD_XCITY;
showQueryResult[Z_QUERY_CARWASH][1] = Z_FIELD_AREAR;
showQueryResult[Z_QUERY_CARWASH][2] = Z_FIELD_ZONE;
showQueryResult[Z_QUERY_CARWASH][3] = Z_FIELD_STREETNAME;
showQueryResult[Z_QUERY_CARWASH][4] = Z_FIELD_XNAME;


//保险  查询关键业务点配置
showQueryResult[Z_QUERY_INSSEARCHLIST] = new Array()
showQueryResult[Z_QUERY_INSSEARCHLIST][0] = Z_FIELD_XCITY;
showQueryResult[Z_QUERY_INSSEARCHLIST][1] = Z_FIELD_AREAR;
showQueryResult[Z_QUERY_INSSEARCHLIST][2] = Z_FIELD_ZONE;
showQueryResult[Z_QUERY_INSSEARCHLIST][3] = Z_FIELD_STREETNAME;
showQueryResult[Z_QUERY_INSSEARCHLIST][4] = Z_FIELD_XTRADEMARK;
showQueryResult[Z_QUERY_INSSEARCHLIST][5] = Z_FIELD_XBRAND;
showQueryResult[Z_QUERY_INSSEARCHLIST][6] = Z_FIELD_SERVICETYPE;
showQueryResult[Z_QUERY_INSSEARCHLIST][7] = Z_FIELD_VENDORTYPE;
showQueryResult[Z_QUERY_INSSEARCHLIST][8] = Z_FIELD_INS1;
showQueryResult[Z_QUERY_INSSEARCHLIST][9] = Z_FIELD_INS2;
showQueryResult[Z_QUERY_INSSEARCHLIST][10] = Z_FIELD_INS3;
showQueryResult[Z_QUERY_INSSEARCHLIST][11] = Z_FIELD_OTHERSERVICE;
showQueryResult[Z_QUERY_INSSEARCHLIST][12] = Z_FIELD_XNAME; 



//查询项目 结束
//******************************************************************************************************************




//*****************************************************************************
//OrderBy初始化 开始

//通用排序字段初始化
var _orderBy = new Array();
_orderBy[0] = new Array();
_orderBy[0][0] = "xrecommend"
_orderBy[0][1] = "xprice_mark"
_orderBy[0][2] = "xquality_mark"
_orderBy[0][3] = "xtrust_mark"
_orderBy[0][4] = "xenvironment_mark"
_orderBy[0][5] = "xefficiency_mark"
_orderBy[0][6] = "xservice_mark"

//维修保养排序字段初始化
if(pageNameStr == "maintain"){
/*
	_orderBy[1] = new Array();
	_orderBy[1][0] = "xcity"; 
	_orderBy[1][1] = "xname"; 
*/
}
//美容装饰排序字段初始化
else if(pageNameStr=="tinsel"){
/*
	_orderBy[1] = new Array();
	_orderBy[1][0] = "xcity";
	_orderBy[1][1] = "xvendortype";
	_orderBy[1][2] = "xagent_brand";
	_orderBy[1][3] = "xname"; 
*/	
}
//其它舒服排序字段初始化
else if(pageNameStr=="otherservice"){
}
//特别商户排序字段初始化
else if(pageNameStr=="spservice"){
}

//OrderBy初始化 结束
//*****************************************************************************


//*****************************************************************************
//网站左侧导航链接操作,检测链接对象为当前链接时进行相应操作

//替换模版,各栏目如有特殊格式可以进行覆盖
var curLinkTemple = "<font color='#E67200'><b>{_content}</b></font>"

//操作开始
function changeCurLink(nodeElement){
	var i;
	for(i=0;i<nodeElement.childNodes.length;i++){
		aimObj=nodeElement.childNodes[i];
		if(aimObj.tagName == "A" && aimObj.href == window.location){
			aimObj.innerHTML = curLinkTemple.replace("{_content}",aimObj.innerHTML);			
		}
		changeCurLink(nodeElement.childNodes[i]);
	}
}  
 
//把数组内容添入至目标对象
function fillArrToSelect(arrObj,aimObj,showValue,showText,needAll){

	if(aimObj==null)
		return;
	if(typeof(aimObj)!="undefined"){
		
		showValueNum = 0;
		showTextNum = 1;
		startNum = 0;

		if(typeof(showValue)!="undefined"){
			showValueNum = showValue;
			showTextNum = showText;		
		}
		
		if(typeof(needAll)=="undefined")
			startNum = 1;
		
		if(typeof(arrObj) != "undefined")
			arrLength = arrObj.length;
		else
			arrLength = 0; 
		
		aimObj.length = arrLength

		if(typeof(needAll)!="undefined" && needAll){ 

			startNum = 1;
			aimObj.length = arrLength + startNum;
			aimObj.options[0].text = "所有";
			aimObj.options[0].value = ""; 

		} 

		for(arrNum=startNum;arrNum<arrLength+startNum;arrNum++){
			aimObj.options[arrNum].text = arrObj[arrNum-startNum][showTextNum];
			aimObj.options[arrNum].value = arrObj[arrNum-startNum][showValueNum];
		}

		if(aimObj.options.length>0)
			aimObj.options[0].selected = true;
	}
}

//域的HTML字串写入
//parm: zonStr	域对象
//		writeStr 域目的写入字串
function writeZoneHtmlStr(zonStr,writeStr){
	var aimObj=document.getElementById(zonStr);
	aimObj.innerHTML=writeStr;
}

//修改系统虚拟目录地址
function changeUrlFromSysPath(trObj){
	for(i=0;i<trObj.childNodes.length;i++){
		var aimObj=trObj.childNodes[i];
		for(ii=0;ii<aimObj.childNodes.length;ii++){
			if(aimObj.childNodes[ii].tagName=="A"){
				//alert(aimObj.childNodes[ii].href.toString());
				aimObj.childNodes[ii].href=uaaSystemPath+aimObj.childNodes[ii].href;
				
			}
		}	
	}
}

//取url参数
function _GXgetPara(obj,def)	
{
	var url = location + "";
	if(url.indexOf("?") <= 0)
		return (typeof(def) == "undefined") ? "" : def;
	url = url.substring(url.indexOf("?")+1);

	var allParas = url.split("&");
	var paras = new Array();
	for(var i=0; i<allParas.length;i++)
		if(allParas[i].indexOf(obj+"=")==0)
			paras[paras.length]=allParas[i].substring(allParas[i].indexOf("=")+1);
	
	if(paras.length==0)
		return (typeof(def) == "undefined") ? "" : def;
	else if(paras.length==1)
		return paras[0];
	else
		return paras;
}

//判断本页地址的查询参数(GET)是否包函所查参数
function _9527parmIsTrue(parmStr){
	queryStr = window.location.href;
	return (queryStr.indexOf(parmStr)>0)
}

//得到以SPLITSTR分划的CHECKBOXVALUE
//parm:	aimObj		操作对象
//		splitStr	划分字串
function getCheckBoxValue(aimObj,splitStr)	{
	var returnValue="";
	if(typeof(aimObj)=="string")
		aimObj=eval(aimObj);
	for(i=0;i<aimObj.length;i++){		
		if(aimObj[i].checked){
			if(returnValue=="")
				returnValue=aimObj[i].value;
			else
				returnValue+=splitStr+aimObj[i].value;
		}
	}
	return returnValue;
}
 
//建立图形化柱状图对象
function Pipe(aimObj,idStr){

	var pipeID;
	this.widthValue=1;
	var aimObj;

	this.aimObj = aimObj;
	
	//对象ＩＤ字串
	this.pipeID = idStr;

	//设置宽值
	this.setWidth=function(widthValue1){
		if(widthValue1!=0 && widthValue1!="" && !isNaN(widthValue1))
			this.widthValue=widthValue1;
	}

	//显示柱状图对象
	this.show=function(){
        /*
		var imgObj = document.createElement("img");
		var tableObj = document.createElement("table");
		var trObj =  document.createElement("tr");

		tdObj = document.createElement("td");
		imgObj.setAttribute("src","/images/pipe1.jpg");
		tdObj.appendChild(imgObj);
		trObj.appendChild(tdObj);

		imgObj = document.createElement("img");
		tdObj = document.createElement("td");
		imgObj.setAttribute("src","/images/pipe2.jpg");
		imgObj.setAttribute("width",this.widthValue*4);
		imgObj.setAttribute("height","15");
		tdObj.appendChild(imgObj);
		trObj.appendChild(tdObj);

		//alert(this.widthValue);

		imgObj = document.createElement("img");
		tdObj = document.createElement("td");
		imgObj.setAttribute("src","/images/pipe3.jpg"); 
		tdObj.appendChild(imgObj);
		trObj.appendChild(tdObj);

		tdObj = document.createElement("td");
		tdObj.innerHTML="　<font color=blue>"+Math.round(this.widthValue)+"</font>"
 
		trObj.appendChild(tdObj);
 
		tableObj.appendChild(trObj);
		tableObj.setAttribute("border","0");
		tableObj.setAttribute("cellpadding","0");
		tableObj.setAttribute("cellspacing","0"); 
		tableObj.setAttribute("height","23"); 
		//alert(tableObj.outerHTML)
		*/
		var showFixCount = (this.widthValue / 20).toFixed();
		var showHaf = false;
		var modNum = (this.widthValue % 20);
		var startFixStr = "<font color=#FF6600>★</font>　";
		var startHafStr = "<font color=#FF6600>☆</font>　";
		var resultStr = "";
		if(modNum > 5 && modNum <15){
			showHaf = true;
		}
		while(showFixCount-->0){
			resultStr += startFixStr;
		}
		if(showHaf){
			resultStr += startHafStr;
		}
		aimObj.innerHTML = resultStr;
		//sp2.innerHTML=aimObj.innerHTML
	}

}
 

//浮动窗口
//parm: theName		浮动对象
//		conterTable	浮动对象的包函对象
//		theWantTop	相对包函对象TOP
//		theWantLeft 相对包函对象LEFT
function KB_keepItInIE(theName,conterTable,theWantTop,theWantLeft) { 
	 
	 
	//得到竖滚TOP值
	theRealTop = parseInt(document.body.scrollTop) 
	theTrueTop = theWantTop + theRealTop + getAimObjTop(conterTable);
	document.all[theName].style.top = theTrueTop 
 

	//得到横滚LEFT值	
	theRealLeft = parseInt(document.body.scrollLeft) 			
	theTrueLeft = theWantLeft + theRealLeft + getAimObjLeft(conterTable);
	document.all[theName].style.left = theTrueLeft 

} 



//js解决URL传递参数解码 --只适合本项目提交单
function unescapeThis(parmStr){

	var tempStr = parmStr;	
	tempStr = filterThisStr(tempStr);
	tempStr = filterThisStr(tempStr); 
	tempStr = unescape(tempStr);
	return tempStr;

}


//js传递参数URL编码 --只适合本项目提交单
function escapeThis(parmStr){

	var tempStr = parmStr;
	tempStr = escape(parmStr)
	return tempStr;

}

//得到URL里的解码后的字串  --只适合本项目提交单
function xGetUnescapePara(parmStr){
	return unescapeThis(XgetPara(parmStr));
}

//URL的ASC码的转换
function filterThisStr(tempStr){

	var tempS = tempStr;
	tempS = tempS.replace(/%25/g,"%");
	tempS = tempS.replace(/%20/g," ");
	tempS = tempS.replace(/%21/g,"!");
	tempS = tempS.replace(/%23/g,"#");
	tempS = tempS.replace(/%24/g,"$");
	tempS = tempS.replace(/%5E/g,"^");
	tempS = tempS.replace(/%26/g,"&");
	tempS = tempS.replace(/%28/g,"(");
	tempS = tempS.replace(/%29/g,")");
	tempS = tempS.replace(/%3D/g,"=");
	tempS = tempS.replace(/%5C/g,"\\");
	tempS = tempS.replace(/%27/g,"'");

	return tempS;
}


//字串分割与替换
//aimStr	目标Str
//splitStr	分割字串
//cStr		每个元素外包函字串
//rSplitStr	结果分割字串
function RSStr(aimStr,splitStr,cStr,rSplitStr){	
	var returnStr="";
	oStrArr = aimStr.split(splitStr);	
	for(i=0;i<oStrArr.length;i++){
		if(returnStr!="")
			returnStr += rSplitStr
		returnStr += cStr + oStrArr[i] + cStr;
	}
	return returnStr;
}


//得到目标对象的LEFT值
function getAimObjLeft(aimObj){
	var leftValue=0;
	while(aimObj.tagName!="BODY"){
		leftValue += aimObj.offsetLeft;
		aimObj=aimObj.parentElement;
	}
	return leftValue;
}


//得到目标对象的TOP值
function getAimObjTop(aimObj){
	var topValue=0;
	while(aimObj.tagName!="BODY"){
		topValue += aimObj.offsetTop;
		aimObj=aimObj.parentElement;
	}
	return topValue;
}

//激变条文本输入
function writeBarWithStr(writeStr){
	document.write('<table width=100%><tr><td height=25 class=subTitle><b>　　' + writeStr + '</b></td></tr></table>');
}

//Select对象赋值
//parm:	aimObj	--操作目标对象
//		fromObj	--COPY的目标源
function copySelectObj(aimObj,fromObj){
	aimObj.length = fromObj.length;
	for(i=0;fromObj.options.length;i++){
		aimObj.options[i].value = fromObj.options[i].value;
		aimObj.options[i].text = fromObj.options[i].text;
	}
}


//字典选择对象
//parm: catalogStr  --字典CATALOG
//		otherWhere	--其它查询条件
function callDicPage(catalogStr,otherWhere,returnObj,showText){

	document.write('<a href="javascript:;" onclick="javascript:'+returnObj+'.value=(winOpenDic(\''+catalogStr+'\',\''+otherWhere+'\',\''+returnObj+'\'))">' + showText + '</a>');
	
}


//模式对话框返回值与对象绑定
function callDicSourcePage(pageSrc,aimObj){	
	returnValue = window.showModalDialog(pageSrc);
	//alert(typeof(returnValue) == "undefined")
	if(typeof(returnValue) == "undefined")returnValue = "";	
	aimObj.value = returnValue;
}


//打开字典对话
function winOpenDic(catalogStr,otherWhere){

	catalogStr = escapeThis(catalogStr);
	otherWhereStr = escapeThis(otherWhere);  

	returnValue = window.showModalDialog("/uaa/dict/selectDic.html?catalogStr="+catalogStr+"&otherWhereStr="+otherWhereStr,"winDict","status=yes,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes");
	if(returnValue == "undefined")returnValue = "";	
	return returnValue;
	
	//alert(winDict.orderBy)
	//winDict.returnObj = document.getElementByID(returnObj);
	//winDict.loadok();
}


//获取表单数据
function getFormValueUrl(formObj){ 
	var returnValue = "";
 
	for(i=0;i<formObj.elements.length;i++){
		aimObj = formObj.elements[i];
		if(aimObj.tagName == "SELECT"){
			returnValue += "&" + aimObj.name + "_TEXT=" + aimObj.value;
		}
		else if(aimObj.name!="xgid_VALUE"){
			returnValue += "&" + aimObj.name + "=" + aimObj.value;
		}
	} 
	return returnValue;
}	




//提交表单
//把SELECT对象转化为HIDDEN对象
function formTruncSelect(formObj){ 
 
	for(i=0;i<formObj.elements.length;i++){
		aimObj = formObj.elements[i];
		if(aimObj.tagName == "SELECT"){
			addFormElementForSelect(formObj,aimObj);
			aimObj.outerHTML = "";
			i--;
		}
	} 
}	



//为FORM添加对象
//	parm: formObj		form对象
//		selectObj	select对象

function addFormElementForSelect(formObj,selectObj){ 

	
	var putValue = ''; 
	var putText = ''; 
	if(selectObj.options.length>0){
		if(aimObj.selectedIndex>-1){
			putValue = selectObj.options[aimObj.selectedIndex].value;
			putText = selectObj.options[aimObj.selectedIndex].text;
		}
	}

	inputText = document.createElement("INPUT");
	inputText.setAttribute("type","hidden");
	inputText.setAttribute("name",selectObj.name);
	inputText.setAttribute("value",putValue);
	formObj.appendChild(inputText); 

	inputText = document.createElement("INPUT");
	inputText.setAttribute("type","hidden");
	inputText.setAttribute("name",selectObj.name + "_TEXT");
	inputText.setAttribute("value",putText);
	formObj.appendChild(inputText); 

	inputText = document.createElement("INPUT");
	inputText.setAttribute("type","hidden");
	inputText.setAttribute("name",selectObj.name + "_VALUE");
	inputText.setAttribute("value",putValue);
	formObj.appendChild(inputText);  

}


//对FORM对象里的ELEMENT进行ESCAPE编码
function escapeFormInputElement(formObj){
	for(i=0;i<formObj.length;i++){
		if(formObj[i].tagName == "INPUT" && (formObj[i].getAttribute("type") == "hidden" || formObj[i].getAttribute("type") == "text")){
			formObj[i].value = formObj[i].value.replace(/\'/g,"＇");
			formObj[i].value = formObj[i].value.replace(/\"/g,"＂");
			formObj[i].value = formObj[i].value.replace(/\?/g,"？"); 
			formObj[i].value = formObj[i].value.replace(/like/g,"");
			formObj[i].value = formObj[i].value.replace(/=/g,"");
			formObj[i].value = escapeThis(formObj[i].value);
		}
	}
}

//转换FORM表单
function trunctForm(_0formObj){

	//转换FORM里的SELECT ELEMENT
	formTruncSelect(_0formObj); 

	//转换FORM里INPUT对象的值,进行编码
	escapeFormInputElement(_0formObj);
}


//得到RADIO值
function getRadioValue(aimObj){
	var returnValue = "";
	for(var i=0;i<aimObj.length;i++){
		if(aimObj[i].checked){
			returnValue = aimObj[i].value;
		}
	}
	return returnValue;
}


//删除数组中对象
//parm:	indexNum	数组对象下标
Array.prototype.remove = function(indexNum){
	var tempArr = new Array();
	var counter = 0; 
	for(var i=0;i<this.length;i++){ 
		if(i!=indexNum){
			this[counter] = this[i];
			counter++;
		}
	}
	this.length = this.length - 1; 
}

//删除数组中对象
//parm:	aimObj		数组对象
//		indexNum	数组对象下标
function arrRemove(aimObj,indexNum){
	var tempArr = new Array();
	var counter = 0; 
	for(var i=0;i<aimObj.length;i++){ 
		if(i!=indexNum){
			aimObj[counter] = aimObj[i];
			counter++;
		}
	}
	aimObj.length = aimObj.length - 1; 
}

//浮动层创建
//parm:	aimObj	要浮动的对象
//		conObj	参考对象
//		leftValue	距参考对象的左距离
//		topValue	距参考对象的上距离
//		alphaValue	半透明度值
function createFloaerObj(aimObj,conObj,leftValue,topValue,alphaValue){
	
	this.aimObj = aimObj;
	this.conObj = conObj;


	//生成层对象 
	this.aimObj.outerHTML = '<div  id=' + this.aimObj.id + '_floater style="Z-INDEX: 1; LEFT: 0px; '+
		'POSITION: absolute; TOP: 0px; filter:alpha(opacity=' + alphaValue + ')">' + this.aimObj.outerHTML + '</div>' 

	//层对象
	this.floaterObj = eval(this.aimObj.id+"_floater");

	//初始化层位置
	this.floaterObj.style.left = getAimObjLeft(this.conObj) + leftValue;
	this.floaterObj.style.top = getAimObjTop(this.conObj) + topValue;
	 
	self.onError=null;
	currentX = currentY = 0; 
	whichIt = null; 
	lastScrollX = 0; lastScrollY = 0;
	NS = (document.layers) ? 1 : 0;
	IE = (document.all) ? 1: 0;
	this.heartBeat = function () {
		if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
		if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
		if(diffY != lastScrollY) {
		percent = .1 * (diffY - lastScrollY);
		if(percent > 0) percent = Math.ceil(percent);
		else percent = Math.floor(percent);
		if(IE) this.floaterObj.style.pixelTop += percent;
		if(NS) this.floaterObj.top += percent; 
		lastScrollY = lastScrollY + percent;}
		if(diffX != lastScrollX) {
			percent = .1 * (diffX - lastScrollX);
			if(percent > 0) percent = Math.ceil(percent);
			else percent = Math.floor(percent);
			if(IE) this.floaterObj.style.pixelLeft += percent;
			if(NS) this.floaterObj.left += percent;
			lastScrollX = lastScrollX + percent; 
		} 
	}
	function checkFocus(x,y) { 
		stalkerx = this.floaterObj.pageX;
		stalkery = this.floaterObj.pageY;
		stalkerwidth = this.floaterObj.clip.width;
		stalkerheight = this.floaterObj.clip.height;
		if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true;
		else return false;
	}
	this.grabIt = function(e) {
		if(IE) {
			whichIt = event.srcElement;
		 
			while (whichIt.id.indexOf(floaterObj.id) == -1) {
				whichIt = whichIt.parentElement;
				if (whichIt == null) { return true; } 
			}
			whichIt.style.pixelLeft = whichIt.offsetLeft;
			whichIt.style.pixelTop = whichIt.offsetTop;
			currentX = (event.clientX + document.body.scrollLeft);
			currentY = (event.clientY + document.body.scrollTop); 
		} 
		else { 
			window.captureEvents(Event.MOUSEMOVE);
			if(checkFocus (e.pageX,e.pageY)) { 
				whichIt = this.floaterObj;
				StalkerTouchedX = e.pageX-this.floaterObj.pageX;
				StalkerTouchedY = e.pageY-this.floaterObj.pageY;
			} 
		}
		return true; 
	}
	function moveIt(e) {
	if (whichIt == null) { return false; }
	if(IE) {
		newX = (event.clientX + document.body.scrollLeft);
		newY = (event.clientY + document.body.scrollTop);
		distanceX = (newX - currentX); distanceY = (newY - currentY);
		currentX = newX; currentY = newY;
		whichIt.style.pixelLeft += distanceX;
		whichIt.style.pixelTop += distanceY;
		if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;
		if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;
		if(whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;
		if(whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;
		event.returnValue = false;
	} else { 
	whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);
	if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;
	if(whichIt.top < 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;
	if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;
	if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;
	return false;}
	return false; }
	function dropIt() {whichIt = null;
	if(NS) window.releaseEvents (Event.MOUSEMOVE);
	return true; }
	if(NS) {window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);
	window.onmousedown = this.grabIt;
	window.onmousemove = moveIt;
	window.onmouseup = dropIt; }
	if(IE) {
	document.onmousedown = this.grabIt;
	document.onmousemove = moveIt;
	document.onmouseup = dropIt; }
	if(NS || IE) action = window.setInterval("this.heartBeat()",1);  
}



//************************************************************************************************
//DreamWeaver生成拖动层代码 开始
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01
  //Copyright 1998 Macromedia, Inc. All rights reserved.
  var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
  var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
  retVal = true; if(IE && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName); if (!curDrag) return false;
    if (!document.allLayers) { document.allLayers = new Array();
      with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
        for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
          with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
      } else {
        if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div"); 
          for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];}
        for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i]; 
    } }
    curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
    curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
    curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
    curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
    curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
    curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
    curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft; 
    if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
    curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop; 
    if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
    curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
    curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
    curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
    document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
    if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  } else {
    var theEvent = ((NS)?objName.type:event.type);
    if (theEvent == 'mousedown') {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      var maxDragZ=null; document.MM_maxZ = 0;
      for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
        var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
        if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
        var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
        if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
          var parentL=0; var parentT=0;
          if (NS6) { parentLayer = aLayer.parentNode;
            while (parentLayer != null && parentLayer.style.position) {             
              parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop);
              parentLayer = parentLayer.parentNode;
          } } else if (IE) { parentLayer = aLayer.parentElement;       
            while (parentLayer != null && parentLayer.style.position) {
              parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
              parentLayer = parentLayer.parentElement; } }
          var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
          var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
          if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
          var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
          var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
          if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
              || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
      if (curDrag) {
        document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
        curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
        curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
        if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
        MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
        document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
        if(curDrag.MM_toFront) {
          eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
          if (!curDrag.MM_dropBack) document.MM_maxZ++; }
        retVal = false; if(!NS4&&!NS6) event.returnValue = false;
    } } else if (theEvent == 'mousemove') {
      if (document.MM_curDrag) with (document.MM_curDrag) {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
        if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
        if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
        if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
        if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
        MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
        if (NS4) {left = newLeft; top = newTop;}
        else if (NS6){style.left = newLeft; style.top = newTop;}
        else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
        if (MM_dragJS) eval(MM_dragJS);
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mouseup') {
      document.onmousemove = null;
      if (NS) document.releaseEvents(Event.MOUSEMOVE);
      if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
      if (document.MM_curDrag) with (document.MM_curDrag) {
        if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
            (Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
             Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
          if (NS4) {left = MM_targL; top = MM_targT;}
          else if (NS6) {style.left = MM_targL; style.top = MM_targT;}
          else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
          MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
        if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
        if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
        retVal = false; if(!NS) event.returnValue = false; }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } return retVal;
} 

//DreamWeaver生成拖动层代码 结束
//************************************************************************************************




//**********************************************
//地区模块数据提取域 开始

//区域对象 
//( 数据获取，事件监听，事件处理 )
function AreaSelect(){
	
	//省份数据查询等级
	this.areaActionLevel = 0;

	//不同查询等级所对应的查询对象
	this.lev_1_obj = null;
	this.lev_2_obj = null;
	this.lev_3_obj = null;
	this.lev_4_obj = null;
	
	//各对象初始化值
	this.lev_1_initValue = null;
	this.lev_2_initValue = null;
	this.lev_3_initValue = null;
	this.lev_4_initValue = null;

	//是否为直辖市
	this.isZXS = false;
	this.ZXSObj = null;

	//Select对象Options值
	this.selecteColumn = "areaInfo_XMAPCODE"	//areaInfo_XMAPCODE - 地区编码字字段(地图使用); areaInfo_XID - 区域ID
	
	//动作对象如果为空结果集，显示判断
	this.displayWhenIsNull = true;

	//下拉菜单是否需要所有
	this.listNeedAll = false;

	//获取省份数据 带联动流程
	this.getProvinceInfo = function(){
		this.areaActionLevel = 0;
		callServerGet(systemPath.Dictionary,"getAreaInfo", "&xparentid=-1 or xclass='直辖市' or xclass='省份'");
	} 

	//获取区域数据 带联动流程
	this.changeProvince = function(aimObj){
		
		//获取省份值
		aimValue = aimObj.options[aimObj.options.selectedIndex].xid; 
		if(typeof(aimValue) == "undefined")
			aimValue = -1;

		//区域查询等级置为 城市
		this.areaActionLevel = 1;
		callServerGet(systemPath.Dictionary,"getAreaInfo", "&xparentid=" + aimValue);
	}

	//城市变更
	this.changeCity = function(aimObj){
	 
		//获取城市值
		aimValue = aimObj.options[aimObj.options.selectedIndex].xid; 
		if(typeof(aimValue) == "undefined")
			aimValue = -1;

		//区域查询等级置为 区名
		this.areaActionLevel = 2;  

		//调用深思自动方法
		callServerGet(systemPath.Dictionary,"getAreaInfo", "&xparentid=" + aimValue);
	}

	//区名变更
	this.changeZoneName = function(aimObj){

		//获取区名值
		aimValue = aimObj.options[aimObj.options.selectedIndex].xid; 
		if(typeof(aimValue) == "undefined")
			aimValue = 3;

		//区域查询等级置为 地区名
		this.areaActionLevel = 3;

		//调用深思自动方法
		callServerGet(systemPath.Dictionary,"getAreaInfo", "&xparentid=" + aimValue);
	} 
  
	//调用数据填冲与动作流程
	this.actionFlowForArea = function(aimObj,areaLevel){

		//如果aimObj 为空,则退出
		if(aimObj == null)
			return;

		//区域查询等级置为 区名
		this.areaActionLevel = areaLevel;
		
		//填冲数据 
		this.filldataToAreaObj(aimObj)

		//调用自动方法
		if(areaLevel != -1)
			this.callAutoActionForArea(aimObj) 
	}

	//添冲直辖市数据
	this.fillZXS = function(zxsObj,aimObj){
		aimObj.length = 1;
		aimObj.options[0].value = zxsObj.options[zxsObj.options.selectedIndex].value;
		aimObj.options[0].text = zxsObj.options[zxsObj.options.selectedIndex].text;
		aimObj.options[0].xid = zxsObj.options[zxsObj.options.selectedIndex].xid; 
	}

	//得到TR对象
	this.getTrObj = function(aimObj){
		operateObj = aimObj;
		while(operateObj.tagName != "TR") 
			operateObj = operateObj.parentElement; 
		return operateObj;
	}

	//填冲数据
	this.filldataToAreaObj = function(aimObj){
  
		//调用深思方法 填冲
		fillArrToSelect(buffer.areaInfo,aimObj,eval("buffer." + this.selecteColumn),buffer.areaInfo_XNAME,this.listNeedAll) 

		//初始化信息
		var initValue = eval("this.lev_" + this.areaActionLevel + "_initValue");
		if(initValue != null){
			for(var i=0;i<aimObj.options.length;i++){
				if(aimObj.options[i].value == initValue){
					aimObj.options[i].selected = true;
					break;
				}
			}
		}
		 
		//如果结果为空，并且显示为假
		if(buffer.areaInfo.length == 0 && !this.displayWhenIsNull)
			this.getTrObj(aimObj).style.display = "none";
		else			
			this.getTrObj(aimObj).style.display = "";
		
		//如果为直辖市则
		if(this.ZXSObj!=null 
			&& this.ZXSObj.options[this.ZXSObj.options.selectedIndex].zxs == "直辖市"
			&& this.areaActionLevel == 2){ 
			if(buffer.areaInfo.length > 0)
				buffer.areaInfo[0][buffer.areaInfo_XID] = this.ZXSObj.options[this.ZXSObj.options.selectedIndex].xid 
			this.fillZXS(this.ZXSObj,aimObj); 
			return; 
		}  
	 
		//添加副加属性 (把MAPCODE值填写到每个OPTION中)
		for(var i=0;i<aimObj.options.length;i++){
			
			//循环 Buffer 中数据, 如果有匹配的的值，进行属性值添加
			for(var ii=0;ii<buffer.areaInfo.length;ii++){
				if(aimObj.options[i].value == buffer.areaInfo[ii][eval("buffer." + this.selecteColumn)]){
					aimObj.options[i].setAttribute("xid",buffer.areaInfo[ii][buffer.areaInfo_XID])
					aimObj.options[i].setAttribute("zxs",buffer.areaInfo[ii][buffer.areaInfo_XCLASS])
				}
			} 
		}  			
	}

	//数据变更 调用自动方法
	this.callAutoActionForArea = function(){

		var currentAimObj = eval("this.lev_" + this.areaActionLevel +"_obj");

		if(currentAimObj!=null){

			if(currentAimObj.options.length>0){
				parentID = currentAimObj.options[currentAimObj.options.selectedIndex].xid;
				if(parentID == "")
					parentID = -1;
			}
			else
				parentID = -1; 
			
			callServerGet(systemPath.Dictionary,"getAreaInfo", "&xparentid=" + parentID);
		}
	}   

	//得到迭带等级
	this.getIteLevel = function(levelNum){
		if(eval("this.lev_" + levelNum +"_obj")!=null)
			iterLevel = levelNum;
		else
			iterLevel = -1; 
		return iterLevel;
	}

	//得到区域信息时
	this.on_getAreaInfo = function(){  
		//如果获取的是 省份
		if(this.areaActionLevel == 0){	 
			this.listNeedAll = false;	//不需要所有
			this.actionFlowForArea(this.lev_1_obj,this.getIteLevel(1));			//调用省份数据填冲工作流 并 区域查询等级置为 城市
		}
		//如果获取的是 城市
		else if(this.areaActionLevel == 1){	
			this.listNeedAll = false;	//不需要所有
			this.actionFlowForArea(this.lev_2_obj,this.getIteLevel(2));			//调用地区数据填冲工作流 并 区域查询等级置为 区名
		}
		//如果获取的是 区名
		else if(this.areaActionLevel == 2){
			this.listNeedAll = false;	//不需要所有 
			this.actionFlowForArea(this.lev_3_obj,this.getIteLevel(3));			//调用地区数据填冲工作流 并 区域查询等级置为 地区名
		}
		//如果获取的是 地区名
		else if(this.areaActionLevel == 3){
			this.listNeedAll = false;	//需要所有
			this.actionFlowForArea(this.lev_4_obj,this.getIteLevel(4));		//调用地区数据填冲工作流 并 区域查询等级置为 完结
		}
	} 
}


//地区模块数据提取域 结束
//**********************************************