RegExp.prototype.match=RegExp.prototype.test;function FW(a){}FW.effects_enabled=false;FW.shadows_enabled=true;FW.DO_QUERY=1;FW.DO_INSERT=2;FW.DO_UPDATE=3;FW.DO_DELETE=4;FW.DO_QUERY_UPDATE=5;FW.FIRST_PAGE=6;FW.LAST_PAGE=7;FW.NEXT_PAGE=8;FW.PREV_PAGE=9;FW.DO_QUERY_NO_UPDATE=10;FW.DO_CHANGE_DISPLAY_ROWS=11;FW.DO_SORT=12;FW.WIDGET_RELATIONSHIP_CALLBACK=13;FW.CHANGE_PAGE=14;FW.CHANGE_MODE_INSERT="ChModeInsert";FW.CHANGE_MODE_UPDATE="ChModeUpdate";FW.CHANGE_MODE_QUERY="ChModeQuery";FW.QUERY_MODE=1;FW.INSERT_MODE=2;FW.UPDATE_MODE=3;FW.CLEAR_BEHAVIOUR_NONE=1;FW.CLEAR_BEHAVIOUR_RESET=2;FW.CLEAR_BEHAVIOUR_CLEAR=3;FW.VIEW_MODE_SINGLE="Single";FW.VIEW_MODE_MULTI="Multi";FW.DEBUG_LOG_LEVEL=32000;FW.EVENT_LOG_LEVEL=31999;FW.VALIDATION_LOG_LEVEL=31998;FW.SUBMIT_LOG_LEVEL=31997;FW.COOKIE_LOG_LEVEL=31996;FW.DYNAMIC_TABLE_LOG_LEVEL=31995;FW.EXTERNAL_REQUEST_LOG_LEVEL=31994;FW.WIDGET_RELATIONSHIP_LOG_LEVEL=31993;FW.PROFILE_LOG_LEVEL=31992;FW.SORT_DIRECTION_ASCENDING="Asc";FW.SORT_DIRECTION_DESCENDING="Desc";FW.WIDGET_NAV_FIRST_PAGE="NavFirstPage";FW.WIDGET_NAV_LAST_PAGE="NavLastPage";FW.WIDGET_NAV_PREV_PAGE="NavPrevPage";FW.WIDGET_NAV_NEXT_PAGE="NavNextPage";FW.MESSAGE_TYPE_ERROR=1;FW.MESSAGE_TYPE_SUCCESS=2;FW.MESSAGE_TYPE_INFO=3;FW.WIDGET_TEXTFIELD_ONFOCUS_SELECT_TEXT=1;FW.WIDGET_TEXTFIELD_ONFOCUS_CURSOR_LAST_CHAR=2;FW.WIDGET_TEXTFIELD_ONFOCUS_CURSOR_FIRST_CHAR=3;FW.WIDGET_TYPE_LIST=1;FW.WIDGET_TYPE_TEXTFIELD=2;FW.WIDGET_TYPE_TEXTAREA=3;FW.WIDGET_TYPE_LINK=4;FW.WIDGET_TYPE_LINK_BUTTON=5;FW.WIDGET_TYPE_LINK_IMAGE=6;FW.WIDGET_TYPE_CHECKBOX=7;FW.WIDGET_TYPE_RADIO=8;FW.WIDGET_TYPE_UNKNOWN=9;FW.WIDGET_TYPE_FILE=10;FW.WIDGET_RENDER_TYPE_BROWSER=1;FW.WIDGET_RENDER_TYPE_INTERNAL=2;FW.KEY_NONE=null;FW.KEY_BACKSPACE=8;FW.KEY_TAB=9;FW.KEY_ENTER=13;FW.KEY_SHIFT=16;FW.KEY_CTRL=17;FW.KEY_ALT=18;FW.KEY_PAUSE=19;FW.KEY_ESC=27;FW.KEY_SPACE=32;FW.KEY_PAGE_UP=33;FW.KEY_PAGE_DOWN=34;FW.KEY_INSERT=45;FW.KEY_DELETE=46;FW.KEY_DELETE=46;FW.KEY_END=35;FW.KEY_HOME=36;FW.KEY_LEFT=37;FW.KEY_UP=38;FW.KEY_RIGHT=39;FW.KEY_DOWN=40;FW.KEY_F1=112;FW.KEY_F2=113;FW.KEY_F3=114;FW.KEY_F4=115;FW.KEY_F5=116;FW.KEY_F6=117;FW.KEY_F7=118;FW.KEY_F8=119;FW.KEY_F9=120;FW.KEY_F10=121;FW.KEY_F11=122;FW.KEY_F12=123;FW.KEY_ADD=107;FW.KEY_SUBTRACT=109;FW.KEY_0=48;FW.KEY_1=49;FW.KEY_2=50;FW.KEY_3=51;FW.KEY_4=52;FW.KEY_5=53;FW.KEY_6=54;FW.KEY_7=55;FW.KEY_8=56;FW.KEY_9=57;FW.KEY_A=65;FW.KEY_B=66;FW.KEY_C=67;FW.KEY_D=68;FW.KEY_E=69;FW.KEY_F=70;FW.KEY_G=71;FW.KEY_H=72;FW.KEY_I=73;FW.KEY_J=74;FW.KEY_K=75;FW.KEY_L=76;FW.KEY_M=77;FW.KEY_N=78;FW.KEY_O=79;FW.KEY_P=80;FW.KEY_Q=81;FW.KEY_R=82;FW.KEY_S=83;FW.KEY_T=84;FW.KEY_U=85;FW.KEY_V=86;FW.KEY_W=87;FW.KEY_X=88;FW.KEY_Y=89;FW.KEY_Z=90;FW.KEY_SEMI_COLON=59;FW.KEY_EQUAL_SIGN=61;FW.KEY_COMMA=188;FW.KEY_DASH=189;FW.KEY_PERIOD=190;FW.KEY_FORWARD_SLASH=191;FW.KEY_GRAVE_ACCENT=192;FW.KEY_OPEN_BRACKET=219;FW.KEY_BACK_SLASH=220;FW.KEY_CLOSE_BRACKET=221;FW.KEY_SINGLE_QUOTE=222;FW.KEY_NUMPAD_0=96;FW.KEY_NUMPAD_1=97;FW.KEY_NUMPAD_2=98;FW.KEY_NUMPAD_3=99;FW.KEY_NUMPAD_4=100;FW.KEY_NUMPAD_5=101;FW.KEY_NUMPAD_6=102;FW.KEY_NUMPAD_7=103;FW.KEY_NUMPAD_8=104;FW.KEY_NUMPAD_9=105;FW.KEY_NUMPAD_ASTERISK=106;FW.KEY_NUMPAD_PLUS=107;FW.KEY_NUMPAD_DASH=109;FW.KEY_NUMPAD_PERIOD=110;FW.KEY_NUMPAD_FORWARD_SLASH=111;FW.KEY_ACTION_CALLBACK=0;FW.KEY_ACTION_IGNORE=1;FW.KEY_ACTION_PROGRAM_NAV_CANVAS_FORWARD=2;FW.KEY_ACTION_PROGRAM_NAV_CANVAS_BACK=3;FW.KEY_ACTION_PROGRAM_NAV_CANVAS_FIRST=4;FW.KEY_ACTION_CANVAS_NAV_WIDGET_FORWARD=5;FW.KEY_ACTION_CANVAS_NAV_WIDGET_BACK=6;FW.KEY_ACTION_CANVAS_NAV_WIDGET_FIRST=7;FW.KEY_ACTION_CANVAS_NAV_WIDGET_LAST=8;FW.KEY_ACTION_CANVAS_NAV_NEXT_ROW=9;FW.KEY_ACTION_CANVAS_NAV_PREVIOUS_ROW=10;FW.KEY_ACTION_CANVAS_NAV_CANVAS_FORWARD=11;FW.KEY_ACTION_CANVAS_SUBMIT_CANVAS=12;FW.KEY_ACTION_WIDGET_CLICK=13;FW.KEY_ACTION_WIDGET_FOCUS=14;FW.KEY_ACTION_WIDGET_BLUR=15;FW.KEY_SCOPE_PROGRAM=1;FW.KEY_SCOPE_CANVAS=2;FW.KEY_SCOPE_WIDGET=3;FW.KEY_SCOPE_LAST_WIDGET=4;FW.KEY_SCOPE_FIRST_WIDGET=5;FW.CLONE_NORMAL=1;FW.CLONE_COPY=2;FW.CLONE_IGNORE=3;FW.CURSOR_WAIT="wait";FW.CURSOR_DEFAULT="default";FW.ScriptFragment="<script[^>]*>([\\S\\s]*?)<\/script>";FW.FormFragment="<form[^>]*>";FW.prototype.className="FW";FW.prototype.init=function(a){this.logger=this.logger;this._init_args(a);return true};FW.prototype.destroy=function(a){FW._destroy(this,a)};FW._destroy=function(h,b){if(h==null||h._done_destroy){return}h._done_destroy=true;for(var d in h){var g=h[d];h[d]=null;if(g!=null&&b){if(g.destroy){g.destroy()}else{if(g.push){for(var c=0,a=g.length;c<a;c++){if(g[c]==null){continue}if(g[c].destroy){g[c].destroy(true)}else{FW._destroy(g[c],b)}}}}}}};FW.prototype._init_args=function(a){for(arg in a){this[arg]=a[arg]}};FW.extend=function(a,c){for(var b in c){a[b]=c[b]}return a};FW.prototype.clone_behaviour=function(){return{logger:FW.CLONE_COPY,profiler:FW.CLONE_COPY,element:FW.CLONE_COPY,event:FW.CLONE_IGNORE}};FW.eval=function(code){if(FW_Browser.Safari||(FW_Browser.Mozilla&&FW_Browser.version>=3)){var eScript=document.createElement("script");eScript.appendChild(document.createTextNode(code));document.documentElement.appendChild(eScript)}else{window.eval(code)}};FW.prototype.clone=function(b){if(b==null){b=true}var c=new this.constructor;var a={};if(this.clone_behaviour){a=this.clone_behaviour()}for(var d in this){if(!b){c[d]=this[d]}else{if(typeof this[d]=="object"&&this[d]!=null&&this[d].clone!=null){if(!a[d]||a[d]==FW.CLONE_NORMAL){c[d]=this[d].clone(b)}else{if(a[d]==FW.CLONE_COPY){c[d]=this[d]}}}else{if(typeof this[d]=="object"&&this[d]!=null&&this[d].constructor==Array){if(!a[d]||a[d]==FW.CLONE_NORMAL){c[d]=FW.copy_array(this[d])}else{if(a[d]==FW.CLONE_COPY){c[d]=this[d]}}}else{if(typeof this[d]=="object"&&this[d]!=null&&typeof(this[d].constructor)!="function"){if(!a[d]||a[d]==FW.CLONE_NORMAL){c[d]=FW.copy_hash(this[d])}else{if(a[d]==FW.CLONE_COPY){c[d]=this[d]}}}else{c[d]=this[d]}}}}}return c};FW.is_func=function(a){if(typeof(a)=="function"){return true}else{return false}};FW.is_array=function(a){if(a.length!=null&&a.shift!=null){return true}else{return false}};FW.toHTML=function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)};FW.is_element=function(a){return !!(a&&a.nodeType==1)};FW.is_array=function(a){return a!=null&&typeof a=="object"&&"splice" in a&&"join" in a};FW.is_function=function(a){return typeof a=="function"};FW.is_string=function(a){return typeof a=="string"};FW.is_number=function(a){return typeof a=="number"};FW.is_undefined=function(a){return typeof a=="undefined"};FW.decode=function(c){var a;try{a=decodeURIComponent(c)}catch(b){a=c}return a};FW.encode=function(a){return encodeURIComponent(a)};FW.concat=function(a){return a.join("")};FW.copy_array=function(d){if(d==null){return null}var b=new Array;var c=d.length;while(c--){if(typeof d[c]=="object"&&d[c]!=null&&d[c].constructor==Array){b[c]=FW.copy_array(d[c])}else{if(typeof d[c]=="object"&&d[c]!=null&&d[c].clone==null&&typeof(d[c].constructor)!="function"){b[c]=FW.copy_hash(d[c])}else{b[c]=d[c]}}}return b};FW.copy_hash=function(g){if(g==null){return null}var a={};for(var d in g){var c=g[d];if(typeof c=="object"&&c!=null&&c.constructor==Array){a[d]=FW.copy_array(c)}else{if(typeof c=="object"&&c!=null&&c.clone==null&&typeof(c.constructor)!="function"){a[d]=FW.copy_hash(c)}else{a[d]=c}}}return a};FW.concat_hash=function(c,a){for(var b in c){a[b]=c[b]}return a};FW.remove_html=function(b){var a=String(b).replace(/<.*?>/g,"");return a};FW.init_cap=function(a){return(a.charAt(0).toUpperCase()+a.substring(1))};FW.object_properties=function(){var a=" ";var c=0;for(var b in myObject){c++;a+=b+",";if(c==5){a+="\n";c=0}}return(a)};FW.prototype.call_event=function(h,g,d){if(this._event_list==null){return null}for(var c=0,b=this._event_list.length;c<b;c++){var a=this._event_list[c];if(d&&a.timing!=d){continue}if(a.event==h){return a.func.call(a.scope?a.scope:this,g)}}return null};FW.prototype.add_event=function(g,d,c,a,b){if(this._event_list==null){this._event_list=[]}this._event_list.push({event:g,func:d,scope:b,timing:c})};Function.prototype.bind=function(c,b){var a=this;if(!b){b=[]}return function(){return a.apply(c,b.concat())}};Function.prototype.delay=function(c,b){var a=this;if(!b){b=[]}return window.setTimeout(function(){return a.apply(a,b.concat())},c)};String.interpret=function(a){return a==null?"":String(a)};FW.extend(String.prototype,{gsub:function(g,c){var a="",d=this,b;c=arguments.callee.prepareReplacement(c);while(d.length>0){if(b=d.match(g)){a+=d.slice(0,b.index);a+=String.interpret(c(b));d=d.slice(b.index+b[0].length)}else{a+=d,d=""}}return a},sub:function(c,a,b){a=this.gsub.prepareReplacement(a);b=Object.isUndefined(b)?1:b;return this.gsub(c,function(d){if(--b<0){return d[0]}return a(d)})},scan:function(b,a){this.gsub(b,a);return String(this)},truncate:function(b,a){b=b||30;a=Object.isUndefined(a)?"...":a;return this.length>b?this.slice(0,b-a.length)+a:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(FW.ScriptFragment,"img"),"")},stripForms:function(){return this.replace(new RegExp(FW.FormFragment,"img"),"")},extractScripts:function(){var d=new RegExp(FW.ScriptFragment,"img");var b=new RegExp(FW.ScriptFragment,"im");var c=this.match(d)||[];var a=[];for(i=0;i<c.length;i++){scriptTag=c[i];a.push((scriptTag.match(b)||["",""])[1])}return a},evalScripts:function(){scripts=this.extractScripts();for(var i in scripts){eval(scripts[i])}},escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var a=new Element("div");a.innerHTML=this.stripTags();return a.childNodes[0]?(a.childNodes.length>1?$A(a.childNodes).inject("",function(b,c){return b+c.nodeValue}):a.childNodes[0].nodeValue):""},toQueryParams:function(b){var a=this.strip().match(/([^?#]*)(#.*)?$/);if(!a){return{}}return a[1].split(b||"&").inject({},function(g,h){if((h=h.split("="))[0]){var c=decodeURIComponent(h.shift());var d=h.length>1?h.join("="):h[0];if(d!=undefined){d=decodeURIComponent(d)}if(c in g){if(!Object.isArray(g[c])){g[c]=[g[c]]}g[c].push(d)}else{g[c]=d}}return g})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?"":new Array(a+1).join(this)},camelize:function(){var d=this.split("-"),a=d.length;if(a==1){return d[0]}var c=this.charAt(0)=="-"?d[0].charAt(0).toUpperCase()+d[0].substring(1):d[0];for(var b=1;b<a;b++){c+=d[b].charAt(0).toUpperCase()+d[b].substring(1)}return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(b){var a=this.gsub(/[\x00-\x1f\\]/,function(c){var d=String.specialChar[c[0]];return d?d:"\\u00"+c[0].charCodeAt().toPaddedString(2,16)});if(b){return'"'+a.replace(/"/g,'\\"')+'"'}return"'"+a.replace(/'/g,'\\"')+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){var a=this;if(a.blank()){return false}a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return new Template(this,b).evaluate(a)}});function FW_Page(a){this.initialised=false}FW_Page.prototype=new FW;FW_Page.prototype.className="FW_Page";FW_Page.prototype.init=function(a){this.logger.srt(this,"init");this._init_args(a);this._setup_events();this.logger.end();return true};FW_Page.prototype.add_event=function(h,g,d,b){this.logger.srt(this,"add_event");var a={func:g,args:b,timing:d,event_name:h};var c=this._event_list[h];if(c==null){c=new Array();this._event_list[h]=c}c.push(a);this.logger.end()};FW_Page.prototype.call_event=function(d,b,c){var a={type:d};if(c!=null){a=c;a.type=d}else{a={type:d}}if(b==null){return this._event_handle(a)}else{return this._call_event(b,a)}};FW_Page.prototype.set_background_updater=function(a){this.background_updater=a};FW_Page.prototype._event_hook_before=function(a){return this._call_event("before",a)};FW_Page.prototype._event_handle=function(c){var b=c.type;if(c.event_type!=null){b=c.event_type}if(this._call_event("before",c)==false){return false}if(this._call_event("framework",c)==false){return false}var a=this._event_handle_list[b];if(a){if(a.call(this,c)==false){return false}}if(this._call_event("after",c)==false){return false}return true};FW_Page.prototype._event_hook_after=function(b,a){return this._call_event("after",b)};FW_Page.prototype._call_event=function(timing,evt){this.event=evt;var event_type=evt.type;evt.fw_target=this;if(evt.event_type!=null){event_type=evt.event_type}var event_list=this._event_list[event_type];if(event_list==null){evt.fw_target=null;return true}for(var i=0;i<event_list.length;i++){var event=event_list[i];if(event.timing==timing&&event.event_name==event_type){if(typeof(event.func)=="function"){var copy_args;if(event.args!=null){copy_args=FW.copy_array(event.args);this._resolve_args(copy_args)}if(event.func.call(this,copy_args,evt)==false){evt.fw_target=null;return false}}else{var ret=eval(event.func);if(ret==false){evt.fw_target=null;return false}}}}evt.fw_target=null;if(this.event.return_value==false){return false}return true};FW_Page.prototype._resolve_args=function(c){var b=c.length;while(b--){var a=c[b];if(a!=null&&typeof(a)!="string"){if(a.pop!=null){this._resolve_args(a)}else{if(a.name!=null&&a.canvas!=null){var d=Framework.get_canvas(a.canvas,a.view_mode);if(d!=null){c[b]=d.get_widget(a.name,a.rn)}}else{if(a.canvas!=null){c[b]=Framework.get_canvas(a.canvas,a.view_mode)}else{if(a.id!=null){c[b]=document.getElementById(a.id)}}}}}}};FW_Page.prototype._setup_events=function(a,b){if(a==null){a=this.element}if(b==null){b=this._event_handle_list}this.logger.srt(this,"_setup_events");if(a==null){this.logger.error("Cannot setup events, element is null");this.logger.end();return false}for(event_name in b){if(b[event_name]==null&&this._event_list[event_name]==null){continue}if(this.element.add_event){this.element.add_event("on"+event_name,FW_Page.prototype._event_handle,this)}else{EventHandler.addEvent(a,event_name,this._event_handle,this,true,false)}}this.logger.end()};FW_Page.prototype.left=function(){return FW_Element.left(this.element)};FW_Page.prototype.top=function(){return FW_Element.top(this.element)};FW_Page.prototype.width=function(){return FW_Element.width(this.element)};FW_Page.prototype.height=function(){return FW_Element.height(this.element)};FW_Page.prototype._key_action_ignore=function(){return false};function FW_PopForm(a){this.content=null;this.target=null;this.widget_map=null;this.link=null;this._init_args(a)}FW_PopForm.prototype=new FW;FW_PopForm.prototype.className="FW_PopForm";FW_PopForm.prototype.init=function(){return true};FW_PopForm.prototype.display=function(){var c=this.target;c.onload=this._set_value;c.onload_scope=this;c.width=parseInt(this.width);c.height=parseInt(this.height);if(this._displayed!=true){c.open();c.window.document.open();c.window.document.write(unescape(this.content));if(c.window){c.window.widgetMap=this.widget_map}else{c.widgetMap=this.widget_map}c.window.document.close();c._fw_pop_form_written=true;var b=this.link.left();var a=this.link.top()+this.link.height();if(c.autocenter==false&&c.type=="virtual"){c.move_to(b,a)}}else{c.open()}return true};FW_PopForm.prototype.hide=function(){this.target.close();return true};FW_PopForm.prototype._set_value=function(g){var d=this.target.window.document.POP_DATA;if(d==null){return false}var m=d.ROW_NUMBER;if(m==null){return false}var n=0;for(var h=0;h<m.length;h++){var a=1;for(var j=0;j<this.widget_map.length;j++){var k=this.widget_map[j];var b=document.getElementById(k[1]);if(b==null){continue}var c="$"+h+"_"+k[0];var l=d[c];if(b.value!=l.value){a=0;break}}if(a==0){m[h].checked=false;continue}else{n=1;m[h].checked=true;break}}if(n==0){m[0].checked=true}return true};function FW_DatePicker(a){this.element=null;this.mask=null;this.target=null;this.icon=null;this.icon_id=null;this._init_args(a)}FW_DatePicker.prototype=new FW;FW_DatePicker.prototype.className="FW_DatePicker";FW_DatePicker.prototype.init=function(){if(this.icon_id!=null){this.icon=document.getElementById(this.icon_id)}if(this.icon!=null){EventHandler.addEvent(this.icon,"click",this._event_icon_onclick,this)}return true};FW_DatePicker.prototype._event_icon_onclick=function(a){this.display()};FW_DatePicker.prototype._select_date=function(h,j,b,a,d,k){var c=new Date(h,j,b,a,d,k);var g=new FW_Type_Date({mask:this.mask});g.unformatted_value=c;this.widget.value(g.format());this.hide();return true};FW_DatePicker.prototype.display=function(){this.target.open();var m=this.element;var p=this.target;var q=this.mask;var l=have_mins=have_secs=false;var o=245;if(q.indexOf("%H")>=0){l=true;o+=35;if(q.indexOf("%M")>=0){have_mins=true;have_secs=(q.indexOf("%S")>=0)}}var n=(FW_Browser.Mozilla?window.innerWidth:document.body.offsetWidth);var g=(FW_Browser.Mozilla?window.innerHeight:document.body.offsetHeight);window.copy_to=m;window._date_picker_mask=q;var k=p.window.document;k.open();k.fw_page_loaded=false;k.writeln("<html>");k.writeln("<head><title>"+messages[3]+"</title></head>");k.writeln('<body class="Calendar" onload="date_picker_init();">');k.writeln("<script>");k.writeln("var w_parent, e_dst, e_year, e_month, e_cells = new Array (42) ;");k.writeln("<\/script>");k.writeln("<script>");k.writeln("// Include all CSS files in main document");k.writeln("var my_opener = (window.w_opener != null) ? ( window.w_opener) : ( window.opener )");k.writeln("var opena = window.opener || window.parent;");k.writeln("var link_list = opena.document.getElementsByTagName('LINK');");k.writeln("for (var i = 0; i < link_list.length; i++) {");k.writeln("    if (link_list[i].type != 'text/css') {");k.writeln("        continue;");k.writeln("    }");k.writeln("    var new_link = document.createElement('LINK'); ");k.writeln("    new_link.type = link_list[i].type;");k.writeln("    new_link.rel = link_list[i].rel;");k.writeln("    new_link.media = link_list[i].media;");k.writeln("    new_link.href = link_list[i].href;");k.writeln("    window.document.body.appendChild(new_link);");k.writeln("}");k.writeln("<\/script>");p.window.date_picker=this;k.writeln("<script>\n");k.writeln("var     have_hrs        = have_mins = have_secs = false,");k.writeln("e_hours         = new Object(),");k.writeln("e_minutes       = new Object(),");k.writeln("e_seconds       = new Object() ;");k.writeln("function date_picker_init ()");k.writeln("{");k.writeln("     var row, col, today ;");k.writeln("");k.writeln("     w_parent = window.w_opener || window.opener;");k.writeln("     e_dst = window.date_picker.element ;");k.writeln("     e_hours.value = e_minutes.value = e_seconds.value = 0 ;");k.writeln('     if (window.date_picker.mask.indexOf("%H") >= 0) {');k.writeln("             have_hrs = true ;");k.writeln('             if (window.date_picker.mask.indexOf("%M") >= 0) {');k.writeln("                     have_mins = true ;");k.writeln('                     have_secs = (window.date_picker.mask.indexOf("%S") >= 0) ;');k.writeln("             }");k.writeln("     }");k.writeln('     e_year = document.getElementById ("year").firstChild ;');k.writeln('     e_month = document.getElementById ("month") ;');k.writeln("     for (row = 0 ; row < 6 ; row++) {");k.writeln("             for (col = 0 ; col < 7 ; col++) {");k.writeln('                     e_cells [row * 7 + col] = document.getElementById ("c" + row + col).firstChild ;');k.writeln("             }");k.writeln("     }");k.writeln("     today = new Date() ;");k.writeln("     e_year.data = today.getFullYear() ;");k.writeln("     e_month.value = today.getMonth() ;");k.writeln("");k.writeln("     if (have_hrs) {");k.writeln('             e_hours = document.getElementById ("hours") ;');k.writeln("             e_hours.value = today.getHours() ;");k.writeln("             if (have_mins) {");k.writeln('                     e_minutes = document.getElementById ("minutes") ;');k.writeln("                     e_minutes.value = today.getMinutes() ;");k.writeln("                     if (have_secs) {");k.writeln('                             e_seconds = document.getElementById ("seconds") ;');k.writeln("                             e_seconds.value = today.getSeconds() ;");k.writeln("                     }");k.writeln("             }");k.writeln("     }");k.writeln("     date_picker_refresh_cal() ;");k.writeln('     window.title = "'+messages[3]+'";');k.writeln("     var opena = window.opener || window.parent;");k.writeln("     opena.FW_Window.get(window.name).loaded();");k.writeln("}");k.writeln("");k.writeln("function date_picker_change_month (i)");k.writeln("{");k.writeln("     var new_month = (e_month.value - 0) + i ;");k.writeln("     var new_year = (e_year.data - 0) ;");k.writeln("     if (new_month < 0) {");k.writeln("             new_month = 11 ;");k.writeln("             new_year-- ;");k.writeln("     }");k.writeln("     if (new_month > 11) {");k.writeln("             new_month = 0 ;");k.writeln("             new_year++ ;");k.writeln("     }");k.writeln("             e_year.data = new_year ;");k.writeln("             e_month.value = new_month ;");k.writeln("             date_picker_refresh_cal () ;");k.writeln("}");k.writeln("");k.writeln("function date_picker_change_year (i)");k.writeln("{");k.writeln("     var new_year = (e_year.data - 0) + i ;");k.writeln("             e_year.data = new_year ;");k.writeln("             date_picker_refresh_cal () ;");k.writeln("}");k.writeln("");k.writeln("function date_picker_refresh_cal ()");k.writeln("{");k.writeln("     var D,");k.writeln("             dom, dow,");k.writeln("             i ;");k.writeln("");k.writeln("//");k.writeln("//   Clear all cells to start with");k.writeln("//");k.writeln("     for (i = 0 ; i < 42 ; i++) {");k.writeln('             e_cells [i].data = "" ;');k.writeln("     }");k.writeln("     D = new Date (e_year.data, e_month.value, 1) ;");k.writeln("//");k.writeln("//   Fill in the rest of the days");k.writeln("//");k.writeln("     i = 0 ;");k.writeln("     while (true) {");k.writeln("             dom = D.getDate () ;");k.writeln("             dow = D.getDay () ;");k.writeln("                     e_cells[i * 7 + dow].data = dom ;");k.writeln("             if (dow == 6)");k.writeln("                     i++ ;");k.writeln("             D.setDate (dom + 1) ;");k.writeln("             if (D.getMonth() != e_month.value)");k.writeln("                     break ;");k.writeln("     }");k.writeln("}");k.writeln("");k.writeln("function date_picker_return_val (idx)");k.writeln("{");k.writeln("window.date_picker._select_date(e_year.data, e_month.value, e_cells[idx].data, e_hours.value, e_minutes.value, e_seconds.value); return false;");k.writeln("}");k.writeln("<\/script>");k.writeln("<form name=dummy>");k.writeln('<table cellpadding="0" cellspacing="0" class="MonthYearSelect">');k.writeln('<tr><td align="center">');k.writeln('<a onmouseover="document.month_minus.src=\'/images/framework/minus_sel.gif\' ;" onmouseout="document.month_minus.src=\'/images/framework/minus.gif\'" onclick="date_picker_change_month(-1) ;">');k.writeln('<image name="month_minus" src="/images/framework/minus.gif" border=0></a>');k.writeln('<select id="month" onchange="date_picker_refresh_cal() ;">');for(var h=0;h<12;h++){k.writeln("<option value="+h+">"+FW.init_cap(mth_long[h])+"</option>")}k.writeln("</select>");k.writeln('<a onmouseover="document.month_plus.src=\'/images/framework/plus_sel.gif\' ;" onmouseout="document.month_plus.src=\'/images/framework/plus.gif\'" onclick="date_picker_change_month(1) ;">');k.writeln('<image name="month_plus" src="/images/framework/plus.gif" border=0></a>');k.writeln('<a onmouseover="document.year_minus.src=\'/images/framework/minus_sel.gif\' ;" onmouseout="document.year_minus.src=\'/images/framework/minus.gif\'" onclick="date_picker_change_year(-1) ;">');k.writeln('<image name="year_minus" src="/images/framework/minus.gif" border=0></a>');k.writeln('<span id="year">0000</span>');k.writeln('<a onmouseover="document.year_plus.src=\'/images/framework/plus_sel.gif\' ;" onmouseout="document.year_plus.src=\'/images/framework/plus.gif\'" onclick="date_picker_change_year(1) ;">');k.writeln('<image name="year_plus" src="/images/framework/plus.gif" border=0></a>');k.writeln("</td></tr>");k.writeln('<tr><table cellpadding="0" cellspacing="0" class="Days"><tr>');for(var h=0;h<7;h++){k.writeln('<td  align="left" class="DayTitle '+(((h==0)||(h==6))?"DayWeekend":"DayWeek")+'"'+((h==0)?"":"")+">"+FW.init_cap(day_short[h])+"</td>")}k.writeln("</tr>");for(var h=0;h<6;h++){k.writeln("<tr>");for(var c=0;c<7;c++){k.writeln('<td  class="Day '+(((c==0)||(c==6))?"DayWeekend":"DayWeek")+'"'+((c==0)?"":"")+'><a onmouseout="this.className = this.className.replace(\'DayHighlight\', \'\')" onmouseover="this.className += \' DayHighlight\'" href="#" onclick="date_picker_return_val('+(h*7+c)+') ; return false;" id="c'+h+c+'">&nbsp;</a></td>')}k.writeln("</tr>")}k.writeln("</table></tr>");if(l){k.writeln('<tr><table cellpadding="0" cellspacing="0" class="TimeSelect"><tr><td align="center">');k.writeln('<image src="/images/framework/clock.gif" border=0><select id="hours">');for(h=0;h<24;h++){k.writeln("<option value="+h+">"+(h<10?"0":"")+h+"</option>")}k.writeln("</select>:");if(have_mins){k.writeln('<select id="minutes">');for(h=0;h<60;h++){k.writeln("<option value="+h+">"+(h<10?"0":"")+h+"</option>")}k.writeln("</select>:");if(have_secs){k.writeln('<select id="seconds">');for(h=0;h<60;h++){k.writeln("<option value="+h+">"+(h<10?"0":"")+h+"</option>")}k.writeln("</select>")}else{k.writeln("00")}}else{k.writeln("00:00")}k.writeln("</td></tr></table></tr>")}k.writeln("</table></form></body></html>");k.close();var b=element_left(m);var a=element_top(m)+m.offsetHeight;if(p.autocenter==false&&p.type=="virtual"){p.move_to(b,a)}if(FW_Browser.IE){k.body.onload.call(k)}return true};FW_DatePicker.prototype.hide=function(){this.target.close();return true};function FW_BubbleHint(){}FW_BubbleHint.prototype=new FW;FW_BubbleHint.prototype.className="FW_BubbleHint";FW_BubbleHint.RENDER_METHOD_INTERNAL=1;FW_BubbleHint.RENDER_METHOD_BROWSER=2;FW_BubbleHint.DISPLAY_TYPE_FLOAT=1;FW_BubbleHint.DISPLAY_TYPE_FIXED=2;FW_BubbleHint.css_class_name="BubbleHintDef";FW_BubbleHint.render_method=FW_BubbleHint.RENDER_METHOD_INTERNAL;FW_BubbleHint.display_type=FW_BubbleHint.DISPLAY_TYPE_FIXED;FW_BubbleHint._showing=false;FW_BubbleHint._initalised=false;FW_BubbleHint._init=function(){if(FW_BubbleHint._initalised==true){return true}if(FW_BubbleHint._element==null){var a=document.createElement("DIV");a.style.position="absolute";a.style.top=0;a.style.left=0;a.style.display="none";a.className=FW_BubbleHint.css_class_name;FW_BubbleHint._element=a;document.body.appendChild(a);FW_BubbleHint._layer=new FW_Layer({element:a,fit_to_boundary:false});if(FW.shadows_enabled){FW_BubbleHint._shadow=new FW_Shadow({element:a,shadow_top:false,shadow_left:false,width:4})}if(FW.effects_enabled){FW_BubbleHint._effect_show=new FW_Effect_Opacity({element:a,start:0,end:100,duration:0.3})}}FW_BubbleHint._initalised=true};FW_BubbleHint.attach=function(a,b){if(FW_BubbleHint.render_method==FW_BubbleHint.RENDER_METHOD_INTERNAL){EventHandler.addEvent(a,"mouseout",FW_BubbleHint._event_mouseout,a);EventHandler.addEvent(a,"mouseover",FW_BubbleHint._event_mouseover,a);EventHandler.addEvent(a,"mousemove",FW_BubbleHint._event_mousemove,a);a.fwtitle=b}else{a.title=b}};FW_BubbleHint.show=function(a){if(FW_BubbleHint._showing==false){FW_BubbleHint._init();FW_BubbleHint._layer.show();FW_BubbleHint._showing=true;if(FW_BubbleHint._effect_show){FW_BubbleHint._effect_show.apply()}}FW_BubbleHint._element.innerHTML=a;return true};FW_BubbleHint.move=function(a,b){FW_BubbleHint._layer.move_to(a,b);if(FW_BubbleHint._layer.x!=a||FW_BubbleHint._layer.y!=b){return false}return true};FW_BubbleHint.hide=function(){if(FW_BubbleHint._showing==true){if(FW_BubbleHint._effect_hide){FW_BubbleHint._effect_hide.apply()}else{FW_BubbleHint._layer.hide()}FW_BubbleHint._showing=false;if(FW_BubbleHint._shadow){FW_BubbleHint._shadow.remove()}}return true};FW_BubbleHint._event_mousemove=function(a){if(FW_BubbleHint._showing==true){if(FW_BubbleHint.display_type==FW_BubbleHint.DISPLAY_TYPE_FLOAT){if(a.pageX!=null){FW_BubbleHint.move(a.pageX-0,a.pageY+20)}else{FW_BubbleHint.move(a.clientX-0,a.clientY+20)}}}return true};FW_BubbleHint._event_mouseover=function(c){if(FW_BubbleHint._showing==false){FW_BubbleHint.show(this.fwtitle);if(FW_BubbleHint.display_type==FW_BubbleHint.DISPLAY_TYPE_FLOAT){if(c.pageX!=null){FW_BubbleHint.move(c.pageX-0,c.pageY-20)}else{FW_BubbleHint.move(c.clientX-0,c.clientY-20)}}else{var b=parseInt(FW_Element.top(this))+parseInt(FW_Element.height(this))+5;var a=parseInt(FW_Element.left(this))+5;if(!FW_BubbleHint.move(a,b)){b=parseInt(FW_Element.top(this))-parseInt(FW_Element.height(FW_BubbleHint._element))-5;a=parseInt(FW_Element.left(this))-5;FW_BubbleHint.move(a,b)}}if(FW_BubbleHint._shadow){FW_BubbleHint._shadow.apply()}}return true};FW_BubbleHint._event_mouseout=function(a){if(FW_BubbleHint._showing==true){FW_BubbleHint.hide(this)}return true};function FW_Message(a){}FW_Message.prototype=new FW;FW_Message.prototype.add=function(b,a){this.message_list.push({message:b,type:((a==null)?(FW.MESSAGE_TYPE_INFO):(a))})};FW_Message.prototype.show=function(b){if(this.message_list.length==0){return false}var a="";for(var c=0;c<this.message_list.length;c++){var d=this.message_list[c];a+=d.message+"\n"}alert(FW.remove_html(a));if(b!=false){this.flush()}};FW_Message.prototype.clear=function(){};FW_Message.prototype.flush=function(){this.message_list=new Array();return true};function FW_Message_Dialog(a){this.message_list=new Array();this._init_args(a)}FW_Message_Dialog.prototype.show=function(b){if(this.message_list.length==0){return false}var a="";for(var c=0;c<this.message_list.length;c++){var d=this.message_list[c];a+=d.message+"\n"}alert(FW.remove_html(a));if(b!=false){this.flush()}};FW_Message_Dialog.prototype=new FW_Message;function FW_Message_Pane(a){this.message_list=new Array();this.element=null;this.element_id=null;this._init_args(a)}FW_Message_Pane.prototype=new FW_Message;FW_Message_Pane.prototype.init=function(a){FW_Message.prototype.init.call(this,a);if(this.element_id!=null){this.element=document.getElementById(this.element_id)}};FW_Message_Pane.prototype.show=function(b){this.clear();for(var c=0;c<this.message_list.length;c++){var d=this.message_list[c];var a=document.createElement("P");if(d.type==FW.MESSAGE_TYPE_ERROR){a.className="ErrorMessage"}else{if(d.type==FW.MESSAGE_TYPE_SUCCESS){a.className="SuccessMessage"}else{a.className="InfoMessage"}}a.innerHTML=d.message;this.element.appendChild(a)}this.element.scrollTop=this.element.scrollHeight;if(b!=false){this.flush()}};FW_Message_Pane.prototype.clear=function(){var b=this.element.childNodes;var a=b.length;while(a--){FW_Element.remove(b[a])}};function FW_Request(a){this.url=null;this.method=FW_Request.default_method;this.param_list={};this.param_obj_list=null;this._init_args(a)}FW_Request.default_method="POST";FW_Request.prototype=new FW;FW_Request.prototype.add_param=function(a,b){this.param_list[a]=b};FW_Request.prototype.add_param_obj=function(a){this.param_obj_list.push(a)};FW_Request.prototype.clear_all_params=function(){this.param_obj_list=[];this.param_list={}};FW_Request.prototype.protocol=function(){var a=this.url;if(this.url!=null){if(this.url.search("(w+)::")>-1){return RegExp.$1}else{return null}}};FW_Request.prototype.hostname=function(){var a=this.url;if(this.url!=null){if(this.url.search("::(w+)/")>-1){return RegExp.$1}else{return null}}};FW_Request.prototype.path=function(){var a=this.url;if(this.url!=null){if(this.url.search("::w+/(w+)")>-1){return RegExp.$1}else{return null}}};FW_Request.prototype.parameters=function(){var b=[];if(this.param_obj_list!=null){for(var c=0;c<this.param_obj_list.length;c++){var d=this.param_obj_list[c].parameters();for(var a=0;a<d.length;a++){b.push(d[a])}}}for(key in this.param_list){b.push([key,this.param_list[key]])}return b};FW_Request.prototype.params=function(){return FW_Request.array_to_request(this.parameters())};FW_Request.prototype._get_url=function(){if(this.url!=null){return this.url}else{return FW_Browser.url()}};FW_Request.prototype.generate_get=function(a,b){if(typeof(a)=="undefined"){a=this._get_url()}if(typeof(b)=="undefined"){b=FW_Request.array_to_request(this.parameters())}if(b!=null){if(a.search("\\?")==-1){a+="?"}a+=b}return a};FW_Request.prototype.generate_post=function(b){if(b==null){b=this._get_url()}var a=document.createElement("form");a.action=b;a.method="POST";var d=this.parameters();for(var c=0;c<d.length;c++){input_obj=document.createElement("input");input_obj.type="hidden";input_obj.name=d[c][0];input_obj.value=d[c][1];a.appendChild(input_obj)}document.body.appendChild(a);return a};FW_Request.prototype.submit=function(){if(this.method=="GET"){FW_Browser.url(this.generate_request())}else{if(this.method=="POST"){this.generate_request().submit()}}};FW_Request.prototype.generate_request=function(){if(this.method=="GET"){return this.generate_get()}else{if(this.method=="POST"){return this.generate_post()}}};FW_Request.array_to_request=function(b){ret="";for(var a=0;a<b.length;a++){if(a>0){ret+="&"}ret+=FW.encode(FW.decode(b[a][0]))+"="+FW.encode(FW.decode(b[a][1]))}return ret};function FW_Request_Background(a){this.oncomplete=null;this.logger={};this.log_level=FW.EXTERNAL_REQUEST_LOG_LEVEL;this.headers={};this.identifier=null;this.data=null;this.method="GET";this.param_list={};this.param_obj_list=[];this.content_type="application/x-www-form-urlencoded";this.encoding="UTF-8";this.cache_request=false;this._init_args(a)}FW_Request_Background.prototype=new FW_Request;FW_Request_Background._request_queue=new Array();FW_Request_Background.prototype.submit=function(){Logger.srt(this,"submit");var a=this._get_url();if(this.cache_request==false){this.add_param("_FW_REQUEST_ID",FW_Request_Background._request_queue.length)}var c=null;if(this.method=="GET"){a=this.generate_get()}else{if(this.method=="POST"){if(this.data==null){c=FW_Request.array_to_request(this.parameters())}else{c=this.data}}}var b;if(window.XMLHttpRequest){var b=new XMLHttpRequest()}else{if(window.ActiveXObject){try{var b=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){alert("This site requires ActiveX to be enabled");Logger.end();return false}}}if(b){FW_Request_Background._request_queue.push({request:b,fw_request_obj:this});Logger.msg("URL "+a);b.onreadystatechange=FW_Request_Background._check_status;b.open(this.method,a,true);this._set_request_headers(b);b.send(c)}Logger.end();return true};FW_Request_Background.prototype._set_request_headers=function(a){var b={"X-Requested-With":"XMLHttpRequest","X-Framework-Version":"R0021",Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="POST"){b["Content-type"]=this.content_type+(this.encoding?"; charset="+this.encoding:"")}for(header in this.headers){b[header]=this.headers[header]}for(header in b){a.setRequestHeader(header,b[header])}};FW_Request_Background._check_status=function(){try{var a=FW_Request_Background._request_queue}catch(h){return false}var b=a.length;while(b--){var g=a[b];if(g==null){continue}var d=g.request;var c=g.fw_request_obj;if(d.readyState==4){c.requestText=d.responseText;c.result_text=d.responseText;c.result_xml=d.responseXML;if(c.result_text!=null||c.result_xml!=null){delete d.onreadystatechange;a[b]=null;if(c.oncomplete!=null){c.oncomplete.call(c)}c.call_event("complete")}else{}}}return true};function FW_Request_Background_Canvas(a){this.method="POST";this._init_args(a);this.param_list={};this.param_obj_list=[];this._canvas_list=new Array()}FW_Request_Background_Canvas.prototype=new FW_Request_Background;FW_Request_Background_Canvas.prototype.add_canvas=function(a){this.add_param_obj(new FW_RequestParams_Canvas({canvas:a}))};function FW_Request_Background_Updater(a){this.method="POST";this.update_mode="ReplaceContents";this.show_busy=true;this._init_args(a);this.param_list={};this.param_obj_list=[];this._canvas_list=new Array();this._event_list=[];this.headers={"X-Background-Request-ID":this.id};this._added_event=false}FW_Request_Background_Updater.MODE_REPLACE_CONTENTS="ReplaceContents";FW_Request_Background_Updater.MODE_REPLACE_ELEMENT="ReplaceElement";FW_Request_Background_Updater.MODE_APPEND="Append";FW_Request_Background_Updater.prototype=new FW_Request_Background;FW_Request_Background_Updater.prototype.row_num=function(a){this.headers["X-Background-Request-Row-Num"]=a;this._row_num=a};FW_Request_Background_Updater.prototype.update_element_id=function(){element_id=this.update.element;if(this._row_num==null){this.row_num(1)}element_id=element_id.replace("#row_num#",this._row_num);return element_id};FW_Request_Background_Updater.prototype.submit=function(){if(this.update_element_id()){this.set_busy(true)}if(!this._added_event){this.add_event("complete",this._event_oncomplete,"framework",[],this);this._added_event=true}FW_Request_Background.prototype.submit.call(this)};FW_Request_Background_Updater.prototype.set_busy=function(state){if(!this.show_busy){return}if(this.busy_js_function){var str=this.busy_js_function+"($(this.update_element_id()), state);";eval(str)}else{FW_Element.busy($(this.update_element_id()),state)}};FW_Request_Background_Updater.prototype._event_oncomplete=function(a){if(this.update_element_id()){this.set_busy(false);this.update_element(this.update_element_id())}};FW_Request_Background_Updater.prototype.update_element=function(b){var a=$(b);if(!a){Logger.srt();Logger.msg("No element found for id "+b);Logger.end();return}if(this.update_mode==FW_Request_Background_Updater.MODE_REPLACE_CONTENTS){FW_Element.update(a,this.result_text)}else{if(this.update_mode==FW_Request_Background_Updater.MODE_REPLACE_ELEMENT){FW_Element.replace(a,this.result_text)}}};function FW_Request_CanvasSubmit(a){this.canvas_name=null;this.submitting_canvas_name="UNKNOWN";this.submit_action=FW.DO_QUERY;this.action_id=null;this.param_list={};this.param_obj_list=[];this._init_args(a);this.add_param_obj(new FW_RequestParams_CanvasSubmit(a));this.param_list={}}FW_Request_CanvasSubmit.prototype=new FW_Request;FW_Request_CanvasSubmit.prototype.add_param=function(a,b){return this.param_obj_list[0].add_param(a,b)};function FW_RequestParams(a){this.param_list={};this._init_args(a)}FW_RequestParams.prototype=new FW;FW_RequestParams.prototype.add_param=function(a,b){this.param_list[a]=b};function FW_RequestParams_CanvasSubmit(a){this.canvas_name=null;this.submitting_canvas_name="UNKNOWN";this.submit_action=FW.DO_QUERY;this.action_id=null;this.param_list={};this._init_args(a)}FW_RequestParams_CanvasSubmit.prototype=new FW_RequestParams;FW_RequestParams_CanvasSubmit.prototype.parameters=function(){var g,j,h,b;if(this.submit_action==FW.DO_QUERY){g=FW.DO_QUERY;j=FW.QUERY_MODE}else{if(this.submit_action==FW.DO_QUERY_UPDATE){g=FW.DO_QUERY_UPDATE;j=FW.UPDATE_MODE}else{if(this.submit_action==FW.DO_INSERT){g=FW.DO_INSERT;j=FW.INSERT_MODE}else{if(this.submit_action==FW.DO_DELETE){g=FW.DO_DELETE;j=FW.QUERY_MODE}else{if(this.submit_action==FW.CHANGE_MODE_UPDATE||this.submit_action==FW.CHANGE_MODE_INSERT||this.submit_action==FW.CHANGE_MODE_QUERY){h=this.submit_action}else{if(this.submit_action!=null){b=this.submit_action}}}}}}if(g!=null){this.add_param("_ACTION",g)}if(j!=null){this.add_param("_MODE",j)}if(h!=null){this.add_param("_CHMODE",h)}if(b!=null){this.add_param("_CUSTOM_ACTION",b)}if(this.action_id!=null){this.add_param("_ACTION_ID",this.action_id)}if(this.submitting_canvas_name!=null){this.add_param("_SUBMITTING_CANVAS_NAME",this.submitting_canvas_name)}this.add_param("_CANVAS_NAME",this.canvas_name);var c=[];for(key in this.param_list){var d=this.param_list[key];if(d==null){continue}if(d.tagName!=null){d=d.value}else{if(d.id!=null){var a=document.getElementById(d.id);if(a!=null){d=a.value}}}d=String(d);c.push([this.canvas_name+"."+key,d])}return c};FW_RequestParams_CanvasSubmit.prototype.params=function(){return FW_Request.array_to_request(this.parameters())};function FW_RequestParams_Canvas(a){this.canvas=null;this.param_list={};this.submit_rowid=true;this._init_args(a)}FW_RequestParams_Canvas.prototype=new FW_RequestParams;FW_RequestParams_Canvas.prototype.parameters=function(){var m=[];var c=this.canvas;var d=c.name;var k=c._widget_list;var l=c.internal_field_list;if(c.rows){var g=c.rows.length;while(g--){var b="$"+g+"__ROWID";var p="$"+g+"__ROWVERSION";l.push(b,p)}}var g=l.length;while(g--){var a=l[g];if(!this.submit_rowid){if(a=="_ROWVERSION"||a=="_ROWID"){continue}}var n=c.get_field(a);var o;if((a=="_CANVAS_NAME"||a=="_SUBMITTING_CANVAS_NAME")&&(n.value==""||n.value==null)){o=d}else{if(n!=null){o=n.value}}if(o!=null){m.push([d+"."+a,o])}}var g=k.length;while(g--){var h=k[g];var o=h.value();var a=h.value_name();if(a==null||a==""||o==null){continue}m.push([a,o])}for(key in this.param_list){m.push([key,this.param_list[key]])}return m};FW_RequestParams_Canvas.prototype.params=function(){return FW_Request.array_to_request(this.parameters())};function FW_Page_Program(a){this._init_args(a);this._canvas_list=new Array();this._canvas_list_cache={};this._canvas_group_list=new Array();this._tab_group_list=new Array();this.message=null;this.key_handler=null;this.logger=a.logger;this.profiler=null;this.background_request_list=[];this._event_list={};this._event_handle_list={load:null,click:null,dblclick:null,keydown:null,keyup:null,mousedown:null,mouseout:null,mouseover:null,mouseup:null,mousemove:null};this._key_handle_list=new Array();this.initialised=false}FW_Page_Program.prototype=new FW_Page;FW_Page_Program.prototype.className="FW_Page_Program";FW_Page_Program.prototype.init=function(b){this.element=document;this._start_time=new Date();if(this.profiler==null){try{this.profiler=new Profile({log_level:FW.PROFILE_LOG_LEVEL,logger:this.logger})}catch(j){this.profiler={start:function(){},end:function(){},summary:function(){}}}}this.profiler.start(this,"init");FW_Page.prototype.init.call(this,b);this._setup_events(window,{resize:null,unload:null});this.profiler.start(this,"onload - before");if(this.call_event("load","before")==false){this.logger.end();this.profiler.end();return false}this.profiler.end();this.message=new FW_Message_Dialog();this.message.init({logger:this.logger});this.profiler.start(this,"Key handler");this.key_handler=new FW_KeyHandler({element:this.element});this.key_handler.init();this.key_handler.add_handler(FW.KEY_TAB,null,this._key_action_nav_forward,this);this.key_handler.add_handler(FW.KEY_TAB,FW.KEY_SHIFT,this._key_action_nav_back,this);for(var g=0;g<this._key_handle_list.length;g++){var h=this._key_handle_list[g];this._add_keyhandler(h[0],h[1],h[2],h[3])}this._key_handle_list=null;this.profiler.end();if(this.canvas_order){this.profiler.start(this,"Reorder canvases");var d=new Array();for(var g=0;g<this.canvas_order.length;g++){var c=this.canvas_order[g];var a=this.get_canvas(c[0],c[1]);if(a!=null){d.push(a)}}this._canvas_list=d;this.profiler.end()}this.init_canvases();for(var g=0;g<this._tab_group_list.length;g++){this._tab_group_list[g].init({profiler:this.profiler})}this._key_action_nav_canvas_forward(true);this._init_window();this.profiler.start(this,"onload - timing after");if(this.call_event("load","after")==false){this.logger.end();this.profiler.end();return false}this.profiler.end();this.initialised=true;this._init_toolbar();this.profiler.end();_fw_widget_render();return true};FW_Page_Program.prototype.init_canvases=function(){this.profiler.start(this,"Init canvases");for(var a=0;a<this._canvas_list.length;a++){var b=this._canvas_list[a];if(b.initialised==true){continue}if(b.message==null){b.message=this.message}b.init({key_handler:this.key_handler,profiler:this.profiler})}this.profiler.end();this.profiler.start(this,"Init canvas groups");for(var a=0;a<this._canvas_group_list.length;a++){var b=this._canvas_group_list[a];if(b.initialised==true){continue}if(b.message==null){b.message=this.message}b.init({key_handler:this.key_handler,profiler:this.profiler})}this.profiler.end()};FW_Page_Program.prototype.init_widgets=function(){var a=this._canvas_list.length;while(a--){if(this._canvas_list[a].init_widgets){this._canvas_list[a].init_widgets()}}};FW_Page_Program.prototype._event_onunload=function(a){return true};FW_Page_Program.prototype._init_window=function(){try{var a=FW_Window.me();a.loaded()}catch(b){}};FW_Page_Program.prototype._init_toolbar=function(){try{this.element.body.fw_js_time=(new Date()-this._start_time)*0.001;var a=(new Date()-fw_render_t1)*0.001;var g=(new Date()-fw_render_t2)*0.001;this.element.body.fw_js_time=a+" ["+g+"] ["+this.element.body.fw_js_time+"]"}catch(d){}if("createEvent" in document){var b=document.createElement("fwpageinfo");b.setAttribute("logger_enabled",this.logger.enabled);b.setAttribute("logger_pane_type",this.logger.logger_pane_type);b.setAttribute("fw_js_time",this.element.body.fw_js_time);b.setAttribute("fw_time",this.element.body.fw_time);b.setAttribute("fw_release",this.element.body.fw_release);b.setAttribute("fw_size",this.element.body.fw_size);b.setAttribute("fw_user",this.element.body.fw_user);b.setAttribute("fw_prog_version",this.element.body.fw_prog_version);b.setAttribute("fw_error",this.element.body.fw_has_errors);document.documentElement.appendChild(b);var c=document.createEvent("Events");c.initEvent("FWPageLoad",true,false);b.dispatchEvent(c)}};FW_Page_Program.prototype.add_background_request=function(a){this.background_request_list.push(a)};FW_Page_Program.prototype.get_background_request=function(b){var a=this.background_request_list.length;while(a--){br=this.background_request_list[a];if(br.id==b){return br}}return null};FW_Page_Program.prototype.add_keyhandler=function(b,a,d,c){if(this.initialised==false){this._key_handle_list.push([b,a,d,c])}else{this._add_keyhandler(b,a,d,c)}};FW_Page_Program.prototype._add_keyhandler=function(b,a,d,c){if(d!=null){if(d==FW.KEY_ACTION_PROGRAM_NAV_CANVAS_FORWARD){return this.key_handler.add_handler(b,a,this._key_action_nav_forward,this)}else{if(d==FW.KEY_ACTION_PROGRAM_NAV_CANVAS_BACK){return this.key_handler.add_handler(b,a,this._key_action_nav_back,this)}else{if(d==FW.KEY_ACTION_PROGRAM_NAV_CANVAS_FIRST){return this.key_handler.add_handler(b,a,this._key_action_nav_canvas_first,this)}else{if(d==FW.KEY_ACTION_IGNORE){return this.key_handler.add_handler(b,a,this._key_action_ignore,this)}else{if(d==FW.KEY_ACTION_CALLBACK){return this.key_handler.add_handler(b,a,c,this)}}}}}}return false};FW_Page_Program.prototype._key_action_nav_forward=function(a){this.logger.srt(this,"_key_action_nav_forward");this.logger.end();return this._key_action_nav_canvas_forward(true);return false};FW_Page_Program.prototype._key_action_nav_back=function(b){this.logger.srt(this,"_key_action_nav_back");this.logger.end();this._key_action_nav_canvas_back(true);var d=this._canvas_list;var a=d.length;while(a--){if(d[a].focused()==true){d[a].last_widget(true).focus()}}return false};FW_Page_Program.prototype._key_action_nav_canvas_forward=function(j){this.logger.srt(this,"_key_action_nav_canvas_forward");this.logger.end();var k=this._canvas_list;var d=k.length;var h=-1;while(d--){if(k[d].focused()==true){h=d}}var g=k[h];h++;var b=null;if(g!=null&&g.nav_forward!=null){b=g.nav_forward;h=0}for(var d=h;d<this._canvas_list.length;d++){var a=this._canvas_list[d];if(a==null||(b!=null&&a.name!=b)){continue}if(a.focus()){return false}else{if(a.nav_forward){b=a.nav_forward;h=0}}}for(var d=0;d<k.length;d++){var a=this._canvas_list[d];if(a!=null&&a.focus()){return false}}return true};FW_Page_Program.prototype._key_action_nav_canvas_back=function(j){this.logger.srt(this,"_key_action_nav_canvas_back");this.logger.end();var k=this._canvas_list;var d=k.length;var h=k.length-1;while(d--){if(k[d].focused()==true){h=d}}var g=k[h];var b=null;h--;if(g!=null&&g.nav_back!=null){b=g.nav_back;d=k.length}for(var d=h;d>-1;d--){var a=this._canvas_list[d];if(a==null||(b!=null&&a.name!=b)){continue}if(a.focus()){return false}else{if(a.nav_back){b=a.nav_back;d=k.length}}}for(var d=k.length;d>0;d--){var a=this._canvas_list[d];if(a!=null&&a.focus()){return false}}return true};FW_Page_Program.prototype._key_action_nav_canvas_first=function(){var d=this._canvas_list;for(var b=0;b<d.length;b++){var a=this._canvas_list[b];if(a!=null&&a.focus()){return false}}return true};FW_Page_Program.prototype.add_canvas=function(a,b){a.logger=this.logger;if(this.initialised==true){var d=this._canvas_list.length;while(d--){cvs=this._canvas_list[d];if(cvs.name==a.name&&cvs.view_mode==a.view_mode){if(b=="merge"){return cvs}else{this._canvas_list.splice(d,1)}}}}this._canvas_list.push(a);return a};FW_Page_Program.prototype.add_canvas_group=function(a){a.logger=this.logger;this._canvas_group_list.push(a);return a};FW_Page_Program.prototype.add_tab_group=function(a){a.logger=this.logger;this._tab_group_list.push(a);return a};FW_Page_Program.prototype.get_canvas=function(b,a){var d=this._canvas_list.length;for(var c=0;c<d;c++){var g=this._canvas_list[c];if(g.name==b){if(a!=null){if(g.view_mode==a){return g}else{continue}}return this._canvas_list[c]}}return null};FW_Page_Program.prototype.get_canvas_list=function(){return this._canvas_list};FW_Page_Program.prototype.get_canvas_group=function(b){for(var a=0;a<this._canvas_group_list.length;a++){if(this._canvas_group_list[a].name==b){return this._canvas_group_list[a]}}};FW_Page_Program.prototype.reload=function(){return FW_Browser.reload()};FW_Page_Program.prototype.url=function(a){return FW_Browser.url(a)};FW_Page_Program.prototype.busy=function(){var b=this._canvas_list.length;while(b--){var a=this._canvas_list[b];if(a.busy()){return true}}return false};function FW_Page_Canvas(a){this.name=null;this.id=null;this.element=null;this.message=null;this.key_handler=null;this.can_focus=true;this.nav_forward=null;this.nav_back=null;this._init_args(a);this._event_handle_list={click:this._event_onclick,dblclick:null,submitbefore:null,submitafter:null,action:null};this._mode=null;this._valid=true;this._key_handle_list=new Array()}FW_Page_Canvas.prototype=new FW_Page;FW_Page_Canvas.prototype.className="FW_Page_Canvas";FW_Page_Canvas.prototype.init=function(a){this.logger.srt(this,"init");this._init_args(a);if(this.initialised==true){this.logger.error("Already initialised canvas ["+this.id+"]");return false}this.profiler.start(this,"Resolve element");this.element=null;var b=document.forms.length;while(b--){if(document.forms[b].id==this.id){this.element=document.forms[b];break}}this.profiler.end();this.profiler.start(this,"Message init");if(this.message!=null){this.message.init({logger:this.logger})}this.profiler.end();if(this.element==null){this.logger.error("Couldnt find form with the name ["+this.name+"]")}this.profiler.start(this,"Resolve display element");if(this.display_element==null){var g=(this.view_mode==FW.VIEW_MODE_SINGLE)?("_SINGLE"):("_MULTI");this.display_element=document.getElementById(this.name+g)}this.profiler.end();this.profiler.start(this,"Init key handler");this._add_keyhandler(FW.KEY_TAB,FW.KEY_NONE,FW.KEY_ACTION_CANVAS_NAV_WIDGET_FORWARD,null,FW.KEY_SCOPE_CANVAS);this._add_keyhandler(FW.KEY_TAB,FW.KEY_SHIFT,FW.KEY_ACTION_CANVAS_NAV_WIDGET_BACK,null,FW.KEY_SCOPE_CANVAS);for(var b=0;b<this._key_handle_list.length;b++){var c=this._key_handle_list[b];this._add_keyhandler(c[0],c[1],c[2],c[3],c[4],c[5])}this._key_handle_list=null;this.profiler.end();this.init_widgets();this.profiler.start(this,"Init widget relationships");for(var b=0;b<this._widget_list.length;b++){this._widget_list[b].init_relations()}this.profiler.end();this.profiler.start(this,"Init remaining lov widget list display");for(var b=0;b<this._widget_list.length;b++){var d=this._widget_list[b];if(d.renderer!=null&&d.renderer.display_type=="list"&&d.renderer.showing_options!=true){d.renderer.regenerate()}}this.profiler.end();this.profiler.start(this,"Super init");FW_Page.prototype.init.call(this,a);this.profiler.end();this.initialised=true;this.logger.end();return true};FW_Page_Canvas.prototype.init_widgets=function(){this.profiler.start(this,"Init widgets");for(var a=0;a<this._widget_list.length;a++){if(this._widget_list[a].initialised==true){continue}this._widget_list[a].init({message:this.message,key_handler:this.key_handler,profiler:this.profiler})}this.profiler.end()};FW_Page_Canvas.prototype.add_keyhandler=function(c,a,h,g,d,b){if(d==null){d=FW.KEY_SCOPE_CANVAS}if(this.initialised==false){this._key_handle_list.push([c,a,h,g,d,b])}else{this._add_keyhandler(c,a,h,g,d,b)}};FW_Page_Canvas.prototype._add_keyhandler=function(c,a,h,g,d,b){if(h!=null){if(h==FW.KEY_ACTION_CANVAS_NAV_WIDGET_FORWARD){return this.key_handler.add_handler(c,a,this._key_action_nav_widget_forward,this,d)}else{if(h==FW.KEY_ACTION_CANVAS_NAV_WIDGET_BACK){return this.key_handler.add_handler(c,a,this._key_action_nav_widget_back,this,d)}else{if(h==FW.KEY_ACTION_CANVAS_NAV_WIDGET_FIRST){return this.key_handler.add_handler(c,a,this._key_action_nav_widget_first,this,d)}else{if(h==FW.KEY_ACTION_CANVAS_NAV_WIDGET_LAST){return this.key_handler.add_handler(c,a,this._key_action_nav_widget_last,this,d)}else{if(h==FW.KEY_ACTION_CANVAS_NAV_NEXT_ROW){return this.key_handler.add_handler(c,a,this._key_action_nav_next_row,this,d)}else{if(h==FW.KEY_ACTION_CANVAS_NAV_PREVIOUS_ROW){return this.key_handler.add_handler(c,a,this._key_action_nav_previous_row,this,d)}else{if(h==FW.KEY_ACTION_CANVAS_SUBMIT_CANVAS){return this.key_handler.add_handler(c,a,this._key_action_submit_canvas,this,[d,b])}else{if(h==FW.KEY_ACTION_IGNORE){return this.key_handler.add_handler(c,a,this._key_action_ignore,this,d)}else{if(h==FW.KEY_ACTION_CALLBACK){return this.key_handler.add_handler(c,a,g,this,d)}}}}}}}}}}return false};FW_Page_Canvas.prototype._key_action_nav_widget_forward=function(b,a){this.logger.srt(this,"_key_action_nav_widget_forward");this.logger.end();if(this._key_in_scope(a)){if(this.navigate_widget_forward()){return false}else{return true}}return true};FW_Page_Canvas.prototype._key_action_nav_widget_back=function(b,a){this.logger.srt(this,"_key_action_nav_widget_back");this.logger.end();if(this._key_in_scope(a)){if(this.navigate_widget_back()){return false}else{return true}}return true};FW_Page_Canvas.prototype._key_in_scope=function(b){if(b==FW.KEY_SCOPE_PROGRAM){return true}else{if(b==FW.KEY_SCOPE_CANVAS){if(this.focused()){return true}}else{if(b==FW.KEY_SCOPE_LAST_WIDGET){var c=this.last_widget(true);if(c!=null&&c.focused()){return true}}else{if(b==FW.KEY_SCOPE_FIRST_WIDGET){var a=this.first_widget(true);if(a!=null&&a.focused()){return true}}}}}return false};FW_Page_Canvas.prototype._key_action_nav_widget_first=function(b,a){if(this._key_in_scope(a)){this.navigate_widget_first();return false}return true};FW_Page_Canvas.prototype._key_action_nav_widget_last=function(b,a){if(this._key_in_scope(a)){this.navigate_widget_last();return false}return true};FW_Page_Canvas.prototype._key_action_nav_next_row=function(b,a){if(this._key_in_scope(a)){this.navigate_row_forward(true);return false}return true};FW_Page_Canvas.prototype._key_action_nav_previous_row=function(b,a){if(this._key_in_scope(a)){this.navigate_row_back(true);return false}return true};FW_Page_Canvas.prototype._key_action_submit_canvas=function(d,c){var b=c[0];var a=c[1];if(this._key_in_scope(b)){if(a==null){this.do_submit()}else{this.do_custom_action(a)}return false}return true};FW_Page_Canvas.prototype.row_changed=function(b,d){var c=this.rows[b];if(c==null){return false}if(d!=null){c.changed=d}else{if(c.changed==null){for(var a=0;a<c.widgets.length;a++){if(c.widgets[a].changed()){this.logger.msg(c.widgets[a].name+" - Changed");return true}}}return false}};FW_Page_Canvas.prototype.get_widget_list=function(){return this._widget_list};FW_Page_Canvas.prototype.busy=function(){var a=this._widget_list.length;while(a--){var b=this._widget_list[a];if(b.busy()){return true}}return false};FW_Page_Canvas.prototype.get_widget=function(a,c){var b=this._widget_list.length;var g=new Array();while(b--){var d=this._widget_list[b];if(d.name==a){if(this.view_mode==FW.VIEW_MODE_SINGLE){return d}else{if(this.view_mode==FW.VIEW_MODE_MULTI){if(c!=null){if(d.row_number()==c){return d}continue}else{g.push(d)}}}}}if(this.view_mode==FW.VIEW_MODE_SINGLE){return null}else{if(g.length==0){return null}else{return g}}};FW_Page_Canvas.prototype.navigate_widget_first=function(){var a=this.first_widget();if(a){a.focus();return true}return false};FW_Page_Canvas.prototype.navigate_widget_last=function(){var a=this.last_widget(true);if(a){a.focus();return true}return false};FW_Page_Canvas.prototype.navigate_row_forward=function(b){var a=this.current_row();var d=parseInt(a)+1;var c=((b)?(this._widget_focused(a)):(null));if(this.focus(d,c)){return true}else{return this.focus(0,c)}return false};FW_Page_Canvas.prototype._widget_focused=function(c){var g=this.rows[c];if(g==null){return false}var d=g.widgets;for(var b=0;b<d.length;b++){var a=d[b];if(a.focused()){return b}}return 0};FW_Page_Canvas.prototype.navigate_row_back=function(b){var a=this.current_row();var d=((b)?(this._widget_focused(a)):(null));var c=parseInt(a)-1;if(c<0){c=this.rows.length-1}if(this.focus(c,d)){Logger.end();return true}else{return false}};FW_Page_Canvas.prototype.navigate_widget_forward=function(){Logger.srt(this,"navigate_widget_forward");var a=this.current_row();var c=this.rows[a];Logger.msg("Current Row ["+a+"] Row ["+c+"]");if(c==null){Logger.msg("No current row");var b=this.first_widget(true);Logger.msg("First widget ["+b+"]");if(b!=null){b.focus();Logger.end();return true}Logger.end();return false}if(this._nav_forward_on_row(a)){Logger.end();return true}else{return false}Logger.end();return false};FW_Page_Canvas.prototype.navigate_widget_back=function(){this.logger.srt(this,"navigate_widget_back");this.logger.end();var a=this.current_row();var c=this.rows[a];this.logger.msg("Current Row ["+a+"]");if(c==null){var b=this.last_widget(true);if(b!=null){b.focus()}this.logger.end();return true}if(this._nav_back_on_row(a)){this.logger.end();return true}else{this.logger.end();return false}this.logger.end();return false};FW_Page_Canvas.prototype._next_widget_on_row=function(j,g){if(g==null){g=false}this.logger.srt(this,"_nav_forward_on_row");this.logger.msg("Row Number ["+j+"]");var d=false;var k=((this.rows)?(this.rows[j]):(null));if(k==null){return null}var k=this.rows[j];var c=null;for(var h=0;h<k.widgets.length;h++){var b=k.widgets[h];this.logger.msg("Widget ["+h+"] Name ["+b.name+"]");if(c!=null){if(c.name==b.name){if(b.can_navigate_to()){return b}else{if(c.nav_forward!=null){c=this.get_widget(c.nav_forward);h=0}else{c=null}}}continue}if(!b.can_navigate_to()){this.logger.msg("Cannot navigate to");this.logger.end();continue}else{if(g){Logger.end();return b}}if(d){this.logger.end();return b}else{if(b.focused()){if(b.nav_forward){var b=this.get_widget(b.nav_forward);c=b;h=0}d=true;continue}}}var a=parseInt(j)+1;if(this.rows[a]!=null){this.logger.msg("Checking next row");this.logger.end();return this._next_widget_on_row(a,true)}this.logger.end();return null};FW_Page_Canvas.prototype._nav_widget_focus_forward=function(b,a){if(w.can_navigate_to()){}};FW_Page_Canvas.prototype._prev_widget_on_row=function(h,a){if(a==null){a=false}var d=false;var j=this.rows[h];var g=j.widgets.length;var c=null;while(g--){var b=j.widgets[g];if(c!=null){if(c.name==b.name){if(b.can_navigate_to()){return b}else{if(c.nav_back!=null){c=this.get_widget(c.nav_back);g=j.widgets.length}else{c=null}}}continue}if(!b.can_navigate_to()){continue}else{if(a){return b}}if(d){return b}else{if(b.focused()){if(b.nav_back){var b=this.get_widget(b.nav_back);c=b;g=j.widgets.length}d=true;continue}}}if(this.rows[h-1]!=null){return this._prev_widget_on_row(h-1,true)}return null};FW_Page_Canvas.prototype._nav_back_on_row=function(b,c){var a=this._prev_widget_on_row(b,c);if(a!=null){a.focus();return true}else{return false}};FW_Page_Canvas.prototype._nav_forward_on_row=function(c,b){var a=this._next_widget_on_row(c,b);if(a!=null){a.focus();return true}else{return false}};FW_Page_Canvas.prototype.last_widget=function(){return this._prev_widget_on_row(this.rows.length-1,true)};FW_Page_Canvas.prototype.first_widget=function(){return this._next_widget_on_row(0,true)};FW_Page_Canvas.prototype.current_row=function(){for(var b=0;b<this._widget_list.length;b++){var a=this._widget_list[b];if(a.focused()){return a.row_number()}}return null};FW_Page_Canvas.prototype.internal_field_list=new Array("_MODE","_SUBMITTING_CANVAS_NAME","_CANVAS_NAME","_PAGE_NUM","_SORT_COLUMN","_ROWID","_ROWVERSION","_SORT_DIRECTION","_CHMODE","_ACTION","_ACTION_ID","_CUSTOM_ACTION","_DISPLAY_ROW_QUERY","_DISPLAY_ROW_INSERT","_DISPLAY_ROW_UPDATE");FW_Page_Canvas.prototype.get_field=function(a){if(this.element==null){this.logger.srt(this,"get_field");this.logger.error("No canvas element ? - Canvas Name ["+this.name+"] Widget Name ["+a+"]");this.logger.end();return null}var b=this.element.elements[this.name+"."+a];if(b==null){this.logger.srt(this,"get_field");this.logger.error("Returned null - Canvas Name ["+this.name+"] Widget Name ["+a+"]");this.logger.end();return null}return b};FW_Page_Canvas.prototype.mode=function(a){if(String(a)=="undefined"){return this.get_field("_MODE").value}else{this.get_field("_MODE").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.submitting_canvas_name=function(a){if(String(a)=="undefined"){return this.get_field("_SUBMITTING_CANVAS_NAME").value}else{this.get_field("_SUBMITTING_CANVAS_NAME").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.page_num=function(a){if(String(a)=="undefined"){return this.get_field("_PAGE_NUM").value}else{this.get_field("_PAGE_NUM").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.sort_column=function(a){if(String(a)=="undefined"){return this.get_field("_SORT_COLUMN").value}else{this.get_field("_SORT_COLUMN").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.rowid=function(a){if(String(a)=="undefined"){return this.get_field("_ROWID").value}else{this.get_field("_ROWID").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.rowversion=function(a){if(String(a)=="undefined"){return this.get_field("_ROWVERSION").value}else{this.get_field("_ROWVERSION").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.sort_direction=function(a){if(String(a)=="undefined"){return this.get_field("_SORT_DIRECTION").value}else{this.get_field("_SORT_DIRECTION").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.chmode_action=function(b){if(String(b)=="undefined"){return this.get_field("_CHMODE").value}else{var a=(b==null)?(""):(b);if(a==FW.QUERY_MODE){a="ChModeQuery"}else{if(a==FW.INSERT_MODE){a="ChModeInsert"}else{if(a==FW.UPDATE_MODE){a="ChModeUpdate"}}}this.get_field("_CHMODE").value=a}};FW_Page_Canvas.prototype.action=function(a){if(String(a)=="undefined"){return this.get_field("_ACTION").value}else{this.get_field("_ACTION").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.action_id=function(a){if(String(a)=="undefined"){return this.get_field("_ACTION_ID").value}else{this.get_field("_ACTION_ID").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.custom_action=function(a){if(String(a)=="undefined"){return this.get_field("_CUSTOM_ACTION").value}else{this.get_field("_CUSTOM_ACTION").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.display_row_query=function(a){if(String(a)=="undefined"){return this.get_field("_DISPLAY_ROW_QUERY").value}else{this.get_field("_DISPLAY_ROW_QUERY").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.display_row_insert=function(a){if(String(a)=="undefined"){return this.get_field("_DISPLAY_ROW_INSERT").value}else{this.get_field("_DISPLAY_ROW_INSERT").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype.display_row_update=function(a){if(String(a)=="undefined"){return this.get_field("_DISPLAY_ROW_UPDATE").value}else{this.get_field("_DISPLAY_ROW_UPDATE").value=(a==null)?(""):(a)}};FW_Page_Canvas.prototype._clear_submit_fields=function(){this.action(null);this.chmode_action(null);this.custom_action(null);return true};FW_Page_Canvas.prototype.change_display_rows=function(a){this._clear_submit_fields();this.current_display_rows(a);this.action(FW.DO_CHANGE_DISPLAY_ROWS);return this.submit_canvas(false)};FW_Page_Canvas.prototype.current_display_rows=function(b){var a=this.mode();if(a==FW.QUERY_MODE){return this.display_row_query(b)}else{if(a==FW.UPDATE_MODE){return this.display_row_update(b)}else{if(a==FW.INSERT_MODE){return this.display_row_insert(b)}}}};FW_Page_Canvas.prototype.prompt_change_display_rows=function(g,c){var j=this.mode();var h=this.current_display_rows();var b=messages[2].replace(/#min_rows#/,g).replace(/#max_rows#/,c);var a=prompt(b,h);if(a){var d=new FW_Type_Number({min:g,logger:this.logger,max:c});d.value(a);if(d.validate()==false){this.message.add(d.error_message,FW.MESSAGE_TYPE_ERROR);this.message.show();return false}else{return this.change_display_rows(a)}}else{return false}};FW_Page_Canvas.prototype.change_mode_query=function(a){this._clear_submit_fields();this.chmode_action(FW.QUERY_MODE);return this.submit_canvas(false,a)};FW_Page_Canvas.prototype.change_mode_insert=function(a){this._clear_submit_fields();this.chmode_action(FW.INSERT_MODE);return this.submit_canvas(false,a)};FW_Page_Canvas.prototype.change_mode_update=function(a){this._clear_submit_fields();this.chmode_action(FW.UPDATE_MODE);this.submit_canvas(false,a);return true};FW_Page_Canvas.prototype.do_view_record=function(b,a,c){this._clear_submit_fields();this.rowid(b);this.rowversion(a);this.action(FW.DO_QUERY_NO_UPDATE);return this.submit_canvas(true,c)};FW_Page_Canvas.prototype.do_delete=function(b,a,c){this._clear_submit_fields();this.rowid(b);this.rowversion(a);this.action(FW.DO_DELETE);return this.submit_canvas(false,c)};FW_Page_Canvas.prototype.do_update_record=function(b,a,c){this._clear_submit_fields();this.rowid(b);this.rowversion(a);this.action(FW.DO_QUERY_UPDATE);return this.submit_canvas(true,c)};FW_Page_Canvas.prototype.do_query=function(b,c,a){this._clear_submit_fields();this.action(FW.DO_QUERY);return this.submit_canvas(true,b,c,a)};FW_Page_Canvas.prototype.do_insert=function(b,c,a){this._clear_submit_fields();this.action(FW.DO_INSERT);return this.submit_canvas(true,b,c,a)};FW_Page_Canvas.prototype.do_update=function(b,c,a){this._clear_submit_fields();this.action(FW.DO_UPDATE);return this.submit_canvas(true,b,c,a)};FW_Page_Canvas.prototype.do_custom_action=function(a,c,d,b){this.chmode_action(null);this.custom_action(a);return this.submit_canvas(d,c,b)};FW_Page_Canvas.prototype.do_submit=function(b,c,a){if(this.canvas_group!=null){if(this.canvas_group.do_submit(b)){return false}}else{if(this.mode()==FW.QUERY_MODE){if(this.do_query(b,null,a)==false){return false}}else{if(this.mode()==FW.INSERT_MODE){if(this.do_insert(b,null,a)==false){return false}}else{if(this.mode()==FW.UPDATE_MODE){if(this.do_update(b,null,a)==false){return false}}}}}return true};FW_Page_Canvas.prototype.next_page=function(a){this._clear_submit_fields();this.action(FW.NEXT_PAGE);return this.submit_canvas(false,a)};FW_Page_Canvas.prototype.previous_page=function(a){this._clear_submit_fields();this.action(FW.PREV_PAGE);return this.submit_canvas(false,a)};FW_Page_Canvas.prototype.last_page=function(a){this._clear_submit_fields();this.action(FW.LAST_PAGE);return this.submit_canvas(false,a)};FW_Page_Canvas.prototype.first_page=function(a){this._clear_submit_fields();this.action(FW.FIRST_PAGE);return this.submit_canvas(false,a)};FW_Page_Canvas.prototype.change_page=function(a,b){this._clear_submit_fields();this.action(FW.CHANGE_PAGE);this.page_num(a);return this.submit_canvas(false,b)};FW_Page_Canvas.prototype.do_sort=function(b,a){this._clear_submit_fields();this.action(FW.DO_SORT);this.sort_column(b);this.sort_direction(a);return this.submit_canvas(false)};FW_Page_Canvas.prototype.changed=function(){var b=this.rows;for(var a=0;a<b.length;a++){if(this.row_changed(a)==true){return true}}return false};FW_Page_Canvas.prototype.valid=function(b){if(b!=null){this._valid=b;if(b){var c=this._widget_list;var a=c.length;while(a--){c[a].valid(true)}}}return this._valid};FW_Page_Canvas._submit_try_count=0;FW_Page_Canvas.prototype.submit_canvas=function(h,d,g,c){this.logger.srt(this,"submit_canvas");var b=1;FW_Browser.cursor(FW.CURSOR_WAIT);if(c&&this.busy()){this._disable_submitting(d);if(FW_Page_Canvas._submit_try_count++==100){alert(messages[6]);this._disable_submitting(d,false);FW_Page_Canvas._submit_try_count=0}else{this.submit_canvas.bind(this,[h,d,g,c]).delay(200)}this.logger.end();return false}else{this._disable_submitting(d,false)}this._disable_submitting(d);this.valid(true);if(h){if(this._call_event("before",{type:"canvassubmit"})==false){this.logger.end();this._disable_submitting(d,false);FW_Browser.cursor(FW.CURSOR_DEFAULT);return false}if(this.mode()!=FW.QUERY_MODE&&this.alert_not_changed==true&&this.changed()==false){this.message.add(messages[b]);this.message.show();this.logger.end();this._disable_submitting(d,false);FW_Browser.cursor(FW.CURSOvR_DEFAULT);return false}if(this.validate()==false){this.message.show();this.logger.end();this._disable_submitting(d,false);FW_Browser.cursor(FW.CURSOR_DEFAULT);return false}if(this._call_event("after",{type:"canvassubmit"})==false){this.logger.end();this._disable_submitting(d,false);FW_Browser.cursor(FW.CURSOR_DEFAULT);return false}}this.submitting_canvas_name(this.name);var a=this.get_field("_CANVAS_NAME");a.value=this.name;if(this._call_event("after",{type:"action"})==false){this.logger.end();this._disable_submitting(d,false);FW_Browser.cursor(FW.CURSOR_DEFAULT);return false}if(g!=false){this.element.submit(true)}this.logger.end();return true};FW_Page_Canvas.prototype._disable_submitting=function(b,a){if(a==null){a=true}if(b!=null){if(FW.is_func(b.disabled)){b.disabled(a)}else{b.disabled=a}FW_BubbleHint.hide()}};FW_Page_Canvas.prototype.add_widget=function(b){this.logger.srt(this,"add_widget");b.logger=this.logger;b.canvas=this;b.message=this.message;if(this.initialised==true){var g=this._widget_list.length;while(g--){w=this._widget_list[g];if(w.name==b.name){this._widget_list.splice(g,1)}}}this._widget_list.push(b);this.logger.msg("Adding ["+b.id+"]");this.logger.end();var a=b.row_number();var d;this.rows=(this.rows==null)?(new Array()):(this.rows);if(this.rows[a]==null){d=new Array();this.rows[a]={widgets:d,changed:null}}else{d=this.rows[a].widgets}d.push(b);return b};FW_Page_Canvas.prototype.clear=function(d){this.logger.srt(this,"clear");this.logger.msg("Clearing form ["+this.name+"]");if(this._call_event("before",{type:"reset"})==false){return false}var b=this._widget_list.length;for(var a=0;a<b;a++){var c=this._widget_list[a];if(c.clear_behaviour==FW.CLEAR_BEHAVIOUR_RESET){c.reset()}else{if(c.clear_behaviour==FW.CLEAR_BEHAVIOUR_CLEAR){c.clear()}}}this.message.clear();if(this._call_event("after",{type:"reset"})==false){return false}this.logger.end();return true};FW_Page_Canvas.prototype.validate=function(b){if(b){this.valid(true)}for(var h=0;h<this.rows.length;h++){if(this.view_mode==FW.VIEW_MODE_SINGLE||(this.mode()==FW.QUERY_MODE&&h==0)||this.row_changed(h)==true){var g=this.rows[h].widgets;var d=g.length;for(var a=0;a<d;a++){var c=g[a];if(c.validate()==false){this.valid(false)}}}}return this.valid()};FW_Page_Canvas.prototype.generate_param=function(a,b){return this.name+"."+a+"="+b};FW_Page_Canvas.prototype.generate_param_keyval=function(a,b){return new Array(this.name+"."+a,b)};FW_Page_Canvas.prototype.clone_row=function(d,j){d=(d==null)?(0):(d);j=(j==null)?(this.rows.length):(j);var h=this.rows[d].widgets;var k=new Array();var c=h.length;for(var g=0;g<c;g++){var b=h[g];if(this.view_mode==FW.VIEW_MODE_MULTI&&b.id.search("\\$")==-1){continue}var a=b.clone();a.row_number(j);this.add_widget(a)}return this.rows[j].widgets};FW_Page_Canvas.prototype.focused=function(b){if(b==null){return(this._focused==null)?(false):(this._focused)}else{this._focused=b;if(this.display_element!=null){var a=this.display_element.className;if(b){if(a.search(/CanvasFocused/)==-1){this.display_element.className+=" CanvasFocused "}}else{this.display_element.className=a.replace(/CanvasFocused/g,"")}}}};FW_Page_Canvas.prototype.focus=function(c,h){if(this.can_focus){if(c!=null){var g=this.rows[c];if(g==null){return false}var d=g.widgets;for(var b=0;b<d.length;b++){var a=d[b];if(h!=null&&b<h){continue}if(a.can_navigate_to()){a.focus();return true}}}else{var a=this.first_widget();if(a!=null){a.focus();this.focused(true);return true}else{return false}}}else{return false}};FW_Page_Canvas.prototype._event_onclick=function(){};function FW_Page_Canvas_SingleRow(a){this._init_args(a);this._event_list={};this._widget_list=new Array();this._pop_form_list=new Array();this._key_handle_list=new Array();this.view_mode=FW.VIEW_MODE_SINGLE}FW_Page_Canvas_SingleRow.prototype=new FW_Page_Canvas;FW_Page_Canvas_SingleRow.prototype.className="FW_Page_Canvas_SingleRow";function FW_Page_Canvas_MultiView(a){this._init_args(a);this._event_list={};this._widget_list=new Array();this._pop_form_list=new Array();this._key_handle_list=new Array();this.view_mode=FW.VIEW_MODE_MULTI}FW_Page_Canvas_MultiView.prototype=new FW_Page_Canvas;FW_Page_Canvas_MultiView.prototype.className="FW_Page_Canvas_MultiView";FW_Page_Canvas_MultiView.prototype.current_display_rows=function(a){return this.display_row_query(a)};function FW_Page_Canvas_MultiView_Dynamic(a){this.dynamic_table_id=null;this.logger_level=DYNAMIC_TABLE_LOG_LEVEL;this._init_args(a);this._event_list={};this._widget_list=new Array();this._pop_form_list=new Array();this._key_handle_list=new Array();this.view_mode=FW.VIEW_MODE_MULTI}FW_Page_Canvas_MultiView_Dynamic.prototype=new FW_Page_Canvas_MultiView;FW_Page_Canvas_MultiView_Dynamic.prototype.className="FW_Page_Canvas_MultiView_Dynamic";FW_Page_Canvas_MultiView_Dynamic.prototype.init=function(a){this.logger.srt(this,"init");this._init_args(a);this.dynamic_table=_fw_dta[this.dynamic_table_id];if(this.dynamic_table==null){this.logger.error("Couldnt find dynamic table id ["+this.dynamic_table_id+"]");this.logger.end();return false}FW_Page_Canvas.prototype.init.call(this,a);this.dynamic_table.populate_table();this.logger.end();return true};FW_Page_Canvas_MultiView_Dynamic.prototype.next_page=function(a){this.dynamic_table.next_page();this._check_data()};FW_Page_Canvas_MultiView_Dynamic.prototype.previous_page=function(a){this.dynamic_table.previous_page();this._check_data()};FW_Page_Canvas_MultiView_Dynamic.prototype.last_page=function(a){this.dynamic_table.last_page();this._check_data()};FW_Page_Canvas_MultiView_Dynamic.prototype.first_page=function(a){this.dynamic_table.first_page();this._check_data()};FW_Page_Canvas_MultiView_Dynamic.prototype.change_page=function(a,b){this.dynamic_table.change_page(a);this._check_data()};FW_Page_Canvas_MultiView_Dynamic.prototype._check_data=function(){this.logger.srt(this,"_check_data",this.logger_level);var b=this.dynamic_table;if(b.got_data()==true){b.populate_table();var a=this._calc_fw_page({data_page_size:b.data_page_size,dt_page_size:b.page_size,direction:0,page_number:b.page_number,from:b.from});this.page_num(a);this.logger.msg("Set canvas object page number ["+this.page_num()+"]");this.logger.end()}else{this._navbar_widget_state(FW.WIDGET_NAV_FIRST_PAGE,true);this._navbar_widget_state(FW.WIDGET_NAV_LAST_PAGE,true);this._navbar_widget_state(FW.WIDGET_NAV_NEXT_PAGE,true);this._navbar_widget_state(FW.WIDGET_NAV_PREV_PAGE,true)}};FW_Page_Canvas_MultiView_Dynamic.prototype._navbar_widget_state=function(b,a){var b=this.get_widget(b);if(b==null){return}b=b[0];if(b==null){return}return b.disabled(a)};FW_Page_Canvas_MultiView_Dynamic.prototype._calc_fw_page=function(c){this.logger.srt(this,"dt_calc_fw_page",DYNAMIC_TABLE_LOG_LEVEL);var b=c.data_page_size;var h=c.dt_page_size;var d=c.direction;this.logger.msg("Framework Page Size ["+b+"] Dynamic Table Page Size ["+h+"] Direction ["+d+"] From ["+c.from+"]");var a;if(b!=h){var g=c.from;if(d==-1){this.logger.msg('Going backwards. Working out "from" minus the difference in page sizes');g-=(b-h);this.logger.msg("New from "+g)}a=g/b;if(a!=Math.round(a)){if(Math.round(a)>(a)){a=(Math.round(a))}else{a=(Math.round(a))+1}}}else{a=c.page_number}this.logger.msg("Pre Framework page number ["+a+"]");this.logger.msg("Framework page number ["+a+"]");this.logger.end();return a};FW_Page_Canvas_MultiView_Dynamic.prototype.handler_page_update=function(a){var g=document.getElementById(a.id+"_FROM");var d=document.getElementById(a.id+"_TO");var c=document.getElementById(a.id+"_TOTAL");var b=document.getElementById(a.id+"__DISPLAY_ROWS_WIDGET");if(g!=null){g.innerHTML=a.from}if(d!=null){d.innerHTML=a.to}if(c!=null){c.innerHTML=a.total}this._update_navbar_state();this._update_pagination(a.page_number)};FW_Page_Canvas_MultiView_Dynamic.prototype.handler_fetch_data=function(args){this.logger.srt(this,"get_data",DYNAMIC_TABLE_LOG_LEVEL);if(this.initialised==false){this.logger.error("Cannot fetch data canvas was not initalised");return false}if(this.dynamic_table==null){this.logger.error("No dynamic table");this.logger.end();return false}this.logger.msg("(New) From "+args.from+" To "+args.to);this.logger.msg("(Current) From "+args.current_from+" To "+args.current_to);var fw_page_number=this._calc_fw_page({data_page_size:args.data_page_size,dt_page_size:args.page_size,direction:0,page_number:args.page_number,from:args.from});var form_fw_page_number=fw_page_number;var dyn_table=args.table;var canvas=this;var id=args.id;function onComplete(){var caller=this.identifier;caller.logger.srt(this,"get_data.onComplete",DYNAMIC_TABLE_LOG_LEVEL);caller.logger.msg("Fetching code");caller.logger.msg("Evaluating code");var rc=true;caller.logger.msg(this.requestText);var xml=this.resultDocument;var js=this.requestText.replace(/<javascript>/,"").replace(/<\/javascript>/,"").split(/<code>/);for(var i=0;i<js.length;i++){var code=js[i].replace(/<\/code>/,"");try{eval(code)}catch(e){caller.logger.error("Error  ["+e.message+"] parsing code ["+code+"]");rc=false}}if(rc!=false){caller.logger.msg("Populating table");if(caller.dynamic_table.got_data()){caller.page_num(form_fw_page_number);caller.logger.msg("Got the data, populating");caller.dynamic_table.populate_table()}else{caller.logger.error("No data returned");rc=false}}caller.logger.msg("Checking navbar widget states");caller._update_navbar_state();caller.action_id(parseInt(caller.action_id())+1);if(rc==false){dyn_table.last_populated_state();caller.logger.warn("One or more errors occured while fetching data")}caller.logger.end();return rc}var canvas_name=args.id;var request=new FW_Request_Background({url:Framework.url(),oncomplete:onComplete,identifier:this,logger:this.logger});request.add_param(canvas_name+"._ACTION",FW.CHANGE_PAGE);request.add_param(canvas_name+"._CANVAS_NAME",args.id);request.add_param(canvas_name+"._SUBMITTING_CANVAS_NAME",args.id);request.add_param(canvas_name+"._PAGE_NUM",fw_page_number);request.add_param(canvas_name+"._MODE",this.mode());request.add_param(canvas_name+"._DISPLAY_ROW_QUERY",this.display_row_query());request.add_param(canvas_name+"._ACTION_ID",this.action_id());request.submit();this.logger.end();return true};FW_Page_Canvas_MultiView_Dynamic.prototype.add_widget=function(a,b){this.logger.srt(this,"add_widget");if(b){a.logger=this.logger;a.canvas=this;a.message=this.message;a.key_handler=this.key_handler;a.init({profiler:this.profiler});this.logger.end();return a}else{this.logger.end();return FW_Page_Canvas.prototype.add_widget.call(this,a)}};FW_Page_Canvas_MultiView_Dynamic.prototype._update_navbar_state=function(){var a=this.dynamic_table;if(a==null){return}if(a.can_first_page()){this._navbar_widget_state(FW.WIDGET_NAV_FIRST_PAGE,false)}else{this._navbar_widget_state(FW.WIDGET_NAV_FIRST_PAGE,true)}if(a.can_last_page()){this._navbar_widget_state(FW.WIDGET_NAV_LAST_PAGE,false)}else{this._navbar_widget_state(FW.WIDGET_NAV_LAST_PAGE,true)}if(a.can_next_page()){this._navbar_widget_state(FW.WIDGET_NAV_NEXT_PAGE,false)}else{this._navbar_widget_state(FW.WIDGET_NAV_NEXT_PAGE,true)}if(a.can_prev_page()){this._navbar_widget_state(FW.WIDGET_NAV_PREV_PAGE,false)}else{this._navbar_widget_state(FW.WIDGET_NAV_PREV_PAGE,true)}};FW_Page_Canvas_MultiView_Dynamic.prototype._update_pagination=function(a){var d=this.dynamic_table;if(d==null){return}var h=this.name;var b=_fw_dtpa[h]["WidgetPagination"];for(pagination_id in b){if(b[pagination_id][a]!=null){var g=document.getElementById(h+"_PAGINATION_"+pagination_id);if(g!=null){while(g.childNodes.length){FW_Element.remove(g.childNodes[0])}var c=b[pagination_id][a];g.innerHTML=c}}}};function FW_Page_Canvas_PropertyGrid(a){this._init_args(a);this._event_list={};this._widget_list=new Array();this._key_handle_list=new Array();this.view_mode=FW.VIEW_MODE_SINGLE}FW_Page_Canvas_PropertyGrid.prototype=new FW_Page_Canvas;FW_Page_Canvas_PropertyGrid.prototype.className="FW_Page_Canvas_PropertyGrid";FW_Page_Canvas_PropertyGrid.prototype._clear_submit_fields=function(){this.action(null);this.chmode_action(null);return true};function FW_Page_Canvas_MultiRow(a){this._init_args(a);this._event_list={};this._widget_list=new Array();this._pop_form_list=new Array();this._key_handle_list=new Array();this.view_mode=FW.VIEW_MODE_MULTI}FW_Page_Canvas_MultiRow.prototype=new FW_Page_Canvas;FW_Page_Canvas_MultiRow.prototype.className="FW_Page_Canvas_MultiRow";FW_Page_Canvas_MultiRow.prototype.do_delete=function(a){this._clear_submit_fields();this.action(FW.DO_DELETE);this.submit_canvas(false,a);return true};function FW_Page_CanvasNavigation(a){this.can_focus=false;this._init_args(a);this.view_mode=FW.VIEW_MODE_SINGLE;this._event_list={};this._widget_list=new Array();this._key_handle_list=new Array()}FW_Page_CanvasNavigation.prototype=new FW_Page;FW_Page_CanvasNavigation.prototype.className="FW_Page_CanvasNavigation";FW_Page_CanvasNavigation.prototype.init=function(a){this.logger.srt(this,"init");this._init_args(a);this.rows=new Array();this.element=document.getElementById(this.id);if(this.element==null){this.logger.error("Couldnt find ul with the id ["+this.id+"]");this.logger.end()}for(var b=0;b<this._widget_list.length;b++){var c=this._widget_list[b];this._widget_list[b].init({message:this.message,profiler:a.profiler,key_handler:this.key_handler})}FW_Page.prototype.init.call(this,a);this.logger.end();return true};FW_Page_CanvasNavigation.prototype.add_widget=FW_Page_Canvas.prototype.add_widget;FW_Page_CanvasNavigation.prototype.get_widget=FW_Page_Canvas.prototype.get_widget;FW_Page_CanvasNavigation.prototype.get_widget_list=FW_Page_Canvas.prototype.get_widget_list;FW_Page_CanvasNavigation.prototype.focused=function(){return false};FW_Page_CanvasNavigation.prototype.focus=function(){return false};function FW_Page_CanvasGroup(a){this.alert_not_changed=true;this._mode=FW.QUERY_MODE;if(a.mode!=null){this._mode=a.mode;delete (a.mode)}this._init_args(a);this._event_list={};this._widget_list=new Array();this._canvas_list=new Array();this._key_handle_list=new Array();this.can_focus=false}FW_Page_CanvasGroup.prototype=new FW_Page;FW_Page_CanvasGroup.prototype.className="FW_Page_CanvasGroup";FW_Page_CanvasGroup.prototype.init=function(b){this.logger.srt(this,"init");this._init_args(b);this.element=null;var c=document.forms.length;while(c--){if(document.forms[c].id==this.id){this.element=document.forms[c];break}}if(this.element==null){this.logger.error("Couldnt find form with the id ["+this.id+"]")}var c=this._canvas_list.length;while(c--){var g=this._canvas_list[c];var a=Framework.get_canvas(g.name,g.view_mode);if(a==null){this.logger.error("Couldnt find canvas ["+g.name+"] View Mode ["+g.view_mode+"]")}else{a.canvas_group=this;this._canvas_list[c].canvas=a;a.alert_not_changed=false}}for(var c=0;c<this._widget_list.length;c++){var d=this._widget_list[c];this._widget_list[c].init({message:this.message,profiler:this.profiler,key_handler:this.key_handler})}FW_Page.prototype.init.call(this,b);this.logger.end();return true};FW_Page_CanvasGroup.prototype.add_canvas=function(b,a,c){this._canvas_list.push({name:b,view_mode:a,submit_not_changed:c})};FW_Page_CanvasGroup.prototype.focused=function(){for(var a=0;a<this._canvas_list.length;a++){var b=this._canvas_list[a];if(b.canvas!=null&&b.canvas.focused()){return true}}return false};FW_Page_CanvasGroup.prototype.focus=function(){for(var a=0;a<this._canvas_list.length;a++){var b=this._canvas_list[a];if(b.focus()==true){return true}}return false};FW_Page_CanvasGroup.prototype.mode=function(){return this._mode};FW_Page_CanvasGroup.prototype.busy=function(){for(var a=0;a<this._canvas_list.length;a++){if(this._canvas_list[a].canvas&&this._canvas_list[a].canvas.busy()){return true}}return false};FW_Page_CanvasGroup._submit_try_count=0;FW_Page_CanvasGroup.prototype.do_submit=function(j,h){this.logger.srt(this,"do_submit");if(h&&this.busy()){this._disable_submitting(j);if(FW_Page_CanvasGroup._submit_try_count++==100){alert(messages[6]);FW_Page_CanvasGroup._submit_try_count=0;this._disable_submitting(j,false)}else{this.do_submit.bind(this,[j,h]).delay(200)}this.logger.end();return false}else{this._disable_submitting(j,false)}var d=false;for(var c=0;c<this._canvas_list.length;c++){var a=this._canvas_list[c].canvas;if(a==null){this.logger.error("Undefined canvas ["+this._canvas_list[c].name+"] Skipping");continue}else{this.logger.msg("Checking changed for submitting canvas ["+a.name+"]")}if(a.changed()==true){this.logger.msg("Canvas changed ["+a.name+"]");d=true}}if(d==false&&this.mode()!=FW.QUERY_MODE){this.logger.msg("No canvases changed and mode does not equal query mode. Canvas group not submitting");if(this.alert_not_changed){var b=1;this.message.add(messages[b]);this.message.show()}return false}else{this.logger.msg("One or more canvases changed or mode equals query mode. Canvas group submitting")}var g=true;for(var c=0;c<this._canvas_list.length;c++){var a=this._canvas_list[c].canvas;var k=this._canvas_list[c].submit_not_changed;if(a==null){this.logger.error("Undefined canvas ["+this._canvas_list[c].name+"] Skipping");continue}else{this.logger.msg("Submitting canvas ["+a.name+"]")}if(a.changed()==false&&k!=1){continue}if(a.mode()==FW.QUERY_MODE){if(a.do_query(null,false)==false){g=false}}else{if(a.mode()==FW.INSERT_MODE){if(a.do_insert(null,false)==false){g=false}}else{if(a.mode()==FW.UPDATE_MODE){if(a.do_update(null,false)==false){g=false}}}}}if(g==false){return false}this._disable_submitting(j);this.element.submit(true);this.logger.end();return true};FW_Page_CanvasGroup.prototype._disable_submitting=FW_Page_Canvas.prototype._disable_submitting;FW_Page_CanvasGroup.prototype.do_clear=function(){this.logger.srt(this,"do_clear");for(var b=0;b<this._canvas_list.length;b++){var a=this._canvas_list[b].canvas;if(a==null){this.logger.error("Undefined canvas ["+this._canvas_list[b].name+"] Skipping");continue}else{this.logger.msg("Submitting canvas ["+a.name+"]")}a.clear()}this.logger.end();return true};FW_Page_CanvasGroup.prototype.add_widget=function(a){this.logger.srt(this,"add_widget");a.logger=this.logger;a.canvas=this;a.canvas_group=this;a.message=this.message;this._widget_list.push(a);this.logger.msg("Adding ["+a.id+"]");this.logger.end();return a};function FW_Page_Widget(a){this.message=null;this.initial_value=null;this.id=null;this.name=null;this.element=null;this.element_interface=null;this.bubblehint=null;this.label_bubblehint=null;this.renderer=null;this.label_id=null;this.label_text=null;this.value_element_id=null;this.value_element=null;this.canvas=null;this.clear_behaviour=FW.CLEAR_BEHAVIOUR_NONE;this.required=false;this.type=null;this.validate_on_change=true;this.highlight_on_focus=false;this._init_args(a);this._busy=false;this._key_handle_list=new Array();this.widget_type=FW.WIDGET_TYPE_UNKNOWN}FW_Page_Widget.prototype=new FW_Page;FW_Page_Widget.prototype.className="FW_Page_Widget";FW_Page_Widget.prototype.clone_behaviour=function(){return FW.concat_hash(FW.prototype.clone_behaviour(),{canvas:FW.CLONE_COPY,logger:FW.CLONE_COPY,profiler:FW.CLONE_COPY,label:FW.CLONE_IGNORE,value_element:FW.CLONE_IGNORE,element_interface:FW.CLONE_IGNORE,element:FW.CLONE_IGNORE})};FW_Page_Widget.prototype.destroy=function(){};FW_Page_Widget.prototype.init=function(a){this.logger.srt(this,"init");this.profiler=a.profiler;if(this._initalised==true){this.logger.error("Already initialised ["+this.id+"]");return false}this._initalised=true;if(this._event_handle_list==null){this._event_handle_list={click:null,mousedown:null,change:this._event_onchange,mouseup:null,mouseout:null,focus:this._event_onfocus,blur:this._event_onblur,keydown:null,keypress:null,keyup:null}}if(this.id&&!this.element){this.element=document.getElementById(this.id)}if(this.element==null){this.logger.error("Couldnt find widget element id ["+this.id+"]");this.logger.end();return false}else{this.logger.msg("Found widget ["+this.element+"] for ID ["+this.id+"]")}if(this.label_id!=null){this.profiler.start(this,"Init - Resolve Label");this.label=document.getElementById(this.label_id);this.element.label_id=this.label_id;if(this.label){if(this.label.widget_disp==null){this.label.widget_disp={}}this.label.widget_disp[this.id]=true}this.profiler.end()}if(this.value_element_id!=null){this.value_element=$(this.value_element_id)}if(this.renderer!=null){this.profiler.start(this,"Init - Render Widget");this.renderer.init({element:this.element,profiler:a?a.profiler:null});this.renderer.display(false);this.element=null;this.element=document.getElementById(this.id);this.profiler.end();this.element_interface=this.renderer}else{this.element_interface=this.element}this.logger.msg("Calling super init");this.profiler.start(this,"Init - Super");FW_Page.prototype.init.call(this,a);this.logger.msg("Done super init");this.profiler.end();if(this.type!=null){this.logger.msg("Setting up type ["+this.type+"]");this.type.label=this.label;this.type.logger=this.logger;this.type.message=this.message;this.type.canvas_mode=this.canvas.mode();this.logger.msg("Done up type")}this.logger.msg("Setting up bubblehints");if(this.bubblehint!=null){this.profiler.start(this,"Init - Widget Bubble Hint");FW_BubbleHint.attach(this.element,this.bubblehint);this.profiler.end()}if(this.label_bubblehint!=null&&this.label!=null){this.profiler.start(this,"Init - Label Bubble Hint");FW_BubbleHint.attach(this.label,this.label_bubblehint);this.profiler.end()}this.profiler.start(this,"Init - Initial value");this.logger.msg("Done setting up bubblehints");this.logger.msg("Assigning initial value");if(this.initial_value==null){this.initial_value=this.value()}this.profiler.end();this.initialised=true;this.profiler.start(this,"Init - Key Handling");for(var b=0;b<this._key_handle_list.length;b++){var c=this._key_handle_list[b];this._add_keyhandler(c[0],c[1],c[2],c[3],c[4])}this.profiler.end();this.logger.end();return true};FW_Page_Widget.prototype.init_relations=function(){if(this._relations==null){return false}var a=this._relations.length;for(var b=0;b<a;b++){var c=this._relations[b];c.source_id=this.id;c.source=this;c.init({profiler:this.profiler});c.default_when_not_found=false;c.apply_relation(true);c.default_when_not_found=true}return true};FW_Page_Program.prototype.add_background_request_call=function(a,b){if(b){this.background_request_list.push(background_request)}};FW_Page_Widget.prototype.apply_relations=function(){return false};FW_Page_Widget.prototype.clear_relation_data=function(){return false};FW_Page_Widget.prototype.can_navigate_to=function(){Logger.srt(this,"can_navigate_to");if(this.element!=null&&this.nav_allowed&&!this.disabled()&&!this.busy()&&this.displayed()){Logger.msg("Allowing ["+this.name+"] ["+this.element+"] Nav Allowed ["+this.nav_allowed+"] Disabled ["+this.disabled()+"] Displayed ["+this.displayed()+"]");Logger.end();return true}else{Logger.msg("Not allowing ["+this.element+"] Nav Allowed ["+this.nav_allowed+"] Disabled ["+this.disabled()+"]");Logger.end();return false}};FW_Page_Widget.prototype.unformatted_value=function(){if(this.type!=null){this.type.value(String(this.value()));this.type.unformat();return this.type.unformatted_value}else{return this.value()}};FW_Page_Widget.prototype.value=function(c,b){if(c==null){c=(this.value_element!=null)?(this.value_element.value):(this.element.value);return(c==null)?(""):(c)}else{var a;if(this.value_element!=null){a=this.value_element.value;this.value_element.value=c}else{a=this.element.value}if(this.tag_name()=="SPAN"){if(this.value_element==null){a=this.element.innerHTML}while(this.element.childNodes.length){FW_Element.remove(this.element.childNodes[0])}this.element.innerHTML=c}else{if(this.renderer){this.renderer.value(c)}else{this.element.value=c}}if(this.type!=null){this.type.value(String(c))}if(a!=c&&b!=false){this.call_event("change")}return c}};FW_Page_Widget.prototype.value_name=function(){if(this.element==null){return}return(this.value_element!=null)?(this.value_element.name):(this.element.name)};FW_Page_Widget.prototype.label_value=function(a){if(this.label==null){if(a==null){return this.label_text}else{return this.label_text=a}}else{if(a==null){return this.label.innerHTML}else{return this.label.innerHTML=a}}};FW_Page_Widget.prototype.focus=function(){this._event_onfocus();try{var a=this.element.focus()}catch(b){return false}};FW_Page_Widget.prototype.blur=function(){this._event_onblur();return this.element.blur()};FW_Page_Widget.prototype.disabled=function(c,b){if(c==null){if(this.tag_name()=="SPAN"||this.element.type=="hidden"){return true}else{if(this.renderer){return this.renderer.disabled()}else{return this.element.disabled}}}else{var a=(c==true)?("none"):("");if(b!=false&&this.date_picker&&this.date_picker.icon){this.date_picker.icon.style.display=a}this.element.disabled=c;return c}};FW_Page_Widget.prototype.hidden=function(){if(this.element.type=="hidden"){return true}else{return false}};FW_Page_Widget.prototype.displayed=function(g,c,b){if(g==null){var d=true;if(this.renderer!=null){d=this.renderer.is_displayed()}else{var a=this.element.style.display;if(a=="none"){d=false}else{if(FW_Element.height(this.element)==0){d=false}}}return d}else{var a=(g==false)?("none"):("");if(this.element.widget_style!=null){this.element.widget_style.display=a}else{this.element.style.display=a}if(b!=false&&this.date_picker&&this.date_picker.icon){this.date_picker.icon.style.display=a}if(c!=false&&this.label){this.label.widget_disp[this.id]=g;if(this.label.widget_disp){var a="none";for(widget_name in this.label.widget_disp){if(this.label.widget_disp[widget_name]==true){a="";break}}this.label.style.display=a}else{this.label.style.display=a}}}};FW_Page_Widget.prototype.overlay=function(h,g){h.style.position="absolute";document.body.appendChild(h);var b=h.offsetHeight;var a=h.offsetWidth;if(g=="stretch"){h.style.left=this.left()+"px";h.style.top=this.top()+"px";h.style.width=this.width()+"px";h.style.height=this.height()+"px"}else{var d=this.left()+(parseInt(this.width())/2)-(b/2);var c=this.top()+(parseInt(this.height())/2)-(a/2);h.style.left=d+"px";h.style.top=c+"px"}return true};FW_Page_Widget.prototype.busy=function(b){if(arguments.length>0){if(this._busy==b){return true}this._busy=b;if(this.hidden()==false){if(this._busy==true){var a=document.createElement("div");a.className="WidgetBusyOverlay";a.title="Loading";this.overlay(a,"center");this._busy_overlay=a;this._busy_disabled=this.disabled();this.add_css_class("WidgetBusy");this.disabled(true)}else{if(this._busy_overlay!=null){FW_Element.remove(this._busy_overlay);this._busy_overlay=null}this.remove_css_class("WidgetBusy");this.disabled(this._busy_disabled)}}}else{return this._busy}};FW_Page_Widget.prototype.tag_name=function(){if(this._tag_name==null){this._tag_name=this.element.tagName}return this._tag_name};FW_Page_Widget.prototype.label_highlighted=function(){if(this.label==null){return false}if(this.label.style.color==label_validation_color){return true}else{return false}};FW_Page_Widget.prototype.label_highlight=function(){if(this.label==null){return false}this.label.style.color=label_validation_color;return true};FW_Page_Widget.prototype.label_reset=function(){if(this.label==null){return false}this.label.style.color="";return true};FW_Page_Widget.prototype.valid=function(a){if(a==null){return this._valid}else{this._valid=a;if(a==false){this.add_css_class("WidgetInvalid");this.label_highlight()}else{this.remove_css_class("WidgetInvalid");this.label_reset()}return a}};FW_Page_Widget.prototype.validate=function(b){if(b){this.valid(true)}var a=this.valid();if(this.validate_hooks("before")==false){a=this.valid(false)}else{if(this.validate_required()==false){a=this.valid(false)}else{if(this.validate_type()==false){a=this.valid(false)}else{if(this.validate_hooks("after")==false){a=this.valid(false)}}}}return a};FW_Page_Widget.prototype.clear=function(a){this.label_reset();this.value("",a)};FW_Page_Widget.prototype.reset=function(a){this.label_reset();this.value(this.initial_value,a)};FW_Page_Widget.prototype.is_null=function(){var a=this.value();if(a==""||a==null){return true}return false};FW_Page_Widget.prototype.changed=function(c){if(arguments.length==0){if(this._changed!=null){return this._changed}else{var b=(this.value()==null)?(""):(String(this.value()));var a=(this.initial_value==null)?(""):(String(this.initial_value));if(b!=a){return true}}}else{this._changed=c}return false};FW_Page_Widget.prototype.click=function(){this.call_event("click")};FW_Page_Widget.prototype.row_number=function(d){if(d!=null){var b=this.row_number();this.id=this.id.replace(/\$\d/,"$"+d);if(this.element.id!=null){this.element.id=this.id}if(this.element.name!=null){this.element.name=this.element.name.replace(/\$\d/,"$"+d)}var c=this._relations.length;while(c--){var g=this._relations[c];g.source_id=this.id;if(g.target_id!=null){g.target_id=g.target_id.replace(/\$\d/,"$"+d)}}this._row_number=d}else{if(this._row_number!=null){return this._row_number}var j=this.id;var h=/\$([0-9]*)_/;var a=j.match(h);this._row_number=(a==null?0:a[1])}return this._row_number};FW_Page_Widget.prototype.is_required=function(a){if(a!=null){this.required=a;if(a){if(this.label){this.label.className+=" LabelRequired"}this.add_css_class("WidgetRequired")}else{if(this.label){this.label.className=this.label.className.replace(/LabelRequired/g,"")}this.remove_css_class("WidgetRequired")}}else{return this.required}};FW_Page_Widget.prototype.validate_required=function(){var d=0;var a=1;var c=2;if(this.element.required==1){this.required=true}else{if(this.element.required==0){this.required=false}}if(this.required==true&&this.is_null()==true){var h=null;var g=this.canvas.rows.length;if(g>1){var b=this.row_number();h=constraint_error[c].replace(/#number#/,(parseInt(b)+1));h=h.replace(/#name#/,this.label_value())}else{h=constraint_error[d].replace(/#name#/,this.label_value())}this.message.add(h,FW.MESSAGE_TYPE_ERROR);return false}};FW_Page_Widget.prototype.validate_hooks=function(timing){var valid=true;var len=this._validation_hook_list.length;for(var i=0;i<len;i++){var hook=this._validation_hook_list[i];if(hook.timing!=timing){continue}var data={val_errmsg:hook.message,element:this};var func=hook.func;if(typeof(func)=="function"){var copy_args;if(hook.args!=null){copy_args=FW.copy_array(hook.args);this._resolve_args(copy_args)}if(func.call(data,copy_args)==false){this.message.add(data.val_errmsg,FW.MESSAGE_TYPE_ERROR);valid=false}}else{if(eval(func)==false){this.message.add(hook.message,FW.MESSAGE_TYPE_ERROR);valid=false}}data=null}return valid};FW_Page_Widget.prototype.clone=function(c){var g=FW.prototype.clone.call(this,c);if(g.element!=null){g.element=g.element.cloneNode(true)}if(g.element.detail_relations!=null){g.element.detail_relations=null}var d=this._relations.length;var b=new Array();while(d--){b.push(this._relations[d].clone())}g._relations=b;g._initalised=false;return g};FW_Page_Widget.prototype.validate_type=function(){if(this.is_null()){return true}if(this.type!=null){this.type.value(String(this.value()));if(this.type.validate()==false){this.message.add(this.type.error_message,FW.MESSAGE_TYPE_ERROR);return false}else{this.type.format();var a=this.type.formatted_value;if(this.type.conditions!=null){a=this.type.conditions+this.type.formatted_value}this.value(a,false);return true}}return true};FW_Page_Widget.prototype.add_keyhandler=function(b,a,g,d,c){if(this.initialised==false){this._key_handle_list.push([b,a,g,d,c])}else{this._add_keyhandler(b,a,g,d,c)}};FW_Page_Widget.prototype._add_keyhandler=function(b,a,g,d,c){if(g!=null){if(g==FW.KEY_ACTION_WIDGET_CLICK){return this.key_handler.add_handler(b,a,this._key_action_click,this,c)}else{if(g==FW.KEY_ACTION_WIDGET_FOCUS){return this.key_handler.add_handler(b,a,this._key_action_focus,this,c)}else{if(g==FW.KEY_ACTION_WIDGET_BLUR){return this.key_handler.add_handler(b,a,this._key_action_blur,this,c)}else{if(g==FW.KEY_ACTION_IGNORE){return this.key_handler.add_handler(b,a,this._key_action_ignore,this,c)}else{if(g==FW.KEY_ACTION_CALLBACK){return this.key_handler.add_handler(b,a,d,this,c)}}}}}}return false};FW_Page_Widget.prototype._key_in_scope=function(a){if(a==FW.KEY_SCOPE_PROGRAM){return true}else{if(a==FW.KEY_SCOPE_CANVAS){if(this.canvas.focused()){return true}}else{if(a==FW.KEY_SCOPE_WIDGET){if(this.focused()){return true}}}}return false};FW_Page_Widget.prototype._key_action_click=function(b,a){if(this._key_in_scope(a)==true&&this.ignore_key_handler!=true){this.click();return false}return true};FW_Page_Widget.prototype._key_action_focus=function(b,a){if(this._key_in_scope(a)&&this.ignore_key_handler!=true){this.focus()}};FW_Page_Widget.prototype._key_action_blur=function(b,a){if(this._key_in_scope(a)&&this.ignore_key_handler!=true){this.blur()}};FW_Page_Widget.prototype._key_action_ignore=function(b,a){if(this._key_in_scope(a)&&this.ignore_key_handler!=true){return false}return true};FW_Page_Widget.prototype.add_validation_hook=function(d,c,b,a){this._validation_hook_list.push({message:d,func:c,args:a,timing:b});return true};FW_Page_Widget.prototype.add_relation=function(a){this._relations.push(a);return a};FW_Page_Widget.prototype.focused=function(a){if(a==null){return(this._focused==null)?(false):(this._focused)}else{this._focused=a;if(this.highlight_on_focus){if(a){if(!this.shadow){this.shadow=new FW_Shadow({element:this.element,width:3})}this.shadow.apply()}else{if(this.shadow){this.shadow.remove()}}}}};FW_Page_Widget.prototype.render_type=function(){if(this.renderer!=null){return FW.WIDGET_RENDER_TYPE_INTERNAL}else{return FW.WIDGET_RENDER_TYPE_BROWSER}};FW_Page_Widget.prototype.add_css_class=function(c,b){var a=this.css_class();if(a.search(c)==-1){return this.css_class(a+" "+c)}return c};FW_Page_Widget.prototype.remove_css_class=function(b){var a=this.css_class();if(a){return this.css_class(a.replace(b,""))}};FW_Page_Widget.prototype.css_class=function(c,b){if(c==null){var a;if(this.renderer!=null){a=this.renderer.class_name()}else{if(this.element){a=this.element.className}}return(b)?(a.split(/ /)):(a)}else{if(this.renderer!=null){return this.renderer.class_name(c)}else{if(this.element){return this.element.className=c}}}};FW_Page_Widget.prototype._event_onclick=function(){return true};FW_Page_Widget.prototype._event_onkeydown=function(){return true};FW_Page_Widget.prototype._event_onmouseout=function(){return true};FW_Page_Widget.prototype._event_onkeyup=function(){return true};FW_Page_Widget.prototype._event_onfocus=function(){this.focused(true);if(this.canvas){this.canvas.focused(true)}this.add_css_class("WidgetFocused");return true};FW_Page_Widget.prototype._event_onblur=function(){this.focused(false);if(this.canvas){this.canvas.focused(false)}this.remove_css_class("WidgetFocused");return true};FW_Page_Widget.prototype._event_on_mousedown=function(){return true};FW_Page_Widget.prototype._event_on_mouseup=function(){return true};FW_Page_Widget.prototype._event_onchange=function(){this.logger.srt(this,"_event_onchange");this.logger.msg("Calling onchange for ["+this.name+"]");if(this.validate_on_change==true){if(this.validate_type()==false){this.ignore_keydown=true;this.valid(false);this.message.show();this.select_text();this.focus.bind(this).delay(1)}else{this.valid(true)}}if(this._relations.length>0){this.apply_relations()}this.logger.end();return true};function FW_Page_Widget_Link(a){this.href=null;this.widget_type=FW.WIDGET_TYPE_LINK;this.popform=null;this.target=null;this._init_args(a);this._event_list={};this._relations=new Array();this._key_handle_list=new Array()}FW_Page_Widget_Link.prototype=new FW_Page_Widget;FW_Page_Widget_Link.prototype.init=function(a){this._event_handle_list={click:this._event_onclick,dblclick:null,mouseover:null,mouseout:this._event_onmouseout,mousedown:this._event_onmousedown,mouseup:this._event_onmouseup,focus:this._event_onfocus,blur:this._event_onblur};if(FW_Page_Widget.prototype.init.call(this,a)==false){return false}this.logger.msg("Searching for href");if(this.href==null){this.href=this.element.href}if(this.popform!=null){this.popform.link=this}return true};FW_Page_Widget_Link.prototype.className="FW_Page_Widget_Link";FW_Page_Widget_Link.prototype.validate=function(){return true};FW_Page_Widget_Link.prototype.disabled=function(a){if(arguments.length==0){if(this.element==null||this.element.tagName=="SPAN"||this.element.disabled){return true}else{return false}}else{this.element.disabled=a}};FW_Page_Widget_Link.prototype.clear=function(){return true};FW_Page_Widget_Link.prototype.reset=function(){return true};FW_Page_Widget_Link.prototype.value=function(){return true};FW_Page_Widget_Link.prototype._event_onclick=function(d){if(this.popform!=null){this.popform.display();return false}if(this.disabled()){return false}if(this.is_link!=false){var b=(this.href==null)?(FW_Page_Program.prototype.url()):(this.href);var a=false;if(typeof(b)=="object"){a=true;var c=(b.url==null)?(FW_Page_Program.prototype.url()):(b.url);b.url=c}if(this.target==null){if(a){b.submit()}else{FW_Browser.url(b)}}else{if(a){b=b.generate_get()}this.target.url=b;this.target.open()}}if(this.call_event("click","after")==false){return false}if(d){d.preventDefault=true}FW_BubbleHint.hide();return false};function FW_Page_Widget_Link_Button(a){this._init_args(a);this.widget_type=FW.WIDGET_TYPE_LINK_BUTTON;this._event_list={};this._relations=new Array();this._pop_form_list=new Array();this._key_handle_list=new Array()}FW_Page_Widget_Link_Button.prototype=new FW_Page_Widget_Link;FW_Page_Widget_Link_Button.prototype.className="FW_Page_Widget_Link_Button";FW_Page_Widget_Link_Button.prototype.init=function(a){this._event_handle_list={click:this._event_onclick,dblclick:null,mouseover:null,mouseout:null,mousedown:null,focus:this._event_onfocus,blur:this._event_onblur,mouseup:null};return FW_Page_Widget_Link.prototype.init.call(this,a)};FW_Page_Widget_Link_Button.prototype.validate=function(){return true};FW_Page_Widget_Link_Button.prototype.clear=function(){return true};FW_Page_Widget_Link_Button.prototype.reset=function(){return true};FW_Page_Widget_Link_Button.prototype.value=function(){return true};function FW_Page_Widget_Link_Image(a){this.disabled_image_src=null;this.image_src=null;this.mouse_down_image_src=null;this._pop_form_list=new Array();this._key_handle_list=new Array();this._init_args(a);this.widget_type=FW.WIDGET_TYPE_LINK_IMAGE;this._event_list={};this._relations=new Array()}FW_Page_Widget_Link_Image.prototype=new FW_Page_Widget_Link;FW_Page_Widget_Link_Image.prototype.className="FW_Page_Widget_Link_Image";FW_Page_Widget_Link_Image.prototype.validate=function(){return true};FW_Page_Widget_Link_Image.prototype.init=function(a){this._preload_images(new Array(this.disabled_image_src,this.image_src,this.mouse_down_image_src));this._event_handle_list={click:this._event_onclick,dblclick:null,mouseover:null,mouseout:this._event_onmouseout,mousedown:this._event_onmousedown,mouseup:this._event_onmouseup,focus:this._event_onfocus,blur:this._event_onblur};return FW_Page_Widget_Link.prototype.init.call(this,a)};FW_Page_Widget_Link_Image.prototype.clear=function(){return true};FW_Page_Widget_Link_Image.prototype.reset=function(){return true};FW_Page_Widget_Link_Image.prototype.value=function(){return true};FW_Page_Widget_Link_Image.prototype.disabled=function(a){if(a==null){if(this.element.nodeName=="IMG"){return true}else{return this.element.disabled}}else{this.element.disabled=a;if(a==true){this.src(this.disabled_image_src)}else{this.src(this.image_src)}return a}};FW_Page_Widget_Link_Image.prototype._event_onmousedown=function(){if(this.disabled()==true){return false}if(this.mouse_down_image_src!=null){this.src(this.mouse_down_image_src)}return true};FW_Page_Widget_Link_Image.prototype._event_onmouseup=function(){if(this.disabled()==true){return false}if(this.mouse_down_image_src!=null){this.src(this.image_src)}return true};FW_Page_Widget_Link_Image.prototype._event_onmouseout=function(){if(!this.disabled()){if(this.mouse_down_image_src!=null){this.src(this.image_src)}}return true};FW_Page_Widget_Link.prototype.click=function(){try{this.element.click()}catch(a){this.call_event("click","before");this.call_event("click","framework");this._event_onclick()}this.call_event("click","after");return false};FW_Page_Widget_Link_Image.prototype._preload_images=function(c){for(var a=0;a<c.length;a++){if(c[a]==null){continue}var b=new Image;b.src=c[a]}};FW_Page_Widget_Link_Image.prototype.src=function(a){if(a==null){return this.element.src}else{this.element.src=a}};function FW_Page_Widget_List(a){this.default_on_single_item=false;this._init_args(a);this.widget_type=FW.WIDGET_TYPE_LIST;this._validation_hook_list=new Array();this._event_list={};this._relations=new Array();this._key_handle_list=new Array()}FW_Page_Widget_List.prototype=new FW_Page_Widget;FW_Page_Widget_List.prototype.className="FW_Page_Widget_List";FW_Page_Widget_List.prototype.init=function(a){this._event_handle_list={click:null,dblclick:null,mousedown:null,change:this._event_onchange,mouseup:null,mouseout:null,focus:this._event_onfocus,blur:this._event_onblur,keydown:null,keypress:null,keyup:null};if(FW_Page_Widget.prototype.init.call(this,a)){if(this.default_on_single_item){this.default_single_item();this.element.default_on_single_item=true}return true}else{return false}};FW_Page_Widget_List.prototype.regenerate=function(){if(this.renderer!=null){this.renderer.regenerate()}};FW_Page_Widget_List.prototype.add_option=function(b,c,a){if(this.renderer==null){if(c==null){this.element.options.add(b)}else{this.element.options.add(b,c)}}else{this.renderer.add(b,c,a)}};FW_Page_Widget_List.prototype.scroll_to_selected=function(){if(this.renderer){this.renderer._option_list.show_selected()}};FW_Page_Widget_List.prototype.add=function(c,b,d,a){if(this.renderer==null){return this.element.options.add(new Option(c,b))}else{return this.renderer.add(new FW_HTMLForm_Option(c,b),d,a)}};FW_Page_Widget_List.prototype.remove_all=function(){if(this.renderer==null){if(this.element.options){for(var a=this.element.options.length-1;a>=0;a--){FW_Element.remove(this.element.options[a])}}}else{this.renderer.remove_all()}};FW_Page_Widget_List.prototype.remove_option=function(a){if(this.renderer){this.renderer.remove(a)}else{FW_Element.remove(a)}this.element_interface.remove(a)};FW_Page_Widget_List.prototype.options=function(){if(this.renderer!=null){return this.renderer.options()}else{if(this.element&&this.element.options){return this.element.options}}return[]};FW_Page_Widget_List.prototype.selected_index=function(a,c){c=(c!=null)?(c):(true);if(this.renderer!=null){return this.renderer.selectedIndex(a,c)}else{if(a==null){return this.element.selectedIndex}else{var b=this.element.selectedIndex;this.element.selectedIndex=a;if(c!=false&&b!=a){this.call_event("change")}}}if(a!=null&&this.value_element_id){this.value_element.value=this.element.value}};FW_Page_Widget_List.prototype.clone=function(c){var h=FW.prototype.clone.call(this,c);var j=h.element.id;var d=h.element.name;if(h.renderer!=null){h.element=h.renderer.select}if(h.element!=null){h.element=h.element.cloneNode(true);h.element.id=j;h.element.name=d}if(h.element.detail_relations!=null){h.element.detail_relations=null}var g=this._relations.length;var b=new Array();while(g--){b.push(this._relations[g].clone())}h._relations=b;h._initalised=false;return h};FW_Page_Widget_List.prototype.default_single_item=function(){var a=this.options();if(a.length>2){return false}var h=0;for(var b=0;b<a.length;b++){if(a[b].value!=""){h++}}if(h==1){var d=parseInt(a.length)-1;if(this.selected_index()!=d){var g=a[a.length-1].value;this.value(g)}return true}else{return false}};FW_Page_Widget_List.prototype.clear=function(d){this.label_reset();var c=this.element.options;if(c==null){return false}var h=0;var a=this.element.selectedIndex;for(var b=0;b<c.length;b++){var g=c[b].value;if(g==""||g==null){h=b;break}}this.selected_index(h,d);return true};function FW_Page_Widget_CheckBox(a){this._init_args(a);this.widget_type=FW.WIDGET_TYPE_CHECKBOX;this._validation_hook_list=new Array();this._event_list={};this._relations=new Array();this._key_handle_list=new Array()}FW_Page_Widget_CheckBox.prototype=new FW_Page_Widget;FW_Page_Widget_CheckBox.prototype.className="FW_Page_Widget_CheckBox";FW_Page_Widget_CheckBox.prototype.init=function(a){this._event_handle_list={click:this._event_onclick,mousedown:this._event_onmousedown,change:this._event_onchange,mouseup:null,mouseout:null,focus:this._event_onfocus,blur:this._event_onblur,keydown:null,keypress:null,keyup:null};if(FW_Page_Widget.prototype.init.call(this,a)){if(this.initial_value!=null){if(this.initial_value==""){this._initial_checked=null}else{if(this.initial_value==this.element.value){this._initial_checked=true}else{if(this.initial_value==this.element.value_unchecked){this._initial_checked=false}}}}else{this._initial_checked=this.element.checked}}else{return false}if(this.label!=null){EventHandler.addEvent(this.label,"click",this.toggle,this)}return true};FW_Page_Widget_CheckBox.prototype.is_null=function(){if(this.element.is_null==true){return true}return false};FW_Page_Widget_CheckBox.prototype.disabled=function(a){if(this.tag_name()=="IMG"){return true}else{return FW_Page_Widget.prototype.disabled.call(this,a)}};FW_Page_Widget_CheckBox.prototype.click=function(){this.call_event("click","before");this.call_event("click","framework");this.toggle();this.call_event("click","after");return true};FW_Page_Widget_CheckBox.prototype.clear=function(){if(this.element.clear!=null){this.element.clear()}else{this.element.checked=false}return true};FW_Page_Widget_CheckBox.prototype.reset=function(){this.element.checked=this._initial_checked};FW_Page_Widget_CheckBox.prototype.toggle=function(){if(this.element.checked==true){this.checked(false)}else{this.checked(true)}return true};FW_Page_Widget_CheckBox.prototype.checked=function(a){if(String(a)=="undefined"){return this.element.checked}else{this.element.checked=a}};FW_Page_Widget_CheckBox.prototype.value=function(b){if(b==null){if(this.element.is_null){return null}var a=this.element.checked;if(a==true){return this.element.value}else{if(a==false){return this.element.value_unchecked}}}else{if(b==this.element.value){this.checked(true)}else{if(b==this.element.value_unchecked){this.checked(false)}else{this.checked(null)}}return b}};FW_Page_Widget_CheckBox.prototype._event_onclick=function(a){this._call_event("after",a);return false};FW_Page_Widget_CheckBox.prototype._event_onchange=function(a){FW_Page_Widget.prototype._event_onchange.call(this,a);return true};FW_Page_Widget_CheckBox.prototype._event_onmousedown=function(){return true};FW_Page_Widget_CheckBox.prototype._event_onmouseup=function(){return true};function FW_Page_Widget_TextField(a){this.date_picker=null;this.onfocus=FW.WIDGET_TEXTFIELD_ONFOCUS_CURSOR_LAST_CHAR;this._init_args(a);this.widget_type=FW.WIDGET_TYPE_TEXTFIELD;this._validation_hook_list=new Array();this._event_list={};this._relations=new Array();this._key_handle_list=new Array()}FW_Page_Widget_TextField.prototype=new FW_Page_Widget;FW_Page_Widget_TextField.prototype.className="FW_Page_Widget_TextField";FW_Page_Widget_TextField.prototype.init=function(a){this._event_handle_list={click:null,mousedown:null,change:this._event_onchange,mouseup:null,mouseout:null,focus:this._event_onfocus,blur:this._event_onblur,keydown:null,keypress:null,keyup:this._event_onkeyup};if(FW_Page_Widget.prototype.init.call(this,a)==false){return false}if(this.date_picker!=null){this._init_date_picker()}return true};FW_Page_Widget_TextField.prototype._init_date_picker=function(a){this.date_picker.widget=this;this.date_picker.element=this.element;this.date_picker.mask=this.type.mask;this.date_picker.init()};FW_Page_Widget_TextField.prototype._event_onkeyup=function(b){if(this.nav_on_max_length&&FW_KeyHandler.is_char(b.keyCode)){var a=parseInt(this.value().length);if(a>=this.max_length()){this.canvas.navigate_widget_forward()}}};FW_Page_Widget_TextField.prototype._event_onfocus=function(){if(this.onfocus==FW.WIDGET_TEXTFIELD_ONFOCUS_SELECT_TEXT){this.select_text()}else{if(this.onfocus==FW.WIDGET_TEXTFIELD_ONFOCUS_CURSOR_FIRST_CHAR){this.select_text(0,0)}}FW_Page_Widget.prototype._event_onfocus.call(this);return true};FW_Page_Widget_TextField.prototype.select_text=function(g,a){if(g==null&&b==null){this.element.select()}else{if(a==null){a=i.value.length}if(g==null){g=0}if(this.element.createTextRange){var c=this.element.createTextRange();var d="-"+String(i.value).length;c.moveStart("character",d);c.moveEnd("character",d);c.moveStart("character",g);c.moveEnd("character",a);c.select()}else{var b=parseInt(a)+parseInt(g);this.element.setSelectionRange(g,b)}}return true};FW_Page_Widget_TextField.prototype.max_length=function(a){if(a==null){if(this.element.maxLength!=null){return this.element.maxLength}else{return this.element.size}}else{this.element.maxLength=a}};function FW_Page_Widget_TextArea(a){this.max_length=null;this._init_args(a);this.widget_type=FW.WIDGET_TYPE_TEXTAREA;this._validation_hook_list=new Array();this._event_list={};this._relations=new Array();this._key_handle_list=new Array()}FW_Page_Widget_TextArea.prototype=new FW_Page_Widget;FW_Page_Widget_TextArea.prototype.className="FW_Page_Widget_TextArea";FW_Page_Widget_TextArea._characters_element=null;FW_Page_Widget_TextArea.prototype.init=function(a){this._event_handle_list={click:null,mousedown:null,change:this._event_onchange,mouseup:null,mouseout:null,focus:this._event_onfocus,blur:this._event_onblur,keydown:this._event_onkeydown,keypress:null,keyup:this._event_onkeyup};return FW_Page_Widget.prototype.init.call(this,a)};FW_Page_Widget_TextArea.bubbleClassName="BubbleHintDef";FW_Page_Widget_TextArea.prototype.validate=function(){var a=1;if(this.max_length!=null&&this.value().length>this.max_length){this.valid(false);this.message.add(constraint_error[a].replace(/#name#/,this.label_value()).replace(/#max#/,this.max_length),FW.MESSAGE_TYPE_ERROR);return this.valid()}return FW_Page_Widget.prototype.validate.call(this)};FW_Page_Widget_TextArea.prototype._event_onkeyup=function(){this._check_length();this._update_characters();return true};FW_Page_Widget_TextArea.prototype._event_onkeydown=function(a){if(a.keyCode==FW.KEY_ENTER){FW_KeyHandler.ignore_key_no_block=true}return true};FW_Page_Widget_TextArea.prototype._event_onfocus=function(){this._show_characters();this._update_characters();FW_Page_Widget.prototype._event_onfocus.call(this);return true};FW_Page_Widget_TextArea.prototype._event_onblur=function(){this._hide_characters();FW_Page_Widget.prototype._event_onblur.call(this);return true};FW_Page_Widget_TextArea.prototype._check_length=function(){var a=this.value().length;if(this.max_length!=null&&this.element!=null&&this.element.readOnly==false&&a>=this.max_length){this.value(this.value().substr(0,this.max_length))}};FW_Page_Widget_TextArea.prototype._update_characters=function(){var c=this.value().length;if(this.max_length!=null&&FW_Page_Widget_TextArea._characters_element!=null){var b=parseInt(this.max_length)-parseInt(c);var a=String("#current# of #total#. #remaining# characters remaining");FW_Page_Widget_TextArea._characters_element.innerHTML=a.replace("#current#",c).replace("#total#",this.max_length).replace("#remaining#",b)}return true};FW_Page_Widget_TextArea.prototype._show_characters=function(){if(this.max_length==null||this.element==null||this.element.readOnly==true||this.element.disabled==true){return true}var a;if(FW_Page_Widget_TextArea._characters_element==null){a=document.createElement("DIV");a.className=FW_Page_Widget_TextArea.bubbleClassName;a.style.position="absolute";FW_Page_Widget_TextArea._characters_element=a;document.body.appendChild(a)}else{a=FW_Page_Widget_TextArea._characters_element}a.style.display="inline";a.style.left=this.left()+"px";a.style.top=parseInt(this.top())+parseInt(this.height())+"px"};FW_Page_Widget_TextArea.prototype._hide_characters=function(){if(this.max_length!=null&&FW_Page_Widget_TextArea._characters_element!=null){FW_Page_Widget_TextArea._characters_element.style.display="none"}};function FW_Page_Widget_File(a){this._init_args(a);this.widget_type=FW.WIDGET_TYPE_FILE;this._validation_hook_list=new Array();this._event_list={};this._relations=new Array();this._key_handle_list=new Array()}FW_Page_Widget_File.prototype=new FW_Page_Widget;FW_Page_Widget_File.prototype.className="FW_Page_Widget_File";FW_Page_Widget_File.prototype.init=function(a){this._event_handle_list={click:null,mousedown:null,change:this._event_onchange,mouseup:null,mouseout:null,focus:this._event_onfocus,blur:this._event_onblur,keydown:null,keypress:null,keyup:this._event_onkeyup};if(FW_Page_Widget.prototype.init.call(this,a)==false){return false}return true};FW_Page_Widget_File.prototype._event_onkeyup=function(a){};FW_Page_Widget_File.prototype._event_onfocus=function(){FW_Page_Widget.prototype._event_onfocus.call(this);return true};FW_Page_Widget_File.prototype.max_length=function(a){if(a==null){if(this.element.maxLength!=null){return this.element.maxLength}else{return this.element.size}}else{this.element.maxLength=a}};function FW_Page_Widget_Collapse(a){this.widget_type=FW.WIDGET_TYPE_COLLAPSE;this.cookie_name="FWWidgetCollapse";this._init_args(a);this._validation_hook_list=new Array();this._event_list={};this._relations=new Array();this._key_handle_list=new Array();this.maximise_class="CollapseMaximised";this.minimise_class="CollapseMinimised";if(this.state_id==null){this.state_id=this.id}this.state_key=this.state_id;this.init_cookie();if(this.initial_state=="Minimised"){this.initial_state=this.MINIMISED}else{this.initial_state=this.MAXIMISED}this.state=this.initial_state;if(FW.effects_enabled==true){this.effect=new FW_Effect_Height()}}FW_Page_Widget_Collapse.prototype=new FW_Page_Widget;FW_Page_Widget_Collapse.prototype.className="FW_Page_Widget_Collapse";FW_Page_Widget_Collapse._cookie=null;FW_Page_Widget_Collapse.prototype.MAXIMISED=1;FW_Page_Widget_Collapse.prototype.MINIMISED=0;FW_Page_Widget_Collapse.prototype.init=function(a){this._event_handle_list={click:this._event_onclick,mousedown:null,change:this._event_onchange,mouseup:null,mouseout:null,focus:null,blur:null,keydown:null,keypress:null,keyup:null};this.element=document.getElementById(this.id);if(FW_Page_Widget.prototype.init.call(this,a)==false){return false}this.maximised_obj=this.get_element_by_class(this.maximise_class);this.minimised_obj=this.get_element_by_class(this.minimise_class);this.item_effect=new Array();for(var b=0;b<this.items.length;b++){if(this.effect!=null){var c=this.effect.clone();c.element=$(this.items[b]);this.item_effect.push(c)}}if(this.force_state!=null){if(this.force_state=="Minimised"){this.state=this.MINIMISED}else{this.state=this.MAXIMISED}this._save_state(this.state)}else{this._load_state()}if(this.maximised_obj){FW_Element.remove_css_class(this.maximised_obj,"CollapseInitialState")}if(this.minimised_obj){FW_Element.remove_css_class(this.minimised_obj,"CollapseInitialState")}this.display();return true};FW_Page_Widget_Collapse.prototype.init_cookie=function(){if(this.maintain_state==1){if(Widget_Collapse._cookie==null){try{FW_Page_Widget_Collapse._cookie=new Cookie({name:this.cookie_name,logger:this.logger})}catch(a){alert(a.message)}}this.cookie=FW_Page_Widget_Collapse._cookie}};FW_Page_Widget_Collapse.prototype.get_element_by_class=function(b){for(var a=0;a<this.element.childNodes.length;a++){if(FW_Element.has_css_class(this.element.childNodes[a],b)){return this.element.childNodes[a]}}};FW_Page_Widget_Collapse.prototype._event_onclick=function(){this.toggle()};FW_Page_Widget_Collapse.prototype.toggle=function(){if(this.state==this.MINIMISED){this.maximise()}else{if(this.state==this.MAXIMISED){this.minimise()}}};FW_Page_Widget_Collapse.prototype.maximise=function(c,d){for(var a=0;a<this.items.length;a++){var g=$(this.items[a]);if(!g){continue}var b=this.item_effect[a];this._maximise(g);if(b!=null&&c!=0){b.start=0;b.end=100;b.oncomplete=null;b.apply()}}if(d!=0){this._save_state(this.MAXIMISED)}this.state=this.MAXIMISED;this.maximised_obj.style.display="";this.minimised_obj.style.display="none"};FW_Page_Widget_Collapse.prototype._obj_id=function(a){return a.id};FW_Page_Widget_Collapse.prototype.minimise=function(c,g){var d=this;for(var a=0;a<this.items.length;a++){var h=$(this.items[a]);if(!h){continue}var b=this.item_effect[a];if(b!=null&&c!=0){b.start=100;b.end=0;b.oncomplete=function(j){this._minimise($(this.items[j]))}.bind(this,[a]);b.apply()}else{this._minimise(h)}}if(g!=0){this._save_state(this.MINIMISED)}this.maximised_obj.style.display="none";this.minimised_obj.style.display="";this.state=this.MINIMISED};FW_Page_Widget_Collapse.prototype._save_state=function(a){if(this.cookie!=null){this.cookie_params=new CookieParams({data:this.cookie.value,logger:this.logger});if(a==this.initial_state){this.cookie_params.delete_param(this.state_key)}else{this.cookie_params.set_param(this.state_key,a)}this.cookie.value=this.cookie_params.get_data();this.cookie.update()}};FW_Page_Widget_Collapse.prototype._load_state=function(){if(this.cookie!=null){this.cookie_params=new CookieParams({data:this.cookie.value,logger:this.logger});var a=this.cookie_params.get_param(this.state_key,a);if(a!=null){this.state=a}}};FW_Page_Widget_Collapse.prototype._minimise=function(a){a.className=a.className.replace("Maximised","");a.className+=" Minimised"};FW_Page_Widget_Collapse.prototype._maximise=function(a){a.className=a.className.replace("Minimised","");a.className+=" Maximised"};FW_Page_Widget_Collapse.prototype.display=function(){if(this.state==this.MINIMISED){this.minimise(0,0)}else{this.maximise(0,0)}};function FW_Type(a){this.formatted_value=null;this.unformatted_value=null;this.mask=null;this.canvas_mode=null;this.error_message=null;this.label_text=null;this._value=null}FW_Type.prototype=new FW;FW_Type.prototype.className="FW_Type";FW_Type.prototype.clone_behaviour=function(){return FW.concat_hash(FW.prototype.clone_behaviour(),{label:FW.CLONE_IGNORE,logger:FW.CLONE_IGNORE})};FW_Type.prototype._init_args=function(a){for(arg in a){this[arg]=a[arg]}};FW_Type.prototype.format=function(){};FW_Type.prototype.unformat=function(){};FW_Type.prototype.validate=function(){};FW_Type.prototype.value=function(a){};function FW_Type_String(a){this.length=null;this.min=null;this.max=null;this.mask=null;this._value=String("");this._init_args(a)}FW_Type_String.prototype=new FW_Type;FW_Type_String.prototype.className="FW_Type_String";FW_Type_String.prototype.value=function(a){if(a==null){return this._value}else{this.error_message=null;this._value=a;this.formatted_value=a;this.unformatted_value=a}};FW_Type_String.prototype.validate=function(){var h=0;var d=1;var m=2;var a=1;this.error_message=null;var c=this._value;var q,o,j,b;var p=unescape(this.mask);var l=new RegExp(p);var k=c;var g=c;g=g.replace(/\%/,"").replace(/\?/,"");if(this.mask&&!l.test(c)&&(c!="")){this.error_message=string_error[d].replace(/#val#/,g).replace(/#mask#/,unescape(this.mask)).replace(/#full_value#/,k).replace(/#caption#/,this.label_text)}if(this.error_message&&this.error_phrase){this.error_message=this.error_phrase}return(this.error_message==null?true:false)};function FW_Type_Date(a){this.min=null;this.max=null;this.mask=["%","Y","%","m","%","d"].join("");var b;if(a&&a.value){b=a.value;delete (a.value)}this._init_args(a);if(b){this.value(b)}}FW_Type_Date.prototype=new FW_Type;FW_Type_Date.prototype.className="FW_Type_Date";FW_Type_Date.prototype.format=function(){this.formatted_value=null;if(this.unformatted_value==null||this.unformatted_value==""){return false}var b=this.mask;var g=new Array;var c=0;var a=b.length;var k=this.unformatted_value;for(var h=0;h<a;h++){if(b.charAt(h)=="%"){h++;switch(b.charAt(h)){case"d":c=k.getDate();g.push(c<10?"0"+c:c);break;case"b":g.push(FW.init_cap(mth_short[k.getMonth()]));break;case"m":c=k.getMonth()+1;g.push(c<10?"0"+c:c);break;case"Y":g.push(k.getFullYear());break;case"H":c=k.getHours();g.push(c<10?"0"+c:c);break;case"I":c=k.getHours();if(c>12){c-=11}g.push(c<10?"0"+c:c);break;case"M":c=k.getMinutes();g.push(c<10?"0"+c:c);break;case"S":c=k.getSeconds();g.push(c<10?"0"+c:c);break;case"p":c=k.getHours();g.push(am_pm[c<12?0:1]);break}}else{g.push(b.charAt(h))}}this.formatted_value=g.join("");return this.formatted_value};FW_Type_Date.prototype.value=function(a){if(a==null){return this._value}else{this.error_message=null;this._value=a;if(a==""){this.formatted_value=null;this.unformatted_value=null}else{if(a!=Date){if(this.unformat()==false){return false}}}}};FW_Type_Date.prototype.validate=function(){if(this.error_message!=null){return false}};FW_Type_Date.prototype.unformat=function(){this.error_message=null;var A=0,m=1,V=2,r=3,aa=4,g=5,l=6,L=7,t=8,o=9,W=10,I=11,b=13,M=14;var R=this.canvas_mode==FW.QUERY_MODE?1:0;var h=[0,1,1,0,0,0],p,P,J=0,U=this.mask,a=this.mask.length,Q,C,ac=0,Z=0,X=0,v,q,N,n,O,ae,y,E,K=false,c,T,D,z,H,G=false;if(R){var S=this._value.match(/^>=|<=|<>|!=|>|</);if((S!=null)&&(S[0]!=null)){J=S[0].length}}Q=this._value.substring(J);C=Q.length;while(a>0){a--;v=U.charAt(ac++);if(v=="%"){if(a<=0){this.error_message=date_error[m];break}a--;v=U.charAt(ac++);switch(v){case"d":O=2;ae=1;y=31;E=2;break;case"b":O=3;ae=null;E=1;break;case"m":O=2;ae=1;y=12;E=1;break;case"Y":O=4;ae=1900;y=2199;E=0;break;case"H":O=2;ae=0;y=23;E=3;break;case"I":K=true;O=2;ae=1;y=12;E=3;break;case"M":K=true;O=2;ae=0;y=59;E=4;break;case"S":K=true;O=2;ae=0;y=59;E=5;break;case"p":K=true;O=2;ae=null;E=3;break}if(C<O){this.error_message=date_error[V];break}N=Q.substring(Z,Z+O);Z+=O;C-=O;if(ae==null){N=N.toLowerCase();if(E==1){for(X=0;X<12;X++){if(N==mth_short[X]){break}}if(X>=12){this.error_message=date_error[L].replace(/#val#/,N);break}h[E]=X}else{if(E==3){if(N==am_pm[0]){}else{if(N==am_pm[1]){h[E]+=11}else{this.error_message=date_error[t].replace(/#val#/,N).replace(/#am#/,am_pm[0]).replace(/#pm#/,am_pm[1]);break}}}}}else{n=(N-0);if(isNaN(n)){this.error_message=date_error[aa].replace(/#fld#/,date_bits[E]);break}else{if((n<ae)||(n>y)){this.error_message=date_error[l].replace(/#fld#/,date_bits[E]).replace(/#min#/,ae).replace(/#max#/,y);break}}if(E==1){h[E]=(n-1)}else{h[E]=n}}}else{if(C<=0){this.error_message=date_error[V];break}C--;q=Q.charAt(Z++);if(v!=q){this.error_message=date_error[r].replace(/#val#/,q).replace(/#mask#/,v);break}}}if(this.error_message==null){if(C>0){this.error_message=date_error[g].replace(/#val#/,Q.substring(Z))}else{P=new Date(h[0],h[1],h[2],h[3],h[4],h[5]);if((P.getDate()==h[2])&&(P.getMonth()==h[1])&&(P.getFullYear()==h[0])){++h[1];for(ac=1;ac<6;ac++){if(h[ac]<10){h[ac]="0"+h[ac]}}p=h.join("")}else{this.error_message=date_error[o].replace(/#val#/,h[2])}}}var B,Y;if(this.error_message==null){if(this.min){this.min.unformat();if(P<this.min.unformatted_value){B=true}}if(this.max){this.max.unformat();if(P>this.max.unformatted_value){Y=true}}if(B||Y){if(this.min&&this.max){this.error_message=date_error[W];B=true;Y=true}else{if(B){this.error_message=date_error[I]}else{if(Y){this.error_message=date_error[b]}}}if(B){U=this.min.mask;this.min.mask=this.mask;this.error_message=this.error_message.replace(/#min#/,this.min.format());this.min.mask=U}if(Y){U=this.max.mask;this.max.mask=this.mask;this.error_message=this.error_message.replace(/#max#/,this.max.format());this.max.mask=U}var ad=new FW_Type_Date({mask:this.mask,value:this._value});this.error_message=this.error_message.replace(/(#val#|#date#)/,ad.format())}}if(this.error_message==null){this.unformatted_value=P}else{this.error_message=this.error_message.replace(/#val#/,p).replace(/#am#/,am_pm[0]).replace(/#pm#/,am_pm[1]).replace(/#mask#/,U).replace(/#full_value#/,this._value);var ab=new FW_Type_Date({mask:U});ab.unformatted_value=new Date();var F=ab.format();this.error_message=this.error_message+"\n\n"+date_error[M]+F}return(this.error_message==null?true:false)};function FW_Type_Number(a){this._value=null;this.unformatted_value=null;this.formatted_value=null;this.conditions=null;this.decimal=null;this.min=null;this.max=null;this._init_args(a)}FW_Type_Number.prototype=new FW_Type;FW_Type_Number.prototype.className="FW_Type_Number";FW_Type_Number.prototype._init_args=function(a){if(a==null){a=new Array()}FW_Type.prototype._init_args.call(this,a);this.init()};FW_Type_Number.prototype.init=function(){var h=this.mask;if(this.mask==null){if(this.decimal==null){this.decimal=99}if(this.min==null){this.min=0}if(this.max==null){this.max=9999999999}}else{if(this.decimal==null||this.min==null||this.max==null){h=h.replace(/[%GLS]/g,"");h=h.replace(/MI/g,"");if(h.search(/FM/)>=0){h=h.replace(/FM/g,"")}var g=new Array("D",".",currency_decimal_chr);var d="D";for(var j in g){if((m_dpos=h.lastIndexOf(g[j]))>-1){d=g[j];break}}if(this.decimal==null){var a=h.split(d);this.decimal=(a[1]==null?0:a[1].length)}var b=h.replace(d,currency_decimal_chr);b=b.replace(/0/g,"9");if(this.min==null){this.min=parseFloat("-"+b)}if(this.max==null){this.max=parseFloat(b)}}}return true};FW_Type_Number.prototype.value=function(a){if(a==null){return this._value}else{this.error_message=null;this._value=a;this.conditions=null;if(a==""){this.formatted_value="";this.unformatted_value="";this.conditions=null}else{this.unformat()}}};FW_Type_Number.prototype.validate=function(){this.logger.srt(this,"validate");if(this.error_message!=null){this.logger.end();return false}var b=2;var a=this.canvas_mode==FW.QUERY_MODE?1:0;if((!a)&&((this.min!=null)&&(this.unformatted_value<this.min)||((this.max!=null)&&(this.unformatted_value>this.max)))){this.logger.warn("Invalid number. Number out of range");this.error_message=number_error[b]}if(this.error_message!=null){this.error_message=this.error_message.replace(/#min#/,this.min).replace(/#val#/,this.value()).replace(/#max#/,this.max)}this.logger.end();if(this.error_message!=null){return false}else{return true}};FW_Type_Number.prototype.unformat=function(){this.logger.srt(this,"unformat",FW.VALIDATION_LOG_LEVEL);this.error_message=null;if(this._value==""||this._value==null){return""}var l=0;var E=1;var F=3;var C=4;var q=false;var r=false;var t=0;var o,m;var B,A,k,a;var d=this.canvas_mode==FW.QUERY_MODE?1:0;var v="[^0-9+\\-\\"+currency_group_sep+"\\"+currency_decimal_chr+(d?"%_":"")+"]";var D=new RegExp(v);var y=new Array;if(this.decimal==null){this.decimal=999}var m=0;var h;if(this.canvas_mode==FW.QUERY_MODE){h=this._value.match(/^>=|<=|<>|!=|>|</);if((h!=null)&&(h[0]!=null)){m=h[0].length}}o=this._value.substring(m);if(this._value!=""){if(this.mask){this.mask=String(this.mask);var g="%";var b=new RegExp(g);if(o.match(b)){alert("Number contains wildcard characters");this.logger.end();return true}var c;var z;if(this.curr_iso){c=this.curr_iso}else{this.curr_iso=c=currency_iso}if(this.curr_sym){z=this.curr_sym}else{this.curr_sym=z=currency_sym}o=o.replace(z,"").replace(c,"");this.logger.msg("Currency sym ["+z+"] ISO Sym ["+c+"]")}o=o.replace(/^[0\s]*/,"").replace(/[\s]*$/,"");if(o.lastIndexOf(currency_decimal_chr)>=0){o=o.replace(/[0]*$/,"")}if((o=="")||(o==currency_decimal_chr)){o="0"}y[0]="+";for(B=0,A=1;(this.error_message==null)&&(B<o.length);B++){if((B==0)&&o.match(D)){this.logger.warn("Invalid number.Matches pattern ? ["+D+"]");this.error_message=number_error[E];break}k=o.charAt(B);if(d&&((k=="%")||(k=="_"))){continue}if((k=="-")||(k=="+")){if(q){this.logger.warn("Invalid number. Already got sign");this.error_message=number_error[E];break}if((B==0)||(B==(o.length-1))){q=true}else{this.logger.warn("Invalid number. Already got sign (2)");this.error_message=number_error[E];break}y[0]=k}else{if(k==currency_decimal_chr){if(r){this.logger.warn("Invalid number. Already got decimal point");this.error_message=number_error[E];break}else{if(this.decimal<1){this.logger.warn("Invalid number. Precision not allowed");this.error_message=number_error[F];break}}r=true;y[A++]="."}else{if(k==currency_group_sep){if(r){this.logger.warn("Invalid number. Group seperator after decimal point");this.error_message=number_error[E];break}}else{y[A++]=k;if(r){if(++t>this.decimal){this.logger.warn("Invalid number. Too much precision");this.error_message=number_error[C]}}}}}}if(this.error_message==null){a=(y.join("")-0);this.unformatted_value=a}if(this.error_message!=null){this.error_message=this.error_message.replace(/#val#/,this._value).replace(/#min#/,this.min).replace(/#max#/,this.max).replace(/#dec#/,this.decimal).replace(/#caption#/,this.label_text).replace(/#full_value#/,this._value)}if(this.error_message==null){if((h!=null)&&(h[0]!=null)){if(d&&h[0]){this.conditions=h[0]}}this.logger.end();return true}else{this.logger.end();return false}}this.logger.end();return true};FW_Type_Number.prototype.format=function(){this.logger.srt(this,"format_number",FW.VALIDATION_LOG_LEVEL);if(this.mask==null){var p=0;if(this.canvas_mode==FW.QUERY_MODE){cmp=this._value.match(/^>=|<=|<>|!=|>|</);if((cmp!=null)&&(cmp[0]!=null)){p=cmp[0].length}}s=this._value.substring(p);this.formatted_value=s;return}if(this._value==""||this._value==null){return""}var A,z,o;var t=String(this.unformatted_value);var r="";if(t.match(/[+-]/)){if(t.match(/-/)){r="-"}else{r="+"}t=t.replace(/[+-]/,"")}var l=t.lastIndexOf(".");var c;var y;if(this.curr_iso){c=this.curr_iso}else{this.curr_iso=c=currency_iso}if(this.curr_sym){y=this.curr_sym}else{this.curr_sym=y=currency_sym}var g=String(this.mask);if(l==-1){if(g.indexOf("D")>-1||g.indexOf(".")>-1){t=t+currency_decimal_chr;l=t.length-1}else{l=t.length}}if(g.search(/FM/)>=0){g=g.replace(/FM/,"")}var b=t.substr(0,l);var k=t.substr(l+1);var d=g.lastIndexOf("D");if(d<0){d=g.lastIndexOf(".")}this.logger.msg("Decimal point position ["+d+"]");var v=0;var a=0;if(d<0){this.logger.msg("MASK: Didnt find decimal point, setting m_dpos to ["+g.length+"]");d=g.length;v=(g.substr(0,d).match(/%[09]/g)).length}else{a=(g.substr(d+1).match(/%[09]/g)).length;v=(g.substr(0,d-1).match(/%[09]/g)).length;this.logger.msg("MASK RHS ["+a+"]")}this.logger.msg("MASK LHS ["+v+"]");if(v<l){this._value=this._value.replace(/./g,"#");this.logger.end();return false}this.logger.msg("n frac ["+k+"]");if(a<k.length){k=Math.round(("0."+k)*Math.pow(10,a))}this.logger.msg("n frac ["+k+"]");this.logger.msg("Number length ["+b.length+"]");var F="";var D="";for(A=0;A<(v-b.length);A++){F=F+"0"}if(a>0){for(A=0;A<(a-k.length);A++){D=D+"0"}}this.logger.msg("LPAD ["+F+"] RPAD ["+D+"]");t=F+b+((a>0)?(currency_decimal_chr+k+D):(""));this.logger.msg("N = lad ["+F+"] + n_int ["+b+"] + currency_decimal_chr ["+currency_decimal_chr+"] + n_frac ["+k+"] + rpad ["+D+"]");var H=false;var E=true;var C=null;var m=false;var h=null;var G="";for(A=0,z=0;A<g.length;A++){if(g.charAt(A)=="%"){this.logger.msg("Case ["+g.charAt(A+1)+"] LHS_ZERO ["+E+"] HIT_DP ["+H+"]");switch(g.charAt(++A)){case"S":h="always";G+="+";break;case"M":if(g.charAt(++A)=="I"&&(A==(g.length-1))){h="negative_or_space";G+="+"}break;case"C":G+=c;break;case"L":G+=y;break;case"G":if(!H&&(!E||m)){this.logger.msg("Adding currency_group_sep ["+currency_group_sep+"]");G+=currency_group_sep}else{if(E&&!m){G+=" "}}break;case"D":case".":if(!H&&(t.charAt(z)==currency_decimal_chr)){this.logger.msg("Adding currency_decimal_chr ["+currency_decimal_chr+"]");G+=currency_decimal_chr;++z;H=true}break;case"9":o=t.charAt(z++);if(o=="%"){o+=t.charAt(z++)}if(H){G+=o}else{if(o=="0"&&E){this.logger.msg("ch == 0");if(m==true){G+="0"}else{G+=" "}}else{this.logger.msg("ch != 0 ["+o+"]");E=false;m=false;G+=o}}break;case"0":o=t.charAt(z++);if(o=="%"){o+=t.charAt(z++)}if(E==true){m=true}G+=o;break;default:G+=g.charAt(A)}}else{G+=g.charAt(A)}}var B=new RegExp("^(\\"+y+"|"+c+")(\\s+)");G=G.replace(B,"$2$1");if(h){if(h=="negative_or_space"&&r!="-"){r=" "}G=G.replace("+",r)}else{if(r=="-"){var q=G.indexOf(y);if(q==-1){q=G.indexOf(c);if(q==-1){if(!H){q=G.match(/[0-9]/)}else{q=G.match("[0-9]"+currency_decimal_chr)}if(q){q=q.index}else{q=G.indexOf(currency_decimal_chr)}}}if(q!=-1){G=G.substring(0,q)+r+G.substring(q)}}}G=G.replace(/^\s*/,"").replace(/\s*$/,"");this.formatted_value=G;this.logger.end();return this.formatted_value};function FW_KeyHandler(a){this.element=null;this._init_args(a)}FW_KeyHandler.prototype=new FW;FW_KeyHandler.prototype.init=function(a){FW.prototype.init.call(this,a);EventHandler.addEvent(this.element,"keydown",this._event_onkeydown,this);this._key_handlers={};return true};FW_KeyHandler.ignore_key=false;FW_KeyHandler.ignore_key_no_block=false;FW_KeyHandler.prototype._event_onkeydown=function(d){var h=d.keyCode;var a=null;if(d.altKey){a=FW.KEY_ALT}if(d.ctrlKey){a=FW.KEY_CTRL}if(d.shiftKey){a=FW.KEY_SHIFT}if(FW_KeyHandler.ignore_key){FW_KeyHandler.ignore_key=false;return false}if(FW_KeyHandler.ignore_key_no_block){FW_KeyHandler.ignore_key_no_block=false;return true}if(h==FW.KEY_SHIFT||h==FW.KEY_ALT||h==FW.KEY_CTRL){return true}var b=(this._key_handlers[h]==null)?(null):(this._key_handlers[h][a]);if(b!=null){var c=b.length;while(c--){var g=b[c];if(!g.func.call(g.scope,d,g.id)){return false}}}return true};FW_KeyHandler.prototype.add_handler=function(d,a,h,g,j){a=(a==null)?(FW.KEY_NONE):(a);d=String(d).toUpperCase();var b=this._key_handlers[d];if(b==null){b=this._key_handlers[d]={}}var c=b[a];if(c==null){c=b[a]=new Array()}c.push({func:h,scope:g,id:j})};FW_KeyHandler.is_char=function(a){if(a>=48&&a<=90){return true}if(a>=106&&a<=111){return true}if(a>=187&&a<=222){return true}};FW_KeyHandler.key_map={1:{},0:{}};FW_KeyHandler.key_map[1][FW.KEY_1]="!";FW_KeyHandler.key_map[1][FW.KEY_2]="@";FW_KeyHandler.key_map[1][FW.KEY_3]="#";FW_KeyHandler.key_map[1][FW.KEY_4]="$";FW_KeyHandler.key_map[1][FW.KEY_5]="%";FW_KeyHandler.key_map[1][FW.KEY_6]="^";FW_KeyHandler.key_map[1][FW.KEY_7]="&";FW_KeyHandler.key_map[1][FW.KEY_8]="*";FW_KeyHandler.key_map[1][FW.KEY_9]="(";FW_KeyHandler.key_map[1][FW.KEY_0]=")";FW_KeyHandler.key_map[1][FW.KEY_SUBTRACT]="_";FW_KeyHandler.key_map[1][FW.KEY_SEMI_COLON]=":";FW_KeyHandler.key_map[1][FW.KEY_EQUAL_SIGN]="+";FW_KeyHandler.key_map[1][FW.KEY_COMMA]="<";FW_KeyHandler.key_map[1][FW.KEY_PERIOD]=">";FW_KeyHandler.key_map[1][FW.KEY_FORWARD_SLASH]="?";FW_KeyHandler.key_map[1][FW.KEY_GRAVE_ACCENT]='"';FW_KeyHandler.key_map[1][FW.KEY_OPEN_BRACKET]="{";FW_KeyHandler.key_map[1][FW.KEY_BACK_SLASH]="|";FW_KeyHandler.key_map[1][FW.KEY_SINGLE_QUOTE]='"';FW_KeyHandler.key_map[1][FW.KEY_DASH]="_";FW_KeyHandler.key_map[0][FW.KEY_SEMI_COLON]=";";FW_KeyHandler.key_map[0][FW.KEY_EQUAL_SIGN]="=";FW_KeyHandler.key_map[0][FW.KEY_COMMA]=",";FW_KeyHandler.key_map[0][FW.KEY_SUBTRACT]="-";FW_KeyHandler.key_map[0][FW.KEY_PERIOD]=".";FW_KeyHandler.key_map[0][FW.KEY_FORWARD_SLASH]="/";FW_KeyHandler.key_map[0][FW.KEY_GRAVE_ACCENT]="`";FW_KeyHandler.key_map[0][FW.KEY_OPEN_BRACKET]="[";FW_KeyHandler.key_map[0][FW.KEY_BACK_SLASH]="\\";FW_KeyHandler.key_map[0][FW.KEY_CLOSE_BRACKET]="]";FW_KeyHandler.key_map[0][FW.KEY_SINGLE_QUOTE]="'";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_0]="0";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_1]="1";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_2]="2";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_3]="3";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_4]="4";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_5]="5";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_6]="6";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_7]="7";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_8]="8";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_9]="9";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_ASTERISK]="*";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_PLUS]="+";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_DASH]="-";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_PERIOD]=".";FW_KeyHandler.key_map[0][FW.KEY_NUMPAD_FORWARD_SLASH]="/";FW_KeyHandler.get_key=function(g,b){var c=((b)?("1"):("0"));var a=FW_KeyHandler.key_map[c];if(a[g]!==undefined){return a[g]}var d=String.fromCharCode(g);if(d.search(/[A-Za-z0-9|\s]/)>-1){if(b&&d!=null){return d.toUpperCase()}else{return d.toLowerCase()}}else{return null}};function FW_Browser(a){FW_Browser.browser_name=null;FW_Browser.version=null;FW_Browser.OS=null;FW_Browser.IE=false;FW_Browser.Mozilla=false;FW_Browser.Opera=false;FW_Browser.Safari=false;FW_Browser.is_strict=true;FW_Browser.is_border_box=true}FW_Browser.init=function(){FW_Browser.browser_name=FW_Browser._searchString(FW_Browser._dataBrowser)||"An unknown browser";FW_Browser.version=FW_Browser._searchVersion(navigator.userAgent)||FW_Browser._searchVersion(navigator.appVersion)||"an unknown version";FW_Browser.platform=navigator.platform;FW_Browser.OS=FW_Browser._searchString(FW_Browser._dataOS)||"an unknown OS";FW_Browser.IE=false;FW_Browser.Mozilla=false;FW_Browser.Opera=false;FW_Browser.Safari=false;if(FW_Browser.browser_name=="Explorer"){FW_Browser.IE=true}else{if(FW_Browser.browser_name=="Mozilla"||FW_Browser.browser_name=="Firefox"){FW_Browser.Mozilla=true}else{if(FW_Browser.browser_name=="Opera"){FW_Browser.Opera=true}else{if(FW_Browser.browser_name=="Safari"){FW_Browser.Safari=true}}}}FW_Browser.is_strict=document.compatMode=="CSS1Compat";FW_Browser.is_secure=window.location.href.toLowerCase().indexOf("https")===0;FW_Browser.is_border_box=FW_Browser.IE;return true};FW_Browser._searchString=function(d){for(var a=0;a<d.length;a++){var b=d[a].string;var c=d[a].prop;FW_Browser.versionSearchString=d[a].versionSearch||d[a].identity;if(b){if(b.indexOf(d[a].subString)!=-1){return d[a].identity}}else{if(c){return d[a].identity}}}};FW_Browser._searchVersion=function(b){var a=b.indexOf(FW_Browser.versionSearchString);if(a==-1){return}return parseFloat(b.substring(a+FW_Browser.versionSearchString.length+1))};FW_Browser._dataBrowser=[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}];FW_Browser._dataOS=[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}];FW_Browser.init();FW_Browser.window_scroll=function(j,h){var c=window;var d,b,a,g;if(typeof(window.pageYOffset)=="number"){d=window.pageYOffset;b=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){d=document.body.scrollTop;b=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){d=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}}}if(j!=null||h!=null){window.scroll(h,j)}if(FW_Browser.IE){a=Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth)}else{if(window.khtml){a=document.body.scrollWidth}else{a=document.documentElement.scrollWidth}}if(FW_Browser.IE){g=Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight)}else{if(window.khtml){g=document.body.scrollHeight}else{g=document.documentElement.scrollHeight}}return{top:(d==null)?(0):(d),left:(b==null)?(0):(b),width:(a==null)?(0):(a),height:(g==null)?(0):(g)}};FW_Browser.page_size=function(){var g,a;if(window.innerHeight&&window.scrollMaxY){g=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){g=document.body.scrollWidth;a=document.body.scrollHeight}else{g=document.body.offsetWidth;a=document.body.offsetHeight}}var c,h;if(self.innerHeight){c=self.innerWidth;h=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;h=document.documentElement.clientHeight}else{if(document.body){c=document.body.clientWidth;h=document.body.clientHeight}}}var d,b;if(a<h){d=h}else{d=a}if(g<c){b=c}else{b=g}if(typeof(window.innerWidth)=="number"){b=window.innerWidth;d=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){b=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){b=document.body.clientWidth;d=document.body.clientHeight}}}return{page_width:b,page_height:d,window_width:c,window_height:h}};FW_Browser.debug=function(){FW_Browser._debug_div(FW_Browser.view_port_left(),FW_Browser.view_port_top(),FW_Browser.view_port_bottom(),FW_Browser.view_port_right(),"View Port Right ["+FW_Browser.view_port_right()+"px] View Port Top ["+FW_Browser.view_port_bottom()+"] View Port Left ["+FW_Browser.view_port_left()+"] View Port Top ["+FW_Browser.view_port_top()+"]","vp","green");FW_Browser._debug_div(0,0,FW_Browser.window_height(),FW_Browser.window_width(),"Window Height "+FW_Browser.window_height()+" Window Width "+FW_Browser.window_width(),"window_width","blue");FW_Browser._debug_div(0,0,FW_Browser.page_height(),FW_Browser.page_width(),"Window Height "+FW_Browser.window_height()+" Window Width "+FW_Browser.window_width(),"window_width","pink")};FW_Browser._debug_div=function(d,m,j,a,k,c,g){var n=document.getElementById("_fw_browser_debug_div"+c);if(n){FW_Element.remove(n)}var h=document.createElement("DIV");h.id="_fw_browser_debug_div"+c;h.style.backgroundColor=g;h.innerHTML=k;h.className="Window_overlay";h.style.fontSize="15px";h.style.width=(a-d)+"px";h.style.height=(j-m)+"px";h.style.position="absolute";h.style.top=m+"px";h.style.left=d+"px";document.body.appendChild(h)};FW_Browser.view_port_right=function(){var a=parseInt(FW_Browser.window_width())+parseInt(FW_Browser.window_scroll_left());if(!FW_Browser.IE){a=a-18}return a};FW_Browser.view_port_bottom=function(){var a=parseInt(FW_Browser.window_height())+parseInt(FW_Browser.window_scroll_top());if(!FW_Browser.IE){a=a-18}return a};FW_Browser.view_port_left=function(){var a=parseInt(FW_Browser.window_scroll_left());return a};FW_Browser.view_port_top=function(){var a=parseInt(FW_Browser.window_scroll_top());return a};FW_Browser.window_scroll_width=function(){return FW_Browser.window_scroll().width};FW_Browser.window_scroll_height=function(){return FW_Browser.window_scroll().height};FW_Browser.window_scroll_top=function(b,a){(a==null)?(window):(a);if(b!=null){a.scrollTo(null,b)}return FW_Browser.window_scroll().top};FW_Browser.window_scroll_left=function(a,b){(b==null)?(window):(b);if(a!=null){b.scrollTo(a,null)}return FW_Browser.window_scroll().left};FW_Browser.window_width=function(){return FW_Browser.page_size().window_width};FW_Browser.window_height=function(){return FW_Browser.page_size().window_height};FW_Browser.page_width=function(){return FW_Browser.page_size().page_width};FW_Browser.page_height=function(){return FW_Browser.page_size().page_height};FW_Browser.url=function(j,c){if(j==null){if(c==false){return window.location}else{var g=window.location.host;var h=window.location.pathname;var d=window.location.protocol;return(d+"//"+g+h)}}else{var b=document.createElement("A");b.href=j;document.body.appendChild(b);if(b.click==null){document.location.href=j}else{b.click()}}return true};FW_Browser.reload=function(){return FW_Browser.url(FW_Browser.url())};FW_Browser.cursor=function(a){document.body.style.cursor=a};function FW_Array(){}var $A=function(a){return FW_Array.extend(a)};FW_Array.extend=function(b){if(b._extended==true){return b}b._extended=true;alert(FW.extend);return FW.extend(b,FW_Array.prototype)};var $break=0;FW_Array.prototype.break_loop=function(){throw $break};FW_Array.prototype.each=function(b){for(var a=0,c=this.length;a<c;a++){try{b(this[a],a)}catch(d){if(d!=$break){throw d}return}}};FW_Array.prototype.foreach=function(){var a={};this.each(function(c,b){a[c]=b});return a};function $(b){var g=true;if(arguments.length>1){for(var a=0,d=[],c=arguments.length;a<c;a++){d.push($(arguments[a]))}return d}if(typeof b=="string"){b=document.getElementById(b)}return b}function $E(b){var g=true;if(arguments.length>1){for(var a=0,d=[],c=arguments.length;a<c;a++){d.push($E(arguments[a]))}return d}if(typeof b=="string"){b=document.getElementById(b)}return FW_Element.extend(b)}function FW_Element(){}FW_Element.prototype=new FW;FW_Element.extend=function(b){if(!b||b._extended){return b}var a=FW_Element;for(var d in a){var c=a[d];b[d]=FW_Element._cache(c,b)}b._extended=true;return b};FW_Element._cache=function(a,b){return function(c){return a.apply(null,[b,c])}};FW_Element.getElementsByAttribute=function(g,a,h,o,d){var l=(a=="*"&&g.all)?g.all:g.getElementsByTagName(a);var j=new Array();var k=(d==true)?new RegExp(o):new RegExp("(^|s)"+o+"(s|$)");var n=(typeof o!="undefined")?k:null;var b;var m;for(var c=0;c<l.length;c++){b=l[c];m=b.getAttribute&&b.getAttribute(h);if(typeof m=="string"&&m.length>0){if(typeof o=="undefined"||(n&&n.test(m))){j.push(b)}}}return j};FW_Element.visible=function(a){return a.style.display!="none"};FW_Element.toggle=function(a){FW_Element[FW_Element.visible(a)?"hide":"show"](a);return a};FW_Element.hide=function(a){if(a&&a.style){a.style.display="none"}return a};FW_Element.displayed=function(b){var a=b.style.display;return((a=="none")?(false):(true))};FW_Element.opacity=function(a,b){if(FW_Browser.IE){a.style.filter="alpha(opacity="+b+")"}else{a.style.opacity=parseFloat(b/100)}return a};FW_Element.show=function(a){a.style.display="";return a};FW_Element.is_parent=function(b,a){if(!b.parentNode||b==a){return false}if(b.parentNode==a){return true}return FW_Element.is_parent(b.parentNode,a)};FW_Element.remove=function(a){if(FW_Browser.IE){FW_Element._ie_remove(a)}else{a.parentNode.removeChild(a)}return a};FW_Element.update=function(a,b){if(FW_Browser.IE){return FW_Element._ie_update(a,b)}else{a=$(a);if(!a){return}a.innerHTML=b.stripScripts();if(b){b.evalScripts.bind(b).delay(1)}}};FW_Element._ie_update=function(b,d){b=$(b);if(d&&d.toElement){d=d.toElement()}if(FW.is_element(d)){return FW_Element.update(b,"").appendChild(d)}d=FW.toHTML(d);var a=b.tagName.toUpperCase();if(a in FW_Element._insertionTranslations.tags){var h=b.childNodes.count;while(h--){b.removeChild(b.childNodes[h])}var d=Element._getContentFromAnonymousElement(a,d.stripScripts());for(i=0;i<d.length;i++){b.appendChild(d[i])}}else{try{b.innerHTML=d.stripScripts()}catch(g){b.innerHTML=d.stripScripts().stripForms()}}d.evalScripts.bind(d).delay(1);return b};FW_Element.replace=function(a,b){if(FW_Browser.IE){return FW_Element._ie_replace(a,b)}else{return FW_Element._replace(a,b)}};FW_Element._replace=function(c,d){var a;if(!FW.is_element(d)){d=FW.toHTML(d);var b=c.ownerDocument.createRange();b.selectNode(c);a=d;d=b.createContextualFragment(d.stripScripts())}c.parentNode.replaceChild(d,c);if(a){a.evalScripts.bind(a).delay(1)}return c};FW_Element._ie_replace=function(d,h){if(FW.is_element(h)){d.parentNode.replaceChild(h,d);return d}h=FW.toHTML(h);var g=d.parentNode,c=g.tagName.toUpperCase();if(FW_Element._insertionTranslations.tags[c]){var j=FW_Element.next(d);var a=FW_Element._getContentFromAnonymousElement(c,h.stripScripts());g.removeChild(d);var b=a.length;for(i=0;i<b;i++){node=a[i];if(j){g.insertBefore(node,j)}else{g.appendChild(node)}}}else{d.outerHTML=h.stripScripts()}h.evalScripts.bind(h).delay(1);return d};FW_Element.next=function(a){while(a=a.nextSibling){if(a.nodeType==1){return a}}};FW_Element._getContentFromAnonymousElement=function(c,b){var d=document.createElement("div"),a=FW_Element._insertionTranslations.tags[c];if(a){d.innerHTML=a[0]+b+a[1];for(i=0;i<a[2];i++){d=d.firstChild}}else{d.innerHTML=b}return d.childNodes};FW_Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};FW_Element._ie_remove=function(a){var b=$("IELeakGarbageBin");if(!b){b=document.createElement("DIV");b.id="IELeakGarbageBin";b.style.display="none";document.body.appendChild(b)}b.appendChild(a)};FW_Element.left=function(b){if(b.left){return b.left()}var c=0;if(b.offsetParent){var a=b;while(b.offsetParent){c+=b.offsetLeft;b=b.offsetParent}b=a;c-=FW_Element.scroll_left(b)}else{if(b.x){c+=b.x}}return c};FW_Element.top=function(c){var b=0;if(c.top){return c.top()}if(c.offsetParent){var a=c;while(c.offsetParent){b+=c.offsetTop;c=c.offsetParent}c=a;b-=FW_Element.scroll_top(c)}else{if(c.y){b+=c.y}}return b};FW_Element.scroll_top=function(b){var a=0;while(b.parentNode){b=b.parentNode;if(b.tagName=="BODY"){break}a+=b.scrollTop||0}return a};FW_Element.scroll_left=function(a){var b=0;while(a.parentNode){a=a.parentNode;if(a.tagName=="BODY"){break}b+=a.scrollLeft||0}return b};FW_Element.width=function(a){if(a.width&&String(a.width).match("function")!=null){return a.width()}else{return a.offsetWidth}};FW_Element.height=function(a){if(FW.is_func(a.height)){return a.height()}else{return a.offsetHeight}};FW_Element.css_class=function(a,c,b){if(c){a.className=c}if(b){return a.className.split(" ")}else{return a.className}};FW_Element.add_css_class=function(b,c){var a=FW_Element.css_class(b);if(a.search(c)==-1){return FW_Element.css_class(b,a+" "+c)}return c};FW_Element.has_css_class=function(b,c){var d=FW_Element.css_class(b,null,true);var a=d.length;while(a--){if(d[a]==c){return true}}return false};FW_Element.remove_css_class=function(a,b){a.className=a.className.replace(b,"")};FW_Element.busy=function(a,c){if(!a){return false}if(arguments.length>0){if(a._busy==c){return true}a._busy=c;if(FW_Element.displayed(a)){if(a._busy==true){var b=document.createElement("div");b.className="WidgetBusyOverlay";b.title="Loading";FW_Element.overlay(a,b,"center");a._busy_overlay=b;FW_Element.add_css_class(a,"ElementBusy")}else{if(a._busy_overlay!=null){FW_Element.remove(a._busy_overlay);a._busy_overlay=null}FW_Element.remove_css_class(a,"ElementBusy")}}}else{return a._busy}};FW_Element.overlay=function(b,j,h){j.style.position="absolute";document.body.appendChild(j);var c=j.offsetHeight;var a=j.offsetWidth;if(h=="stretch"){j.style.left=this.left()+"px";j.style.top=this.top()+"px";j.style.width=this.width()+"px";j.style.height=this.height()+"px"}else{var g=FW_Element.left(b)+(parseInt(FW_Element.width(b))/2)-(c/2);var d=FW_Element.top(b)+(parseInt(FW_Element.height(b))/2)-(a/2);j.style.left=g+"px";j.style.top=d+"px"}return true};FW_Element._borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};FW_Element._paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};FW_Element._margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};FW_Element.xy=function(a){return[FW_Element.left(a),FW_Element.top(a)]};FW_Element.get_box=function(g,k,p){var y;if(!p){y=this.xy(g)}else{var c=parseInt(FW_Element.get_style(g,"left"),10)||0;var o=parseInt(FW_Element.get_style(g,"top"),10)||0;y=[parseInt(c),parseInt(o)]}var j=(g._box_height)?(g._box_height):(g.offsetHeight);var q=(g._box_width)?(g._box_width):(g.offsetWidth);var m;if(!k){m={x:y[0],y:y[1],0:y[0],1:y[1],width:q,height:j}}else{var d=FW_Element.border_width(g,"l")+FW_Element.padding(g,"l");var a=FW_Element.border_width(g,"r")+FW_Element.padding(g,"r");var v=FW_Element.border_width(g,"t")+FW_Element.padding(g,"t");var n=FW_Element.border_width(g,"b")+FW_Element.padding(g,"b");m={x:y[0]+d,y:y[1]+v,0:y[0]+d,1:y[1]+v,width:q-(d+a),height:j-(v+n)}}m.right=m.x+m.width;m.bottom=m.y+m.height;return m};FW_Element.box_to_content=function(d,j){var o=[j.x,j.y];var m=j.width;var g=j.height;var c=FW_Element.border_width(d,"l")+FW_Element.padding(d,"l");var a=FW_Element.border_width(d,"r")+FW_Element.padding(d,"r");var n=FW_Element.border_width(d,"t")+FW_Element.padding(d,"t");var k=FW_Element.border_width(d,"b")+FW_Element.padding(d,"b");j={x:o[0]+c,y:o[1]+n,0:o[0]+c,1:o[1]+n,width:m-(c+a),height:g-(n+k)};j.right=j.x+j.width;j.bottom=j.y+j.height;return j};FW_Element.set_box=function(d,j,k){var b=j.width,g=j.height;if(!FW_Browser.is_border_box){b-=(FW_Element.border_width(d,"lr")+FW_Element.padding(d,"lr"));g-=(FW_Element.border_width(d,"tb")+FW_Element.padding(d,"tb"))}var c=FW_Element.margin(d,"lr");var a=FW_Element.margin(d,"tb");b-=c;g-=a;if(b>=0){d.style.width=b+"px";d._box_width=j.width}if(g>=0){d.style.height=g+"px";d._box_height=j.height}if(!isNaN(j.y)){d.style.top=j.y+"px"}if(!isNaN(j.x)){d.style.left=j.x+"px"}return this};FW_Element._add_styles=function(g,j,h){var k=0,c,b;for(var d=0,a=j.length;d<a;d++){c=FW_Element.get_style(g,h[j.charAt(d)]);if(c){b=parseInt(c,10);if(b){k+=b}}}return k};FW_Element.border_width=function(b,a){return FW_Element._add_styles(b,a,FW_Element._borders)};FW_Element.padding=function(b,a){return FW_Element._add_styles(b,a,FW_Element._paddings)};FW_Element.margin=function(b,a){if(!a){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return FW_Element._add_styles(b,a,FW_Element._margins)}};FW_Element._prop_cache={};FW_Element._camelRe=/(-[a-z])/gi;FW_Element._camelFn=function(b,c){return c.charAt(1).toUpperCase()};FW_Element.get_style=function(j,b){var l=document.defaultView;var g=FW_Element._prop_cache;var d=FW_Element._camelRe;var a=FW_Element._camelFn;if(l&&l.getComputedStyle){var n,k,o;if(b=="float"){b="cssFloat"}if(n=j.style[b]){return n}if(k=l.getComputedStyle(j,"")){if(!(o=g[b])){o=g[b]=b.replace(d,a)}return k[o]}return null}else{var n,k,o;if(b=="opacity"){if(typeof j.style.filter=="string"){var c=j.style.filter.match(/alpha\(opacity=(.*)\)/i);if(c){var h=parseFloat(c[1]);if(!isNaN(h)){return h?h/100:0}}}return 1}else{if(b=="float"){b="styleFloat"}}if(!(o=g[b])){o=g[b]=b.replace(d,a)}if(n=j.style[o]){return n}if(k=j.currentStyle){return k[o]}return null}};FW_Shadow=function(a){this.shadow_top=true;this.shadow_bottom=true;this.shadow_left=true;this.shadow_right=true;this.width=6;this._init_args(a);if(this.width>6){this.width=6}this.offset=this.width;this._cache=new Array()};FW_Shadow.prototype;FW_Shadow.prototype=new FW;FW_Shadow.prototype.apply=function(){if(this.applied){return false}this.shadow_width=6;this.shadow_height=6;var g=(this.shadow_width-this.offset);this._left=FW_Element.left(this.element,true);this._top=FW_Element.top(this.element,true);this._width=FW_Element.width(this.element,true);this._height=FW_Element.height(this.element,true);if(this.shadow_left){var l=this._height;var h=this._top;if(!this.shadow_top){l-=this.shadow_height;h+=this.shadow_height;this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt 0pt",this.shadow_height,this.shadow_width,this._left-this.shadow_width+g,h-this.shadow_height)}else{h+=g;l-=g}if(!this.shadow_bottom){l-=this.shadow_height;this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt -12px",this.shadow_height,this.shadow_width,this._left-this.shadow_width+g,h+l)}else{l-=g}this._add_item("transparent url(/images/framework/shadow-lr.png) repeat-y scroll 0pt",l,this.shadow_width,(this._left-this.shadow_width+g),h)}if(this.shadow_right){var c=this._height;var b=this._top;if(!this.shadow_top){c-=this.shadow_height;b+=this.shadow_height;this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt -18px",this.shadow_height,this.shadow_width,this._left+this._width-g,b-this.shadow_height)}else{b+=g;c-=g}if(!this.shadow_bottom){c-=this.shadow_height;this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt -6px",this.shadow_height,this.shadow_width,this._left+this._width-g,b+c)}else{c-=g}this._add_item("transparent url(/images/framework/shadow-lr.png) repeat-y scroll -6px 0pt",c,6,(this._left+this._width-g),b)}if(this.shadow_bottom){var k=this._left;var a=this._width;if(!this.shadow_left){a-=this.shadow_width;k+=this.shadow_width}if(!this.shadow_right){a-=this.shadow_width}this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt -12px",this.shadow_height,this.shadow_width,k-this.shadow_width+g,this._top+this._height-g);this._add_item("transparent url(/images/framework/shadow.png) repeat-x scroll 0pt -36px",this.shadow_height,a-(g*2),k+g,this._top+this._height-g);this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt -6px",this.shadow_height,this.shadow_width,k+a-g,this._top+this._height-g)}if(this.shadow_top){var j=this._left;var d=this._width;if(!this.shadow_left){d-=this.shadow_width;j+=this.shadow_width}if(!this.shadow_right){d-=this.shadow_width}this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt 0pt",this.shadow_height,this.shadow_width,j-this.shadow_width+g,this._top-this.shadow_height+g);this._add_item("transparent url(/images/framework/shadow.png) repeat-x scroll 0pt -30px",this.shadow_height,d-(g*2),j+g,this._top-this.shadow_height+g);this._add_item("transparent url(/images/framework/shadow.png) no-repeat scroll 0pt -18px",this.shadow_height,this.shadow_width,j+d-g,this._top-this.shadow_height+g)}this.applied=true;return true};FW_Shadow.prototype._add_item=function(b,a,c,g,d){element=document.createElement("div");element.style.background=b;element.style.fontSize="0px";element.style.height=a+"px";element.style.width=c+"px";element.style.left=g+"px";element.style.top=d+"px";element.style.position="absolute";document.body.appendChild(element);this._cache.push(element);return element};FW_Shadow.prototype.remove=function(){var a=this._cache.length;while(a--){FW_Element.remove(this._cache[a])}this._cache=new Array();this.applied=false};function Cookie(a){this.name=a.name;this.Logger=a.logger;this.logger_level;this.life_time=null;this.path=null;this.domain=null;this.is_secure=null;this.value=null;this.init(a)}Cookie.log_level=31996;Cookie.prototype.className="Cookie";Cookie.prototype.init=function(c){if(c.logger_level==null){this.logger_level=Cookie.log_level}else{this.logger_level=c.logger_level}var b=document.cookie.split("; ");for(var a=0;a<b.length;a++){var d=b[a].split("=");if(d[0]==escape(this.name)){this.value=unescape(d[1])}}this.domain=window.location.host.replace(":"+window.location.port,"");this.path="/";this.is_secure=(window.location.protocol=="https"?true:false)};Cookie.prototype.remove=function(){this.life_time=-10;this.update()};Cookie.prototype.update=function(){if(!this.name){return false}var b=this.life_time;if(this.value==null){this.life_time=-100}var a=escape(this.name)+"="+escape(this.value)+(this.life_time?";expires="+(new Date((new Date()).getTime()+(1000*this.life_time))).toGMTString():"")+(this.path?";path="+this.path:"")+(this.domain?";domain="+this.domain:"")+(this.is_secure?";this.secure":"");this.life_time=b;document.cookie=a};Cookie.prototype.dump=function(){this.Logger.srt(this,"dump",this.logger_level);this.Logger.msg(document.cookie);this.Logger.end()};function CookieParams(a){this._data={};this.rec_sep="|";this.val_sep="=";this.logger_level=Cookie.log_level;if(a!=null){if(a.rec_sep!=null){this.rec_sep=a.rec_sep}if(a.val_sep!=null){this.val_sep=a.val_sep}if(a.logger_level!=null){this.logger_level=a.logger_level}if(a.logger!=null){this.Logger=a.logger}if(a.data!=null){this.set_data(a.data)}}}CookieParams.prototype.className="CookieParams";CookieParams.prototype.get_params=function(){var a=new Array();for(list_item in this._data){a.push(list_item)}return a};CookieParams.prototype.set_param=function(a,b){this._data[a]=b;return true};CookieParams.prototype.get_param=function(a){return this._data[a]};CookieParams.prototype.delete_param=function(a){return delete (this._data[a])};CookieParams.prototype.set_data=function(g){if(g==null){return false}var b=g.split(this.rec_sep);for(var d=0;d<b.length;d++){var a=b[d].split(this.val_sep);for(var c=0;c<a.length;c++){this._data[a[0]]=a[1]}}return true};CookieParams.prototype.get_data=function(){var b="";var a=0;for(data_item in this._data){if(a>0){b+=this.rec_sep}b+=data_item+this.val_sep+this._data[data_item];a++}if(a==0){return null}return b};function Logger(a){this.dbg_func_array=new Array();this.dbg_level_array=new Array();this.level_list={0:"Error",1:"Warning",32000:"Message"};this.dbgTypeWarning=1;this.dbgTypeError=0;this.LOGGER_PANE_FIREBUG="0";this.LOGGER_PANE_WINDOW="1";this.LOGGER_PANE_INLINE="2";this.window_ref=null;this.output_ref=null;this.output_window=null;this.done_init=false;this.doing_init=false;this.row_count=0;this.profiler={start:function(){},end:function(){}};this.enabled=true;this.logger_pane_type=this.LOGGER_PANE_INLINE;if(a!=null){if(a.window_ref!=null){this.window_ref=a.window_ref}if(a.enabled!=null){this.enabled=a.enabled}if(a.level_list!=null){this.level_list=a.level_list}if(a.save_preferences!=null){this.save_preferences=a.save_preferences}if(a.logger_pane_type!=null){this.logger_pane_type=a.logger_pane_type}}this.dflt_level=0;for(i in this.level_list){if(i>this.dflt_level){this.dflt_level=i}}this.current_level=this.dflt_level;this._dflt_preferences={level:[this.dflt_level,1],level_rule:[0,1],show_se:[1,1],logger_pane_type:[this.logger_pane_type,1],enabled:[this.enabled,1]};this.preferences=new LoggerPreferences();for(pref in this._dflt_preferences){this.preferences.set(pref,this._dflt_preferences[pref][0],this._dflt_preferences[pref][1])}this.preferences.load();if(this.preferences.get("enabled")!=null){this.enabled=this.preferences.get("enabled")}if(this.preferences.get("logger_pane_type")!=null){this.logger_pane_type=this.preferences.get("logger_pane_type")}if(a!=null&&a.preferences!=null){for(pref in (a.preferences)){this.preferences.set(pref,a.preferences[pref])}}return true}Logger.prototype.log_enabled=function(a){this.enabled=a;this.preferences.set("enabled",a,1);this.preferences.save()};Logger.prototype.pane_type=function(a){this.logger_pane_type=a;this.preferences.set("logger_pane_type",a,1);this.preferences.save()};Logger.prototype.className="Logger";Logger.prototype._function_name=function(){var a=f.toString().match(/function (\w*)/)[1];if((a==null)||(a.length==0)){return"anonymous"}return a};Logger.prototype.srt=function(a,b,c){if(this.enabled==false){return false}this.profiler.start(this,"srt");if(c==null){c=this.dflt_level}this.dbg_level_array.push(c);if(a!=null&&a.className!=null){b=a.className+"."+b}this.dbg_func_array.push(b);this._set_values();if(this.preferences.get("show_se")!=false){if(this.logger_pane_type==this.LOGGER_PANE_WINDOW){this._output("<I><B>-----</B> Starting ["+this._get_time()+"] <B>-----</B></I>",this.current_level,1)}else{this._output("----- Starting ["+this._get_time()+"] -----",this.current_level,1)}}this.profiler.end()};Logger.prototype.end=function(){if(this.enabled==false){return false}this.profiler.start(this,"end");if(this.preferences.get("show_se")!=false){if(this.logger_pane_type==this.LOGGER_PANE_WINDOW){this._output("<I><B>-----</B> Ending   ["+this._get_time()+"] <B>-----</B></I>",this.current_level,1)}else{this._output("----- Ending ["+this._get_time()+"] -----",this.current_level,1)}}var a;a=this.dbg_func_array.pop();if(this.current_level==null){this.current_level=this.dflt_level}a=this.dbg_level_array.pop();this._set_values();this.profiler.end()};Logger.prototype.msg=function(b,a){if(this.enabled==false){return false}this.profiler.start(this,"msg");this._check_start();this._output(b,this.current_level);if(a!=null&&a==1){this.end()}this._check_end();this.profiler.end()};Logger.prototype.error=function(a){this.profiler.start(this,"error");this._check_start();this._output(a,this.dbgTypeError);this._check_end();this.profiler.end()};Logger.prototype.warn=function(a){this.profiler.start(this,"msg");this._check_start();this._output(a,this.dbgTypeWarning);this._check_end();this.profiler.end("Logger.msg")};Logger.prototype._check_start=function(){};Logger.prototype._check_end=function(){};Logger.prototype.add_log_level=function(b,a){this.srt(this,"add_log_level");if(this.level_list[b]!=null){this.error("Cannot add log level ["+b+"], already exists")}else{this.msg("Adding log level ["+b+"] Description ["+a+"]");this.level_list[b]=a}this.end();return true};Logger.prototype._init=function(){if(this.done_init==true){return true}this.doing_init=true;var logger=this;var logger_pane;if(this.logger_pane_type==this.LOGGER_PANE_WINDOW){logger_pane=new LoggerPane_Window({preferences:this.preferences,level_list:this.level_list,mode:"popup",enabled_callback:function(val){logger.enabled=val}})}else{if(this.logger_pane_type==this.LOGGER_PANE_INLINE){logger_pane=new LoggerPane_Window({preferences:this.preferences,level_list:this.level_list,mode:"inline",enabled_callback:function(val){logger.enabled=val}})}else{if(this.logger_pane_type==this.LOGGER_PANE_FIREBUG){logger_pane=new LoggerPane_FireBug({preferences:this.preferences,level_list:this.level_list,enabled_callback:function(val){logger.enabled=val}})}else{var str="new "+this.logger_pane_type+"({ 'preferences' : this.preferences, 'level_list'  : this.level_list, 'enabled_callback' : function(val) { logger.enabled = val } });";logger_pane=eval(str)}}}this._logger_pane=logger_pane;this.done_init=true;this.doing_init=false};Logger.prototype._set_values=function(){this.current_function_name=this.dbg_func_array[this.dbg_func_array.length-1];this.current_level=this.dbg_level_array[this.dbg_level_array.length-1];this.currentFunctionPrefix="";for(var a=1;a<this.dbg_func_array.length;a++){this.currentFunctionPrefix+="+"}};Logger.prototype._check_display=function(c){if(this.enabled==false){return false}var a=this.preferences.get("level");var b=this.preferences.get("level_rule");if(b==0){if(c>a){return false}}else{if(b==1){if(c!=a){return false}}else{if(b==2){if(c==a){return false}}}}return true};Logger.prototype._output=function(d,g,c){if(this.enabled==false){return false}if(this.done_init==false&&this.doing_init==false){this._init()}if(this._check_display(g)==false){return false}if(g==-1){return}if(c==null){c=0}var b="";if(this.current_function_name!=null){if(this.logger_pane_type==this.LOGGER_PANE_WINDOW){b=this.currentFunctionPrefix+"[<B>"+this.current_function_name+"</B>]: "}else{b=this.currentFunctionPrefix+"["+this.current_function_name+"]: "}}if(this._logger_pane==null){return}var a=b+d;this._logger_pane.output(a,g)};Logger.prototype._get_time=function(){var d=new Date();var a=d.getHours();var c=d.getMinutes();c=((c<10)?"0":"")+c;var g=d.getSeconds();g=((g<10)?"0":"")+g;var b=a+":"+c+":"+g;return b};Logger.prototype.log_enabled=function(a){this.enabled=a;this.preferences.set("enabled",a,1);this.preferences.save()};function LoggerPane(){}LoggerPane.prototype._conv_to_checked=function(a){if(a==true){return"CHECKED"}else{return""}};LoggerPane.prototype._populateLOV=function(d,j,a){for(var c=(d.options.length-1);c>=0;c--){d.options[c]=null}var h="";for(list_item in j){if(!(parseInt(list_item)==list_item)){continue}var g=false;if(a==list_item){g=true}if(1){var k=d.ownerDocument;if(!k){k=d.document}var b=k.createElement("OPTION");b.value=list_item;b.text=j[list_item];b.selected=g;d.options.add(b,d.options.length)}else{d.options[d.options.length]=new Option(j[list_item],list_item,g)}}};function LoggerPane_FireBug(a){this.preferences=a.preferences;this.level_list=a.level_list;this.enabled_callback=a.enabled_callback;this.dbgTypeWarning=1;this.dbgTypeError=0;this._document=document;this.supported=false;try{if(console){this.supported=true}}catch(b){alert("Firebug logging not supported under IE or Firebug not installed")}this.display()}LoggerPane_FireBug.prototype=new LoggerPane();LoggerPane_FireBug.prototype.display=function(){if(this.supported==false){return false}this._display_menu_bar();this._setup_events();return true};LoggerPane_FireBug.prototype._display_menu_bar=function(){var d=document.createElement("DIV");var c="";c=c+'<TABLE style="background-color: white; border: 1px solid silver;" class="logger_menu_bar" width="*">';c=c+'<tr style="background-color: #e3e3e3; color: black;"><td id="_Logger_Drag" >Firebug Logging Options</td>';c=c+'<TD width="5%" style="cursor: default;" id="_Logger_Hide"  >[ - ]</TD>';c=c+'<TD width="5%" style="cursor: default;" id="_Logger_Close"  >[ X ]</TD>';c=c+'<tr><td colspan="3" id="_Logger_Menu_Options"><TABLE  width="450px"><TR><TD width="50%">Level';c=c+'<SELECT class="logger_lov" id="_Logger_Filter"></SELECT>';c=c+'<SELECT class="logger_lov" id="_Logger_Filter_Rule"></SELECT>';c=c+"</TD>";c=c+'<TD width="25%"><INPUT TYPE="checkbox" id="_Logger_Show_SE" '+this._conv_to_checked(this.preferences.get("show_se"))+"/>Show Start/End</TD>";c=c+'<TD width="25%"><INPUT TYPE="checkbox" id="_Logger_Enabled" '+this._conv_to_checked(this.preferences.get("enabled"))+"/>Enabled</TD>";c=c+"</TR>";c=c+"</TABLE></TD>";c=c+"</TR></TABLE>";d.innerHTML=c;d.style.position="fixed";document.body.appendChild(d);var b=document.getElementById("_Logger_Drag");var a=new FW_Layer({element:d,x:1,y:1,remember_position:true,name:"fw_firebug_log",drag_element:b});a.check_boundary=false;this._menu_bar=d;this._populateLOV(this._document.getElementById("_Logger_Filter"),this.level_list,this.preferences.get("level"));this._populateLOV(this._document.getElementById("_Logger_Filter_Rule"),{0:"Up to",1:"Exclusive",2:"Exclude"},this.preferences.get("level_rule"))};LoggerPane_FireBug.prototype.output=function(a,b){if(this.supported==false){return false}if(b==this.dbgTypeError){console.error(a);console.error("--- Stack Dump ---");console.trace();console.error("--- End Stack Dump ---")}else{if(b==this.dbgTypeWarning){console.warn(a)}else{console.log(a)}}};LoggerPane_FireBug.prototype._setup_events=function(){var m=this._document;var p=this.output_window;var c=this._logger_pane_content;var k=this;var j=m.getElementById("_Logger_Filter");var n=m.getElementById("_Logger_Clear");var a=m.getElementById("_Logger_Show_SE");var l=m.getElementById("_Logger_Enabled");var o=m.getElementById("_Logger_Auto_Scroll");var b=m.getElementById("_Logger_AOT");var h=m.getElementById("_Logger_Filter_Rule");var g=m.getElementById("_Logger_Hide");var q=m.getElementById("_Logger_Close");j.onchange=function(){k.preferences.set("level",j.value);k.preferences.save()};a.onclick=function(){k.preferences.set("show_se",a.checked);k.preferences.save()};h.onchange=function(){k.preferences.set("level_rule",h.value);k.preferences.save()};l.onclick=function(){k.preferences.set("enabled",l.checked);k.enabled_callback.call(k,k.preferences.get("enabled"));k.preferences.save()};g.onclick=function(){var d=document.getElementById("_Logger_Menu_Options");if(d.style.display=="none"){d.style.display="";g.innerHTML="[ - ]"}else{d.style.display="none";g.innerHTML="[ + ]"}};q.onclick=function(){k._menu_bar.style.display="none"}};function LoggerPane_Window(a){this.mode=a.mode;this._window_ref;this.display;this.preferences=a.preferences;this.level_list=a.level_list;this.enabled_callback=a.enabled_callback;this.dbgTypeWarning=1;this.dbgTypeError=0;this._dflt_preferences={show_se:[true,1],auto_scroll:[true,1],always_on_top:[false,1],window_width:[700,1],window_height:[200,1],window_left:[1,0],window_top:[1,0],enabled:[1,1],visible:[1,1],window_title:["Framework JavaScript Logger",0]};for(pref in this._dflt_preferences){if(this.preferences.get(pref)==null){this.preferences.set(pref,this._dflt_preferences[pref][0],this._dflt_preferences[pref][1])}}this.row_count=0;this.display()}LoggerPane_Window.prototype=new LoggerPane();LoggerPane_Window.prototype.className="LoggerPane_Window";LoggerPane_Window.prototype.display=function(){var a=this.preferences.get("window_height");if(this.mode=="popup"){this._window_ref=window.open("","Logger","width="+this.preferences.get("window_width")+",height="+this.preferences.get("window_height")+",left="+this.preferences.get("window_left")+",top="+this.preferences.get("window_top")+",scrollbars=yes,resizable=yes");this._document=this._window_ref.document;if(this._document.title==this.preferences.get("window_title")){this._logger_pane_content=this._document.getElementById("_logger_pane_content");this._setup_events();return}else{this._document.title=this.preferences.get("window_title")}}else{a=this.preferences.get("window_height");this._window_ref=window}this._document=this._window_ref.document;this._document.body.onunload=function(){};this._add_style();this.height=a;var b=this._document.createElement("DIV");b.className="loggerPane";this._document.body.appendChild(b);this._logger_pane=b;this._display_menu_bar();if(this.preferences.get("visible")==1){this.show()}else{this.hide()}var c=this._document.createElement("DIV");c.id="_logger_pane_content";c.className="loggerPaneContent";c.style.height=parseInt(parseInt(a)-30)+"px";this._logger_pane.appendChild(c);this._logger_pane_content=c;try{this.effect=new Effect_Height({element:this._logger_pane,duration:0.6})}catch(d){}this._setup_events()};LoggerPane_Window.prototype._add_style=function(){var d=new Array();d.push(new Array(".loggerPane","background-color: white;; width: 100%; display: block; border-top: 2px solid black; bottom: 0px; left: 0px; position: fixed; "));d.push(new Array(".logger_menu_bar"," border-bottom: 1px solid black; font-size: 8pt; width: 100%; height:20px;  background-color: #e3e3e3 "));d.push(new Array(".logger_lov"," font-size: 8pt;  "));d.push(new Array(".logger_button"," font-size: 8pt;  "));d.push(new Array(".loggerPaneContent"," overflow: auto; width: 100%; border: 0px; "));d.push(new Array(".Error"," background-color: red;"));d.push(new Array(".Warning"," background-color: orange; "));d.push(new Array(".Message"," background-color: lime;"));d.push(new Array(".logger_line"," padding: 2px;  margin: 0px; padding 2px;border-bottom: 1px solid; "));d.push(new Array(".Alt"," background-color: #e3e3e3 "));if(document.styleSheets){var c=this._document.createElement("STYLE");this._document.body.appendChild(c);var a="";for(var b=0;b<d.length;b++){if(this._document.styleSheets[0].addRule){this._document.styleSheets[0].addRule(d[b][0],d[b][1])}else{c.innerHTML+=d[b][0]+" {"+d[b][1]+"}\n"}}}};LoggerPane_Window.prototype._display_menu_bar=function(){var a="";a=a+'<TABLE  class="logger_menu_bar"><TR><TD width="34%">Level';a=a+'<SELECT class="logger_lov" id="_Logger_Filter"></SELECT>';a=a+'<SELECT class="logger_lov" id="_Logger_Filter_Rule"></SELECT>';a=a+"</TD>";a=a+'<TD width="10%"><INPUT class="logger_button" id="_Logger_Clear" type="button" value="Clear All"/></TD>';a=a+'<TD width="16%"><INPUT TYPE="checkbox" id="_Logger_Show_SE" '+this._conv_to_checked(this.preferences.get("show_se"))+"/>Show Start/End</TD>";a=a+'<TD width="15%"><INPUT TYPE="checkbox" id="_Logger_Auto_Scroll" '+this._conv_to_checked(this.preferences.get("auto_scroll"))+"/>Auto Scroll</TD>";a=a+'<TD width="10%"><INPUT TYPE="checkbox" id="_Logger_Enabled" '+this._conv_to_checked(this.preferences.get("enabled"))+"/>Enabled</TD>";a=a+'<TD width="15%"><INPUT TYPE="checkbox" id="_Logger_AOT" '+this._conv_to_checked(this.preferences.get("always_on_top"))+" />Always on top</TD>";a=a+'<TD width="15%"><INPUT TYPE="button" value="Hide" id="_Logger_Visible" '+this._conv_to_checked(this.preferences.get("visible"))+" /></TD>";a=a+"</TR>";a=a+"</TABLE>";this._logger_pane.innerHTML=this._logger_pane.innerHTML+a;this._populateLOV(this._document.getElementById("_Logger_Filter"),this.level_list,this.preferences.get("level"));this._populateLOV(this._document.getElementById("_Logger_Filter_Rule"),{0:"Up to",1:"Exclusive",2:"Exclude"},this.preferences.get("level_rule"))};LoggerPane_Window.prototype._conv_to_checked=function(a){if(a==true){return"CHECKED"}else{return""}};LoggerPane_Window.prototype.output=function(a,d){var b=this._document.createElement("div");var c="";if(d==this.dbgTypeError){c='<span class="Icon Error">&nbsp;X&nbsp;</span>&nbsp;'}else{if(d==this.dbgTypeWarning){c='<span class="Icon Warning">&nbsp;!&nbsp;</span>&nbsp;'}else{c='<span class="Icon Message">&#x221A;&nbsp;</span>&nbsp;'}}b.className="logger_line";if(this.row_count%2==0){b.className+=" Alt"}b.innerHTML=c+a;this._logger_pane_content.appendChild(b);this._logger_pane_content.scrollTop=this._logger_pane_content.scrollHeight;this.row_count++};LoggerPane_Window.prototype.hide=function(){this._logger_pane.style.height="25px";this._document.body.style.marginBottom="0px"};LoggerPane_Window.prototype.show=function(){this._logger_pane.style.height=this.height+"px";this._document.body.style.marginBottom=this.height+"px"};LoggerPane_Window.prototype._setup_events=function(){var m=this._document;var p=this.output_window;var g=this._logger_pane_content;var k=this;var j=m.getElementById("_Logger_Filter");var n=m.getElementById("_Logger_Clear");var a=m.getElementById("_Logger_Show_SE");var l=m.getElementById("_Logger_Enabled");var o=m.getElementById("_Logger_Auto_Scroll");var c=m.getElementById("_Logger_AOT");var h=m.getElementById("_Logger_Filter_Rule");var b=m.getElementById("_Logger_Visible");j.onchange=function(){k.preferences.set("level",j.value);k.preferences.save()};b.onclick=function(){var d=k.preferences.get("visible");if(d==null||d==1){d=0}else{d=1}k.preferences.set("visible",d);if(d){if(k.effect!=null){k.show();k.effect.start=15;k.effect.end=100;k.effect.apply()}else{k.show()}b.value="Hide"}else{if(k.effect!=null){k.effect.start=100;k.effect.end=15;k.effect.apply()}else{k.hide()}b.value="Show"}k.preferences.save()};a.onclick=function(){k.preferences.set("show_se",a.checked);k.preferences.save()};h.onchange=function(){k.preferences.set("level_rule",h.value);k.preferences.save()};if(n){n.onclick=function(){var d=g;var q;d.removeChild(d.firstChild);while(d.childNodes.length>0){d.removeChild(d.firstChild)}}}l.onclick=function(){k.preferences.set("enabled",l.checked);k.enabled_callback.call(k,k.preferences.get("enabled"));k.preferences.save()};if(c){c.onclick=function(){k.preferences.set("always_on_top",c.checked);k.preferences.save()}}if(o){o.onclick=function(){k.preferences.set("auto_scroll",o.checked);k.preferences.save()}}m.check_scroll=function(){if(m.getElementById("_Logger_Auto_Scroll").checked==true){p.scrollTo(0,p.document.body.scrollHeight)}}};function LoggerPreferences(){this.preferences={};this.save_preferences=true;this.logger_dummy=new LoggerDummy()}LoggerPreferences.prototype.set=function(a,b,c){if(this.preferences[a]==null){this.preferences[a]={}}this.preferences[a].value=b;if(c!=null){this.preferences[a].remember=c}};LoggerPreferences.prototype.get=function(a){if(this.preferences[a]==null){return null}else{return this.preferences[a].value}};LoggerPreferences.prototype.save=function(){if(this.save_preferences!=true){return}var c=new Cookie({name:"logger_preferences",logger:this.logger_dummy,logger_level:-1});var a=0;var b=0;var g=0;var d=new CookieParams({logger:this.logger_dummy,logger_level:-1});for(pref in this.preferences){if(this.preferences[pref].remember){d.set_param(pref,this.preferences[pref].value)}}c.value=d.get_data();c.update()};LoggerPreferences.prototype.load=function(){if(this.save_preferences!=true){return}var d=new Cookie({name:"logger_preferences",logger:this.logger_dummy,logger_level:-1});if(d.value==null){return false}var h=new CookieParams({data:d.value,logger:this.logger_dummy,logger_level:-1});var a=h.get_params();for(var c=0;c<a.length;c++){var b=a[c];var g=h.get_param(b);if(this.preferences[b]==null){this.preferences[b]={}}if(g=="true"){this.preferences[b].value=true}else{if(g=="false"){this.preferences[b].value=false}else{this.preferences[b].value=g}}}return true};function LoggerDummy(){}LoggerDummy.prototype.srt=function(){};LoggerDummy.prototype.end=function(){};LoggerDummy.prototype.msg=function(){};LoggerDummy.prototype.warn=function(){};LoggerDummy.prototype.error=function(){};function Profile(a){this.profile_stack=new Array();this.profile_list=new Array();this.profile_summary=new Array();this.profile_id=null;if(a!=null){this.Logger=a.logger;this.log_level=a.log_level}}Profile.prototype.className="Profile";Profile.prototype.start=function(a,b){if(a!=null&&a.className!=null){b=a.className+"."+b}this.profile_idx++;this.profile_stack.push({start:new Date,id:b,total:0});if(this.profile_list[b]==null){this.profile_list[b]=({gross_total:0,net_total:0,gross_min:-1,gross_max:0,net_min:-1,net_max:0,calls:0,id:b})}};Profile.prototype.end=function(){var c=new Date;var g=this.profile_stack.pop();var d=this.profile_list[g.id];var j=g.start;var b=new Date();d.calls++;var a=(b.getTime()-j.getTime());var h=(a-g.total);d.gross_total+=a;d.net_total+=h;if(a<d.gross_min||d.gross_min==-1){d.gross_min=a}if(a>d.gross_max){d.gross_max=a}if(h<d.net_min||d.net_min==-1){d.net_min=h}if(h>d.net_max){d.net_max=h}if(this.profile_stack.length>0){this.profile_stack[this.profile_stack.length-1].total+=a}};Profile.prototype._get_seconds=function(a){return a.getTime()};Profile.prototype._round=function(a){return Math.round(a*100)/100};Profile.prototype._bubble_sort=function(h,d){var c=h.length;for(var b=0;b<(c-1);b++){for(var a=b+1;a<c;a++){if(h[a][d]>h[b][d]){var g=h[b];h[b]=h[a];h[a]=g}}}};Profile.prototype.summary=function(){var b;if(this.profile_stack.length>0){b="Profiler out of sync ["+this.profile_stack.length+"]"}else{b='<TABLE style="font-size: 8pt; background-color: white; border: 1px solid black;">\n';b+='<TR style="border:1px solid black; background-color: silver; color: white;"><TH>ID</TH><TH># Calls</TH><TH>Total (n)</TH><TH>% (n)</TH><TH>Avg (n)</TH><TH>Min (n)</TH><TH>Max (n)</TH><TH>Tot (g)</TH><TH>Avg (g)</TH><TH>Min (g)</TH><TH>Max (g)</TD></TR>';var g=0;var a=0;var c=new Array();for(var j in this.profile_list){g+=this.profile_list[j].net_total;a+=this.profile_list[j].gross_total;c.push(this.profile_list[j])}this._bubble_sort(c,"net_total");var h='<TD style="text-align: right">';for(i in c){var d=c[i];b+="<TR>"+h+d.id+"</TD>"+h+d.calls+"</TD>"+h+(d.net_total/1000)+"</TD>"+h+this._round(((d.net_total/g)*100))+"</TD>"+h+this._round(((d.net_total/d.calls)/1000))+"</TD>"+h+(d.net_min/1000)+"</TD>"+h+(d.net_max/1000)+"</TD>"+h+(d.gross_total/1000)+"</TD>"+h+this._round(((d.gross_total/d.calls)/1000))+"</TD>"+h+(d.gross_min/1000)+"</TD>"+h+(d.gross_max/1000)+"</TD></TR>"}b+='<TR ><TD ></TD><TD>&nbsp;</TD></TD><TD style="border-top: 2px solid black; text-align: right">'+(g/1000)+'<TD colspan="8">&nbsp;</TD></TR>';b+="</TABLE>"}this.profile_list=new Array();this.profile_stack=new Array();if(this.Logger!=null&&this.Logger.enabled==true){this.Logger.srt(this,"Profile Summary",this.log_level);this.Logger.msg(b);this.Logger.end()}else{return b}};function Widget_Collapse(a){this.cookie_name="FWWidgetCollapse";try{this.logger=Logger}catch(b){this.logger={srt:function(){},msg:function(){},error:function(){},warn:function(){},end:function(){}}}for(i in a){this[i]=a[i]}this.maximise_class="CollapseMaximised";this.minimise_class="CollapseMinimised";if(this.state_id==null){this.state_id=this.id}this.state_key=this.state_id;this.init_cookie();if(this.initial_state=="Minimised"){this.initial_state=this.MINIMISED}else{this.initial_state=this.MAXIMISED}this.state=this.initial_state;if(FW.effects_enabled==true){this.effect=new FW_Effect_Height()}this.init()}Widget_Collapse._cookie=null;Widget_Collapse._cookie_params=null;Widget_Collapse.prototype.MAXIMISED=1;Widget_Collapse.prototype.MINIMISED=2;Widget_Collapse.prototype.init_cookie=function(){if(this.maintain_state==1){if(Widget_Collapse._cookie==null){try{Widget_Collapse._cookie=new Cookie({name:this.cookie_name,logger:this.logger})}catch(a){alert(a.message);this.logger.warn("Couldnt init cookie ["+a.message+"]")}}this.cookie=Widget_Collapse._cookie}};Widget_Collapse.prototype.init=function(){this.widget_obj=document.getElementById(this.id);this.maximised_obj=this.get_element_by_class(this.maximise_class);this.minimised_obj=this.get_element_by_class(this.minimise_class);EventHandler.addEvent(this.minimised_obj,"click",Widget_Collapse.prototype._event_on_click_maximise,this);EventHandler.addEvent(this.maximised_obj,"click",Widget_Collapse.prototype._event_on_click_minimise,this);this.item_effect=new Array();this._item_refs=new Array();for(var a=0;a<this.items.length;a++){var c=document.getElementById(this.items[a]);if(c==null){continue}this._item_refs.push(c);if(this.effect!=null){var b=this.effect.clone();b.element=c;this.item_effect.push(b)}}if(this.force_state!=null){if(this.force_state=="Minimised"){this.state=this.MINIMISED}else{this.state=this.MAXIMISED}this._save_state(this.state)}else{this._load_state()}};Widget_Collapse.prototype.get_element_by_class=function(b){for(var a=0;a<this.widget_obj.childNodes.length;a++){if(this.widget_obj.childNodes[a].className==b){return this.widget_obj.childNodes[a]}}};Widget_Collapse.prototype._event_on_click_maximise=function(){this.maximise()};Widget_Collapse.prototype._event_on_click_minimise=function(){this.minimise()};Widget_Collapse.prototype.maximise=function(c,d){for(var a=0;a<this._item_refs.length;a++){var g=this._item_refs[a];var b=this.item_effect[a];this._maximise(g);if(b!=null&&c!=0){b.start=0;b.end=100;b.oncomplete=null;b.apply()}}if(d!=0){this._save_state(this.MAXIMISED)}this.maximised_obj.style.display="";this.minimised_obj.style.display="none"};Widget_Collapse.prototype._obj_id=function(a){return a.id};Widget_Collapse.prototype.minimise=function(effect,save_state){var wc=this;for(var i=0;i<this._item_refs.length;i++){var obj=this._item_refs[i];var obj_effect=this.item_effect[i];if(obj_effect!=null&&effect!=0){obj_effect.start=100;obj_effect.end=0;obj_effect.oncomplete=eval("function() { wc._minimise(wc._item_refs["+i+"]); }");obj_effect.apply()}else{this._minimise(obj)}}if(save_state!=0){this._save_state(this.MINIMISED)}this.maximised_obj.style.display="none";this.minimised_obj.style.display=""};Widget_Collapse.prototype._save_state=function(a){if(this.cookie!=null){this.cookie_params=new CookieParams({data:this.cookie.value,logger:this.logger});if(a==this.initial_state){this.cookie_params.delete_param(this.state_key)}else{this.cookie_params.set_param(this.state_key,a)}this.cookie.value=this.cookie_params.get_data();this.cookie.update()}};Widget_Collapse.prototype._load_state=function(){if(this.cookie!=null){this.cookie_params=new CookieParams({data:this.cookie.value,logger:this.logger});var a=this.cookie_params.get_param(this.state_key,a);if(a!=null){this.state=a}}};Widget_Collapse.prototype._minimise=function(a){a.className=a.className.replace("Maximised","");a.className+=" Minimised"};Widget_Collapse.prototype._maximise=function(a){a.className=a.className.replace("Minimised","");a.className+=" Maximised"};Widget_Collapse.prototype.display=function(){if(this.state==this.MINIMISED){this.minimise(0,0)}else{this.maximise(0,0)}};var EventHandler=new function(){var registry={};function registryKey(id,type,fn,listener,scope){return id+"#"+type+"#"+fn+"#"+scope}function isInRegistry(key){return registry[key]!=null}function invoke(key,evt){var handler=registry[key];if(handler==null){return null}var ret;var scope=handler.scope;scope.__evt__=handler.listener;var ret=scope.__evt__(evt);scope.__evt___=null;if(evt){if(ret==false&&evt.propertyName==null){try{evt.preventDefault()}catch(e){}}else{var assign_return_val=handler.assign_return_val;if(assign_return_val!=false){if(evt.returnValue!=false){evt.returnValue=ret}}}}return ret}var targetIdCount=0;function targetId(target){if(target==document){return"__DomEvents_ID_document"}if(target==window){return"__DomEvents_ID_window"}var id=target.id||target.uniqueID;if(id==null){id="__DomEvents_ID_"+targetIdCount++;target.id=id}return id}this.addEvent=function(target,type,listener,scope,assignReturnVal){var key=targetId(target)+"#"+type+"#"+listener+"#"+((scope==null)?(scope):(targetId(scope)));scope=scope||target;handler={listener:listener,assign_return_val:assignReturnVal,scope:scope,type:type,target:target,invoker:function(evt){if(evt==null){evt=event}return invoke(key,evt)}};registry[key]=handler;var on_event="on"+type;var event_code=handler.invoker;if(target[on_event]!=null){var old_event_code=target[on_event];if((typeof target[on_event])!="function"){target[on_event]=function(ev){var ret=eval(old_event_code);if(ret){return event_code.call(this,evt)}else{return false}}}else{target[on_event]=function(evt){var ret=old_event_code.call(this,evt);if(ret){return event_code.call(this,evt)}else{return false}}}}else{target[on_event]=handler.invoker}target=listener=scope=null;return true};this.removeEvent=function(target,type,listener,scope){var key=targetId(target)+"#"+type+"#"+listener+"#"+((scope==null)?(scope):(targetId(scope)));if(!isInRegistry(key)){return false}var invoker=registry[key].invoker;delete (registry[key]);target["on"+type]=null;target=null;return true};function cleanup(e){for(var key in registry){var handler=registry[key];if(handler){if(handler.type=="unload"){var unloadkey=handler.listener;if(handler.listener==cleanup){continue}var scope=handler.scope;scope.__evt__=handler.listener;var ret=scope.__evt__(e);scope.__evt___=null}handler.target["on"+handler.type]=null;handler.target=null;handler=null;delete (registry[key])}registry[key]=null}return true}this.alterEventObject=function(){};this.addEvent(window,"unload",cleanup,null,false)};var DEBUG_LOG_LEVEL=32000;var EVENT_LOG_LEVEL=31999;var VALIDATION_LOG_LEVEL=31998;var SUBMIT_LOG_LEVEL=31997;var COOKIE_LOG_LEVEL=31996;var DYNAMIC_TABLE_LOG_LEVEL=31995;var EXTERNAL_REQUEST_LOG_LEVEL=31994;var WIDGET_RELATIONSHIP_LOG_LEVEL=31993;var PROFILE_LOG_LEVEL=31992;var PROGRAM_LOG_LEVEL=30000;var WARNING_LOG_LEVEL=1;var ERROR_LOG_LEVEL=0;var LogLevelList={};LogLevelList[DEBUG_LOG_LEVEL]="Debug";LogLevelList[EVENT_LOG_LEVEL]="Event";LogLevelList[VALIDATION_LOG_LEVEL]="Validation";LogLevelList[SUBMIT_LOG_LEVEL]="Submit";LogLevelList[COOKIE_LOG_LEVEL]="Cookie";LogLevelList[DYNAMIC_TABLE_LOG_LEVEL]="Dynamic Table";LogLevelList[EXTERNAL_REQUEST_LOG_LEVEL]="Ext Request";LogLevelList[PROGRAM_LOG_LEVEL]="Program";LogLevelList[WARNING_LOG_LEVEL]="Warning";LogLevelList[ERROR_LOG_LEVEL]="Error";LogLevelList[WIDGET_RELATIONSHIP_LOG_LEVEL]="Widget Rltnshp";LogLevelList[PROFILE_LOG_LEVEL]="Profiling";try{Cookie.log_level=COOKIE_LOG_LEVEL}catch(e){}try{DynTable.log_level=DYNAMIC_TABLE_LOG_LEVEL}catch(e){}var Logger;var LoggerDummy;var Profiler;try{Logger=new Logger({enabled:false,level_list:LogLevelList})}catch(e){Logger={srt:function(){},msg:function(){},log_enabled:function(){},error:function(){},warn:function(){},end:function(){}};LoggerDummy={srt:function(){},msg:function(){},log_enabled:function(){},error:function(){},warn:function(){},end:function(){}}}try{Profiler=new Profile({log_level:PROFILE_LOG_LEVEL,logger:Logger});Logger.profiler=Profiler}catch(e){Profiler={start:function(){},end:function(){},summary:function(){}}}function timeout_child(){window.close()}function timeout_parent(a){location.href=a}function dbg(a){if(dbg_mode){Logger.enabled=true;Logger.msg(a)}}function float_canvases(b){var j=((b[0])?(b[0]):("fixed"));var g=new Array();var a=["CanvasSingleRow","CanvasMultiRow","CanvasMultiView"];for(var h=0;h<a.length;h++){var g=FW_Element.getElementsByAttribute(document.body,"div","class",a[h],true);for(var d=0;d<g.length;d++){_float_canvas(g[d],j)}}return true}function _float_canvas(d,c){var b=FW_Element.getElementsByAttribute(d,"SPAN","class","HeaderText");b=(b!=null)?(b[0]):(null);var a=new FW_Layer({element:d,drag_element:b,check_boundary:false,name:d.id,position_on_init:false,float_type:c,allow_restore:true,remember_position:true})}function _fw_window_options(g,d,b){var c={};if(b!=null){var b=b.split(/,/);for(var h=0;h<b.length;h++){var a=b[h].split(/=/);c[a[0]]=(a[1]==null?"yes":a[1])}}var j={url:g,name:d,width:c.width,height:c.height,top:c.top,left:c.left,resizable:c.resizable,scollbars:c.scrollbars,autosize:c.autosize,autosizeonrefresh:c.autosizeonrefresh,dynamicgen:c.dynamicgen,autocenter:c.autocenter,autocenteronrefresh:c.autocenteronrefresh,titlebar:c.titlebar,status:c.statusbar,showloading:c.showloading,moveable:c.moveable,modal:c.modal,close:c.close,closeonblur:c.closeonblur,minimizable:c.minimizable,refreshparentonclose:c.refreshparentonclose,taskbar:document.getElementById("TaskBar")};return j}function _fw_open_window_virtual(c,b,a){return _fw_open_window(c,b,a,"Virtual")}function _fw_open_window_standard(c,b,a){return _fw_open_window(c,b,a,"Standard")}function fw_window_find(b){var a;for(var c=0;c<FW_Window._list.length;c++){if(FW_Window._list[c].name==b){a=FW_Window._list[c]}}return a}function fw_open_window(url,name,option_list,type){Logger.srt(this,"_fw_open_window_standard");Logger.msg("URL ["+url+"]");Logger.msg("Name ["+name+"]");Logger.msg("Option List ["+option_list+"]");if(!name){name=url.replace(/\W/g,"")}var window_e=_fw_window_find(name);if(window_e==null){window_e=eval("new Window_"+type+"(_fw_window_options(url, name, option_list));");window_e.open()}else{window_e.location(url);window_e.focus()}Logger.msg("Window ["+window_e+"]");Logger.end();return window_e}function u(a){return unescape(a)}function get_url(){return FW_Browser.url()}function element_left(a){return FW_Element.left(a)}function element_top(a){return FW_Element.top(a)}function fw_display_menu(a){var h=document.getElementById(a[0]);if(h==null){return true}var c=b(h);if(c==null){return true}var d;if(FW.effects_enabled==true){d=new FW_Effect_ShrinkFade({})}var g=new FW_Menu({element:c,logger:Logger,event:FW_Menu.EVENT_HOVER,initial_state:FW_Menu.INITIAL_STATE_HIDDEN,restrict_one_sibling:true,remember_state:true,effect:d,display:FW_Menu.DISPLAY_VERTICAL});function b(l){for(var k=0;k<l.childNodes.length;k++){var m=new String(l.childNodes[k].nodeName).toUpperCase();if(m=="UL"){return l.childNodes[k]}else{var j=b(l.childNodes[k]);if(j){return j}}}}return true}function pop_form_submit(o){var b;var j;b=widgetMap;var m=b.length;var d=window.opener||window.w_opener;var h=window.document.POP_DATA["ROW_NUMBER"];var k=0;if(h!=null){for(var g=0;g<h.length;g++){if(h[g].checked){k=g;break}}for(var g=0;g<m;g++){var l=b[g];var a=d.document.getElementById([l[1]]);var c="$"+k+"_"+l[0];var n=this.document.POP_DATA[c];if(a){if(n.value){a.value=n.value}else{a.value=""}}}}window.close();return false}function fw_add_canvas_submit_widget_ref(c){var h=c.shift();var g=c.pop();if(h._original_onclick){h.onclick=h._original_onclick}else{h._original_onclick=h.onclick}link_onclick=new String(h.onclick);var b="";for(var d=0;d<c.length;d=d+3){b=b+c[d]+"."+c[d+1]+"="+c[d+2].value;b=b+"&"}var a=link_onclick.replace("?","?"+b);h._new_onclick=a;h.onclick=_fw_add_canvas_onclick;return true}function fw_clone_row(k){var a=k[0];var d=k[1];var h="MULTI_CONTENT_"+a.name;var l=a;if(l.rows.length>=d){alert("Cannot add more rows");return false}var j=l.clone_row();var o=document.getElementById(h).tBodies[0];var m=document.createElement("TR");o.appendChild(m);for(var g=0;g<j.length;g++){var n=j[g];var b=document.createElement("TD");b.appendChild(n.element);m.appendChild(b);n.init()}for(var g=0;g<j.length;g++){j[g].clear();j[g].init_relations()}}function _fw_add_canvas_onclick(){eval(this._new_onclick);try{onclick()}catch(e){anonymous()}}function get_window_opener(){if(window.w_opener!=null){return window.w_opener}else{return window.opener}}function refresh_window(a){FW_Browser.reload()}function clear_items(a){var b=a.length;while(b--){if(a[b]!=null&&typeof(a[b])=="object"){a[b].clear()}}return true}function focus_widget(a){if(a[0]!=null&&typeof(a[0])=="object"){a[0].focus()}}function fw_submit_canvas(b){var a=b[0];if(a!=null){return a.do_submit()}else{return false}}function fw_canvas_submit(args){var url=args.shift();if(url.length==0){url=FW_Browser.url()}var action=args.shift();try{action=eval(action)}catch(e){}var target_canvas=args.shift();var row_number=args.pop();var request=new FW_Request_CanvasSubmit({url:url,submit_action:action,canvas_name:target_canvas});for(var i=0;i<args.length;i=i+2){request.add_param(args[i],args[i+1])}request.submit();return true}function fw_submit_canvas_background(c){var b=get_url();var h=new FW_Request_Background_Canvas({url:b});var g=c.pop();var d=c.length;while(d--){var a=Framework.get_canvas(c[d]);if(a==null){alert("Couldnt find ["+c[d]+"]")}else{h.add_canvas(a)}}h.submit();return false}function fw_window_close(){FW_Window.me().close()}function fw_populate_parent_widgets(h){Logger.srt(this,"fw_populate_parent_widgets");var b=h.pop();var g=h.length;for(var c=0;c<g;c=c+3){var a=h[c];var j=h[c+1];var l=h[c+2];var d=FW_Window.me();if(d){var k=d.opener.Framework;k.get_canvas(a).get_widget(j).value(l.value())}else{Logger.error("No window")}}Logger.end()}function start_logger(){Logger.enabled=true;Logger.msg("Logger enabled")}function show_debugger(){var a=new FW_Debugger({});a.open()}function test_alert(a){alert(a);return false}function test_console(a){return false}function return_false(){return false}function test(a){var b=a[1];var c=$(this.canvas.name+"_$"+b+"_"+this.name);alert(c)}function do_background_request(a){var b=Framework.get_background_request(a[0]);b.submit();return false}function background_request_callback_search(a){var b=Framework.get_background_request(a[0]);var c=a[1];b.add_param("SEARCH_DATA",c.value());b.submit();return false}function background_request_multiview_detail(a){if(this.done_background){return}var d=a[0];var b=Framework.get_background_request(d).clone();b.clear_all_params();b.row_num(this.row_number());var c=new FW_RequestParams_CanvasSubmit({canvas_name:"TEST_CANVAS_MV_DETAIL"});c.add_param("TEST_DB_ONE_ID",a[1]);b.add_param_obj(c);b.submit();this.done_background=true;return false}function background_request_extra_widgets(a){if(this.done_background){return}var c=a[0];var b=Framework.get_background_request(c);b.clear_all_params();b.submit();this.done_background=true;return false}function custom_busy_function(a,b){if(b){FW_Element.add_css_class(a,"GreyElements")}else{FW_Element.remove_css_class(a,"GreyElements")}}function canvas_background_request(b){var d=b[0];if(this.chmode_action()){d="BACKGROUND_REQUEST_SR_MV_CANVASES"}if(this.action()==FW.DO_QUERY_UPDATE||this.action()==FW.DO_QUERY_NO_UPDATE||this.action()==FW.DO_INSERT||this.action()==FW.DO_UPDATE){d="BACKGROUND_REQUEST_SR_MV_CANVASES"}var c=Framework.get_background_request(d);var a=this;c.clear_all_params();c.add_param_obj(new FW_RequestParams_Canvas({canvas:a}));c.submit();return false}function FW_Layout_Tab(b){var a;this.div=null;this.id=null;this.classMain="TabGroup";this.classMainLive="TabGroupLive";this.classTab="Tab";this.classTabDefault="tabbertabdefault";this.classNav="TabNavigation";this.classTabHide="TabHide";this.classNavActive="TabActive";this.titleElements=["h2","h3","h4","h5","h6"];this.titleElementsStripHTML=true;this.removeTitle=true;this.addLinkId=false;this.linkIdFormat="<tabberid>nav<tabnumberone>";for(a in b){this[a]=b[a]}this.REclassMain=new RegExp("\\b"+this.classMain+"\\b","gi");this.REclassMainLive=new RegExp("\\b"+this.classMainLive+"\\b","gi");this.REclassTab=new RegExp("\\b"+this.classTab+"\\b","gi");this.REclassTabDefault=new RegExp("\\b"+this.classTabDefault+"\\b","gi");this.REclassTabHide=new RegExp("\\b"+this.classTabHide+"\\b","gi");this.tabs=new Array()}FW_Layout_Tab.prototype=new FW;FW_Layout_Tab.prototype.className="FW_Layout_Tab";FW_Layout_Tab.prototype.init=function(h){this._init_args(h);this.profiler.start(this,"init");if(this.id!=null){e=document.getElementById(this.id)}var k,d,b,m,g=0,n,a,l,c,j;if(!document.getElementsByTagName){return false}this.tabs.length=0;k=e.childNodes;for(d=0;d<k.length;d++){if(k[d].className&&k[d].className.match(this.REclassTab)){m=new Object();m.div=k[d];this.tabs[this.tabs.length]=m;if(k[d].className.match(this.REclassTabDefault)){g=this.tabs.length-1}}}n=document.createElement("ul");n.className=this.classNav;for(d=0;d<this.tabs.length;d++){m=this.tabs[d];m.headingText=m.div.title;if(this.removeTitle){m.div.title=""}if(!m.headingText){for(b=0;b<this.titleElements.length;b++){j=m.div.getElementsByTagName(this.titleElements[b])[0];if(j){m.headingText=j.innerHTML;if(this.titleElementsStripHTML){m.headingText.replace(/<br>/gi," ");m.headingText=m.headingText.replace(/<[^>]+>/g,"")}break}}}if(!m.headingText){m.headingText=d+1}a=document.createElement("li");m.li=a;l=document.createElement("a");l.appendChild(document.createTextNode(m.headingText));l.href="#";l.title=m.headingText;l.onclick=this.navClick;l.tabber=this;l.tabberIndex=d;if(this.addLinkId&&this.linkIdFormat){c=this.linkIdFormat;c=c.replace(/<tabberid>/gi,this.id);c=c.replace(/<tabnumberzero>/gi,d);c=c.replace(/<tabnumberone>/gi,d+1);c=c.replace(/<tabtitle>/gi,m.headingText.replace(/[^a-zA-Z0-9\-]/gi,""));l.id=c}a.appendChild(l);n.appendChild(a)}e.insertBefore(n,e.firstChild);e.className=e.className.replace(this.REclassMain,this.classMainLive);this.tab_show(g);this.profiler.end();return this};FW_Layout_Tab.prototype.navClick=function(j){var d,b,c,h,g;b=this;if(!b.tabber){return false}c=b.tabber;h=b.tabberIndex;b.blur();if(typeof c.onClick=="function"){g={tabber:c,index:h,event:j};if(!j){g.event=window.event}d=c.onClick(g);if(d===false){return false}}c.tab_show(h);return false};FW_Layout_Tab.prototype.tab_hide_all=function(){var a;for(a=0;a<this.tabs.length;a++){this.tab_hide(a)}};FW_Layout_Tab.prototype.tab_hide=function(a){var b;if(!this.tabs[a]){return false}b=this.tabs[a].div;if(!b.className.match(this.REclassTabHide)){b.className+=" "+this.classTabHide}this.nav_clear_active(a);return this};FW_Layout_Tab.prototype.tab_show=function(a){var b;if(!this.tabs[a]){return false}this.tab_hide_all();b=this.tabs[a].div;b.className=b.className.replace(this.REclassTabHide,"");this.nav_set_active(a);this.call_event("tabactive",{idx:a},"after");if(typeof this.onTabDisplay=="function"){this.onTabDisplay({tabber:this,index:a})}return this};FW_Layout_Tab.prototype.nav_set_active=function(a){this.tabs[a].li.className=this.classNavActive;this.active_tab_index=a;return this};FW_Layout_Tab.prototype.nav_clear_active=function(a){this.tabs[a].li.className="";return this};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){this.profiler.start(this,"remove_html");var a=String(b).replace(/<.*?>/g,"");this.profiler.end();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 b=this._container.style.display;if(b=="none"){return false}var a=FW_Element.height(this._container);if(a==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,a,b){if(d==null){d=event.propertyName;b=this[d]}var c=_fw_hf_getLOV(this.identifier);if(c.styleMethodMap[d]!=null){c[c.styleMethodMap[d]].call(c,b)}else{c._style_element.style[d]=b}}FW_HTMLForm.prototype._setup_style_hooks=function(a){this.profiler.start(this,"_setup_style_hooks");if(this._style_element==null){this.profiler.end();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{}}this.profiler.end()};FW_HTMLForm.prototype._copy_events=function(a){this.profiler.start(this,"_copy_events");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])}}this.profiler.end()};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){this.profiler.start(this,"_setup_hooks");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)}}this.profiler.end();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,a,b){this.profiler.start(this,"add");this._option_list.add(c,a);if(this.display_type=="list"&&b!=false){this._option_list._generate_display()}this._options_sized=false;this.profiler.end()};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){this.profiler.start(this,"selectedIndex");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){this.profiler.end();return this._option_list.selectedIndex()}}this.profiler.end();return false};FW_HTMLForm_LOV.prototype._update_value=function(){this.profiler.start(this,"update_value");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")}this.profiler.end()};FW_HTMLForm_LOV.prototype.value=function(b){if(b!=null){this.profiler.start(this,"value - set");var a=this._option_list.findValue(b);if(a>-1){this.selectedIndex(a)}}else{this.profiler.start(this,"value - get");if(this._option_list!=null){if(this._option_list.selectedOption().value!=null){this.profiler.end();return String(this._option_list.selectedOption().value)}}}this.profiler.end();return""};FW_HTMLForm_LOV.prototype.options=function(){if(this._option_list){return this._option_list.options}else{return[]}};FW_HTMLForm_LOV.prototype.display=function(h){if(this.select==null){return false}this.profiler.start(this,"display");var d=document.createElement("TBODY");var j=document.createElement("TR");var k;var b;d.appendChild(j);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 k=document.createElement("TD");j.appendChild(k);k.appendChild(a);k.appendChild(this._option_list.element);b=k}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);j.appendChild(c);b=c}if(this.show_button==true){var g=document.createElement("TD");this._button_img=this._create_display_button();g.appendChild(this._button_img);j.appendChild(g);b=g}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(h);this.profiler.end();return true};FW_HTMLForm_LOV.prototype._copy_options=function(){this.profiler.start(this,"_copy_options");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)}this.profiler.end()};FW_HTMLForm_LOV.prototype._current_displayed=null;FW_HTMLForm_LOV.prototype.show_options=function(){this.profiler.start(this,"show_options");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.profiler.end();this.showing_options=true};FW_HTMLForm_LOV.prototype.hide_options=function(a){this.showing_options=false;this.profiler.start(this,"hide_options");if(this._option_list.displayed==false){this.profiler.end();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()}this.profiler.end();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(){this.profiler.start(this,"size_input");if(this._input==null||this._option_list==null){this.profiler.end();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;this.profiler.end()};FW_HTMLForm_LOV.prototype.size_options=function(){this.profiler.start(this,"size_options");if(this._option_list==null){this.profiler.end();return false}if(this._options_sized==true){this.profiler.end();return false}var a=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){a=this.list_length}else{if(a>this.length){if(this.wrap_length!=null&&a>this.wrap_length){a=this.wrap_length}}else{this._option_list_length=this._container.offsetWidth;this.profiler.end();return true}}var b=document.createElement("INPUT");b.size=parseInt(a)+2;document.body.appendChild(b);this._option_list_length=b.offsetWidth;b.style.display="none";b=null}this._options_sized=true;this.profiler.end()};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}this.profiler.start(this,"blur");if(this._input!=null){this._input.blur()}else{if(this._focus_container!=null){this._focus_container.blur()}}this.profiler.end();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(g){var d=false;if(this.display_type=="list"){if(this.onchange_onkey!=false){d=true}}var c=true;var a=false;if(g.altKey||g.ctrlKey){a=true}if(!a&&g.keyCode==FW.KEY_DOWN){if(g.altKey==true){this.show_options()}else{this.stop_search();this.selectedIndex(parseInt(this.selectedIndex())+1,d);this._option_list.show_selected()}c=false}else{if(!a&&g.keyCode==FW.KEY_UP){if(g.altKey==true){this.show_options()}else{this.stop_search();this.selectedIndex(parseInt(this.selectedIndex())-1,d);this._option_list.show_selected()}c=false}else{if(!a&&g.keyCode==FW.KEY_HOME){this.stop_search();this.selectedIndex(0,d);this._option_list.show_selected();c=false}else{if(!a&&g.keyCode==FW.KEY_END){this.stop_search();this.selectedIndex(this.options().length-1,d);this._option_list.show_selected();c=false}else{if(!a&&g.keyCode==FW.KEY_PAGE_UP){var b=this.selectedIndex();this.stop_search();this.selectedIndex(((b-15>0)?(b-15):(0)),d);this._option_list.show_selected();c=false}else{if(!a&&g.keyCode==FW.KEY_PAGE_DOWN){var b=this.selectedIndex();this.stop_search();this.selectedIndex(((b+15<=(this.options().length-1))?(b+15):(this.options().length-1)),d);this._option_list.show_selected();c=false}else{if(!a&&g.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")}}c=true}else{if(!a&&(g.keyCode==FW.KEY_TAB||g.keyCode==FW.KEY_ESC)){this.stop_search();if(this.display_type=="drop"){this.hide_options()}c=true}else{if(!a&&g.keyCode==FW.KEY_BACKSPACE){this.search(-1);c=false;FW_KeyHandler.ignore_key=true}else{if(!a&&g.keyCode==FW.KEY_RIGHT){this.search(-2)}else{if(!a&&g.keyCode==FW.KEY_LEFT){this.search(-3)}else{if(!a&&g.keyCode!=FW.KEY_SHIFT){var h=FW_KeyHandler.get_key(g.keyCode,g.shiftKey);if(h!=null){this.search(h);c=false}}}}}}}}}}}}}if(this._call_event("onkeydown",g)==false){c=false}if(c==false){}return c};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(g,b,c){if(g==null){g=event.propertyName;c=this[g]}var a=_fw_hf_getLOV(this.identifier);if(a.ignore_prop_change==true){return c}if(a.propMethodMap[g]!=null){_fw_hf_getLOV(this.identifier)[a.propMethodMap[g]](c)}else{if(g.search("^on.*?")>-1){a.add_event(g,c)}else{try{a.ignore_prop_change=true;a._value_container[g]=c;a.ignore_prop_change=false}catch(d){a.ignore_prop_change=false}}}return c}function _fw_html_lov_property_add_hook(b,a){return _fw_hf_getLOV(this.identifier).add(b,a)}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(){this.profiler.start(this,"display - create container");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);this.profiler.end();return a};FW_HTMLForm_LOV.prototype._create_display_button=function(){this.profiler.start(this,"display - create button");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";this.profiler.end();return a};FW_HTMLForm_LOV.prototype._create_display_input=function(){this.profiler.start(this,"display - create input");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;this.profiler.end();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(a){this._init_args(a);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 b=(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:b,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(){this.profiler.start(this,"size_options_list");if(this._option_list==null){this.profiler.end();return false}if(this.length=="*"){this._option_list_length=this._container.parentNode.offsetWidth-10;this._options_sized=true;this.profiler.end();return true}var b=document.createElement("INPUT");if(this.length){b.size=this.length}else{var c=this._option_list.max_option_size();b.size=(c)?(c):(1)}var a=b;document.body.appendChild(b);this._option_list_length=a.offsetWidth;a.style.display="none";this.profiler.end();this._options_sized=true};FW_HTMLForm_LOV_Select.prototype.search=function(b){this.profiler.start(this,"search");this._search_field.top=this.top()+this._container.offsetHeight;this._search_field.left=this.left();var d=0;var c=1;if(b==-2){if(this._search_field.value().length>0){d=this.selectedIndex()+1}}else{if(b==-3){if(this._search_field.value().length>0){d=this.selectedIndex()-1;c=-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(),d,c);if(a>-1){this.selectedIndex(a);this._option_list.scrollFrame()}}this._search_field.display();this.profiler.end()};FW_HTMLForm_LOV_Select.prototype.stop_search=function(){this.profiler.start(this,"stop_search");this._search_field.clear();this._search_field.hide();this.profiler.end()};FW_HTMLForm_LOV_Select.prototype._setup=function(a){this.profiler.start(this,"display - setup");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);this.profiler.end()};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(){this.profiler.start(this,"display - setup");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);this.profiler.end()};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 a=-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 d=0;var c=1;a=this._option_list.findText(this._search_field.value(),d,c,true);if(a>-1){var b=this._search_field.value();this.selectedIndex(a);this.valueHighlight(b,this._search_field.value())}}return false};FW_HTMLForm_LOV_Combo.prototype.valueHighlight=function(b,d){if(d!=null){if(this.show_list==true){this.show_options()}if(this.autoselect==true){var a=b.length;var g=d.length;for(var c=0;c<b.length;c++){if(d.charAt(c)!=b.charAt(c)){a=c;return false}}this._search_field.select_range(a,g)}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){this.profiler.start(this,"selectedIndex");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){this.profiler.end();return this._option_list.selectedIndex()}}this.profiler.end();return false};FW_HTMLForm_LOV_Combo.prototype.value=function(a){this.profiler.start(this,"value");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){this.profiler.end();return this._value_container.value}}this.profiler.end()};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(b){this._init_args(b);this.profiler.start(this,"init");this.identifier=FW_HTMLForm_OptionList._option_list.length;FW_HTMLForm_OptionList._option_list.push(this);var a=document.createElement("DIV");a._drop_down=true;a.className=this._option_list_class_name;if(this.display_type==FW_HTMLForm_OptionList.DISPLAY_TYPE_FLOAT){a.style.display="none"}document.body.appendChild(a);this._display_option_list=a;this.element=a;this.profiler.end()};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(){this.profiler.start(this,"_create");var b='<table cellpadding="0" cellspacing="0" border="0">';var a="FW_HTMLForm_OptionList._getLOVOption(getIden(this.id))";if(this.header){b=FW.concat([b,"<tr><td>",this._generate_header(a),"</td></tr>"])}b=FW.concat([b,'<tr><td><div id="_content" style="display: block; width: 100%; overflow: auto;"></div></td></tr></table>']);this._display_option_list.innerHTML=b;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([a,".selectedIndex(getIdx(this.id), false); return true;"]);this.onmouseout=FW.concat([a,".selectedIndex(null, false); return true;"]);this.onmousedown=FW.concat([a,".clicked = true; return true;"])}else{this.onmousedown=FW.concat([a,".selectedIndex(getIdx(this.id), false); return true;"])}this._created=true;this.profiler.end()};FW_HTMLForm_OptionList.prototype._get_item=function(d,c){var b=this._display_option_list.getElementsByTagName(c);var a=b.length;while(a--){if(b[a].id==d){return b[a];break}}};FW_HTMLForm_OptionList.prototype._generate_footer=function(){};FW_HTMLForm_OptionList.prototype._generate_header=function(a){if(this.header==null){return""}var d=FW.concat([a,".do_sort(getIdx(this.id), this);"]);var h=FW.concat([a,"._header_down(this);"]);var j=FW.concat([a,"._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 g;if(this.widths[b]){g=this.widths[b]}else{g=parseInt(100/this.header.length)+"%";this.widths[b]=g+"%"}c=FW.concat([c,"<th title='Sort column' style='cursor: pointer;' _drop_down='1' class='_drop_down' id='",this.identifier,"_",b,"' onclick='",d,"' onmousedown='",h,"' onmouseup='",j,"' width='"+g+"'>",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,g){var j=new Array();var d=this.options.length;for(var h=0;h<d;h++){if(this.options[h].columns!=null){j.push(this.options[h].columns[a])}}if(this._sort_tr){this._sort_tr.className=this._sort_tr.className.replace(/LOVOptionHeader.*/,"")}j=j.sort();if(this._sort_idx==a){g.className+=" LOVOptionHeaderSortDesc";j.reverse();this._sort_idx=null}else{g.className+=" LOVOptionHeaderSortAsc";this._sort_idx=a}this._sort_tr=g;var k=j.length;var b=new Array();for(var c=0;c<k;c++){for(var h=0;h<d;h++){if(this.options[h].columns[a]==j[c]){b.push(this.options[h]);this.options.splice(h,1);d--}}}this._remove_all();d=b.length;for(var h=0;h<d;h++){this.options.push(b[h])}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(){this.profiler.start(this,"_generate_display");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 m=0;this.profiler.start(this,"_generate_display - find max columns");var l=1;var q=this.options;var h=this.options.length;for(var p=0;p<h;p++){if(q[p].columns!=null){l=q[p].columns.length}}this.profiler.end();this.profiler.start(this,"_generate_display - table code "+this.identifier+" "+h);for(var p=0;p<h;p++){var j;if(m%2==0){j=this._option_class_name}else{j=this._option_class_name+" LOVOptionAlt "}j+=" LOVOptionRow"+p;c.push("<tr ","onmouseover ='",this.onmouseover,"' ","onmouseout  ='",this.onmouseout,"' ","onclick ='",this.onmousedown,"' ","class='",j,"' ","id='"+this.identifier,"_",m,"'",">");if(q[p].columns!=null){var a=q[p].columns.length;if(q[p].clear_cells){q[p].clear_cells()}for(var g=0;g<a;g++){var b;if(this.widths[g]){b=this.widths[g]}var d=1;if((q[p].columns.length-1)==g){d=(l-g)}var o=" LOVOptionColumn LOVOptionColumn"+g+" ";if(g==a-1){o=o+"LOVOptionColumnLast "}var n=this.identifier+"_"+m+"_"+g;if(!q[p].cell_access||q[p].cell_access(g)!=FW.MODE_ACCESS_OMITTED){c.push("<td id='",n,"' class='",o,"' ","width='",b,"' ","colspan='",d,"' ",">",q[p].columns[g],"</td>")}if(q[p].add_cell){q[p].add_cell(n)}}}else{var d=l;c.push("<td ","width='",b,"' ","colspan='",d,"' ",">",q[p].text,"</td>")}m++;c.push("</tr>")}c.push("</table>");var k=FW.concat(c);var c;this.profiler.end();this.profiler.start(this,"_generate_display - table");this._display_option_list_content.innerHTML=k;this.profiler.end();this.profiler.start(this,"_generate_display - get table");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;this.profiler.end();this.profiler.end()};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(){this.profiler.start(this,"display");if(this.displayed==true){this.profiler.end();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()}this.profiler.end()};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(b,a){if(this._layer){this._layer.resize_to(b,a)}else{if(b!=null&&b>0){this._display_option_list_content.style.width=b+"px"}if(a!=null&&a>0){this._display_option_list_content.style.height=a+"px"}}if(b!=null){if(this.header){if(b!=null&&b>0){this._display_option_list_header.style.width=(b)}}}};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(){this.profiler.start(this,"scrollFrame");if(this._display_option_content==null){this.profiler.end();return}this._display_option_list_content.scrollTop=parseInt(this._display_option_content.scrollHeight)*(parseInt(this.selectedIndex())/parseInt(this.options.length));this.profiler.end()};FW_HTMLForm_OptionList.prototype.hide=function(){this.profiler.start(this,"hide");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;this.profiler.end()};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){this.profiler.start(this,"selectedIndex");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){this.profiler.end();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.profiler.end();this.call_event("rowselect",null,"after");return true}else{this.profiler.end();return this._selectedIdx}this.profiler.end();return true};FW_HTMLForm_OptionList.prototype.selectedOption=function(){this.profiler.start(this,"selectedOption");var a=this.selectedIndex();if(a>-1&&a!=null){this.profiler.end();return this.options[a]}else{this.profiler.end();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 a=this.options;this._remove_all();for(var c=0;c<a.length;c++){if(a[c]==b){this.add(d)}this.add(a[c])}}};FW_HTMLForm_OptionList.prototype.remove=function(d){if(this.options==null||this.options.length==0){return}if(d==null){Logger.srt(this,"remove");Logger.error("Cannot perform remove. Option is null");Logger.end();return false}this.profiler.start(this,"remove");var h=new Array();var a=0;var c=0;for(var b=0;b<this.options.length;b++){if(this.options[b].value==d.value){if(this._display_option_content!=null&&this._display_option_content.childNodes!=null&&this._display_option_content.childNodes[b+c]!=null){FW_Element.remove(this._display_option_content.childNodes[b+c])}this.options.splice(b,1);continue}if(this._display_option_content!=null&&this._display_option_content.childNodes!=null&&this._display_option_content.childNodes[b+c]!=null){var g=this._option_class_name;if(a%2!=0){g+=" LOVOptionAlt"}this._display_option_content.childNodes[a+c].className=g;this._display_option_content.id=this.identifier+"_"+a}a++}this._options_sized=false;this.profiler.end();return true};FW_HTMLForm_OptionList.prototype._remove_all=function(){this.profiler.start(this,"_remove_all");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.profiler.end();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(){this.profiler.start(this,"max_option_size");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}}this.profiler.end();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(){this.profiler.start(this,"_size_content");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"}}}this.profiler.end()};FW_HTMLForm_OptionList.prototype.findText=function(a,c,g,d){if(d==null){d=true}if(d==true){a=a.toLowerCase()}if(c==null){c=0}if(g==1){for(var b=c;b<this.options.length;b++){var h=this._check(this.options[b].text,a,d);if(h!=false){return b}}for(var b=0;b<c;b++){var h=this._check(this.options[b].text,a,d);if(h!=false){return b}}}else{if(g==-1){for(var b=c;b>0;b--){var h=this._check(this.options[b].text,a,d);if(h!=false){return b}}for(var b=this.options.length-1;b>c;b--){var h=this._check(this.options[b].text,a,d);if(h!=false){return b}}}}return -1};FW_HTMLForm_OptionList.prototype.findValue=function(g,c,h,d){var a=this.options.length;for(var b=0;b<a;b++){if(this.options[b].value==g){return b}}return -1};FW_HTMLForm_OptionList.prototype._check=function(a,b,c){var d;if(c){d=this.remove_html(a.toLowerCase());d=d.replace(/^\s+/,"");if(d.search("^"+b)>-1){return true}}else{if(a==b){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.profiler.start(this,"new");this._value="";this.top=10;this.left=10;this._create();this.profiler.end()}FW_HTMLForm_SearchField.prototype=new FW_HTMLForm();FW_HTMLForm_SearchField.prototype.className="FW_HTMLForm_SearchField";FW_HTMLForm_SearchField.prototype._create=function(){this.profiler.start(this,"_create");this._div=document.createElement("DIV");this._div.className="LOVSearch";this._div.width="1px";this._div.style.display="none";document.body.appendChild(this._div);this.profiler.end()};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);function FW_Window(a){this.left=10;this.top=10;this.width=190;this.height=150;this.min_height=150;this.min_width=190;this.title="&nbsp;";this.theme="";this.url="";this.name=this.identifier;this.autosize=false;this.autocenter=false;this.autocenteronrefresh=false;this.autosizeonrefresh=false;this.minimizable=false;this.can_close=true;this.resizable=true;this.moveable=true;this.scrollbars=true;this.modal=false;this.titlebar=true;this.external=false;this.showloading=true;this.showloadingscreen=false;this.status=true;this.dynamicgen=false;this.dialog=false;this.fw_window=false;this.closeonblur=false;this.destroyonclose=false;this.reloadonopen=false;this.refreshparentonclose=false;this._check_freq=50;this.closed=false;this._check_count=0;this._created=false;this._loaded=false}FW_Window.prototype._init_args=function(a){if(a!=null){this.option_list=["theme","left","top","width","height","name","title","url","taskbar","autosize","autocenter","autosizeonrefresh","autocenteronrefresh","resizable","moveable","modal","scrollbars","titlebar","directories","menubar","outerWidth","outerHeight","z-lock","toolbar","status","dynamicgen","showloading","close","minimizable","dialog","closeonblur","refreshparentonclose","effect_open","effect_close","showloadingscreen","external","destroyonclose","reloadonopen","ghosting","ghosttype"];for(i in this.option_list){if(a[this.option_list[i]]!=null){var b=this.option_list[i];var c=this.option_list[i];if(c=="close"){b="can_close"}this[b]=a[c]}}if(a.autosizeonrefresh==null){this.autosizeonrefresh=this.autosize}}if(FW.effects_enabled){this.effect_open=new FW_Effect_Opacity({start:0,end:100,duration:1});this.effect_close=new FW_Effect_Opacity({start:100,end:0,duration:1})}this._initial_width=this.width;this._initial_height=this.height};FW_Window._list=new Array();FW_Window._count=0;FW_Window.prototype.init=function(a){Logger.srt(this,"init");this.width=this._initial_width;this.height=this._initial_height;this.identifier="FW_Window_"+this.name+"_"+FW_Window._count;this.opener=window;FW_Window._count=parseInt(FW_Window._count)+1;FW_Window._list.push(this);Logger.msg("Identifier ["+this.identifier+"] FW_Window List Length ["+FW_Window._list.length+"]");Logger.end()};FW_Window.prototype._true=function(a){if(a==true||a==1||a=="yes"){return true}else{return false}};FW_Window.prototype.close=function(a){this.window.close()};FW_Window.prototype._remove_from_registry=function(){var b=new Array();for(var a=0;a<FW_Window._list.length;a++){if(FW_Window._list[a].identifier!=this.identifier){b.push(FW_Window._list[a])}}FW_Window._list=b};FW_Window.prototype.location=function(a){this.window.document.location=a;this.document=this.window.document;return true};FW_Window.prototype.scroll_size_x=function(){if(this.window.scrollMaxX!=null){return this.window.scrollMaxX}else{return this.document.body.scrollWidth-this.document.body.clientWidth}};FW_Window.prototype.scroll_size_y=function(){if(this.window.scrollMaxY!=null){return this.window.scrollMaxY}else{return this.document.body.scrollHeight-this.document.body.clientHeight}};FW_Window.prototype.loaded=function(){if(this.closed==true){return false}Logger.srt(this,"loaded");this.document=this.window.document;(this._loaded==true)?(this._event_on_refresh()):(this._event_on_load());this._install_hooks();this._loaded=true;if(this._layer){this._layer.show()}Logger.end()};FW_Window.prototype._fix_ff_bug=function(){try{clearTimeout(_fw_window_timeout)}catch(a){}};FW_Window.prototype._event_onload=function(){};FW_Window.prototype._event_onunload=function(){};FW_Window.prototype._event_onclose=function(){this._created=false;this._loaded=false;if(this._true(this.refreshparentonclose)){refresh_window()}this._remove_from_registry()};FW_Window.prototype._event_on_refresh=function(a){this.document=this.window.document;if(this._loading_div!=null){this._loading_div.style.display="none";this._iframe.style.width="100%";this._iframe.style.height="100%"}if(this._layer&&this._layer.maximised==true){return}if(this._true(this.autosizeonrefresh)){this.size_by_content()}if(this._true(this.autocenteronrefresh)){this.center()}};FW_Window.prototype._get_doc_title=function(){var b="&nbsp;";try{b=this.window.document.title}catch(a){}return b};function FW_Window_Standard(a){this.type="standard";this._init_args(a)}FW_Window_Standard.prototype=new FW_Window();FW_Window_Standard.prototype.open=function(a){Logger.srt(this,"open");this.init(a);this._loaded=false;if(this.autocenter==true){this.left=(screen.width/2)-(this.width/2);this.top=(screen.height/2)-(this.height/2)}var d="";for(var c=0;c<this.option_list.length;c++){var g=this[this.option_list[c]];var b=this.option_list[c];if(b=="close"){g=this["can_close"]}if(g!=null){if(g==true){g="yes"}else{if(g==false){g="no"}}d+=b+"="+g+","}}this.window=window.open(this.url,this.identifier,d);this.document=this.window.document;this._created=true;this.closed=false;Logger.end();return true};FW_Window_Standard.prototype.focus=function(a){this.window.focus();return true};FW_Window_Standard.prototype.get_width=function(a){if(this.window.innerWidth!=null){return this.window.innerWidth}else{return document.body.offsetWidth}};FW_Window_Standard.prototype.get_height=function(a){if(this.window.innerHeight!=null){return this.window.innerHeight}else{return document.body.offsetHeight}};FW_Window_Standard.prototype._event_on_load=function(a){if(this.autosize){this.size_by_content()}if(this.autocenter){this.center()}if(this.onload!=null){var b;if(this.onload_scope!=null){b=this.onload_scope}else{b=this}this.onload.call(b)}this.document=this.window.document};FW_Window_Standard.prototype.move_to=function(a,b){this.window.moveTo(a,b)};FW_Window_Standard.prototype._center_x=function(){var a;var c=FW_Browser.view_port_left();var b=FW_Browser.view_port_right()-c;if(this.window.innerWidth){a=this.window.innerWidth}else{a=this.document.body.clientWidth}return((screen.width/2)-(a/2))};FW_Window_Standard.prototype._center_y=function(){var a;var c=FW_Browser.view_port_top();var b=FW_Browser.view_port_bottom()-c;if(this.window.innerHeight){a=this.window.innerHeight}else{a=this.document.body.clientHeight}return((screen.height/2)-(a/2))};FW_Window_Standard.prototype.center=function(){this.window.moveTo(this._center_x(),this._center_y())};FW_Window_Standard.prototype._install_hooks=function(){this.window.onclose=_fw_window_close_hook};FW_Window_Standard.prototype.resize_to=function(b,a){this.window.resizeTo(b,a);this.width=b;this.height=a};FW_Window_Standard.prototype.size_by_content=function(){var d=this.window;var h=this.window.document.getElementById("Content");if(h){var c=new Array(this.window.document.getElementById("Content"),this.window.document.getElementById("Header"),this.window.document.getElementById("Footer"));var l=0;var a=0;for(var g=0;g<c.length;g++){if(c[g]==null){continue}l=parseInt(l)+FW_Element.height(c[g]);if(g==0){a=parseInt(a)+FW_Element.width(c[g])}}l=parseInt(l)+90;a=parseInt(a)+55;this.resize_to(a,l)}else{var k=50;var b=50;this.resize_to(b,k);var j=0;var l=k;var a=b;while(this.scroll_size_y()>0){l+=parseInt(this.scroll_size_y());this.resize_to(a,l);if(j>100){break}j++}j=0;while(this.scroll_size_x()>0){a+=parseInt(this.scroll_size_x());this.resize_to(a,l);if(j>100){break}j++}}};function FW_Window_Virtual(a){this.type="virtual";this.ghosting=false;this.ghosttype="shadow";this._init_args(a)}FW_Window_Virtual._window_overlay=null;FW_Window_Virtual.prototype=new FW_Window();FW_Window_Virtual.prototype.focus=function(a){this._layer.bring_to_top();return true};FW_Window_Virtual.prototype.close=function(a){if(this.closed){return false}this._event_onclose();if(this.effect_close){var b=this;this.effect_close.oncomplete=function(){(b.destroyonclose)?(b.destroy()):(b.hide());b.effect_close.oncomplete=null};this._call_effect(this.effect_close)}else{(this.destroyonclose)?(this.destroy(a)):(this.hide())}this.closed=true;return true};FW_Window_Virtual.prototype.hide=function(){this._destroy_overlay();this._layer.hide();if(this._iframe){this._iframe.style.display="none"}};FW_Window_Virtual.prototype.show=function(){if(this.modal){this._create_overlay()}this._layer.show();if(this._iframe){this._iframe.style.display=""}this.closed=false};FW_Window_Virtual.prototype.get_document=function(){try{var b=this.document.body;return this.document}catch(a){return null}};FW_Window_Virtual.prototype.destroy=function(a){var c=FW_Browser.window_scroll();var b=document.createElement("INPUT");document.body.insertBefore(b,document.body.childNodes[0]);b.focus();var g=this.get_document();if(g){g.open();g.writeln("")}this._loaded=false;this._remove_from_registry();this._created=false;if(this._iframe){FW_Element.remove(this._iframe)}this._layer=this._layer.destroy();this._window_element=null;var d=new Array("nw","n","ne","e","w","sw","s","se","title","content","top","bottom","status","iframe");for(i in d){this["_"+d[i]]=null}this._destroy_overlay();FW_Element.remove(b);FW_Browser.window_scroll(c.top,c.left)};FW_Window_Virtual.prototype.maximise=function(a){if(this._layer.maximised==false){this._layer.maximise()}else{this._layer.restore()}return true};FW_Window_Virtual.prototype.dbl_click=function(a){if(this._true(this.resizable)){this.maximise()}};FW_Window_Virtual.prototype.minimise=function(a){if(this.taskbar==null){return false}var b=document.createElement("DIV");this._window_icon=b;b.className="FW_WindowIcon";b.innerHTML=this.title;b.FW_Window._count=this.identifier;b.onclick=_fw_window_icon_click_hook;this.taskbar.appendChild(b);this._layer.hide();return true};FW_Window_Virtual.prototype.resize_to=function(b,a){this._layer.resize_to(b,a);this.width=b;this.height=a};FW_Window_Virtual.prototype.writeln=function(a){if(this._iframe){this._iframe.contentWindow.document.writeln(a)}else{this._content.innerHTML=this._content.innerHTML+a}};FW_Window_Virtual.prototype.size_by_content=function(){var a=this.document.getElementById("Page");sizer=(a==null)?(this.document.body):(a);this.resize_to(FW_Element.width(sizer)+28,FW_Element.height(sizer));return true};FW_Window_Virtual.prototype._event_onclose=function(){Logger.srt(this,"_event_onclose");var a=true;if(this._loaded==true&&!this.external){var b=this.get_document();if(this._loaded==true&&!this.external&&this.destroyonclose&&b&&b.body.onunload){Logger.msg("onunload defined and is ie");var c=b.body.onunload.call(this.window);if(c==false){Logger.msg("onunload returned false");Logger.end();a=false}}}if(this._true(this.refreshparentonclose)){refresh_window()}Logger.end();return a};FW_Window_Virtual.prototype.center=function(){this._layer.center()};FW_Window_Virtual.prototype.move_to=function(a,b){this._layer.move_to(a,b)};FW_Window_Virtual.prototype.reload=function(){if(this._iframe!=null){this.window.location.replace(this.window.location)}if(this._loading_div!=null){this._loading_div.style.display="";this._iframe.style.width="1px";this._iframe.style.height="1px"}};FW_Window_Virtual.prototype.open=function(a){Logger.srt(this,"open");if(this._created==true){Logger.msg("Already created");if(this.closed==true){Logger.msg("Closed, redisplaying");this.show();if(!this.reloadonopen){this._event_on_load()}}else{Logger.msg("Open, focusing");this.focus()}if(this.reloadonopen){this.reload()}Logger.end();return false}Logger.msg("initialising");this.init(a);if(this.theme){this._base_class="Window_"+this.theme}else{this._base_class="Window"}if(this.modal){this._create_overlay()}var h=this.identifier;var c=this._base_class;var b=document.createElement("DIV");b.style.left=parseInt(this.left)+"px";b.style.top=parseInt(this.top)+"px";b.style.height=parseInt(this.height)+"px";b.style.width=parseInt(this.width)+"px";b.style.display="inline";b.className=this._base_class;if(this.name!=null){b.className+=" FW_Window"+this.name}this._window_element=b;if(this.showloading==false){this._window_element.style.display="none"}var g="<td class='"+c+"_se' id='"+h+"_se'></td>";if(this.resizable){g="<td class='"+c+"_sizer' id='"+h+"_sizer'></td>"}var d="";b.innerHTML="      <table cellpadding='0' cellspacing='0' height='1' id='"+h+"_top' class='"+c+"_top'>        <tr>          <td class='"+c+"_nw' id='"+h+"_nw'></td>          <td class='"+c+"_n'  id='"+h+"_n'><div id='"+h+"_title' class='"+c+"_title'>"+this.title+"</div></td>          <td class='"+c+"_ne' id='"+h+"_ne'></td>        </tr>      </table>      <table cellpadding='0' cellspacing='0' id='"+h+"_middle' style='height: 100%' width='100%' class='"+c+"_middle'>        <tr>          <td class='"+c+"_w' id='"+h+"_w'></td>  		  <td id='"+h+"_content' class='"+c+"_content' style='padding: 0px;  height: 100%; margin: 0px; vertical-align: top;'>"+d+"</td>          <td class='"+c+"_e' id='"+h+"_e'></td>        </tr>      </table>        <table cellpadding='0' cellspacing='0' id='"+h+"_button' width='100%' height='1' class='"+c+"_bottom'>        <tr>          <td class='"+c+"_sw' id='"+h+"_sw'></td>          <td class='"+c+"_s' id='"+h+"_s'><div id='"+h+"_status' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>		  "+g+"        </tr>      </table>    ";Logger.msg("appending element");document.body.appendChild(b);Logger.msg("appended element");this._content=$(h+"_content");this._top=$(h+"_top");this._bottom=$(h+"_bottom");this._title=$(h+"_title");this._status=$(h+"_status");this._title.identifier=this.identifier;this._title.ondblclick=_fw_window_dbl_click_hook;if(this.titlebar==false){this._top.style.display="none"}if(this.statusbar==false){this._status.style.display="none"}this._positions=new Array("nw","n","ne","e","w","sw","s","se");for(i in this._positions){this["_"+this._positions[i]]=$(h+"_"+this._positions[i])}this._se=(this.resizable)?$(h+"_sizer"):$(h+"_se");if(this.url&&this.showloadingscreen){Logger.msg("showing loading screen ");this._loading_div=document.createElement("DIV");this._loading_div.className=this._base_class+"_loading";this._content.appendChild(this._loading_div)}Logger.msg("tagging as layer");this._layer=new FW_Layer({element:this._window_element,resize_elements:new Array([this._nw,FW_Layer.RESIZE_NW],[this._ne,FW_Layer.RESIZE_NE],[this._e,FW_Layer.RESIZE_E],[this._w,FW_Layer.RESIZE_W],[this._sw,FW_Layer.RESIZE_SW],[this._se,FW_Layer.RESIZE_SE]),drag_elements:(this.moveable?new Array(this._title,this._s):""),selected_class_name:this._base_class+"Selected",min_width:this.min_width,float_type:"absolute",ghosting:this.ghosting,ghosttype:this.ghosttype,min_height:this.min_height});this._layer.identifier=this.identifier;this._layer.add_event("resizestart",FW_Window_Virtual._event_resize_start);this._layer.add_event("resizeend",FW_Window_Virtual._event_resize_end);this._layer.add_event("dragstart",FW_Window_Virtual._event_drag_start);this._layer.add_event("dragend",FW_Window_Virtual._event_drag_end);bottom_bar_height=(this._bottom==null)?(0):(this._bottom.offsetHeight);top_bar_height=(this._top==null)?(0):(this._top.offsetHeight);if(bottom_bar_height||top_bar_height){this._layer.resize_to(parseInt(this.width)+5,parseInt(this.height)+parseInt(top_bar_height+bottom_bar_height))}if(this.url){Logger.msg("creating iframe");this._create_iframe()}if(this.autocenter){this.center()}if(this.showloading){this._call_effect(this.effect_open)}this._create_buttons();this._created=true;this.closed=false;if(this.external){this.loaded();this.set_title("&nbsp;")}Logger.end();return true};FW_Window_Virtual.prototype.get_height=function(){this.bottom_bar_height=(this._bottom==null)?(0):(this._bottom.offsetHeight);this.top_bar_height=(this._top==null)?(0):(this._top.offsetHeight);this.content_height=(this._top==null)?(0):(this._content.offsetHeight);return this.bottom_bar_height+this.top_bar_height+this.content_height};FW_Window_Virtual.prototype.get_width=function(){this.bottom_bar_width=(this._bottom==null)?(0):(this._bottom.offsetWidth);this.top_bar_width=(this._top==null)?(0):(this._top.offsetWidth);this.content_width=(this._top==null)?(0):(this._content.offsetWidth);return this.bottom_bar_width+this.top_bar_width+this.content_width};FW_Window.prototype.is_type=function(a){var b=this._get_doc_title();if(b!=null&&b.search(a)>-1){return true}else{return false}};FW_Window_Virtual._event_resize_start=function(b){var a=FW_Window.get(this.identifier);if(a.is_type("pdf")){return true}if(a&&a._iframe){a._iframe.style.display="none"}};FW_Window_Virtual._event_resize_end=function(b){var a=FW_Window.get(this.identifier);if(a.is_type("pdf")){return true}if(a&&a._iframe){a._iframe.style.display=""}};FW_Window_Virtual._event_drag_start=function(b){var a=FW_Window.get(this.identifier);if(a.is_type("pdf")){return true}if(a&&a._iframe){a._iframe.style.display="none"}};FW_Window_Virtual._event_drag_end=function(b){var a=FW_Window.get(this.identifier);if(a.is_type("pdf")){return true}if(a&&a._iframe){a._iframe.style.display=""}};FW_Window_Virtual.prototype._call_effect=function(a){if(a!=null){a.element=this._window_element;a.apply()}};FW_Window_Virtual.prototype._create_iframe=function(){var b=document.createElement("IFRAME");b.frameBorder=0;b.height="100%";b.width="100%";b.style.margin="0px";b.style.padding="0px";b.style.border="0px";b.name=this.identifier;this._iframe=b;if(!(this._true(this.scrollbars))){b.scrolling="no"}if(this._loading_div!=null){b.style.height="1px";b.style.width="1px"}else{b.style.height="100%";b.style.width="100%"}b.src=this.url;this._content.appendChild(b);var a=((b.contentWindow)?(b.contentWindow):(b));a.name=this.identifier;this.window=a};FW_Window_Virtual.prototype._create_buttons=function(b){if(this.can_close){var a=document.createElement("DIV");a.className=this._base_class+"_close";a.identifier=this.identifier;a.onclick=_fw_window_close_hook;this._title.parentNode.appendChild(a)}if(this.minimizable&&!this.modal){var c=document.createElement("DIV");c.className=this._base_class+"_minimize";c.identifier=this.identifier;c.onclick=_fw_window_minimise_hook;this._title.parentNode.appendChild(c)}if(this.resizable){var d=document.createElement("DIV");d.className=this._base_class+"_maximize";d.identifier=this.identifier;d.onclick=_fw_window_maximise_hook;this._title.parentNode.appendChild(d)}};FW_Window_Virtual.prototype._icon_click=function(a){FW_Element.remove(this._window_icon);this._layer.show()};FW_Window_Virtual.prototype.set_title=function(a){if(this._title!=null){this._title.innerHTML=a;this.title=a}};FW_Window_Virtual.prototype._reset_scroll=function(){try{FW_Browser.window_scroll_top(0,this.window);FW_Browser.window_scroll_left(0,this.window)}catch(a){}};FW_Window_Virtual.prototype._event_on_load=function(a){Logger.srt(this,"_event_on_load");this.document=this._iframe.contentWindow.document;this.set_title(this._get_doc_title());this.window=this._iframe.contentWindow;this._iframe.style.display="";if(!this.showloading){this._window_element.style.display="";this._call_effect(this.effect_open);this._layer.check_boundary()}if(this._layer.maximised==false){if(this.autosize){this.size_by_content()}if(this.autocenter){this._layer.center()}}if(this._loading_div!=null){this._loading_div.style.display="none";this._iframe.style.width="100%";this._iframe.style.height="100%"}this._reset_scroll();this._layer.enforce_boundary=false;if(this.onload!=null){var b;if(this.onload_scope!=null){b=this.onload_scope}else{b=this}this.onload.call(b)}this._loaded=true;Logger.end()};FW_Window_Virtual.prototype._install_hooks=function(){this.window.w_opener=window;this.window.opener=window;this.window.close=_fw_window_close_hook};FW_Window_Virtual.prototype._create_overlay=function(){if(FW_Window_Virtual._window_overlay!=null){return false}var a=document.createElement("DIV");document.body.appendChild(a);a.style.position="absolute";a.style.top=FW_Browser.view_port_top()+"px";a.style.left=FW_Browser.view_port_left()+"px";a.style.width=(FW_Browser.view_port_right()-FW_Browser.view_port_left())+"px";a.style.height=(FW_Browser.view_port_bottom()-FW_Browser.view_port_top())+"px";a.style.zIndex=999;a.className=this._base_class+"_overlay";a.innerHTML="&nbsp";a.id="_fw_window_overlay";if(this.taskbar!=null){this.taskbar.style.zIndex=FW_Layer.base_zindex-1}FW_Window_Virtual._window_overlay=a;return true};FW_Window_Virtual.prototype._destroy_overlay=function(){if(FW_Window_Virtual._window_overlay!=null){FW_Element.remove(FW_Window_Virtual._window_overlay);FW_Window_Virtual._window_overlay=null}return true};FW_Window.get=function(a){for(var b=0;b<FW_Window._list.length;b++){if(FW_Window._list[b].identifier==a){return FW_Window._list[b]}}return null};FW_Window.me=function(){var a;if(window.opener!=null){a=window.opener}else{a=window.parent}if(a){return a.FW_Window.get(window.name)}};function _fw_window_get_window(a){for(var b=0;b<FW_Window._list.length;b++){if(FW_Window._list[b].identifier==a){return FW_Window._list[b]}}return null}function _fw_window_close_hook(b){var c=(this.identifier?this.identifier:this.name);var a=FW_Window.get(c);if(a){a.close(b)}return false}function _fw_window_maximise_hook(a){FW_Window.get(this.identifier).maximise(a);return false}function _fw_window_minimise_hook(a){FW_Window.get(this.identifier).minimise(a);return false}function _fw_window_dbl_click_hook(a){FW_Window.get(this.identifier).dbl_click(a)}function _fw_window_icon_click_hook(a){FW_Window.get(this.identifier)._icon_click(a)}function _fw_window_onunload(c){for(var b=0;b<FW_Window._list.length;b++){var a=FW_Window._list[b];a.destroy()}return true}function _fw_window_document_onmouseup(b){try{for(var a=0;a<FW_Window._list.length;a++){if(FW_Window._list[a].closeonblur==true&&FW_Window._list[a]._loaded==true&&FW_Window._list[a].type=="virtual"){if(FW_Window._list[a]._layer._event_type==null){FW_Window._list[a].close()}}}}catch(b){}return true}function _fw_window_document_onresize(a){if(FW_Window_Virtual._window_overlay!=null){var b=FW_Window_Virtual._window_overlay;b.style.top=FW_Browser.view_port_top()+"px";b.style.width=(FW_Browser.view_port_right())+"px";b.style.height=(FW_Browser.view_port_bottom())+"px"}return true}EventHandler.addEvent(document,"mousedown",_fw_window_document_onmouseup);EventHandler.addEvent(window,"resize",_fw_window_document_onresize);EventHandler.addEvent(window,"scroll",_fw_window_document_onresize);function FW_Layer(a){this.EVENT_TYPE_RESIZE=1;this.EVENT_TYPE_DRAG=2;this.STATE_ORIGINAL=1;this.STATE_FLOATING=2;this.maximised=false;this.minimised=false;this.min_width=1;this.min_height=1;this.enforce_boundary=true;this.fit_to_boundary=true;this.remember_position=false;this.drag_elements=new Array();this.resize_elements=new Array();this.auto_zindex=true;this.cursor_move="move";this.x=null;this.y=null;this.boundary=null;this.allow_restore=false;this.float_type="original";this.selected_class_name=null;this.ghosting=true;this.ghosttype="duplicate";this.revert=false;this.x_offset=0;this.y_offset=0;this._iframe_shown=true;if(a){this._init_args(a)}if(this.drag_element){this.drag_elements.push(this.drag_element)}if(this.resize_element){this.resize_elements.push(this.resize_element)}this._layer_identifier=FW_Layer._id;FW_Layer._id++;FW_Layer._list.push(this);this._event_list=new Array();this.init();return true}FW_Layer.cookie=null;FW_Layer.RESIZE_NW=1;FW_Layer.RESIZE_N=2;FW_Layer.RESIZE_NE=3;FW_Layer.RESIZE_E=4;FW_Layer.RESIZE_W=5;FW_Layer.RESIZE_SW=6;FW_Layer.RESIZE_S=7;FW_Layer.RESIZE_SE=8;FW_Layer.base_zindex=1000;FW_Layer._list=new Array();FW_Layer._id=0;FW_Layer._focused_obj=null;FW_Layer._added_onmove=0;FW_Layer._added_events=0;FW_Layer.prototype=new FW;FW_Layer.prototype._get_top_zindex=function(){var a=FW_Layer._list.length;var c=FW_Layer.base_zindex;while(a--){var b=FW_Layer._list[a].zindex();if(b>c){c=b}}return c};FW_Layer.prototype.zindex=function(a){if(a==null){return this.element.style.zIndex}else{this.element.style.zIndex=a}};FW_Layer.prototype.init=function(a){this._init_element(this.element,this.position_on_init);this.element._fw_layer_identifier=this._layer_identifier;EventHandler.addEvent("click",this.element.onclick,_fw_layer_mouse_click_hook);if(this.auto_zindex){this.zindex(parseInt(this._get_top_zindex())+1)}for(var b=0;b<this.drag_elements.length;b++){var c=this.drag_elements[b];this.add_drag(c)}for(var b=0;b<this.resize_elements.length;b++){var c=this.resize_elements[b];if(FW.is_array(c)){this.add_resize(c[0],c[1])}else{this.add_resize(c,FW_Layer.RESIZE_SE)}}if(FW_Layer._added_events==0){EventHandler.addEvent(document,"mouseup",_fw_layer_event_mouse_up);EventHandler.addEvent(window,"unload",_fw_layer_event_document_unload);EventHandler.addEvent(window,"scroll",_fw_layer_event_document_scroll);EventHandler.addEvent(window,"resize",_fw_layer_event_document_scroll);FW_Layer._added_events=1}if(this.x&&this.y){this.move_to(this.x,this.y)}if(this.remember_position&&this.name!=null){this.cookie_key=this.name;if(FW_Layer.cookie==null){FW_Layer.cookie=new Cookie({name:"FW_Layer",logger:this.logger,log_level:0})}this.cookie=FW_Layer.cookie;this.load_state()}this._get_coords();return true};FW_Layer.prototype._remove_from_registry=function(){var a=new Array();for(var b=0;b<FW_Layer._list.length;b++){if(FW_Layer._list[b]._layer_identifier!=this._layer_identifier){a.push(FW_Layer._list[b])}}FW_Layer._list=a};FW_Layer.prototype.call_event=function(c){for(var a=0;a<this._event_list.length;a++){if(this._event_list[a].event==c){var b=(this._event_list[a].scope)?(this._event_list[a].scope):(this);return this._event_list[a].func.call(b)}}return true};FW_Layer.prototype.add_event=function(c,b,a){this._event_list.push({event:c,func:b,scope:a})};FW_Layer.prototype.add_resize=function(a,b){a._fw_layer_identifier=this._layer_identifier;a._fw_resize_direction=b;a.onmousedown=_fw_layer_resize_mouse_down_hook};FW_Layer.prototype.add_drag=function(a){a._fw_layer_identifier=this._layer_identifier;a.onmousedown=_fw_layer_drag_mouse_down_hook;a.style.cursor=this.cursor_move;if(this.allow_restore){a.ondblclick=_fw_layer_drag_mouse_dbl_click_hook}if(FW_Layer._added_onmove==0){_fw_layer_addEvent(document,"mousemove",_fw_layer_event_mouse_move,false);FW_Layer._added_onmove=1}};FW_Layer.prototype.destroy=function(){this._remove_from_registry();for(var a=0;a<this.resize_elements.length;a++){var b=this.resize_elements[a];b.onmousedown=null;b.onmouseout=null;b.ondblclick=null;this.resize_elements[a]=null}for(var a=0;a<this.drag_elements.length;a++){var b=this.drag_elements[a];b.onmousedown=null;b.onmouseout=null;b.ondblclick=null;this.drag_elements[a]=null}this.resize_elements=null;this.drag_elements=null;this.element.onclick=null;FW_Element.remove(this.element);this.element=null;return null};FW_Layer.prototype._prevent_select=function(){document.body.onselectstart=function(a){if(a==null){a=event}event.returnValue=false;return false}};FW_Layer.prototype._enable_select=function(){document.body.onselectstart=null};FW_Layer.prototype._record_coords=function(a){this._orig_mouse_x=a.x||a.clientX;this._orig_mouse_y=a.y||a.clientY;this._orig_x=this.x;this._orig_y=this.y;this._orig_width=this.width;this._orig_height=this.height};FW_Layer.prototype._get_event=function(a){if(a==null){a=event}return a};FW_Layer.prototype._event_mouse_up=function(){if(this._event_type==this.EVENT_TYPE_RESIZE){this._event_resize_mouse_up()}else{if(this._event_type==this.EVENT_TYPE_DRAG){this._event_drag_mouse_up()}}return true};FW_Layer.prototype._event_mouse_click=function(){if(this.auto_zindex){this.bring_to_top()}return true};FW_Layer.prototype._event_drag_mouse_dbl_click=function(a){this._restore_element();return true};FW_Layer.prototype._event_resize_mouse_down=function(b,a){if(this.maximised){return false}b=this._get_event(b);this._init_element(this.element,false);this._event_type=this.EVENT_TYPE_RESIZE;this._event_direction=a;this._prevent_select();this._record_coords(b);if(this.auto_zindex){this.bring_to_top()}FW_Layer._focused_obj=this;this.call_event("resizestart");if(this.ghosting){this._record_coords(b);this._orig_element=this.element;if(this.ghosttype=="duplicate"){this.element=this.element.cloneNode(true);FW_Element.opacity(this.element,80)}else{this.element=document.createElement("DIV");this.element.style.width=this.width+"px";this.element.style.height=this.height+"px";this.element.style.border="1px black dotted"}document.body.appendChild(this.element);this._init_element(this.element,true,this._orig_element);this.element.style.zIndex=this.element.style.zIndex+1}return false};FW_Layer.prototype._event_drag_mouse_down=function(b){if(this.maximised){return false}b=this._get_event(b);var c;if(b.target){c=b.target}else{if(b.srcElement){c=b.srcElement}}if(this.element_drag!=null){if((c.nodeName=="INPUT"&&this.element_drag.nodeName!="INPUT")||(c.nodeName=="IMG"&&this.element_drag.nodeName!="IMG")){return false}}var a=((this.ghosting)?(false):(true));this._get_coords();this._record_coords(b);this._init_element(this.element,a);this._event_type=this.EVENT_TYPE_DRAG;this._prevent_select();if(this.auto_zindex){this.bring_to_top()}this.call_event("dragstart");FW_Layer._focused_obj=this;if(this.ghosting){this._record_coords(b);if(this.ghosttype=="duplicate"){this.element_move=this.element.cloneNode(true)}else{this.element_move=document.createElement("DIV");this.element_move.style.width=this.width+"px";this.element_move.style.height=this.height+"px";this.element_move.style.backgroundColor="silver"}this._init_element(this.element_move,true);this.element_move.style.zIndex=this.element.style.zIndex+1;FW_Element.opacity(this.element_move,80);document.body.appendChild(this.element_move)}return false};FW_Layer.prototype._event_resize_mouse_up=function(d){this.store_state();this._event_reset();this.call_event("resizeend");if(this.ghosting){var b=this.element;this.element=this._orig_element;var c=FW_Element.width(b,true);var a=FW_Element.height(b,true);this.resize_to(c,a);FW_Element.remove(b);b=null}return true};FW_Layer.prototype._event_drag_mouse_up=function(){this.store_state();this._event_reset();this._get_coords();var c=FW_LayerDropManager.fire(this);if(this.ghosting&&this.element_move){var b=this.element_move;this.element_move=null;if(!this.revert){var a=FW_Element.left(b,true);var g=FW_Element.top(b,true);this._init_element(this.element);this.move_to(a,g)}if(!c){if(FW.effects_enabled){var d=new FW_Effect_Opacity({start:100,end:0});d.element=b;d.oncomplete=function(){FW_Element.remove(this.element)};d.apply()}else{FW_Element.remove(b)}}else{FW_Element.remove(b)}b=null}this.call_event("dragend");return true};FW_Layer.prototype._event_mouse_move=function(b,a){if(this.maximised==true){return true}if(this._event_type==this.EVENT_TYPE_DRAG){this._layer_move(b,a);FW_LayerDropManager.trigger([b,a],this)}if(this._event_type==this.EVENT_TYPE_RESIZE){this._layer_resize(b,a)}return true};FW_Layer.prototype._restore_element=function(a){this.state=this.STATE_ORIGINAL;this.clear_state();this.element.style.position="";this._get_coords();this.element.style.left=this.x;this.element.style.top=this.y;this.move_to(this.x,this.y)};FW_Layer.prototype._update_fixed=function(){this.x_offset=this.scrolled_x();this.y_offset=this.scrolled_y();return true};FW_Layer.prototype.clear_state=function(){this.x=null;this.y=null;this.store_state()};FW_Layer.prototype._init_element=function(c,b,a){if(c.style.position!="absolute"&&c.style.position!="fixed"&&b!=false){this.start_scroll_y=this.scrolled_y();if(this.float_type=="fixed"){if(FW_Browser.IE&&FW_Browser.version<7){this._get_coords(a);c.style.position="absolute"}else{this._get_coords(a);this.y=parseInt(this.y)-parseInt(this.start_scroll_y);c.style.position="fixed";this.move_to(this.x,this.y)}}else{this._get_coords(a);c.style.position="absolute";this.move_to(this.x,this.y)}this.state=this.STATE_FLOATING;this.end_scroll_y=this.scrolled_y();while(this.end_scroll_y<this.start_scroll_y){this.y=parseInt(this.y)-(parseInt(this.start_scroll_y)-parseInt(this.end_scroll_y));this.start_scroll_y=this.scrolled_y();this.move_to(this.x,this.y);this.end_scroll_y=this.scrolled_y()}}};FW_Layer.prototype._layer_move=function(a,g){var d=parseInt(this._orig_x)+(a-parseInt(this._orig_mouse_x));var c=parseInt(this._orig_y)+(g-parseInt(this._orig_mouse_y));var b=this.call_event("layermove");if(!b){return false}this.move_to(d,c,this.prevent_move_update);this.prevent_move_update=false;return true};FW_Layer.prototype._layer_resize=function(j,h){var c=this._orig_width+(j-parseInt(this._orig_mouse_x));var k=this._orig_height+(h-parseInt(this._orig_mouse_y));var b={};b[FW_Layer.RESIZE_SE]=[1,1];b[FW_Layer.RESIZE_SW]=[-1,1];b[FW_Layer.RESIZE_E]=[1,0];b[FW_Layer.RESIZE_W]=[-1,0];b[FW_Layer.RESIZE_NW]=[-1,-1];b[FW_Layer.RESIZE_NE]=[1,-1];var a=b[this._event_direction][0];var l=b[this._event_direction][1];var c,k,g,d;if(a==1){c=this._orig_width+(j-parseInt(this._orig_mouse_x))}else{if(a==-1){c=this._orig_width-(j-parseInt(this._orig_mouse_x));g=this._orig_x-(parseInt(this._orig_mouse_x)-j)}}if(l==1){k=this._orig_height+(h-parseInt(this._orig_mouse_y))}else{if(l==-1){k=this._orig_height-(h-parseInt(this._orig_mouse_y));d=this._orig_y-(parseInt(this._orig_mouse_y)-h)}}if(a&&c!=null&&this.resize_to(c)){this.move_to(g)}if(l&&k!=null&&this.resize_to(null,k)){this.move_to(null,d)}};FW_Layer.prototype._event_reset=function(){FW_Layer._focused_obj=null;this._event_type=null;this._enable_select()};FW_Layer.prototype.maximise=function(){this._on_maximised_coords=[this.x,this.y,this.width,this.height];this.move_to(1,1);var b=FW_Browser.view_port_right()-FW_Browser.view_port_left();var a=FW_Browser.view_port_bottom()-FW_Browser.view_port_top();this._ignore_resize_checks=true;this.resize_to(b*0.99,a*0.99);this._ignore_resize_checks=false;this.maximised=true;return true};FW_Layer.prototype.restore=function(){this.resize_to(this._on_maximised_coords[2],this._on_maximised_coords[3]);this.move_to(this._on_maximised_coords[0],this._on_maximised_coords[1]);this.maximised=false;return true};FW_Layer.prototype.hide=function(){this.element.style.display="none"};FW_Layer.prototype.show=function(){this.element.style.display="block";this.check_size();this.check_boundary()};FW_Layer.prototype.store_state=function(){if(this.cookie!=null){var b=new CookieParams({logger:this.logger,rec_sep:"&",val_sep:"@",logger_level:-1});b.set_param("x",this.x);b.set_param("y",this.y);var a=new CookieParams({data:this.cookie.value,logger:this.logger,logger_level:-1});if(this.x==null&&this.y==null){a.delete_param(this.cookie_key)}else{a.set_param(this.cookie_key,b.get_data())}this.cookie.value=a.get_data();this.cookie.update()}};FW_Layer.prototype.load_state=function(){if(this.cookie!=null){var a=new CookieParams({data:this.cookie.value,logger:this.logger,logger_level:-1});var c=a.get_param(this.cookie_key);if(c!=null){var b=new CookieParams({data:c,rec_sep:"&",val_sep:"@",logger:this.logger,logger_level:-1});if(b.get_param("x")!="null"&&b.get_param("x")!=null){this._init_element();this.move_to(b.get_param("x"),b.get_param("y"));return true}}}return false};FW_Layer.prototype._get_coords=function(a){var a=(a!=null)?(a):(this.element);this.x=FW_Element.left(a,true);this.y=FW_Element.top(a,true);this.width=a.offsetWidth;this.height=a.offsetHeight};FW_Layer.prototype.check_boundary=function(){if(this.enforce_boundary==false){return false}this._get_coords();var a=this._check_boundary_x(this.x);var b=this._check_boundary_y(this.y);if(a!=this.x){this.move_to(a)}if(b!=this.y){this.move_to(null,b)}};FW_Layer.prototype._check_boundary_y=function(h){if(this.enforce_boundary==false){return h}var g=h;var d=0;if(this.boundary!=null){if(this.boundary[1]==null){return this.y}else{d=this.boundary[1][0]}}var b=h;if(d==null){return h}if(b<=d){return d}var a=parseInt(h)+parseInt(this.height);var c=(this.boundary==null)?(FW_Browser.view_port_bottom()):(this.boundary[1][1]);if(a>c){h=parseInt(c)-parseInt(this.height)}if(h<0){return 0}return h};FW_Layer.prototype._check_boundary_x=function(a){if(this.enforce_boundary==false){return a}var b=0;if(this.boundary!=null){if(this.boundary[0]==null){return this.x}else{b=this.boundary[0][0]}}var c=a;if(c<=b){return b}var g=parseInt(a)+parseInt(this.width);var d=(this.boundary==null)?(FW_Browser.view_port_right()):(this.boundary[0][1]);if(parseInt(g)>parseInt(d)){a=parseInt(d)-parseInt(this.width)}return a};FW_Layer.prototype.move_to=function(a,d,c){var b=(this.element_move)?(this.element_move):(this.element);if(a!=null){a=this._check_boundary_x(a);if(c!=true){b.style.left=(parseInt(a)+parseInt(this.x_offset))+"px"}this.x=a}if(d!=null){d=this._check_boundary_y(d);if(c!=true){b.style.top=(parseInt(d)+parseInt(this.y_offset))+"px"}this.y=d}return 1};FW_Layer.prototype.center=function(){Logger.srt(this,"center");var a=FW_Browser.view_port_right()-FW_Browser.view_port_left();var b=FW_Browser.view_port_bottom()-FW_Browser.view_port_top();var d=(a/2)-(parseInt(FW_Element.width(this.element))/2);var c=(b/2)-(parseInt(FW_Element.height(this.element))/2);this.move_to(FW_Browser.view_port_left()+d,FW_Browser.view_port_top()+c);Logger.end();return true};FW_Layer.prototype.scrolled_x=function(){var a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollLeft}}}return a};FW_Layer.prototype.scrolled_y=function(){var a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop}}}return a};FW_Layer.prototype.resize_to=function(c,a){var d=(this.element_resize)?(this.element_resize):(this.element);var b=true;if(c!=null){if(c<this.min_width){b=false;c=this.min_width}if(c>0){d.style.width=c+"px";this.width=c}}if(a!=null){if(a<this.min_height){b=false;a=this.min_height}if(a>0){d.style.height=a+"px";this.height=a}}if(this._ignore_resize_checks!=true){this.check_size();this.check_boundary()}return b};FW_Layer.prototype.check_size=function(){if(this.fit_to_boundary==false){return false}this._get_coords();var c=FW_Browser.view_port_right()-FW_Browser.view_port_left();var b=FW_Browser.view_port_bottom()-FW_Browser.view_port_top();var h=parseFloat(c*(90/100));var g=parseFloat(b*(90/100));var d=null;var a=null;if(this.width>h){d=h}if(this.height>g){a=g}if(a||d){this._ignore_resize_checks=true;this.resize_to(d,a);this._ignore_resize_checks=false}};FW_Layer.prototype.resize_by=function(d,a){var g=(this.element_resize)?(this.element_resize):(this.element);if(d){var b=this.width+d;if(b<this.min_width){b=this.min_width}g.style.width=b+"px";this.width=b}if(a){var c=this.height+a;if(c<this.min_height){c=this.min_height}g.style.height=c+"px";this.height=c}this.check_boundary();return 1};FW_Layer.prototype.bring_to_top=function(){var d=FW_Layer._list.length;var c=FW_Layer.base_zindex;var h=new Array();for(var b=0;b<d;b++){if(b==this._layer_identifier){continue}else{h.push(FW_Layer._list[b].zindex())}}h.sort();for(var b=0;b<h.length;b++){for(var a=0;a<d;a++){var g=FW_Layer._list[a].zindex();if(g==h[b]){FW_Layer._list[a].zindex(c);c++}}}this.zindex(c)};function _fw_layer_drag_mouse_down_hook(a){return _fw_layer_get_layer(this._fw_layer_identifier)._event_drag_mouse_down(a)}function _fw_layer_resize_mouse_down_hook(a){_fw_layer_get_layer(this._fw_layer_identifier)._event_resize_mouse_down(a,this._fw_resize_direction)}function _fw_layer_mouse_click_hook(a){_fw_layer_get_layer(this._fw_layer_identifier)._event_mouse_click(a)}function _fw_layer_drag_mouse_dbl_click_hook(a){_fw_layer_get_layer(this._fw_layer_identifier)._event_drag_mouse_dbl_click(a)}function _fw_layer_event_mouse_move(c){if(FW_Layer._focused_obj!=null){if(c==null){c=event}var b=c.x||c.clientX;var a=c.y||c.clientY;FW_Layer._focused_obj._event_mouse_move(b,a)}return true}function _fw_layer_event_mouse_up(a){if(a==null){a=event}if(FW_Layer._focused_obj!=null){FW_Layer._focused_obj._event_mouse_up()}return true}function _fw_layer_event_document_unload(a){FW_Layer._focused_obj=null;_fw_layer_event_mouse_over=null;_fw_layer_event_mouse_up=null;document.onmousemove=null;document.onmouseup=null;return true}function _fw_layer_event_document_scroll(c){if(!(FW_Browser.IE&&FW_Browser.version<7)){return true}var b=FW_Layer._list.length;for(var a=0;a<b;a++){if(FW_Layer._list[a].float_type=="fixed"&&FW_Layer._list[a].state==2){FW_Layer._list[a]._update_fixed();FW_Layer._list[a].move_to(FW_Layer._list[a].x,FW_Layer._list[a].y)}}return true}function _fw_layer_get_layer(a){var b=FW_Layer._list.length;while(b--){if(FW_Layer._list[b]&&FW_Layer._list[b]._layer_identifier==a){return FW_Layer._list[b]}}}function _fw_layer_addEvent(d,c,b,a){if(d.addEventListener){d.addEventListener(c,b,a);return true}else{if(d.attachEvent){return d.attachEvent("on"+c,b)}}}var FW_LayerDropManager={items:[],last_active:null,add:function(a){this.items.push(a)},affected:function(b,a){if(b._accepts(a)&&b._within(this.coords)){return true}},update:function(b,a){return b._event_ondropmove(a)},activate:function(b,a){b.active=true;return b._event_ondropover(a)},deactivate:function(b,a){b.active=false;return b._event_ondropout(a)},drop:function(c,b){if(this.affected(c,b)){var a=c._event_ondrop(b);this.deactivate(c,b);return a}else{return false}},find_deepest:function(a){deepest=a[0];for(var b=1;b<a.length;++b){if(FW_Element.is_parent(a[b].element,deepest.element)){deepest=a[b]}}return deepest},trigger:function(g,c){this.coords=g;if(!this.items.length){return}var d=0;var j=[];for(var b=0,a=this.items.length;b<a;b++){if(this.affected(this.items[b],c)){j.push(this.items[b])}}if(!j.length){if(this.last_active){this.deactivate(this.last_active,c);this.last_active=null}return true}var h=this.find_deepest(j);this.update(h,c);if(this.last_active&&!h.active){this.deactivate(this.last_active,c)}if(h.active==false){this.activate(h,c);this.last_active=h}this.update(h,c);return true},fire:function(d){if(!this.items.length){return false}var b;if(this.last_active){b=this.drop(this.last_active,d)}for(var c=0,a=this.items.length;c<a;c++){this.items[c].reset(d)}if(b!=null){return b}return false}};function FW_LayerDrop(a){this.element;this.accept=null;this.active=false;this.hover_class=null;this._init_args(a);this.init()}FW_LayerDrop._init=false;FW_LayerDrop.prototype=new FW;FW_LayerDrop.prototype.init=function(a){this._init_args(a);FW_LayerDropManager.add(this)};FW_LayerDrop.prototype._acceptor=function(){var a=FW_Layer._focused_obj;if(a&&a._event_type==a.EVENT_TYPE_DRAG){return a}return null};FW_LayerDrop.prototype.reset=function(a){this.left=null};FW_LayerDrop.prototype._within=function(c,b){if(this.left==null){this.left=FW_Element.left(this.element,true);this.top=FW_Element.top(this.element,true);this.height=FW_Element.height(this.element,true);this.width=FW_Element.width(this.element,true)}var a=c[0];var d=c[1];this.overlap=0;if(d>(this.top+parseInt(this.height/2))){this.overlap=1}return(a>=this.left&&a<(this.width+this.left)&&d>=this.top&&d<(this.height+this.top))};FW_LayerDrop.prototype._accepts=function(b){if(b&&b.element.className.search(this.accept)>-1){var a=this.call_event("accept",{obj:this});if(a!=null){return a}return true}return false};FW_LayerDrop.prototype._event_ondropout=function(a){return this.call_event("out",{item:a.element})};FW_LayerDrop.prototype._event_ondropover=function(a){return this.call_event("over",{item:a.element})};FW_LayerDrop.prototype._event_ondropmove=function(a){return this.call_event("move",{item:a.element,overlap:this.overlap})};FW_LayerDrop.prototype._event_ondrop=function(a){this.reset();return this.call_event("drop",{item:a.element})};FW_WidgetRelationship.log_level=31993;FW_WidgetRelationship.debug=false;FW_WidgetRelationship.processing_phrase="Processing...";FW_WidgetRelationship.show_processing=true;FW_WidgetRelationship._objects=new Array();function FW_WidgetRelationship(a){this.log_level=FW_WidgetRelationship.log_level;this.logger=Logger;this.logger.srt(this,"FW_WidgetRelationship",this.log_level);this.default_when_not_found=true;this._init_args(a);this.relations=new Array();this.logger.end()}FW_WidgetRelationship.prototype=new FW;FW_WidgetRelationship.prototype.className="FW_WidgetRelationship";FW_WidgetRelationship.prototype.init=function(b){this.profiler=b.profiler;this.logger.srt(this,"init");this.profiler.start(this,"init");this.relation_id=FW_WidgetRelationship._objects.length;FW_WidgetRelationship._objects.push(this);var a=Framework.get_canvas(this.target.cn,FW.VIEW_MODE_SINGLE);if(a==null){a=Framework.get_canvas(this.target.cn,FW.VIEW_MODE_MULTI)}this.target=a.get_widget(this.target.wn,this.target.rn);if(this.target!=null){this.logger.msg("Target "+a.name+" - "+this.target.name);this.logger.msg("Have target widget ["+this.target.name+"]");this.get_target(this.target)}else{this.logger.error("Couldnt find source widget");this.logger.end();this.profiler.end();return false}this.source=this.source;if(this.source!=null){this.logger.msg("Have source widget ["+this.source.name+"]");this.get_source(this.source)}else{this.logger.error("Couldnt find target widget");this.logger.end();this.profiler.end();return false}this.profiler.end();this.logger.end();return true};FW_WidgetRelationship.get_relation_obj=function(a){return FW_WidgetRelationship._objects[a]};FW_WidgetRelationship.prototype.get_source=function(a){this.source=this.get_wr_element(a);if(this.source!=null){this.source.add_detail_relation(this.relation_id)}};FW_WidgetRelationship.prototype.get_target=function(a){this.profiler.start(this,"get_wr_element_target");this.target=this.get_wr_element(a);this.profiler.end();if(this.target!=null){this.target.add_relation(this.relation_id)}};FW_WidgetRelationship.prototype.get_wr_element=function(b){if(b==null){return null}if(b[0]){console.log(b[0].id)}var c=b.widget_type;var d=b.tag_name();var a=b.element.type;this.logger.srt(this,"get_wr_element",this.log_level);if((d=="INPUT"&&a=="hidden")||d=="SPAN"){var g=new FW_WRElement_TextField(b,this.logger,this.log_level,this.profiler);return g}else{if(c==FW.WIDGET_TYPE_CHECKBOX){var g=new FW_WRElement_CheckBox(b,this.logger,this.log_level,this.profiler);return g}else{if(c==FW.WIDGET_TYPE_RADIO){var g=new FW_WRElement_Radio(elements,this.logger,this.log_level,this.profiler);return g}else{if(c==FW.WIDGET_TYPE_LINK||c==FW.WIDGET_TYPE_LINK_BUTTON||c==FW.WIDGET_TYPE_LINK_IMAGE){var g=new FW_WRElement_Link(b,this.logger,this.log_level,this.profiler);return g}else{if(c==FW.WIDGET_TYPE_TEXTFIELD||c==FW.WIDGET_TYPE_TEXTAREA){var g=new FW_WRElement_TextField(b,this.logger,this.log_level,this.profiler);return g}else{if(c==FW.WIDGET_TYPE_LIST){var g=new FW_WRElement_Select(b,this.logger,this.log_level,this.profiler);return g}else{this.logger.error("Widget = Unsupported");this.logger.end()}}}}}}return null};FW_WidgetRelationship.prototype.add=function(a){this.relations.push(a)};FW_WidgetRelationship.prototype.clear_relation_data=function(){var b=new Array();for(var c=0;c<this.relations.length;c++){if(this.relations[c].type.search("MapDynamic")>-1){b.push(this.relations[c])}}var d=this.target.original_data[0];if(this.target.clear_original_data){this.target.clear_original_data()}if(d&&d.value==""){this.target.original_data=new Array(d)}else{this.target.original_data=new Array()}this.relations=b};FW_WidgetRelationship.prototype.apply_relation=function(d){var j=false;var k=false;var b=false;this.logger.srt(this,"apply_relation",this.log_level);if(this.source==null||this.target==null){return false}this.source.applying(true);if(this.target.applying()==true){this.logger.warn("Target ["+this.target._widget.id+"] is already applying ["+this.target._widget.wr_applying+"]. Cant apply.");this.logger.end();this.source.applying(false);return false}var h=false;var o=false;var n=false;var r=null;var q=null;var m=null;this.logger.msg("Source ["+this.source._widget.id+"] Target ["+this.target._widget.id+"]");var a=this.relations.length;for(var c=0;c<a;c++){if(this.relations[c].type=="FW_DataMap"||this.relations[c].type=="FW_DataMapDynamic"){h=true}if(this.relations[c].type=="FW_AccessMap"||this.relations[c].type=="FW_AccessMapDynamic"){o=true}if(this.relations[c].type=="FW_RequiredMap"||this.relations[c].type=="FW_RequiredMapDynamic"){n=true}if(this.relations[c].value=="_*"){if(this.relations[c].type=="FW_DataMap"){r=this.relations[c]}if(this.relations[c].type=="FW_AccessMap"){q=this.relations[c]}if(this.relations[c].type=="FW_RequiredMap"){m=this.relations[c]}}var p=unescape(this.relations[c].value);this.logger.msg("Checking value  ["+p+"] against ["+this.source.value()+"]");if(p==this.source.value()){this.logger.msg("Found value match Relation Value ["+p+"] Source Value ["+this.source.value()+"]");if(this.relations[c].type=="FW_DataMap"){this.logger.msg("Type FW_DataMap");j=true;this._apply_data(this.relations[c])}else{if(this.relations[c].type=="FW_AccessMap"){this.logger.msg("Type FW_AccessMap");k=true;this._apply_access(this.relations[c])}else{if(this.relations[c].type=="FW_RequiredMap"){this.logger.msg("Type FW_RequiredMap");b=true;this._apply_required(this.relations[c])}}}}}if(((!j&&h)||(!k&&o)||(!b&&n))&&d!=true){var g=false;var a=this.relations.length;for(var c=0;c<a;c++){if(!j){if(this.relations[c].type=="FW_DataMapDynamic"){this._apply_dynamic_data(this.relations[c]);g=true}}if(!k){if(this.relations[c].type=="FW_AccessMapDynamic"){this._apply_dynamic_access(this.relations[c]);g=true}}if(!b){if(this.relations[c].type=="FW_RequiredMapDynamic"){this._apply_dynamic_required(this.relations[c]);g=true}}}if(g){this.logger.end();this.source.applying(false);return true}}if(this.source.value().length>0){if(!k){if(q!=null){this._apply_access(q);k=true}}if(!j){if(r!=null){j=true;this._apply_data(r)}}if(!b){if(m!=null){this._apply_required(m);b=true}}}if(this.default_when_not_found==true){if(!k&&o){this.target.default_access()}if(!b&&n){this.target.default_required()}if(!j&&h){var l=this.target.value();this.target.clear();this.target.add_value("");this.target.populate();this._call_onchange(l)}}this.logger.end();if(this.target._widget.apply_relations!=null){}if(d==null){d=false}this.target._widget.call_event("relationapplied","after",{source:{widget_name:this.source._widget.name,canvas_name:this.source._widget.canvas.name},type_access:k,type_required:b,type_value:j,dynamic:d});this.source._widget.call_event("appliedrelation","after",{target:{widget_name:this.target._widget.name,canvas_name:this.target._widget.canvas.name},type_access:k,type_required:b,type_value:j,dynamic:d});this.source.applying(false)};FW_WidgetRelationship.prototype._apply_data=function(d){this.logger.srt(this,"_apply_data",this.log_level);if(d.data.length==0){this.logger.msg("Data is null, not applying any data");this.logger.end();return}var b=this.target.value();this.logger.msg("Select when list ["+d.set_value+"]");var a=d.data;var g=a.length;if(d.set_value){this.logger.msg("Selecting data");var j=a[g-1];this.target.value(j)}else{this.logger.msg("Applying data");this.target.clear();for(var c=0;c<g;c++){this.logger.msg("Applying Data ["+a[c]+"]");var h=unescape(a[c]);this.logger.msg("Applying Data ["+h+"]");this.target.add_value(h)}this.target.populate()}this._call_onchange(b);this.logger.end()};FW_WidgetRelationship.prototype._call_onchange=function(a){this.logger.srt(this,"call_onchange",this.log_level);if(this.source._widget.wr_never_call_onchange){return true}var b=this.target.value();if((a.valueOf()!=b.valueOf()||this.source._widget.wr_always_call_onchange==1)){this.logger.msg("Checking onchange for this.apply_relations ["+this.target._widget.onchange+"] Old Value ["+a+"] New value ["+b+"]");this.target._widget.call_event("change")}else{this.logger.msg("No onchange event or value not changed. Old value ["+a+"] New Value ["+b+"] WR Always call ["+this.source._widget.wr_always_call_onchange+"]");if(this.target._widget.apply_relations!=null){this.logger.msg("Found apply relations. Calling");this.target._widget.apply_relations()}}this.logger.end()};FW_WidgetRelationship.prototype._apply_dynamic_data=function(a){a.populate(this.source,this.target,this)};FW_WidgetRelationship.prototype._apply_dynamic_required=function(a){a.populate(this.source,this.target,this)};FW_WidgetRelationship.prototype._apply_dynamic_access=function(a){a.populate(this.source,this.target,this)};FW_WidgetRelationship.prototype._apply_access=function(a){if(a.access==FW_AccessMap.ENABLED){this.target.enable();this.target.show()}else{if(a.access==FW_AccessMap.DISABLED){this.target.show();this.target.disable()}else{if(a.access==FW_AccessMap.HIDDEN){this.target.enable();this.target.hide()}}}};FW_WidgetRelationship.prototype._apply_required=function(a){if(a.required==FW_RequiredMap.REQUIRED){this.target.required(1)}else{if(a.required==FW_RequiredMap.NOT_REQUIRED){this.target.required(0)}}};function FW_WRElement(a){this.logger=null}FW_WRElement.prototype.className="FW_WRElement";FW_WRElement.prototype.init=function(d,b,c,a){this.profiler=a;this._widget=d;this.logger=b;this.log_level=c;this.original_data=this.value();this.original_disabled=this._widget.disabled();this.original_reqd=this.required();this.original_hidden=(this._widget.displayed()==true)?(false):(true)};FW_WRElement.prototype.add_relation=function(a){if(this._widget.parent_relations==null){this._widget.parent_relations=new Array()}this._widget.parent_relations.push(a)};FW_WRElement.prototype.add_detail_relation=function(a){if(this._widget.detail_relations==null){this._widget.apply_relations=function(){var d=this.detail_relations.length;var g=null;for(var c=0;c<d;c++){var b=FW_WidgetRelationship.get_relation_obj(this.detail_relations[c]);b.source.applying(true);b.target.apply_relations();b.source.applying(false);g=b.source}if(g){g.done_applying(true)}};this._widget.clear_relation_data=function(){var d=this.detail_relations.length;for(var c=0;c<d;c++){var b=FW_WidgetRelationship.get_relation_obj(this.detail_relations[c]);b.clear_relation_data()}};this._widget.detail_relations=new Array()}this._widget.detail_relations.push(a)};FW_WRElement.prototype.apply_relations=function(a){var b=this._widget.parent_relations.length;for(var c=0;c<b;c++){FW_WidgetRelationship.get_relation_obj(this._widget.parent_relations[c]).apply_relation(a)}};FW_WRElement.prototype.done_applying=function(){FW_MapDynamic.do_request(this._widget.name)};FW_WRElement.prototype.applying=function(a){if(a==null){if(this._widget.wr_applying>0){return true}else{return false}}else{if(this._widget.wr_applying==null){this._widget.wr_applying=0}if(a==true){this._widget.wr_applying=parseInt(this._widget.wr_applying)+1}else{this._widget.wr_applying=parseInt(this._widget.wr_applying)-1}}};FW_WRElement.prototype.enable=function(){this._widget.disabled(false);this._remove_hidden()};FW_WRElement.prototype.disable=function(){this._widget.disabled(true);this._add_hidden()};FW_WRElement.prototype.clear=function(){this._widget.clear(false)};FW_WRElement.prototype.hide=function(){this._widget.displayed(false)};FW_WRElement.prototype.show=function(){this._widget.displayed(true)};FW_WRElement.prototype.populate=function(){return};FW_WRElement.prototype.required=function(a){return this._widget.is_required(a)};FW_WRElement.prototype.value=function(a){if(a==null){return new String(this._widget.value())}else{return new String(this._widget.value(a,false))}};FW_WRElement.prototype.default_data=function(){this.value(this.original_data)};FW_WRElement.prototype.default_required=function(){this.required(this.original_reqd)};FW_WRElement.prototype.default_access=function(){if(this.original_hidden==true){this.hide()}else{this.show()}if(this.original_disabled==true){this.disable()}else{this.enable()}};FW_WRElement.prototype.clear_original_data=function(){this.original_data=null};FW_WRElement.prototype.add_value=function(a){this.value(a);this._update_hidden()};FW_WRElement.prototype.add_data=function(a){};FW_WRElement.prototype._add_hidden=function(){if(this._widget.renderer!=null){return true}this.logger.srt(this,"add_hidden",this.log_level);if(this._widget.element.name.search("_DISABLED")>-1){this.logger.end();return true}var b=this._widget.element.name;this._widget.element.name+="_DISABLED";var a=document.createElement("INPUT");a.name=b;a.type="hidden";a.value=this.value();a.id=this._widget.id+"_DW_VALUE";this._widget.value_element_id=a.id;this._widget.value_element=a;this._widget.element.parentNode.appendChild(a);this.logger.msg("Added ["+b+"]");this.logger.end()};FW_WRElement.prototype._remove_hidden=function(){this.logger.srt(this,"remove_hidden",this.log_level);var a=this._get_hidden();if(a!=null){this._widget.value_element_id=null;this._widget.value_element=null;FW_Element.remove(a);this._widget.element.name=this._widget.element.name.replace("_DISABLED","")}this.logger.end()};FW_WRElement.prototype._update_hidden=function(){this.logger.srt(this,"update_hidden",this.log_level);var a=this._get_hidden();if(a==null){this.logger.end();return false}this.logger.msg("Value before "+a.value);a.value=this.value();this.logger.msg("Value after "+a.value);this.logger.end()};FW_WRElement.prototype._get_hidden=function(c){if(this._widget.element.name==null||this._widget.element.name.search("_DISABLED")==-1){return null}var c=this._widget.element.name.replace("_DISABLED","");var b;for(var a=0;a<this._widget.element.parentNode.childNodes.length;a++){if(this._widget.element.parentNode.childNodes[a].name==c){b=this._widget.element.parentNode.childNodes[a]}}return b};function FW_WRElement_Select(k,d,j,a){this.option_count=0;this.init(k,d,j,a);this.original_data=new Array();this.relations=new Array();this.profiler.start(this,"copy data");var c=this._widget.options();if(c!=null){var b=c.length;for(var h=0;h<b;h++){var g=((c[h].original_text!=null)?(c[h].original_text):(c[h].text));this.original_data.push({value:c[h].value,text:g})}}this.profiler.end()}FW_WRElement_Select.prototype=new FW_WRElement();FW_WRElement_Select.prototype.clear_original_data=function(){this.original_data=new Array()};FW_WRElement_Select.prototype.default_data=function(){var c=this._widget;var d=this.widget;this.clear();var a=0;for(var b=0;b<this.original_data.length;b++){if(this.original_data[b].value==this.selectedValue){a=b}c.add(this.original_data[b].text,this.original_data[b].value,null,false)}c.selected_index(a);this.selectedValue=null;return true};FW_WRElement_Select.prototype.clear=function(){this.option_count=0;this.selectedValue=this.value();this.value_list=new Array();this.logger.srt(this,"clear",this.log_level);this._widget.remove_all();this._widget.value("",false);this.logger.end()};FW_WRElement_Select.prototype.add_value=function(a){this.value_list.push(a)};FW_WRElement_Select.prototype.populate=function(){var l=this._widget;this.selectedIndex=0;var g=new String(this.selectedValue);var c=0;var a=0;for(var d=0;d<this.original_data.length;d++){var h=0;var m=this.original_data[d].value;for(var b=0;b<this.value_list.length;b++){if(String(m)==String(this.value_list[b])){h=1}}if(h==1){if(String(m).valueOf()==String(g).valueOf()){this.selectedIndex=a}l.add(this.original_data[d].text,m,null,false);if(m!=""){c++}a++}}if(l.default_on_single_item==true){if(c==1){l.selected_index(l.options().length-1,false);return true}}l.regenerate();if(this.selectedIndex!=null){l.selected_index(this.selectedIndex,false)}};FW_WRElement_Select.prototype.default_single_item=function(){this._widget.default_single_item()};FW_WRElement_Select.prototype.add_data=function(b,c){for(var a=0;a<this.original_data.length;a++){if(this.original_data[a].value==b){return}}var d;if(this._widget.element.nodeName=="FWSELECT"){d=new FW_HTMLForm_Option(unescape(c),unescape(b))}else{d=new Option(c,b)}this.logger.msg("Adding ["+c+"]");this.original_data.push({value:unescape(b),text:unescape(c)})};function FW_WRElement_CheckBox(d,b,c,a){this.init(d,b,c,a)}FW_WRElement_CheckBox.prototype=new FW_WRElement();function FW_WRElement_TextField(d,b,c,a){this.init(d,b,c,a)}FW_WRElement_TextField.prototype=new FW_WRElement();function FW_WRElement_Link(d,b,c,a){this.init(d,b,c,a)}FW_WRElement_Link.prototype=new FW_WRElement();function FW_WRElement_Image(d,b,c,a){this.init(d,b,c,a)}FW_WRElement_Image.prototype=new FW_WRElement();FW_WRElement_Image.prototype.clear=function(){};FW_WRElement_Image.prototype.value=function(){return new String("")};FW_WRElement_Image.prototype.add_value=function(a){};function FW_WRElement_Radio(d,a,c){this.logger=a;this.log_level=c;this._widget=d;this.original_data=new Array();for(var b=0;b<this._widget.length;b++){this.original_data.push(this._widget[b])}}FW_WRElement_Radio.prototype=new FW_WRElement();FW_WRElement_Radio.prototype.add_detail_relation=function(a){for(var b=0;b<this._widget.length;b++){var c=this._widget[b];if(c.detail_relations==null){c.apply_relations=function(){var h=this.detail_relations.length;for(var g=0;g<h;g++){var d=FW_WidgetRelationship.get_relation_obj(this.detail_relations[g]);d.source.applying(true);d.target.apply_relations();d.source.applying(false)}};c.detail_relations=new Array()}c.detail_relations.push(a)}};FW_WRElement_Radio.prototype.add_handler=function(a,b){for(var c=0;c<this._widget.length;c++){this._add_handler(a,b,this._widget[c])}};FW_WRElement_Radio.prototype.clear=function(){for(var a=0;a<this._widget.length;a++){this._widget[a].checked=false;this._widget[a].style.display="none"}};FW_WRElement_Radio.prototype.add_value=function(c){var d;var b=false;for(var a=0;a<this._widget.length;a++){if(this._widget[a].value==c){d=a;this._widget[a].style.display=""}if(this._widget[a].checked==true){b=true}}if(b==false&&d!=null){this._widget[d].checked=true}};FW_WRElement_Radio.prototype.enable=function(){for(var a=0;a<this._widget.length;a++){this._widget[a].disabled=false}};FW_WRElement_Radio.prototype.disable=function(){for(var a=0;a<this._widget.length;a++){this._widget[a].disabled=true}};FW_WRElement_Radio.prototype.hide=function(){for(var a=0;a<this._widget.length;a++){this._widget[a].display="none"}};FW_WRElement_Radio.prototype.show=function(){for(var a=0;a<this._widget.length;a++){this._widget[a].display=""}};FW_WRElement_Radio.prototype.value=function(){for(i=0;i<this._widget.length;i++){if(this._widget[i].checked==true){return this._widget[i].value}}return null};function FW_DataMap(c,a,b){this.value=c;this.type="FW_DataMap";this.data=new Array();if(b==1||b==true){this.set_value=true}else{this.set_value=false}if(a!=null){if(new String(a).search(",")==-1){this.data=new Array(a)}else{this.data=a}}this.count=0}FW_DataMap.prototype=new FW;FW_DataMap.prototype.clear=function(){this.data=new Array()};FW_DataMap.prototype.add=function(a){this.data.push(a)};function FW_AccessMap(b,a){this.value=b;this.access=a;this.type="FW_AccessMap"}FW_AccessMap.prototype=new FW;FW_AccessMap.ENABLED=1;FW_AccessMap.HIDDEN=2;FW_AccessMap.DISABLED=3;FW_AccessMap.prototype.clear=function(){this.value=null;this.access=null};function FW_RequiredMap(a,b){this.value=a;this.required=b;this.type="FW_RequiredMap"}FW_RequiredMap.REQUIRED="Y";FW_RequiredMap.NOT_REQUIRED="N";FW_RequiredMap.prototype.clear=function(){this.value=null;this.required=null};function FW_MapDynamic(){this.is_dynamic=1}FW_MapDynamic._request_queue={};FW_MapDynamic._ex_request_queue=new Array();FW_MapDynamic.prototype.populate=function(d,c,a){this._source=d;this._target=c;this._wr=a;if(FW_WidgetRelationship.show_processing!=false){this._target._widget.busy(true)}var b=this._source._widget.name;FW_MapDynamic.add_request(b,this)};FW_MapDynamic.prototype.add=function(a){this._wr.add(a)};FW_MapDynamic.prototype.done=function(){this._source.applying(true);this._target._widget.busy(false);this._target.apply_relations(true);this._source.applying(false)};FW_MapDynamic.do_request=function(p){var d=FW_MapDynamic._request_queue[p];if(d==null){return true}var y=Framework.url();var g=new Array();FW_MapDynamic._request_queue[p]=null;var l=FW_MapDynamic._ex_request_queue.length;FW_MapDynamic._ex_request_queue.push(g);var b=new FW_Request_Background({url:y,oncomplete:FW_MapDynamic.oncomplete,method:"POST",identifier:l,logger:Logger});for(var v=0;v<d.length;v++){var A=d[v];var a=A._options;g.push(A);var n=a[1];var o=a[2];var r=a[3];var k=a[4];var h=a[5];var q=a[6];var z=Framework.get_canvas(o);if(z==null){Logger.error("No canvas");Logger.end();return false}Logger.msg("Canvas name ["+o+"]");Logger.msg("WR Type  ["+r+"]");Logger.msg("WR Widget Name  ["+k+"]");var c=z.generate_param_keyval("_CANVAS_NAME",o);b.add_param(c[0],c[1]);b.add_param(v+"._WR_TYPE",r);b.add_param(v+"._WR_WIDGET",k);b.add_param(v+"._ROW_NUMBER",h);b.add_param(v+"._WR_ID",n);b.add_param(v+"._WR",v);b.add_param(v+"._MODE",z.mode());for(var t=0;t<q.length;t=t+2){b.add_param(v+"."+q[t],document.getElementById(q[t+1]).value)}var m=z.generate_param_keyval("_ACTION",FW.WIDGET_RELATIONSHIP_CALLBACK);b.add_param(m[0],m[1]);d[v]=null}b.submit();FW_MapDynamic._request_queue[p]=null};FW_MapDynamic.oncomplete=function(){var _fw_wr_list=FW_MapDynamic._ex_request_queue[this.identifier];var xml=this.result_xml;var root;if(xml!=null){for(var i=0;i<xml.childNodes.length;i++){if(xml.childNodes[i].nodeName=="javascript"){root=xml.childNodes[i]}}}var last_value=null;if(root!=null){for(var i=0;i<root.childNodes.length;i++){var row=root.childNodes[i];if(row.nodeType==3){continue}if(row.childNodes[0]!=null){var code=[];for(var j=0,l=row.childNodes.length;j<l;j++){code.push(row.childNodes[j].nodeValue)}eval(code.join(""))}else{var rt=this.result_text;rt=rt.replace(/</g,"&lt;").replace(/>/g,"&gt;");Logger.msg("Error in xml line ["+i+"] ["+rt+"]")}}}for(var i=0;i<_fw_wr_list.length;i++){_fw_wr_list[i].done()}_fw_wr_list=null;FW_MapDynamic._ex_request_queue[this.identifier]=null};FW_MapDynamic.add_request=function(b,a){var c;if(FW_MapDynamic._request_queue[b]==null){FW_MapDynamic._request_queue[b]=new Array()}var c=FW_MapDynamic._request_queue[b];c.push(a)};function FW_AccessMapDynamic(a){this._options=a;this._wr=null;this.type="FW_AccessMapDynamic"}FW_AccessMapDynamic.prototype=new FW_MapDynamic();function FW_RequiredMapDynamic(a){this._options=a;this._wr=null;this.type="FW_RequiredMapDynamic"}FW_RequiredMapDynamic.prototype=new FW_MapDynamic();function FW_DataMapDynamic(a){this._options=a;this._wr=null;this.type="FW_DataMapDynamic"}FW_DataMapDynamic.prototype=new FW_MapDynamic();FW_DataMapDynamic.prototype.add_data=function(a,b){this._target.add_data(a,b)};function FW_MapCallback(){this.is_dynamic=1}FW_MapCallback.prototype.populate=function(c,b,a){this._source=c;this._target=b;this._wr=a;this._callback.call(this)};FW_MapCallback.prototype.add=function(a){this._wr.add(a)};FW_MapCallback.prototype.done=function(){this._source.applying(true);this._target.apply_relations(true);this._source.applying(false)};function FW_AccessMapCallback(a){this._callback=a;this._wr=null;this.type="FW_AccessMapCallback"}FW_AccessMapCallback.prototype=new FW_MapCallback();function FW_RequiredMapCallback(a){this._callback=a;this._wr=null;this.type="FW_RequiredMapCallback"}FW_RequiredMapCallback.prototype=new FW_MapCallback();function FW_DataMapCallback(a){this._callback=a;this._wr=null;this.type="FW_DataMapCallback"}FW_DataMapCallback.prototype=new FW_MapCallback();FW_DataMapCallback.prototype.populate=function(c,b,a){this._source=c;this._target=b;this._wr=a;if(FW_WidgetRelationship.show_processing!=false){this._target._widget.busy(true)}this._callback.call(this)};FW_DataMapCallback.prototype.done=function(){this._source.applying(true);this._target._widget.busy(false);this._target.apply_relations(true);this._source.applying(false)};FW_DataMapCallback.prototype.add_data=function(a,b){this._target.add_data(a,b)};function _object_init(a,b){if(b==null){if(a==null){a={}}if(this.init!=null){this.init.call(this,a,this.superclass)}else{if(this.superclass!=null){if(this.superclass.init!=null){this.superclass.init.call(this,a,this.superclass)}}}}}function DynTable(a,b){this.page_size=0;this.page_number=0;this.from=0;this.to=0;this.column_properties=null;this.fill_blank_rows=false;this.id=null;this.data_dictionary=null;this._page_number=0;this._total_data_rows=0;this._table_data=new Array();this._silder_ref=null;this._row_props=new Array();this._row_js=new Array();this._table_ref=a.table_ref;this._data_callback=a.data_cbk;this._cbk_scope=a.cbk_scope;this._page_update_callback=a.p_upd_cbk;this._page_from=0;this._page_to=0;this._last_from=0;this._last_to=0;this._last_page_number=0;this._last_page_size=0;this._total_rows=0;return this.object_init(a,b)}DynTable.prototype.total_rows=function(a){if(a==null){return this._total_rows}else{this.Logger.srt(this,"total_rows",this.logger_level);if(a!=this._total_rows){this.Logger.msg("Total rows changed, clearing data");this._clear_data()}else{this.Logger.msg("Total rows same")}this._total_rows=a;this.Logger.end()}return};DynTable.prototype._clear_data=function(){this.Logger.srt(this,"_clear_data",this.logger_level);this._table_data=new Array();this.Logger.end()};DynTable.prototype._get_page_number=function(){this.Logger.srt(this,"_get_page_number",this.logger_level);this.Logger.msg("Returning ["+this._page_number+"]");this.Logger.end();return parseInt(this._page_number)};DynTable.prototype._set_page_number=function(a){this.Logger.srt(this,"_set_page_number",this.logger_level);this.Logger.msg("Setting ["+this._page_number+"] to ["+a+"]");this.Logger.end();this._page_number=a;return parseInt(this._page_number)};DynTable.log_level=31995;DynTable.prototype.className="DynTable";DynTable.prototype.object_init=_object_init;DynTable.prototype.init=function(a){if(a.logger==null){this.Logger=new Logger({})}else{this.Logger=a.logger}if(a.logger_level==null){this.logger_level=DynTable.log_level}else{this.logger_level=a.logger_level}if(a.table_ref!=null){this._table_ref=a.table_ref}else{return false}if(a.data_cbk!=null){this._data_callback=a.data_cbk}if(a.p_upd_cbk!=null){this._page_update_callback=a.p_upd_cbk}if(a.slider_ref!=null){this._slider_ref=a.slider_ref}else{}this.id=a.id};DynTable.prototype.add_row=function(g,o,h,a){this.Logger.srt(this,"add_row",this.logger_level);this.Logger.msg("Adding row "+g);var b=this._table_data;if(this.data_dictionary!=null){this.Logger.msg("Uncompressing");for(var l=0;l<h.length;l++){var p=h[l].split(/\!/);var q="";for(var d=0;d<p.length;d++){var n=p[d].split(/\./);for(var c=parseInt(n[0]);c<=parseInt(n[n.length-1]);c++){if(this.data_dictionary[c]!=null){q=q+this.data_dictionary[c]}else{this.Logger.warn("Dictionary index ["+c+"] is null ! Sub token length "+n.length+" Token ["+p[d]+"] Data ["+h[l]+"]")}}}h[l]=unescape(q)}}else{for(var l=0;l<h.length;l++){h[l]=unescape(h[l])}}b[g]=h;var m=this._row_props;m[g]=o;this._row_js[g]=unescape(a);this._total_data_rows++;this.Logger.end()};DynTable.prototype.next_page=function(){this.Logger.srt(this,"next_page",this.logger_level);this.Logger.msg("Current page ["+this.page_number+"]");if(this.change_page(parseInt(this.page_number)+1)!=true){return false}this.Logger.end();return true};DynTable.prototype.previous_page=function(){this.Logger.srt(this,"previous_page",this.logger_level);if(this.page_number==1){this.Logger.warn("At first page, not changing");this.Logger.end();return false}if(this.change_page(parseInt(this.page_number)-1)!=true){this.Logger.end();return false}this.Logger.end();return true};DynTable.prototype.first_page=function(){this.Logger.srt(this,"first_page",this.logger_level);if(this.change_page(1)!=true){this.Logger.end();return false}this.Logger.end();return true};DynTable.prototype.last_page=function(){this.Logger.srt(this,"last_page",this.logger_level);if(this.change_page(-1)!=true){return false}this.Logger.end();return true};DynTable.prototype.next_record=function(){this.Logger.srt(this,"last_page",this.logger_level);if(this.change_record(parseInt(this.from)+1)!=true){this.Logger.end();return false}this.Logger.end();return true};DynTable.prototype.previous_record=function(){this.Logger.srt(this,"last_page",this.logger_level);if(this.change_record(parseInt(this.from)-1)==true){this.populate_table()}this.Logger.end()};DynTable.prototype.total_pages=function(){var a=this.total_rows()%this.page_size;var b=this.total_rows();if(a>0){b+=(this.page_size-a)}return(b/this.page_size)};DynTable.prototype.change_record=function(a){this.Logger.srt(this,"change_record",this.logger_level);this.Logger.msg("Requeted record number ["+a+"]");if(a==this.total_rows()+1||a==0){this.Logger.end();return false}var c=a;var b=c;while((b-c)<this.page_size-1&&b<this.total_rows()){b++}this._page_from=0;for(i=0;i<this.total_rows();i++){if(i%this.page_size==0){this._page_from++}if(i==c-1){break}}this._page_to=0;for(i=0;i<this.total_rows();i++){if(i%this.page_size==0){this._page_to++}if(i==b-1){break}}this.page_number=this._page_from;if(this._check_data(c,b)==false){this.Logger.warn("_check_data returned false !");this.last_populated_state();this.Logger.end();return false}this.from=c;this.to=b;this.Logger.end();return true};DynTable.prototype.has_page=function(a){var b;if(a>this.total_rows()/this.page_size){return false}if(a<0){return false}start=((a)*(this.page_size))-(this.page_size-1);if(this._table_data[state]!=null){return true}else{return false}};DynTable.prototype.change_page=function(a){this.Logger.srt(this,"change_page",this.logger_level);this.Logger.msg("Requested page ["+a+"]");if(a>this.total_rows()/this.page_size){a=-1}if(this.total_rows()<=this.page_size){a=1}var b;if(a<0){if(this.total_rows()%this.page_size==0){b=this.total_rows()-(this.page_size-1)}else{b=this.total_rows()-((this.page_size-1)-(this.page_size-this.total_rows()%this.page_size))}}else{b=((a)*(this.page_size))-(this.page_size-1)}this.change_record(b);this.Logger.end();return true};DynTable.prototype._check_data=function(c,b){this.Logger.srt(this,"_check_data",this.logger_level);var a;var c;var b;from_start=(this._page_from*this.page_size)-(this.page_size)+1;from_end=(this._page_from*this.page_size);if(from_end>this.total_rows()){from_end=this.total_rows()}if(this._table_data[from_start]==null||this._table_data[from_end]==null){this.Logger.msg("Missing data (from), calling callback [from start] "+from_start+" [from_end] "+from_end);a=this._callback_data(this._page_from,from_start,from_end);if(a==0||a==null){this.Logger.end();return false}}if(this._page_to!=this._page_from){to_start=(this._page_to*this.page_size)-(this.page_size)+1;to_end=(this._page_to*this.page_size);if(to_end>this.total_rows()){to_end=this.total_rows()}if(this._table_data[to_start]==null||this._table_data[to_end]==null){this.Logger.msg("Missing data (to), calling callback [to_start] "+to_start+" [to_end] "+to_end);a=this._callback_data(this._page_to,to_start,to_end);if(a==0||a==null){this.Logger.end();return false}}}this.Logger.end();return true};DynTable.prototype._callback_data=function(a,g,d){this.Logger.srt(this,"callback_data",this.logger_level);var c=0;if(this._data_callback!=null){var b=this;if(this._cbk_scope!=null){b=this._cbk_scope}c=this._data_callback.call(b,{from:g,to:d,current_from:this.from,current_to:this.to,id:this.id,data_page_size:this.data_page_size,page_size:this.page_size,table:this,page_number:a,total:this.total_rows()})}this.Logger.end();return c};DynTable.prototype._callback_page_update=function(){var a=this;if(this._cbk_scope!=null){a=this._cbk_scope}if(this._page_update_callback!=null){this._page_update_callback.call(a,{from:this.from,to:this.to,id:this.id,total:this.total_rows(),cached:this._total_data_rows,page_number:this.page_number,page_size:this.page_size})}};DynTable.prototype.populate_table=function(g){this.Logger.srt(this,"populate_table",this.logger_level);if(this._table_ref==null){this.Logger.error("table_ref is not defined");this.Logger.end();return false}if(this._table_data==null){this.Logger.error("table_data is not defined");this.Logger.end();return false}if(this._table_data[this.from]==null){this.Logger.error("Record does not exist. this.from ["+this.from+"]");this.Logger.end();return false}if(this._clear_table_data()==false){this.Logger.end();return false}this._js=new Array();this.Logger.msg("Populating From ["+this.from+"] To: ["+this.to+"]");var b;for(var d=parseInt(this.from);d<=parseInt(this.to);d++){var a=this._table_data[d];if(a==null){this.Logger.error("No data for "+d);break}b=a;this.Logger.msg("Table Row ["+d+"] ");this._add_table_row(a,this._row_props[d]);if(g!=false){this._exec_js(d)}}if(this.fill_blank_rows==true){if(this.total_rows()==this.to){for(var d=(this.to-this.from)+1;d<this.page_size;d++){var a=new Array();for(var c=0;c<b.length;c++){a[c]="&nbsp;"}this._add_table_row(a,{className:"none"})}}}this._set_populated_state();this._callback_page_update();this.Logger.end()};DynTable.prototype._add_table_row=function(b,g){this.Logger.srt(this,"_add_table_row",this.logger_level);if(this._table_ref==null){this.Logger.error("table_ref is not defined");this.Logger.end();return false}var j=this._table_ref.tBodies[0];var c=document.createElement("TR");for(prop in g){c[prop]=g[prop]}this.Logger.msg("Row Data Length "+b.length);for(var a=0;a<b.length;a++){var h=document.createElement("TD");if(this.column_properties!=null&&this.column_properties[a]!=null){if(this.column_properties[a].width!=null){h.width=this.column_properties[a].width}if(this.column_properties[a].cls!=null){h.className=this.column_properties[a].cls}if(this.column_properties[a].height!=null){h.height=this.column_properties[a].height}}this.Logger.msg("Row Length ["+b[a].length+"]");h.innerHTML=b[a];if(this.max_row_length!=null&&b.length<this.max_row_length){h.setAttribute("colspan",(this.max_row_length-b.length+1))}try{c.appendChild(h)}catch(d){this.Logger.error("Error attaching column ["+a+"]. Error ["+d.message+"]")}}if(this.max_row_length==null||this.max_row_length<b.length){this.max_row_length=b.length}try{j.appendChild(c)}catch(d){this.Logger.error("Error attaching row. Error ["+d.message+"]")}this.Logger.end()};DynTable.prototype._parse_js_old=function(d){this.Logger.srt(this,"_parse_js",this.logger_level);var a=d.indexOf("<script>");this.Logger.msg("&lt;script&gt; index ["+a+"]");if(a!=-1){var c=d.indexOf("<\/script>");this.Logger.msg("&lt;/script&gt; index ["+c+"]");if(c==-1){this.Logger.end();return}a+=8;var b=d.substr(a,(c-a));if(b.length>0){this._js.push(b)}}this.Logger.end()};DynTable.prototype._parse_js=function(c){if(c!=null){}if(s!=-1){var b=c.indexOf("<\/script>");this.Logger.msg("&lt;/script&gt; index ["+b+"]");if(b==-1){this.Logger.end();return}s+=8;var a=c.substr(s,(b-s));if(a.length>0){this._js.push(a)}}this.Logger.end()};DynTable.prototype._exec_js=function(i){this.Logger.srt(this,"_exec_js",this.logger_level);if(this._row_js[i]!=null){try{eval(this._row_js[i])}catch(e){this.Logger.error("JS Error ["+e.message+"]")}}this.Logger.end()};DynTable.prototype._clear_table_data=function(){this.Logger.srt(this,"_clear_table_data",this.logger_level);if(this._table_ref==null){this.Logger.error("table_ref is not defined");this.Logger.end();return false}var l=0;for(var h=0;h<this._table_ref.tBodies.length;h++){var k=this._table_ref.tBodies[h];this.Logger.msg("Found table body "+h);this.Logger.msg("Num of rows "+k.rows.length);for(var c=0;c<k.rows.length;c++){if(c==5){break}var g=k.rows[c];for(var b=0;b<g.childNodes.length;b++){var d=g.childNodes[b];if(d.tagName=="TH"){l++;break}}}var a=l;while(k.rows.length>l){a++;this.Logger.msg("Clearing table row "+a);FW_Element.remove(k.rows[l])}}this.Logger.end();return true};DynTable.prototype._setup_slider=function(){this.Logger.srt(this,"_setup_slider",this.logger_level);if(this._slider_ref==null){this.Logger.error("slider_ref is not defined");this.Logger.end();return false}this.Logger.end();return true};DynTable.prototype.can_first_page=function(){this.Logger.srt(this,"can_first_page",this.logger_level);if(this.page_number==1){this.Logger.msg("Cannot switch to first page Page number == "+this.page_number);this.Logger.end();return false}this.Logger.msg("Can switch to first page");this.Logger.end();return true};DynTable.prototype.can_last_page=function(){this.Logger.srt(this,"can_last_page",this.logger_level);if(this.page_number==this.total_pages()){this.Logger.msg("Cannot switch to last page");this.Logger.end();return false}this.Logger.msg("Can switch to last page");this.Logger.end();return true};DynTable.prototype.can_next_page=function(){this.Logger.srt(this,"can_next_page",this.logger_level);if(this.page_number==this.total_pages()){this.Logger.msg("Cannot switch to next page");this.Logger.end();return false}this.Logger.msg("Can switch to next page");this.Logger.end();return true};DynTable.prototype.can_prev_page=function(){this.Logger.srt(this,"can_prev_page",this.logger_level);if(this.page_number==1){this.Logger.msg("Cannot switch to prev page. Page number == "+this.page_number);this.Logger.end();return false}this.Logger.msg("Can switch to previous page");this.Logger.end();return true};DynTable.prototype.got_data=function(){this.Logger.srt(this,"got_data",this.logger_level);this.Logger.msg("Searching for record from ["+this.from+"] to ["+this.to+"]");if(this._table_data[this.from]!=null&&this._table_data[this.to]!=null){this.Logger.end();return true}this.Logger.end();return false};DynTable.prototype._set_populated_state=function(){this.Logger.srt(this,"_set_populated_state",this.logger_level);this._last_from=this.from;this._last_to=this.to;this._last_page_number=this.page_number;this._last_page_size=this.page_size;this._last_data_page_size=this.data_page_size;this.Logger.msg("Last From ["+this._last_from+"] Last To ["+this._last_to+"] Last Page Number ["+this._last_page_number+"]");this._store_state();this.Logger.end()};DynTable.prototype.last_populated_state=function(){this.Logger.srt(this,"last_populated_state",this.logger_level);var c=this._get_state();var b=false;if(c.from!=null&&c.to!=null&&c.page_number!=null){this.Logger.msg("Got state");var d=this.from;var a=this.to;this.from=c.from;this.to=c.to;if(this.got_data()==true){this.Logger.msg("Got data !");this.page_number=c.page_number;this.Logger.msg("From ["+c.from+"] To ["+c.to+"] Page Number ["+c.page_number+"]");this._callback_page_update();b=true}else{this.Logger.msg("Couldnt find data ... ");this.from=d;this.to=a;b=false}}this.Logger.msg("Returning ["+b+"]");this.Logger.end();return b};DynTable.prototype._store_state=function(){this.Logger.srt(this,"_store_state",this.logger_level);var g=new Cookie({name:"FW_DYNTABLE_STATE",logger:this.Logger});var k=window.location.pathname+"_"+this.id;var c=g.value;var b="";if(c!=null&&c.indexOf(k+"#")>-1){this.Logger.msg("Update");var h=c.split(/\|/);this.Logger.msg("Number of ids ["+h.length+"]");for(var d=0;d<h.length;d++){this.Logger.msg("Parsing ["+h[d]+"]");var a=h[d].split(/\#/);if(a[0]==k){this.Logger.msg("Building ["+k+"] from scratch");b=b+k+"#"+j(this)+"|";this.Logger.msg("Finished building")}else{this.Logger.msg("Retaining ["+k+"]");b=b+h[d]+"|"}this.Logger.msg("Done record ["+d+"]")}}else{this.Logger.msg("Insert");if(c==null){c=""}b=c+k+"#"+j(this)+"|"}function j(n){var m=new Array();m.from=n._last_from;m.to=n._last_to;m.page_number=n._last_page_number;m.page_size=n._last_page_size;m.data_page_size=n._last_data_page_size;var p="";var o=0;for(var l in m){if(l=="object_init"){continue}if(o!=0){p+=":"}p+=l+":"+m[l];o++}n.Logger.msg("Built data ["+p+"]");return p}g.value=b;g.update();this.Logger.msg("State ["+b+"]");this.Logger.end()};DynTable.prototype._get_state=function(){this.Logger.srt(this,"_get_state",this.logger_level);var cookie=new Cookie({name:"FW_DYNTABLE_STATE",logger:this.Logger});var id=window.location.pathname+"_"+this.id;var cv=cookie.value;var st=null;if(cv!=null&&cv.indexOf(id+"#")>-1){var ids=cv.split(/\|/);for(var i=0;i<ids.length;i++){var items=ids[i].split(/#/);if(items[0]==id){st=items[1]}}}var o={};if(st!=null){st=st.replace(/#/,"");sitems=st.split(/\:/);for(var i=0;i<sitems.length;i=i+2){eval("o."+sitems[i]+" = sitems[i + 1];")}}this.Logger.msg("From ["+o.from+"] To ["+o.to+"] Page Num ["+o.page_number+"] Page Size ["+o.page_size+"]");this.Logger.end();return o};DynTable.prototype.update_page_info=function(){this._callback_page_update()};function FW_Effect(){}FW_Effect.prototype=new FW;FW_Effect.prototype.className="FW_Effect";FW_Effect._effect_list=new Array();FW_Effect._get_effect=function(a){return FW_Effect._effect_list[a]};FW_Effect.prototype.render=function(){};FW_Effect.prototype.apply=function(a){};FW_Effect.prototype._start=function(){this._total_time=0;this.doing=1;this.render();this._start_time=new Date;this.cancel();this.timer=setInterval('FW_Effect._get_effect("'+this.id+'")._render();',this.ms)};FW_Effect.prototype._end=function(){this._total_time=0;this.doing=0};FW_Effect.prototype.cancel=function(){clearInterval(this.timer)};FW_Effect.prototype._render=function(){this._total_time=parseInt(this._total_time)+parseInt(this.ms);if(this._total_time>=this.duration){this.render();this.cancel();if(this.oncomplete!=null){this.oncomplete.call(this)}this._end()}else{this.render()}};FW_Effect.prototype._init=function(a){this.id=FW_Effect._effect_list.length;FW_Effect._effect_list.push(this);this.ms=50;this.duration=0.5;this._init_args(a);this._total_time=0;this.duration=parseFloat(this.duration)*1000};FW_Effect.prototype.clone=function(a){var b=FW.prototype.clone.call(this,a);b.id=FW_Effect._effect_list.length;FW_Effect._effect_list.push(b);return b};function FW_Effect_Opacity(a){this._init(a)}FW_Effect_Opacity.prototype=new FW_Effect();FW_Effect_Opacity.prototype.render=function(){this.current_opacity=parseInt(this.current_opacity)+parseFloat(this.unit);if(window.ActiveXObject){if(this.current_opacity<100){this.element.style.filter="alpha(opacity="+this.current_opacity+")"}else{this.element.style.filter=null}}this.element.style.opacity=parseFloat(this.current_opacity*(1/100))};FW_Effect_Opacity.prototype._apply=function(){this.current_opacity=this.start;this.unit=(this.end-this.start)/parseFloat(parseFloat(this.duration)/parseFloat(this.ms))};FW_Effect_Opacity.prototype.apply=function(){this._apply();this._start()};function FW_Effect_Height(a){this._init(a)}FW_Effect_Height.prototype=new FW_Effect;FW_Effect_Height.prototype._apply=function(){if(this.doing==1){return}this._orig_end=this.end;if(this._initial_height==null){this._initial_height=this.element.offsetHeight}if(this._initial_overflow==null){this._initial_overflow=this.element.style.overflow}this.start=this._initial_height*(this.start/100);this.end=this._initial_height*(this.end/100);this.element.style.height=this.start;this.current_height=this.start;this.element.style.overflow="hidden";this.unit=parseFloat(this.end-this.start)/parseFloat(this.duration/this.ms)};FW_Effect_Height.prototype.apply=function(){this._apply();this._start()};FW_Effect_Height.prototype._end=function(){if(this._orig_end==100){this.element.style.height="auto";this.element.style.overflow="visible"}else{}this.doing=0};FW_Effect_Height.prototype.render=function(){this.current_height=parseFloat(this.current_height)+parseFloat(this.unit);if(this.current_height>0){if(this.current_height>this._initial_height){this.element.style.height=parseInt(this._initial_height)+"px"}else{this.element.style.height=parseInt(this.current_height)+"px"}}};function FW_Effect_ShrinkFade(a){this._init(a);this.eh=new FW_Effect_Height({});this.op=new FW_Effect_Opacity({})}FW_Effect_ShrinkFade.prototype=new FW_Effect;FW_Effect_ShrinkFade.prototype.apply=function(){this.eh.element=this.element;this.op.element=this.element;this.eh.start=this.start;this.eh.end=this.end;this.op.start=this.start;this.op.end=this.end;this.eh._apply();this.op._apply();this._start()};FW_Effect_ShrinkFade.prototype.render=function(){this.eh.render();this.op.render()};FW_Effect_ShrinkFade.prototype._end=function(){this.eh._end();this.op._end();this.doing=0};function FW_Menu(b){this.display="original";this.event="click";this.restrict_one_sibling=true;this.element=null;this.element_id=null;this.effect=null;this.initial_state="hidden";this.remember_state=false;for(var a in b){this[a]=b[a]}this.menu_items=new Array();if(this.event=="hover"){EventHandler.addEvent(window.document.body,"mouseover",this._mouseover_hide_all,this,false,false)}if(this.logger==null){this.logger=LoggerDummy}this.init()}FW_Menu.prototype=new FW;FW_Menu.prototype.className="FW_Menu";FW_Menu.INITIAL_STATE_HIDDEN="hidden";FW_Menu.INITIAL_STATE_VISIBLE="visible";FW_Menu.DISPLAY_HORIZONTAL="horizontal";FW_Menu.DISPLAY_VERTICAL="vertical";FW_Menu.DISPLAY_ORIGINAL="original";FW_Menu.EVENT_CLICK="click";FW_Menu.EVENT_HOVER="hover";FW_Menu.prototype.init=function(){if(this.element==null){this.element=document.getElementById(this.element_id)}if(this.element==null){return false}if(this.remember_state){this.cookie=new Cookie({logger:this.logger,name:"FW_Menu"});this.cookie_params=new CookieParams({data:this.cookie.value,logger:this.logger})}this._apply_events(this.element,this.menu_items,0);if(this.display=="horizontal"||this.display=="vertical"){this._apply_id(this.element)}return true};FW_Menu.prototype._apply_id=function(c){for(var b=0,a=c.childNodes.length;b<a;b++){if(c.childNodes[b].nodeName=="#text"){continue}c.childNodes[b]._is_menu_item=1;this._apply_id(c.childNodes[b])}};FW_Menu.prototype._apply_events=function(y,d,a,v){a++;for(var o=0,g=y.childNodes.length;o<g;o++){var t=y.childNodes[o];var r=new String(t.nodeName).toLowerCase();if(r=="li"){for(var n=0,m=t.childNodes.length;n<m;n++){var p=t.childNodes[n];if(new String(p.nodeName).toLowerCase()=="ul"){var q=new Array();var h;var c={element:t,event:this.event,event_timeout:this.event_timeout,effect_type:this.effect_type,effect:this.effect,siblings:d,parent_menu:v,sub_items:q,restrict_one_sibling:this.restrict_one_sibling,cookie:this.cookie,cookie_params:this.cookie_params,initial_state:this.initial_state,logger:this.logger};if(this.display=="original"){h=new FW_MenuItem_Fixed(c)}else{if(this.display=="horizontal"){h=new FW_MenuItem_Horizontal(c)}else{if(this.display=="vertical"){if(a==1){c.event=FW_Menu.EVENT_CLICK;h=new FW_MenuItem_Vertical(c)}else{h=new FW_MenuItem_Horizontal(c)}}}}var b={menu:h,sub_items:q};d.push(b);h.init();this._apply_events(p,b.sub_items,a,h)}}}}};FW_Menu.prototype._mouseover_hide_all=function(b){if(this.state!=this.DISPLAYED){return true}var c;if(b.target){c=b.target}else{if(b.srcElement){c=b.srcElement}}if(c.nodeName!="DIV"){return true}if(c._is_menu_item!=1){for(var a=0;a<this.menu_items.length;a++){this._hide_menu_items(this.menu_items[a])}}return true};FW_Menu.prototype.hide_all=function(b){for(var a=0;a<this.menu_items.length;a++){this._hide_menu_items(this.menu_items[a])}};FW_Menu.prototype.show_all=function(b){for(var a=0;a<this.menu_items.length;a++){this._show_menu_items(this.menu_items[a])}};FW_Menu.prototype._hide_menu_items=function(b){b.menu.hide();for(var a=0;a<b.sub_items.length;a++){this._hide_menu_items(b.sub_items[a])}};FW_Menu.prototype._show_menu_items=function(b){b.menu.display();for(var a=0;a<b.sub_items.length;a++){this._show_menu_items(b.sub_items[a])}};FW_Menu._timer=null;FW_Menu._timer_menu_item=null;function FW_MenuItem(a){}FW_MenuItem.prototype=new FW;FW_MenuItem.prototype.DISPLAYED=1;FW_MenuItem.prototype.HIDDEN=2;FW_MenuItem.prototype.className="FW_MenuItem";FW_MenuItem.prototype._add_event=function(){if(this.event=="click"){EventHandler.addEvent(this._title_element,"click",FW_MenuItem.prototype.onevent,this,true)}else{EventHandler.addEvent(this.element,"mouseover",FW_MenuItem.prototype.onevent_hover,this,true);if(this.event_timeout!=null){EventHandler.addEvent(this.element,"mouseout",FW_MenuItem.prototype.onevent_unhover,this,true)}}};FW_MenuItem.prototype.hide=function(b){if(this.state==this.HIDDEN){return false}if(b==null){b=1}if(b&&this.effect!=null){if(this.effect.doing==1){return}var a=this;this.effect.oncomplete=function(){a._hide();a.effect.oncomplete=null};this.effect.start=100;this.effect.end=0;this.effect.apply();this.state=this.HIDDEN}else{this._hide(b)}};FW_MenuItem.prototype._hide=function(a){this._menu_element.style.visibility="hidden";this._menu_element.style.display="none";this.element.className=this.element.className.replace(" MenuItemActive","");if(this._title_element){this._title_element.className=this.element.className.replace(" MenuItemActive","")}this.state=this.HIDDEN;if(a!=0){this.save_state()}};FW_MenuItem.prototype.onevent=function(a){if(this.state==this.DISPLAYED){this.hide()}else{if(this.state==this.HIDDEN){this.display()}}a.returnValue==false;return false};FW_MenuItem.prototype.onevent_hover=function(a){if(this.event_timeout==null){this.display()}else{FW_Menu._timer_menu_item=this;FW_Menu._timer=setTimeout("if (FW_Menu._timer_menu_item != null) { FW_Menu._timer_menu_item.display(); }",this.event_timeout)}return false};FW_MenuItem.prototype.onevent_unhover=function(a){if(FW_Menu._timer_menu_item!=null){FW_Menu._timer_menu_item.hide();FW_Menu._timer_menu_item=null}if(FW_Menu._timer!=null){FW_Menu._timer=null}return false};FW_MenuItem.prototype.check_siblings=function(){if(this.restrict_one_sibling==true){for(var a=0;a<this.siblings.length;a++){if(this.siblings[a].menu!=this){this.siblings[a].menu.hide()}}}};FW_MenuItem.prototype.init=function(){this._menu_element=null;for(var d=0,b=this.element.childNodes.length;d<b;d++){var g=this.element.childNodes[d];var l=new String(g.nodeName).toLowerCase();if(l=="ul"){this._menu_element=g}else{if(l=="span"||l=="a"){this._title_element=g}}}var h=null;this.width=this.element.offsetWidth;this.height=this.element._title_element;if(this._menu_element!=null&&this._title_element!=null){this._add_event();if(this.initial_state=="hidden"){h=this.HIDDEN}else{if(this.initial_state=="display"){h=this.DISPLAYED}else{var a;if(window.getComputedStyle){a=window.getComputedStyle(this._menu_element,"").getPropertyValue("display")}else{a=this._menu_element.currentStyle.display}if(a=="none"){this.state=this.HIDDEN}else{this.state=this.DISPLAYED}}}}if(this.effect!=null){this.effect=this.effect.clone();this.effect.element=this._menu_element}if(this.effect_type!=null){if(this.effect_type=="shrinkfade"){this.effect=new FW_Effect_ShrinkFade({element:this._menu_element})}else{if(this.effect_type=="height"){this.effect=new FW_Effect_Height({element:this._menu_element})}else{if(this.effect_type=="opacity"){this.effect=new FW_Effect_Opacity({element:this._menu_element})}}}}this.element.className+=" MenuSubItems";if(this._title_element){this._title_element.className+=" MenuSubItems"}this.generate_id();var c=this.restore_state();if(c!=null){h=c}if(h){if(h==this.HIDDEN){this.hide(0)}else{if(h==this.DISPLAYED){this.display(0)}}}};FW_MenuItem.prototype.restore_state=function(){if(this.cookie!=null){var a=this.cookie_params.get_param(this.id);if(a==this.HIDDEN||a==this.DISPLAYED){return a}}return null};FW_MenuItem.prototype.save_state=function(){if(this.cookie!=null){this.cookie_params.set_param(this.id,this.state);this.cookie.value=this.cookie_params.get_data();this.cookie.update()}};FW_MenuItem.prototype.generate_id=function(){var a;if(this._title_element.id){a=this._title_element.id}else{a=this._title_element.innerHTML.replace(/\s/g,"")}if(this.parent_menu!=null){a=this.parent_menu.id+a}this.id=a;return this.id};function FW_MenuItem_Horizontal(a){this._init_args(a)}FW_MenuItem_Horizontal.prototype=new FW_MenuItem;FW_MenuItem_Horizontal.prototype.display=function(a){if(a==null){a=1}if(this.state==this.DISPLAYED){return false}this._menu_element.style.display="block";this._menu_element.style.visibility="visible";if(a&&this.effect!=null){if(this.effect.doing==1){return}this.effect.start=0;this.effect.end=100;this.effect.apply()}this.state=this.DISPLAYED;this.check_siblings();if(this.element.className.search("MenuItemActive")==-1){this.element.className=this.element.className+" MenuItemActive"}if(this._title_element&&this._title_element.className.search("MenuItemActive")==-1){this._title_element.className+=" MenuItemActive"}this.save_state();if(this.displayed_once==true){return true}this.displayed_once=true;this._menu_element.style.position="absolute";if(this.element.parentNode.style.display!="block"){this.element.parentNode.style.display="block"}var c=this._title_element.offsetTop-1;var b=this._title_element.offsetLeft+this._title_element.offsetWidth;this._menu_element.style.left=b+"px";this._menu_element.style.top=c+"px";return false};function FW_MenuItem_Vertical(a){this._init_args(a)}FW_MenuItem_Vertical.prototype=new FW_MenuItem;FW_MenuItem_Vertical.prototype.display=function(a){if(a==null){a=1}if(this.state==this.DISPLAYED){return false}this._menu_element.style.display="block";this._menu_element.style.visibility="visible";if(a&&this.effect!=null){if(this.effect.doing==1){return}this.effect.start=0;this.effect.end=100;this.effect.apply()}this.state=this.DISPLAYED;this.check_siblings();if(this.element.className.search("MenuItemActive")==-1){this.element.className=this.element.className+" MenuItemActive"}if(this._title_element&&this._title_element.className.search("MenuItemActive")==-1){this._title_element.className+=" MenuItemActive"}this.save_state();if(this.displayed_once==true){return true}this.displayed_once=true;this._menu_element.style.position="absolute";if(this.element.parentNode.style.display!="block"){this.element.parentNode.style.display="block"}var d=(this.element.offsetTop+this.element.offsetHeight);try{if(ActiveXObject){d=d-10}}catch(c){}var b=this.element.offsetLeft;this._menu_element.style.left=b+"px";this._menu_element.style.top=d+"px"};function FW_MenuItem_Fixed(a){this._init_args(a)}FW_MenuItem_Fixed.prototype=new FW_MenuItem;FW_MenuItem_Fixed.prototype.display=function(a){if(a==null){a=1}if(this.state==this.DISPLAYED){return false}this._menu_element.style.display="block";this._menu_element.style.visibility="visible";if(a&&this.effect!=null){if(this.effect.doing==1){return}this.effect.start=0;this.effect.end=100;this.effect.apply()}if(this.element.className.search("MenuItemActive")==-1){this.element.className=this.element.className+" MenuItemActive"}if(this._title_element&&this._title_element.className.search("MenuItemActive")==-1){this._title_element.className+=" MenuItemActive"}this.state=this.DISPLAYED;this.save_state();this.check_siblings()};var agt=navigator.userAgent.toLowerCase();var is_major=parseInt(navigator.appVersion);var is_minor=parseFloat(navigator.appVersion);var isNetscape=((agt.indexOf("mozilla")!=-1)&&(agt.indexOf("spoofer")==-1)&&(agt.indexOf("compatible")==-1)&&(agt.indexOf("opera")==-1)&&(agt.indexOf("webtv")==-1)&&(agt.indexOf("hotjava")==-1));var isNetscape2=(isNetscape&&(is_major==2));var isNetscape3=(isNetscape&&(is_major==3));var isNetscape4=(isNetscape&&(is_major==4));var isNetscape4up=(isNetscape&&(is_major>=4));var isNetscapeonly=(isNetscape&&((agt.indexOf("; nav")!=-1)||(agt.indexOf("; nav")!=-1)));var isNetscape6=(isNetscape&&(is_major==5));var isNetscape6up=(isNetscape&&(is_major>=5));var is_gecko=(agt.indexOf("gecko")!=-1);var isIE=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));var isIE3=(isIE&&(is_major<4));var isIE4=(isIE&&(is_major==4)&&(agt.indexOf("msie 4")!=-1));var isIE4up=(isIE&&(is_major>=4));var isIE5=(isIE&&(is_major==4)&&(agt.indexOf("msie 5.0")!=-1));var isIE5_5=(isIE&&(is_major==4)&&(agt.indexOf("msie 5.5")!=-1));var isIE5up=(isIE&&!isIE3&&!isIE4);var isIE5_5up=(isIE&&!isIE3&&!isIE4&&!isIE5);var isIE6=(isIE&&(is_major==4)&&(agt.indexOf("msie 6.")!=-1));var isIE6up=(isIE&&!isIE3&&!isIE4&&!isIE5&&!isIE5_5);var is_aol=(agt.indexOf("aol")!=-1);var is_aol3=(is_aol&&isIE3);var is_aol4=(is_aol&&isIE4);var is_aol5=(agt.indexOf("aol 5")!=-1);var is_aol6=(agt.indexOf("aol 6")!=-1);var is_opera=(agt.indexOf("opera")!=-1);var is_opera2=(agt.indexOf("opera 2")!=-1||agt.indexOf("opera/2")!=-1);var is_opera3=(agt.indexOf("opera 3")!=-1||agt.indexOf("opera/3")!=-1);var is_opera4=(agt.indexOf("opera 4")!=-1||agt.indexOf("opera/4")!=-1);var is_opera5=(agt.indexOf("opera 5")!=-1||agt.indexOf("opera/5")!=-1);var is_opera5up=(is_opera&&!is_opera2&&!is_opera3&&!is_opera4);var is_webtv=(agt.indexOf("webtv")!=-1);var is_TVNavigator=((agt.indexOf("navio")!=-1)||(agt.indexOf("navio_aoltv")!=-1));var is_AOLTV=is_TVNavigator;var is_hotjava=(agt.indexOf("hotjava")!=-1);var is_hotjava3=(is_hotjava&&(is_major==3));var is_hotjava3up=(is_hotjava&&(is_major>=3));var is_js;if(isNetscape2||isIE3){is_js=1}else{if(isNetscape3){is_js=1.1}else{if(is_opera5up){is_js=1.3}else{if(is_opera){is_js=1.1}else{if((isNetscape4&&(is_minor<=4.05))||isIE4){is_js=1.2}else{if((isNetscape4&&(is_minor>4.05))||isIE5){is_js=1.3}else{if(is_hotjava3up){is_js=1.4}else{if(isNetscape6||is_gecko){is_js=1.5}else{if(isNetscape6up){is_js=1.5}else{if(isIE5up){is_js=1.3}else{is_js=0}}}}}}}}}}var INSERT_MODE=FW.INSERT_MODE;var QUERY_MODE=FW.QUERY_MODE;var UPDATE_MODE=FW.UPDATE_MODE;var DO_QUERY=FW.DO_QUERY;var DO_UPDATE=FW.DO_UPDATE;var DO_INSERT=FW.DO_INSERT;var DO_QUERY_UPDATE=FW.DO_QUERY_UPDATE;var DO_DELETE=FW.DO_DELETE;function highlight_caption(b,a){var j=Framework.get_canvas_list();for(var h=0,l=j.length;h<l;h++){var g=j[h].get_widget_list();for(var k=0,m=g.length;k<m;k++){var d=g[k];if(d.element==b){if(a){d.label_highlight()}else{d.label_reset()}}}}}function find_window(){return window}function get_widget_label(g){var h=Framework.get_canvas_list();for(var l=0,d=h.length;l<d;l++){var b=h[l].get_widget_list();for(var a=0,k=b.length;a<k;a++){var j=b[a];if(j.element==g){return j.label}}}}function get_elements_by_name(m){var h=[];var g=Framework.get_canvas_list();for(var d=0,k=g.length;d<k;d++){var b=g[d].get_widget_list();for(var j=0,l=b.length;j<l;j++){var a=b[j];if(a.name==m){h.push(a.element)}}}return h}function get_fw_elements_by_name(m){var h=[];var g=Framework.get_canvas_list();for(var d=0,k=g.length;d<k;d++){var b=g[d].get_widget_list();for(var j=0,l=b.length;j<l;j++){var a=b[j];if(a.name==m){h.push(a)}}}return h}var _fw_trans_field_list=["_MODE","_ACTION","_CANVAS_NAME","_SUBMITTING_CANVAS_NAME","_ACTION_ID","_ROWID","_ROWVERSION"];function fw_trans_add_internal_fields(){var m=document.getElementsByTagName("FORM");for(var g=0;g<m.length;g++){var b=m[g];var a=m[g].name;var l=FW.SINGLE_VIEW_MODE;if(a.search("$MULTI")>-1){l=FW.MULTI_VIEW_MODE}var h=Framework.get_canvas(a,l);if(!h||!(h.className=="FW_Page_Canvas_SingleRow"||h.className=="FW_Page_Canvas_MultiRow")){continue}for(var d=0;d<_fw_trans_field_list.length;d++){var c=_fw_trans_field_list[d];var k=document.getElementsByName(a+"."+c);if(k){k=k[0]}if(!k){continue}var n=document.createElement("input");n.type="hidden";n.name=c;n.value=k.value;b.appendChild(n);if(FW_Browser.IE==true&&!b[c]){b[c]=n}}}}function fw_trans_do_fixes(){fw_trans_add_internal_fields()}var minimized=0;var maximized=1;var minimizeSrc="/images/application/minimize.gif";var maximizeSrc="/images/application/maximize.gif";var CookieName="FleetCookie";var _console=null;var listArray=new Array;function getFwWidgetRef(j){var h=j[0];var b;var l=h.id;var k=j[0].name.split(".");var a=k[0];var g=k[1];var d;var c=Framework.get_canvas(a);b=c.get_widget(g);return b}function validate_effective_date(a){var h=a[0];var d=a[1];var g=a[2];var c=a[3];var b=a[4];if(d.unformatted_value()<h.unformatted_value()){if(confirm(c+"\n"+b)){h.type.mask=d.type.mask;h.type.format();d.value(h.type.formatted_value);return true}return false}if(!(g.unformatted_value()==""||g.unformatted_value()==null)){if(g.unformatted_value()<d.unformatted_value()){return false}}return true}function validate_expiry_date(a){var c=a[0];var b=a[1];if(b.unformatted_value()==null){return true}if(b.unformatted_value()<c.unformatted_value()){return false}return true}function redirect_parent_window(b){var a=b[0].href;parent.opener.location.href="/cgi-bin/"+b[0].href.generate_get();return false}function ValidatePhoneNumber(c){var h=c[0];var o=c[1];var l=c[2];var p=c[3];var k=c[4];var j=c[5];var b=c[6];var t=getFwWidgetRef(new Array(h));if(t==null||t==undefined){return true}var d="";var g="";var y="";var q;var v=1;var n=7;if(p=="US"){g="US"}else{g=k.options[k.selectedIndex].value}for(q=0;q<j.options.length;q++){if(j.options[q].value==g){y=j.options[q].text}}switch(g){case"US":case"AI":case"AG":case"BS":case"BB":case"BM":case"CA":case"KY":case"DM":case"DO":case"GD":case"GU":case"JM":case"MS":case"MP":case"PR":case"KN":case"LC":case"VC":case"TT":case"TC":case"VG":case"VI":d="1";if(y==""){y=10}break;case"AU":d="61";if(y==""){y=11}break}var m=String(h.value);var a=new RegExp("[\\(|\\)|\\-|\\s*]","g");m=m.replace(a,"");var r=new RegExp("[^0-9]","g");t.valid(true);if(m.match(r)){alert(b);t.valid(false)}if(l=="Y"&&m.length<=0){t.required=true}if(m.length>0&&y!=""&&m.length!=y){alert(b);t.valid(false);return false}o.value=m;return true}function refresh_parent_window(a){var b=((a)?a:parent.opener.location.href);parent.opener.location.href="/page_reload.html?REFERER="+b}function close_window_refresh_parent(){refresh_parent_window();window.close()}function populate_parent_and_close(c){for(var d=0;d<c.length;d=d+2){var a=c[d];var b=c[d+1];alert(a.name);alert(g);var g=(parent.opener.document.getElementsByName(b))[0];g.value=a.value}window.close();return false}function populate_parent_row_and_close(h){var m=h.pop;var a=h[0];var j=h[1];var g=h[2];var k=h[3];var c=h[4];var b=get_widget(g,k,"First").value;var d=FW_Window.me();if(d){var l=d.opener.Framework;l.get_canvas(a).get_widget(j,b).value(c)}window.close();return false}function check_required_by_id(a){var b;var g="";var d;for(b=0;b<a.length;b++){var c=a[b];if(c){d=getFwWidgetRef(new Array(c));if(d.validate()==false){g+=d.label_value()+" is required.\n"}}}if(g){alert(g);return false}else{return true}}function warnUserDataLoss(args){var sourceObj=args[0];var sourceForm=args[1];var sourceName=args[2];var enableValue=args[3];var warnValue=args[4];var warnPhrase=args[5];var targetForm=args[6];var x;var y;var sourceValue;var warnValueArray=warnValue.split(",");var enableValueArray=enableValue.split(",");var confirmValue=false;var warnMatch=false;if(warnPhrase==""){return true}if(Framework.get_canvas(sourceForm)==null||Framework.get_canvas(sourceForm).mode()==FW.QUERY_MODE){return true}if(sourceObj){sourceValue=getWidgetVal(sourceObj)}else{if(sourceName){var sourceObjArray=new Array();var tempSourceObj=eval("document."+sourceForm+"."+sourceForm+"_"+sourceName);if(tempSourceObj.length){sourceObjArray=tempSourceObj}else{sourceObjArray[0]=tempSourceObj}for(x=0;x<sourceObjArray.length;x++){sourceValue=getWidgetVal(sourceObjArray[x]);if(sourceValue!=null){break}}}}if(warnValueArray[0]==""){warnMatch=true;for(y=0;y<enableValueArray.length;y++){if(sourceValue==enableValueArray[y]){warnMatch=false;break}}}else{for(x=0;x<warnValueArray.length;x++){if(sourceValue==warnValueArray[x]){warnMatch=true;break}}}if(warnMatch){for(x=7;x<args.length;x++){var targetObj=args[x];if(targetObj){var objArray=new Array();if(targetObj.length!=null&&targetObj.type==null){var tempObj;if(targetForm==""){tempObj=document.getElementsByName(targetObj)}else{tempObj=eval("document."+targetForm+"."+targetForm+"_"+targetObj)}if(tempObj.length){objArray=tempObj}else{objArray[0]=tempObj}}else{objArray[0]=targetObj}for(y=0;y<objArray.length;y++){if(getWidgetVal(objArray[y])!=""){confirmValue=true;break}}}}if(confirmValue){if(!confirm(warnPhrase)){if(sourceObj!=null){if(sourceObj.type=="select-one"){var name=sourceObj.name.split(".")[1];var widget=Framework.get_canvas(sourceForm).get_widget(name);widget.value(widget.initial_value)}}else{if(sourceName){var sourceObjArray=new Array();var tempSourceObj=eval("document."+sourceForm+"."+sourceForm+"_"+sourceName);if(tempSourceObj.length){sourceObjArray=tempSourceObj}else{sourceObjArray[0]=tempSourceObj}for(x=0;x<sourceObjArray.length;x++){switch(sourceObjArray[x].type){case"radio":sourceObjArray[x].checked=sourceObjArray[x].oldValue||"";break;case"hidden":var img=document.getElementById(sourceObjArray[x].id+"_img");if(img){if(sourceObjArray[x].oldValue==sourceObjArray[x].val_checked){img.src=CBImages[0]}else{img.src=CBImages[1]}}}}}}return false}}}return true}function enDisAbleObject(args){var sourceObj=args[0];var sourceForm=args[1];var sourceName=args[2];var enableVal=args[3];var disableVal=args[4];var warnPhrase=args[5];var targetForm=args[6];var sourceValue;var disable;var enableArray=enableVal.split(",");var disableArray=disableVal.split(",");var x;var y;var clearWidgets=false;if(disableArray[disableArray.length-1]=="CLEAR_WIDGETS"){clearWidgets=true;disableArray.length-=1;disableVal=disableVal.replace(/CLEAR_WIDGETS/,"");args[4]=disableVal;if(!warnUserDataLoss(args)){return false}}if(Framework.get_canvas(sourceForm)==null||Framework.get_canvas(sourceForm).mode()==FW.QUERY_MODE){return true}if(sourceObj){sourceValue=getWidgetVal(sourceObj)}else{if(sourceName!=""){var sourceObjArray=new Array();var tempSourceObj=eval("document."+sourceForm+"."+sourceForm+"_"+sourceName);if(tempSourceObj.name!=null){sourceObjArray[0]=tempSourceObj}else{if(tempSourceObj.length){sourceObjArray=tempSourceObj}}for(x=0;x<sourceObjArray.length;x++){switch(sourceObjArray[x].type){case"radio":case"checkbox":if(sourceObjArray[x].checked){sourceValue=sourceObjArray[x].value}break;case"select-one":sourceValue=sourceObjArray[x].value;break;case"hidden":sourceValue=sourceObjArray[x].value;break}if(sourceValue!=null){break}}}}if(sourceValue==null){return true}for(x=0;x<enableArray.length;x++){if(sourceValue==enableArray[x]){disable=false}}for(x=0;x<disableArray.length;x++){if(sourceValue==disableArray[x]){disable=true}}if(disable==null){if(enableVal==""){disable=false}else{if(disableVal==""){disable=true}else{return true}}}for(x=7;x<args.length;x++){var targetObj=args[x];if(targetObj){var objArray=new Array();if(targetObj.length!=null&&targetObj.type==null){var tempObj;if(targetForm==""){tempObj=getObjectID(targetObj)}else{tempObj=eval("document."+targetForm+"."+targetForm+"_"+targetObj)}if(tempObj.name==null){if(tempObj[0].type){objArray=tempObj}else{objArray[0]=tempObj}}else{objArray[0]=tempObj}}else{objArray[0]=targetObj}for(y=0;y<objArray.length;y++){var className="";objArray[y].disabled=disable;switch(objArray[y].type){case"text":case"textarea":if(disable){className="TextBoxDisabled";if(clearWidgets){objArray[y].value=""}}else{className="TextBox"}break;case"select-one":case"select-multiple":if(disable){if(objArray[y].name.search(/bank/i)>0){className="ListDisabled"}if(clearWidgets){objArray[y].value=""}}else{className="List"}break;case"radio":var myRadioRef=document.getElementsByName(objArray[y].name);for(var i=0;i<myRadioRef.length;i++){myRadioRef[i].disabled=disable}break;case"checkbox":if(disable&&clearWidgets){objArray[y].checked=false}break;case"image":if(disable){objArray[y].old_src=objArray[y].src;objArray[y].src=CBImages[2];var hiddenObj=getObjectID(objArray[y].id.replace(/_img/,""));if(clearWidgets&&hiddenObj){var hiddenOldObj=getObjectID(objArray[y].id.replace(/_img/,"_OLD"));if(hiddenOldObj){hiddenObj.value=hiddenOldObj.value;if(hiddenOldObj.value==objArray[y].val_checked){objArray[y].old_src=CBImages[0]}else{objArray[y].old_src=CBImages[1]}}}}else{if(objArray[y].old_src){objArray[y].src=objArray[y].old_src;objArray[y].old_src=""}}break}if(className){objArray[y].className=className}}}}return true}function en_dis_able_object(m){var h=m[0];var c=m[1];var k=m[2];var q=m[3];var b=m[4];var a;var j;var p,n,g,d;if(!h){return true}if(h.canvas.mode()==FW.QUERY_MODE){return true}if(typeof m[m.length-1]=="number"){m.pop()}a=h.value();if(a==null){return true}var o=RegExp("\\b"+a+"\\b");if(o.test(c)){j=false}if(o.test(k)){j=true}if(j==null){if(c==""){j=false}else{if(k==""){j=true}else{return true}}}if(j&&q&&b){warning:for(p=5,g=m.length;p<g;p++){var l=m[p];if(!(l instanceof Array)){l=[l]}for(n=0,d=l.length;n<d;n++){if(l[n].value()!==""){if(!confirm(b)){return false}break warning}}}}for(p=5,g=m.length;p<g;p++){var l=m[p];if(!(l instanceof Array)){l=[l]}for(n=0,d=l.length;n<d;n++){l[n].disabled(j);if(q){l[n].clear()}}}return true}function debug(a){if((_console==null)||(_console.closed)){_console=window.open("","console","width=600,height=300,resizable");_console.document.open("text/plain")}_console.focus();_console.document.writeln(a)}function DefaultBlockState(){var k;if(isIE){k=document.all.tags("TABLE")}else{k=document.getElementsByTagName("TABLE")}for(var d=0;d<k.length;d++){var h=k[d];var b;var j;var l;var c;if(isIE){b=h.forcestate;j=h.statevalue;l=h.stateimg;c=h.rememberstate}else{b=h.getAttribute("forcestate");j=h.getAttribute("statevalue");l=h.getAttribute("stateimg");c=h.getAttribute("rememberstate")}if(b!=null){SetBlockState(h,b);j=b}else{if(c==1){var a=getCookieValue(CookieName,h.id);if(a!=null){j=getCookieValue(CookieName,h.id);SetBlockState(h,a)}}}if(j!=null&&getCookie(h.id)==null){SetBlockState(h,j)}if(l!=null){var g=getObjectID(l);if(j==minimized){g.src=maximizeSrc}else{g.src=minimizeSrc}}}}function ChangeBlockState(d){for(x=0;x<d.length;x++){blockObj=getObjectID(d[x]);var b;var a;if(blockObj!=null){if(isIE){b=blockObj.statevalue;a=blockObj.stateimg}else{b=blockObj.getAttribute("statevalue");a=blockObj.getAttribute("stateimg")}if(a!=null){var c=getObjectID(a);if(b==minimized){c.src=minimizeSrc}else{c.src=maximizeSrc}}if(b==minimized){SetBlockState(blockObj,maximized)}else{SetBlockState(blockObj,minimized)}}}}function SetBlockState(b,a){if(isIE){b.statevalue=a}else{b.setAttribute("statevalue",a)}setCookieValue(CookieName,b.id,a);if(a==maximized){if(isIE){b.style.display=""}else{b.style.setProperty("display","","")}}else{if(a==minimized){if(isIE){b.style.display="none"}else{b.style.setProperty("display","none","")}}}}function popup_window(b){var a=b[0].href;b[0]=a;popup_by_program(b);var d=document;if(d.all){if(!c){var c=window.event}c.cancelBubble=true}return false}function popup_by_program(c){var b="";var g=2;for(var d=0;d<(c.length-g);d++){if(d!=0){b+=","}var a=g+d;b+=c[a]}if(b.search(/width\s+=/i)==-1){b+=((b.length>0)?",":"")+"width=800"}if(b.search(/height\s+=/i)==-1){b+=((b.length>0)?",":"")+"height=400"}if(b.search(/scrollbars\s+=/i)==-1){b+=((b.length>0)?",":"")+"scrollbars=yes"}if(b.search(/status\s+=/i)==-1){b+=((b.length>0)?",":"")+"status=yes"}if(b.search(/resizable\s+=/i)==-1){b+=((b.length>0)?",":"")+"resizable=yes"}var h=new FW_Window_Standard({url:c[0],width:400,height:200,autosizeonrefresh:true,autocenteronrefresh:true,autosize:true,autocenter:true});h.open();return false}function displayWaitMsg(a){var b=a.document.open();b.write("<HTML>");b.write('<HEAD><link type="text/css" rel="stylesheet" href="/style/application/msfleet.css"/>');b.write("</HEAD>");b.write("<BODY>");b.write('<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%" HEIGHT="100%">');b.write("<TR>");b.write('<TD WIDTH="100%" HEIGHT="100%" VALIGN="MIDDLE" ALIGN="CENTER">');b.write('<STRONG><h1><font color="black">Please wait. Loading screen.</font></h1></STRONG>');b.write("</TD>");b.write("</TR>");b.write("<TR>");b.write('<td valign="bottom" width="100%" align="right"><img width="1" id="MSFLEET_POPUP_AS_HOLDER" height="1" border="0" src="/images/application/spc.gif" /></td>');b.write("</TR>");b.write("</TABLE>");b.write('<SCRIPT Language="JavaScript">\n');b.write("      var window_width;\n");b.write(" var window_height;\n");b.write(" var NS4 = (document.layers) ? true : false;\n");b.write("  if (NS4) {\n");b.write("       window_width  = window.innerWidth;\n");b.write("       window_height = window.innerHeight;\n");b.write("  }  else {\n");b.write("       window_width  = document.body.clientWidth;\n");b.write("       window_height  = document.body.clientHeight;\n");b.write("  }\n");b.write("                 window.moveTo((screen.width / 2 - (window_width / 2)), (screen.height / 2 - (window_height / 2)));\n");b.write("</SCRIPT>\n");b.write("</BODY>\n");b.write("</HTML>\n");b.close();return false}function getObjectID(b){var a;if(document.all!=null){a=document.all[b]}if(a==null){a=document.getElementById(b);if(!a){a=(document.getElementsByName(b))[0]}}return a}function getImagePos(j,h){var k=(document.layers)?1:0;var c=(document.all)?1:0;var b;if(h){b=h.document.images[j]}else{b=document.images[j]}var d;var g;if(k==1){d=b.y;g=b.x}else{d=b.offsetTop;tempEl=b.offsetParent;while(tempEl!=null){d+=tempEl.offsetTop;tempEl=tempEl.offsetParent}g=b.offsetLeft;tempEl=b.offsetParent;while(tempEl!=null){g+=tempEl.offsetLeft;tempEl=tempEl.offsetParent}}var a=new Array(g,d);return a}function scrollable(a){if(a=="X"||a=="x"){window.scrollBy(1,0);if(document.body.scrollLeft>0){return 1}}else{if(a=="Y"||a=="y"){window.scrollBy(0,1);if(document.body.scrollTop>0){return 1}}}return 0}function scroll_size_x(){var a=window.scrollMaxX;if(a==null){a=document.body.scrollWidth-document.documentElement.clientWidth}return a}function scroll_size_y(){var a=window.scrollMaxY;if(a==null){a=document.body.scrollHeight-document.documentElement.clientHeight}return a}function AutoSize(){var d=0;var b=50;var c=50;window.resizeTo(c,b);var a=scroll_size_y();while(a>0){b+=a;window.resizeTo(c,b);if(d>100){break}d++;a=scroll_size_y()}d=0;a=scroll_size_x();while(a>0){c+=a;window.resizeTo(c,b);if(d>100){break}d++;a=scroll_size_x()}CenterWindow();return true}function CenterWindow(){var a=window.innerWidth;if(!a){a=document.documentElement.clientWidth}var b=window.innerHeight;if(!b){b=document.documentElement.clientHeight}window.moveTo((screen.width-a)/2,(screen.height-b)/2);return true}function disable_widget(widgetObject){if(widgetObject.value){eval("window."+widgetObject.name+"_DW = '"+widgetObject.value+"'")}var classContainer=eval("window."+widgetObject.name+"_DWC");if(widgetObject.className&&classContainer==null){eval("window."+widgetObject.name+"_DWC = '"+widgetObject.className+"'")}widgetObject.className="WidgetCanvasItemDisabled";widgetObject.disabled=true;widgetObject.value=""}function get_widget(a,b,d){var c=a;if(typeof(d)=="number"){c=c+"_$"+d}c=c+"_"+b;return document.getElementById(c)}function disable_widgetlink(h){var g=h[0];var c=h[1];var j=2;var m=h.length;if(typeof(h[m-1])==="number"){m-=1}var b=Framework.get_canvas(c,g);for(j=2;j<m;j+=1){var l=h[j];var k=b.get_widget(l);if(!k instanceof Array){k=[k]}if(k!=null){var a;var d=k.length;for(var a=0;a<d;a+=1){k[a].disabled(true)}}}return true}function enable_widget(widgetObject){var valueContainer=eval("window."+widgetObject.name+"_DW");var classContainer=eval("window."+widgetObject.name+"_DWC");widgetObject.disabled=false;if(classContainer){widgetObject.className=classContainer}if(valueContainer){widgetObject.value=valueContainer}}function invalid_widget(widgetObject){var WidgetErrorClass="WidgetCanvasItemError";var valueContainer=eval("window."+widgetObject.name+"_IW");if(widgetObject.className&&valueContainer==null){eval("window."+widgetObject.name+"_IW = '"+widgetObject.className+"'")}widgetObject.className=WidgetErrorClass}function valid_widget(widgetObject){var valueContainer=eval("window."+widgetObject.name+"_IW");if(valueContainer){widgetObject.className=valueContainer}}var menuUp=0;var menuDown=1;var menuSrc=new Array(2);var menuSelSrc=new Array(2);menuSrc[menuUp]="/images/application/menu_up.gif";menuSrc[menuDown]="/images/application/menu_down.gif";menuSelSrc[menuUp]="/images/application/menu_up_selected.gif";menuSelSrc[menuDown]="/images/application/menu_down_selected.gif";var menuCookieName="SideBarCookie";var menuHeadName="SideBarHead";var global=window.document;function set_menu_state(){global.menu_currentMenu=getCookieValue(menuCookieName,menuHeadName);if(global.menu_currentMenu!=null){show_sub_menu(global.menu_currentMenu,1)}}function toggle_sub_menu(a){if(global.menu_currentMenu!=null&&global.menu_currentMenu!=a){hide_sub_menu(global.menu_currentMenu)}if(global.menu_currentMenu==a){hide_sub_menu(a)}else{show_sub_menu(a,1)}}function show_sub_menu(g,a){if(g.search(/_NULL$/)>=0){return}var h=g.replace(/MSFleet\w*NavBar/i,"");var c=document.getElementById(h);if(!(c)){h+="_TD";c=document.getElementById(h)}if(c){var b=((h.search(/_TD$/)>=0)?menuSelSrc[menuDown]:menuSrc[menuDown]);if(isIE){c.style.backgroundImage="url('"+b+"')"}else{c.style.setProperty("background-image","url('"+b+"')","")}}var d=document.getElementById(g);if(d){d.style.display="";global.menu_currentMenu=g;if(a){setCookieValue(menuCookieName,menuHeadName,global.menu_currentMenu,"/")}}}function hide_sub_menu(d){if(d.search(/_NULL$/)>=0){return}var g=d.replace(/MSFleet\w*NavBar/i,"");var b=document.getElementById(g);if(!(b)){g+="_TD";b=document.getElementById(g)}if(b){var a=((g.search(/_TD$/)>=0)?menuSelSrc[menuUp]:menuSrc[menuUp]);if(isIE){b.style.backgroundImage="url('"+a+"')"}else{b.style.setProperty("background-image","url('"+a+"')","")}}var c=document.getElementById(d);if(c){c.style.display="none";global.menu_currentMenu=null;deleteCookie(menuCookieName,"/")}}function destroy_menu_state(){deleteCookie(menuCookieName,"/")}function printProperties(b){var a=" ";var c=0;for(curProperty in b){c++;a+=curProperty+",";if(c==5){a+="\n";c=0}}alert(a)}var prevSelectedWidget;var prevSelectedClass;var origLinkArray=new Array();var origClass;function selectRow(b,k,j){var h=0;if(prevSelectedWidget==b&&j==1){b.className=prevSelectedClass;for(var d=0;d<k.length;d=d+2){var g=document.getElementById(k[d+1]);g.innerHTML=origLinkArray[d]}prevSelectedWidget=null;prevSelectedClass=null;origLinkArray=new Array();origClass=null;return}if(prevSelectedWidget!=null){var a=prevSelectedWidget;a.className=prevSelectedClass}else{h=1}prevSelectedWidget=b;prevSelectedClass=b.className;b.className="MultiRowRecordSelected";for(var d=0;d<k.length;d=d+2){var c=document.getElementById(k[d]);var g=document.getElementById(k[d+1]);if(h){origLinkArray[d]=g.innerHTML}g.innerHTML=c.innerHTML}}function setCookie(b,k,d,m){var j=new Date();var c=j.getYear()+j.getMonth()+j.getDay()+j.getTime();var k=h(k,"p_last_used_ts",c);var g=window.location.host.replace(":"+window.location.port,"");var a=window.location.protocol=="https"?true:false;var l=b+"="+k+((d)?"; expires="+d.toGMTString():"")+((m)?"; path="+m:"")+((g)?"; domain="+g:"")+((a)?"; secure":"");document.cookie=l;function h(q,n,r){if(q==null){setCookie(CookieName,n+"="+r+",");return true}var p=q.indexOf(n+"=");if(p==-1){q=q+n+"="+r+","}else{var v=q.indexOf(",",p);var t=q.substring(0,p);var o=q.substring(v,q.length);q=t+n+"="+r+o}return q}}function getCookie(a){var o=document.cookie;var k=a+"=";var n=1;var d=0;var l=0;var j=-1;var m;while(n==1){l=l+1;begin=o.indexOf(k,d);if(begin==-1){n=0}else{var g=o.indexOf(";",begin);if(g==-1){g=o.length}var c=unescape(o.substring(begin+k.length,g));var h=b(c,"p_last_used_ts");if(h==null){h=0}if(h>j){m=c;j=h}d=begin+1}if(l>5){n=0;return null}}return m;function b(r,p){if(r==null){return null}var q=r.indexOf(p+"=");if(q==-1){return null}var t=r.indexOf("=",q);var v=r.indexOf(",",q);if(v==-1){v=r.length}r=r.substring(t+1,v);return r}}function getCookieValue(a,b){var d=getCookie(a);if(d==null){return null}var c=d.indexOf(b+"=");if(c==-1){return null}var g=d.indexOf("=",c);var h=d.indexOf(",",c);if(h==-1){h=d.length}d=d.substring(g+1,h);return d}function setCookieValue(k,g,l,h){var d=getCookie(k);if(d==null){setCookie(k,g+"="+l+",",null,h);return true}var c=d.indexOf(g+"=");if(c==-1){d=d+g+"="+l+","}else{var j=d.indexOf(",",c);var a=d.substring(0,c);var b=d.substring(j,d.length);d=a+g+"="+l+b}setCookie(k,d,null,h,null,1);return true}function deleteCookie(a,c,b){if(getCookie(a)){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}}function HintBar(b,d,c){var a="HintBar";if(c==null){c=a}ContentInfo.textHTML=((b.length>0)?'<table border="0" width="100%" cellpadding="1" cellspacing="0"><tr><td width="100%" class="'+c+'" nowrap>'+b+"</td></tr></table>":b);ContentInfo.textLen=b.length;hint_bar_content(d+"_HintBar")}function hint_bar_content(hintName){if(isIE){document.all[hintName].innerHTML=ContentInfo.textHTML;if(ContentInfo.textLen>0){document.all[hintName].style.visibility="visible"}else{document.all[hintName].style.visibility="hidden"}}else{if(isNetscape4){with(document.layers[hintName].document){open();write(ContentInfo);close()}}else{if(isNetscape6up){var alayer=document.getElementById(hintName);alayer.innerHTML=ContentInfo.textHTML;if(ContentInfo.textLen>0){alayer.style.visibility="visible"}else{alayer.style.visibility="hidden"}}}}}function redirect_parent_window_and_close(a){refresh_parent_window(a[0].href);window.close();return false}function updateField(a,h){if(typeof(a)=="object"){var o=a[0];var g=a[1];a=o;h=g}var k=document.getElementById(h);var q=document.getElementById(a);var j=false;var p;var d=new Array();var b=new Array();var c=new Array();var n,m,l;if(q){b[0]=q;q=true}else{b=document.getElementsByName(a);q=((b.length>0)?true:false)}if(k){c[0]=k;k=true}else{c=document.getElementsByName(h);k=((c.length>0)?true:false)}if(q&&k){for(n=0;n<b.length;n++){switch(b[n].type){case"hidden":case"text":case"textarea":p=b[n].value;j=true;break;case"radio":case"checkbox":if(b[n].checked){p=b[n].value;j=true}else{p=null}break;case"select-one":p=b[n].options[b[n].selectedIndex].value;j=true;break;case"select-multiple":p=b[n].options[b[n].selectedIndex].value;j=true;for(m=0;m<b[n].length;m++){if(b[n].options[n].selected){d.push(b[n].options[n].value)}}break;default:return false}if(j){break}}if(j==false){return false}for(n=0;n<c.length;n++){switch(c[n].type){case"hidden":case"text":case"textarea":c[n].value=p;break;case"radio":case"checkbox":if(p==c[n].value){c[n].checked=true}break;case"select-one":for(n=0;n<c[n].length;n++){if(c[n].options[n].value==p){c[n].options[n].selected=true;break}}break;case"select-multiple":for(m=0;m<c[n].length;m++){c[n].options[m].selected=false;for(l=0;l<d.length;l++){if(c[n].options[m].value==d[l]){c[n].options[m].selected=true}}}break;default:return false}}}}function ValDateVsSystemDate(args){var sysDateRef=args[0];var canvasStr=args[1];var dateStr=args[2];var disableStr=args[3];var dateRef;if(eval("document."+canvasStr+"._ACTION.value")==DO_QUERY){return true}if(!(eval("document."+canvasStr+"."+dateStr+"_"+disableStr))){dateRef=document.getElementById(canvasStr+"_"+dateStr);if((sysDateRef.internal_value>dateRef.internal_value)&&(dateRef.internal_value!=null)){return false}}return true}function overhere(e){var Ex,Ey;if(isNetscape){Ex=e.pageX;Ey=e.pageY}else{Ex=e.clientX;Ey=e.clientY}if(initialize){if(status_bar){if(isIE){status_bar.innerHTML=ContentInfo.textValue;status_bar.style.visibility="visible"}else{if(isNetscape4){with(document.layers[status_bar.id].document){open();write(ContentInfo.textValue);close()}}else{if(isNetscape6up){status_bar.innerHTML=ContentInfo.textValue;status_bar.style.visibility="visible"}}}}else{move_bubble_hint(Ey,Ex);if(isIE){document.all[layerName].style.visibility="visible"}else{if(isNetscape4){document.layers[layerName].visibility="visible"}else{if(isNetscape6up){var adoc=doc.getElementById(layerName);adoc.style.visibility="Visible"}}}}}else{if(status_bar){if(isIE){status_bar.innerHTML="";status_bar.style.visibility="hidden"}else{if(isNetscape4){with(document.layers[status_bar.id].document){open();write("");close()}}else{if(isNetscape6up){status_bar.innerHTML="";status_bar.style.visibility="hidden"}}}}else{move_bubble_hint(0,0);if(isIE){document.all[layerName].style.visibility="hidden";document.all[layerName].style.zIndex=10}else{if(isNetscape4){document.layers[layerName].visibility="hidden"}else{if(isNetscape6up){var adoc=doc.getElementById(layerName);if(adoc!=null){adoc.style.visibility="Hidden"}}}}}}}function check_comments(b){var a=b[0];var d=b[1];var c=b[2];var h="";if(c==""){c=b[b.length-1]}var g=a+"_$"+c+"_"+d;var j=getObjectID(g);if(j){j.valid=true;j.reqd=true;if(!check_required(j)){h=constraint_error[0].replace(/#name#/,g+"_label")+"\n";if(h){alert(h);return false}}}else{h="Unable to verify  "+d+"  has a value";alert(h);return false}return true}function RedirectFrameParent(a){parent.location.href=a}function FormatPhoneNumber(m){var o=m[0];var b=m[1];var n=m[2];var k=m[3];var p=o.value;var q="";var d="";var h="";var a;var g=0;var c=0;var l=new RegExp("[^0-9]","g");p=p.replace(l,"");if(b=="US"){a="US"}else{a=n.options[n.selectedIndex].value}for(g=0;g<k.options.length;g++){if(k.options[g].value==a){q=k.options[g].text}else{if(k.options[g].value=="US"){d=k.options[g].text}}}if(q==""){if(d!=""){q=d}else{q="xxxxxxxxxxxxxxxxxxxx"}}for(g=0,c=0;g<20&&c<p.length;g++){if(q.charAt(g)=="x"||g>=q.length){h=h+p.charAt(c);c++}else{h=h+q.charAt(g)}}o.value=h;return true}function req1BasedOnVal2(h){var g=h[0];var d=h[1];var o=h[2];var a=h[3]+1;var j=o.split(",");var l=0;var m=false;var n="";var c="";if(!(g&&d)){return true}c=d.value();for(l=0;l<j.length;l++){if(j[l].search(/\!\=/)>=0){if(c!=j[l].replace(/\!\=/,"")){n+=" "+constraint_error[6]+" ";m=true;break}}else{if(c==j[l]){m=true;break}}}if(m){if(d.widget_type==FW.WIDGET_TYPE_LIST){n+=d.options()[d.selected_index()].text}else{if(d.widget_type==FW.WIDGET_TYPE_RADIO||d.widget_type==FW.WIDGET_TYPE_CHECKBOX){n+=constraint_error[5]}else{n+=j[l]}}}if(m){if(g.value()==""){var b=g.label_text;var k=d.label_text;if(b==null){b=g.label_value()}if(k==null){k=d.label_value()}this.val_errmsg=this.val_errmsg.replace(/#widget1#/,b);this.val_errmsg=this.val_errmsg.replace(/#widget2#/,k);this.val_errmsg=this.val_errmsg.replace(/#value#/,n);this.val_errmsg=this.val_errmsg.replace(/#row#/,a);g.valid(false);return false}}return true}function validateWidgetLength(j){var h=j[0];var a=j[1];var d=constraint_error[7];var p=j[2];var m=h.name;var l=m.indexOf(".");var o=m.substr(0,l);var c=m.substr(l+1);var b;var n;if(c.substr(0,1)=="$"){n=c.indexOf("_");c=c.substr(n+1);b=Framework.get_canvas(o,FW.VIEW_MODE_MULTI).get_widget(c,0).label_value()}else{b=Framework.get_canvas(o,FW.VIEW_MODE_SINGLE).get_widget(c).label_value()}var k=h.value;if(k.length>a){try{this.val_errmsg=this.val_errmsg.replace(/#widget_label#/,b);this.val_errmsg=this.val_errmsg.replace(/#length#/,a)}catch(g){}return false}return true}function getWidgetVal(a){var b="";if(a){switch(a.type){case"hidden":case"text":case"textarea":b=a.value;break;case"radio":case"checkbox":if(a.checked){b=a.value}break;case"select-one":b=a.options[a.selectedIndex].value;break;case"select-multiple":b=a.options[a.selectedIndex].value;break}}return b}function saveSelectIndex(b){var d=b;var c;for(c=0;c<b.length;c++){if(d[c]&&d[c].type=="select-one"&&d[c].disabled==false){d[c].oldSelectedIndex=d[c].selectedIndex;var a=document.getElementById(d[c].id+"_OLD");a.value=d[c].options[d[c].selectedIndex].value}}return true}function saveWidgetOldValue(g){var h=g;var a;var j;var b;var c,d;for(a=0;a<g.length;a++){b=document.getElementsByName(h[a]);for(j=0;j<b.length;j++){if(b[j]){switch(b[j].type){case"radio":case"hidden":b[j].oldValue=b[j].value;break}}}}return true}function clearCheckboxWidgets(b){var d;var h;var c;var a;var g;for(d=0;d<b.length-1;d+=2){h=document.getElementById(b[d]+"_"+b[d+1]);if(h&&h.type=="hidden"){g=h.form._MODE.value;c=document.getElementById(b[d]+"_"+b[d+1]+"_img");if(!c){c=getObjectID(b[d]+"$"+b[d+1]+"$img")}if(c){if(g==1||g==2){if(!(c.src==CBImages[2])){c.src=CBImages[1];h.value="N"}}else{if(g==3){a=getObjectID(h.id+"_OLD");if(a){h.value=a.value;if(h.value==h.val_checked){c.src=CBImages[0]}else{if(h.value==h.val_unchecked){c.src=CBImages[1]}else{c.src=CBImages[2]}}}}}}}}return true}function changeThis(b){var k=b[0];var j=b[1];var h=b[2];var d;var a;var c;if(j=="Y"){k="$"+h+"_"+k}d=(document.getElementsByName(k))[0];var g=getFwWidgetRef(new Array(d));if(g!=null){g.changed(true)}return true}function applyListArray(c){var d;var b=c[0].options[c[0].selectedIndex].value;var g=c[1];var a=c[2];var h;for(d=g.options.length-1;d>=0;d--){if(g.options[d].value!=""){g.options[d]=null}}for(d=0;d<listArray[a][b].length;d++){h=new Option();h.text=listArray[a][b][d][1];h.value=listArray[a][b][d][0];h.defaultSelected=false;h.selected=false;g.options[g.options.length]=h}return true}function showHelp(b){for(var c=0;c<b.length-1;c++){var a=document.getElementById(b[c]+"_HELP");if(a.style.display=="none"){if(isIE){a.style.display=""}else{a.style.setProperty("display","","")}}else{if(isIE){a.style.display="none"}else{a.style.setProperty("display","none","")}}}}function my_set_form_changed(a){Logger.srt(this,"my_set_form_changed",VALIDATION_LOG_LEVEL);a[0].row_changed(0,true);Logger.end();return true}function reloadParents(){refresh_parent_window();try{var a=parent.opener.refresh_parent_window()}catch(b){}return true}function reqAtLeastOneField(a){var d=a[0];var c;for(var b=1;b<a.length-1;b++){c=a[b];highlight_caption(c,false)}for(var b=1;b<a.length-1;b++){c=a[b];if(c.value!=null&&c.value!=""){return true}}for(var b=1;b<a.length-1;b++){c=a[b];highlight_caption(c,true)}alert(d);return false}function validateWidgetIsOnlyNumeric(b){var a=b[0];if(a.value!=""){if(!/^[0-9]*$/.test(a.value)){return false}}return true}function validateNumberMaxMin(h){var g=h[0];var k=h[1];var l=h[2];var b=Number(k.value);var j=Number(l.value);var c=constraint_error[7];var a=getFwWidgetRef(new Array(g));if((g.value<b)||(g.value>j)){try{this.val_errmsg=this.val_errmsg.replace(/#min#/,k.value);this.val_errmsg=this.val_errmsg.replace(/#max#/,l.value)}catch(d){}return false}return true}function updateFactorInfoLink(c){var b=c[0];var a=c[1];try{a.href=a.href.generate_get()}catch(d){}if(b.selectedIndex!=0){a.href=a.href.replace(/FACTOR_NO=[0-9]*/,"FACTOR_NO="+b.options[b.selectedIndex].value)}else{a.href=a.href.replace(/FACTOR_NO=[0-9]*/,"FACTOR_NO=")}return true}function ValidateEmailAddress(c){var o=c[0];var j=o.value;var m=c[1];var n=c[2];var t=/^(com|net|org|edu|int|mil|gov|biz|aero|name|coop)$/;var A=/^(.+)@(.+)$/;var z='\\(\\)><@,;:\\\\\\"\\.\\[\\]';var p="[^\\s"+z+"]";var g='("[^"]*")';var d=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;var a=p+"+";var y="("+a+"|"+g+")";var q=new RegExp("^"+y+"(\\."+y+")*$");var b=j.match(A);if(n==0&&j.length==0){return true}if(j.length==0){return false}if(b==null){return false}var B=b[1];var C=b[2];for(r=0;r<B.length;r++){if(B.charCodeAt(r)>127){return false}}for(r=0;r<C.length;r++){if(C.charCodeAt(r)>127){return false}}if(B.match(q)==null){return false}var l=C.match(d);if(l!=null){for(var r=1;r<=4;r++){if(l[r]>255){return false}}return true}var k=new RegExp("^"+a+"$");var h=C.split(".");var v=h.length;for(r=0;r<v;r++){if(h[r].search(k)==-1){return false}}if(m&&h[h.length-1].length!=2&&h[h.length-1].search(t)==-1){return false}if(v<2){return false}return true}function verify_date_not_in_past(a){var c=a[0];var b=a[1];if(b.type.unformatted_value==""||b.type.unformatted_value==null){return true}if(b.type.unformatted_value<c.type.unformatted_value){return false}return true}function reload_parent(b){if(reload_the_parent){var a=b[0].href;parent.opener.location.href="/cgi-bin/"+a.generate_get();window.close()}return true}function widget_required(b){var c=b[0];for(var a=0;a<c.length;a++){var d=c[a];if(d!=null){if(d.value().length==0){d.valid(false);alert(d.label_value()+" is required");return false}else{d.valid(true)}}}return true}function fw_display_menu(k){Logger.srt(this,"fw_display_menu");Logger.msg("Searching for DIV ID ["+k[0]+"]");var b=document.getElementById(k[0]);if(b==null){Logger.end();return true}var a=b.childNodes;for(var h=0,g=a.length;h<g;h++){var m=b.childNodes[h];var n=m.nodeName;if(n=="DIV"){var j=c(m);if(j==null){Logger.error("Couldnt find UL underneath DIV");Logger.end();return true}Logger.msg("Found DIV && Sub UL, setting up menu");var d=new FW_Menu({element:j,logger:Logger,event:FW_Menu.EVENT_CLICK,initial_state:FW_Menu.INITIAL_STATE_HIDDEN,restrict_one_sibling:true,remember_state:true,display:FW_Menu.DISPLAY_ORIGINAL})}}function c(t){var r=t.childNodes;for(var q=0,o=r.length;q<o;q++){var v=r[q];if(v.nodeName=="UL"){return v}else{var p=c(v);if(p){return p}}}}return true}function msfleet_clear_widgets(b){var d=b;var a=d.length-1;for(var c=0;c<a;c++){d[c].clear(false)}return true}function program_handle_enter(){var d=Framework.get_canvas_list();var b=0;var c=d.length;while(b<c){var a=d[b];if(a.focused()){a.navigate_widget_forward();return false}b++}return false}function populate_detail_widgets(a){var c=a;var d=c.length;var b=0;while(b<d){var g=c[b];if(g!=null){g.apply_relations()}b++}return true}function fix_format_mask(b){var c=b[0];var a=b[1];c.type.mask=a;return true}function add_timeout_event(a){var b=a[0];var c=a[1];window.setTimeout(b,c);return true}function clear_radio_buttons(h){var m=h[0];var n=m.length;for(var c=0;c<n;c++){var g=m[c];var k=g.initial_value;var l=document.getElementsByName(g.element.name);var b=l.length;for(var a=0;a<b;a++){var d=l[a];if(d.value==k){d.checked=true}else{d.checked=false}}}return true}try{WRElement.prototype._hide_picker=function(){var a=this._widget;while(a=a.nextSibling){if(a!=null){if(a.nodeName=="IMG"&&a.src.search("picker")!=-1){a.style.display="none";break}}}};WRElement.prototype._show_picker=function(){var a=this._widget;while(a=a.nextSibling){if(a!=null){if(a.nodeName=="IMG"&&a.src.search("picker")!=-1){a.style.display="";break}}}};WRElement.prototype.hide=function(){if(this._widget.display!=null){this._widget.display="none"}else{this._widget.style.display="none"}var a=document.getElementById(this._widget.caption);if(a!=null){a.style.display="none"}if(this._widget.nodeName=="INPUT"){this._hide_picker()}};WRElement.prototype.show=function(){if(this._widget.display!=null){this._widget.display=""}else{this._widget.style.display=""}var b=document.getElementById(this._widget.caption);if(b!=null){b.style.display=""}var a=this._widget;if(this._widget.nodeName=="INPUT"){this._show_picker()}};WRElement.prototype.enable=function(){this._widget.disabled=false;if(this._widget.nodeName=="INPUT"){this._show_picker()}this._remove_hidden()};WRElement.prototype.disable=function(){this._widget.disabled=true;if(this._widget.nodeName=="INPUT"){this._hide_picker()}this._add_hidden()};WRElement.prototype.required=function(c){this.Logger.srt(this,"required",this.log_level);this.Logger.msg("Setting required to ["+c+"] for ["+this._widget.id+"]");if(this._widget.caption!=null){var b=document.getElementById(this._widget.caption);var a=b.className;if(c==1){this._widget.reqd=1;b.className=a.replace(/(.+)/,"$1 Required")}else{this._widget.reqd=0;b.className=a.replace(/(.+) Required/,"$1")}}this.Logger.end()}}catch(e){}function popup_date_picker(d,c,a,b){if(!a){a=_fw_open_window_standard("/framework/blank.html","DatePicker","autosize=0,autocenter=1,autosizeonrefresh=1,autocenteronrefresh=0,modal=0,width=300,height=200,resizable=0,moveable=1,statusbar=0,menubar=0,titlebar=1,showloading=0,showloading=0,dynamicgen=1,minimizable=0,close=1,showloading=0,showloading=0,closeonblur=0,")}popup_date_picker_fw(d,c,a,b)}function popup_date_picker_fw(o,p,t,m){var r=245;if(o.format_mask.indexOf("%H")>=0){have_hrs=true;r+=35;if(o.format_mask.indexOf("%M")>=0){have_mins=true;have_secs=(o.format_mask.indexOf("%S")>=0)}}var q=(isNetscape?window.innerWidth:document.body.offsetWidth);var k=(isNetscape?window.innerHeight:document.body.offsetHeight);var g=p.screenX;var c=p.screenY;window.copy_to=o;var n=t.window.document;n.open();n.fw_page_loaded=false;n.writeln("<html>");n.writeln("<head><title>"+messages[3]+"</title></head>");n.writeln('<body class="Calendar" onload="date_picker_init();">');n.writeln("<script>");n.writeln("var w_parent, e_dst, e_year, e_month, e_cells = new Array (42);");n.writeln("<\/script>");n.writeln("<script>");n.writeln("// Include all CSS files in main document");n.writeln("var my_opener = (window.w_opener != null) ? ( window.w_opener) : ( window.opener )");n.writeln("var link_list =my_opener.document.getElementsByTagName('LINK');");n.writeln("for (var i = 0; i < link_list.length; i++) {");n.writeln("    if (link_list[i].type != 'text/css') {");n.writeln("        continue;");n.writeln("    }");n.writeln("    var new_link = document.createElement('LINK'); ");n.writeln("    new_link.type = link_list[i].type;");n.writeln("    new_link.rel = link_list[i].rel;");n.writeln("    new_link.href = link_list[i].href;");n.writeln("    window.document.body.appendChild(new_link);");n.writeln("}");n.writeln("<\/script>");n.writeln("<script>\n");n.writeln("var     have_hrs        = have_mins = have_secs = false,");n.writeln("e_hours         = new Object(),");n.writeln("e_minutes       = new Object(),");n.writeln("e_seconds       = new Object() ;");n.writeln("function date_picker_init ()");n.writeln("{");n.writeln("     var row, col, today ;");n.writeln("");n.writeln("     w_parent = window.w_opener || window.opener;");n.writeln("     e_dst = w_parent.copy_to ;");n.writeln("     e_hours.value = e_minutes.value = e_seconds.value = 0 ;");n.writeln('     if (e_dst.format_mask.indexOf("%H") >= 0) {');n.writeln("             have_hrs = true ;");n.writeln('             if (e_dst.format_mask.indexOf("%M") >= 0) {');n.writeln("                     have_mins = true ;");n.writeln('                     have_secs = (e_dst.format_mask.indexOf("%S") >= 0) ;');n.writeln("             }");n.writeln("     }");n.writeln("     w_parent.populate_date_min_max (e_dst) ;");n.writeln('     e_year = document.getElementById ("year").firstChild ;');n.writeln('     e_month = document.getElementById ("month") ;');n.writeln("     for (row = 0 ; row < 6 ; row++) {");n.writeln("             for (col = 0 ; col < 7 ; col++) {");n.writeln('                     e_cells [row * 7 + col] = document.getElementById ("c" + row + col).firstChild ;');n.writeln("             }");n.writeln("     }");n.writeln("     today = new Date() ;");n.writeln("     e_year.data = today.getFullYear() ;");n.writeln("     e_month.value = today.getMonth() ;");n.writeln("");n.writeln("     if (have_hrs) {");n.writeln('             e_hours = document.getElementById ("hours") ;');n.writeln("             e_hours.value = today.getHours() ;");n.writeln("             if (have_mins) {");n.writeln('                     e_minutes = document.getElementById("minutes") ;');n.writeln("                     e_minutes.value = today.getMinutes() ;");n.writeln("                     if (have_secs) {");n.writeln('                             e_seconds = document.getElementById ("seconds") ;');n.writeln("                             e_seconds.value = today.getSeconds() ;");n.writeln("                     }");n.writeln("             }");n.writeln("     }");n.writeln("     date_picker_refresh_cal() ;");n.writeln('     window.title = "'+messages[3]+'";');n.writeln("     document.fw_page_loaded = true;");n.writeln("}");n.writeln("");n.writeln("function date_picker_change_month (i)");n.writeln("{");n.writeln("     var new_month = (e_month.value - 0) + i ;");n.writeln("     var new_year = (e_year.data - 0) ;");n.writeln("     if (new_month < 0) {");n.writeln("             new_month = 11 ;");n.writeln("             new_year-- ;");n.writeln("     }");n.writeln("     if (new_month > 11) {");n.writeln("             new_month = 0 ;");n.writeln("             new_year++ ;");n.writeln("     }");n.writeln("     if ((new_year >= e_dst.date_min.getFullYear()) && (new_year <= e_dst.date_max.getFullYear())) {");n.writeln("             e_year.data = new_year ;");n.writeln("             e_month.value = new_month ;");n.writeln("             date_picker_refresh_cal () ;");n.writeln("     }");n.writeln("}");n.writeln("");n.writeln("function date_picker_change_year (i)");n.writeln("{");n.writeln("     var new_year = (e_year.data - 0) + i ;");n.writeln("     if ((new_year >= e_dst.date_min.getFullYear()) && (new_year <= e_dst.date_max.getFullYear())) {");n.writeln("             e_year.data = new_year ;");n.writeln("             date_picker_refresh_cal () ;");n.writeln("     }");n.writeln("}");n.writeln("");n.writeln("function date_picker_refresh_cal ()");n.writeln("{");n.writeln("     var D,");n.writeln("             dom, dow,");n.writeln("             i ;");n.writeln("");n.writeln("//");n.writeln("//   Clear all cells to start with");n.writeln("//");n.writeln("     for (i = 0 ; i < 42 ; i++) {");n.writeln('             e_cells [i].data = "" ;');n.writeln("     }");n.writeln("     D = new Date (e_year.data, e_month.value, 1) ;");n.writeln("//");n.writeln("//   Fill in the rest of the days");n.writeln("//");n.writeln("     i = 0 ;");n.writeln("     while (true) {");n.writeln("             dom = D.getDate () ;");n.writeln("             dow = D.getDay () ;");n.writeln("             if ((D.getTime() >= e_dst.date_min.getTime()) && (D <= e_dst.date_max.getTime())) {");n.writeln("                     e_cells[i * 7 + dow].data = dom ;");n.writeln("             } else { ");n.writeln("             }");n.writeln("             if (dow == 6)");n.writeln("                     i++ ;");n.writeln("             D.setDate (dom + 1) ;");n.writeln("             if (D.getMonth() != e_month.value)");n.writeln("                     break ;");n.writeln("     }");n.writeln("}");n.writeln("");n.writeln("function date_picker_return_val (idx)");n.writeln("{");n.writeln(" e_dst.value =");n.writeln("       w_parent.format_date (");n.writeln("             new Date (");n.writeln("                   e_year.data,");n.writeln("                   e_month.value,");n.writeln("                   e_cells [idx].data,");n.writeln("                   e_hours.value,");n.writeln("                   e_minutes.value,");n.writeln("                   e_seconds.value");n.writeln("             ),");n.writeln("             e_dst.format_mask");n.writeln("       ) ;");n.writeln(" w_parent = window.w_opener || window.opener;");n.writeln(" w_parent.fwk_change (e_dst) ;");n.writeln(" window.close() ;");n.writeln("}");n.writeln("<\/script>");n.writeln("<form name=dummy>");n.writeln('<table cellpadding="0" cellspacing="0" class="MonthYearSelect">');n.writeln('<tr><td align="center">');n.writeln('<a onmouseover="document.month_minus.src=\'/images/framework/minus_sel.gif\' ;"onmouseout="document.month_minus.src=\'/images/framework/minus.gif\'"onclick="date_picker_change_month(-1) ;">');n.writeln('<image name="month_minus" src="/images/framework/minus.gif"border=0></a>');n.writeln('<select id="month" onchange="date_picker_refresh_cal() ;">');for(var l=0;l<12;l++){n.writeln("<option value="+l+">"+init_cap(mth_long[l])+"</option>")}n.writeln("</select>");n.writeln('<a onmouseover="document.month_plus.src=\'/images/framework/plus_sel.gif\' ;"onmouseout="document.month_plus.src=\'/images/framework/plus.gif\'"onclick="date_picker_change_month(1) ;">');n.writeln('<image name="month_plus" src="/images/framework/plus.gif"border=0></a>');n.writeln('<a onmouseover="document.year_minus.src=\'/images/framework/minus_sel.gif\' ;"onmouseout="document.year_minus.src=\'/images/framework/minus.gif\'"onclick="date_picker_change_year(-1) ;">');n.writeln('<image name="year_minus" src="/images/framework/minus.gif"border=0></a>');n.writeln('<span id="year">0000</span>');n.writeln('<a onmouseover="document.year_plus.src=\'/images/framework/plus_sel.gif\' ;"onmouseout="document.year_plus.src=\'/images/framework/plus.gif\'"onclick="date_picker_change_year(1) ;">');n.writeln('<image name="year_plus" src="/images/framework/plus.gif"border=0></a>');n.writeln("</td></tr>");n.writeln('<tr><table cellpadding="0" cellspacing="0" class="Days"><tr>');for(var l=0;l<7;l++){n.writeln('<td  align="left" class="DayTitle '+(((l==0)||(l==6))?"DayWeekend":"DayWeek")+'"'+((l==0)?"":"")+">"+init_cap(day_short[l])+"</td>")}n.writeln("</tr>");for(var l=0;l<6;l++){n.writeln("<tr>");for(var h=0;h<7;h++){n.writeln('<td  class="Day '+(((h==0)||(h==6))?"DayWeekend":"DayWeek")+'"'+((h==0)?"":"")+"><a onmouseout=\"this.className = this.className.replace('DayHighlight', '')\"onmouseover=\"this.className += ' DayHighlight'\"href=\"javascript:date_picker_return_val("+(l*7+h)+') ;" id="c'+l+h+'">&nbsp;</a></td>')}n.writeln("</tr>")}n.writeln("</table></tr>");if(have_hrs){n.writeln('<tr><table cellpadding="0" cellspacing="0" class="TimeSelect"><tr><td align="center">');n.writeln('<image src="/images/framework/clock.gif" border=0><select id="hours">');for(l=0;l<24;l++){n.writeln("<option value="+l+">"+(l<10?"0":"")+l+"</option>")}n.writeln("</select>:");if(have_mins){n.writeln('<select id="minutes">');for(l=0;l<60;l++){n.writeln("<option value="+l+">"+(l<10?"0":"")+l+"</option>")}n.writeln("</select>:");if(have_secs){n.writeln('<select id="seconds">');for(l=0;l<60;l++){n.writeln("<option value="+l+">"+(l<10?"0":"")+l+"</option>")}n.writeln("</select>")}else{n.writeln("00")}}else{n.writeln("00:00")}n.writeln("</td></tr></table></tr>")}n.writeln("</table></form></body></html>");n.close();var b=element_left(o);var a=element_top(o)+o.offsetHeight;if(t.autocenter==false&&t.type=="virtual"){t.move_to(b,a)}}FW_Window.prototype._check_loaded=function(a){if(this.closed==true){Logger.end();return}if(this.window.closed==true){this._event_onclose();this.closed=true;Logger.end();return}try{this._check_hook_install()}catch(b){this.closed=true;this._event_onclose()}this._fix_ff_bug();setTimeout("var w = _fw_window_get_window("+this.identifier+"); if (w != null) { Window.prototype._check_loaded.call(w) } ",this._check_freq);return};function logical_tab(b,l){Logger.srt(this,"logical_tab",EVENT_LOG_LEVEL);var g,c;Logger.msg("Direction ["+b+"] Is tab ["+l+"]");if(current_field==""){Logger.msg("Current field is null, returning");Logger.end();return l}var d=document.getElementById(current_field);var h;if(window.tab_override!=null){for(g=0;g<window.tab_override.length;g++){if(current_field==window.tab_override[g][0]){d=document.getElementById(window.tab_override[g][1])}}}if(b==1&&d.nav_forward!=null){h=d.nav_forward}if(b==-1&&d.nav_back!=null){h=d.nav_back}if(h!=null){Logger.msg("Have tab override");var a=document.getElementById(h);if(a.disabled||a.style.display=="none"||a.type=="hidden"){}else{a.focus();Logger.msg("Focused element "+a.id);Logger.end();return false}}for(g=0;g<_fw_tab_list.length;g++){if(_fw_tab_list[g]==current_field){break}}Logger.msg("Current field ["+current_field+"] Current field index ["+g+"]");if(g<_fw_tab_list.length){Logger.msg("Not at end of list .. total length ["+_fw_tab_list.length+"]");c=g;while(true){g+=b;if(g==c){Logger.msg("Tabbing to same widget, returning");Logger.end();return l}if(g<0){g=_fw_tab_list.length-1}else{if(g>=_fw_tab_list.length){g=0}}var k=document.getElementById(_fw_tab_list[g]);Logger.msg("Tabbing to field index ["+g+"]");if(k.disabled||k.style.display=="none"||k.type=="hidden"){Logger.msg("Element ["+k.id+"] is not accessable, skipping.");continue}k.focus();Logger.msg("Focusing element ["+k.id+"]");Logger.end();return false}}else{Logger.msg("At end of list , returning ["+l+"]");Logger.end();return l}Logger.msg("Not tabbing");Logger.end()}function init_program(){capture_program_events();try{WidgetRelationship.processing_phrase=messages[4]}catch(b){}try{document.body.fw_js_time=(new Date()-window.fw_js_start_time)*0.001;var a=(new Date()-fw_render_t1)*0.001;var c=(new Date()-fw_render_t2)*0.001;document.body.fw_js_time=a+" ["+c+"] ["+document.body.fw_js_time+"]"}catch(b){}return true}FW_Window.prototype.init=function(b){Logger.srt(this,"init");if(FW_Window._count==0){var g=new Date;FW_Window._count=g.getTime()}var c=window.location.pathname;c=c.substring(c.lastIndexOf("/")+1,c.indexOf("."));this.width=this._initial_width;this.height=this._initial_height;var a="FW_Window_"+c+"_"+this.name+"_"+FW_Window._count;a=a.replace(/[\/\-]/g,"_");this.identifier=a;this.opener=window;if(this.center_on==null){this.center_on="screen"}FW_Window._count=parseInt(FW_Window._count)+1;FW_Window._list.push(this);Logger.msg("Identifier ["+this.identifier+"] FW_Window List Length ["+FW_Window._list.length+"]");Logger.end()};FW_Window_Standard.prototype.open=function(j){Logger.srt(this,"open");this.init(j);this._loaded=false;if(this.autocenter==true){var a=this.width;var k=this.width;var m=this.opener;var o=0,c=0,d=0,b=0;if(this.center_on=="opener"){if(m&&m.FW_Browser){o=m.FW_Browser.window_width();d=m.FW_Browser.window_height();if(m.FW_Browser.Mozilla){c=m.screenX;b=m.screenY}else{c=m.screenLeft;b=m.screenTop}}}if(!o||o<a){o=screen.availWidth;if(FW_Browser.Mozilla){c=screen.left}else{m.screenLeft}}if(!d||d<k){d=screen.availHeight;if(FW_Browser.Mozilla){b=screen.top}else{m.screenTop}}this.left=Math.floor(((o-a)/2)+c);this.top=Math.floor(((d-k)/2)+b)}var h="";for(var g=0;g<this.option_list.length;g++){var l=this[this.option_list[g]];var n=this.option_list[g];if(n=="close"){l=this["can_close"]}if(l!=null){if(l==true){l="yes"}else{if(l==false){l="no"}}h+=n+"="+l+","}}this.window=window.open(this.url,this.identifier,h);if(!this.external){this.document=this.window.document}this._created=true;this.closed=false;Logger.end();return true};FW_Window_Standard.prototype._center_x=function(){var b;if(this.window.innerWidth){b=this.window.innerWidth}else{if(this.window.document.documentElement&&this.window.document.documentElement.clientHeight){b=this.window.document.documentElement.clientWidth}else{b=this.window.document.body.clientWidth}}var a=this.opener;var d=0,c=0;if(this.center_on=="opener"){if(a&&a.FW_Browser){d=a.FW_Browser.window_width();if(a.FW_Browser.Mozilla){c=a.screenX}else{c=a.screenLeft}}}if(!d||d<b){d=screen.availWidth;if(FW_Browser.Mozilla){c=screen.left}else{a.screenLeft}}return Math.floor(((d-b)/2)+c)};FW_Window_Standard.prototype._center_y=function(){var a;if(this.window.innerHeight){a=this.window.innerHeight}else{if(this.window.document.documentElement&&this.window.document.documentElement.clientHeight){a=this.window.document.documentElement.clientHeight}else{a=this.window.document.body.clientHeight}}var d=0,c=0;var b=this.opener;if(this.center_on=="opener"){if(b&&b.FW_Browser){d=b.FW_Browser.window_height();if(b.FW_Browser.Mozilla){c=b.screenY}else{c=b.screenTop}}}if(!d||d<a){d=screen.availHeight;if(FW_Browser.Mozilla){c=screen.top}else{b.screenTop}}return Math.floor(((d-a)/2)+c)};FW_Window_Standard.prototype.size_by_content=function(){var k=this.window;var B=k.document;var z=98;var c=98;var j=Math.floor((z/100)*screen.availWidth);var o=Math.floor((c/100)*screen.availHeight);var r=0,m=0,l=0,p=0;var b=B.getElementById("PopBody");if(!b){var y=B.getElementsByTagName("TABLE");for(var v=0;v<y.length;v++){var n=y[v];if(v==0){p=n.offsetTop}var A=n.offsetWidth;if(A>r){b=n;l=n.offsetLeft;r=A}if(m<n.offsetHeight){m=n.offsetHeight}}r+=l*2;m+=p*2}var t,q;if(FW_Browser.Mozilla){t=k.screenX;q=k.screenY}else{t=k.screenLeft;q=k.screenTop}var h,d;if(FW_Browser.IE){var a=screen.deviceXDPI/screen.logicalXDPI;h=Math.floor(30*a);if(FW_Browser.version<7){d=h*2}else{d=h*3}}else{h=(k.innerWidth-B.documentElement.clientWidth);if(h<=0){h=24}d=(k.innerHeight-B.documentElement.clientHeight);d+=Math.abs(k.outerHeight-k.innerHeight)-(h/2)}r+=h;m+=d;if(r>j){r=j}if(m>o){m=o}var g=false;if((t+r)>screen.availWidth||(q+m)>screen.availHeight){g=true;if(FW_Browser.Mozilla){this.move_to(screen.left,screen.top)}else{k.moveBy(-screen.availWidth,-screen.availHeight)}if(FW_Browser.IE){t-=k.screenLeft;q-=k.screenTop}}this.resize_to(r+10,m+10);if(g){this.move_to(t,q)}return true};FW_Window_Virtual.prototype.size_by_content=function(){var z=98;var g=98;var k=Math.floor((z/100)*FW_Element.width(this.opener.document.body));var q=Math.floor((g/100)*FW_Element.height(this.opener.document.body));var t=0,o=0,m=0,r=0;var B=this.document;var b=B.getElementById("PopBody");if(b){o=FW_Element.height(b);t=FW_Element.width(b);m=b.offsetLeft;r=b.offsetTop;var c=B.getElementById("Content");if(c){t+=(t-FW_Element.width(c))*2;o+=(o-FW_Element.height(c))*2}t+=m*2;if(FW_Browser.IE&&FW_Browser.version>=7){o+=r*2}}if(!b){b=B.getElementById("Page");if(b){o=FW_Element.height(b);var d=b.getElementsByTagName("TABLE");for(var v=0;v<d.length;v++){var n=d[v];if(!n.className.match("PageSection")){continue}if(!r){r=n.offsetTop}var l=n.offsetWidth;if(l>t){b=n;m=parseInt(n.offsetLeft);t=parseInt(l)}}t+=m*2;if(!FW_Browser.IE){o+=r}}}if(!b){var y=B.getElementsByTagName("TABLE");for(var v=0;v<y.length;v++){var p=y[v];if(v==0){r=p.offsetTop}var A=p.offsetWidth;if(A>t){b=p;m=p.offsetLeft;t=A}o+=p.offsetHeight}t+=m*2;o+=r*2}var j=0,h=0;if(B.body.className!="Calendar"){if(FW_Browser.IE){j=30;h=30;var a=screen.deviceXDPI/screen.logicalXDPI;j=Math.floor(30*a);if(FW_Browser.version<7){h=j*2}else{h=j*3}}else{j=24;h=24}}t+=j;o+=h;if(t>k){t=k}if(o>q){o=q}this.resize_to(t,o);return true};FW_PopForm.prototype._set_value=function(g){var d=this.target.window.document.POP_DATA;if(d==null){return false}var m=d.ROW_NUMBER;if(m==null){return false}var n=0;for(var h=0;h<m.length;h++){var a=1;for(var j=0;j<this.widget_map.length;j++){var k=this.widget_map[j];var b=document.getElementById(k[1]);if(b==null){continue}var c="$"+h+"_"+k[0];var l=d[c];if(b.value!=l.value){a=0;break}}if(a==0){m[h].checked=false;continue}else{n=1;m[h].checked=true;break}}if(n==0){m.checked=true}return true};FW_PopForm.prototype.display=function(){var d=this.target;d.onload=this._set_value;d.onload_scope=this;d.width=parseInt(this.width);d.height=parseInt(this.height);if(this._displayed!=true){d.open();d.window.document.open();d.window.document.write(unescape(this.content));if(d.window){d.window.widgetMap=this.widget_map}else{d.widgetMap=this.widget_map}d.window.document.close();d._fw_pop_form_written=true;var b=this.link.left();var a=this.link.top()+this.link.height();if(d.autosize==false){d.resize_to(this.width,this.height)}function c(l){var k=0;var j=0;while(l&&!isNaN(l.offsetLeft)&&!isNaN(l.offsetTop)){k+=l.offsetLeft-l.scrollLeft;j+=l.offsetTop-l.scrollTop;l=l.parentNode}return{top:j,left:k}}var h=document.getElementById(this.link.id);while(h.nodeName!="TABLE"){h=h.parentNode}var g=c(h);b=g.left;if(a<0){a=30}d.move_to(b,a)}else{d.open()}return true};FW_Page_Canvas.prototype.row_changed=function(b,d){var c=this.rows[b];if(c==null){return false}if(d!=null){c.changed=d}else{if(c.changed==null){for(var a=0;a<c.widgets.length;a++){if(c.widgets[a].changed()){this.logger.msg(c.widgets[a].name+" - Changed");return true}}return false}return c.changed}};FW_Window_Standard.prototype.monitor=function(){var b=this;var a=setInterval(function(){if(b.window.closed){clearInterval(a);b.closed=true;b.document=null;b.window=null;if(b.refreshparentonclose){refresh_window()}}},200)};FW_Window_Standard.prototype.open=function(a){Logger.srt(this,"open");this.init(a);this._loaded=false;if(this.autocenter==true){this.left=(screen.width/2)-(this.width/2);this.top=(screen.height/2)-(this.height/2)}var d="";for(var c=0;c<this.option_list.length;c++){var g=this[this.option_list[c]];var b=this.option_list[c];if(b=="close"){g=this["can_close"]}if(g!=null){if(g==true){g="yes"}else{if(g==false){g="no"}}d+=b+"="+g+","}}this.identifier=this.identifier.replace(/\./,"");this.window=window.open(this.url,this.identifier,d);this.document=this.window.document;this._created=true;this.closed=false;this.monitor();Logger.end();return true};FW_HTMLForm_OptionList.prototype._size_content=function(){this.profiler.start(this,"_size_content");var c=300;var b=this.height;if(this.auto_height){b=(this.options.length*24);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"}}}this.profiler.end()};FW_Page_Widget.prototype.disabled=function(g,b){var c=this.element;var d=this.renderer;if(g==null){if(this.tag_name()=="SPAN"||c.type=="hidden"){return true}else{if(d){return d.disabled()}else{return c.disabled}}}else{if(b!=false&&this.date_picker&&this.date_picker.icon){var a=(g==true)?("none"):("");this.date_picker.icon.style.display=a}c.disabled=g;if(!d){if(c.type=="text"||c.type=="textarea"){if(g){c.className="TextBoxDisabled"}else{c.className="TextBox"}}else{if(c.type=="select-one"||c.type=="select-multiple"){if(g){c.className="ListDisabled"}else{c.className="List"}}}}return g}};FW_Page_Canvas.prototype.remove_widget=function(a,c){var b=this._widget_list.length;var g=new Array();while(b--){var d=this._widget_list[b];if(d.name==a){if(this.view_mode==FW.VIEW_MODE_SINGLE){this._widget_list.splice(b,1);break}else{if(this.view_mode==FW.VIEW_MODE_MULTI){if(c!=null){if(d.row_number()==c){this._widget_list.splice(b,1);break}continue}}}}}};FW_BubbleHint._event_mouseover=function(c){if(FW_BubbleHint._showing==false){FW_BubbleHint.show(this.fwtitle);if(FW_BubbleHint.display_type==FW_BubbleHint.DISPLAY_TYPE_FLOAT){if(c.pageX!=null){FW_BubbleHint.move(c.pageX-0,c.pageY-20)}else{FW_BubbleHint.move(c.clientX-0,c.clientY-20)}}else{var b=parseInt(FW_Element.top(this))+parseInt(FW_Element.height(this))+5;var a=parseInt(FW_Element.left(this))+5;if(!FW_BubbleHint.move(a,b)&&b>40){b=parseInt(FW_Element.top(this))-parseInt(FW_Element.height(FW_BubbleHint._element))-5;a=parseInt(FW_Element.left(this))-5;FW_BubbleHint.move(a,b)}}if(FW_BubbleHint._shadow){FW_BubbleHint._shadow.apply()}}return true};
