tmhSelect = { 
    //主调函数 
    //参数含义：容器，名称，数据[数组]，默认项，宽度，动作(目标函数不能带参) 
    show : function(obj,selectName,dataObj,selOption,width,action,height){ 
        var data = dataObj.data; 
		height = height?height:'25';
        var _Obj = document.getElementById(obj); 
        if(!_Obj || typeof(_Obj) == "undefined"){return false;} 
        var s1 = document.createElement("div"); 
        if(isNaN(width) || width==""){width=150;}else if(width<26){width=26;} 
        s1.style.width = width; 
        s1.onmouseleave = function(){
				setTimeout(function(){
					tmhSelect.hidden(selectName);
					},200);				
			}; 
        var str = ""; 
        //判断是否有数据 
        if(data.length > 0){ 
            //有数据时显示数据选项列表 
            str += "<input type='hidden' name='"+ selectName +"' id='"+ selectName +"' value='"+ tmhSelect.relv(selOption,data) +"'>"; 
            str += "<div id='_a_"+ selectName +"' style='width:"+ width +"px;height:"+height+"px; border:1px #DDDDDD solid;' >"; 
            str += "<div id='_v_"+ selectName +"' style='position:relative;float:left;left:2px;width:"+ (width-22) +"px;height:18px;font-size:12px;overflow:auto;line-height:18px;' onclick=\"tmhSelect.showOptions('"+ selectName +"');\">"+ tmhSelect.reStr(data,selOption) +"</div>"; 
            str += "<div style='position:relative;float:right;right:0px;width:18px;height:"+height+"px;text-align:center;font-family:Webdings;font-size:16px;overflow:hidden;background-color:#FFFFFF;cursor:pointer!important;cursor:pointer;' onclick=\"tmhSelect.showOptions('"+ selectName +"');\" >6</div>"; 
            str += "</div>"; 
            str += "<div id='_b_"+ selectName +"' style='position:absolute; background-color:#FFFFFF;width:expression( this.scrollWidth < "+width+" ? \""+width+"px\" : \"auto\" ); min-width:"+width+"px;height:"+ tmhSelect.height(data.length) +"px;border:1px #666666 solid;overflow-x:hidden;overflow-y:auto;display:none; z-index:99999;' >"; 
            for(i=0;i<data.length;i++){ 
                str += "<div id='_s_"+ selectName +"' name='_s_"+ selectName +"' style='"+ tmhSelect.style(1,data[i][0],selOption,width) +"' onmouseover=\"tmhSelect.css(2,this,'"+ data[i][0] +"','"+ selectName +"')\" onmouseout=\"tmhSelect.css(1,this,'"+ data[i][0] +"','"+ selectName +"')\" onclick=\"tmhSelect.selected(this,'"+ data[i][0] +"',"+ dataObj.name +",'"+ action +"')\">"+ data[i][1] +"</div>"; 
            } 
            str += "</div>"; 
        }else{ 
            //没有数据时显示一个空窗体 
            str += "<input type='hidden' name='"+ selectName +"' id='"+ selectName +"' value='"+ selOption +"'>"; 
            str += "<div id='_a_"+ selectName +"' style='width:"+ width +"px;height:"+height+"px; border:1px #666666 solid;'>"; 
            str += "<div id='_v_"+ selectName +"' style='position:relative;float:left;left:2px;width:"+ (width-22) +"px;height:18px;font-size:12px;overflow:hidden;line-height:18px;' onclick=\"tmhSelect.showOptions('"+ selectName +"');\"></div>"; 
            str += "<div style='position:relative;float:right;right:0px;width:18px;height:"+height+"px;text-align:center;font-family:Webdings;font-size:16px;overflow:hidden;background-color:#CCCCCC;cursor:pointer!important;cursor:pointer;' onclick=\"tmhSelect.showOptions('"+ selectName +"');\">6</div>"; 
            str += "</div>"; 
            str += "<div id='_b_"+ selectName +"' style='position:absolute; background-color:#FFFFFF; width:"+ width +"px; height:"+ tmhSelect.height(0) +"px;border:1px #666666 solid;overflow-x:hidden;overflow-y:auto;display:none; z-index:999999;'>"; 
	
			str += "</div>";
        }
        s1.innerHTML = str; 
		_Obj.innerHTML = '';
        _Obj.appendChild(s1); 
    }, 
	hiddenChild:function(obj){
		obj.style.display="none"
	},
    //返回选定项的值 
    value : function(n){return document.getElementById(n).value;}, 
    //返回选定项的文本 
    text : function(n){return document.getElementById("_v_"+ n).innerText;}, 
    selected : function(o,v,dn,action){ 
        var d = dn.data; 
        var n = o.id.replace(/(_s_)/gi,"") 
        document.getElementById(n).value = v;
        document.getElementById("_v_"+ n).innerHTML = tmhSelect.reStr(d,v); 
        tmhSelect.showOptions(n) 
        for(var i=0;i<document.getElementById("_b_"+ n).childNodes.length;i++){ 
            document.getElementById("_b_"+ n).childNodes[i].style.cssText = tmhSelect.style(1) 
        } 
        o.style.cssText = tmhSelect.style(2); 
        if(action!="" && action != null){ 
            try{eval(action)}catch(e){} 
        } 
    }, 
    relv : function(v,d){ 
        for(i=0;i<d.length;i++){ 
            if(d[i][0] == v){ 
                return v; 
            } 
        } 
        if(v == null || v == ""){ 
            return d[0][0]; 
        } 
    }, 
    reStr : function(d,m){ 
        for(i=0;i<d.length;i++){ 
            if(d[i][0] == m){ 
                return d[i][1]; 
            } 
        } 
        if(m == null || m == ""){ 
            return d[0][1]; 
        } 
    }, 
    height : function(l){var h;if(l>10 || l<1)h = 10 * 15; else h = l * 15; h += 2;return h;}, 
    showOptions : function(n){ 
        var o = document.getElementById("_b_"+ n) 
        if(o.style.display == "none") 
            o.style.display =""; 
        else 
            o.style.display ="none"; 
        _selectOptionsElm = o; 
    }, 
    hidden : function(n){ 
        document.getElementById("_b_"+ n).style.display ="none"; 
    }, 
    style : function(m,v1,v2,width){ 
    	var width = width?width:100+'px';
        var cs = ""; 
        if(v1 == v2 && v1!="" && v1!=null){m=2;} 
        switch(m){ 
            case 1: 
                cs = "width:"+width+";height:15px; font-size:12px; line-height:15px; overflow:hidden; background-color:#FFFFFF; color:#000000; font-weight:normal;cursor:pointer!important;cursor:pointer;"; 
                break; 
            case 2: 
                cs = "width:"+width+";height:15px; font-size:12px; line-height:15px; overflow:hidden; background-color:#315DAD; color:#FFFFFF; font-weight:bold;cursor:pointer!important;cursor:pointer;"; 
                break; 
        } 
        return cs; 
    }, 
    css : function(s,obj,v,n){ 
        var v1 = document.getElementById(n).value; 
        if(v == v1){ 
            obj.style.cssText = tmhSelect.style(2); 
            return; 
        }else{ 
            obj.style.cssText = tmhSelect.style(s) 
        } 
    } 
} // JavaScript Document
