orderID = 0;
	function SelectFrame(){
		this.SelectNowFalg = true;
	}
	
	SelectFrame.prototype.showResult = function(){
		var keyWord = $('KeyWordInput').value;
		if(keyWord == '' || keyWord == '名称/拼音/代码'){
			this.hideFrame();
			return;
		}
		richer.dtp.getData('http://quotes.fund.163.com/search4ajax.jsp?t=fund&q='+keyWord,{
			callback:function(vvv) {
				var arr = vvv.replace(/\s*/,'').split('|');
				var hc = '<ul class="_ul">';
				orderID = 0;
				for(var i=0;i<arr.length-1;i++){
					var arr_ = arr[i].split(';');
					if((parseInt(arr_[2])>0 && parseInt(arr_[2])<5) || parseInt(arr_[2]) ==6 || parseInt(arr_[2]) ==9){
						hc += '<li class="_ul_li" id="_li_element_'+orderID+'" code="'+arr_[0]+'" style="background:#EDF6FE" onmouseover=serachUtil.focus(this); onmouseout=serachUtil.blur(this);><div class="leftDiv"><input type="checkBox" value="'+arr_[0]+'" name="selectOne" id="selectThisID_'+orderID+'" /></div><div class="centerDiv" onclick="serachUtil.select(\''+arr_[0]+'\');"><a href="javascript:void(0)" target="_self">'+arr_[1]+'</a></div><div class="rightDiv" onclick="serachUtil.select(\''+arr_[0]+'\');"><a href="javascript:void(0)" target="_self">'+arr_[0]+'</a></div><div class="clear"></div></li>';
						orderID++;
					}
				}
				
				hc += '</ul>';
				$('resultListDiv').innerHTML = hc;
				$('resultListDiv').style.display = 'block';
			}
		});
	}
	
	SelectFrame.prototype.select = function(arg){
		this.SelectNowFalg = false;
		window.open("http://quotes.fund.163.com/fundDetail.html?code="+arg);
	}
	
	SelectFrame.prototype.FrameFocus = function(){
		if($('KeyWordInput').value == '名称/拼音/代码'){
			$('KeyWordInput').value = '';
		}
	}
	
	SelectFrame.prototype.FrameBlur = function(){
		if($('KeyWordInput').value == ''){
			$('KeyWordInput').value = '名称/拼音/代码';
		}
	}
	
	SelectFrame.prototype.focus = function(arg){
		this.SelectNowFalg = true;
		arg.style.background = "#D18BD0";
	}
	
	SelectFrame.prototype.blur = function(arg){
		arg.style.background = "#EDF6FE";
		this.SelectNowFalg = false;
	}
	
	SelectFrame.prototype.hideFrame = function(){
		if(this.SelectNowFalg == true){
		}else{
			$('resultListDiv').style.display = 'none';
		}
	}
	
	SelectFrame.prototype.submitAllSelect = function(){
		for(var i=0;i<orderID;i++){
			var obj = $('selectThisID_'+i);
			if(obj){
				if(obj.checked == true){
					window.open("http://quotes.fund.163.com/fundDetail.html?code="+obj.value);
				}
			}
		}
	}
	
	SelectFrame.prototype.initSelect = function(){
		document.write('<div class="vertical-align: bottom;width:220px;float:left;position:relative;"><br><input id="KeyWordInput" onfocus="serachUtil.FrameFocus();" onblur="serachUtil.FrameBlur();" type="text" class="keyWordInput" value="名称/拼音/代码">');
		document.write('<input type="button" onclick="serachUtil.submitAllSelect();" value="搜索" style="width:40px;"></div>');
	}
var serachUtil = new SelectFrame();