  //select Control  
  function Select(selectName,data){ 
	  
     this.data=data;
     this.frmObject=document.getElementsByName(selectName)[0];   
     this.clearOptions=clearOptions;
     this.addOption=addOption;  
  }
  function clearOptions(){
         if(! this.frmObject) return ;

         var optionsObj = this.frmObject.options;
		
	 	 for (k = optionsObj.length - 1; k >= 0 ; k --) {
			this.frmObject.removeChild(optionsObj.item(k));
		 }
		
  
  }  
  function addOption(value ,text){
       if(! this.frmObject) return ;

    	var optionObj = document.createElement("OPTION");
		optionObj.value = value;
		optionObj.text = text;
		optionObj.selected = (value==this.data);						
		if (document.all )
			this.frmObject.add(optionObj);
		else
			this.frmObject.appendChild(optionObj);		  }


