combox.prototype.change=function(){
/*定义下拉框的onchange事件*/
var inputbox=document.getElementById("combox_"+this.id)
inputbox.value=this.select.options[this.select.selectedIndex].text;
with(inputbox){select();focus()};
}
combox.prototype.addItem=function(str){
var findText=false
for(i=0;i<this.select.length;i++)if(this.select.options[i].text.indexOf(str)==0){findText=true;break}
if(!findText){
this.select.options[this.select.length]=new Option(str,str)
this.select.value=str
}
}
////////对象事件结束///////
/*公用定位函数(获取控件绝对坐标)*/
function getL(e){
var l=e.offsetLeft;
while(e=e.offsetParent)l+=e.offsetLeft;
return l
}
function getT(e){
var t=e.offsetTop;
while(e=e.offsetParent)t+=e.offsetTop;
return t
}
/*结束*/