var _fw_html_form_list=new Array();function FW_HTMLForm(){this.event_list=new Array("onchange","onmousemove","onmouseover","onmouseout","onclick","onfocus","onblur","onkeydown","onkeypress");}FW_HTMLForm.prototype=new FW;FW_HTMLForm.img_path="/images/framework/";FW_HTMLForm.prototype.className="FW_HTMLForm";FW_HTMLForm.prototype.remove_html=function(B){var A=String(B).replace(/<.*?>/g,"");return A;};FW_HTMLForm.prototype._default_profiler={start:function(){},end:function(){}};FW_HTMLForm.prototype.top=function(){return FW_Element.top(this._container);};FW_HTMLForm.prototype.style=function(A){return this._style_container;};FW_HTMLForm.prototype.width=function(A){return FW_Element.width(this._container);};FW_HTMLForm.prototype.height=function(A){return FW_Element.height(this._container);};FW_HTMLForm.prototype.left=function(){return FW_Element.left(this._container);};FW_HTMLForm.prototype.style_visibility=function(A){if(A!=null){this._container.style.visibility=A;}else{return this._container.style.visibility;}};FW_HTMLForm.prototype.style_display=function(A){if(A!=null){this._container.style.display=A;}else{return this._container.style.display;}};FW_HTMLForm.prototype.is_displayed=function(){if(this._container==null){return false;}var A=this._container.style.display;if(A=="none"){return false;}var B=FW_Element.height(this._container);if(B==0){return false;}return true;};FW_HTMLForm.prototype.class_name=function(A){if(this._container==null){return"";}if(A!=null){this.ignore_prop_change=true;this._container.className=A;this.ignore_prop_change=false;}else{return new String(this._container.className);}};function _fw_html_style_hook(D,B,A){if(D==null){D=event.propertyName;A=this[D];}var C=_fw_hf_getLOV(this.identifier);if(C.styleMethodMap[D]!=null){C[C.styleMethodMap[D]].call(C,A);}else{C._style_element.style[D]=A;}}FW_HTMLForm.prototype._setup_style_hooks=function(A){if(this._style_element==null){return ;}if(A==null){return false;}if(new String(A.onpropertychange)=="null"){A.onpropertychange=_fw_html_style_hook;}else{if(A.watch){for(i=0;i<this.styleList.length;i++){A.watch(this.styleList[i],_fw_html_style_hook);}}else{}}};FW_HTMLForm.prototype._copy_events=function(A){for(i=0;i<this.event_list.length;i++){event_name=this.event_list[i];if(A[event_name]!=null){this.add_event(event_name,A[event_name]);}}};FW_HTMLForm.prototype.add_event=function(D,C,B){if(this.events==null){this.events={};}if(this.events[D]==null){this.events[D]=new Array();}var A={func:C,scope:B};this.events[D].push(A);};FW_HTMLForm.prototype._call_event=function(event_name,e){if(this.events==null){return false;}if(this.events[event_name]!=null){var i=this.events[event_name].length;while(i--){var return_value=true;var jsfunc=this.events[event_name][i].func;var scope=this.events[event_name][i].scope;if(scope==null){scope=this._prop_container;}var n_evt_name=event_name.replace("on","");if(typeof (jsfunc)!="function"){return_value=eval(jsfunc);}else{var lov_event;if(e!=null){if(e.target==null){var lov_event=e;lov_event.event_type=n_evt_name;lov_event.target=this._prop_container;if(lov_event.srcElement){lov_event.target.form=lov_event.srcElement.form;}var func=new String(jsfunc);if(func.search("anonymous")<0){return jsfunc.call(scope,lov_event);}func=func.replace(/event/,"arguments[0]");eval(func);return_value=anonymous.call(this._prop_container,lov_event);}else{target=e.target;lov_event={};for(prop in e){lov_event[prop]=e[prop];}lov_event.type=n_evt_name;lov_event.event_type=n_evt_name;lov_event.target=this._prop_container;lov_event.target.form=target.form;return_value=jsfunc.call(scope,lov_event);}}else{var e={type:n_evt_name};return_value=jsfunc.call(scope,e);}}if(return_value==false){return false;}}}return true;};FW_HTMLForm.prototype._update_property=function(B){if(this._prop_container==null){return false;}var A=this._prop_container;this.ignore_prop_change=true;A[B]=this[this.propMethodMap[B]]();this.ignore_prop_change=false;};FW_HTMLForm.prototype._setup_hooks=function(A){for(prop in this.propMethodMap){A[prop]=this[this.propMethodMap[prop]]();}for(meth in this.method_map){A[meth]=this.method_map[meth];}if(!A.watch){A.onpropertychange=_fw_html_property_hook;}else{for(prop in this.propMethodMap){A.watch(prop,_fw_html_property_hook);}for(i=0;i<this.event_list.length;i++){var B=this.event_list[i];A.watch(B,_fw_html_property_hook);}}return true;};FW_HTMLForm.prototype._create_style_container=function(){var A=document.createElement("FWSTYLE");A.identifier=this.identifier;A.id="style_container"+this.identifier;A.type="fw_style";return A;};FW_HTMLForm.prototype._create_prop_container=function(){var A=document.createElement(this._element_name);A.identifier=this.identifier;A.type=this._element_type;A.value=this.value();A.style.display="none";return A;};FW_HTMLForm.prototype._create_value_container=function(){var A=document.createElement("INPUT");A.style.display="none";A.identifier=this.identifier;return A;};function _fw_html_property_focus_hook(){return _fw_hf_getLOV(this.identifier).focus();}function _fw_html_property_blur_hook(){return _fw_hf_getLOV(this.identifier).blur();}function _fw_html_property_reset_hook(){return _fw_hf_getLOV(this.identifier).reset();}function _fw_html_property_clear_hook(){return _fw_hf_getLOV(this.identifier).clear();}function _fw_html_top_hook(){return _fw_hf_getLOV(this.identifier).top();}function _fw_html_left_hook(){return _fw_hf_getLOV(this.identifier).left();}function _fw_html_width_hook(){return _fw_hf_getLOV(this.identifier).width();}function _fw_html_height_hook(){return _fw_hf_getLOV(this.identifier).height();}function FW_HTMLForm_CheckBox(A){this.name;this.checked_value="Y";this.unchecked_value="N";this.behaviour=this.TRI_STATE_CYCLE;if(new String(A.checked)!="undefined"){this.checked_default=A.checked;delete (A.checked);}this._init_args(A);this.checkbox_class_name="CheckBox";this.img_path=FW_HTMLForm.img_path;this.img_checked=FW_HTMLForm_CheckBox.image_list[0];this.img_unchecked=FW_HTMLForm_CheckBox.image_list[1];this.img_null=FW_HTMLForm_CheckBox.image_list[2];this.img_checked_disabled=FW_HTMLForm_CheckBox.image_list[3];this.img_unchecked_disabled=FW_HTMLForm_CheckBox.image_list[4];this.img_null_disabled=FW_HTMLForm_CheckBox.image_list[5];this.TRI_STATE_CYCLE=1;this.TRI_STATE_SINGLE=2;this.DUAL_STATE=3;this._disabled=false;this._value=null;this._element_name="FWCHECKBOX";this._element_type="fw_checkbox";this.propMethodMap={value:"value",value_unchecked:"value_unchecked",disabled:"disabled",checked:"checked",is_null:"is_null",defaultChecked:"defaultChecked",widget_style:"style"};this.method_map={add_event:_fw_html_property_add_event_hook,focus:_fw_html_property_focus_hook,blur:_fw_html_property_blur_hook,reset:_fw_html_property_reset_hook,clear:_fw_html_property_clear_hook,left:_fw_html_left_hook,top:_fw_html_top_hook,width:_fw_html_width_hook,height:_fw_html_height_hook};this.styleMethodMap={display:"style_display",visibility:"style_visibility"};this.styleList=["display"];}FW_HTMLForm_CheckBox.TRI_STATE_CYCLE=1;FW_HTMLForm_CheckBox.TRI_STATE_SINGLE=2;FW_HTMLForm_CheckBox.DUAL_STATE=3;FW_HTMLForm_CheckBox.image_list=new Array("checkbox_checked.png","checkbox_unchecked.png","checkbox_null.png","checkbox_checked_disabled.png","checkbox_unchecked_disabled.png","checkbox_null_disabled.png");FW_HTMLForm_CheckBox.prototype=new FW_HTMLForm();FW_HTMLForm_CheckBox.prototype.className="FW_HTMLForm_CheckBox";FW_HTMLForm_CheckBox.prototype.superclass=FW_HTMLForm.prototype;function _fw_html_checkbox_checked_hook(){return _fw_hf_getLOV(this.identifier).checked();}function _fw_html_checkbox_is_null_hook(){return _fw_hf_getLOV(this.identifier).is_null();}FW_HTMLForm_CheckBox.prototype.disabled=function(A){if(A!=null){this._disabled=A;this._update_display();}else{return this._disabled;}};FW_HTMLForm_CheckBox.prototype.focus=function(A){if(this._checkbox_img!=null){this._checkbox_img.focus();}return true;};FW_HTMLForm_CheckBox.prototype.init=function(A){this._init_args(A);this._checkbox=this.element;this.element=null;if(this._checkbox.type!="checkbox"){return ;}this.identifier=_fw_html_form_list.length;_fw_html_form_list.push(this);if(this._checkbox.value!="on"){this.checked_value=this._checkbox.value;}var B;if(new String(this.checked_default)!="undefined"){B=this.checked_default;}else{B=this._checkbox.checked;}if(this._checkbox.disabled){this._disabled=true;}else{this._disabled=false;}if(B==true){this._value=this.checked_value;}else{if(B==false||this.behaviour==this.DUAL_STATE){this._value=this.unchecked_value;}else{this._value=null;}}this._initialValue=this._value;this._defaultChecked=this.checked();this._update_property("value");this._update_property("checked");this._update_property("is_null");this._update_property("defaultChecked");this.done_init=true;};FW_HTMLForm_CheckBox.prototype.reset=function(){if(this._initialValue==this.checked_value){this.checked(true);}else{if(this._initialValue==this.unchecked_value){this.checked(false);}else{this.checked(null);}}};FW_HTMLForm_CheckBox.prototype.clear=function(){this.checked(null);};FW_HTMLForm_CheckBox.prototype.defaultChecked=function(){return this._defaultChecked;};FW_HTMLForm_CheckBox.prototype.display=function(){if(this.done_init!=true){return false;}if(this.done_display==true){return false;}this._container=document.createElement("DIV");this._container.style.display="inline";if(FW_Browser.Mozilla){this._checkbox_img=document.createElement("img");this._checkbox_img.setAttribute("tabindex","0");EventHandler.addEvent(this._checkbox_img,"keydown",this._event_checkbox_onkeydown,this,true);}else{this._checkbox_img=document.createElement("input");this._checkbox_img.type="image";try{this._checkbox_img.type="image";}catch(A){}}this._container.appendChild(this._checkbox_img);this._checkbox_img.identifier=this.identifier;FW_Element.replace(this._checkbox,this._container);this._copy_events(this._checkbox);EventHandler.addEvent(this._checkbox_img,"click",this._event_checkbox_onclick,this,true);EventHandler.addEvent(this._checkbox_img,"blur",this._event_checkbox_onblur,this,true);EventHandler.addEvent(this._checkbox_img,"focus",this._event_checkbox_onfocus,this,true);this._style_container=this._create_style_container();this._container.appendChild(this._style_container);this._prop_container=this._create_prop_container();this._container.appendChild(this._prop_container);this._value_container=this._create_value_container();this._container.appendChild(this._value_container);this._value_container.name=this._checkbox.name;this._value_container.id=this._checkbox.id+"_VALUE_CONTAINER";if(this._value==null){this._value_container.value="";}else{this._value_container.value=this._value;}this._prop_container.id=this._checkbox.id;this._prop_container.name=this._checkbox.name;this._prop_container.form=this._checkbox.form;this._style_element=this._checkbox_img;this._setup_style_hooks(this._style_container);this._setup_hooks(this._prop_container);this.done_display=true;this._update_display();};FW_HTMLForm_CheckBox.prototype._event_checkbox_onblur=function(A){this._call_event("onblur",A);};FW_HTMLForm_CheckBox.prototype._event_checkbox_onfocus=function(A){this._call_event("onfocus",A);};FW_HTMLForm_CheckBox.prototype._event_checkbox_onkeydown=function(A){if(this._call_event("onkeydown",A)){if(A.keyCode==FW.KEY_SPACE){this._event_checkbox_onclick(A);}}return false;};FW_HTMLForm_CheckBox.prototype._event_checkbox_onclick=function(A){if(this.disabled()==true){return false;}if(this.is_null()==true){this.checked(true);}else{if(this.checked()==true){this.checked(false);}else{if(this.checked()==false){if(this.behaviour==this.TRI_STATE_CYCLE){this.checked(null);}else{this.checked(true);}}}}this._call_event("onclick",A);return false;};FW_HTMLForm_CheckBox.prototype._update_display=function(){var A;if(this._value==this.checked_value){if(this._disabled){A=this.img_checked_disabled;}else{A=this.img_checked;}}else{if(this._value==this.unchecked_value){if(this._disabled){A=this.img_unchecked_disabled;}else{A=this.img_unchecked;}}else{if(this._value==null){if(this._disabled){A=this.img_null_disabled;}else{A=this.img_null;}}}}this._checkbox_img.src=this.img_path+"/"+A;};FW_HTMLForm_CheckBox.prototype.checked=function(D,B){if(arguments.length>0){var A;if(D==true){A=this.checked_value;}else{if(D==false){A=this.unchecked_value;}else{if(this.behaviour==this.DUAL_STATE){A=this.unchecked_value;}else{A=null;}}}var C=false;if(this._value!=A){C=true;this._value=A;if(this._value==null){this._value_container.value="";}else{this._value_container.value=this._value;}}this._update_property("checked");this._update_property("is_null");if(C==true){this._call_event("onchange",B);}}else{if(this._value==this.checked_value){return true;}else{if(this._value==this.unchecked_value){return false;}}return null;}this._update_display();return null;};FW_HTMLForm_CheckBox.prototype.value=function(A){return this.checked_value;};FW_HTMLForm_CheckBox.prototype.value_unchecked=function(A){return this.unchecked_value;};FW_HTMLForm_CheckBox.prototype.is_null=function(A){if(this._value==null||this._value.length==0){return true;}else{return false;}this._update_display();};function FW_HTMLForm_LOV(A){this.lov_selected_class_name="LOVSelected";this.lov_class_name="LOV";this.lov_value_class_name="LOVValue";this.img_path=FW_HTMLForm.img_path;this.button_img=this.img_path+"lov_select.gif";this.button_img_disabled=this.img_path+"lov_select_disabled.gif";this.button_img_down=this.img_path+"lov_select_down.gif";this.name;this._disabled=false;this.text_modifiable=false;}FW_HTMLForm_LOV.prototype=new FW_HTMLForm();FW_HTMLForm_LOV.prototype.className="FW_HTMLForm_LOV";FW_HTMLForm_LOV.prototype.superclass=FW_HTMLForm.prototype;FW_HTMLForm_LOV.prototype.add=function(C,B,A){this._option_list.add(C,B);if(this.display_type=="list"&&A!=false){this._option_list._generate_display();}this._options_sized=false;};FW_HTMLForm_LOV.prototype.regenerate=function(){if(this.display_type=="list"){if(this._option_list.displayed!=true){this.show_options();return true;}this._option_list._generate_display();}};FW_HTMLForm_LOV.prototype.remove=function(A){this._option_list.remove(A);};FW_HTMLForm_LOV.prototype.remove_all=function(){this._option_list._remove_all();};FW_HTMLForm_LOV.prototype.selectedIndex=function(A,B){if(A!=null){if(this._option_list.options[A]!=null){this._option_list.selectedIndex(A);this._update_property("selectedIndex");this._update_value();if(this._lastSelectedIndex!=A&&((B)||this.onchange_onkey)){this._call_event("onchange");}}}else{if(this._option_list!=null){return this._option_list.selectedIndex();}}return false;};FW_HTMLForm_LOV.prototype._update_value=function(){var B=this._option_list.selectedOption();if(this._input!=null){var A;if(B.value_text!=null){A=B.value_text;}else{A=B.text;}this._input.value=this.remove_html(A);}if(this._value_container!=null){var C=B.value;if(C==null){C="";}this._value_container.value=C;this._update_property("value");}};FW_HTMLForm_LOV.prototype.value=function(B){if(B!=null){var A=this._option_list.findValue(B);if(A>-1){this.selectedIndex(A);}}else{if(this._option_list!=null){if(this._option_list.selectedOption().value!=null){return String(this._option_list.selectedOption().value);}}}return"";};FW_HTMLForm_LOV.prototype.options=function(){if(this._option_list){return this._option_list.options;}else{return[];}};FW_HTMLForm_LOV.prototype.display=function(F){if(this.select==null){return false;}var D=document.createElement("TBODY");var G=document.createElement("TR");var H;var B;D.appendChild(G);if(this.select.className!=null){this.lov_class_name=this.lov_class_name+" "+this.select.className;}if(this.display_type=="list"){this.lov_class_name+=" LOVList";}else{this.lov_class_name+=" LOVDropDown";}this._container=this._create_display_container();this._container.appendChild(D);if(this.display_type=="list"){var A=document.createElement("input");A.type="text";A.style.width="1px";A.style.height="1px";A.style.border="0px";A.style.padding="0px";A.style.margin="0px";A.style.padding="0px";A.style.fontSize="1px";this._focus_container=A;this.show_input=false;this.show_button=false;this._option_list.select_on_hover=false;var H=document.createElement("TD");G.appendChild(H);H.appendChild(A);H.appendChild(this._option_list.element);B=H;}else{this._option_list.select_on_hover=true;document.body.appendChild(this._option_list.element);}if(this.show_input==true){var C=document.createElement("TD");this._input=this._create_display_input();C.appendChild(this._input);G.appendChild(C);B=C;}if(this.show_button==true){var E=document.createElement("TD");this._button_img=this._create_display_button();E.appendChild(this._button_img);G.appendChild(E);B=E;}this._data_td=B;this._style_container=this._create_style_container();B.appendChild(this._style_container);this._prop_container=this._create_prop_container();B.appendChild(this._prop_container);this._value_container=this._create_value_container();B.appendChild(this._value_container);this._copy_options();this._setup(F);return true;};FW_HTMLForm_LOV.prototype._copy_options=function(){var D=this.select.options;if(D!=null){var B=this._option_list;var A=D.length;for(var C=0;C<A;C++){B.add(new FW_HTMLForm_Option(this.select.options[C].text,this.select.options[C].value,this.select.options[C].defaultSelected));}this.selectedIndex(this.select.selectedIndex);}};FW_HTMLForm_LOV.prototype._current_displayed=null;FW_HTMLForm_LOV.prototype.show_options=function(){if(this._input!=null){this._input.className=this.lov_value_class_name;}if(FW_HTMLForm_LOV._current_displayed!=null){FW_HTMLForm_LOV._current_displayed.hide_options(false);}if(this.option_list_pixel_length!=null){this._option_list_length=this.option_list_pixel_length;}else{if(this.display_type!="list"){this.size_options();}}var A=this._option_list_length;if(A<1){A=100;}this._option_list.width=A;if(this.display_type!="list"){var C=this.left();var B=this.top()+this.height();this._option_list.left=C;this._option_list.top=B;this._option_list.display();FW_HTMLForm_LOV._current_displayed=this;}else{this._option_list.height=parseInt(17)*parseInt(this.select.size);this._option_list.display();}if(this.display_type=="list"){this._focus_container._event_identifier=this.identifier;this._focus_container.onkeydown=FW_HTMLForm_LOV._event_select_list_onkeydown;this._focus_container.onkeypress=FW_HTMLForm_LOV._event_select_list_onkeypress;this._focus_container.onkeyup=FW_HTMLForm_LOV._event_select_list_onkeyup;this._focus_container.onfocus=FW_HTMLForm_LOV._event_select_list_onfocus;this._focus_container.onblur=FW_HTMLForm_LOV._event_select_list_onblur;this._option_list._display_option_list_content.onclick=FW_HTMLForm_LOV._event_select_list_onclick;this._option_list._display_option_list_content.onmousedown=FW_HTMLForm_LOV._event_select_list_onmousedown;this._option_list._display_option_list_content._event_identifier=this.identifier;}this.showing_options=true;};FW_HTMLForm_LOV.prototype.hide_options=function(A){this.showing_options=false;if(this._option_list.displayed==false){return false;}if(this._option_list.clicked==true){var B=false;if(this.display_type!="list"){B=true;}this.selectedIndex(this._option_list.selectedIndex(),B);}this._option_list.hide();if(this._input!=null&&A!=false){this.focus();}return true;};FW_HTMLForm_LOV.prototype._data_callback=function(){clearInterval(this._data_interval_id);var A=this._search_field.value();if(this.data_callback!=null){this.data_callback.call(this);}this.hide_options();this.selectedIndex(0);var B=this._search_field.value();this.valueHighlight(A,B);};FW_HTMLForm_LOV.prototype.disabled=function(A){if(A!=null){this._options_sized=false;this._disabled=A;if(this._input!=null){this._input.disabled=A;}if(this._button_img!=null){this._button_img.disabled=A;if(A==true){this._button_img.src=this.button_img_disabled;}else{this._button_img.src=this.button_img;}}if(this._option_list!=null){this._option_list.disabled(A);}}else{return this._disabled;}};FW_HTMLForm_LOV.prototype.valueHighlight=function(A){this.selectedIndex(0);this.show_options();};FW_HTMLForm_LOV.prototype.size_input=function(){if(this._input==null||this._option_list==null){return false;}var A=this.length;if(A==null){A=this._option_list.max_option_size();}if(A<1){A=1;}this._input.size=A;};FW_HTMLForm_LOV.prototype.size_options=function(){if(this._option_list==null){return false;}if(this._options_sized==true){return false;}var B=this._option_list.max_option_size();if(this.length==null&&this.list_length==null){this._option_list_length=this._container.offsetWidth;}else{if(this.list_length!=null){B=this.list_length;}else{if(B>this.length){if(this.wrap_length!=null&&B>this.wrap_length){B=this.wrap_length;}}else{this._option_list_length=this._container.offsetWidth;return true;}}var A=document.createElement("INPUT");A.size=parseInt(B)+2;document.body.appendChild(A);this._option_list_length=A.offsetWidth;A.style.display="none";A=null;}this._options_sized=true;};FW_HTMLForm_LOV.prototype.focus=function(){if(this.disabled()){return false;}if(this._input!=null){try{this._input.focus();}catch(A){return false;}}else{if(this._focus_container!=null){return this._focus_container.focus();}}return true;};FW_HTMLForm_LOV.prototype.blur=function(){if(this.disabled()){return false;}if(this._input!=null){this._input.blur();}else{if(this._focus_container!=null){this._focus_container.blur();}}return true;};FW_HTMLForm_LOV.prototype._event_options_onfocus=function(A){this._call_event("onfocus",A);this._option_list.focus();};FW_HTMLForm_LOV.prototype._event_options_onblur=function(A){this._call_event("onblur",A);this._option_list.blur();};FW_HTMLForm_LOV.prototype._event_options_onmousedown=function(A){if(this.disabled()){return false;}this._option_list.focus();};FW_HTMLForm_LOV.prototype._event_input_onfocus=function(A){if(this._ignore_focus==true){this._ignore_focus=false;return false;}if(this._call_event("onfocus",A)==false){return false;}this._input.className=this.lov_value_class_name+" "+this.lov_selected_class_name;this._onfocusSelectedIndex=this.selectedIndex();return false;};FW_HTMLForm_LOV.prototype._event_input_onblur=function(A){this._event_blur=1;this._input.className=this.lov_value_class_name;this.stop_search();if(this._onfocusSelectedIndex!=this.selectedIndex()){if(this._option_list.clicked!=true&&this._option_list.displayed!=true){this._call_event("onchange",A);}}this._call_event("onblur",A);return true;};FW_HTMLForm_LOV.prototype._event_button_onblur=function(A){this._event_blur=1;this.stop_search();return true;};FW_HTMLForm_LOV.prototype._event_options_onclick=function(A){if(this.display_type=="list"){this.focus();this.selectedIndex(this._option_list.selectedIndex(),true);this._call_event("onclick",A);}else{this.selectedIndex(this._option_list.selectedIndex(),false);}};FW_HTMLForm_LOV.prototype._event_input_onclick=function(A){if(this.disabled()==true){return false;}if(this._call_event("onclick",A)==false){return false;}if(this._option_list.displayed==true){this.hide_options();}else{this.show_options();}if(this._input.text_modifiable==false&&this._input.setSelectionRange!=null){this._input.selectionStart=0;this._input.selectionEnd=0;this._input.setSelectionRange(0,0);}return false;};FW_HTMLForm_LOV.prototype._event_input_onchange=function(A){return true;};FW_HTMLForm_LOV.prototype._event_input_onkeydown=function(E){var C=false;if(this.display_type=="list"){if(this.onchange_onkey!=false){C=true;}}var B=true;var D=false;if(E.altKey||E.ctrlKey){D=true;}if(!D&&E.keyCode==FW.KEY_DOWN){if(E.altKey==true){this.show_options();}else{this.stop_search();this.selectedIndex(parseInt(this.selectedIndex())+1,C);this._option_list.show_selected();}B=false;}else{if(!D&&E.keyCode==FW.KEY_UP){if(E.altKey==true){this.show_options();}else{this.stop_search();this.selectedIndex(parseInt(this.selectedIndex())-1,C);this._option_list.show_selected();}B=false;}else{if(!D&&E.keyCode==FW.KEY_HOME){this.stop_search();this.selectedIndex(0,C);this._option_list.show_selected();B=false;}else{if(!D&&E.keyCode==FW.KEY_END){this.stop_search();this.selectedIndex(this.options().length-1,C);this._option_list.show_selected();B=false;}else{if(!D&&E.keyCode==FW.KEY_PAGE_UP){var A=this.selectedIndex();this.stop_search();this.selectedIndex(((A-15>0)?(A-15):(0)),C);this._option_list.show_selected();B=false;}else{if(!D&&E.keyCode==FW.KEY_PAGE_DOWN){var A=this.selectedIndex();this.stop_search();this.selectedIndex(((A+15<=(this.options().length-1))?(A+15):(this.options().length-1)),C);this._option_list.show_selected();B=false;}else{if(!D&&E.keyCode==FW.KEY_ENTER){this.stop_search();if(this.display_type=="drop"){this.hide_options();}else{if(this.onchange_onkey==false){this._call_event("onchange");}}B=true;}else{if(!D&&(E.keyCode==FW.KEY_TAB||E.keyCode==FW.KEY_ESC)){this.stop_search();if(this.display_type=="drop"){this.hide_options();}B=true;}else{if(!D&&E.keyCode==FW.KEY_BACKSPACE){this.search(-1);B=false;FW_KeyHandler.ignore_key=true;}else{if(!D&&E.keyCode==FW.KEY_RIGHT){this.search(-2);}else{if(!D&&E.keyCode==FW.KEY_LEFT){this.search(-3);}else{if(!D&&E.keyCode!=FW.KEY_SHIFT){var F=FW_KeyHandler.get_key(E.keyCode,E.shiftKey);if(F!=null){this.search(F);B=false;}}}}}}}}}}}}}if(this._call_event("onkeydown",E)==false){B=false;}if(B==false){}return B;};FW_HTMLForm_LOV.prototype._event_input_onkeypress=function(A){if(this._call_event("onkeypress",A)==false){return false;}if(A.keyCode==8||A.keyCode==13||A.keyCode==38||A.keyCode==40){return false;}return true;};FW_HTMLForm_LOV.prototype._event_input_onkeyup=function(A){if(A.keyCode==8){return false;}return true;};FW_HTMLForm_LOV.prototype._event_input_onmousedown=function(A){if(this.disabled()==true){return false;}if(this._button_img!=null){this._button_img.src=this.button_img_down;}};FW_HTMLForm_LOV.prototype._event_input_onmouseup=function(A){if(this.disabled()==true){return false;}if(this._button_img!=null){this._button_img.src=this.button_img;}};FW_HTMLForm_LOV.prototype._event_button_img_onmousedown=function(A){if(this.disabled()==true){return false;}this._button_img.src=this.button_img_down;};FW_HTMLForm_LOV.prototype._event_button_img_onmouseup=function(A){if(this.disabled()==true){return false;}this._button_img.src=this.button_img;};FW_HTMLForm_LOV.prototype._event_button_img_onmouseup=function(A){if(this.disabled()==true){return false;}this._button_img.src=this.button_img;};FW_HTMLForm_LOV.prototype._event_button_img_onclick=function(A){if(this.disabled()==true){return false;}if(this._call_event("onclick",A)==false){return false;}this._ignore_focus=true;if(this._option_list.displayed==true){this.hide_options();return false;}if(this._option_list.displayed==false){this.show_options();}if(this._input!=null){this._input.focus();}return false;};FW_HTMLForm_LOV.prototype._display_container_onmouseover=function(A){return this._call_event("onmouseover",A);};FW_HTMLForm_LOV.prototype._display_container_onmousemove=function(A){return this._call_event("onmousemove",A);};FW_HTMLForm_LOV.prototype._display_container_onmouseout=function(A){return this._call_event("onmouseout",A);};function _fw_html_property_hook(E,C,A){if(E==null){E=event.propertyName;A=this[E];}var B=_fw_hf_getLOV(this.identifier);if(B.ignore_prop_change==true){return A;}if(B.propMethodMap[E]!=null){_fw_hf_getLOV(this.identifier)[B.propMethodMap[E]](A);}else{if(E.search("^on.*?")>-1){B.add_event(E,A);}else{try{B.ignore_prop_change=true;B._value_container[E]=A;B.ignore_prop_change=false;}catch(D){B.ignore_prop_change=false;}}}return A;}function _fw_html_lov_property_add_hook(A,B){return _fw_hf_getLOV(this.identifier).add(A,B);}function _fw_html_property_add_event_hook(C,B,A){return _fw_hf_getLOV(this.identifier).add_event(C,B,A);}function _fw_html_lov_property_remove_hook(A){return _fw_hf_getLOV(this.identifier).remove(A);}FW_HTMLForm_LOV.prototype._create_display_container=function(){var A;A=document.createElement("TABLE");A.cellpadding="0";A.cellspacing="0";A.className=this.lov_class_name;A.identifier=this.identifier;A._drop_down=true;EventHandler.addEvent(A,"mouseover",this._display_container_onmouseover,this);EventHandler.addEvent(A,"mousemove",this._display_container_onmousemove,this);EventHandler.addEvent(A,"mouseout",this._display_container_onmouseout,this);return A;};FW_HTMLForm_LOV.prototype._create_display_button=function(){var A;if(this.show_input==false&&this.button_style=="image"){A=document.createElement("INPUT");A.type="image";A.src=this.button_img;}else{if(this.button_style=="image"||this.button_style==null){A=document.createElement("IMG");A.src=this.button_img;}else{if(this.button_style=="button"){A=document.createElement("BUTTON");A.innerHTML=this.button_caption;}}}if(this.show_input==false){EventHandler.addEvent(A,"blur",this._event_button_onblur,this);}EventHandler.addEvent(A,"mousedown",this._event_button_img_onmousedown,this);EventHandler.addEvent(A,"mouseup",this._event_button_img_onmouseup,this);EventHandler.addEvent(A,"click",this._event_button_img_onclick,this);A.style.display="inline";A.style.padding="0px";A.style.margin="0px";A.style.border="0px";A._drop_down=true;if(document.all){A.align="center";}A.className="LOVButton";return A;};FW_HTMLForm_LOV.prototype._create_display_input=function(){var A=document.createElement("INPUT");A.style.padding="0px";A.style.margin="0px";A.style.cursor="default";A.className=this.lov_value_class_name;A._drop_down=true;if(this.default_to_list==true){if(this._option_list!=null){var B=this.remove_html(this._option_list.selectedOption().text);A.default_value=B;A.value=B;}else{A.value=this.select.options[this.select.selectedIndex].text;}A.autocomplete="off";}if(this.text_modifiable==false){A.onselectstart=FW_HTMLForm_LOV.return_false;A.onselect=FW_HTMLForm_LOV.return_false;A.readOnly=true;}A._event_identifier=this.identifier;A.onfocus=FW_HTMLForm_LOV._event_handler_input_onfocus;A.onblur=FW_HTMLForm_LOV._event_handler_input_onblur;A.onclick=FW_HTMLForm_LOV._event_handler_input_onclick;A.onkeydown=FW_HTMLForm_LOV._event_handler_input_onkeydown;A.onkeypress=FW_HTMLForm_LOV._event_handler_input_onkeypress;A.onkeyup=FW_HTMLForm_LOV._event_handler_input_onkeyup;A.onmousedown=FW_HTMLForm_LOV._event_handler_input_onmousedown;A.onmouseup=FW_HTMLForm_LOV._event_handler_input_onmouseup;return A;};FW_HTMLForm_LOV._event_handler_input_onfocus=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onfocus(A);};FW_HTMLForm_LOV._event_handler_input_onblur=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onblur(A);};FW_HTMLForm_LOV._event_handler_input_onclick=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onclick(A);};FW_HTMLForm_LOV._event_handler_input_onkeydown=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onkeydown(A);A.returnValue=false;return false;};FW_HTMLForm_LOV._event_handler_input_onkeypress=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onkeypress(A);};FW_HTMLForm_LOV._event_handler_input_onkeyup=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onkeyup(A);return false;};FW_HTMLForm_LOV._event_handler_input_onmousedown=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onmousedown(A);};FW_HTMLForm_LOV._event_handler_input_onmouseup=function(A){if(A==null){A=event;}var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onmouseup(A);};FW_HTMLForm_LOV.return_false=function(){};function FW_HTMLForm_LOV_Select(A){this.name="LOVSelect";this.option_list_class_name="LOVOptionList";this.option_class_name="LOVOption";this.length=null;this.wrap_length=null;this.show_button=true;this.show_input=true;this.button_caption="Select";this.default_to_list=true;this.show_list=true;this.autoselect=true;this.button_style="image";this.display_type="drop";this._element_name="FWSELECT";this._element_type="fw_select";this._init_args(A);this.events={};this.propMethodMap={value:"value",disabled:"disabled",selectedIndex:"selectedIndex",className:"class_name",widget_style:"style",options:"options"};this.styleMethodMap={display:"style_display",visibility:"style_visibility"};this.method_map={add:_fw_html_lov_property_add_hook,remove:_fw_html_lov_property_remove_hook,focus:_fw_html_property_focus_hook,blur:_fw_html_property_blur_hook,reset:_fw_html_property_reset_hook,add_event:_fw_html_property_add_event_hook,left:_fw_html_left_hook,top:_fw_html_top_hook,width:_fw_html_width_hook,height:_fw_html_height_hook};this.styleList=["backgroundColor","border","width","height","display"];this._search_field=null;return this;}FW_HTMLForm_LOV_Select.prototype=new FW_HTMLForm_LOV();FW_HTMLForm_LOV_Select.prototype.className="FW_HTMLForm_LOV_Select";FW_HTMLForm_LOV_Select.prototype.superclass=FW_HTMLForm_LOV.prototype;FW_HTMLForm_LOV_Select.prototype.init=function(B){this._init_args(B);this.identifier=_fw_html_form_list.length;_fw_html_form_list.push(this);this.select=this.element;this.element=null;if(this.select.nodeName!="SELECT"){this.select=null;return false;}if(this.select.size){this.display_type="list";}if(FW.effects_enabled==true){this.effect_list_open=new FW_Effect_Opacity({start:0,end:100,duration:0.4});this.effect_list_close=new FW_Effect_Opacity({start:100,end:0,duration:0.4});}this._prop_container=null;this._value_container=null;this._input=null;this._option_list={};var A=(this.display_type=="drop")?(true):(false);this._option_list=new FW_HTMLForm_OptionList({option_list_class_name:this.option_list_class_name+" "+this.select.className,option_class_name:this.option_class_name,disabled:this.select.disabled,header:this.header,widths:this.widths,profiler:this.profiler,auto_height:A,effect_display:this.effect_list_open,effect_hide:this.effect_list_close,display_type:(this.display_type=="list")?(FW_HTMLForm_OptionList.DISPLAY_TYPE_FIXED):(FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT)});this._initialValue=this.select.selectedIndex;this._search_field=new FW_HTMLForm_SearchField({profiler:this.profiler});return true;};function _fw_hf_getLOV(A){return _fw_html_form_list[A];}FW_HTMLForm_LOV_Select.prototype.reset=function(){this.selectedIndex(this._initialValue);};FW_HTMLForm_LOV_Select.prototype.height=function(A){if(A){if(this.display_type=="list"){this._option_list.resize_to(null,A);}}else{return FW_Element.height(this._container);}};FW_HTMLForm_LOV_Select.prototype.width=function(A){if(A){if(this.display_type=="list"){this._option_list.resize_to(A,null);}}else{return FW_Element.width(this._container);}};FW_HTMLForm_LOV_Select.prototype.size_options_list=function(){if(this._option_list==null){return false;}if(this.length=="*"){this._option_list_length=this._container.parentNode.offsetWidth-10;this._options_sized=true;return true;}var A=document.createElement("INPUT");if(this.length){A.size=this.length;}else{var C=this._option_list.max_option_size();A.size=(C)?(C):(1);}var B=A;document.body.appendChild(A);this._option_list_length=B.offsetWidth;B.style.display="none";this._options_sized=true;};FW_HTMLForm_LOV_Select.prototype.search=function(B){this._search_field.top=this.top()+this._container.offsetHeight;this._search_field.left=this.left();var C=0;var D=1;if(B==-2){if(this._search_field.value().length>0){C=this.selectedIndex()+1;}}else{if(B==-3){if(this._search_field.value().length>0){C=this.selectedIndex()-1;D=-1;}}else{if(B==-1){this._search_field.remove_char();}else{this._search_field.add_char(B);}}}if(this.data_callback!=null){if(this._search_field.value().length>0){if(this._data_interval_id!=null){clearInterval(this._data_interval_id);}this._data_interval_id=setInterval("_fw_hf_getLOV("+this.identifier+")._data_callback(); ",this.data_timer);}}else{var A=this._option_list.findText(this._search_field.value().toLowerCase(),C,D);if(A>-1){this.selectedIndex(A);this._option_list.scrollFrame();}}this._search_field.display();};FW_HTMLForm_LOV_Select.prototype.stop_search=function(){this._search_field.clear();this._search_field.hide();};FW_HTMLForm_LOV_Select.prototype._setup=function(A){if(this.select.disabled==true){this.disabled(true);}this.select.parentNode.replaceChild(this._container,this.select);this._copy_events(this.select);this._value_container.value=this.select.value;this._value_container.name=this.select.name;this._value_container.id=this.select.id+"_VALUE_CONTAINER";this._prop_container.id=this.select.id;this._prop_container.name=this.select.name;this._prop_container.form=this.select.form;if(this.display_type=="list"){this._style_element=this._container;this.size_options_list();if(A!=false){this.show_options();}}else{this._style_element=this._input;this.size_input();}this._setup_style_hooks(this._style_container);this.select.id="replace_fw_html_form";this.select.style.display="none";document.body.appendChild(this.select);this._setup_hooks(this._prop_container);};FW_HTMLForm_LOV._event_select_list_onkeydown=function(A){A=A?A:event;var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onkeydown(A);return false;};FW_HTMLForm_LOV._event_select_list_onkeypress=function(A){A=A?A:event;var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onkeypress(A);return false;};FW_HTMLForm_LOV._event_select_list_onkeyup=function(A){A=A?A:event;var B=_fw_hf_getLOV(this._event_identifier);B._event_input_onkeyup(A);return false;};FW_HTMLForm_LOV._event_select_list_onclick=function(A){A=A?A:event;var B=_fw_hf_getLOV(this._event_identifier);B._event_options_onclick(A);return false;};FW_HTMLForm_LOV._event_select_list_onmousedown=function(A){A=A?A:event;var B=_fw_hf_getLOV(this._event_identifier);B._event_options_onmousedown(A);return false;};FW_HTMLForm_LOV._event_select_list_onfocus=function(A){A=A?A:event;var B=_fw_hf_getLOV(this._event_identifier);return B._event_options_onfocus(A);};FW_HTMLForm_LOV._event_select_list_onblur=function(A){A=A?A:event;var B=_fw_hf_getLOV(this._event_identifier);return B._event_options_onblur(A);};FW_HTMLForm_LOV_Select.prototype._event_onunload=function(A){this._option_list=null;};function FW_HTMLForm_LOV_Combo(A){this.name="LOVCombo";this._element_name="FWCOMBO";this._init_args(A);this.length=null;this.wrap_length=null;this.button_caption="Select";this.lov_selected_class_name="LOVSelected";this.lov_class_name="LOVCombo";this.lov_value_class_name="LOVValue";this.option_list_class_name="LOVOptionList";this.option_class_name="LOVOption";this.data_timer="1000";this.show_button=true;this.show_input=true;this.show_list=true;this.button_style="image";this.autoselect=true;this.text_modifiable=true;this.default_to_list=false;this._element_type="fw_combo";this.propMethodMap={value:"value",disabled:"disabled",selectedIndex:"selectedIndex",className:"class_name",widget_style:"style",left:"left",top:"top",options:"options"};this.styleMethodMap={display:"style_display",visibility:"style_visibility"};this.method_map={add:_fw_html_lov_property_add_hook,add_event:_fw_html_property_add_event_hook,remove:_fw_html_lov_property_remove_hook,focus:_fw_html_property_focus_hook,blur:_fw_html_property_blur_hook,reset:_fw_html_property_reset_hook};this.styleList=["backgroundColor","border","width","height","display"];this.events={};return this;}FW_HTMLForm_LOV_Combo.prototype=new FW_HTMLForm_LOV();FW_HTMLForm_LOV_Combo.prototype.className="FW_HTMLForm_LOV_Combo";FW_HTMLForm_LOV_Combo.prototype.superclass=FW_HTMLForm_LOV.prototype;FW_HTMLForm_LOV_Combo.prototype.init=function(A){this._init_args(A);this.select=this.element;if(this.select.nodeName!="SELECT"){return false;}this.identifier=_fw_html_form_list.length;_fw_html_form_list.push(this);this.select=this.element;this.element=null;this._search_field=this;this._option_list=null;this._option_list=new FW_HTMLForm_OptionList({option_list_class_name:this.option_list_class_name,option_class_name:this.option_class_name,disabled:this.select.disabled,visible:this.show_list,widths:this.widths,header:this.header,profiler:this.profiler,display_type:this.display_type});this._copy_options();this._initialValue=this.input.value;return true;};FW_HTMLForm_LOV_Combo.prototype.select_range=function(C,A){if(this._input.createTextRange){var B=this._input.createTextRange();B.moveStart("character",C);B.moveEnd("character",A-this._input.value.length);B.select();}else{this._input.setSelectionRange(C,A);this._input.focus();}this._input.focus();};FW_HTMLForm_LOV_Combo.prototype._setup=function(){if(this.input.disabled==true){this.disabled(true);}if(this.length==null){this.length=this.input.size;}this.input.parentNode.replaceChild(this._container,this.input);this.select.parentNode.removeChild(this.select);this._copy_events(this.input);this._setup_hooks(this._prop_container);this._value_container.name=this.input.name;this._value_container.id=this.input.id+"_VALUE_CONTAINER";this._prop_container.id=this.input.id;this._prop_container.name=this.input.name;this._prop_container.form=this.input.form;this._style_element=this._input;this._setup_style_hooks(this._style_container);this.value(this.input.value);};FW_HTMLForm_LOV_Combo.prototype.reset=function(){this.value(this._initialValue);};FW_HTMLForm_LOV_Combo.prototype._create_prop_container=function(){var A=document.createElement("FWSELECT");A.identifier=this.identifier;A.type=this._element_type;A.id=this.input.id;A.form=this.input.form;A.value=this.value();return A;};FW_HTMLForm_LOV_Combo.prototype._event_input_onkeydown=function(B){var A=true;if(B.keyCode==40){this.show_options();this.selectedIndex(parseInt(this.selectedIndex())+1);this._option_list.show_selected();A=false;}else{if(B.keyCode==38){this.selectedIndex(parseInt(this.selectedIndex())-1);this._option_list.show_selected();A=false;}else{if(B.keyCode==13){if(this._option_list.displayed==true){this.selectedIndex(parseInt(this._option_list.selectedIndex()));this.hide_options();A=false;}else{A=true;}}else{if(B.keyCode==9){this.hide_options();A=true;}else{if(B.keyCode==27){this.hide_options();}}}}}return A;};FW_HTMLForm_LOV_Combo.prototype._event_input_onclick=function(A){return true;};FW_HTMLForm_LOV_Combo.prototype._event_input_onkeypress=function(A){return true;};FW_HTMLForm_LOV_Combo.prototype._event_input_onkeyup=function(A){if(A.ctrlKey==false&&String.fromCharCode(A.keyCode).search(/[A-Za-z0-9| ]/)>-1){this.value(this._input.value);if(this.search()){return false;}}return true;};FW_HTMLForm_LOV_Combo.prototype.search=function(){var B=-1;if(this.data_callback!=null){if(this._search_field.value().length>0){if(this._data_interval_id!=null){clearInterval(this._data_interval_id);}this._data_interval_id=setInterval("_fw_hf_getLOV("+this.identifier+")._data_callback(); ",this.data_timer);}}else{var C=0;var D=1;B=this._option_list.findText(this._search_field.value(),C,D,true);if(B>-1){var A=this._search_field.value();this.selectedIndex(B);this.valueHighlight(A,this._search_field.value());}}return false;};FW_HTMLForm_LOV_Combo.prototype.valueHighlight=function(A,B){if(B!=null){if(this.show_list==true){this.show_options();}if(this.autoselect==true){var D=A.length;var E=B.length;for(var C=0;C<A.length;C++){if(B.charAt(C)!=A.charAt(C)){D=C;return false;}}this._search_field.select_range(D,E);}return true;}};FW_HTMLForm_LOV_Combo.prototype.stop_search=function(){};FW_HTMLForm_LOV_Combo.prototype._event_input_onchange=function(){};FW_HTMLForm_LOV_Combo.prototype.selectedIndex=function(A){if(A!=null){if(this._option_list.options[A]!=null){this.value(this._option_list.options[A].text);this._update_property("selectedIndex");if(this._lastSelectedIndex!=A){this._call_event("onchange");}this._lastSelectedIndex=A;}else{this._option_list.selectedIndex(-1);}}else{if(this._option_list!=null){return this._option_list.selectedIndex();}}return false;};FW_HTMLForm_LOV_Combo.prototype.value=function(A){if(A!=null){select_idx=this._option_list.findText(A,0,1,false);this._option_list.selectedIndex(select_idx);if(this._value_container!=null){this._value_container.value=A;}if(this._input!=null){this._input.value=A;}}else{if(this._value_container!=null){return this._value_container.value;}}};function FW_HTMLForm_OptionList(A){this.visible=true;this._display_option_list_content;this._display_option_list;this.height=null;this._disabled=A.disabled;delete (A.disabled);this._init_args(A);this._option_list_class_name="LOVOptionList";this._option_class_name="LOVOption";this._option_selected_class_name="LOVSelected";if(A.option_list_class_name!=null){this._option_list_class_name=A.option_list_class_name;}if(A.option_class_name!=null){this._option_class_name=A.option_class_name;}this.options=new Array();this.disp_code=new Array();if(A.visible!=null){this.visible=A.visible;}if(this.visible==false){this._disabled=true;}this.widths=A.widths||[];this.header=A.header;this.display_type=A.display_type;this.displayed=false;this._regenerate=true;this._selectedIdx=-1;this.select_on_hover=true;this.init();}FW_HTMLForm_OptionList.prototype=new FW();FW_HTMLForm_OptionList.prototype.className="FW_HTMLForm_OptionList";FW_HTMLForm_OptionList.DISPLAY_TYPE_FIXED=1;FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT=2;FW_HTMLForm_OptionList.prototype.init=function(A){this._init_args(A);this.identifier=FW_HTMLForm_OptionList._option_list.length;FW_HTMLForm_OptionList._option_list.push(this);var B=document.createElement("DIV");B._drop_down=true;B.className=this._option_list_class_name;if(this.display_type==FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT){B.style.display="none";}document.body.appendChild(B);this._display_option_list=B;this.element=B;};FW_HTMLForm_OptionList._option_list=new Array();FW_HTMLForm_OptionList._getLOVOption=function(A){return FW_HTMLForm_OptionList._option_list[A];};function getIden(A){return A.split(/_/)[0];}function getIdx(A){return A.split(/_/)[1];}FW_HTMLForm_OptionList.prototype.remove_html=FW_HTMLForm.prototype.remove_html;FW_HTMLForm_OptionList.prototype._create=function(){var A='<table cellpadding="0" cellspacing="0" border="0">';var B="FW_HTMLForm_OptionList._getLOVOption(getIden(this.id))";if(this.header){A=FW.concat([A,"<tr><td>",this._generate_header(B),"</td></tr>"]);}A=FW.concat([A,'<tr><td><div id="_content" style="display: block; width: 100%; overflow: auto;"></div></td></tr></table>']);this._display_option_list.innerHTML=A;this._display_option_list_content=this._get_item("_content","DIV");this._display_option_list_content._drop_down=true;if(this.header){this._display_option_list_header=this._get_item("_header","TABLE");}if(this.display_type==FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT){this._layer=new FW_Layer({element:this._display_option_list,element_resize:this._display_option_list_content,enforce_boundary:true});if(FW.shadows_enabled){this._shadow=new FW_Shadow({element:this._display_option_list,shadow_top:false,width:4});}}if(this.top||this.left){this.move_to(this.left,this.top);}if(this.width){this.resize_to(this.width);}if(this.height){this.resize_to(null,this.height);}if(this.select_on_hover==true){this.onmouseover=FW.concat([B,".selectedIndex(getIdx(this.id), false); return true;"]);this.onmouseout=FW.concat([B,".selectedIndex(null, false); return true;"]);this.onmousedown=FW.concat([B,".clicked = true; return true;"]);}else{this.onmousedown=FW.concat([B,".selectedIndex(getIdx(this.id), false); return true;"]);}this._created=true;};FW_HTMLForm_OptionList.prototype._get_item=function(D,C){var A=this._display_option_list.getElementsByTagName(C);var B=A.length;while(B--){if(A[B].id==D){return A[B];break;}}};FW_HTMLForm_OptionList.prototype._generate_footer=function(){};FW_HTMLForm_OptionList.prototype._generate_header=function(G){if(this.header==null){return"";}var A=FW.concat([G,".do_sort(getIdx(this.id), this);"]);var E=FW.concat([G,"._header_down(this);"]);var F=FW.concat([G,"._header_up(this);"]);var C="";C=FW.concat([C,'<table id="_header" width="100%" cellpadding="0" cellspacing="0">','<tr class="LOVOption LOVOptionHeader">']);for(var B=0;B<this.header.length;B++){var D;if(this.widths[B]){D=this.widths[B];}else{D=parseInt(100/this.header.length)+"%";this.widths[B]=D+"%";}C=FW.concat([C,"<th title='Sort column' style='cursor: pointer;' _drop_down='1' class='_drop_down' id='",this.identifier,"_",B,"' onclick='",A,"' onmousedown='",E,"' onmouseup='",F,"' width='"+D+"'>",this.header[B],"</th>"]);}C=FW.concat([C,"</tr></table>"]);return C;};FW_HTMLForm_OptionList.prototype._header_down=function(A){A.className+=" LOVOptionHeaderDown";return false;};FW_HTMLForm_OptionList.prototype._header_up=function(A){A.className=A.className.replace("LOVOptionHeaderDown","");return false;};FW_HTMLForm_OptionList.prototype.do_sort=function(A,E){var G=new Array();var B=this.options.length;for(var F=0;F<B;F++){if(this.options[F].columns!=null){G.push(this.options[F].columns[A]);}}if(this._sort_tr){this._sort_tr.className=this._sort_tr.className.replace(/LOVOptionHeader.*/,"");}G=G.sort();if(this._sort_idx==A){E.className+=" LOVOptionHeaderSortDesc";G.reverse();this._sort_idx=null;}else{E.className+=" LOVOptionHeaderSortAsc";this._sort_idx=A;}this._sort_tr=E;var H=G.length;var C=new Array();for(var D=0;D<H;D++){for(var F=0;F<B;F++){if(this.options[F].columns[A]==G[D]){C.push(this.options[F]);this.options.splice(F,1);B--;}}}this._remove_all();B=C.length;for(var F=0;F<B;F++){this.options.push(C[F]);}this._generate_display();};FW_HTMLForm_OptionList.prototype.update_header=function(){this._display_option_list_header.parentNode.innerHTML=this._generate_header("FW_HTMLForm_OptionList._getLOVOption(getIden(this.id))");this._display_option_list_header=this._get_item("_header","TABLE");};FW_HTMLForm_OptionList.prototype.update_display=function(){this._generate_display();};FW_HTMLForm_OptionList.prototype._generate_display=function(){if(this._created!=true){this._create();}if(this._display_option_content_table){this._display_option_content_table.parentNode.removeChild(this._display_option_content_table);this._display_option_content_table=null;}var C=new Array();C.push('<table class="LOVListContent" style="width: 100%;" height="*" border="0" cellpadding="0" cellspacing="0">');var L=0;var H=1;var J=this.options;var I=this.options.length;for(var N=0;N<I;N++){if(J[N].columns!=null){H=J[N].columns.length;}}for(var N=0;N<I;N++){var F;if(L%2==0){F=this._option_class_name;}else{F=this._option_class_name+" LOVOptionAlt ";}F+=" LOVOptionRow"+N;C.push("<tr ","onmouseover ='",this.onmouseover,"' ","onmouseout  ='",this.onmouseout,"' ","onclick ='",this.onmousedown,"' ","class='",F,"' ","id='"+this.identifier,"_",L,"'",">");if(J[N].columns!=null){var A=J[N].columns.length;if(J[N].clear_cells){J[N].clear_cells();}for(var E=0;E<A;E++){var B;if(this.widths[E]){B=this.widths[E];}var D=1;if((J[N].columns.length-1)==E){D=(H-E);}var K=" LOVOptionColumn LOVOptionColumn"+E+" ";if(E==A-1){K=K+"LOVOptionColumnLast ";}var M=this.identifier+"_"+L+"_"+E;if(!J[N].cell_access||J[N].cell_access(E)!=FW.MODE_ACCESS_OMITTED){C.push("<td id='",M,"' class='",K,"' ","width='",B,"' ","colspan='",D,"' ",">",J[N].columns[E],"</td>");}if(J[N].add_cell){J[N].add_cell(M);}}}else{var D=H;C.push("<td ","width='",B,"' ","colspan='",D,"' ",">",J[N].text,"</td>");}L++;C.push("</tr>");}C.push("</table>");var G=FW.concat(C);var C;this._display_option_list_content.innerHTML=G;this._display_option_content=this._display_option_list_content.childNodes[0].tBodies[0];this._display_option_content_table=this._display_option_list_content.childNodes[0];this.selectedIndex(this.selectedIndex());this._size_content();this._regenerate=false;};FW_HTMLForm_OptionList.prototype.disabled=function(B){if(B!=null){this._disabled=B;var A=this._display_option_list_content;if(A!=null){if(this._disabled){A.className+=" Disabled";}else{A.className=A.className.replace("Disabled","");}}}else{return this._disabled;}};FW_HTMLForm_OptionList.prototype.display=function(){if(this.displayed==true){return true;}this.clicked=false;this._prevSelected=this.selectedIndex();if(this._regenerate==true){this._generate_display();}else{this.move_to(this.left,this.top);}this.displayed=true;if(this.display_type==FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT){this._layer.show();this._layer.bring_to_top();if(this._shadow){this._shadow.apply();}}else{this._display_option_list.style.display="block";}if(this.effect_display&&this.display_type==FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT){this.effect_display.element=this._display_option_list;this.effect_display.apply();}};FW_HTMLForm_OptionList.prototype.move_to=function(A,B){if(this._layer){this._layer.move_to(A,B);}};FW_HTMLForm_OptionList.prototype.resize_to=function(A,B){if(this._layer){this._layer.resize_to(A,B);}else{if(A!=null&&A>0){this._display_option_list_content.style.width=A+"px";}if(B!=null&&B>0){this._display_option_list_content.style.height=B+"px";}}if(A!=null){if(this.header){if(A!=null&&A>0){this._display_option_list_header.style.width=(A);}}}};FW_HTMLForm_OptionList.prototype.height=function(A){this.resize_to(null,A);};FW_HTMLForm_OptionList.prototype.focus=function(){this._display_option_list.className=this._option_list_class_name+" LOVOptionListSelected";return true;};FW_HTMLForm_OptionList.prototype.blur=function(){this._display_option_list.className=this._option_list_class_name;return true;};FW_HTMLForm_OptionList.prototype.scrollFrame=function(){if(this._display_option_content==null){return ;}this._display_option_list_content.scrollTop=parseInt(this._display_option_content.scrollHeight)*(parseInt(this.selectedIndex())/parseInt(this.options.length));};FW_HTMLForm_OptionList.prototype.hide=function(){if(this.displayed==false){return true;}if(this.clicked==false){this.rollback();}this.displayed=false;if(this.effect_hide){var A=this;this.effect_hide.element=this._display_option_list;this.effect_hide.oncomplete=function(){A._display_option_list.style.display="none";A.effect_hide.oncomplete=null;};this.effect_hide.apply();}else{if(this.display_type==FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT){this._layer.hide();}else{FW_Element.hide(this._display_option_list);}}if(this._shadow){this._shadow.remove();}this.clicked=false;};FW_HTMLForm_OptionList.prototype._get_node=function(A){var B=this._display_option_content;if(B!=null&&B.childNodes[A]!=null){return B.childNodes[A];}};FW_HTMLForm_OptionList.prototype.selectedIndex=function(A,D){if(A!=null){this._pendingSelectedIdx=A;this.call_event("rowselect",null,"before");if(this._created){var B=A;if(A==null||A==-1||A>this.options.length-1){return false;}var C=this._get_node(B);if(this._disabled!=true&&C!=null){this._highlight(C);if(this.options[A].edit){if(this._selectedIdx>=0&&this.options[this._selectedIdx]){this.options[this._selectedIdx].view();}this.options[A].edit();}}if(D!=false){this._prevSelected=A;}}this._selectedIdx=A;this.call_event("rowselect",null,"after");return true;}else{return this._selectedIdx;}return true;};FW_HTMLForm_OptionList.prototype.selectedOption=function(){var A=this.selectedIndex();if(A>-1&&A!=null){return this.options[A];}else{return false;}};FW_HTMLForm_OptionList.prototype.rollback=function(){this.selectedIndex(this._prevSelected);};FW_HTMLForm_OptionList.prototype.add=function(D,B){this._regenerate=true;if(B==null){this.options.push(D);return ;if(this._selectedIdx==-1){this.selectedIndex(this.options.length-1);}}else{var C=this.options;this._remove_all();for(var A=0;A<C.length;A++){if(C[A]==B){this.add(D);}this.add(C[A]);}}};FW_HTMLForm_OptionList.prototype.remove=function(B){if(this.options==null||this.options.length==0){return ;}if(B==null){return false;}var E=new Array();var A=0;var D=0;for(var C=0;C<this.options.length;C++){if(this.options[C].value==B.value){if(this._display_option_content!=null&&this._display_option_content.childNodes!=null&&this._display_option_content.childNodes[C+D]!=null){FW_Element.remove(this._display_option_content.childNodes[C+D]);}this.options.splice(C,1);continue;}if(this._display_option_content!=null&&this._display_option_content.childNodes!=null&&this._display_option_content.childNodes[C+D]!=null){var F=this._option_class_name;if(A%2!=0){F+=" LOVOptionAlt";}this._display_option_content.childNodes[A+D].className=F;this._display_option_content.id=this.identifier+"_"+A;}A++;}this._options_sized=false;return true;};FW_HTMLForm_OptionList.prototype._remove_all=function(){if(this._created&&this._display_option_content){for(var A=this._display_option_content.childNodes.length-1;A>=0;A--){FW_Element.remove(this._display_option_content.childNodes[A]);}}this.options=new Array();};FW_HTMLForm_OptionList.prototype._add_disp=function(idx,text){var t=this._display_option_content;var tr=document.createElement("TR");if(idx%2!=0){classname=this._option_class_name+" LOVOptionAlt";}else{classname=this._option_class_name;}tr.id=this.identifier+"_"+idx;tr.className=classname;for(var col=0;col<this.options[idx].columns.length;col++){var width;if(this.widths[col]){width=this.widths[col];}classname+=" Column"+col;var td=document.createElement("TD");td.width=width;td.innerHTML=this.options[idx].columns[col];tr.appendChild(td);}t.appendChild(tr);tr.onmouseover=eval("function() {"+this.onmouseover+"}");tr.onmouseout=eval("function() {"+this.onmouseout+"}");tr.onmousedown=eval("function() {"+this.onmousedown+"}");return ;};FW_HTMLForm_OptionList.prototype.max_option_size=function(){var B=0;for(var C=0;C<this.options.length;C++){var A;if(this.options[C].columns!=null){A=this.options[C].columns.join("");}else{A=this.options[C].text;}if(A.length>B){B=A.length;}}if(this.header){var A=this.header.join("");if(A.length>B){B=A.length;}}return B;};FW_HTMLForm_OptionList.prototype._highlight=function(B){if(this.last_selected!=null){this.last_selected.className=this._option_class_name;var A=this.last_selected.id.split(/_/)[1];if(A%2!=0){this.last_selected.className+=" LOVOptionAlt";}this.last_selected.className+=" LOVOptionRow"+A;}var A=B.id.split(/_/)[1];B.className=this._option_class_name+" "+this._option_selected_class_name+" LOVOptionRow"+A;this.last_selected=B;};FW_HTMLForm_OptionList.prototype.show_selected=function(){if(this.options.length==0||this._created!=true){return ;}var A=this._get_node(this.selectedIndex());if(A==null){this.selectedIndex(0);A=this._get_node(this.selectedIndex());}if(A){A.scrollIntoView(false);}};FW_HTMLForm_OptionList.prototype._size_content=function(){var C=300;var B=this.height;if(this.auto_height){B=(this.options.length*18);B=(B<C)?(B):(C);this.resize_to(null,B);}if(FW_Element.height(this._display_option_content_table)>B){var A=(this.width)-18;if(A>0){this._display_option_content_table.style.width=(A)+"px";if(this.header){this._display_option_list_header.style.width=(A)+"px";}}}else{if(this.header){if(this.width>0){this._display_option_list_header.style.width=this.width+"px";}}}};FW_HTMLForm_OptionList.prototype.findText=function(C,D,F,A){if(A==null){A=true;}if(A==true){C=C.toLowerCase();}if(D==null){D=0;}if(F==1){for(var B=D;B<this.options.length;B++){var E=this._check(this.options[B].text,C,A);if(E!=false){return B;}}for(var B=0;B<D;B++){var E=this._check(this.options[B].text,C,A);if(E!=false){return B;}}}else{if(F==-1){for(var B=D;B>0;B--){var E=this._check(this.options[B].text,C,A);if(E!=false){return B;}}for(var B=this.options.length-1;B>D;B--){var E=this._check(this.options[B].text,C,A);if(E!=false){return B;}}}}return -1;};FW_HTMLForm_OptionList.prototype.findValue=function(E,D,F,A){var B=this.options.length;for(var C=0;C<B;C++){if(this.options[C].value==E){return C;}}return -1;};FW_HTMLForm_OptionList.prototype._check=function(B,C,A){var D;if(A){D=this.remove_html(B.toLowerCase());D=D.replace(/^\s+/,"");if(D.search("^"+C)>-1){return true;}}else{if(B==C){return true;}}return false;};function FW_HTMLForm_Option(C,B,A){this.text=new String(C);this.value=new String(B);this.columns=this.text.split(/\|/);this.defaultSelected=A;this.value_text=this.columns[0];this.original_text=this.text;if(this.columns.length>1){this.columns.shift();this.text=this.columns[0];}}function FW_HTMLForm_SearchField(A){if(A.profiler!=null){this.profiler=A.profiler;}else{this.profiler=this._default_profiler;}this._value="";this.top=10;this.left=10;this._create();}FW_HTMLForm_SearchField.prototype=new FW_HTMLForm();FW_HTMLForm_SearchField.prototype.className="FW_HTMLForm_SearchField";FW_HTMLForm_SearchField.prototype._create=function(){this._div=document.createElement("DIV");this._div.className="LOVSearch";this._div.width="1px";this._div.style.display="none";document.body.appendChild(this._div);};FW_HTMLForm_SearchField.prototype.add_char=function(A){this._value+=A;this._update();};FW_HTMLForm_SearchField.prototype._update=function(){if(this._value.length==0){this.hide();}else{this._div.innerHTML=this._value.replace(/\s/g,"&nbsp;");}return true;};FW_HTMLForm_SearchField.prototype.remove_char=function(A){this._value=this._value.substr(0,this._value.length-1);this._update();};FW_HTMLForm_SearchField.prototype.display=function(){if(this._value.length==0){return false;}this._div.style.top=this.top+"px";this._div.style.left=this.left+"px";this._div.style.position="absolute";this._div.style.display="";this._div.style.zIndex=100000;return true;};FW_HTMLForm_SearchField.prototype.clear=function(){this._value="";};FW_HTMLForm_SearchField.prototype.hide=function(){this._div.style.display="none";};FW_HTMLForm_SearchField.prototype.select_range=function(C,A){return ;if(this._div.createTextRange){var B=this._div.createTextRange();B.moveStart("character",C);B.moveEnd("character",A-this._input.value.length);B.select();}else{this._div.setSelectionRange(C,A);}};FW_HTMLForm_SearchField.prototype.value=function(){return this._value;};function _fw_html_form_document_onclick(A){A=(A?A:event);if(FW_HTMLForm_LOV._current_displayed!=null){if(A.target&&(A.target._drop_down||A.target.className.search("_drop_down")>-1)){return true;}if(A.srcElement&&A.srcElement._drop_down){return true;}FW_HTMLForm_LOV._current_displayed.hide_options();FW_HTMLForm_LOV._current_displayed=null;}return true;}EventHandler.addEvent(document,"click",_fw_html_form_document_onclick);
