/*@cc_on@*/secondsPerMinute=60;secondsPerHour=60*secondsPerMinute;secondsPerDay=24*secondsPerHour;millisecondsPerMinute=1000*secondsPerMinute;millisecondsPerHour=1000*secondsPerHour;millisecondsPerDay=1000*secondsPerDay;nextId=1;function nextIdString(){return "_"+nextId++}function correctId(a){return a.id||(a.id=nextId++)}voidType=0;booleanType=1;integerType=2;floatType=3;stringType=4;dateType=5;arrayType=6;recordType=7;backspaceKey=8;tabKey=9;keypad5Key=12;enterKey=13;shiftKey=16;ctrlKey=17;altKey=18;pauseKey=19;capsLockKey=20;escapeKey=27;spaceKey=32;pageUpKey=33;pageDownKey=34;endKey=35;homeKey=36;arrowLeftKey=37;arrowUpKey=38;arrowRightKey=39;arrowDownKey=40;printScreenKey=44;insertKey=45;deleteKey=46;closeParenthesisKey=digit0Key=48;exclamationMarkKey=digit1Key=49;atKey=digit2Key=50;octothorpeKey=digit3Key=51;dollarSignKey=digit4Key=52;percentKey=digit5Key=53;caretKey=digit6Key=54;ampersandKey=digit7Key=55;timesKey=starKey=digit8Key=56;openParenthesisKey=digit9Key=57;aKey=65;bKey=66;cKey=67;dKey=68;eKey=69;fKey=70;gKey=71;hKey=72;iKey=73;jKey=74;kKey=75;lKey=76;mKey=77;nKey=78;oKey=79;pKey=80;qKey=81;rKey=82;sKey=83;tKey=84;uKey=85;vKey=86;wKey=87;xKey=88;yKey=89;zKey=90;keypad0Key=96;keypad1Key=97;keypad2Key=98;keypad3Key=99;keypad4Key=100;keypad5Key=101;keypad6Key=102;keypad7Key=103;keypad8Key=104;keypad9Key=105;keypadTimesKey=106;keypadPlusKey=107;keypadMinusKey=109;keypadDotKey=110;keypadDividedByKey=111;f1Key=112;f2Key=113;f3Key=114;f4Key=115;f5Key=116;f6Key=117;f7Key=118;f8Key=119;f9Key=120;f10Key=121;f11Key=122;f12Key=123;numLockKey=144;scrollLockKey=145;nonBreakingSpace="ÿ";colonKey=semicolonKey=186;plusKey=equalsKey=187;lessThanKey=leftAngleBracketKey=commaKey=188;underscoreKey=minusKey=hyphenKey=dashKey=189;greaterThanKey=rightAngleBracketKey=dotKey=periodKey=190;questionMarkKey=dividedByKey=slashKey=191;tildeKey=backQuoteKey=192;openBraceKey=openBracketKey=219;verticalBarKey=backslashKey=220;closeBraceKey=closeBracketKey=221;singleQuoteKey=quoteKey=222;shiftModifier=256;ctrlModifier=512;altModifier=1024;keyString=[];createKeyString();function createKeyString(){keyString[backspaceKey]="Backspace";keyString[tabKey]="Tab";keyString[keypad5Key]="Keypad 5";keyString[enterKey]="Enter";keyString[shiftKey]="Shift";keyString[ctrlKey]="Ctrl";keyString[altKey]="Alt";keyString[pauseKey]="Pause";keyString[capsLockKey]="Caps Lock";keyString[escapeKey]="Escape";keyString[spaceKey]="Spacebar";keyString[pageUpKey]="Page Up";keyString[pageDownKey]="Page Down";keyString[endKey]="End";keyString[homeKey]="Home";keyString[arrowLeftKey]="Left Arrow";keyString[arrowUpKey]="Up Arrow";keyString[arrowRightKey]="Right Arrow";keyString[arrowDownKey]="Down Arrow";keyString[printScreenKey]="Print Screen";keyString[insertKey]="Insert";keyString[deleteKey]="Delete";keyString[digit0Key]="0";keyString[digit1Key]="1";keyString[digit2Key]="2";keyString[digit3Key]="3";keyString[digit4Key]="4";keyString[digit5Key]="5";keyString[digit6Key]="6";keyString[digit7Key]="7";keyString[digit8Key]="8";keyString[digit9Key]="9";keyString[aKey]="A";keyString[bKey]="B";keyString[cKey]="C";keyString[dKey]="D";keyString[eKey]="E";keyString[fKey]="F";keyString[gKey]="G";keyString[hKey]="H";keyString[iKey]="I";keyString[jKey]="J";keyString[kKey]="K";keyString[lKey]="L";keyString[mKey]="M";keyString[nKey]="N";keyString[oKey]="O";keyString[pKey]="P";keyString[qKey]="Q";keyString[rKey]="R";keyString[sKey]="S";keyString[tKey]="T";keyString[uKey]="U";keyString[vKey]="V";keyString[wKey]="W";keyString[xKey]="X";keyString[yKey]="Y";keyString[zKey]="Z";keyString[keypad0Key]="Keypad 0";keyString[keypad1Key]="Keypad 1";keyString[keypad2Key]="Keypad 2";keyString[keypad3Key]="Keypad 3";keyString[keypad4Key]="Keypad 4";keyString[keypad5Key]="Keypad 5";keyString[keypad6Key]="Keypad 6";keyString[keypad7Key]="Keypad 7";keyString[keypad8Key]="Keypad 8";keyString[keypad9Key]="Keypad 9";keyString[keypadTimesKey]="Keypad *";keyString[keypadPlusKey]="Keypad +";keyString[keypadMinusKey]="Keypad -";keyString[keypadDotKey]="Keypad .";keyString[keypadDividedByKey]="Keypad /";keyString[f1Key]="F1";keyString[f2Key]="F2";keyString[f3Key]="F3";keyString[f4Key]="F4";keyString[f5Key]="F5";keyString[f6Key]="F6";keyString[f7Key]="F7";keyString[f8Key]="F8";keyString[f9Key]="F9";keyString[f10Key]="F10";keyString[f11Key]="F11";keyString[f12Key]="F12";keyString[numLockKey]="Num Lock";keyString[scrollLockKey]="Scroll Lock";keyString[nonBreakingSpace]="Non-Breaking Space";keyString[semicolonKey]=";";keyString[equalsKey]="=";keyString[commaKey]=",";keyString[dashKey]="-";keyString[periodKey]=".";keyString[slashKey]="/";keyString[backQuoteKey]="`";keyString[openBracketKey]="[";keyString[backslashKey]="\\";keyString[closeBracketKey]="]";keyString[quoteKey]="'";var a=keyString.length;while(a--)if(keyString[a])keyString[a|shiftModifier]="Shift+"+keyString[a]}function isChangeKey(a){return backspaceKey===a||escapeKey===a||spaceKey===a||isBetween(a,insertKey,keypadDividedByKey)||isBetween(a,semicolonKey,quoteKey)}function isCharKey(a){return isBetween(a,digit0Key,keypadDividedByKey)||isBetween(a,semicolonKey,quoteKey)}function notBinaryKey(a){return isCharKey(a)&&correctBinaryKey(a)<0}function notDecimalKey(a){return isCharKey(a)&&correctDigitKey(a)<0}function notHexKey(a){return isCharKey(a)&&!correctHexKey(a)}function correctBinaryKey(a){return digit0Key===a?0:digit1Key===a?1:-1}function correctDigitKey(a){return isBetween(a,digit0Key,digit9Key)?a-digit0Key:isBetween(a,keypad0Key,keypad9Key)?a-keypad0Key:-1}function correctHexKey(a){return ""+(isBetween(a,digit0Key,digit9Key)?a-digit0Key:isBetween(a,keypad0Key,keypad9Key)?a-keypad0Key:isBetween(a,aKey,fKey)?keyString[a]:"")}function abs(a){return a<0?-a:a}function max(a,b){return a<b?b:a}function min(a,b){return a<b?a:b}function sign(a){return a<0?-1:1}floor=Math.floor;ceiling=Math.ceil;random=Math.random;round=Math.round;power=Math.pow;function roundToString2(a){return decimalPlaces(round(a*100)/100,2)}function roundTo2(a){return round(a*100)/100}function roundToI(c,b){var a=power(10,b);return round(c*a)/a}roundTo_powersOf10=[1,10,100,1000,10000];function roundTo(c,a){if(isNotBetween(a,0,roundTo_powersOf10.length-1))errorIn("Increase roundTo_powersOf10 array size","roundTo");var b=roundTo_powersOf10[a];return round(c*b)/b}function mod0(a,b){a=a%b;return a<0?a+b:a}function randomBoolean(){return random()<.5}function randomInteger(a,b){return floor((b-a+1)*random()+a)}function randomInteger0(a){return floor((a+1)*random())}function randomInteger0To(a){return floor(a*random())}function between(a,c,b){return a<c?c:b<a?b:a}function isBetween(a,c,b){return c<=a&&a<=b}function isNotBetween(a,c,b){return a<c||b<a}Number.prototype.toPercent=function(){return round(100*this)};function number_percent(c,a,b){return (c-a)/(b-a)}function integer_percent(c,b,a){return integer_range(c,b,a,100)}function integer_range(d,a,c,b){return a+round(d*(c-a)/b)}function integer_elementRange(b,a,d,c){if(isNotBetween(b,0,a.offsetWidth-1))error("Outside range");return integer_range(b,a.offsetWidth-1,d,c)}function digits2(a){return a<10?"0"+a:a+""}function digits3(a){return a<10?"00"+a:a<100?"0"+a:a+""}function digits(b,a){return string_digits(b+"",a)}function string_digits(a,b){return string_repeatShort("0",b-a.length)+a}Number.prototype.digitsNegative=function(a){return (this<0?"-":"")+"0".repeat(a-(this+"").replace(/-|\./g,"").length)+this.abs()};function decimalPlaces(d,b){var a=d+"",c=a.indexOf(".");return c<0?a+"."+string_repeatShort("0",b):a+string_repeatShort("0",b-a.length+c+1)}Number.prototype.thousandsSeparator=function(){var b="",c=this+"",a=c.length;while(0<(a-=3))b=","+c.slice(a,a+3)+b;return c.slice(0,a+3)+b};gasMonth3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];gasWeekday=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];gasHex=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];ghiHex={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15};gasBase64=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","-","_"];ghiBase64={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,"-":62,_:63};function integer_toBinaryIf(a){return a<2147483648?integer_toBinary(a):"0"}function integer_toHexIf(a){return a<2147483648?integer_toHex(a):"0"}function integer_toBinary(b){var a=gasHex[b&1];while(b>>=1)a=gasHex[b&1]+a;return a}function integer_toHex(b){var a=gasHex[b&15];while(b>>=4)a=gasHex[b&15]+a;return a}function binary_toDecimal(c){var b=c.length,d=0,a=0;while(b--)a+=c.charCodeAt(b)-digit0Key<<d++;return a}function hex_toDecimal(d){var c=d.length,a=0,b=0;while(c--){b+=ghiHex[d.charAt(c)]<<a;a+=4}return b}function formatInteger(a){var b="",c=a+"",a=c.length;while(0<(a-=3))b=","+c.slice(a,a+3)+b;return c.slice(0,a+3)+b}function formatCurrency(c){var a=Number(c.replace(/[^-.0-9]/g,"")),b=a<=-5e-3,d=round(100*(a=abs(a)))%100;return (b?"-$":"$")+formatInteger(floor(a+.005))+"."+digits2(d)}function RunningAverage(){this.count=this.total=0;this.add=function(a){this.total+=a;this.count++};this.average=function(){return this.total/this.count};this.per=function(){return this.count/this.total}}function sequence0(c){var a=c+1,b=new Array(a);while(a--)b[a]=a;return b}function sequence(c,d){var a=d+1-c,b=new Array(a);while(a--)b[a]=a+c;return b}function characterSequence(a,h){var b=characterSequence_aiRange(h),c=array(a,b[0]),g=array(a,1),e=characterSequence_size(a,b),d=new Array(e),f=0;while(f<e){d[f++]=String.fromCharCode.apply(this,c);characterSequence_nextValue(c,b,g)}return d}function characterSequence_aiRange(c){var a=c.length,b=new Array(a);while(a--)b[a]=c[a].charCodeAt(0);return b}function characterSequence_size(d,b){var a=b.length,c=a>>1;while(a)c+=b[--a]-b[--a];return power(c,d)}function characterSequence_nextValue(b,d,c){var a=b.length;while(a--){if(b[a]<d[c[a]])return b[a]++;if(c[a]+1<d.length)return b[a]=d[(c[a]+=2)-1];c[a]=1;b[a]=d[0]}return 0}function CharacterSequence(a){this.aiRange=characterSequence_aiRange(a);this.aiValue=[this.aiRange[0]];this.aiValueRange=[1]}CharacterSequence.prototype.next=function(){var a=String.fromCharCode.apply(this,this.aiValue);this.nextValue();return a};CharacterSequence.prototype.nextValue=function(){var a=this.aiValue.length;while(a--){if(this.aiValue[a]<this.aiRange[this.aiValueRange[a]])return this.aiValue[a]++;if(this.aiValueRange[a]+1<this.aiRange.length)return this.aiValue[a]=this.aiRange[(this.aiValueRange[a]+=2)-1];this.aiValueRange[a]=1;this.aiValue[a]=this.aiRange[0]}this.aiValue.unshift(this.aiRange[0]);this.aiValueRange.unshift(1)};function fahrenheitToCelsius(a){return (a-32)*5/9}function celsiusToFahrenheit(a){return 9*a/5+32}function string_chop(a){return a.slice(0,-1)}String.prototype.countCharRE=function(a){return this.countCharRECorrect(new RegExp("[^"+a+"]+","g"))};String.prototype.countCharRECorrect=function(a){return this.replace(a,"").length};String.prototype.count=function(c){var b=0,a=this.find(c)+1;while(a){b++;a=this.findFrom(c,a)+1}return b};function string_startsWithOneOf(c,a){var b=a.length;while(b--)if(string_startsWith(c,a[b]))return 1;return 0}function string_startsWith(b,a){return a===b.slice(0,a.length)}function string_endsWith(b,a){return a===b.slice(-a.length)}function string_has(b,a){return -1<b.indexOf(a)}String.prototype.find=String.prototype.findFrom=String.prototype.indexOf;String.prototype.has=function(a){return -1<this.indexOf(a)};String.prototype.hasNot=function(a){return this.indexOf(a)<0};String.prototype.find_ignoreCase=function(a){return this.search(new RegExp(a,"i"))};String.prototype.has_ignoreCase=function(a){return -1<this.find_ignoreCase(a)};String.prototype.hasNot_ignoreCase=function(a){return this.find_ignoreCase(a)<0};String.prototype.hasRE=function(a){return -1<this.search(a)};function hasWord(b,a){return wordRegExp(a).test(b)}function wordRegExp(a){return new RegExp("\\b"+a+"\\b")}function wordSpaceRegExp(a){return new RegExp("^"+a+"( |$)| "+a+"(?= |$)")}function removeWord(b,a){return b.replace(wordSpaceRegExp(a),"")}String.prototype.findCase=function(a,b){return b?this.find(a):this.find_ignoreCase(a)};String.prototype.findElseLength=function(b,c){var a=this.find(b,c);return a<0?this.length:a};String.prototype.hasOneOf_ignoreCase=function(a){var b=a.length;while(b--)if(this.hasNot_ignoreCase(a[b]))return 0;return 1};function plurals(b,a){return b+" "+(1===b?a:a+"s")}function plural(a,b,c){return a+" "+(1===a?b:c)}function pluralValue(c,a,b){return 1===c?a:b||a+"s"}String.prototype.addPathIf=function(a){return string_startsWith(this,"/")||this.has("://")?this+"":a+this};function collapseSpace(a){return a.replace(/ {2,}/g," ")}function trim(a){return a.replace(/^ +| +$/g,"")}function trim_collapseSpace(a){return a.replace(/^ +| +$|( ){2,}/g,"$1")}function trimWhitespace(a){return a.replace(/^\s+|\s+$/g,"")}function trim_collapseWhitepace(a){return a.replace(/^\s+|\s+$|(\s)+/g,"$1")}function fixEnter(a){return a.replace(/\r\n|\n/g,"\r")}function fixNewline(a){return a.replace(/\r\n|\r/g,"\n")}function nameToScript(a){return a.toLowerCase().replace(/ (\w)/g,function(b,a){return a.toUpperCase()})}function dashToScript(a){return a.replace(/-(.)/g,function(b,a){return a.toUpperCase()})}String.prototype.correctRE=function(){return this.replace(/(\(|\)|\[|]|\{|\.|\?|\*|\+|\||\^|\$|\/|\\)/g,"\\$1")};String.prototype.truncate=function(a){return a<this.length?this.slice(0,a)+"...":this+""};String.prototype.scriptToDash=function(){return this.replace(/([A-Z])/g,function(b,a){return "-"+a.toLowerCase()})};String.prototype.scriptToSentenceCase=function(){return this.charAt(0).toUpperCase()+this.slice(1).replace(/[A-Z]+|[0-9]+/g,function(a){return " "+a.toLowerCase()})};String.prototype.scriptToTitleCase=function(){return this.charAt(0).toUpperCase()+this.slice(1).replace(/([A-Z]+|[0-9]+)/g," $1")};String.prototype.splitEmpty=function(a){return this.length?this.split(a):[]};function isIntegerType(a){return "number"===typeof a?isInteger(a):0}function isInteger(a){return !isNaN(a)&&Infinity!==a&&round(a)===a}function isStringInteger(a){return round(Number(a))==a&&""!==a}function isStringNumber(a){return Number(a)==a&&""!==a}String.prototype.mysqlToDate=function(){return new Date(this.replace(/-/g,"/"))};String.prototype.quoteBackslashAmpersand=function(){return '"'+this.replace(/("|\\)/g,"\\$1").replace(/\r\n|\n|\r/g,"%0A").replace(/&/g,"%26")+'"'};String.prototype.quoteStutter=function(){return '"'+this.replace(/"/g,'""')};String.prototype.unquoteStutter=function(){return this.replace(/""/g,'"')};function ascii(c){var a=[],b=-1;while(++b<c.length)a.push(c.charCodeAt(b));return a}Array.prototype.asciiToString=function(){var a=this.length,b=new Array(a);while(a--)b[a]=String.fromCharCode(this[a]);return b.join("")};function string_repeatShort(a,b){return b<1?"":1===b?a:2===b?a+a:a+a+string_repeat(a,b-2)}function string_repeat(c,b){if(b<1)return errorIn("iSize < 1: infinite loop","string_repeat");var a=c;while(--b)a+=c;return a}function queue_pop(b){var a;for(a in b){delete b[a];return a}return ""}function keys(c){var b,a=[];for(b in c)a.push(b);return a}function ocopy(c){var a,b={};for(a in c)b[a]=c[a];return b}function oempty(a){var b;for(b in a)return 0;return 1}function onotEmpty(a){var b;for(b in a)return 1;return 0}function ofind(b,c){var a;for(a in b)if(c===b[a])return a}function ojoinBag(d,c){var b,a=[];for(b in d)a.push(b);return a.join(c)}function omergeIn(c,b){var a;for(a in b)c[a]=b[a]}function ohasChild(b,a){while(a&&b!==a)a=a.parent;return b===a}function IntegerArrayFromBase64(b,a){this.iPer=this.i=0;this.asBase64=b.split("");this.iBitCount=a;this.iOriginalPer=6/a-1;this.iOriginalMask=(1<<a)-1}IntegerArrayFromBase64.prototype.next=function(){if(!this.iPer--){if(this.i===this.asBase64.length)errorIn("Out of bounds","IntegerArrayFromBase64_bit.next");this.iBase64=ghiBase64[this.asBase64[this.i++]];this.iMask=this.iOriginalMask;this.iPer=this.iOriginalPer;this.iShift=0}else{this.iMask<<=this.iBitCount;this.iShift+=this.iBitCount}return (this.iBase64&this.iMask)>>this.iShift};function IntegerArrayBase64(b,a){this.iSizeTo=b;this.asBase64=array0(b);this.iBitCount=a;this.iOriginalPer=6/a;if(!isInteger(this.iOriginalPer))error("Expected integer, not "+this.iOriginalPer);this.reset()}IntegerArrayBase64.prototype.reset=function(){this.count=this.iSize=this.iShift=this.iBase64=0;this.iPer=this.iOriginalPer};IntegerArrayBase64.prototype.grow=function(){this.asBase64=this.asBase64.concat(array0(this.iSizeTo<<=1))};IntegerArrayBase64.prototype.add=function(a){if(!--this.iPer){if(this.iSizeTo===this.iSize)this.grow();this.asBase64[this.iSize++]=gasBase64[this.iBase64|a<<this.iShift];this.iShift=this.iBase64=0;this.iPer=this.iOriginalPer}else{this.iBase64|=a<<this.iShift;this.iShift+=this.iBitCount}this.count++};IntegerArrayBase64.prototype.toString=function(){return this.iShift?this.asBase64.slice(0,this.iSize).join("")+gasBase64[this.iBase64]:this.asBase64.slice(0,this.iSize).join("")};function array_has(a,b){return -1<array_indexOf(a,b)}function array_indexOf(b,c){var a=b.length;while(a--)if(c===b[a])return a;return -1}function array_splitEmpty(a,b){return a.length?a.split(b):[]}Array.prototype.has=function(a){return -1<this.find(a)};Array.prototype.hasNot=function(a){return this.find(a)<0};Array.prototype.find=function(b){var a=this.length;while(a--)if(b===this[a])return a;return -1};Array.prototype.last=function(){return this[this.length-1]};Array.prototype.only=function(){if(1!==this.length)error("Expected one value but found "+this.length+" values.");return this[0]};function array_is0(a){var b=a.length;while(b--)if(a[b])return 0;return 1}function array_is1(a){var b=a.length;while(b--)if(!a[b])return 0;return 1}function array(a){return new Array(a)}function array0(a){var b=array(a);while(a--)b[a]=0;return b}function array1(a){var b=array(a);while(a--)b[a]=1;return b}function arrayEmptyString(a){var b=array(a);while(a--)b[a]="";return b}function arrayOf(a,c){var b=array(a);while(a--)b[a]=c;return b}function array_fill0(a){var b=a.length;while(b--)a[b]=0}function array_fill1(a){var b=a.length;while(b--)a[b]=1}function array_fill(a,c){var b=a.length;while(b--)a[b]=c}function array_maxStringSize(a){var b=a.length-1,c=a[b].length;while(b)if(c<a[--b].length)c=a[b].length;return c}function array_addFirst(a,c){var b=a.length-1;if(b<0)error("Expected non-empty array");while(b--)a[b+1]=a[b];a[0]=c}function array_shuffle(d){var a=d.length,f=a-1,b=array0(a),c=array0(a),e=a;while(e--){j=floor(a*random());if(b[j])if(random()<.5)while(b[j=j===f?0:j+1]);else while(b[j=j?j-1:a-1]);;b[j]=1;c[e]=d[j]}return c}Array.prototype.addFirst=function(a){this.unshift(a)};Array.prototype.addAt=function(b,a){this.splice(a,0,b)};Array.prototype.merge=Array.prototype.concat;Array.prototype.copy=function(){return this.slice()};Array.prototype.decrementFrom=function(a){while(a<this.length)this[a++]--};Array.prototype.mergeIn=function(a){var b=-1;while(++b<a.length)this.push(a[b])};Array.prototype.removeIndex=function(a){return this.splice(a,1)[0]};Array.prototype.toHash=function(){var a=this.length,b={};while(a--)b[this[a]]=a;return b};Array.prototype.toNumberIn=function(){var a=this.length;while(a--)this[a]=Number(this[a]);return this};Array.prototype.scriptToTitleCase=function(){var a=this.length,b=[];while(a--)b[a]=this[a].scriptToTitleCase();return b};function createIncrementArray(a){var b=new Array(a);while(a--)b[a]=a;return b}function phpArrays_split(a){return a.length?phpArrays_splitCorrect(a):[]}function phpArrays_splitCorrect(c){var a=c.split("\x02"),b=a.length;while(b--)a[b]=a[b].split("\x01");return a}function phpToStringArray(a){return a.split("\x01").slice(1)}function phpToIntegerArray(c){var a=c.split("\x01").slice(1),b=a.length;while(b--)a[b]=Number(a[b]);return a}function phpToRecordArray(b,c,a){return phpToRecordArrayMap(b,c,function(b,c){return b?b.replace("."," "):a[iCountMinus1-c]})}function phpToRecordArray_namePluralEnd(a){return phpToRecordArrayMap(a,["tableName","englishName","englishNamePlural"],function(c,d,a,b){return c?c.replace("."," "):d<a?"Record":b[a-1]?b[a-1].replace("."," ")+"s":"Records"})}function phpToRecordArrayMap(d,e,f){var b=d.split(","),a=b.length,c=new Array(a);while(a--)c[a]=phpToRecordArrayMapHelper(b[a].split(" "),e,f);return c}function phpToRecordArrayMapHelper(b,c,f){var d={},a=c.length,e=a-1;while(a--)d[c[a]]=f(b[a],a,e,b);return d}function time(){return (new Date).getTime()}function time_toDate(a){return new Date(a*1000)}function time_format(){var a=new Date;return digits2(a.getHours())+":"+digits2(a.getMinutes())+":"+digits2(a.getSeconds())}function time_hour(a){return floor(a/100)}function time_minute(a){return a%100*60/100}function time_12hour(a){return !a?12:a<13?a:a-12}function time_suffix(a){return a<12?"am":"pm"}function time_decimalHour(a){return 100*a}function time_decimalMinute(a){return a*100/60}function time_decimalHourMinute(b,a){return time_decimalHour(b)+time_decimalMinute(a)}function emptyFunction(){}function returnValue(a){return a}function returnTrue(){return 1}function parametersToArray(a){return Array.prototype.slice.apply(a)}function array_deepCopy(d){var b=d.length,a,c=[];while(b--){a=d[b];c[b]=a instanceof Array?array_deepCopy(a):a instanceof Object?odeepCopy(a):a}return c}function odeepCopy(d){var b,a,c={};for(b in d){a=d[b];c[b]=a instanceof Array?array_deepCopy(a):a instanceof Object?odeepCopy(a):a}return c}function d(a){return deepJoinWithType(a)}function deepJoinWithType(a){return deepJoin(a,1)}function deepJoin(a,b){return "object"===typeof a?a instanceof Array?a.deepJoin(b):a instanceof Date?a:isElement(a)?"(element)":odeepJoin(a,b):b?"("+typeof a+")"+a:"string"===typeof a?'"'+a+'"':a}function odeepJoin(c,d){var b=[],a;for(a in c)b.push(a+":"+deepJoin(c[a],d));return "{ "+b.join(" ")+" }"}Array.prototype.deepJoin=function(c){var a=[],b=-1;while(++b<this.length)a.push(deepJoin(this[b],c));return "["+a.join(" ")+"]"};function deepJoinStringOnly(b){var a,c=[];for(a in b)if("function"!==typeof b[a]&&a!==a.toUpperCase())c.push(a+":"+b[a]);return c.join(",")}function Grid(a,b,c){this.sizeX=a;this.sizeY=b;this.size=a*b;this.clearValue=c;this.items=arrayOf(this.size,this.clearValue)}Grid.prototype.clear=function(){array_fill(this.items,this.clearValue)};Grid.prototype.clearIndex=function(a){this.verifyIndex(a);this.items[a]=this.clearValue};Grid.prototype.clearXY=function(a,b){this.verifyXY(a,b);this.items[b*this.sizeX+a]=this.clearValue};Grid.prototype.index=function(a){this.verifyIndex(a);return this.items[a]};Grid.prototype.xy=function(a,b){this.verifyXY(a,b);return this.items[b*this.sizeX+a]};Grid.prototype.changeIndex=function(a,b){this.verifyIndex(a);this.items[a]=b};Grid.prototype.changeXY=function(a,b,c){this.verifyXY(a,b);this.items[b*this.sizeX+a]=c};Grid.prototype.verifyIndex=function(a){if(isNotBetween(a,0,this.sizeX*this.sizeY-1))error("i out of bounds")};Grid.prototype.verifyXY=function(a,b){if(isNotBetween(a,0,this.sizeX))error("x out of bounds");if(isNotBetween(b,0,this.sizeY))error("y out of bounds")};function stringValues(b){var a,c=[];for(a in b)if("string"===typeof b[a]&&b[a])c.push(a+":"+b[a]);return c}function errorIn(b,a){return;error(a+" Error\n--------------------\n"+b)}error.count=0;error.show=1;error.time=0;function error(a){return;error.count++;if(error.show&&512<time()-error.time){error.time=time();if(1===error.show&&confirm("PseudoScript.com Error\n----------------------------------------\n"+a+"\n\nDebug?\n"))debugger;else log("! Error #"+digits2(error.count)+" "+time_format()+": "+a)}}logCount=0;logTo=null;logLineCount=0;logOneAtATime=0;log_time=0;qtip_delay=2400;qtip_timeoutId=0;function clearLog(){if(logTo)logTo.clear()}function logMultiline(a){var b=a.length;while(b--)log(a[b])}function log(){var a=parametersToArray(arguments).join(", ").replace(/\n/g,newline);if(!logTo)logTo=new Log(elementById("geLog")||addDivElement_id_class(geBody,"geLog","pre"));if(logOneAtATime&&(128<time()-log_time||logLineCount&&logLineCount<=logTo.meText.nodeValue.count(newline)))clearLog();log_time=time();logTo.show(logCount?logCount+++" "+a+newline:a+newline);return a}function qtipHide(){hideElement(geTip)}function qtipMany(){qtip(parametersToArray(arguments).join(", "));return arguments[0]}function qtip(a){var b=geTip=elementById("geTip")||addDivElement_id_class_emptyText(geBody,"geTip","qtip");changeElementValue(b,logCount?logCount+++" "+a:a);showElementIf(b);if(qtip_timeoutId)clearTimeout(qtip_timeoutId);if(qtip_delay)qtip_timeoutId=setTimeout(qtipHide,qtip_delay);return a}function Log(a){this.meText=addEmptyTextElement(a);this.time=0}Log.prototype.clear=function(){clearTextElement(this.meText)};Log.prototype.show=function(a){addToTextElement(this.meText,a)};inDrag=0;dragElement=null;nextZIndex=1;function dragIf(){if(dragElement)moveElement(dragElement,dragX=mouseX-drag_offsetX,dragY=mouseY-drag_offsetY)}function dragStart(a){if(!eventButton(a)){inDrag=1;dragElement=this;dragElement.style.zIndex=nextZIndex++;drag_fromX=elementX(dragElement);drag_fromY=elementY(dragElement);drag_offsetX=mouseX-drag_fromX;drag_offsetY=mouseY-drag_fromY;if(!ie)vetoEvent(a)}}function drag_resetIf(){if(dragElement){moveElement(dragElement,drag_fromX,drag_fromY);dragElement=null}}var gheElementById={};function element(a){return gheElementById[a]||(gheElementById[a]=document.getElementById(a))}function firstChildTextElement(a){return isElement(a)?a.firstChild:a.nextSibling.firstChild}function elementNotInSingleClass(a,b){if(a&&isTextNode(a))a=a.parentNode;while(a){if(b===a.className)return 0;a=a.parentNode}return 1}function getElementAttributeUp(a,b){if(a=getElementByAttributeUp(a,b))return a.getAttribute(b)}function getElementByAttributeUp(a,b){if(a&&isTextNode(a))a=a.parentNode;for(;a&&isElement(a);a=a.parentNode)if(a.getAttribute(b))return a}function pageX(a){var b=a.offsetLeft;while(a=a.offsetParent)b+=a.offsetLeft;return b}function pageY(a){var b=a.offsetTop;while(a=a.offsetParent)b+=a.offsetTop;return b}function fitHiddenElement(a,b,c){showInvisibleElement(a);fitElement(a,b,c);visibleHiddenElement(a)}function fitHiddenElementY(a,c,d,b){showInvisibleElement(a);fitElementY(a,c,d,b);visibleHiddenElement(a)}function fitHiddenElementIn(a,d,e,b,c){showInvisibleElement(a);fitElementIn(a,d,e,b,c);visibleHiddenElement(a)}function clipElement(e,d,b,a,c){e.style.clip="rect("+d+" "+b+" "+a+" "+c+")"}function clipElementOff(a){a.style.clip="rect(auto auto auto auto)"}function fitElement(a,b,c){moveElement(a,fitElement_x(a,b),fitElement_y(a,c))}function fitElementY(a,c,d,b){moveElement(a,fitElement_x(a,c),fitElementIn_y(a,d,b))}function fitElementIn(a,d,e,b,c){moveElement(a,fitElementIn_x(a,d,b),fitElementIn_y(a,e,c))}function fitElement_x(b,a){return min(a,sizeX()-b.offsetWidth)}function fitElement_y(b,a){return min(a,sizeY()-b.offsetHeight)}function fitElementIn_x(b,a,c){return sizeX()<a+b.offsetWidth?max(0,c-b.offsetWidth):a}function fitElementIn_y(b,a,c){return sizeY()<a+b.offsetHeight?max(0,c-b.offsetHeight):a}function addElementClassIf(b,a){if(!hasElementClass(b,a))addElementClass(b,a)}function removeElementClassIf(b,a){if(hasElementClass(b,a))removeElementClass(b,a)}function hasElementClass(b,a){return hasWord(b.className,a)}function clearElementClass(a){a.className=""}function addElementClass(b,a){if(hasElementClass(b,a))error('Already has class "'+a+'"\n\n'+b.outerHTML);b.className+=" "+a}function removeElementClass(a,b){if(!hasElementClass(a,b))error('Does not have class "'+b+'"\n\n'+a.outerHTML);a.className=removeWord(a.className,b)}function toggleElementClass(b,a){hasElementClass(b,a)?removeElementClass(b,a):addElementClass(b,a)}function addElementStyle(c,b,a){if(a===c.style[b])error("Already has "+b+":"+a+"\n\n"+c.outerHTML);c.style[b]=a}function removeElementStyle(b,a){if(!b.style[a])error('Does not have style "'+a+'"\n\n'+b.outerHTML);b.style[a]=""}function toggleElementStyle(b,a,c){b.style[a]=b.style[a]?"":c}function changeElementVisibilityIf(a,b){b?showElementIf(a):hideElementIf(a)}function changeElementVisibility(a,b){b?showElement(a):hideElement(a)}function isElementHidden(a){return "none"===a.style.display}function isElementVisible(a){return "none"!==a.style.display}function hideElementIf(a){if(!a.style.display)a.style.display="none"}function showElementIf(a){if(a.style.display)a.style.display=""}function hideElement(a){addElementStyle(a,"display","none")}function showElement(a){removeElementStyle(a,"display")}function toggleElementVisibility(a){toggleElementStyle(a,"display","none")}function invisibleElement(a){addElementStyle(a,"visibility","hidden")}function visibleElement(a){removeElementStyle(a,"visibility")}function showInvisibleElement(a){invisibleElement(a);showElement(a)}function hideVisibleElement(a){hideElement(a);visibleElement(a)}function visibleHiddenElement(a){ie?visibleElement(a):setTimeout("visibleElement"+"("+"element"+"('"+correctId(a)+"'))",0)}function disableElement(a){changeElementDisableness(a,true)}function enableElement(a){changeElementDisableness(a,false)}function isElementDisabled(a){return a.disabled}function isElementEnabled(a){return !a.disabled}function disableElementIf(a){if(!a.disabled)disableElement(a)}function enableElementIf(a){if(a.disabled)enableElement(a)}function changeElementDisableness(b,a){if(a===b.disabled)error(a+" === e.disabled already\n\n"+b.outerHTML);b.disabled=a}function isElement(a){return 1===a.nodeType}function isTextNode(a){return 3===a.nodeType}function isDivElement(a){return "DIV"===a.nodeName}function isSpanElement(a){return "SPAN"===a.nodeName}function isBreakElement(a){return "BR"===a.nodeName}function isButtonElement(a){return "BUTTON"===a.nodeName}function isImageElement(a){return "IMG"===a.nodeName}function isInputElement(a){return "INPUT"===a.nodeName}function isInputAreaElement(a){return "TEXTAREA"===a.nodeName}function isListItemElement(a){return "LI"===a.nodeName}function isTableHeadElement(a){return "TH"===a.nodeName}function isTableCellElement(a){return "TD"===a.nodeName}function checkedRadioElementId(c){var a=c.getElementsByTagName("input"),b=a.length;while(b--)if(a[b].checked)return a[b].id;error("No radio input checked")}function changeElementValues(d,c,b){var a=d.childNodes[b-1];while(b--){a.firstChild.nodeValue=c[b];a=a.previousSibling}}function hideElements(c,d,b){var a=c.childNodes[b-1];while(d<b--){hideElement(a);a=a.previousSibling}}function showElements(c,d,b){var a=c.childNodes[b-1];while(d<b--){showElement(a);a=a.previousSibling}}function addTextElement(b,a){return b.appendChild(document.createTextNode(a))}function addEmptyTextElement(a){return a.appendChild(document.createTextNode(""))}function changeTextElement(b,a){b.nodeValue=a}function addToTextElement(b,a){b.nodeValue+=a}function clearTextElement(a){a.nodeValue=""}function textElement(a){return a.nodeValue}function addElementValue(b,a){b.appendChild(document.createTextNode(a))}function addNonBreakingSpace(a){return a.appendChild(document.createTextNode(nonBreakingSpace))}function elementValue(a){return a.firstChild.nodeValue}function changeElementValue(b,a){b.firstChild.nodeValue=a}function clearElementValue(a){changeElementValue(a,"")}function setElementValue(a,b){a.firstChild?changeElementValue(a,b):addElementValue(a,b)}function changeImageElementSource(a,b){if(!isImageElement(a))error("Expected an image element, got:\n\n"+a.outerHTML,"changeImageElementSource");a.style.width=a.style.height="auto";a.src=b}function addElement(b,a){return a.appendChild(document.createElement(b))}function addElement_id_class(d,b,e,c){var a=document.createElement(d);a.id=e;a.className=c;return b.appendChild(a)}function addElement_id_class_emptyText(d,b,e,c){var a=document.createElement(d);a.id=e;a.className=c;addEmptyTextElement(a);return b.appendChild(a)}function addElement_class(d,b,c){var a=document.createElement(d);a.className=c;return b.appendChild(a)}function addHiddenElement_class(d,b,c){var a=document.createElement(d);hideElement(a);a.className=c;return b.appendChild(a)}function addElement_class_value(e,b,c,d){var a=document.createElement(e);a.className=c;addElementValue(b.appendChild(a),d);return a}function addElement_value(d,b,c){var a=document.createElement(d);addElementValue(b.appendChild(a),c);return a}function addElementBefore_class_value(e,f,b,c,d){var a=document.createElement(e);a.className=c;addElementValue(f.insertBefore(a,b),d);return a}function addDivElement(a){return addElement("div",a)}function addDivElement_id_class(c,b,a){return addElement_id_class("div",c,b,a)}function addDivElement_id_class_emptyText(c,b,a){return addElement_id_class_emptyText("div",c,b,a)}function addDivElement_class(b,a){return addElement_class("div",b,a)}function addHiddenDivElement_class(b,a){return addHiddenElement_class("div",b,a)}function addDivElement_class_value(c,a,b){return addElement_class_value("div",c,a,b)}function addDivElement_value(b,a){return addElement_value("div",b,a)}function addSpanElement_class(b,a){return addElement_class("span",b,a)}function addSpanElement_value(b,a){return addElement_value("span",b,a)}function addSpanElement_class_value(c,a,b){return addElement_class_value("span",c,a,b)}function addSpanElementBefore_class_value(d,c,a,b){return addElementBefore_class_value("span",d,c,a,b)}function addListItemElement_value(b,a){return addElement_value("li",b,a)}function addLabelElement(d,b,c){var a=document.createElement("label");a.htmlFor=b;addElementValue(d.appendChild(a),c);return a}function addButtonElement(b,c){var a=document.createElement("button");addElementValue(a,c);return b.appendChild(a)}function addImageElement(c,b){var a=document.createElement("img");a.src=b;return c.appendChild(a)}function addImageElement_class(d,c,b){var a=document.createElement("img");a.src=c;a.className=b;return d.appendChild(a)}function addCheckboxInputElement(b){var a=document.createElement("input");a.type="checkbox";a.className="checkbox";b.appendChild(a)}function addTextInputElement(a){return addElement_class("input",a,"text")}function addTextInputElement_id(b,a){return addElement_id_class("input",b,a,"text")}function addInputElement_class(b,a){return addElement_class("input",b,a)}function addInputElement_class_value(d,b,c){var a=addElement_class("input",d,b);a.value=c;return a}function addInputAreaElement_class(b,a){return addElement_class("textarea",b,a)}function addSelectElement(a){return addElement("select",a)}function changeSelectItemElement(a,c,b){a.text=c;a.value=b}function addTableElement(b){var a=addElement("table",b);a.cellSpacing=0;addElement("tbody",a);return a}function addTableElement_cellSpacing(c,b){var a=addElement("table",c);a.cellSpacing=b;addElement("tbody",a);return a}function addTableRowElement(a){return addElement("tr",a.firstChild)}function addRowElement(a){return addElement("tr",a)}function addCellElement(a){return addElement("td",a)}function addCellElement_class(b,a){return addElement_class("td",b,a)}function addCellElement_class_rowSpan(d,c,b){var a=document.createElement("td");a.className=c;a.rowSpan=b;return d.appendChild(a)}function addCellElement_class_value(d,b,c){var a=addElement_class("td",d,b);addElementValue(a,c);return a}function addCellElement(a){return addElement("td",a)}function addCellElement_value(c,b){var a=addElement("td",c);addElementValue(a,b);return a}function addSelectItemElement(b,d,c){var a=document.createElement("option");a.text=d;a.value=c;return ie?b.add(a):b.appendChild(a)}function removeNode(a){return a.parentNode.removeChild(a)}function removeChildNodes(a){while(a.hasChildNodes())a.removeChild(a.lastChild);return a}function getStyleAttribute(c,b,d){var a=style(c,d);return a&&a[b]}function setStyles(b,c){var a;for(a in b)setStyleAttributes(a,b[a],c)}function setStyleAttributes(c,b,d){var a;for(a in b)setStyleAttribute(c,a,b[a],d)}function setStyleAttribute(d,b,e,a){var c=style(d,a);c?(c[b]=e):addStyleAttribute(a?getStyleSheet(a):getLastStyleSheet(),d,b,e)}function addStyleAttribute(a,c,b,d){ie?a.addRule(c,b.scriptToDash()+colon+d):a.insertRule(c+openBrace+b.scriptToDash()+colon+d+closeBrace,a.cssRules.length)}function style(c,d){if(d)return getStyleSelector(getStyleSheet(d),c);var b,a=document.styleSheets,e=a.length;while(e--)if(b=getStyleSelector(a[e],c))return b}function getStyleSelector(d,e){var c=e.toLowerCase(),a=d[ie?"rules":"cssRules"],b=a.length;while(b--)if(a[b].selectorText.toLowerCase()===c)return a[b].style}function verifyStyleSheetsExist(){if(!document.styleSheets[0])error('At least one style sheet must exist. Into the <head> enter:\n  <style type="text/css"></style>')}function getStyleSheet(a){verifyStyleSheetsExist();if(!element(a))error("Cannot find a stylesheet with id '"+a+"'");return ie?element(a).styleSheet:element(a).sheet}function getLastStyleSheet(){verifyStyleSheetsExist();return document.styleSheets[document.styleSheets.length-1]}function moveCursor(b,a){setSelection(b,a,a)}function moveCursorToStart(a){setSelection(a,0,0)}function moveCursorToEnd(a){setSelection(a,a.value.length,a.value.length)}function getCursorPosition(){}function replaceSelection(a,c){if(ie){var d=document.selection.createRange(),f=d.text;d.text=c;if(f){d.moveStart("character",-c.length);d.select()}}else{var b=a.selectionStart,e=a.selectionEnd;a.value=a.value.substring(0,b)+c+a.value.substring(e);b===e?moveCursor(a,b+c.length):setSelection(a,b,b+c.length)}}function selectText(b,c){var a=b.value.find_ignoreCase(c);if(-1<a)setSelection(b,a,a+c.length);return a}function selectTextFrom(c,d,a,f,e){a=a||0;var b=c.value.slice(a).findCase(d,e);if(-1<b)setSelection(c,a+b,a+b+d.length);return b<0?a&&f?selectTextFrom(c,d,0,f,e):b:a+b}function setSelection(d,a,c){if(c<a)error("Expected iStart < iEnd, but "+a+" is not less than "+c+period);if(ie){var b=d.createTextRange(),e=d.value.slice(0,a).countCharRE("\\r");b.collapse(true);b.moveEnd("character",c-e);b.moveStart("character",a-e);b.select()}else d.setSelectionRange(a,c)}function getCookie(d){var a=document.cookie,b=d+"=",c=a.find(b);return c<0?undefined:decodeURIComponent(a.substring(c+b.length,a.findElseLength(";",c+b.length)))}function setCookie(a,b){document.cookie=a+"="+encodeURIComponent(b)}function toWiki(a){var b=elementText(a);a.removeChild(a.firstChild);if(a.hasChildNodes())error("Expected only one text node child");removeElementClass(a,"wiki");addWiki(a,b)}function addWiki(h,g){var b=g.split("\n\n"),e=b.length-1,a=0,c=[],d,f;while(a<e){f=b[a+1];d=f.slice(0,2);if("# "===d)c.push(addWikiList(b,a,"# ","ol")),a+=2;else if("* "===d)c.push(addWikiList(b,a,"* ","ul")),a+=2;else c.push('<div class="paragraph">'+addWikiLine(b[a++])+"</div>")}h.innerHTML=a===e?c.join("")+addWikiLine(b[a]):c.join("")}function addWikiList(d,f,g,b){var e=d[f+1].split("\n"),a=e.length,c=array0(a);while(a--)c[a]=addWikiLine(e[a].slice(2));return addWikiLine(d[f])+"<"+b+"><li>"+c.join("</li><li>")+"</li></"+b+">"}function addWikiLine(a){return a.replace(/key:(\S+)|key\(([^)]+)\)/g,'<span class="key">$1$2</span>').replace(/\*([^*]+)\*/g,'<span class="bold">$1</span>')}geBody=document.body;geHtml=geBody.parentNode;function resizeEvent(a,b){addEvent(a,"resize",b)}function focusEvent(a,b){addEvent(a,"focus",b)}function blurEvent(a,b){addEvent(a,"blur",b)}function changeEvent(a,b){addEvent(a,"change",b)}function loadEvent(a,b){addEvent(a,"load",b)}function clickEvent(a,b){addEvent(a,"click",b)}function doubleClickEvent(a,b){addEvent(a,"dblclick",b)}function contextmenuEvent(a,b){addEvent(a,"contextmenu",b)}function mousemoveEvent(a,b){addEvent(a,"mousemove",b)}function mousedownEvent(a,b){addEvent(a,"mousedown",b)}function mouseupEvent(a,b){addEvent(a,"mouseup",b)}function keypressEvent(a,b){addEvent(a,"keypress",b)}function keydownEvent(a,b){addEvent(a,"keydown",b)}function keyupEvent(a,b){addEvent(a,"keyup",b)}function focusEventObject(a,b,c){addEventObject(a,b,"focus",c)}function blurEventObject(a,b,c){addEventObject(a,b,"blur",c)}function loadEventObject(a,b,c){addEventObject(a,b,"load",c)}function clickEventObject(a,b,c){addEventObject(a,b,"click",c)}function doubleClickEventObject(a,b,c){addEventObject(a,b,"dblclick",c)}function contextmenuEventObject(a,b,c){addEventObject(a,b,"contextmenu",c)}function mousemoveEventObject(a,b,c){addEventObject(a,b,"mousemove",c)}function mousedownEventObject(a,b,c){addEventObject(a,b,"mousedown",c)}function mouseupEventObject(a,b,c){addEventObject(a,b,"mouseup",c)}function keypressEventObject(a,b,c){addEventObject(a,b,"keypress",c)}function keydownEventObject(a,b,c){addEventObject(a,b,"keydown",c)}function keyupEventObject(a,b,c){addEventObject(a,b,"keyup",c)}function addEventObject(c,b,a,d){b.setAttribute("o"+a,c);addEvent(b,a,d)}function noSelect(a){selectstartEvent(a,vetoEvent)}function screenSizeX(){return screen.width}function screenSizeY(){return screen.height}function scrollElementLeft(a){a.scrollLeft-=72}function scrollElementRight(a){a.scrollLeft+=72}function scrollElementUp(a){a.scrollTop-=72}function scrollElementDown(a){a.scrollTop+=72}/*@if (4 < @_jscript_version)newline="\r";function draggestureEvent(a,b){addEvent(a,"dragstart",b)}function selectstartEvent(a,b){addEvent(a,"selectstart",b)}function mousewheelEvent(a,b){addEvent(a,"mousewheel",b)}function draggestureEventObject(a,b,c){addEventObject(a,b,"dragstart",c)}function selectstartEventObject(a,b,c){addEventObject(a,b,"selectstart",c)}function mousewheelEventObject(a,b,c){addEventObject(a,b,"mousewheel",c)}function mouseenterEventObject(b,a,c){a.setAttribute("omouseenter",b);mouseenterEvent(a,c)}function mouseleaveEventObject(b,a,c){a.setAttribute("omouseleave",b);mouseleaveEvent(a,c)}function addEvent(b,a,c){verifyElementEvent(b,a);b["on"+a]=c}function mouseenterEvent(a,b){verifyElementEventHelper(a,"mouseenter");a.onmouseenter=b}function mouseleaveEvent(a,b){verifyElementEventHelper(a,"mouseleave");a.onmouseleave=b}function correctElementScrollEvent(){}function elementText(a){return trim(a.firstChild.nodeValue).replace(/\r/g,"\n")}function elementX(a){return a.style.pixelLeft}function elementY(a){return a.style.pixelTop}function moveElementX(b,a){b.style.pixelLeft=a}function moveElementY(b,a){b.style.pixelTop=a}function moveElement(a,b,c){a.style.pixelLeft=b;a.style.pixelTop=c}function moveElement0(a){a.style.pixelLeft=a.style.pixelTop=0}function moveElementSquare(a,b){a.style.pixelLeft=a.style.pixelTop=b}function resizeElementX(b,a){b.style.pixelWidth=a}function resizeElementY(b,a){b.style.pixelHeight=a}function resizeElement(a,b,c){a.style.pixelWidth=b;a.style.pixelHeight=c}function squareElement(a,b){a.style.pixelWidth=a.style.pixelHeight=b}function add1PixelSpanElement_class_xy(b,c,d,e){var a=document.createElement("span");a.className=c;a.style.pixelLeft=d;a.style.pixelTop=e;b.appendChild(a).appendChild(document.createElement("span"));return a}function addElementHoverClassEvent_ie(a){a.onmouseenter=addElementHoverClass_ie;a.onmouseleave=removeElementHoverClass_ie}function addElementHoverClass_ie(){addElementClass(this,"hover-ie")}function removeElementHoverClass_ie(){removeElementClass(this,"hover-ie")}function windowSizeX(){return geHtml.offsetWidth}function windowSizeY(){return geHtml.offsetHeight}function sizeX(){return geHtml.clientWidth}function sizeY(){return geHtml.clientHeight}function scrollX(){return geHtml.scrollLeft}function scrollY(){return geHtml.scrollTop}function correctMouseCursor(){geBody.style.cursor="auto";geBody.style.cursor=""}function hideMouseCursor(){}function showMouseCursor(){}function eventObject(a){return window[a.getAttribute("o"+event.type)]}function eventTarget(){return event.srcElement}function eventTargetIn(a){return a.contains(event.srcElement)}function eventX(){return event.clientX}function eventY(){return event.clientY}function eventFromX(a){return event.clientX-a.offsetLeft}function eventOffsetX(){return event.offsetX}function eventOffsetY(){return event.offsetY}function eventPageX(){return event.clientX+geHtml.scrollLeft}function eventPageY(){return event.clientY+geHtml.scrollTop}function eventScreenX(){return event.screenX}function eventScreenY(){return event.screenY}function eventButton(){var a=event.button;return 1===a?0:2===a?2:1}function eventWheel(){return -event.wheelDelta}function eventKeyCode(){return event.keyCode}function eventChangeKeyCode(){var a=event.keyCode;return (a<f1Key||f12Key<a)&&!event.ctrlKey&&!event.altKey?a:0}function eventAltKey(){return event.altKey}function eventCtrlKey(){return event.ctrlKey}function eventMetaKey(){return event.metaKey}function eventShiftKey(){return event.shiftKey}function stopEvent(){event.cancelBubble=true}function stopEventAction(){event.returnValue=false}function vetoEvent(){event.returnValue=false}function eventRelatedTarget(){if("mouseover"===event.type||"mouseout"===event.type)error("Expected only mouseenter | mouseleave");if("mouseenter"!==event.type&&"mouseleave"!==event.type)error("Expected mouseenter | mouseleave");return "mouseenter"===event.type?event.fromElement||geBody:event.toElement||geBody}@else@*/newline="\n";function draggestureEvent(a,b){addEvent(a,"draggesture",b)}function selectstartEvent(a,b){addEvent(a,"mousedown",b)}function mousewheelEvent(a,b){addEvent(a,"DOMMouseScroll",b)}function draggestureEventObject(a,b,c){addEventObject(a,b,"draggesture",c)}function selectstartEventObject(a,b,c){addEventObject(a,b,"mousedown",c)}function mousewheelEventObject(a,b,c){addEventObject(a,b,"DOMMouseScroll",c)}function mouseenterEventObject(b,a,c){a.setAttribute("omouseover",b);mouseenterEvent(a,c)}function mouseleaveEventObject(b,a,c){a.setAttribute("omouseout",b);mouseleaveEvent(a,c)}function addEvent(b,a,c){verifyElementEvent(b,a);b.addEventListener(a,c,false)}function mouseenterEvent(a,b){verifyElementEventHelper(a,"mouseenter");a.onmouseover=function(a){a.currentTarget.contains(a.relatedTarget)?a.stopPropagation():b.call(this,a)}}function mouseleaveEvent(a,b){verifyElementEventHelper(a,"mouseleave");a.onmouseout=function(a){a.currentTarget.contains(a.relatedTarget)?a.stopPropagation():b.call(this,a)}}function correctElementScrollEvent(a){a.addEventListener("DOMMouseScroll",correctElementScrollEvent_mozilla,false)}function correctElementScrollEvent_mozilla(a){a.currentTarget.scrollTop+=a.detail*24}function elementText(a){return trim(a.firstChild.nodeValue)}function elementX(a){return Number(a.style.left.slice(0,-2))}function elementY(a){return Number(a.style.top.slice(0,-2))}function moveElementX(b,a){b.style.left=a+"px"}function moveElementY(b,a){b.style.top=a+"px"}function moveElement(a,b,c){a.style.left=b+"px";a.style.top=c+"px"}function moveElement0(a){a.style.left=a.style.top="0px"}function moveElementSquare(a,b){a.style.left=a.style.top=b+"px"}function resizeElementX(b,a){b.style.width=a+"px"}function resizeElementY(b,a){b.style.height=a+"px"}function resizeElement(a,b,c){a.style.width=b+"px";a.style.height=c+"px"}function squareElement(a,b){a.style.width=a.style.height=b+"px"}function add1PixelSpanElement_class_xy(b,c,d,e){var a=document.createElement("span");a.className=c;a.style.left=d+"px";a.style.top=e+"px";return b.appendChild(a)}Node.prototype.contains=function(a){while(a&&a!==this)a=a.parentNode;return a===this};Node.prototype.replaceNode=function(a){return this.parentNode.replaceChild(a,this)};Node.prototype.swapNode=function(a){var b=this.nextSibling;b===a?this.parentNode.insertBefore(a,this):this.parentNode.insertBefore(a.replaceNode(this),b)};bagEmptyElements={"IMG":1,"BR":1,"INPUT":1,"META":1,"LINK":1,"PARAM":1,"HR":1};function windowSizeX(){return outerWidth}function windowSizeY(){return outerHeight}function sizeX(){return innerWidth}function sizeY(){return innerHeight}function scrollX(){return pageXOffset}function scrollY(){return pageYOffset}function correctMouseCursor(){}function hideMouseCursor(){}function showMouseCursor(){}function eventObject(b,a){return window[b.getAttribute("o"+a.type)]}function eventTarget(a){return a.target}function eventTargetIn(b,a){return b.contains(a.target)}function eventRelatedTarget(a){return a.relatedTarget||geBody}function eventX(a){return a.clientX}function eventY(a){return a.clientY}function eventFromX(b,a){return a.clientX-b.offsetLeft-innerWidth%2}function eventOffsetX(a){return a.layerX}function eventOffsetY(a){return a.layerY}function eventPageX(a){return a.pageX}function eventPageY(a){return a.pageY}function eventScreenX(a){return a.screenX}function eventScreenY(a){return a.screenY}function eventButton(a){return a.button}function eventWheel(a){return a.detail}function eventKeyCode(a){return a.which}function eventChangeKeyCode(a){var b=a.which;return (b<f1Key||f12Key<b)&&!a.ctrlKey&&!a.altKey?b:0}function eventAltKey(a){return a.altKey}function eventCtrlKey(a){return a.ctrlKey}function eventMetaKey(a){return a.metaKey}function eventShiftKey(a){return a.shiftKey}function stopEvent(a){a.stopPropagation()}function stopEventAction(a){a.preventDefault()}function vetoEvent(a){a.preventDefault()}/*@end@*/function verifyElementEvent(b,a){verifyElementEventHelper(b,a);if("mouseenter"===a||"mouseleave"===a)error("Use `mouseenter mouseleave` functions:\n\n"+b.outerHTML)}function verifyElementEventHelper(a,b){if(!isElement(a)&&window!==a)error("Expected html element or window");if(window===a?window["e"+b]:a.getAttribute("e"+b))error("Expected only one "+b+" listener:\n\n"+a.outerHTML);window===a?(window["e"+b]=1):a.setAttribute("e"+b,0)}function phpLink(a){return "/pseudoscript-com/php/webservice/"+a+".ws.php"}function PhpPrefixWait(b,a){this.sLinkPrefix=this.sOriginalLinkPrefix=phpLink(b)+"?"+a;this.send=PhpWait_send;this.changeSendPrefix=Php_changeSendPrefix}function PhpPrefixWait0(b,a){this.sLink=this.sOriginalLink=phpLink(b)+"?"+a;this.send=PhpWait0_send;this.changeSend=Php0_changeSend}function PhpWait_send(a){return httpGetWait(this.sLinkPrefix+a)}function PhpWait0_send(){return httpGetWait(this.sLink)}function php(b,a){return httpGetWait(phpLink(b)+"?"+a)}function httpGetWait(a){noteHttpReadyState(goHttp);goHttp.open("get",a,false);goHttp.send(null);noteHttpError(goHttp.responseText);return goHttp.responseText}function PhpPrefixQueue(b,a,c){PhpQueue.call(this,b,c);this.sLinkPrefix=this.sOriginalLinkPrefix+=a}function PhpPrefix(b,a,c){Php.call(this,b,c);this.sLinkPrefix=this.sOriginalLinkPrefix+=a}function PhpPrefix0(b,a,c){Php0.call(this,b,c);this.sLink=this.sOriginalLink+=a}function PhpPrefixVoid(b,a){PhpVoid.call(this,b);this.sLinkPrefix=this.sOriginalLinkPrefix+=a}function PhpPrefixMethod(c,b,d,a){PhpMethod.call(this,c,d,a);this.sLinkPrefix=this.sOriginalLinkPrefix+=b}function PhpPrefixMethod0(c,b,d,a){PhpMethod0.call(this,c,d,a);this.sLink=this.sOriginalLink+=b}function Php(a,b){IPhp_common.call(this);Php_common.call(this,a);this.f=b;this.send=Php_send;this.sendDelay=Php_sendDelay}function Php0(a,b){IPhp_common.call(this);Php0_common.call(this,a);this.f=b;this.send=Php0_send;this.sendDelay=Php0_sendDelay}function PhpVoid(a){IPhp_common.call(this);Php_common.call(this,a);this.send=PhpVoid_send;this.sendDelay=PhpVoid_sendDelay}function PhpMethod(b,c,a){IPhp_common.call(this);Php_common.call(this,b);this.o=c;this.sMethod=a;this.send=PhpMethod_send;this.sendDelay=PhpMethod_sendDelay}function PhpMethod0(b,c,a){IPhp_common.call(this);Php0_common.call(this,b);this.o=c;this.sMethod=a;this.send=PhpMethod0_send;this.sendDelay=PhpMethod0_sendDelay}function PhpQueue(a,b){Php.call(this,a,b);this.queue={};this.sendIf=PhpQueue_sendIf;this.nextIf=PhpQueue_nextIf}function Php_changeSendPrefix(a){this.sLinkPrefix=this.sOriginalLinkPrefix+a}function Php0_changeSend(a){this.sLink=this.sOriginalLink+a}function Php_sendIf(a){if(this.ready())this.send(a)}function Php0_sendIf(){if(this.ready())this.send()}function PhpQueue_sendIf(a){this.ready()?this.send(a):(this.queue[a]=1)}function PhpQueue_nextIf(){var a=queue_pop(this.queue);if(a)this.sendDelay(a)}function Php_send(a){this.sLink=this.sLinkPrefix+a;httpGet(this)}function Php0_send(){httpGet(this)}function PhpVoid_send(a){this.sLink=this.sLinkPrefix+a;httpGetVoid(this)}function PhpPost_send(a){this.sValue=this.sValuePrefix+a;httpPost(this)}function Php_sendDelay(b,a){this.sLink=this.sLinkPrefix+b;httpDelay("httpGet",a)}function Php0_sendDelay(a){httpDelay("httpGet",a)}function PhpVoid_sendDelay(b,a){this.sLink=this.sLinkPrefix+b;httpDelay("httpGetVoid",a)}function PhpMethod_sendDelay(b,a){this.sLink=this.sLinkPrefix+b;httpDelay("httpGetMethod",a)}function PhpMethod0_sendDelay(a){httpDelay("httpGetMethod",a)}function httpDelay(b,a){window[a].delayId=setTimeout(b+"("+a+")",0)}function PhpPost(b,a,c){IPhp_common.call(this);this.f=c;this.sLink=phpLink(b);this.sValuePrefix=a;this.send=PhpPost_send;this.sendIf=Php_sendIf}function IPhp_common(){this.delayId=0;this.oHttp=createHttpRequest();this.ready=Php_ready}function Php_ready(){return (4===this.oHttp.readyState||!this.oHttp.readyState)&&!this.delayId}function Php_common(a){this.sLinkPrefix=this.sOriginalLinkPrefix=phpLink(a)+"?";this.changeSendPrefix=Php_changeSendPrefix;this.sendIf=Php_sendIf}function Php0_common(a){this.sLink=this.sOriginalLink=phpLink(a)+"?";this.changeSend=Php0_changeSend;this.sendIf=Php0_sendIf}function httpGet(a){a.delayId=0;noteHttpReadyState(a.oHttp);a.oHttp.open("get",a.sLink);http_loadEvent(a);a.oHttp.send(null)}function httpGetMethod(a){a.delayId=0;noteHttpReadyState(a.oHttp);a.oHttp.open("get",a.sLink);httpMethod_loadEvent(a);a.oHttp.send(null)}function httpGetVoid(a){a.delayId=0;noteHttpReadyState(a.oHttp);a.oHttp.open("get",a.sLink);httpVoid_addLoadEvent(a.oHttp);a.oHttp.send(null)}function httpPost(a){a.delayId=0;noteHttpReadyState(a.oHttp);a.oHttp.open("post",a.sLink);a.oHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");http_loadEvent(a);a.oHttp.send(a.sValue)}function httpPostMethod(a){a.delayId=0;noteHttpReadyState(a.oHttp);a.oHttp.open("post",a.sLink);a.oHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");httpMethod_loadEvent(a);a.oHttp.send(a.sValue)}function httpPostVoid(a){a.delayId=0;noteHttpReadyState(a.oHttp);a.oHttp.open("post",a.sLink);a.oHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");httpVoid_addLoadEvent(a.oHttp);a.oHttp.send(a.sValue)}function noteHttpError(a){if("\x04"===a.charAt(0))error(a.slice(1));else if(/^<br \/>|^<!DOCTYPE HTML PUBLIC "-\/\/IETF\/\/DTD HTML 2.0\/\/EN">\n<html><head>\n<title>404 Not Found<\/title>/.test(a))error(a)}function noteHttpReadyState(a){if(a.readyState&&4!==a.readyState)error("Expected readyState:0 | 4, not "+a.readyState)}/*@if (4 < @_jscript_version)function createHttpRequest(){return new ActiveXObject("MSXML2.XMLHTTP")}function httpVoid_addLoadEvent(a){a.onreadystatechange=function(){if(4===a.readyState)noteHttpError(a.responseText)}}function http_loadEvent(a){a.oHttp.onreadystatechange=function(){if(4===a.oHttp.readyState){noteHttpError(a.oHttp.responseText);a.f(a.oHttp.responseText)}}}function httpMethod_loadEvent(a){a.oHttp.onreadystatechange=function(){if(4===a.oHttp.readyState){noteHttpError(a.oHttp.responseText);a.o[a.sMethod](oHttp.responseText)}}}@else@*/function http_loadEvent(a){a.oHttp.onload=function(b){noteHttpError(b.target.responseText);a.f(b.target.responseText)}}function httpMethod_loadEvent(a){a.oHttp.onload=function(b){noteHttpError(b.target.responseText);a.o[a.sMethod](b.target.responseText)}}function httpVoid_addLoadEvent(a){a.onload=function(a){noteHttpError(a.target.responseText)}}function createHttpRequest(){return new XMLHttpRequest}/*@end@*/goHttp=createHttpRequest();function database_signOut(){php("database/signOut","d="+grValue.database+"&i="+grValue.userId)}function database_columnsInfoValue(c,d){var a=d.split("\x01"),b=a.length>>1;c.asColumn=a.slice(0,b);c.aiType=a.slice(b).toNumberIn();return b}function database_columnsValue(i){var d=i.split("\x01"),f=d.length-1,b=Number(d[0]),h=f/b,c=new Array(b),a=b,g=0,e;while(a)c[--a]=new Array(h);a=1;while(a<f){e=0;while(e<b)c[e++][g]=d[a++];g++}return c}function database_addRecordHash(d){var b=[],c=[],a;for(a in d){b.push(a);c.push(d[a].quoteBackslashAmpersand())}return b.join(",")+"&v="+c.join(",")}function database_changeRecordHash(c){var a,b=[];for(a in c)b.push("`"+a+"`="+c[a].quoteBackslashAmpersand());return b.join(",")}function Menubar(a){this.name=a;this.center=0}Menubar.prototype.createHtml=function(a){this.create();this.innerHtml(a)};Menubar.prototype.create=function(){};Menubar.prototype.innerHtml=function(a){a.innerHTML=this.html();this.htmlElement(a.firstChild)};Menubar.prototype.html=function(){var c,g=this.nodes,b=g.length,e=array(b),h=this.menus=array(b),a,f,d;window[d=nextIdString()]=this.menubar=a=new SelectToolbar(d);a.menubar=this;a.center=this.center;a.mode=clickHoverMode;a.buttons=e;a.clickEvent=menubar_clickEvent;a.selectEvent=menubar_selectEvent;a.unselectEvent=menubar_unselectEvent;while(b--){c=g[b];if(c.nodes){window[d=nextIdString()]=f=h[b]=new Menu(d,c.nodes);f.selectEvent=this.selectEvent;f.create();e[b]=a.createToggleButton(c.text)}else e[b]=a.createButton(c.text)}a.create();return a.html()};Menubar.prototype.htmlElement=function(a){this.menubar.htmlElement(a)};function menubar_clickEvent(){var a=this.toolbar.menubar;a.selectEvent(a.nodes[this.index])}function menubar_selectEvent(){var a=this,b=a.e,c=a.toolbar.menubar;c.menus[a.index].show(pageX(b)+1,pageY(b)+b.offsetHeight+1)}function menubar_unselectEvent(){this.toolbar.menubar.menus[this.index].hide()}function Menu(b,a){this.name=b;this.nodes=a;this.nodeById={};this.nodeByIdString={};this.hideMenuDelay=this.showMenuDelay=256;this.visible=this.keyClass=0;this.imagePath="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/";this.submenuArrowImage="submenuArrow.gif";this.mrFromParentNode=this.mrCurrentParentNode=null;this.images=["blank.gif","blank.gif","check.gif","folder.png","arrowRight.gif","arrowLeft.gif","zoomIn.gif","zoomOut.gif","edit_undo.gif","edit_redo.gif","cycleNext.gif","cyclePrevious.gif","file_new_wordxp.png","file_open_wordxp.png","file_save_wordxp.png","file_print_wordxp.png","file_printPreview_wordxp.png","edit_undo_wordxp.png","edit_redo_wordxp.png","edit_cut_wordxp.png","edit_copy_wordxp.png","edit_paste_wordxp.png","edit_find_wordxp.png","help_help_wordxp.png","hand.gif","grab.gif"]}blankImage=0;unselectImage=1;selectImage=2;folderImage=3;arrowRightImage=4;arrowLeftImage=5;zoomInImage=6;zoomOutImage=7;undoImage=8;redoImage=9;cycleNextImage=10;cyclePreviousImage=11;newImageWord=12;openImageWord=13;saveImageWord=14;printImageWord=15;printPreviewImageWord=16;undoImageWord=17;redoImageWord=18;cutImageWord=19;copyImageWord=20;pasteImageWord=21;findImageWord=22;helpImageWord=23;handImage=24;grabImage=25;function notInMenu(a){return elementNotInSingleClass(a,"menuBorder1")}Menu.prototype.create=function(){var a=addDivElement(geBody);a.innerHTML=this.html(this,null);this.eNextMenu=this.e=a.firstChild;this.htmlElement(this.e,this)};Menu.prototype.html=function(h,c){var g=[],d=h.nodes,a=d.length,j,i,e=array(a),f=isLeaf(d),b=f?"last":"inner",k=f?'<tr class="separator"><td class="noImage"></td><td class="first"><div>&nbsp;</div></td><td class="last"><div>&nbsp;</div></td></tr>':'<tr class="separator"><td class="noImage"></td><td class="first"><div>&nbsp;</div></td><td class="inner"><div>&nbsp;</div></td><td class="last"><div>&nbsp;</div></td></tr>';while(a--){rNode=d[a];rNode.parent=c;rNode.depth=c?c.depth+1:1;if(!rNode.id)rNode.id=nextId++;this.nodeById[rNode.id]=rNode;if(rNode.idString)this.nodeByIdString[rNode.idString]=rNode;if(rNode.separator)e[a]=k;else{j=rNode.key?'<td class="'+b+' hotkey">'+rNode.key+"</td>":rNode.count?'<td class="'+b+' count">'+rNode.count+"</td>":this.keyClass?'<td class="'+b+' hotkey">&nbsp;</td>':'<td class="'+b+'">&nbsp</td>';i=f?"":rNode.nodes?'<td class="last arrow"><img src="'+this.imagePath+this.submenuArrowImage+'"></td>':'<td class="last">&nbsp;</td>';e[a]='<tr class="normal" nodeId="'+rNode.id+'"><td class="first '+this.createNodeImage(rNode)+'">'+rNode.imageElementHtml+"</td>"+'<td class="inner name" style="line-height:'+((rNode.parent||this).largeImages?"31":"17")+'px">'+(rNode.text||"&nbsp;")+"</td>"+j+i+"</tr>";if(rNode.nodes){if(rNode.open)h.rOpenNode=rNode;g.push(this.html(rNode,rNode))}}}return '<div style="display:none" class="menuBorder1"><div class="imenu"><table cellspacing="0">'+e.join("")+"</table></div></div>"+g.join("")};function isLeaf(a){var b=a.length;while(b--)if(a[b].nodes)return 0;return 1}Menu.prototype.htmlElement=function(b,e){var c=this.name,f=e.nodes,g=f.length,a=b.firstChild.firstChild.firstChild.lastChild,d;e.eMenu=b;noSelect(b);mouseenterEventObject(c,b,menu_submenu_mouseenter);mouseleaveEventObject(c,b,menu_submenu_mouseleave);while(g--){rNode=f[g];if(!rNode.separator){rNode.e=a;mouseenterEventObject(c,a,menu_row_mouseenter);mouseupEventObject(c,a,Menu_row_click);d=a.childNodes;rNode.eImageCell=d[0];rNode.imageElement=rNode.eImageCell.firstChild;rNode.eName=d[1];rNode.eNote=d[2];if(rNode.disabled)this.disableNode(rNode);if(rNode.nodes)this.htmlElement(this.eNextMenu=this.eNextMenu.nextSibling,rNode)}a=a.previousSibling}};Menu.prototype.createNodeImage=function(a){if(!a.image&&this.noImages||a.noImage){a.imageElementHtml="";return "noImage"}else{a.imageElementHtml='<img src="'+this.imageFileName(a)+'">';return this.node_largeImages(a)?"imageLarge":"image"}};Menu.prototype.changeTextIf=function(a,b){if(a in this.nodeByIdString)changeElementValue(this.nodeByIdString[a].eName,b)};Menu.prototype.changeNoteIf=function(a,b){if(a in this.nodeByIdString)changeElementValue(this.nodeByIdString[a].eNote,b)};Menu.prototype.node_largeImages=function(a){return (a.parent||this).largeImages};Menu.prototype.setLineHeight=function(a){if(a.eName)a.eName.style.lineHeight=(a.parent||this).largeImages?"31px":"17px"};Menu.prototype.disableNode=function(a){disableElement(a.eName);this.changeImageElementSourceIf(a)};Menu.prototype.changeImageIf=function(a,b){if(a in this.nodeByIdString)this.changeNodeImageFile(this.nodeByIdString[a],this.images[b])};Menu.prototype.changeImage=function(b,a){this.changeNodeImageFile(this.nodeByIdString[b],this.images[a])};Menu.prototype.changeNodeImageFile=function(a,b){if(a.imageFile===b)errorIn("Image already set","Menu.changeNodeImageFile");a.imageFile=b;changeImageElementSource(a.imageElement,b.addPathIf(this.imagePath))};Menu.prototype.changeImageElementSourceIf=function(a){if(a.imageElement){this.correctImageParentClass(a);changeImageElementSource(a.imageElement,this.imageFileName(a))}};Menu.prototype.correctImageParentClass=function(a){a.eImageCell.className=this.node_largeImages(a)?"first imageLarge":"first image"};Menu.prototype.imageFileName=function(a){var b=this.node_largeImages(a);return this.images[a.disabled&&b&&a.largeDisabledImage||a.disabledImage||b&&a.largeImage||a.image||a.nodes&&folderImage||blankImage].addPathIf(this.imagePath)};Menu.prototype.disableMenuTimeout=function(){this.clearTimeout("miMenuTimeoutId")};Menu.prototype.disableClose=function(){this.clearTimeout("miHideTimeoutId")};Menu.prototype.enableClose=function(a){if(a&&this.mouseleaveCloses)this.hideMenuDelay?(this.miHideTimeoutId=setTimeout(this.name+"."+"hide"+"()",this.hideMenuDelay)):this.hide()};Menu.prototype.clearTimeout=function(a){if(this[a]){clearTimeout(this[a]);this[a]=0}};function menu_submenu_mouseenter(a){eventObject(this,a).disableClose()}function menu_submenu_mouseleave(b){var a=eventObject(this,b);if(a.visible){if(notInMenu(eventRelatedTarget(b)))a.correctHighlight(a.mrFromParentNode,a.mrCurrentParentNode);a.enableClose(1);a.disableMenuTimeout()}}function menu_row_mouseenter(d){var a=eventObject(this,d),c=this.getAttribute("nodeId"),b=a.nodeById[c];a.correctHighlight(a.mrFromParentNode,b.parent);if(b.eName){if(a.currentNode)a.removeNodeHighlight(a.currentNode);a.currentNode=b;a.addNodeHighlight(b)}a.mrFromParentNode=b.bMenuVisible?b:b.parent;a.disableMenuTimeout();if(b.nodes&&!b.bMenuVisible)a.changeMenuTimeout(c,a.showMenuDelay);else if(a.mrCurrentParentNode&&b.depth<=a.mrCurrentParentNode.depth)a.changeMenuTimeout(c,a.hideMenuDelay)}function Menu_row_click(b){if(!eventButton(b)){var c=eventObject(this,b),a=c.currentNode;if(a&&this===a.e)c.selectNode(a)}}Menu.prototype.select=function(a){this.selectNode(this.getNode(a))};Menu.prototype.selectNode=function(a){if(!a.disabled)if(a.nodes&&!a.maySelect){this.disableMenuTimeout();this.changeMenu(a)}else this.selectEvent(a)};Menu.prototype.getNode=function(a){if(!this.nodeById[a])errorIn("No node with id:"+a,"Menu.getNode");return this.nodeById[a]};Menu.prototype.disable=function(a){this.disableNode(this.getNode(a))};Menu.prototype.disableNode=function(a){a.disabled=1;disableElement(a.eName);this.changeImageElementSourceIf(a)};Menu.prototype.enable=function(a){this.enableNode(this.getNode(a))};Menu.prototype.enableNode=function(a){a.disabled=0;enableElement(a.eName);this.removeNodeHighlight(a)};Menu.prototype.correctHighlight=function(a,b){this.removeCurrentNodeHighlight();if(!a||b&&a.depth<=b.depth){this.mrFromParentNode=b;while(a!==b){this.addNodeHighlight(b);b=b.parent}}else{while(b!==a.parent){this.removeNodeHighlight(a);a=a.parent}this.currentNode=this.mrFromParentNode=a}};Menu.prototype.isItemHighlight=function(a){return hasElementClass(a.e,"highlight")};Menu.prototype.addNodeHighlight=function(a){if(!a.disabled)addElementClass(a.e,"highlight")};Menu.prototype.removeNodeHighlight=function(a){removeElementClassIf(a.e,"highlight")};Menu.prototype.removeCurrentNodeHighlight=function(){if(this.currentNode){if(!this.currentNode.bMenuVisible)this.removeNodeHighlight(this.currentNode);this.currentNode=null}};Menu.prototype.highlight=function(c){this.disableMenuTimeout();this.visible?this.hideMenus():this.show();var a=this.nodeById[c],b=[];if(a){do b.push(a);while(a=a.parent);while(a=b.pop()){this.addNodeHighlight(this.currentNode=a);this.changeMenu(a)}}};Menu.prototype.hidden=function(){return isElementHidden(this.e)};Menu.prototype.showIf=function(a,b){if(!this.visible)this.show(a,b)};Menu.prototype.hideIf=function(){if(this.visible)this.hide()};Menu.prototype.hideIfNotIn=function(a){if(this.visible&&notInMenu(eventTarget(a)))this.hide()};Menu.prototype.hideMenusIfNotIn=function(a){if(this.visible&&notInMenu(eventTarget(a)))this.hideMenus()};Menu.prototype.toggleVisibility=function(a,b){this.visible?this.hide():this.show(a,b)};Menu.prototype.toggleVisibilityMouse=function(a){if(notInMenu(eventTarget(a)))this.visible?this.hide():this.show(mouseX+1,mouseY)};Menu.prototype.show=function(a,b){this.visible=1;fitHiddenElement(this.e,a,b);this.enableClose();if(this.rOpenNode){this.showMenu(this.rOpenNode);this.correctHighlight(null,this.rOpenNode)}};Menu.prototype.hide=function(){this.visible=0;this.disableClose();this.disableMenuTimeout();this.hideMenus();hideElement(this.e)};Menu.prototype.changeMenuTimeout=function(a,b){b?(this.miMenuTimeoutId=setTimeout(this.name+"."+"changeMenu"+"("+this.name+"."+"nodeById"+'["'+a+'"])',b)):this.changeMenu(this.nodeById[a])};Menu.prototype.changeMenu=function(a){this.hideMenusTo(a.bMenuVisible?a:a.parent);if(a.nodes)this.showMenuIf(this.mrFromParentNode=a)};Menu.prototype.hideMenus=function(){this.removeCurrentNodeHighlight();this.hideMenusTo(null)};Menu.prototype.hideMenusTo=function(a){while(this.mrCurrentParentNode!==a){this.removeNodeHighlight(this.mrCurrentParentNode);hideElement(this.mrCurrentParentNode.eMenu);this.mrCurrentParentNode.bMenuVisible=0;this.mrCurrentParentNode=this.mrCurrentParentNode.parent}};Menu.prototype.showMenuIf=function(a){if(!a.bMenuVisible)this.showMenu(a)};Menu.prototype.showMenu=function(a){var b=a.e,c=pageX(b),d=pageY(b);fitHiddenElementIn(a.eMenu,c+(a.parent||this).eMenu.offsetWidth-5,d-2,c,d+b.offsetHeight+4);a.bMenuVisible=1;this.mrCurrentParentNode=a};var mouseCursorSizeX=ie?-2:0,mouseCursorSizeY=ie?19:21,tipElement,tipTextElement,tip_eHover,tip_iTimeoutId=0,tip_iVisible=0;function createTip(){tipElement=addHiddenDivElement_class(geBody,"tip");tipTextElement=addEmptyTextElement(tipElement)}function moveTipIf(a){if(1===tip_iVisible){if(!eventTargetIn(tip_eHover,a))hideTip()}else if(3===tip_iVisible)tip_mousemoveElementEvent(a)}function hideTimeout(){tip_iTimeoutId=0;hideTip()}function hideTipIf(){if(tip_iVisible)hideTip()}function hideTip(){tip_iVisible=0;hideElement(tipElement)}function timeoutTip(a){changeTextElement(tipTextElement,a);tip_fit(mouseX,mouseY);tip_iVisible=2;if(tip_iTimeoutId)clearTimeout(tip_iTimeoutId);tip_iTimeoutId=setTimeout(hideTipTimeout,grValue.showTipFor)}function clickTip(a,b){changeTextElement(tipTextElement,a);tip_fit(mouseX,mouseY);tip_eHover=b;tip_iVisible=1}function tip_mousemoveElementEvent(a){tip_fit(eventPageX(a),eventPageY(a))}function tip_fit(b,a){b+=mouseCursorSizeX;tip_iVisible?fitElementY(tipElement,b,a+mouseCursorSizeY,a-(ie?2:0)):fitHiddenElementY(tipElement,b,a+mouseCursorSizeY,a-(ie?2:0))}function ITree(b,a,c){if(b){this.name=b;this.e=c;this.nodes=a;this.nodeById={};this.nodeByIdString={};this.showId=0;this.iBlankStart=a.length&&a[0].root?1:0;addElementClass(c,"itree")}}ITree.prototype.create_dom=function(){this.createNodesRecurse_dom(this.e,this.nodes,0,[],null)};ITree.prototype.create=function(){this.e.innerHTML=this.createNodesRecurse_html(this.nodes,0,[],null);this.addEvents(this.e.lastChild,this.nodes,0)};ITree.prototype.select=function(b){var a=this.nodeByIdString[b];this.maySelectNode(a)?this.selectNode(a):this.toggleNode(a)};ITree.prototype.openOnly=function(a){this.close();this.open(a)};ITree.prototype.toggleOnly=function(a){this.nodeByIdString[a].open?this.close(a):this.open(a)};ITree.prototype.click=function(a){this.clickNode(this.nodeByIdString[a])};ITree.prototype.open=function(a){a?this.openNode(this.nodeByIdString[a]):this.openNodesRecurse(this.nodes[0])};ITree.prototype.close=function(a){a?this.closeNode(this.nodeByIdString[a]):this.closeNodesRecurse(this.nodes[0])};ITree.prototype.openLevel=function(a){this.openLevelRecurse(this.nodes[0],a,0)};ITree.prototype.closeNodesRecurse=function(a){for(;a;a=a.next){this.closeNode(a);this.closeNodesRecurse(a.firstChild)}};ITree.prototype.openNodesRecurse=function(a){for(;a;a=a.next){this.openNode(a);this.openNodesRecurse(a.firstChild)}};ITree.prototype.openLevelRecurse=function(a,c,b){for(;a;a=a.next){b<c?this.openNode(a):this.closeNode(a);this.openLevelRecurse(a.firstChild,c,b+1)}};ITree.prototype.highlight=function(b){var a=this.nodeByIdString[b];this.showNode(a);this.addHighlight(a.eNameParent)};ITree.prototype.targetIFrameChange=function(){this.targetIFrameElement=element(this.targetIFrame)};ITree.prototype.showIdChange=function(){var a=this;this.nodes.mapTree(function(b){a.mfSetNodeNameDisplay(b)})};ITree.prototype.selectNode=function(a){if(a!==this.currentNode){this.unselect();this.selectNodeCorrect(a);this.selectEvent(a)}};function ITree_nodeImage_click(b){var a=eventObject(this,b),c=a.nodeById[this.nextSibling.getAttribute("nodeId")];eventShiftKey(b)?a.clickNodeAll(c):a.clickNode(c)}function ITree_nodeText_click(b){var a=eventObject(this,b);a.clickNode(a.nodeById[this.getAttribute("nodeId")])}function ITree_nodeImage_mouseenter(a){eventObject(this,a).addHighlight(this.nextSibling)}function ITree_nodeText_mouseenter(a){eventObject(this,a).addHighlight(this)}function ITree_nodeImage_mouseleave(a){eventObject(this,a).removeHighlight(this.nextSibling)}function ITree_nodeText_mouseleave(a){eventObject(this,a).removeHighlight(this)}ITree.prototype.addHighlight=function(a){if(this.meCurrentHighlight)this.removeHighlight(this.meCurrentHighlight);addElementClass(a,"treeLink_hover");this.meCurrentHighlight=a};ITree.prototype.removeHighlight=function(a){removeElementClass(a,"treeLink_hover");this.meCurrentHighlight=0};ITree.prototype.isLinkNode=function(a){return this.maySelectNode(a)||a.nodes||a.link||a.call};ITree.prototype.maySelectNode=function(a){return a.maySelect||a.eContent||a.link&&!a.target&&this.targetIFrame};ITree.prototype.showNode=function(a){for(;a;a=a.parent)if(!a.open)this.openNode(a)};ITree.prototype.anyClosedNodes=function(a){for(;a;a=a.next)if(a.nodes&&(!a.open||this.anyClosedNodes(a.firstChild)))return 1;return 0};ITree.prototype.anyOpenNodes=function(a){for(;a;a=a.next)if(a.nodes&&(a.open||this.anyOpenNodes(a.firstChild)))return 1;return 0};ITree.prototype.openParentNodes=function(a){while(a=a.parent)this.openNode(a)};ITree.prototype.clickNode=function(a){this.maySelectNode(a)?this.clickMaySelectNode(a):a.link?a.popup||this.popups?createPopupWindow(a.link,this.target||a.target||a.text):createExternalWindowBy(a):this.toggleNode(a)};ITree.prototype.clickNodeAll=function(a){this.maySelectNode(a)?this.clickMaySelectNodeAll(a):a.link?a.popup||this.popups?createPopupWindow(a.link,this.target||a.target||a.text):createExternalWindowBy(a):this.toggleNodes(a)};ITree.prototype.clickMaySelectNode=function(a){this.value==a.id?this.toggleNode(a):this.openNodes(a);this.select(a.id)};ITree.prototype.toggleNode=function(a){a.open?this.closeNode(a):this.openNode(a)};ITree.prototype.toggleNodes=function(a){a.open?this.anyClosedNodes(a.firstChild)?this.openNodesRecurse(a.firstChild):this.closeNodesRecurse(a.firstChild):this.openNodes(a)};ITree.prototype.openNodes=function(a){this.openNode(a);this.openNodesRecurse(a.firstChild)};ITree.prototype.openNode=function(a){if(a.nodes&&!a.open){this.openParentNodes(a);a.open=1;this.setOpenImage(a);a.eNameParent.nextSibling.style.display="block"}};ITree.prototype.closeNode=function(a){if(a.nodes&&a.open){if(ohasChild(a,this.currentNode))if(this.maySelectNode(a))this.select(a.id);a.open=0;this.setCloseImage(a);a.eNameParent.nextSibling.style.display="none"}};ITree.prototype.setSelectImage=ITree.prototype.setUnselectImage=emptyFunction;ITree.prototype.selectNodeOnly=function(a){if(!this.maySelectNode(a))this.attributeError("value",this.value,"selectable node id","ITree.selectNodeCorrect");addElementClass(a.eNameParent,"treeCurrentName");a.eNameParent.style.fontWeight="normal";this.setSelectImage(this.currentNode=a);this.showNode(a)};ITree.prototype.selectNodeCorrect=function(a){this.selectNodeOnly(a);if(a.eContent)showElement(a.eContent);else if(a.link)if(this.targetIFrameElement){if(this.targetIFrameElement.src!=a.link)this.targetIFrameElement.src=a.link;showElement(this.targetIFrameElement)}else location.href=a.link;return a};ITree.prototype.unselect=function(){var b,a=this.currentNode;if(!a)return;if(!a)errorIn("No current node","ITree.unselect");removeElementClass(a.eNameParent,"treeCurrentName");if(!a.nodes||!a.nodes.length)this.setUnselectImage(a);b=a.eContent||this.targetIFrameElement;if(b)hideElement(b);delete this.currentNode};ITree.prototype.correctNodeName=function(a){return this.showId?a.id+" - "+a.text+(a.count?" ("+a.count+")":""):a.text+(a.count?" ("+a.count+")":"")};ITree.prototype.createNodeElement=function(f,c,d){var a=this.name,e=this.isLinkNode(c),b=c.eNameParent=addSpanElement_class_value(f,e?"treeLink":"treeText",this.correctNodeName(c));b.setAttribute("nodeId",c.id);if(e){clickEventObject(a,d,ITree_nodeImage_click);mouseenterEventObject(a,d,ITree_nodeImage_mouseenter);mouseleaveEventObject(a,d,ITree_nodeImage_mouseleave);clickEventObject(a,b,ITree_nodeText_click);mouseenterEventObject(a,b,ITree_nodeText_mouseenter);mouseleaveEventObject(a,b,ITree_nodeText_mouseleave)}};function Tree(c,b,a){ITree.call(this,c,b,a);addElementClass(a,"tree");this.noImages=0;this.lines=0;this.blankImage="http://file.fromAnywhere.com/pseudoscript-com/image/tree/blank.gif";this.folderImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/folder.png";this.folderLinkImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/folder.link.1.gif";this.linkImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/link.1.gif";this.openFolderImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/folder.1.open.gif";this.openFolderLinkImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/folder.link.1.open.png";this.openLinkImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/link.1.open.gif";this.searchLinkImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/search.2.gif";this.searchLinkOpenImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/search.2.gif";this.externalLinkImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/link.external.gif";this.externalLinkOpenImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/win2k/link.external.gif";this.textImage="http://file.fromAnywhere.com/pseudoscript-com/image/icon16/file/text.png";omergeIn(this,treeStyles.noLines)}Tree.prototype=new ITree;treeStyles={noLines:{bulletImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/plus.png",bulletBottomImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/plus.png",bulletOnlyImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/plus.png",bulletTopImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/plus.png",openBulletImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/minus.png",openBulletBottomImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/minus.png",openBulletOnlyImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/minus.png",openBulletTopImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/minus.png",joinImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/blank.gif",joinBottomImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/blank.gif",joinOnlyImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/blank.gif",joinTopImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/blank.gif",joinVerticalImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/blank.gif"},lines:{bulletImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/plus.png",bulletBottomImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/plus.bottom.png",bulletOnlyImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/plus.only.png",bulletTopImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/plus.top.png",openBulletImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/minus.png",openBulletBottomImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/minus.bottom.png",openBulletOnlyImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/minus.only.png",openBulletTopImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/bullet/winxp/lines/minus.top.png",joinImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/join/lines/join.gif",joinBottomImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/join/lines/join.bottom.gif",joinOnlyImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/join/lines/join.only.gif",joinTopImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/join/lines/join.top.gif",joinVerticalImage:"http://file.fromAnywhere.com/pseudoscript-com/image/tree/join/lines/join.vertical.gif"}};Tree.prototype.createElement=function(){return createDivElement()};Tree.prototype.setOpenImage=function(a){if(a.eBulletImage)changeImageElementSource(a.eBulletImage,a.openBulletImage);if(!this.emptyNode(a))this.setSelectImage(a)};Tree.prototype.setCloseImage=function(a){if(a.eBulletImage)changeImageElementSource(a.eBulletImage,a.bulletImage);if(!this.emptyNode(a))this.setUnselectImage(a)};Tree.prototype.setSelectImage=function(a){changeImageElementSource(a.eImage,a.openImage)};Tree.prototype.setUnselectImage=function(a){changeImageElementSource(a.eImage,a.image)};Tree.prototype.linesChange=function(){this.setAttributes(treeStyles[this.lines?"lines":"noLines"])};Tree.prototype.noImagesChange=function(){this.noImagesChangeRecurse(this.nodes[0])};Tree.prototype.noImagesChangeRecurse=function(a){for(;a;a=a.next){toggleElementVisibility(a.eImage);this.noImagesChangeRecurse(a.firstChild)}};function Tree_bullet_click(b){var a=eventObject(this,b),c=a.getNodeByBullet(this);eventShiftKey(b)?a.toggleNodes(c):a.toggleNode(c)}function Tree_bullet_mouseenter(c){var b=eventObject(this,c),a=this;if(!b.emptyNode(b.getNodeByBullet(a)))addElementClass(a,"treeBulletHover")}function Tree_bullet_mouseleave(c){var b=eventObject(this,c),a=this;if(!b.emptyNode(b.getNodeByBullet(a)))removeElementClass(a,"treeBulletHover")}Tree.prototype.getNodeByBullet=function(a){return this.nodeById[a.nextSibling.nextSibling.getAttribute("nodeId")]};Tree.prototype.getNodeByImage=function(a){return this.nodeById[a.nextSibling.getAttribute("nodeId")]};Tree.prototype.addNodes=function(b,a){this.createNodesRecurse_dom(a.eChild,a.nodes=b,a.iNextLevel,a.abBranchEnd,a)};function createImageElement(b){var a=document.createElement("img");a.src=b;return a}Tree.prototype.createNodesRecurse_dom=function(m,h,i,d,e){var j=this.name,n,c,b,g,a,f=0,k,l=h.length;while(f<l){a=h[f++];if(e&&!e.firstChild)e.firstChild=a;if(!a.id)a.id=nextId++;this.nodeById[a.id]=a;if(a.idString)this.nodeByIdString[a.idString]=a;else this.nodeByIdString[a.id+""]=a;a.firstChild=null;a.parent=e;a.next=h[f];g=this.getConnectorType(d,i,f,l);a.e=c=addDivElement(m);k=this.nodes[0].root?0:-1;while(++k<i)addImageElement(c,d[k]?this.blankImage:this.joinVerticalImage);b=a.image&&(a.openImage=a.openImage||a.image,createImageElement(a.bCustomImage=a.image));if(a.nodes){if(!a.root){this.setNodeBullets(a,g);a.eBulletImage=addImageElement(c,a.open?a.openBulletImage:a.bulletImage);clickEventObject(j,a.eBulletImage,Tree_bullet_click);mouseenterEventObject(j,a.eBulletImage,Tree_bullet_mouseenter);mouseleaveEventObject(j,a.eBulletImage,Tree_bullet_mouseleave)}if(!b){a.image=a.eContent?this.folderLinkImage:this.folderImage;a.openImage=a.eContent?this.openFolderLinkImage:this.openFolderImage;b=createImageElement(a.open?a.openImage:a.image)}}else{addImageElement(c,this["join"+g+"Image"]);if(!b){a.image=this.maySelectNode(a)?(a.openImage=this.openLinkImage,this.linkImage):a.call||a.link?this.externalLinkImage:this.textImage;b=createImageElement(a.image)}}b.className="treeImage";if(this.noImages)hideElement(b);c.appendChild(a.eImage=b);this.createNodeElement(c,a,b);if(a.nodes){a.abBranchEnd=d.copy();a.iNextLevel=i+1;a.eChild=addDivElement(c);if(!a.open)hideElement(a.eChild);this.createNodesRecurse_dom(a.eChild,a.nodes,a.iNextLevel,d,a)}}};Tree.prototype.createNodesRecurse_html=function(k,g,j,e){var q=this.blankImage===this.joinVerticalImage,n,b,r,d,i,a,h,l,o=this.iBlankStart,m=k.length,p=array(m),f,c=0;while(c<m){a=k[c++];if(e&&!e.firstChild)e.firstChild=a;if(!a.id)a.id=nextId++;this.nodeById[a.id]=a;if(a.idString)this.nodeByIdString[a.idString]=a;else this.nodeByIdString[a.id+""]=a;a.firstChild=null;a.parent=e;a.next=k[c];d=this.getConnectorType(j,g,c,m);f=this.asHtml=[];if(q){this.iBlankCount=g-o;a.iNotBlankCount=0}else{l=o;this.iBlankCount=h=0;while(l<g)if(j[l++])this.iBlankCount++;else{this.addImage_afterBlankIf_html(this.joinVerticalImage);h++}a.iNotBlankCount=h}if(a.image){if(!a.openImage)a.openImage=a.image;a.bCustomImage=1;b=a.open?a.openImage:a.image}else b="";if(a.nodes){if(!a.root){a.bulletImage=this["bullet"+d+"Image"];a.openBulletImage=this["openBullet"+d+"Image"];this.addImage_afterBlankIf_html(a.open?a.openBulletImage:a.bulletImage)}if(!b){a.eContent?(a.openImage=this.openFolderLinkImage,a.image=this.folderLinkImage):(a.openImage=this.openFolderImage,a.image=this.folderImage);b=a.open?a.openImage:a.image}i=this.noImages?'" style="display:none">':'">'}else{n=this["join"+d+"Image"];this.blankImage===n?this.iBlankCount++:this.addImage_afterBlankIf_html(n);a.bNotBlankJoin=!this.iBlankCount;if(!b)if(a.eContent||a.link||a.call)if(this.maySelectNode(a)){a.openImage=this.openLinkImage;a.image=this.linkImage;b=a.open?a.openImage:a.image}else b=this.externalLinkImage;else b=this.textImage;i=this.noImages?this.iBlankCount?'" style="display:none;margin-left:'+this.iBlankCount*19+'px">':'" style="display:none">':this.iBlankCount?'" style="margin-left:'+this.iBlankCount*19+'px">':'">'}f.push('<img src="'+b+'" class="treeImage'+i+'<span nodeId="'+a.id+'"'+((a.bLink=a.eContent||a.nodes||a.link||a.call)?' class="treeLink">':">")+this.correctNodeName(a)+"</span>");p[c-1]=a.nodes?f.join("")+(a.open?"<div>":'<div style="display:none">')+this.createNodesRecurse_html(a.nodes,g+1,j,a)+"</div>":f.join("")}return "<div>"+p.join("</div><div>")+"</div>"};Tree.prototype.addImage_afterBlankIf_html=function(a){if(this.iBlankCount){this.asHtml.push('<img src="'+a+'" style="margin-left:'+19*this.iBlankCount+'px">');this.iBlankCount=0}else this.asHtml.push('<img src="'+a+'">')};Tree.prototype.addEvents=function(d,e,g){var c=this.name,b,f=e.length,a;while(f--){a=e[f];b=d.childNodes[a.iNotBlankCount];if(a.nodes){if(!a.root){a.eBulletImage=b;clickEventObject(c,b,Tree_bullet_click);mouseenterEventObject(c,b,Tree_bullet_mouseenter);mouseleaveEventObject(c,b,Tree_bullet_mouseleave);b=b.nextSibling}}else if(a.bNotBlankJoin)b=b.nextSibling;a.eImage=b;a.eNameParent=b.nextSibling;if(a.bLink){clickEventObject(c,b,ITree_nodeImage_click);mouseenterEventObject(c,b,ITree_nodeImage_mouseenter);mouseleaveEventObject(c,b,ITree_nodeImage_mouseleave);clickEventObject(c,a.eNameParent,ITree_nodeText_click);mouseenterEventObject(c,a.eNameParent,ITree_nodeText_mouseenter);mouseleaveEventObject(c,a.eNameParent,ITree_nodeText_mouseleave)}if(a.nodes)this.addEvents(d.lastChild.lastChild,a.nodes,g+1);d=d.previousSibling}};Tree.prototype.getConnectorType=function(c,a,b,d){return (c[a]=b===d)?a||b-1?"Bottom":"Only":a||b-1?"":"Top"};Tree.prototype.emptyNode=function(a){return !a.nodes||!a.nodes.length&&!a.hasNodes};Tree.prototype.setNodeBullets=function(a,b){if(this.emptyNode(a)){a.bulletImage=this["join"+b+"Image"];a.openBulletImage=this["join"+b+"Image"]}else{a.bulletImage=this["bullet"+b+"Image"];a.openBulletImage=this["openBullet"+b+"Image"]}};Tree.prototype.setImages=function(){this.e.firstChild&&this.setImagesRecurse(this.e.firstChild,this.nodes,0,[])};Tree.prototype.setImagesRecurse=function(d,i,b,f){var c,b,e,a,h=i.length,g=0;while(g<h){a=i[g++];e=this.getConnectorType(f,b,g,h);for(c=d.firstChild,b=-1;++b<b;c=c.nextSibling)changeImageElementSource(c,f[b]?this.blankImage:this.joinVerticalImage);if(a.nodes){this.setNodeBullets(a,e);c.src=a.open?a.openBulletImage:a.bulletImage;if(!a.bCustomImage)a.image=a.eContent?(a.openImage=this.openFolderLinkImage,this.folderLinkImage):(a.openImage=this.openFolderImage,this.folderImage)}else{c.src=this["join"+e+"Image"];if(!a.bCustomImage)a.image=a.eContent||a.link||a.call?this.maySelectNode(a)?(a.openImage=this.openLinkImage,this.linkImage):this.externalLinkImage:this.textImage}changeImageElementSource(a.eImage,a.id==this.value?a.openImage:a.image);if(a.nodes)this.setImagesRecurse(d.lastChild.firstChild,a.nodes,b+1,f);d=d.nextSibling}}