if(history.navigationMode){history.navigationMode="compatible"}window.decodeURIOriginal=window.decodeURIComponent;window.decodeURIComponent=function(a){return window.decodeURIOriginal(a.replace("%B0","°"))};var FORMTYPES=["INPUT","SELECT","TEXTAREA"];var RAD=Math.PI/180;var DEG=180/Math.PI;var globalListeners=new Queue();var ancestor=null;function Queue(){this.listeners=[];this.running=false;this.addListen=aList;this.delListen=dList;this.runListen=rList;this.fireListen=fList}function aList(a){arrPushNew(this.listeners,a,cList)}function dList(a){arrDelAll(this.listeners,a,cList)}function rList(d){var c;switch(d){case true:case undefined:c=this;break;case"":case null:case false:c=null;break;default:c=d;break}if(!this.running){var e=false;this.running=true;for(var b=0,a=this.listeners.length;(b<a)&&!e;b++){if(typeof this.listeners[b]=="object"){if(this.listeners[b].fire){this.listeners[b].fire=false;e|=this.listeners[b].func(c)?true:false}}else{e|=this.listeners[b](c)?true:false}}if(!e){this.running=false}}}function fList(c){for(var b=0,a=this.listeners.length;b<a;b++){if((typeof this.listeners[b]=="object")&&(cList(this.listeners[b],c)==0)){this.listeners[b].fire=true}}}function cList(c,b){var a;if(typeof c=="object"){if(typeof b=="object"){a=compValues(c.func,b.func)}else{a=compValues(c.func,b)}}else{if(typeof b=="object"){a=compValues(c,b.func)}else{a=compValues(c,b)}}return a}StrValue.prototype=new Queue;StrValue.prototype.types=FORMTYPES;function StrValue(g,c,i,l,f,a,j,b,e,m,k,d,h){this.base=Queue;this.base();this.getDiv=gDiv;this.setDiv=sDiv;this.getValue=f?f:gVal;this.setValue=sVal;this.setOValue=a?a:sStrVal;this.getDispVal=j?j:gDispVal;this.setDispVal=b?b:sDispVal;this.getElemVal=e?e:gElemVal;this.setElemVal=m?m:sElemVal;this.getElement=k?k:gElem;this.setElement=d?d:sElem;this.setDeftVal=setDeft;this.getDefault=gDeft;this.setDefault=sDeft;this.getFirst=gFirst;this.setURLDef=sURLDef;this.getURLDef=gURLDef;this.URLisDef=false;this.blank=fBlank;this.setURLValue=h;this.update=fUpdate;this.rOrigList=this.runListen;this.runListen=rLocalList;this.caseFlag=i?i.toUpperCase().substr(0,1):undefined;this.trimFlag=l?l==true?"T":l.toUpperCase().substr(0,1):undefined;this.value;if(c){this.div=typeof c=="string"?document.getElementById(c):c;this.label=this.div&&this.div.id?document.getElementById("l"+this.div.id.substr(1)):undefined;this.element=this.div&&this.div.id?document.getElementById("i"+this.div.id.substr(1)):undefined;if(this.element){this.element.oData=this;if(this.element.name){this.element.nameSave=this.element.name}}this.group=TreeWalk(this.div,this.types)}if(g!=undefined){this.setValue(g);this.firstValue=this.value}}function gVal(){return this.value}function sVal(b){var a=this.value;this.userSet=(typeof b=="undefined")||(b==undefined)?true:false;this.setOValue(b);if(this.userSet){this.setDefault()}if(this.value!=a){this.runListen()}return a}function sStrVal(a){if(a==undefined){a=this.getDispVal()}if(typeof a=="string"){switch(this.caseFlag){case"L":a=a.toLowerCase();break;case"U":a=a.toUpperCase();break;default:break}switch(this.trimFlag){case"C":a=a.replace(/\s+/g,"");break;case"T":a=a.trim();break;default:break}}this.value=a;this.setDispVal(this.value)}function fBlank(){this.value=undefined;this.getElement().value=""}function gDeft(){return this.defValue}function sDeft(a){this.defValue=a?a:this.value}function setDeft(){this.setValue(this.defValue)}function sURLDef(){this.URLisDef=true}function gURLDef(){return this.URLisDef}function gFirst(){return this.firstValue}function gDispVal(){return this.getElemVal()}function sDispVal(a){this.setElemVal(a)}function gElemVal(){var a=this.getElement();return a?a.value:undefined}function sElemVal(b){var c=this.getElement(),a;if(c){a=c.value;c.value=b}return a}function gElem(){return this.element}function sElem(b){var a=this.element;this.element=b;return a}function gDiv(){return this.div}function sDiv(b){var a=this.div;this.div=b;return a}function fUpdate(j,l,b,o,n){var d=j?j.getValue():undefined;var a=l!=undefined?(typeof l=="boolean"?l:d==l):false;var m=a&&(b!=undefined?(typeof b=="boolean"?b:d==b):a);var h=m&&(o!=undefined?(typeof o=="boolean"?o:d==o):m);if(this.div){setShowHide(this.div,a);for(var c=0,k=this.group.length;c<k;c++){var g=this.group[c];if(m){if(typeof getAttr(g,"tabIndex")!="undefined"){setAttr(g,"tabIndex",0)}if(g.nameSave){setAttr(g,"name",g.nameSave)}setAttr(g,"readOnly",false);g.removeAttribute("readOnly");setClass(g,"readonly",false)}else{if(typeof getAttr(g,"tabIndex")!="undefined"){setAttr(g,"tabIndex",-1)}g.removeAttribute("name");setAttr(g,"readOnly",true);setClass(g,"readonly",true)}}try{if(h){j.getElement().next=this.getElement()}else{if(n!=undefined){j.getElement().next=n}}}catch(f){}}this.runListen(a)}function rLocalList(a){if(ancestor==null){ancestor=this}this.rOrigList(a);if(ancestor==this){globalListeners.runListen(a);ancestor=null}}ChkValue.prototype=new StrValue;function ChkValue(g,c,f,a,i,b,e,k,j,d,h){this.base=StrValue;this.base(g,c,undefined,undefined,f,a?a:sChkVal,i,b,e?e:gChkEVal,k?k:sChkEVal,j,d,h?h:sChkURLDV);this.blank=fChkBlank}function sChkVal(a){switch(a){case undefined:this.value=this.getDispVal();break;case"false":case false:this.value=false;break;case"true":case true:this.value=true;break;default:var b=this.getElement();this.value=b?a==b.value:false;break}this.setDispVal(this.value)}function fChkBlank(){this.value=undefined;this.getElement().checked=false}function gChkEVal(){var a=this.getElement();return a?a.checked:undefined}function sChkEVal(b){var a=this.getElemVal();var c=this.getElement();if(c){switch(b){case"false":case false:c.checked=false;break;case"true":case true:c.checked=true;break}}return a}function sChkURLDV(a){var b=this.getElement();if(b){b.value=this.value;b.checked=true}}RadValue.prototype=new StrValue;function RadValue(i,e,h,a,j,d,g,n,k,f){this.buttons=[];if(e){var m=TreeWalk(e,["INPUT"]);var o=false;for(var l=0,c=m.length;l<c;l++){if(m[l].type=="radio"){m[l].oData=this;this.buttons.push(m[l]);o|=m[l].checked}}if(this.buttons.length&&!o){for(l=0,c=this.buttons.length;l<c;l++){if(this.buttons[l].defaultChecked){o=l}}}this.buttons[o?o:0].checked=true}this.base=StrValue;this.base(i,e,undefined,undefined,h,a?a:sRadVal,j,d,g?g:gRadEVal,n?n:sRadEVal,k,f);this.blank=fRadBlank}function sRadVal(c){if(c==undefined){this.value=this.getDispVal()}else{var d=false;for(var a=0,e=this.buttons.length;a<e;a++){d|=(this.buttons[a].value==c)}if(d){this.value=c;this.setDispVal(this.value)}}}function fRadBlank(){var c=0;for(var a=0,d=this.buttons.length;a<d;a++){if(this.buttons[a].defaultChecked){c=a}}this.setValue(this.buttons[c].value)}function gRadEVal(){var c;for(var a=0,d=this.buttons.length;a<d;a++){if(this.buttons[a].checked){c=this.buttons[a].value}}return c}function sRadEVal(d){var c=this.getElemVal();for(var a=0,e=this.buttons.length;a<e;a++){this.buttons[a].checked=(this.buttons[a].value==d)}return c}SelValue.prototype=new StrValue;SelValue.prototype.timeout=500;function SelValue(c,b,a,f,e,d){this.getOption=gSelEOpt;this.text=undefined;this.getText=gSelText;this.getDispText=gSelDText;this.getElemText=gSelEText;this.loadOptions=loadOpts;this.bounceTime=this.timeout;this.bounceTimer=undefined;this.bounceValue=undefined;this.debounceSetValue=debSValue;this.base=StrValue;this.base(c,b,undefined,false,e,d?d:sSelVal,undefined,undefined,gSelEVal,sSelEVal);this.blank=selBlank;if(a!=undefined){this.loadOptions(a,f,c);this.firstValue=this.value}}function gSelText(){return this.text}function sSelVal(a){if((a!=undefined)||!getAttr(this,"disabled")){if(a!=undefined){this.setDispVal(a)}this.value=this.getDispVal();this.text=this.getDispText()}}function gSelEVal(){var a=this.getOption();return a?a.value:undefined}function sSelEVal(b){var a=this.getElemVal();var c=-1;for(var e=0,d=this.element.options.length;(c<0)&&(e<d);e++){if(this.element.options[e].text==b){c=e}}for(e=0,d=this.element.options.length;(c<0)&&(e<d);e++){if(this.element.options[e].value==b){c=e}}if(c>=0){this.element.selectedIndex=c;this.element.value=this.element.options[c].value}return a}function gSelDText(){return this.getElemText()}function gSelEText(){var a=this.getOption();return a?a.text:undefined}function gSelEOpt(){var a=this.element.selectedIndex;a=a>=0?this.element.options[a]:undefined;return a}function debSValue(c,b){if(b||!this.bounceTimer){var a=this.getElemVal();if(this.bounceValue&&(a==this.bounceValue)){this.bounceTimer=undefined;this.bounceValue=undefined;this.setValue()}else{this.bounceTimer=setTimeout(c+".debounceSetValue('"+c+"',true);",this.bounceTime);this.bounceValue=a}}}function selBlank(){var a=document.createElement("OPTION");a.text="";a.value="";this.loadOptions([a])}function loadOpts(a,h,d){try{if(a.length&&(typeof a[0]=="object")&&(a[0].tagName)&&(a[0].tagName=="OPTION")){replaceOpts.apply(this,[a])}else{var b=[];for(var g in a){var c=document.createElement("OPTION");switch(typeof a[g]){case"object":if((a[g].text!=undefined)&&(a[g].value!=undefined)){c.text=a[g].text;c.value=a[g].value;if(a[g].selected){c.selected="selected"}}else{if(a[g] instanceof Array){c.text=a[g][0];c.value=a[g][1]}else{if(h!=undefined){c.value=g;h(a[g],c,d)}}}break;case"string":c.text=a[g];c.value=g;break}if((c.text!=undefined)&&(c.value!=undefined)){b.push(c)}}if(b.length){replaceOpts.apply(this,[b])}}}catch(f){}}function replaceOpts(i){var b,c,d,a,h,g=i.length;for(h=0;h<g;h++){if(!b&&(i[h].value==this.defValue)){b=i[h]}if(!c&&(i[h].value==this.value)){c=i[h]}if(!d&&getAttr(i[h],"selected")){d=i[h]}setAttr(i[h],"selected",false);i[h].removeAttribute("selected");if(h<this.element.options.length){this.element.options[h]=i[h]}else{try{this.element.add(i[h],null)}catch(f){this.element.add(i[h])}}}while(this.element.options.length>g){this.element.remove(this.element.options.length-1)}if(b){this.defValue=b.value;this.userSet=true;a=b}else{this.defValue=undefined;this.userSet=false;if(d){a=d}else{if(c){a=c}else{a=i[0]}}}setAttr(a,"selected",true);this.setValue(a.value)}NumValue.prototype=new StrValue;NumValue.prototype.pmMatcher=["(?:\\+-|-\\+|\\xB1)(\\S*)",parsePM];NumValue.prototype.matchers=[NumValue.prototype.pmMatcher];NumValue.prototype.min=-Number.MAX_VALUE;NumValue.prototype.max=Number.MAX_VALUE;function NumValue(e,c,d,b,g,a,f){this.nDVal=a?a:sDispVal;this.uDVal=sDispVal;this.base=StrValue;this.base(e,c,undefined,undefined,undefined,undefined,g?g:gNumDV,sNumDV,undefined,undefined,undefined,undefined,f);this.parse=parseNumber;if(d!=undefined){this.min=d}if(b!=undefined){this.max=b}}function gNumDV(){return this.parse(this.getElemVal())}function parseNumber(e,f){e=e.toLowerCase();var a=NaN;for(var c=f?f:0,b=this.matchers.length;e&&isNaN(a)&&(c<b);c++){var d=new RegExp(this.matchers[c][0].toLowerCase(),"gi");a=d.exec(e);if((a!=null)&&(a[0]==e)){a=this.matchers[c][1].apply(this,[e,a]);if((a<this.min)||(a>this.max)){a=NaN}}else{a=NaN}}return a}function parsePM(b,a){return this.parse(a[1],1)}function sNumDV(a){switch(typeof a){case"object":case"number":this.nDVal(a);break;default:this.uDVal(a);break}}FPValue.prototype=new NumValue;FPValue.prototype.normal="([+-]?[.0-9]+)";FPValue.prototype.exponent="([+-]?[0-9]+)";FPValue.prototype.SciMatcher=[FPValue.prototype.normal+"e"+FPValue.prototype.exponent,parseSci];FPValue.prototype.FPMatcher=[FPValue.prototype.normal,parseFloat];FPValue.prototype.matchers=[FPValue.prototype.pmMatcher,FPValue.prototype.SciMatcher,FPValue.prototype.FPMatcher];function FPValue(e,c,i,d,a,g,h,b,f){this.decimals=i!=undefined?i:-1;this.URLdecimals=d!=undefined?d:this.decimals!=-1?this.decimals+2:-1;this.base=NumValue;this.base(e,c,a,g,h,b?b:sFPDV,f?f:sFPURLDV)}function sFPDV(b,a){this.setElemVal(b.roundFloat(a?a:this.decimals))}function sFPURLDV(b,a){this.setDispVal(b!=undefined?b:this.value,a?a:this.URLdecimals)}function parseSci(b,a){return parseFloat(a[1])*Math.pow(10,parseFloat(a[2]))}ConValue.prototype=new FPValue;ConValue.prototype.conversion=1;function ConValue(f,c,h,l,e,b,i,j,a,g,k,d){if(h!=undefined){this.conversion=h}if(!this.getBDispV&&!this.setBDispV){this.getBDispV=k?k:this.getDispVal;this.setBDispV=d?d:this.setDispVal}this.base=FPValue;this.base(f,c,l,e,b,i,j?j:gConDV,a?a:sConDV,g)}function gConDV(){return this.getBDispV()/this.conversion}function sConDV(b,a){this.setBDispV(b*this.conversion,a)}Angle.prototype=new ConValue(undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,sAngDV);Angle.prototype.DMSMatcher=["([+-])?([0-9]+)(?:[:°]|%3A|%B0)(?:(?:([0-9]+)(?:[:']|\u2032|%3A|%27)([.0-9]+)(?:\x22|\u2033|%3A|%22)?)|(?:([.0-9]+)(?:'|\u2032)?))\\s*([nsew])?",parseDHMS];Angle.prototype.DecAMatcher=[Angle.prototype.normal+"\\s*([nsew])?",parseDecA];Angle.prototype.matchers=[Angle.prototype.pmMatcher,Angle.prototype.SciMatcher,Angle.prototype.DMSMatcher,Angle.prototype.DecAMatcher,Angle.prototype.FPMatcher];Angle.prototype.dSym="°";Angle.prototype.mSym="'";Angle.prototype.sSym='"';Angle.prototype.dSep=":";function Angle(e,c,j,d,b,g,i,h,a,f){this.setDMS=sDMS;this.setDMS(i);this.base=ConValue;this.base(e,c,DEG,j,d,b,g,h,a,f);this.getNormVal=gNormAngle}function sDMS(b){var a=this.dms;switch(b instanceof Array?b[0]:b){case"N":case"n":case"E":case"e":this.dms=b;break;case true:this.dms=true;break;default:this.dms=false;break}this.setDispVal(this.value);return a}function sAngDV(aValue,decimals){var dec=decimals?decimals:this.decimals;var res;if(this.dms){with(Math){var degs,mins,secs,dSym,mSym,sSym,llSym;res=abs(aValue);switch(this.dms instanceof Array?this.dms[0]:this.dms){case"N":case"S":case"E":case"W":pmSym="";dSym=this.dSym;mSym=this.mSym;sSym=this.sSym;llSym=this.dms[aValue.sign()>=0?0:1];break;default:pmSym=aValue.sign()<0?"-":"";dSym=dec>0?this.dSep:"";mSym=dec>2?this.dSep:"";sSym="";llSym="";break}switch(dec){case 0:res=round(res)+dSym+llSym;break;case 1:case 2:degs=floor(res);res-=degs;mins=round(res*60);res=pmSym+degs+dSym+mins.pad(2)+mSym+llSym;break;case 3:case 4:degs=floor(res);res=(res-degs)*60;mins=floor(res);res=(res-mins)*60;secs=round(res);res=pmSym+degs+dSym+mins.pad(2)+mSym+secs.pad(2)+sSym+llSym;break;default:degs=floor(res);res=(res-degs)*60;mins=floor(res);secs=(res-mins)*60;if(dec!=-1){secs=secs.roundFloat(dec-4)}res=pmSym+degs+dSym+mins.pad(2)+mSym+secs.pad(2)+sSym+llSym;break}}}else{res=aValue.roundFloat(dec)}this.setElemVal(res)}function gNormAngle(){var a=2*Math.PI;return(this.value>=0?this.value:a+this.value)%a}function parseDecA(b,a){return(a[1]&&(a[1]=="-")?-1:1)*parseFloat(a[2])*(a[3]&&a[3].toLowerCase().match(/[sw]/)?-1:1)}DTValue.prototype=new NumValue;DTValue.prototype.msMatcher=["[+-]?[0-9]+",parseMs];DTValue.prototype.locMatcher=[".+",parseLoc];DTValue.prototype.matchers=[DTValue.prototype.msMatcher,DTValue.prototype.locMatcher];DTValue.prototype.HpD=24;DTValue.prototype.MpH=60;DTValue.prototype.SpM=60;DTValue.prototype.mSpS=1000;DTValue.prototype.mSpM=DTValue.prototype.mSpS*DTValue.prototype.SpM;DTValue.prototype.mSpH=DTValue.prototype.mSpM*DTValue.prototype.MpH;DTValue.prototype.mSpD=DTValue.prototype.mSpH*DTValue.prototype.HpD;function DTValue(e,c,d,b,g,a,f){this.base=NumValue;this.base(e,c,d,b,g,a?a:sDTDV,f?f:sDTURLDV)}function sDTDV(a){this.setElemVal(a.toString())}function sDTURLDV(a){this.setElemVal(a?a:this.value.getTime())}function parseMs(b,a){return new Date(parseInt(b))}function parseLoc(b,a){return new Date(Date.parse(b))}TimeValue.prototype=new DTValue;TimeValue.prototype.decimals=0;TimeValue.prototype.H24Matcher=["([0-2][0-9][0-5][0-9])",parseH24];TimeValue.prototype.H12Matcher=["([+-])?([0-9]+)[:°](?:(?:([0-9]+)(?:[:']|\u2032)([.0-9]+)(?:\x22|\u2033)?)|(?:([.0-9]+)(?:'|\u2032)?))\\s*([ap]m)?",parseDHMS];TimeValue.prototype.matchers=[TimeValue.prototype.H24Matcher,TimeValue.prototype.H12Matcher,TimeValue.prototype.msMatcher];function TimeValue(e,c,g,d,b,h,a,f){if(g==true){this.day=e}else{e=new Date(1970,0,1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());this.day=new Date(1970,0,1)}this.base=DTValue;this.base(e,c,d,b,h,a?a:sTimeDV,f);if(!this.bParse){this.bParse=this.parse;this.parse=parseTime}}function sTimeDV(a){this.setElemVal(a.toLocaleTimeString())}function parseTime(b,c){var a=this.bParse(b,c);if((typeof a=="number")&&!isNaN(a)){a=new Date(Math.floor(this.day.getTime()/this.mSpD)*this.mSpD+a*this.mSpH+this.day.getTimezoneOffset()*this.mSpM)}return a}function parseH24(b,a){return parseInt(a[1].substr(0,2),10)+parseInt(a[1].substr(2,2),10)/60}function parseDHMS(b,a){return(a[1]&&(a[1]=="-")?-1:1)*(parseInt(a[2],10)+(a[3]?parseInt(a[3],10)/60+(a[4]?parseFloat(a[4])/3600:0):(a[5]?parseFloat(a[5])/60:0)))*(a[6]&&a[6].toLowerCase().match("[sw]")?-1:1)+(a[6]&&a[6].toLowerCase().match("pm")?12:0)}Number.prototype.pad=function(c){var b="";var a=""+this+"";if((a[0]=="+")||(a[0]=="-")){b=a[0];a=a.substr(1)}while((a.indexOf(".")>=0?a.indexOf("."):a.length)<c){a="0"+a}return b+a};Number.prototype.roundFloat=function(a){return a==-1?this.valueOf():Math.round(this.valueOf()*Math.pow(10,a))/Math.pow(10,a)};Number.prototype.sign=function(){return this==0?0:this<0?-1:+1};function submitURLPars(a,j,d){var h=typeof a=="string"?document.getElementById(a):a;var f=TreeWalk(h,StrValue.prototype.types);var c;for(var b=0,k=f.length;b<k;b++){try{if(f[b].name&&!getAttr(f[b],"disabled")){c=getAttr(f[b],"readOnly");if(f[b].oData){c|=(f[b].oData.getValue()==f[b].oData.getFirst())||!f[b].oData.getValue()}else{c|=!f[b].value}if(c){setAttr(f[b],"disabled",true);f[b].removeAttribute("name")}else{if(f[b].oData&&f[b].oData.setDMS){f[b].oData.setDMS(false)}if(f[b].oData&&f[b].oData.setURLValue){f[b].oData.setURLValue()}}}}catch(g){alert(f[b].name+"\n"+g)}}h.action=j?j:top.document.URL;h.target=d?d:"_top";h.submit()}function setURLPars(h){var b=h?h:top.location.search!=""?top.location.search.substr(1):undefined;if(b){var g="";var o=new RegExp("(?:&amp;|&)","g");b=b.split(o);for(var d=0,n=b.length;d<n;d++){o=new RegExp("(?:=)","g");try{var k=b[d].split(o);o=new RegExp("\\+","g");k[1]=decodeURIComponent(k[1]).replace(o," ");var a=document.getElementsByName(k[0]);var m=null;for(var c=0,l=a.length;(c<l)&&!m;c++){if(a[c].oData){m=a[c]}}if(!m){m=document.getElementById(k[0])}if(m.oData.getURLDef()){m.oData.setDefault(k[1])}else{m.oData.setElemVal(k[1]);m.oData.setValue()}}catch(f){g+=k+"\n"}}if(g!=""){alert("URL Parameters Error:\t"+g)}}}function getAttr(b,c){var a;try{a=b.getAttribute(c);if((typeof a=="undefined")||(a==undefined)){throw"!"}}catch(d){a=b[c]}return a}function setAttr(a,c,b){try{a.setAttribute(c,b);if(a.getAttribute(c)!=b){throw"!"}}catch(d){a[c]=b}}function delAttr(a,b){try{if(!a.removeAttribute(b)){throw"!"}}catch(c){try{delete a[b]}catch(c){}}}function logKey(b,a){if((a.which?a.which:a.keyCode)==9){b.lastKey=a.shiftKey?"P":"N"}else{b.lastKey=""}}function setNext(a){if((__br.n!="IE")&&a.next&&a.lastKey&&(a.lastKey=="N")){if(typeof a.next=="string"){a.next=document.getElementById(a.next)}a.next.focus();if(a.next.select){a.next.select()}}};
