
	var _u = undefined;
	
var vbCr="\r";var vbCrLf="\r\n";var vbLf="\n";var vbInvalidDate=null;var vbInvalidInt=null;var vbInvalidDouble=null;var g_elUnicodeClean=null;function UnicodeClean(A){if(!A){A=""}if(A.toString){A=A.toString()}if(!g_elUnicodeClean){g_elUnicodeClean=document.createElement("span")}g_elUnicodeClean.textContent=A;g_elUnicodeClean.innerText=A;return g_elUnicodeClean.innerHTML.replace(/"/g,"&quot;")}var g_elDecodeHTMLEnt=null;function DecodeHTMLEnt(A){if(!A){A=""}if(A.toString){A=A.toString()}if(!g_elDecodeHTMLEnt){g_elDecodeHTMLEnt=document.createElement("span")}g_elDecodeHTMLEnt.innerHTML=A;return g_elDecodeHTMLEnt.textContent||g_elDecodeHTMLEnt.innerText||decodeAmp(decodeLTGT(g_elDecodeHTMLEnt.innerHTML))}function IsIE(){return window.ie}function SingleQuoteForJavascript(A){if(!A){A=""}if(A.toString){A=A.toString()}return A.replace(/\\/gi,"\\\\").replace(/\'/gi,"\\'").replace(/\n/gi,"\\n").replace(/\</g,"\\x3c").replace(/\>/g,"\\x3e")}function UnicodeCleanTextArea(A){if(!A){A=""}if(A.toString){A=A.toString()}return UnicodeClean(A).replace(/<br(\s*\/)?>/gi,"\n")}function EscapeForRegExp(A){if(!A){A=""}if(A.toString){A=A.toString()}return A.replace(/([^a-zA-Z0-9 ])/g,"\\$1")}function Replace(G,F,E){if(!G){G=""}if(!F){F=""}if(!E){E=""}if(G.toString){G=G.toString()}if(F.toString){F=F.toString()}if(E.toString){E=E.toString()}var A=EscapeForRegExp(F);var I=new RegExp(A,"g");if(arguments[3]==undefined&&arguments[4]==undefined){return G.replace(I,E)}var C=0;if(arguments[3]!=undefined){C=arguments[3]-1}var H=G.substr(C);if(arguments[4]==undefined){return H.replace(I,E)}I=new RegExp(A,"");var D=arguments[4];var B="";while(D){C=H.indexOf(F);if(C==-1){break}B=B+H.substr(0,C)+E;H=H.substr(C+F.length);D--}return B+H}function Len(A){if(A==undefined){return 0}if(A.toString){A=A.toString()}return A.length}function Left(A,B){if(A.toString){A=A.toString()}return A.substr(0,B)}function Right(A,B){if(A.toString){A=A.toString()}return A.substr(A.length-B)}function InStr(C,B){if(C.toString){C=C.toString()}if(B.toString){B=B.toString()}var D=0;if(arguments[2]!=undefined){D=C-1;C=B;B=arguments[2]}var A=C.indexOf(B,D);return A+1}function InStrRev(C,B){if(C.toString){C=C.toString()}if(B.toString){B=B.toString()}var D=C.length;if(arguments[2]!=undefined){D=arguments[2]-1}var A=C.lastIndexOf(B,D);return A+1}function Mid(B,A,C){if(B.toString){B=B.toString()}return B.substr(A-1,C)}function LCase(A){if(A.toString){A=A.toString()}return A.toLowerCase()}function UCase(A){if(A.toString){A=A.toString()}return A.toUpperCase()}function Join(B,A){return B.join(A)}function Split(B,A,C){if(B.toString){B=B.toString()}if(C!=undefined){return B.split(A,C)}else{return B.split(A)}}Swap1=swap1;Swap2=swap2;Swap3=swap3;Swap4=swap4;function CStr(A){if(A==undefined||A==null){return""}if(typeof (A)=="number"&&Math.floor(A)!=A){return floatToLocaleString(A)}return A.toString()}function IsEmpty(A){return typeof (A)=="undefined"}function IsNull(A){return A==null}function IsNumeric(A){return/^-?[0-9\.]+$/.test(A)}Err=new function(){this.Number=0};Now=function(){return new UTCDate()};Int=parseInt;CLng=parseInt;CDbl=parseLocaleFloat;Round=function(A,B){if(!B){B=0}B=Math.pow(10,B);return Math.round(A*B)/B};var BrowserDate=Date;function UTCDate(){if(arguments.length>=3){this.__dt=new BrowserDate(arguments[0],arguments[1],arguments[2],arguments[3]||0,arguments[4]||0,arguments[5]||0,arguments[6]||0)}else{if(arguments.length==1){this.__dt=new BrowserDate(arguments[0])}else{this.__dt=new BrowserDate();this.__dt.setMinutes(this.__dt.getMinutes()+this.__dt.getTimezoneOffset())}}if(!UTCDate.prototype.getDate){var C=["getDate","getDay","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","getTime","getTimezoneOffset","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toLocaleString","toLocaleDateString","toLocaleTimeString","toSource","toString","toUTCString","valueOf"];function B(D){return function(){return this.__dt[D].apply(this.__dt,arguments)}}for(var A=0;A<C.length;A++){UTCDate.prototype[C[A]]=B(C[A].replace("UTC",""))}}}function CTZNow(){return CTZFromUTC(new UTCDate())}function UTCNow(){return new UTCDate()}function CTZFromUTC(A){return new UTCDate(A.valueOf()+CTZnOffsetOnServerAdjusted(A,true)*1000)}function UTCFromCTZ(A){return new UTCDate(A.valueOf()-CTZnOffsetOnServerAdjusted(A,false)*1000)}function CTZNoon(){var A=CTZNow();A.setHours(12,0,0);return A}function UTCFromCTZNoon(){return UTCFromCTZ(CTZNoon())}function CTZnOffsetOnServerAdjusted(A,B){if(g_ctznOffsetOnServerStandardTime==g_ctznOffsetOnServerDaylightTime){return g_ctznOffsetOnServerStandardTime}return IsInDaylightSavingTime(A,B)?g_ctznOffsetOnServerDaylightTime:g_ctznOffsetOnServerStandardTime}var g_ctzdtDaylightStart=null;var g_ctzdtStandardStart=null;function IsInDaylightSavingTime(A,E){if(null==g_ctzrgDaylightStart||null==g_ctzrgStandardStart){return false}if(g_ctzdtDaylightStart==null||g_ctzdtStandardStart==null){g_ctzdtDaylightStart=new UTCDate(g_ctzrgDaylightStart[0],g_ctzrgDaylightStart[1],g_ctzrgDaylightStart[2],g_ctzrgDaylightStart[3],g_ctzrgDaylightStart[4],g_ctzrgDaylightStart[5],g_ctzrgDaylightStart[6]);g_ctzdtStandardStart=new UTCDate(g_ctzrgStandardStart[0],g_ctzrgStandardStart[1],g_ctzrgStandardStart[2],g_ctzrgStandardStart[3],g_ctzrgStandardStart[4],g_ctzrgStandardStart[5],g_ctzrgStandardStart[6])}var G=new BrowserDate(A);if(E){var D=g_ctzdtDaylightStart.getMonth()+1;var B=BoundTo12(D+1);var H=BoundTo12(D-1);var C=g_ctznOffsetOnServerDaylightTime;var F=G.getMonth()+1;if(F==D||F==B||F==H){C=g_ctznOffsetOnServerStandardTime}G.setSeconds(G.getSeconds()+C)}G.setFullYear(Math.min(g_ctzdtDaylightStart.getFullYear(),g_ctzdtStandardStart.getFullYear()));if(g_ctzdtDaylightStart<g_ctzdtStandardStart){return(G>=g_ctzdtDaylightStart&&G<g_ctzdtStandardStart)}else{return(G>=g_ctzdtDaylightStart||G<g_ctzdtStandardStart)}}function BoundTo12(A){while(A>12){A-=12}while(A<1){A+=12}return A}function CombineDateTime(A,B){return new UTCDate(A.getFullYear(),A.getMonth(),A.getDate(),B.getHours(),B.getMinutes(),B.getSeconds(),B.getMilliseconds())}function DateValue(A){return new UTCDate(A.getFullYear(),A.getMonth,A.getDate,0,0,0,0)}function TimeValue(A){return new UTCDate(1970,0,0,A.getHours(),A.getMinutes(),A.getSeconds(),A.getMilliseconds())}function Year(A){if(A.getFullYear){return A.getFullYear()}var B=A.getYear();if(B<10){return 2000+B}if(B<100){return 1900+B}return B}function DateCombinator(A){return function(B){return B["get"+A]()}}Month=DateCombinator("Month");Day=DateCombinator("Date");Hour=DateCombinator("Hours");Minute=DateCombinator("Minutes");Second=DateCombinator("Seconds");function Dictionary(B){this.Items={};for(var A in B){this.Items[A]=B[A]}}Dictionary.prototype.Exists=function(A){return A in this.Items};Dictionary.prototype.Keys=function(){var A=[];for(var B in this.Items){A.push(B)}return A};function IsDate(A){return A&&null!=A.toUTCString}function LBound(A){return 0}function UBound(A){return A.length-1}function CTZsDateFromUTC(A){return CTZsDateNoTimeFromUTC(A)+" "+CTZsTimeFromUTC(A)}function CTZsDateNoTimeFromUTC(A){if(typeof (A)=="string"){A=A.replace(/\.|\-/g,"/")}return CTZsDateRawFromUTC(new UTCDate(A))}function InternalsDateNoTime(A){if(typeof (A)=="string"){A=A.replace(/\.|\-/g,"/")}return InternalsDateRaw(new BrowserDate(A))}function InternalsDateRaw(A){var B=GetLocaleDate();B=B.replace(new RegExp(FB_DATE_CODE),A.getDate());B=B.replace(new RegExp(FB_MONTH_CODE),A.getMonth()+1);B=B.replace(new RegExp(FB_YEAR_CODE),A.getFullYear());return B}function SerializeDate(A){return""+A.getFullYear()+"-"+(1+A.getMonth())+"-"+A.getDate()+" "+A.getHours()+":"+A.getMinutes()+":"+A.getSeconds()}function CTZsDateRawFromUTC(A){return InternalsDateRaw(CTZFromUTC(A))}function CTZsTimeFromUTC(B){if(typeof (B)=="string"){B=B.replace(/\.|\-/g,"/")}var A=new Clock();A.dt=new UTCDate(B);return A.getPrintableTime()}function NullToBool(A){if(A){return true}return false}function NullToZero(A){if(A){return A}return 0}function NullToBlank(A){if(A||A==0){return A}return""}function IntFromBool(A){return A?1:0}if(IsEmpty(Wasabi)){var Wasabi={}}if(IsEmpty(Wasabi.Runtime)){Wasabi.Runtime={}}Wasabi.Runtime.RegExp=function(A){this.Pattern=A};Wasabi.Runtime.RegExp.prototype={Pattern:"",Global:false,IgnoreCase:false,Multiline:false,Initialize:function(){if(this.re&&this.Pattern==this._Pattern&&this.Global==this._Global&&this.IgnoreCase==this._IgnoreCase&&this.Multiline==this._Multiline){return this.re}this._Pattern=this.Pattern;this._Global=this.Global;this._IgnoreCase=this.IgnoreCase;this._Multiline=this.Multiline;this.re=new RegExp(this.Pattern,(this.Global?"g":"")+(this.IgnoreCase?"i":"")+(this.Multiline?"m":""));return this.re},Execute:function(B){var A=this.Initialize();var D=[];var C;while(C=A.exec(B)){D.push(new Wasabi.Runtime.Match(C));if(!this.Global){break}}return new Wasabi.Runtime.MatchCollection(D)},Test:function(B){var A=this.Initialize();return A.test(B)},Replace:function(C,A){var B=this.Initialize();return C.replace(B,A)},Split:function(B){var A=this.Initialize();return B.split(A)}};Wasabi.Runtime.Match=function(A){if(typeof (A)=="string"){this.sValue=A;this.rgSubmatch=new Wasabi.Runtime.MatchCollection([])}else{var B=A;this.ixFirst=B.index;this.sValue=B[0];this.rgSubmatch=new Wasabi.Runtime.MatchCollection($(B.slice(1)).map(function(){return new Wasabi.Runtime.Match(this.toString())}))}};Wasabi.Runtime.Match.prototype={get_FirstIndex:function(){if(this.ixFirst==null){throw ("Can't find the indices of RegExp submatches in Javascript.")}return this.ixFirst+1},get_Length:function(){return this.get_Value().length},get_Value:function(){return this.sValue},get_SubMatches:function(){return this.rgSubmatch}};Wasabi.Runtime.MatchCollection=function(A){this.rgMatch=A};Wasabi.Runtime.MatchCollection.prototype={get_Count:function(){return this.rgMatch.length},get_item:function(A){return this.rgMatch[A]}};Array.prototype.select=function(E){var A=[];var B;for(B=0;B<this.length;B++){if(!E||E(this[B])){var C=this[B];var F={};for(var D in C){F[D]=C[D]}A.push(F)}}return A};function InnerJoin(H,B,I){var K=[];var G,F;var E,D;var J=H.length;var A=B.length;for(G=0;G<J;G++){for(F=0;F<A;F++){E=H[G];D=B[F];if(!I||I(E,D)){var C={};for(s in E){C[s]=E[s]}for(s in D){C[s]=D[s]}K[K.length]=C}}}return K}function LeftJoin(E,A,F){var I=[];var D,C;for(D=0;D<E.length;D++){var G=I.length;for(C=0;C<A.length;C++){if(!F||F(E[D],A[C])){var B={};var H;for(H in E[D]){B[H]=E[D][H]}for(H in A[C]){B[H]=A[C][H]}I.push(B)}}if(G==I.length){I.push(E[D])}}return I}function RecordSet(B,C){if(!C){this._rg=B}else{rgSort=Split(C,",").map(function(D){return Trim(D)});this._rg=[];var A;for(A=0;A<B.length;A++){this._rg[A]=B[A]}this._rg.sort(function(F,D){for(var G=0;G<rgSort.length;G++){var E=F[rgSort[G]];var H=D[rgSort[G]];if(E<H){return -1}if(E>H){return 1}}return 0})}this._ix=-1;this._MoveTo=function(D){var E,F;if(this._ix>=0){F=this._rg[this._ix];for(E in F){this[E]=undefined}}this._ix=D;this.EOF=(this._ix==this._rg.length);if(!this.EOF){F=this._rg[this._ix];for(E in F){this[E]=F[E]}}};this.MoveNext=function(){this._MoveTo(this._ix+1)};this.MoveFirst=function(){this._MoveTo(0)};this.get_EOF=function(){return this.EOF};this.Close=function(){this._rg=[];this._ix=2;this.EOF=true};this.MoveNext()}function CloseRS(A){A.Close()}function EntityClassGenerator(A){return function(){this.fLoaded=false;this.Load=function(B){var E="ix"+A;var C=DB[A].select(function(F){return F[E]==B});this.fLoaded=C.length==1;if(this.fLoaded){var D;for(D in C[0]){this[D]=C[0][D]}}return this.fLoaded};this.LoadByIx=function(B){return this.Load(B)};this.get_fDeleted=function(){return this.fDeleted}}}function ExtentEntityClasses(){CProject.prototype.LoadInbox=function(){var A=DB.Project.select(function(B){return B.fInbox&&!B.fDeleted});if(A.length==0){return false}return this.Load(A.ixProject)};CPerson.prototype.IsSubscribedToBug=function(){return goBug.fSubscribed};CPerson.prototype.CanSee=function(A){return IsVisible(A)};CPerson.prototype.LoadMinimal=function(A){return this.Load(A)};CPerson.prototype.LoadPermissions=function(A){return this.LoadMinimal(A)}}var PERSON_NO_LINK=1;var PERSON_RSS=2;var PERSON_LINK_TOOLTIP=3;var PERSON_NAME_NO_CLEAN=4;function RenderAttributes(B){for(var A in B.Items){_g[_g.length]=" "+A+'="'+HtmlAttributeEncode(B.Items[A])+'" '}}function FormatString(){var B=arguments[0];var C={};for(var A=1;A<arguments.length;A++){C[A-1]=arguments[A]}return FormatStringFromDict(B,C)}function FormatStringFromDict(G,H){if(!H){H={}}var B={"{":1,"}":1};var F=function(M){var L=function(N,O){if(O){N.push(O)}};var J=[];var K=[];for(var I=0;I<M.length;I++){if(B[M.charAt(I)]){L(K,Join(J,""));L(K,M.charAt(I));J=[]}else{L(J,M.charAt(I))}}L(K,Join(J,""));return K};var D=F(G);for(var A=0;A<D.length;A++){if(!B[D[A]]){continue}var G=D[A];var E=D[A+1];var C=D[A+2];if(G==E){D[A+1]=""}else{if(G!=C&&B[C]&&E in H){D[A]=D[A+2]="";D[A+1]=H[E]}}}return Join(D,"")}function BugViewPinnedFieldDict(){if(!BugViewPinnedFieldDict.dict){BugViewPinnedFieldDict.dict=new Dictionary(goPinnedFieldDict)}return BugViewPinnedFieldDict.dict}function StaticContentUrl(A){if(window.g_fFBOD&&A){if(A[0]!="/"){A="/"+A}A=StaticContentDomain(A.length%2)+A}return A}function StaticContentDomain(A){return location.protocol+"//"+g_ixGeneration+"-static"+A+".fogbugz.com"};
var ACL_DISCUSS_GROUP_SECTION_NAME="DiscussGroup";var ACL_GROUP_SECTION_NAME="Group";var ACL_MAILBOX_SECTION_NAME="Mailbox";var ACL_PERMISSION_ADMIN=3;var ACL_PERMISSION_NONE=0;var ACL_PERMISSION_READ=1;var ACL_PERMISSION_WRITE=2;var ACL_PERSON_ALL_COMMUNITY=-5;var ACL_PERSON_ALL_NORMAL=-1;var ACL_PERSON_ALL_PUBLIC=-10;var ACL_PROJECT_SECTION_NAME="Project";var ACL_WIKI_SECTION_NAME="Wiki";var ACTION_TOKEN_NAME="sActionToken";var COLTYPE_AREA=9;var COLTYPE_ASSIGNED_TO=5;var COLTYPE_CASE=2;var COLTYPE_CATEGORY=1;var COLTYPE_CLOSED_BY=30;var COLTYPE_CORRESPONDENT=14;var COLTYPE_CUSTOM_1=10;var COLTYPE_CUSTOM_2=11;var COLTYPE_DATE_CLOSED=19;var COLTYPE_DATE_OPENED=17;var COLTYPE_DATE_OPENED_REV=21;var COLTYPE_DATE_RESOLVED=18;var COLTYPE_DG_COUNT_REPLIES=104;var COLTYPE_DG_FAVORITE=106;var COLTYPE_DG_FIRSTCOMMENT=103;var COLTYPE_DG_FULLNAME=102;var COLTYPE_DG_GROUP=105;var COLTYPE_DG_HEADLINE=101;var COLTYPE_DG_POST_DATE=107;var COLTYPE_DUE=13;var COLTYPE_ELAPSED_TIME=20;var COLTYPE_ESTIMATE_CURRENT=26;var COLTYPE_ESTIMATE_ORIGINAL=28;var COLTYPE_FAVORITE=29;var COLTYPE_FIX_FOR=16;var COLTYPE_LASTEDITED_BY=31;var COLTYPE_LAST_SEEN_BY_ME=27;var COLTYPE_LAST_UPDATED=15;var COLTYPE_NONE=-1;var COLTYPE_OCCURRENCES=12;var COLTYPE_OPENED_BY=22;var COLTYPE_PRIORITY=7;var COLTYPE_PROJECT=8;var COLTYPE_REMAINING_TIME=6;var COLTYPE_RESOLVED_BY=25;var COLTYPE_STATUS=4;var COLTYPE_TAGS=32;var COLTYPE_TITLE=3;var COLTYPE_TITLE_COMMENT=23;var COLTYPE_TITLE_EVENT=24;var COLTYPE_WP_FAVORITE=206;var COLTYPE_WP_HEADLINE=201;var COLTYPE_WP_LAST_COMMENT=203;var COLTYPE_WP_LAST_EDITOR=202;var COLTYPE_WP_LAST_EDIT_COMBINED=207;var COLTYPE_WP_LAST_EDIT_DATE=204;var COLTYPE_WP_WIKI=205;var GRAPH_TYPE_BURN_DOWN=4;var GRAPH_TYPE_BURN_DOWN_THIS=5;var GRAPH_TYPE_DEV_DETAIL=2;var GRAPH_TYPE_DEV_SHIP_DATE=6;var GRAPH_TYPE_SHIP_DATE=1;var GRAPH_TYPE_SHIP_HISTORY=3;var GRAPH_TYPE_VAL_DEFAULT=2;var GRAPH_TYPE_VAL_MAX=6;var GRAPH_TYPE_VAL_MIN=1;var NEW_USER_CONTROL_ADMIN=0;var NEW_USER_CONTROL_ANYBODY=1;var NEW_USER_CONTROL_COMMUNITY=2;var PGX_LOAD_FILTER="LF";var PGX_SAVE_FILTER="FS";var PGX_VIEW_CASE="EV";var SEARCH_TYPE_BUG="Bug";var SEARCH_TYPE_DISCUSSTOPIC="DiscussTopic";var SEARCH_TYPE_WIKIPAGE="WikiPage";var TIMESHEET_CASE_EM=6;var TIMESHEET_DELETE_EM=6;var TIMESHEET_MARGIN_EM=1;var TIMESHEET_START_TIME_EM=6;var TIMESHEET_TITLE_EM=25;function NavBarFilterMenuSaveAs(C,B){var D=sIif(C,FB_SAVE_CURRENT_SEARCH_AS,FB_SAVE_CURRENT_FILTER_AS);var A=sIif(C,"preSaveSearchAsFilter","preSaveCurrentFilterAs");_g[_g.length]="<a href=\"#\" onclick=\"toggleVisible(document.getElementById('idSaveCurrentFilter')); giveTextBoxFocus('idMenuFilterName'); ShadowManager.fixShadow('filterPopup');\">"+(D)+'</a><div id="idSaveCurrentFilter" style="display:none;"><input type="hidden" name="pg" value="pgList" /><input type="hidden" name="pre" value="'+(A)+'" />';if(C){_g[_g.length]='<input type="hidden" name="searchFor" value="'+(UnicodeClean(B))+'" />'}_g[_g.length]='<input type="text" style="margin-left:20px; width:100px;" maxlength="40" name="sFilterName" id="idMenuFilterName" class="navbarEdit dlgText" onkeypress="return '+(JsFxn(JS_HANDLEFILTERSAVEASKEYDOWN))+'(this, event, false);" value="'+(sIif(C,"",UnicodeClean(B)))+'"/><button class="navbarButton" onclick="return '+(JsFxn(JS_HANDLEFILTERSAVEASCLICK))+'(this);" onkeypress="return '+(JsFxn(JS_HANDLEFILTERSAVEASKEYDOWN))+'(this, event, true);">'+(FB_OK)+"</button></div>"}function BugTip(C,B,A){BugTipWithClassAndWidth(C,B,A,"bugTip","")}function BugTipWithClassAndWidth(C,B,A,G,F){var E=("");var D=("");if(A){D=('id="bugerror"');E=('style="color:red"')}_g[_g.length]='<div align="left" class="'+(G)+'" ';if(Len(F)>0){_g[_g.length]='style="width:'+(F)+';"'}_g[_g.length]=" "+(D)+" >";if(Len(C)>0){_g[_g.length]="<strong "+(E)+" >"+(C)+"</strong><hr />"}_g[_g.length]=(B);_g[_g.length]="</div><br />"}function MakeClientInfoAvailableForRelativeList(A){}var IsInRelativeList_ixCurrent;var IsInRelativeList_fInList;function IsInRelativeList(C,B){var A;A=((C!=SEARCH_TYPE_BUG||B!=IsInRelativeList_ixCurrent||IsInRelativeList_fInList));return A}function LocalizedAxisName(C){var B;var A=(Split(C,"|",2));if(UBound(A)>=0){return(A[0])}return B}function BuildAxis(D,C){var B;var A=((InStr(C," ")>0)||(InStr(C,"-")>0));B=(Swap2(sIif(A,'%1:"%2"',"%1:%2"),LocalizedAxisName(D),Replace(C,'"',"")));return B}function PeopleSearchAsText(C){var B=(FB_USERS_ALL);if(C[0]){B=(FB_USERS_ACTIVE)}if(C[1]){B=(FB_USERS_INACTIVE)}var D=("");var A=("");if(C[3]&&C[4]&&C[5]){D=("")}else{if(C[3]&&C[5]){D=(FB_USERS_NORMAL_VIRTUAL)}else{if(C[3]&&C[4]){D=(FB_USERS_NORMAL_COMMUNITY)}else{if(C[4]&&C[5]){D=(FB_USERS_COMMUNITY_VIRTUAL)}else{if(C[3]){D=(FB_NORMAL_PLURAL)}else{if(C[4]){D=(FB_COMMUNITY_PLURAL)}else{if(C[5]){D=(FB_VIRTUAL_PLURAL)}}}}}}}if(Len(D)==0&&!(C[3])){A=(FB_NONE)}else{A=(Swap2(B,D,FB_USERS))}_g[_g.length]='<span class="editInstructions"><a href="javascript:void(0);" class="dotted">'+(A)+'</a>&nbsp;<a href="javascript:void(0);">';TreeDownIcon();_g[_g.length]="</a></span>"}function UserDescription(B,A,D){var C;if(B){C=(FB_ADMIN)}else{if(A){C=(FB_COMMUNITY_USER)}else{if(D){C=(FB_VIRTUAL_USER)}else{C=("")}}}return C}function NewUserControlSelect(A,B,C,D){_g[_g.length]='\n <select name="fNewUserControl"\nid="idNewUserControl"\nsize="1"\nclass="dlg"\nstyle="width:300px"> <option '+(SelectedIfTrue(!(B)&&!(D)))+'\n value="'+(NEW_USER_CONTROL_ADMIN)+'">'+(FB_ONLY_ADMIN_NEW)+"</option> \n\n ";if(A){_g[_g.length]="\n <option "+(SelectedIfTrue(B))+' value="'+(NEW_USER_CONTROL_ANYBODY)+'">'+(FB_ANYBODY_NEW)+"</option> \n"}_g[_g.length]="\n \n ";if(C){_g[_g.length]="\n <option "+(SelectedIfTrue(D))+' value="'+(NEW_USER_CONTROL_COMMUNITY)+'">'+(FB_ANYBODY_NEW_COMMUNITY)+"</option> \n"}_g[_g.length]="\n </select><script>DLCL();<\/script> \n"}function QueryPageNew(A){var B;B=((A=="new"||A=="newemail"));return B}function QueryPageEditable(A){var B;B=((A=="assign"||A=="close"||A=="edit"||A=="editClosed"||A=="new"||A=="newemail"||A=="reactivate"||A=="reopen"||A=="resolve"||A=="reply"||A=="move"||A=="forward"||A=="email"));return B}function QueryPageEmail(A){var B;B=((A=="reply"||A=="forward"||A=="newemail"||A=="email"));return B}function QueryFieldsEditable(A){var B;B=((A=="assign"||A=="edit"||A=="new"||A=="newemail"||A=="reactivate"||A=="move"||A=="reopen"||A=="resolve"));return B}function ShowTime(A,D,H,B,C,E){if(B==_u){B=true}if(C==_u){C=""}if(E==_u){E=""}var F=(A);var I;if(D==vbInvalidDate){I=(GetLocaleTime())}else{I=(CTZsTimeFromUTC(D))}var J=(new Dictionary({}));J.Items["class"]=(H+" dlgText");J.Items.tabindex=(C);if(B){J.Items.style=("width:75px; margin:2px 0;")}var G=(new Dictionary({}));G.Items.tabindex=(E);_g[_g.length]='<nobr class="dtRow">';TimeInputField(F,A,I,J);TimeInputButton(F,G);_g[_g.length]="</nobr>"}function ShowCalendar(B,A,F,M,J,K,N,D,C,E){if(N==_u){N=GetLocaleDate()}if(D==_u){D=true}if(C==_u){C=""}if(E==_u){E=""}var G=(B);var I;if(F==vbInvalidDate){I=(N)}else{I=(CTZsDateRawFromUTC(F))}var L=(new Dictionary({}));L.Items["class"]=(J+" dlgText");L.Items.tabindex=(C);L.Items.onkeypress=(K);if(D){L.Items.style=("width:131px; margin:2px 0;")}var H=(new Dictionary({}));H.Items.tabindex=(E);_g[_g.length]='<nobr class="dtRow">';DateInputField(G,B,I,L,M,true);DateInputButton(G,H,M,true);_g[_g.length]="</nobr>";DateTimeBinding(B,A)}function TimeInputField(A,E,D,C){if(C==null){C=(new Dictionary({}))}LCaseDict(C);var B=(sIif(IsDate(D),"",D));C.Items.id=(A);C.Items.name=(E);C.Items.value=(D);C.Items.valueDefault=(GetLocaleTime());C.Items.type=("text");C.Items.onblur=(Swap1("if(this.value != '' && this.value != '%1') { clo.setTime(clo.guessTime(this.value)); this.value=clo.getPrintableTime(); }",B)+CStr(C.Items.onblur));C.Items.onclick=(Swap1("if(this.value=='%1') { this.select(); }",B)+CStr(C.Items.onclick));C.Items.onkeypress=("if (stopFormSubmission(event)) this.onblur.apply(this);"+CStr(C.Items.onkeypress));RenderTag("input",C)}function TimeInputButton(A,B){if(B==null){B=(new Dictionary({}))}LCaseDict(B);if(!(B.Exists("href"))){B.Items.href=("javascript:void 0;")}B.Items.onkeydown=("if(isTab(event)) theMgr.hidePopup('tblTime');"+CStr(B.Items.onkeydown));B.Items.onclick=(Swap1("clo.setTime(clo.guessTime(document.getElementById('%1').value));clo.show('%1'); clo.focus(); return cancel(event);",A)+CStr(B.Items.onclick));RenderTag("a",B,pictureOf(ClockIcon))}function DateInputField(A,G,D,C,E,F){if(E==_u){E=true}if(F==_u){F=true}if(C==null){C=(new Dictionary({}))}LCaseDict(C);var B=(sIif(IsDate(D),"",D));C.Items.id=(A);C.Items.name=(G);C.Items.value=(D);C.Items.valueDefault=(GetLocaleDate());C.Items.type=("text");C.Items.onblur=(Swap2("if(this.value != '' && this.value != '%1' && this.value.toLowerCase().indexOf('%2'.toLowerCase()) == -1) { cal.setDate(cal.guessDate(this.value)); this.value=CTZsDateRawFromUTC(cal.dt); }",B,FB_NONE)+CStr(C.Items.onblur));C.Items.onclick=(Swap1("if(this.value=='%1') { this.select(); }",B)+CStr(C.Items.onclick));C.Items.onfocus=(Swap2("cal.bFutureOK = %1; cal.bPastOK = %2;",SerializeBool(F),SerializeBool(E))+CStr(C.Items.onfocus));C.Items.onkeypress=("if (stopFormSubmission(event)) { this.onblur.apply(this); }"+CStr(C.Items.onkeypress));RenderTag("input",C)}function DateInputButton(B,A,C,D){if(C==_u){C=true}if(D==_u){D=true}if(A==null){A=(new Dictionary({}))}LCaseDict(A);if(!(A.Exists("href"))){A.Items.href=("javascript:void 0;")}A.Items.onkeydown=("if(isTab(event)) theMgr.hidePopup('tblTime');"+CStr(A.Items.onkeydown));A.Items.onclick=(Swap2("cal.bFutureOK = %1; cal.bPastOK = %2; cal.fTextBar = true;",SerializeBool(D),SerializeBool(C))+Swap1("cal.setDate(cal.guessDate(document.getElementById('%1').value));cal.show('%1'); return cancel(event);",B)+CStr(A.Items.onclick));RenderTag("a",A,pictureOf(CalendarIcon))}function DateTimeBinding(B,A){if(!(IsNothingOrEmpty(B))&&!(IsNothingOrEmpty(A))){_g[_g.length]="<script>ClockCalBinding.add('"+(B)+"', '"+(A)+"');<\/script>"}}function LCaseDict(D){if(D==null){return }var B=(D.Keys());var A;for(A=LBound(B);A<=UBound(B);A++){var C=(B[A]);if(LCase(C)!=C){D.Items[LCase(C)]=(D.Items[C]);D.Items[C]=(null)}}}function CalendarTable(){_g[_g.length]='\n <table	id="tblCalendar"\nborder="0"\ncellspacing="0"\nclass="calendar"\ncellpadding="0"\nstyle="position: absolute;margin: 2px; display: none;z-index:100;"\n> <tr class="monthname"> <th align="left"><a href="javascript: void 0;" onclick="cal.backMonth(); return cancel(event);"><img src="'+(StaticContentUrl("images/left.png"))+'" width="5" height="9" border="0" valign="baseline" align="baseline"/></a></th> <th colspan="5" id="MonthTitle" style="text-align: center">January</th> <th align="right"><a href="javascript: void 0;" onclick="cal.fwdMonth(); return cancel(event);"><img src="'+(StaticContentUrl("images/right.png"))+'" width="5" height="9" border="0" valign="baseline" align="baseline"/></a></th> </tr> <tr class="weekname"> <th id="weekday0">S</th> <th id="weekday1">M</th> <th id="weekday2">T</th> <th id="weekday3">W</th> <th id="weekday4">T</th> <th id="weekday5">F</th> <th id="weekday6">S</th> </tr> \n';var B;var A;for(B=0;B<=5;B++){_g[_g.length]='<tr class="day">';for(A=0;A<=6;A++){_g[_g.length]='<td><a id="'+(B+","+A)+'" href="javascript:void 0;" onclick="cal.setDay(this.id); return cancel(event);">1</a></td>'}_g[_g.length]="</tr>"}_g[_g.length]='\n <tr class="buttons" id="idCalendarTextBar"> <td style="border-top: 1px solid black;" colspan="2" align="left"> <a href="javascript: void 0;" onclick="cal.hide();document.getElementById(cal.txtID).value = \'\'; if (document.getElementById(cal.txtTimeID)) { document.getElementById(cal.txtTimeID).value = \'\'; } return cancel(event);">'+(Replace(FB_NO_DATE," ","&nbsp;"))+'</a> </td> <td style="border-top: 1px solid black;" colspan="3" align="center"> <a href="javascript: void 0;" onclick="cal.setDate(new UTCDate()); cal.hide(); return cancel(event);">'+(FB_CALENDAR_TODAY)+'</a> </td> <td style="border-top: 1px solid black;" colspan="2" align="right"> <a href="javascript: void 0;" onclick="cal.showTips(); return cancel(event);">'+(FB_TIPS)+'</a> </td> </tr> <tr class="tips"> <td colspan="7" id="calTips"></td> </tr> </table> \n';_g[_g.length]='\n <input type="hidden" /> \n'}function CalendarTimeTable(){var A=GetWorkingSchedule();_g[_g.length]='<table cellpadding="0" cellspacing="0" border="0" id="tblTime" style="position: absolute; z-index: 100; margin: 2px; display: none;"><tr><td>';DlgListOfHours(A.CTZGetWorkdayStartHour(),"timeTableSelect",0,"clo.setTime(clo.guessTime(this.options[this.selectedIndex].value)); clo.hide(); clo.focus(true); return cancel(event);");_g[_g.length]="</td></tr></table>"}function EditableTablePaneBegin(A){_g[_g.length]="\n ";ClickMask("panemask"+A,"EditableTableManager.hideAllPanes();theMgr.hideAllPopups();return false;");_g[_g.length]='\n <div id="edit'+(A)+'" style="'+(InlineStyleLoadingDiv(false,4))+';" class="editableTableMain"> \n';ClickMask("panemaskSmall"+A,"javascript:return (theMgr.hideAllPanePopups() || KeyManager.deactivateHotKeys());");_g[_g.length]='\n <div class="editableTableTopBar" onmousedown="EditableTableManager.mousedownTopBar(this);" id="topbar'+(A)+'">&nbsp;</div> \n'}function EditableTablePaneEnd(){_g[_g.length]="\n <br /> </div> \n"}function DeletePaneBegin(){_g[_g.length]='\n <div id="delete" style="display:none;" class="editableTablePane"> \n'}function EditablePaneBegin(){_g[_g.length]='\n <div id="editable" style="display:none;" class="editableTablePane"> \n'}function ErrorPaneContents(A,B){if(B==_u){B=""}_g[_g.length]='\n <span id="mainErrorContainer" class="errorLabel">'+(B)+'</span> <br><br> <input type="submit" id="errorOk_'+(A)+'" cHotKey="o" value="'+(FB_OK)+'" class="dlgButton" onclick="EditableTableManager.hidePane(\''+(A)+"');return false;\" /> \n"}function PaneEnd(){_g[_g.length]="\n </div> \n"}function EditableTableBodyBegin(B,A){_g[_g.length]='\n <table id="static'+(B)+'" class="biglist" cellspacing="0" width="'+(A)+'"> \n'}function EditableTableBodyEnd(){_g[_g.length]="\n </table> \n"}function EditableTableSize(A){_g[_g.length]='\n <span style="display:none;" id="pxWidthTable">'+(A)+"</span> \n"}function PaneButtonsYesNo(B,A){_g[_g.length]='<input type="submit" id="yes_'+(B)+'" cHotKey="y" value="'+(FB_YES)+'" class="dlgButton" onclick="EditableTableManager.disablePaneForSubmit(\''+(B)+"');"+(A)+';return false;" />&nbsp;<input type="submit" id="no_'+(B)+'" cHotKey="n" value="'+(FB_NO)+'" class="dlgButton" onclick="EditableTableManager.hidePane(\''+(B)+"');return false;\" />"}function ShowEditPaneJS(E,G,B,A,C,D){if(G==_u){G="{}"}if(B==_u){B="this"}if(A==_u){A=-1}if(C==_u){C="null"}if(D==_u){D="undefined"}var F;F=("EditableTableManager.showEditPane('"+E+"',this,"+G+", "+D+", '"+B+"', "+sIif(A>-1,CStr(A),"null")+", "+C+");return false;");return F}function ShowDeletePaneJS(B,C,A){var D;D=("EditableTableManager.showDeletePane('"+B+"',this,"+C+",'"+A+"');return false;");return D}function ShowDetailedDeletePaneJS(C,D,B,A,F){var E;E=("EditableTableManager.showDetailedDeletePane('"+C+"',this,"+D+",'"+B+"','"+A+"','"+F+"');return false;");return E}function DisableAndSubmitPaneJS(B,A){var C;C=("if (stopFormSubmission(event)) {EditableTableManager.disablePaneForSubmit('"+B+"');"+A+";return cancel(event);}");return C}function ShowDeleteAttachmentJS(D,B,F,C,A){if(A==_u){A="null"}var E;E=("showDeleteAttachment(this, "+D+", '"+B+"', "+F+", '"+C+"', "+A+" );return false;");return E}function FormatWikiTitle(A){var B;if(IsAnyUser()){B=(FB_FOGBUGZ+": "+A)}else{B=(A)}return B}function TIMESHEET_EDIT_EM(){var A;A=(CLng(FB_CSS_TIMESHEET_EDIT_EM));return A}function TIMESHEET_END_TIME_EM(){var A;A=(CLng(FB_CSS_TIMESHEET_END_TIME_EM));return A}function TIMESHEET_FRAME_EM(){var A;A=(TIMESHEET_EDIT_EM()+TIMESHEET_DELETE_EM+TIMESHEET_START_TIME_EM+TIMESHEET_END_TIME_EM()+TIMESHEET_CASE_EM+TIMESHEET_TITLE_EM);return A}function EditIntervalPane(){EditableTablePaneBegin("TimesheetTable");EditablePaneBegin();EditableTableSize(300);EditIntervalForm();_g[_g.length]="\n ";PaneEnd();DeletePaneBegin();_g[_g.length]='\n <form onsubmit="return false;"> \n';DlgInstructions('<span id="idTimesheetConfirmMsg"></span><br /><span id="idTimesheetResolveMsg">'+FB_AUTO_RESOLVE+"</span>");_g[_g.length]='\n <br/> <input type="submit" id="idTimesheetConfirmOk" cHotKey="o" id="Button_Cancel" value="'+(FB_OK)+'" class="dlgButton" NAME="ok_TimesheetTable" /> <input type="button" id="idTimesheetConfirmCancel" cHotKey="c" value="'+(FB_CANCEL)+'" class="dlgButton" onclick="EditableTableManager.hidePane(\'TimesheetTable\');return false;" NAME="cancel_TimesheetTable" /> </form> \n';PaneEnd();EditableTablePaneEnd()}function EditIntervalForm(I,B,G,A,F,H,D,E){if(I==_u){I=0}if(B==_u){B=DateValue(UTCNow())}if(G==_u){G=UTCNow()}if(A==_u){A=DateValue(UTCNow())}if(F==_u){F=UTCNow()}if(H==_u){H=""}if(D==_u){D=""}if(E==_u){E=""}var C=("-1");if(A!=vbInvalidDate){C=(CTZsDateRawFromUTC(A))}_g[_g.length]='\n <form method="get" action="default.asp" onSubmit="return Timesheet.submitEditor();"> <input type="hidden" name="pre" value="preEditInterval" /> <input type="hidden" name="pg" value="pgTimesheet" /> <input type="hidden" name="ixInterval" value="'+(UnicodeClean(CStr(I)))+'" /> <input type="hidden" name="dt" value="'+(CTZsDateRawFromUTC(B))+'" /> <input type="hidden" name="dtStartEdit" value="'+(CTZsDateRawFromUTC(B))+'" /> <input type="hidden" name="dtEndEdit" value="'+(C)+'" /> <div id="timesheet_edit_alignment"> <div> <p class="dlg" style="display:inline;"><span id="sTimesheetEdit"></span></p> </div> <div style="float:left; margin:0.25em;"> \n';DlgInstructionsWidth(FB_START,CStr(50));ShowTime("dtStartTime",G,"timesheetEditing",false);_g[_g.length]='\n </div> <div id="idTimesheetEditorEndTime" style="float:left; margin:0.25em;"> \n';if(A!=vbInvalidDate){_g[_g.length]="\n ";DlgInstructionsWidth(FB_END,CStr(50));ShowTime("dtEndTime",F,"timesheetEditing",false);_g[_g.length]="\n "}_g[_g.length]='\n </div> <div style="clear:left; margin:0.25em;">';DlgEditErrorContainer("dtEditError",UnicodeClean(D));_g[_g.length]='</div> <div style="margin:0.25em;"> \n';DlgInstructionsWidth(FB_CASE,CStr(50));_g[_g.length]="\n ";DlgBugSearchTextBox("ixBugEdit","ixBug",UnicodeClean(H),"");_g[_g.length]="\n ";DlgEditErrorContainer("ixBugEditError",UnicodeClean(E));_g[_g.length]='\n </div> <div style="margin:0.25em; margin-top:0.5em;"> <input type="submit" name="OK" id="timesheet_edit_ok" cHotKey="o" value="'+(FB_OK)+'" class="dlgButton"/> <input type="submit" id="timesheet_edit_cancel" cHotKey="c" value="'+(FB_CANCEL)+'" onclick="EditableTableManager.hidePane(\'TimesheetTable\'); return false;" name="cancel_TimesheetTable" class="dlgButton"/> </div> </div> </form> \n'}function TimesheetDisplay(F,H,I,A,B){if(B==_u){B=true}_g[_g.length]="\n <table "+(sIif(B,'id="idTimesheetTable"',""))+' cellspacing="0" class="biglist"> <tr> <th style="width: '+(TIMESHEET_EDIT_EM())+'em; text-align:center;">'+(FB_EDIT)+'</th> <th style="width: '+(TIMESHEET_DELETE_EM)+'em; text-align:center;">'+(FB_DELETE)+'</th> <th style="width: '+(TIMESHEET_START_TIME_EM)+'em;">'+(FB_START)+'</th> <th style="width: '+(TIMESHEET_END_TIME_EM())+'em;">'+(FB_END)+'</th> <th style="width: '+(TIMESHEET_CASE_EM)+'em;">'+(FB_CASE)+'</th> <th style="width: '+(TIMESHEET_TITLE_EM)+'em;">'+(FB_TITLE)+"</th> </tr> \n";if(UBound(F)<0){_g[_g.length]='<td align="center" colspan="5">'+(FB_NO_INTERVALS_FOR_DATE)+"</td>"}var E;var C;for(E=0;E<=UBound(F);E++){C=(F[E]);TimesheetRow(C,H)}var G=("return Timesheet.showAdder(this);");var D=("default.asp?pg=pgEditInterval&amp;dtStartEdit="+UnicodeClean(CStr(CTZFromUTC(A)))+"&amp;dtEndEdit="+UnicodeClean(CStr(CTZFromUTC(A))));_g[_g.length]='\n <tr> <th align="left" colspan="6"> \n';NewIconJS(D,G);_g[_g.length]='\n &nbsp;\n<a href="'+(D)+'" '+(sIif(B,'id="idNewTimeInterval"',""))+' cHotKey="+" onclick="'+(G)+'">'+(FB_ADD_INTERVAL)+"</a> </th> </tr> \n";if(I){_g[_g.length]='\n <tr> <td align="right" colspan="6" style="padding-top:1em;"> <input type="submit" class="dlgButton" name="btnScheduleWorkOn" '+(sIif(B,'id="timesheet_submit"',""))+' cHotKey="o" value="'+(FB_SAVE)+'" /> <input type="button" class="dlgButton" '+(sIif(B,'id="timesheet_cancel"',""))+' cHotKey="c" value="'+(FB_CANCEL)+'" onclick="ClockPopup.hide(); return false;" NAME="timesheet_cancel"/> </td> </tr> \n'}_g[_g.length]="\n </table> \n"}function TimesheetRow(A,B,C){if(C==_u){C=true}_g[_g.length]="\n <tr "+(sIif(C,'id="'+IdTimesheetRow(A)+'"',""))+' class="'+(ClassTimesheetRow(A))+'"> <td align="center"> \n';EditIconJS("default.asp?pg=pgEditInterval&amp;ixInterval="+A.ixInterval,"return Timesheet.showEditor("+A.ixInterval+")");_g[_g.length]='\n </td> <td align="center"> \n';if(B){_g[_g.length]='\n <input type="checkbox" '+(sIif(C,'id="'+A.ixInterval+'_delete"',""))+' alt="'+(FB_REMOVE)+'" border="0"\nonclick="Timesheet.tiByIx('+(A.ixInterval)+').toggleDeleted();" \n'+(sIif(A.Ends(),"",'disabled="true"'))+"\n "+(sIif(A.fToDelete,'checked="true"',""))+" /> \n"}else{if(A.Ends()){_g[_g.length]="\n ";DeleteIcon("default.asp?pg=pgDeleteInterval&amp;ixInterval="+A.ixInterval+"&amp;dt="+CTZsDateRawFromUTC(A.dtStart));_g[_g.length]="\n "}}_g[_g.length]="\n </td> <td><nobr>"+(CTZsTimeFromUTC(A.dtStart))+"</nobr></td> <td><nobr>"+(DisplayableEndTime(A,"return !(Timesheet.tiByIx("+A.ixInterval+").close());"))+'</nobr></td> <td> <a href="default.asp?'+(A.ixBug)+'"\nstyle="text-decoration: none"\nclass="'+(A.GetLinkClass())+'"\nonmouseover="mouseoverCaseId('+(A.ixBug)+', this);"\nonmouseout="mouseoutCaseId();"\nonclick="return Timesheet.confirmNavigate(\''+(FB_DEFAULT_URL)+"?"+(A.ixBug)+"');\">"+(A.ixBug)+'\n </a> </td> <td> <span class="popupTitle" style="width:'+(TIMESHEET_TITLE_EM-1)+'em;"> <nobr> <a href="default.asp?'+(A.ixBug)+'"\nstyle="text-decoration: none"\nclass="'+(A.GetLinkClass())+'"\nonclick="return Timesheet.confirmNavigate(\''+(FB_DEFAULT_URL)+"?"+(A.ixBug)+"');\"> \n"+(A.GetBugTitle())+"\n </a> </nobr> </span> </td> </tr> \n"}function IdTimesheetRow(A){var B;B=("idTIRow_"+A.ixInterval);return B}function ClassTimesheetRow(A){var B;B=(sIif(A.fToDelete,"r-d","row"));return B}function DisplayableEndTime(A,B){var C;if(A.Ends()){C=(CTZsTimeFromUTC(A.dtEnd))}else{C=(pictureOf(CloseIntervalLink,A,B))}return C}function CloseIntervalLink(A,B){if(!(A.Ends())){_g[_g.length]='<a href="default.asp?pre=preCloseTimeInterval&amp;pg=pgTimesheet&amp;ixInterval='+(A.ixInterval)+'" onclick="'+(B)+'">'+(FB_STOP_WORK)+"</a>"}}function TimesheetPopup(A,B){if(A==_u){A=null}if(B==_u){B=UTCNow()}EditableTableBodyBegin("TimesheetTable",400);EditableTableBodyEnd();EditIntervalPane();if(B>UTCNow()){B=(UTCNow())}_g[_g.length]='\n <div id="timeclockPopup" class="timeclockPopup" style="display:none; position:absolute; z-index:3; background-color:#FFFFFF"> \n';TimesheetFrame(A,B,true,true,true);_g[_g.length]="\n </div> \n"}function TimesheetFrame(B,D,A,E,C){if(D==_u){D=UTCNow()}if(C==_u){C=true}_g[_g.length]='\n <form method="post" action="default.asp" onSubmit="Timesheet.commit(); return false;"> <table style="'+(sIif(C,"width:"+TIMESHEET_FRAME_EM()+"em; margin:"+TIMESHEET_MARGIN_EM+"em;",""))+'"> <tr> <td align="left" style="padding:0;"> <p '+(sIif(C,'id="idTimesheetDt"',""))+' class="dlg" style="display:inline;">'+(CTZsDateWithDayFromUTC(D))+"</p> </td> \n";_g[_g.length]='\n <td align="right" style="padding:0"> <a href="default.asp?pg=pgTimesheet&amp;dt='+(CTZsDateRawFromUTC(DateAdd("h",-22,D)))+'" cHotKey="[" '+(sIif(C,'id="idTimesheetPrevious"',""))+' onclick="return Timesheet.prevDt();">';LeftArrowIcon();_g[_g.length]="</a>";if(C){_g[_g.length]=' <a href="default.asp?pg=pgTimesheet" id="prevTimesheetButton" onclick="return !Timesheet.showCalendar();">';CalendarIcon();_g[_g.length]="</a> "}_g[_g.length]='<a href="default.asp?pg=pgTimesheet&amp;dt='+(CTZsDateRawFromUTC(DateAdd("h",26,D)))+'" cHotKey="]" id="idTimesheetNext" onclick="return Timesheet.nextDt();" '+((C||DateAdd("h",22,D)>UTCNow()?' style="visibility: hidden;" ':""))+" >";RightArrowIcon();_g[_g.length]='</a>\n </td> </tr> <tr> <tr> <td colspan="2"> <a '+(sIif(C,'id="browseTimesheetGrid"',""))+' cHotKey="j" class="noGraphic" onclick="return KeyManager.browseTimesheetGrid(\'idTimesheetTable\');"><img alt="" src="'+(StaticContentUrl("images/spacer.gif"))+'"></a> <span '+(sIif(C,'id="idTimesheetContainer"',""))+' cHotKey="j"> \n';if(B!=null){TimesheetDisplay(((B)),A,E,D)}_g[_g.length]='\n </span> <input type="hidden" '+(sIif(C,'id="dtPreviousTimesheet"',""))+' value="'+(UTCDate())+'" onchange="Timesheet.changeDt(cal.guessDate(elById(\'dtPreviousTimesheet\').value)); return false;" NAME="dtPreviousTimesheet"/> <input type="hidden" '+(sIif(C,'id="dtToday"',""))+' value="'+(UTCDate())+'" NAME="dtToday"/> <div '+(sIif(C,'id="idTimesheetError"',""))+' style="display:none;" class="errorLabel"></div> </td> </tr> </table> </form> \n'}function FavoriteToggleIcon(F,B,D,C,A){if(D==_u){D=""}if(A==_u){A=""}var E=("onload=\"FavoritesIcons.registerAjax(this, '"+F+"', "+CStr(B)+')"');_g[_g.length]="<a "+(AttrIfNotBlank("id",A))+' class="starEmpty" href="javascript:void 0;"><img style="display: none; '+(D)+'" src="'+(StaticContentUrl("images/clear.gif"))+'" '+(E)+' alt="*"/></a>'}function CategoryIconUrlFromType(A){var B;switch(A){case 1:return(StaticContentUrl("images/icon-bug.gif"));break;case 2:return(StaticContentUrl("images/icon-feature.gif"));break;case 3:return(StaticContentUrl("images/icon-inquiry.gif"));break;case 4:return(StaticContentUrl("images/icon-scheduleitem.gif"));break;case 5:return(StaticContentUrl("images/icon-bug-error.gif"));break;case 6:return(StaticContentUrl("images/icon-wrench.gif"));break;case 7:return(StaticContentUrl("images/icon-magnifier.gif"));break;case 8:return(StaticContentUrl("images/icon-key.gif"));break;case 9:return(StaticContentUrl("images/error.gif"));break;default:return(null);break}return B}function CategoryIconImpl(A,E,D,C){var B=(CategoryIconUrl(A,E,D));_g[_g.length]='<img src="'+(HtmlAttributeEncode(B))+'" title="'+(HtmlAttributeEncode(UnicodeClean(CategoryName(E))))+'" class="catIcon '+(C)+'" height="16" width="16"/>'}function CategoryIcon(C,B){var A=new CCategory();if(A.Load(C)){CategoryIconImpl(A.nIconType,A.ixCategory,A.ixAttachmentIcon,B)}}function ActionButtonImg(B){var A=("");switch(B){case"spam":A=(StaticContentUrl("images/ico-spam.gif"));break;case"edit":case"editClosed":A=(StaticContentUrl("images/Edit.gif"));break;case"assign":A=(StaticContentUrl("images/ico-assign.gif"));break;case"reply":A=(StaticContentUrl("images/ico-reply-sm.gif"));break;case"forward":A=(StaticContentUrl("images/ico-forward-sm.gif"));break;case"email":A=(StaticContentUrl("images/ico-email-sm.gif"));break;case"resolve":case"close":A=(StaticContentUrl("images/ico-resolve.gif"));break;case"reactivate":case"reopen":A=(StaticContentUrl("images/New.gif"));break}if(Len(A)==0){return }_g[_g.length]='<img src="'+(A)+'" border="0" />'}function DeleteIcon(A){DeleteIconJS(A)}function UndeleteIcon(A){UndeleteIconJS(A)}function DeleteIconJS(D,A,B,C){if(A==_u){A=""}if(B==_u){B=FB_ICON_DELETE}if(C==_u){C=""}_g[_g.length]='<a href="'+(D)+'" '+(AttrIfNotBlank("onclick",A))+" "+(AttrIfNotBlank("title",B))+" "+(AttrIfNotBlank("id",C))+'><img src="'+(StaticContentUrl("images/Delete.gif"))+'" width="13" height="14" border="0" '+(AttrIfNotBlank("alt",B))+" /></a>"}function UndeleteIconJS(D,A,B,C){if(A==_u){A=""}if(B==_u){B=FB_UNDELETE}if(C==_u){C=""}_g[_g.length]='<a href="'+(D)+'" '+(AttrIfNotBlank("onclick",A))+" "+(AttrIfNotBlank("title",B))+" "+(AttrIfNotBlank("id",C))+'><img src="'+(StaticContentUrl("images/Undelete.gif"))+'" width="13" height="14" border="0" '+(AttrIfNotBlank("alt",B))+"/></a>"}function GetIconOnly(C,A,D,B){if(A==_u){A=""}if(D==_u){D=""}if(B==_u){B=A}var E;E=('<img src="'+C+'" width="13" height="14" border="0" '+sIif(Len(A)>0,'alt="'+A+'"',"")+" "+sIif(B!="",'title="'+B+'" ',"")+sIif(Len(D)>0,'style="'+D+'"',"")+" />");return E}function EditIcon(B,A){if(A==_u){A=""}_g[_g.length]='<a href="'+(B)+'" title="'+(FB_ICON_EDIT)+'" '+(A)+">"+(GetIconOnly(StaticContentUrl("images/Edit.gif"),FB_ICON_EDIT))+"</a>"}function EditIconOnly(A){if(A==_u){A=FB_ICON_EDIT}var B;B=(GetIconOnly(StaticContentUrl("images/Edit.gif"),A));return B}function EditDisabledIconOnly(B,A){if(B==_u){B=""}if(A==_u){A=FB_ICON_EDIT}var C;if(B!=""){C=(GetIconOnly(StaticContentUrl("images/Edit_disabled.gif"),A,"",B))}else{C=(GetIconOnly(StaticContentUrl("images/Edit_disabled.gif"),A,""))}return C}function UndeleteIconOnly(A){if(A==_u){A=FB_UNDELETE}var B;return(GetIconOnly(StaticContentUrl("images/Undelete.gif"),A));return B}function EditIconJS(B,A){_g[_g.length]='<a href="'+(B)+'" onclick="'+(A)+'" title="'+(FB_ICON_EDIT)+'">'+(GetIconOnly(StaticContentUrl("images/Edit.gif"),FB_ICON_EDIT))+"</a>"}function ExpandIcon(C,B,A){_g[_g.length]='<a href="'+(C)+'" onclick="'+(B)+'" title="'+(A)+'"><img src="'+(StaticContentUrl("images/ico-expand.gif"))+'" border="0" /></a>'}function NewIcon(A){_g[_g.length]='<a href="'+(A)+'" title="'+(FB_ICON_NEW)+'"><img src="'+(StaticContentUrl("images/New.gif"))+'" width="13" height="14" border="0" alt="'+(FB_ICON_NEW)+'" /></a>'}function NewIconJS(B,A){_g[_g.length]='<a href="'+(B)+'" onclick="'+(A)+'" title="'+(FB_ICON_NEW)+'"><img src="'+(StaticContentUrl("images/New.gif"))+'" width="13" height="14" border="0" alt="'+(FB_ICON_NEW)+'" /></a>'}function CopyIcon(B,A){if(A==null||Len(A)==0){A=(FB_ICON_COPY)}_g[_g.length]='<a href="'+(B)+'" title="'+(A)+'"><img src="'+(StaticContentUrl("images/copy.gif"))+'" width="13" height="14" border="0" alt="'+(A)+'" /></a>'}function EmailIcon(A){_g[_g.length]='<a href="mailto:'+(UnicodeClean(A))+'" title="'+(FB_ICON_EMAIL)+'"><img src="'+(StaticContentUrl("images/Email.gif"))+'" width="14" height="11" border="0" alt="'+(FB_ICON_EMAIL)+'" /></a>'}function AttachmentIcon(A){_g[_g.length]='<img src="'+(StaticContentUrl("images/attachment.gif"))+'" alt="'+(FB_ATTACHMENT)+'" width="16" height="16" align="left" border="0" style="padding-right:10px';if(A){_g[_g.length]="; filter:alpha(opacity=50);"}_g[_g.length]='" />'}function PlusIcon(A){if(A==_u){A=""}PlusMinusIcon(true,A)}function MinusIcon(A){if(A==_u){A=""}PlusMinusIcon(false,A)}function PlusMinusIcon(B,A){if(A==_u){A=""}_g[_g.length]='<img src="'+(StaticContentUrl("images/"+sIif(B,"plus","minus")+".gif"))+'" class="smallicon" alt="'+(FB_ICON_PLUS)+'" '+(AttrIfNotBlank("id",A))+" />"}function RSSIcon(A){_g[_g.length]='<a href="'+(A)+'"><img src="'+(StaticContentUrl("images/rss.gif"))+'" border="0" height="16" width="16" alt="'+(FB_RSS)+'" /></a>'}function CalendarIcon(){_g[_g.length]='<img src="'+(StaticContentUrl("images/icon-cal.gif"))+'" border="0" />'}function ClockIcon(){_g[_g.length]='<img src="'+(StaticContentUrl("images/icon-clock.gif"))+'" border="0" />'}function ArrowIcon(A){_g[_g.length]='<img src="'+(StaticContentUrl("images/"+A+"Arrow.gif"))+'" border="0" alt="" width="16" height="11" />'}function RightArrowIcon(){ArrowIcon("right")}function LeftArrowIcon(){ArrowIcon("left")}function TreeRightIcon(A){if(A==_u){A=""}_g[_g.length]='<img src="'+(StaticContentUrl("images/t_r.gif"))+'" border="0" width="9" '+(sIif(Len(A)>0,'id="'+A+'" ',""))+"/>"}function TreeDownIcon(A){if(A==_u){A=""}_g[_g.length]='<img src="'+(StaticContentUrl("images/t_d.gif"))+'" border="0" width="9" '+(sIif(Len(A)>0,'id="'+A+'" ',""))+"/>"}function OutlineIcon(){_g[_g.length]='<img src="'+(StaticContentUrl("images/outline.gif"))+'" border="0" width="16" height="16" />'}function DlgEditErrorContainer(B,C,A){if(C==_u){C=""}if(A==_u){A=300}_g[_g.length]='\n <div class="errorLabel" id="'+(B)+'" style="'+(sIif(Len(C)==0,"display:none;",""))+" width:"+(A)+'px;">'+(sIif(Len(C)==0,"&nbsp;",C))+"</div> \n"}function DlgInstructions(B,A){if(A==_u){A=300}if(B!=""){DlgInstructionsWidth(B,CStr(A))}}function DlgInstructionsNoWidth(A){DlgInstructionsWidth(A,(null))}function DlgInstructionsWidth(A,B){if(IsNumeric(B)){B=(B+"px")}_g[_g.length]='\n <div class="editInstructions" '+(sIif(B==null,"",'style="width:'+B+';"'))+"> \n"+(A)+"\n </div> \n"}function DlgListOfNames(D,J,K,F,C,B,I,E,M,A,H,G){if(H==_u){H=""}if(G==_u){G=false}var L=(pictureOf(DlgListOfNamesImpl,D,J,K,F,C,B,I,E,M,A,H,G));_g[_g.length]=(Replace(L,'table="Person"','table="Person" fIncludeDeleted="'+sIif(C,"true","")+'"  linked="'+sIif(!(I),"true","")+'"'))}function DlgUnlinkedListOfNames(D,I,J,F,C,B,H,E,L,A,G){if(G==_u){G=""}var K=pictureOf(DlgListOfNamesImpl,D,I,J,F,C,B,H,E,L,A,G);_g[_g.length]=(Replace(K,'table="Person"','table="Person" linked=""'))}function DlgListOfNamesImpl(D,K,L,G,C,B,J,F,M,A,I,H){if(I==_u){I=""}if(H==_u){H=false}var E=(DlgListOfNamesSource(C,J&&IsCommunityOn(),B&&IsVirtualLicensed(),H));_g[_g.length]='<select name="'+(D)+'" table="Person" id="'+(D)+'" size="1" ';if(M>-1){_g[_g.length]='style="width:'+(M)+'px"'}_g[_g.length]=' class="'+(F)+'" '+(sIif(fAlaCarte,"fDeferDrop='1'",""))+" ";_g[_g.length]=(I);if(A!=""){_g[_g.length]=' onblur="if (bSelectBoxChanged) { '+(A)+' };" onkeypress="javascript: if (document.all && 13 == getKeyCode(event)) {'+(A)+'};" onclick="javascript: if (document.all && bSelectBoxChanged) { '+(A)+' }; bSelectBoxChanged = false;" onchange="javascript: bSelectBoxChanged = true; if (!document.all) { '+(A)+' };" '}_g[_g.length]=">";if(G){_g[_g.length]='<option value="0">-- '+(FB_NO_CHANGE)+" --</option>"}if(Len(L)>0){_g[_g.length]='<option value="-1" '+(SelectedIfSame("-1",CStr(K)))+" >-- "+(L)+" --</option>"}while(!(E.get_EOF())){_g[_g.length]='<option value="'+((E.ixPerson))+'" '+(SelectedIfSame(CStr((E.ixPerson)),CStr(K)))+"> "+(UnicodeClean((E.sFullName)))+" </option>";E.MoveNext()}CloseRS(E);_g[_g.length]="</select><script>DLCL();<\/script>"}function DlgListOfNamesSource(B,C,A){var D;D=new RecordSet(DB.Person.select(function(E){return !(((!(B)&&E.fDeleted)||(!(C)&&E.fCommunity)||(!(A)&&E.fVirtual)))}));return D}function DlgListOfProjects(A,H,B,N,J,E,O,G,K){if(K==_u){K=""}var I=("ixProject");if(G==1){I=("ixProjectAlternate")}_g[_g.length]='<select name="'+(I)+'" id="'+(I)+'" table="Project" size="1" ';if(O>-1){_g[_g.length]='style="width:'+(O)+'px"'}_g[_g.length]=' class="'+(E)+'" fDeferDrop="1" onchange="projectChanged(this.options.selectedIndex)" '+(K)+">";if(J){_g[_g.length]='<option value="0">-- '+(FB_NO_CHANGE)+" --</option>"}if(Len(N)>0){_g[_g.length]='<option value="-1">-- '+(N)+" --</option>"}if(H<=0&&B){var L=(GetMe());if(L.ixPerson>0){var D=(new CArea());if(D.Load(L.ixArea)){var M=(new CProject());if(M.Load(D.ixProject)){if(!(M.get_fDeleted())&&L.HasPermission(new ACLPermission(ACLSection.Project),A,M.ixProject)){H=(D.ixProject)}}}}}var C=(DlgListOfProjectsSource(A,H));if(G!=0){var F=(new CProject());if(!(F.LoadInbox())){if(G==1){_g[_g.length]="<option "+(SelectedIfSame(CStr(CLng(H)),CStr(CLng(-1))))+' value="-1"> '+(UnicodeClean(FB_INBOX+" "+FB_RECOMMENDED))+" </option>"}if(G==2&&!(CProject.ExistsWithName(FB_INBOX))){_g[_g.length]="<option "+(SelectedIfSame(CStr(CLng(H)),CStr(CLng(-1))))+' value="-1"> '+(UnicodeClean(FB_INBOX))+" </option>"}}}while(!(C.get_EOF())){_g[_g.length]="<option ";_g[_g.length]=(SelectedIfSame(CStr(CLng(H)),CStr(CLng((C.ixProject)))));_g[_g.length]=(SelectedIfTrue((C.fInbox)==1&&CLng(H)==CLng(-1)&&G!=0));_g[_g.length]='value="'+((C.ixProject))+'">';_g[_g.length]=(UnicodeClean((C.sProject)));if(G==1&&(C.fInbox)==1){_g[_g.length]=(" "+FB_RECOMMENDED)}_g[_g.length]="</option>";C.MoveNext()}CloseRS(C);_g[_g.length]="</select><script>DLCL();<\/script>"}function DlgListOfProjectsSource(B,A){var C;C=(new RecordSet(DB.Project.select(function(D){return(GetSecurityToken().Assert(new ACLPermission(ACLSection.Project),D.ixProject,B))})));return C}function DlgListOfAreas(B,A,C,G,E,D,J,H,F){if(F==_u){F=""}var I=(pictureOf(DlgListOfAreasImpl,-1,"ixArea",B,A,C,G,E,D,J,"",H,F));_g[_g.length]=(Replace(I,'table="Area"','table="Area" linked="true"'))}function DlgUnlinkedListOfAreas(E,B,C,G,D,I,A,F){if(F==_u){F=""}var H=pictureOf(DlgListOfAreasImpl,E,B,ACL_PERMISSION_READ,C,false,G,false,D,I,A,false,F);_g[_g.length]=(Replace(H,'table="Area"','table="Area" linked="false"'))}function DlgListOfAreasImpl(B,P,I,R,L,K,F,Q,J,A,E,M){if(M==_u){M=""}var N;var S;N=(0);S=("");if(F){N=(0);S=("-- "+FB_NO_CHANGE+" --")}if(Len(K)>0){N=(-1);S=("-- "+K+" --")}if(R<=0&&L){var D=(GetMe());if(D.ixPerson>0){var O=(new CArea());if(O.Load(D.ixArea)&&!(O.get_fDeleted())){var C=(new CProject());if(C.Load(O.ixProject)&&!(C.get_fDeleted())&&D.HasPermission(new ACLPermission(ACLSection.Project),I,C.ixProject)){R=(D.ixArea)}}}}var G=(DlgListOfAreasSource(B,R,I));_g[_g.length]='<select name="'+(P)+'" id="'+(P)+'" table="Area" size="1" fDeferDrop="1" ';_g[_g.length]=(M);if(Len(S)>0){_g[_g.length]=' sNoChangeArea="'+(UnicodeClean(S))+'" ixNoChangeArea="'+(N)+'" '}if(E){_g[_g.length]=' bFakeArea="true" '}if(J>-1){_g[_g.length]=' style="width:'+(J)+'px" '}_g[_g.length]=' class="'+(Q)+'" ';if(A!=""){_g[_g.length]='onchange="javascript:'+(A)+'"'}else{_g[_g.length]='onchange="areaChanged();"'}_g[_g.length]=" >";if(Len(S)>0){_g[_g.length]='<option value="'+(N)+'">'+(S)+"</option>"}if(E){var H=(new CProject());if(!(H.LoadInbox())&&!(CProject.ExistsWithName(FB_INBOX))){_g[_g.length]="<option "+(SelectedIfSame(CStr(CLng(R)),CStr(-1)))+' value="-1"> '+(UnicodeClean(FB_NAME_OF_DEFAULT_AREA))+" </option>"}else{E=(false)}}while(!(G.get_EOF())){if(B==-1){_g[_g.length]="<option "+(SelectedIfSame(CStr(R),CStr((G.ixArea))))+' value="'+((G.ixArea))+'"> '+(UnicodeClean((G.sProject)+": "+(G.sArea)))+" </option>"}else{_g[_g.length]='<option value="'+((G.ixArea))+'" '+(SelectedIfSame(CStr((G.ixArea)),CStr(R)))+"> "+(UnicodeClean((G.sArea)))+" </option>"}G.MoveNext()}CloseRS(G);_g[_g.length]="</select><script>DLCL();<\/script>"}function DlgListOfAreasSource(A,C,B){var D;if(A!=-1){D=(new RecordSet(DB.Area.select(function(E){return(E.ixProject==A)})))}else{D=(new RecordSet(InnerJoin(DB.Project,DB.Area,function(F,E){return(F.ixProject==E.ixProject)})))}return D}function DlgListOfFixFors(J,I,G,K,F,D,L,H,E,B){if(H==_u){H=""}if(E==_u){E=(F<=0)}if(B==_u){B=false}var C=(DlgListOfFixForsSource(K,J));var A;_g[_g.length]='<select name="ixFixFor" id="ixFixFor" table="FixFor" size="1" fIncludeDeleted="'+(sIif(K,"true",""))+'" '+(DisabledIfTrue(B,"disabled"))+' class="'+(D)+'" fDeferDrop="1" ';_g[_g.length]=(H);if(L>-1){_g[_g.length]='style="width:'+(L)+'px"'}_g[_g.length]=">";if(G){_g[_g.length]='<option value="0">-- '+(FB_NO_CHANGE)+" --</option>"}if(Len(I)>0){_g[_g.length]='<option value="-1">-- '+(I)+" --</option>"}while(!(C.get_EOF())){if(F<=0||F==NullToZero(C.ixProject)||C.ixProject==null){_g[_g.length]="<option "+(SelectedIfSame(CStr(J),CStr((C.ixFixFor))))+' value="'+((C.ixFixFor))+'">';if(E){if(C.ixProject==null){_g[_g.length]=(UnicodeClean(FB_ALL_PROJECTS+": "))+""}else{_g[_g.length]=(UnicodeClean((C.sProject)+": "))+""}}A=(DlgListOfFixForsName(C));_g[_g.length]=(UnicodeClean(A))+"</option>"}C.MoveNext()}CloseRS(C);_g[_g.length]="</select><script>DLCL();<\/script>"}function DlgListOfFixForsName(A){var B;B=(A.sCTZFixForVersionFromUTC);return B}function DlgListOfFixForsSource(C,A){var B;B=new RecordSet(LeftJoin(DB.FixFor.select(function(D){return(C||!(D.fInactive)||D.ixFixFor==A)}),DB.Project,function(D,E){return(D.ixProject==E.ixProject)}));return B}function DlgMultiListOfFixFors(B,I,C,K,G,E,L){var F=(DlgListOfFixForsSource(K,-1));var J=((G<=0));_g[_g.length]='<span id="MultiListOfFixForsContainer">';EditableTableBodyBegin("MultiListOfFixFors");_g[_g.length]='<thead> <tr> <th> <span class="DmloffCheckboxPlaceholder"> <input type="checkbox" name="ignorePlaceholder"> </input> </span> </th> <th align="left">'+(FB_FIX_FOR)+'</th> <th align="left">'+(FB_DATE)+"</th> </tr> </thead> <tbody>";if(C){DlgMultiListOfFixForsRow(B,0,"-- "+FB_NO_CHANGE+" --","&nbsp;")}if(Len(I)>0){DlgMultiListOfFixForsRow(B,-1,"-- "+I+" --","&nbsp;")}while(!(F.get_EOF())){if(G<=0||G==NullToZero(F.ixProject)||F.ixProject==null){var H=("");if(J){if(F.ixProject==null){H=(UnicodeClean(FB_ALL_PROJECTS)+": ")}else{H=(UnicodeClean((F.sProject))+": ")}}var A=(UnicodeClean((F.sFixFor)));var D=(DlgMultiListOfFixForsDate(F));if(Len(D)==0){D=("&nbsp;")}DlgMultiListOfFixForsRow(B,(F.ixFixFor),H+A,D)}F.MoveNext()}CloseRS(F);_g[_g.length]="</tbody>";EditableTableBodyEnd();_g[_g.length]="</span>"}function DlgMultiListOfFixForsRow(D,C,A,E){var B=("ixMultiFixFor"+C);_g[_g.length]="\n <tr "+(ZebraClass())+'> <td> <input type="checkbox" name="ixMultiFixFor" value="'+(C)+'" '+(CheckedIfContains(D,CStr(C)))+' id="'+(B)+'" /> </td> <td> <label for="'+(B)+'"> \n'+(A)+'\n </label> </td> <td> <label for="'+(B)+'"> \n'+(E)+"\n </label> </td> </tr> \n"}function DlgListOfPriorities(E,A,D,G,C,B,F){if(F==_u){F=""}_g[_g.length]='<select name="ixPriority" id="ixPriority" table="Priority" size="1" class="'+(G)+'" fDeferDrop="1" ';_g[_g.length]=(F);if(C>-1){_g[_g.length]=' style="width:'+(C)+'px"'}if(B!=""){_g[_g.length]=' onchange="'+(B)+'" '}_g[_g.length]=">";if(D){_g[_g.length]='<option value="0">-- '+(FB_NO_CHANGE)+" --</option>"}if(Len(A)>0){_g[_g.length]='<option value="-1">-- '+(A)+" --</option>"}ListPriorityOptions(E);_g[_g.length]="</select><script>DLCL();<\/script>"}function ListPriorityOptions(B){var A=new RecordSet(DB.Priority);while(!(A.get_EOF())){_g[_g.length]="<option "+(SelectedIfSame(B,CStr((A.ixPriority))))+' value="'+((A.ixPriority))+'"> '+(UnicodeClean(CStr((A.ixPriority))))+" - "+(UnicodeClean((A.sPriority)))+" </option>";A.MoveNext()}}function DlgListOfHours(E,F,A,G,I){if(I==_u){I=false}_g[_g.length]='\n <select name="'+(F)+'"\nsize="1"\nonkeydown="return handleListOfHoursKeydown(this, event)"\nclass="filter '+(sIif(I,"","nodroplist"))+'"\nstyle="width:100px; border: 1px solid black;" id="'+(F)+'"\nonclick="'+(G)+'"> \n';var J=(A);var C=(0);var D;var B;var H=(Year(UTCNow())+"-"+Right("0"+Month(UTCNow()),2)+"-"+Right("0"+Day(UTCNow()),2));for(D=1;D<=48;D++){if(J==0){B=("12")}else{if(J>12){B=CStr(J-12)}else{B=CStr(J)}}B=(B+":"+Right("0"+C,2)+" ");if(J>11){B=(B+"PM")}else{B=(B+"AM")}_g[_g.length]="<option "+(SelectedIfTrue(E==J+(C/60)))+' value="'+(B)+'">'+(B)+"</option>";if(C==0){C=(30)}else{J=(J+1);C=(0)}if(J>23){J=(0)}}_g[_g.length]='\n </select><script>DLCL();<\/script> <script language="JavaScript" type="text/javascript"> <!--\ntheMgr.addNoHide(\''+(F)+"');\n//--> <\/script> \n"}function StartKBGridSpan(){_g[_g.length]='<a id="browseGrid" onclick="return KeyManager.browseGridRows();"><img alt="" src="'+(StaticContentUrl("images/spacer.gif"))+'" /></a><span id="dlgGrid">'}function EndKBGridSpan(){_g[_g.length]="\n </span> \n"}function SliderChunkContents(A){_g[_g.length]='<img src="'+(StaticContentUrl("images/slider"+sIif(A,"At","Spacer")+".gif"))+'" border="0" style="border:0px;" />'}function SliderBackgroundImage(A){var B;B=("url('"+StaticContentUrl("images/slider"+sIif(A,"Full","Empty")+".gif")+"')");return B}function EditableAttachmentPane(D,B,F,C,A){if(A==_u){A=-1}var E="formWithAttachments";if(Len(CStr(A))>0){E=(E+"_"+CStr(A))}_g[_g.length]='<form name="'+(E)+'"><p class="headline">'+(FB_DELETE_FILE_CONFIRM)+"</p><p>"+(Swap1(FB_SURE_DELETE,'<span id="sToDelete">'+B+"</span>"))+"</p>";if(-1!=A){_g[_g.length]='<input type="hidden" name="ixBugEventToEdit" value="'+(NullToZero(A))+'"/>'}_g[_g.length]='<input type="hidden" name="sOwner" value="'+(C)+'"/><input type="hidden" name="ixOwner" value="'+(F)+'"/><input name="ixToDelete" type="hidden" value="'+(D)+'" /><table border="0" cellspacing="0"><tbody>';PaneButtonsYesNo("DeleteAttachment","quickDeleteAttachment(this);");_g[_g.length]="</tbody></table></form>"}function DlgBugSearchTextBox(A,C,F,E,B){if(B==_u){B=null}var D=(((B==null)?"dlgText bugEditing":B));DlgAjaxTextBox(A,C,E+' fxnConfirmLookup="AllowBugTitleSuggestions" class="'+HtmlAttributeEncode(D)+'" value="'+HtmlAttributeEncode(F)+'"',"pgBugTitleSuggestions")}function DlgAddressBookTextBox(A,C,B){if(B==_u){B=false}if(B){DlgAjaxTextBox(A,A,C+' fChunky="1" fxnValidate="IsValidNameAndEmailStrict" fEscapeInitialQuotes="1" fWriteBack="1" nShortTokenLength="50" fIgnoreInputTracking="1" fFillParentWidth="1" delimiters=";,"',"pgEmailSuggestions")}else{DlgAjaxTextBox(A,A,C+' fFillParentWidth="1" fIgnoreInputTracking="1"',"pgEmailSuggestions")}}function DlgTagTextBox(A,B){DlgAjaxTextBox(A,"sTags",B+' fChunky="1" fxnChunkDisplay="RemoveIllegalTagChars" class="dlgText bugEditing" delimiters=" ,"',"pgTagSuggestions")}function DlgChildrenTextBox(B,E,C,D){var A=('if (g_fDropListsEnabled) $("#'+B+"\").val('"+SingleQuoteForJavascript(C)+"')");DlgAjaxTextBox(B,B,D+' value="'+HtmlAttributeEncode(E)+'" fChunky="1" fxnConfirmLookup="AllowBugTitleSuggestions" fxnChunkDisplay="subcaseChunkDisplay" fIgnoreDoubleQuotes="1" class="dlgText bugEditing" delimiters=","',"pgBugTitleSuggestions",A)}function DlgChildrenTextBoxHint(){_g[_g.length]='<span id="idChildrenHint" style="display:none;"><span id="idChildrenAdd">';NewIcon("javascript:void 0;");_g[_g.length]="&nbsp;"+(InsertPropURL("["+FB_ADD_SUBCASE+"]","javascript:void 0;",'class="dotted"'))+'</span><span id="idChildrenInstructions" style="display:none;">';DlgInstructionsNoWidth(FB_ADD_SUBCASE_INSTRUCTIONS);_g[_g.length]="</span></span><script>TabManager.initChildrenHint();<\/script>"}function DlgAjaxTextBox(B,D,E,C,A){if(A==_u){A=""}_g[_g.length]='<input type="text" name="'+(D)+'" id="'+(B)+'" '+(E)+' pgSrc="'+(C)+'" /><script>';if(Len(A)>0){_g[_g.length]=(A+";")}_g[_g.length]="DropListControl.refresh(elById('"+(B)+"'));<\/script>"}if(IsEmpty(FogCreek)){var FogCreek={}}if(IsEmpty(FogCreek.Core)){FogCreek.Core={}}FogCreek.Core.Strings=function(){};FogCreek.Core.Strings.QuickSnip=function(C,B){var E;E=(Left(C,B));if(Len(C)>B){var D=(function(F,G){return(Mid(F,G,1)==" "||(G>5&&Mid(F,G-5,6)=="&nbsp;"))});var A=(Len(E));while(A>1&&!(D(E,A))){A=(A-1)}E=(Left(E,A)+"...")}return E};function sIif(A,D,C){if(C==_u){C=""}var B;if(A){B=(D)}else{B=(C)}return B}function nIif(A,D,C){var B;if(A){B=(D)}else{B=(C)}return B}function Break(){}function OurIsNumeric(A){var B;B=(false);if(IsNumeric(A)&&A!=null){var C=CLng(A);if(Err.Number!=0){return B}if(C>2147483647){return B}if(C<-2147483648){return B}B=(true)}return B}function ValidatePassword(C,B,D){var I;var H=[];var J=[];J[0]=(0);var F=(function(K){var L;if(UBound(H)<J[0]){}H[J[0]]=(K);J[0]=(J[0]+1);return L});if(C!=B){F(FB_MUST_MATCH)}if(Trim(C)!=C){F(FB_MUST_NOT_START_OR_END_WITH_WHITESPACE)}var G=((D?8:6));if(Len(C)<G){F(Swap1(FB_MUST_BE_N_CHARS_LONG,CStr(G)))}if(D){var A=(function(L){var M;var K=(new Wasabi.Runtime.RegExp());K.Global=(true);K.Pattern=(L);return(K);return M});var E=(function(L,K){var M;if(!(A(L).Test(C))){F(K)}return M});E("[A-Z]",FB_MISSING_UPPER);E("[a-z]",FB_MISSING_LOWER);E("[0-9]",FB_MISSING_NUMBER);E("[^A-Za-z0-9\\s]",FB_MISSING_SPECIAL)}if(J[0]>0){return(H)}return(null);return I}var CLASS_VISITED=("vb");var CLASS_NOT_VISITED=("uvb");var CLASS_NOT_VISITED_DISCUSS=("uvd");function GetBugLinkClass(A,B){var C;if(A!=0&&A==B){C=(CLASS_VISITED)}else{C=(CLASS_NOT_VISITED)}return C}function SerializeBool(A){var B;if(A){B=("true")}else{B=("false")}return B}function CheckOverflow(A){var B;var C=(CLng(A));B=(C>4000000000||C<-4000000000);return B}function Pluralize(B,A,C){var D;B=((CStr(B)));if(CStr(B)=="1"){D=(B+" "+A)}else{D=(B+" "+C)}return D}function IsNothingOrEmpty(A){var B;B=((A==null||A==""));return B}function CheckedIfTrue(A){var B;if(A){B=('checked="checked"')}else{B=("")}return B}function CheckedIfContains(B,C){var D;var A;for(A=LBound(B);A<=UBound(B);A++){if(C==B[A]){return('checked="checked"')}}return("");return D}function SelectedIfSame(B,A){var C;if(B==A){C=('selected="selected"')}else{C=("")}return C}function SelectedIfTrue(A){var B;if(A){B=('selected="selected"')}else{B=("")}return B}var __IntPrefix_reIntPrefix=_u;function IntPrefix(B){var D;if(OurIsNumeric(B)){return(CLng(B))}if(__IntPrefix_reIntPrefix==null){__IntPrefix_reIntPrefix=(new Wasabi.Runtime.RegExp());__IntPrefix_reIntPrefix.Pattern=("^\\s*([\\d]+)([^0-9a-zA-Z]|$)")}var C=(__IntPrefix_reIntPrefix.Execute(B));if(C.get_Count()>0){var A=(C.get_item(0).get_SubMatches().get_item(0).get_Value());if(OurIsNumeric(A)){return(CLng(A))}}return(vbInvalidInt);return D}var s_searchString_Cache=(null);function SearchString(){var A;if(s_searchString_Cache==null){if(elById("sLastSearchString")!=null){s_searchString_Cache=((elById("sLastSearchString").value))}}A=CStr(s_searchString_Cache);return A}var g_sFullName=(null);function GetFullName(){var A;A=("");if(("")!=CStr(GetPersonID())&&g_sFullName==null){g_sFullName=(GetMe().sFullName)}A=(g_sFullName);return A}var g_sEmail=(null);function GetEmail(){var A;A=("");if(("")!=CStr(GetPersonID())&&g_sEmail==null){g_sEmail=(GetMe().sEmail)}A=(g_sEmail);return A}function IsNormalUser(A){if(A==_u){A=vbInvalidInt}var C;C=(false);if(vbInvalidInt==A||A==GetPersonID()){if(IsLoggedIn()){C=(!(GetMe().fVirtual)&&!(GetMe().fCommunity))}}else{var B=(new CPerson());if(B.LoadPermissions(A)){C=(!(B.fCommunity)&&!(B.fVirtual))}}return C}function IsCommunityUser(A){if(A==_u){A=-1}var C;C=(false);if(IsCommunityOn()){if(-1==A||A==GetPersonID()){if(IsLoggedIn()){C=(GetMe().fCommunity)}}else{var B=(new CPerson());if(B.LoadPermissions(A)){C=(B.fCommunity)}}}return C}function IsVirtualUser(A){var C;C=(false);var B=(new CPerson());if(B.LoadPermissions(A)){C=(B.fVirtual)}return C}function IsAuthenticated(){var A;A=(IsAnyUser());return A}function IsAnyUser(){var A;A=(IsLoggedIn());return A}function IsVirtualLicensed(){var A;A=(true);return A}function GetPerson(A){var B;B=(s_ccc.GetPersonLinkByIxPerson(A,PERSON_LINK_TOOLTIP));return B}function GetPersonName(A){var B;B=(s_ccc.GetPersonLinkByIxPerson(A,PERSON_NO_LINK));return B}function GetPersonRawName(A){var B;B=(s_ccc.GetPersonLinkByIxPerson(A,PERSON_NAME_NO_CLEAN));return B}function GetPersonRSSURL(A,B,C,D){var E;E=(s_ccc.GetPersonLink(A,B,C,D,PERSON_RSS));return E}function GetPersonURL(A,B,C,D){var E;E=(s_ccc.GetPersonLink(A,B,C,D,PERSON_LINK_TOOLTIP));return E}function FBUrlPathEncode(A){var B;return(urlencode(A));return B}function UrlPathEncodeBroken(A){var B;B=(urlencode(A));return B}var __BugCount_sLast=_u;var __BugCount_nLast=_u;function BugCount(B){var C;if(B==__BugCount_sLast){C=(__BugCount_nLast);return C}C=(0);if(Len(B)==0){return C}if(InStr(B,",")==0){if(!(IsNumeric(B))){return C}}var A=(Split(B,","));C=(UBound(A)+1);return C}function SplitInt(D,C){if(C==_u){C=","}var F;var E=(Split(D,C));var B=[];var A;for(A=0;A<=UBound(E);A++){B[A]=(CLng(E[A]))}return(B);return F}function CanSendEmail(){var A;A=(false);if(g_config.sSMTPServer!="NONE"){A=(DB.Mailbox.select(function(B){return(GetSecurityToken().Assert(new ACLPermission(ACLSection.Project),B.ixProject,ACL_PERMISSION_WRITE))}).length>0)}return A}function DisplayIfTrue(A){var B;if(A){B=("")}else{B=("display:none")}return B}function ReplacePlaceHolders(I,B,F,A,C,E,D){var H;var G=(ExtractDisplayName(A));if(Len(G)==0){G=(A)}H=(I);H=(Replace(H,"{ticket}",B));H=(Replace(H,"{ticketurl}",GetURLPrefix()+"/default.asp?"+B));H=(Replace(H,"{url}",GetURLPrefix()));H=(Replace(H,"{case}",g_config.sCasePrefix+F));H=(Replace(H,"{sender}",A));H=(Replace(H,"{sendername}",G));H=(Replace(H,"{subject}",C));H=(Replace(H,"{fullname}",E));H=(Replace(H,"{email}",D));H=(Replace(H,"{username}",GetFullName()));H=(Replace(H,"{useremail}",GetEmail()));return H}function ExtractEmail(B){var D;D=("");var A=(new Wasabi.Runtime.RegExp());A.Global=(true);A.Pattern=('(\\(.*\\s+)?<?([^@\\s<"]+@([^\\s;,\\.]+\\.)+[^>\\s;,"]+)>?(\\)?)');var C=(A.Execute(B));if(C.get_Count()>0){D=(C.get_item(0).get_SubMatches().get_item(1).get_Value());if(Right(D,1)==")"||Right(D,1)=="]"){if(C.get_Count()>1){D=(C.get_item(1).get_SubMatches().get_item(1).get_Value());if(Right(D,1)==")"||Right(D,1)=="]"){D=("")}}else{D=("")}}}return D}var sEmailPattern=("[a-z0-9._%+-]+@(?:[a-z0-9]+(?:-[a-z0-9]*)*\\.)+[a-z]{2,6}");var sEmailWithOptionalDisplayNamePattern=('("(([^"]|\\\\")+)"\\s*)?(<'+sEmailPattern+">|"+sEmailPattern+")");var sEmailWithRequiredDisplayNamePattern=('("(([^"]|\\\\")+)"\\s*)(<'+sEmailPattern+">|"+sEmailPattern+")");function ExtractDisplayName(B){var E;var C=("");var A=(new Wasabi.Runtime.RegExp());A.IgnoreCase=(true);A.Pattern=("^"+sEmailWithRequiredDisplayNamePattern+"$");var D=(A.Execute(B));if(D.get_Count()>0){C=(D.get_item(0).get_SubMatches().get_item(1).get_Value());C=(Replace(C,"\\\\","\\"));C=(Replace(C,'\\"','"'))}return(C);return E}function ValidateEmail(B,D){var C;var A=(new Wasabi.Runtime.RegExp());A.IgnoreCase=(true);if(D){A.Pattern=("^"+sEmailWithOptionalDisplayNamePattern+"$");return(ValidateEmail(B,false)&&A.Test(B))}else{A.Pattern=("^"+sEmailPattern+"$");return(A.Test(ExtractEmail(B)))}return C}function IsValidEmail(A){var B;return(ExtractEmail(A)!="");return B}function IsValidEmailStrict(A){var B;return(ValidateEmail(A,false));return B}function IsValidNameAndEmailStrict(A){var B;return(ValidateEmail(A,true));return B}function FormatEmailAddress(B,A){var D;var C=("");if(Len(B)>0){B=(EscapeNonEscapedDisplayNameCharactersAnywhere(B))}else{B=(A)}C=('"'+B+'" <'+A+">");return(C);return D}function EscapeNonEscapedDisplayNameCharactersAnywhere(A){var B;return(EscapeNonEscapedDisplayNameChars(A));return B}function TranslateEmailIntoLinks(L,B){if(B==_u){B=""}var K;L=(UnicodeClean(L));var J=(new Wasabi.Runtime.RegExp());J.Global=(true);J.Pattern=("(([a-zA-Z0-9\\._!#%'\\/=`~\\|\\$\\*\\^\\?\\-\\+\\{\\}]+)@(([a-zA-Z0-9_\\-]+\\.)+[a-zA-Z]+))");var E=(J.Execute(L));var M=(Len(L));var C=(new Dictionary({}));var D;for(D=E.get_Count()-1;D>=0;D=D+-1){var F=(LCase(E.get_item(D).get_SubMatches().get_item(0).get_Value()));var H=(E.get_item(D).get_SubMatches().get_item(1).get_Value());var I=(E.get_item(D).get_SubMatches().get_item(2).get_Value());if(C.Items[F]==null){C.Items[F]=(F);var A=('<a href="default.asp?pg=pgList&amp;search=1&amp;searchFor='+FBUrlPathEncode(BuildAxis(FB_SEARCH_AXIS_CORRESPONDENT,H+"@"+I))+'" title="'+Swap1(FB_SHOW_CASES_FROM,F)+'" '+B+">"+H+"</a>");var G=('<br />&nbsp;&nbsp;<a href="default.asp?pg=pgList&amp;search=1&amp;searchFor='+FBUrlPathEncode(BuildAxis(FB_SEARCH_AXIS_CORRESPONDENT,I))+'" title="'+Swap1(FB_SHOW_CASES_FROM,I)+'" '+B+">"+I+"</a>")}else{A=(H);G=("<br />&nbsp;&nbsp;"+I)}M=(InStrRev(L,I,M));L=(Left(L,M-1)+Replace(L,I,G,M,1));M=(InStrRev(L,H,M));L=(Left(L,M-1)+Replace(L,H,A,M,1))}K=(L);return K}function BugLinkFromBug(D,A,B){if(B==_u){B=""}var C;C=(BugLinkWithProperties("default.asp?"+D.ixBug,D.ixBug,A,B,D.ixBugEventLatest,D.ixBugEventLastView));return C}function BugLink(D,C,A,B,E,G){if(G==_u){G=true}var F;F=(BugLinkWithProperties(D,C,A,"",B,E,G));return F}function BugLinkWithProperties(D,C,A,F,B,E,H){if(H==_u){H=true}var G;G=('<a href="'+D+'" '+sIif(H,CaseIdHoverJS(CStr(C)),"")+F+'class="'+GetBugLinkClass(B,E)+'">'+A+"</a>");return G}function CaseIdHoverJS(A){var B;B=('onmouseover="'+JsFxn(JS_MOUSEOVERCASEID)+"("+A+', this);"');return B}var g_ZebraStripe=(0);function ZebraClass(A){if(A==_u){A=""}var B;B=('class="row '+A+'"');if(((g_ZebraStripe%2)==0)){B=('class="r-a '+A+'"')}g_ZebraStripe=(g_ZebraStripe+1);return B}var g_fZebraGridStripe=(false);function ZebraGridClass(A){if(A==_u){A=""}var B;B=(((g_fZebraGridStripe?'class="g-r ':'class="g-r-a '))+A+'"');g_fZebraGridStripe=(!(g_fZebraGridStripe));return B}function DisabledIfTrue(B,A){if(A==_u){A="1"}var C;if(B){C=("disabled='"+A+"'")}else{C=("")}return C}function ClickMask(A,B){ClickMaskImpl(A,B)}function ClickMaskImpl(A,C,B){if(B==_u){B=false}var D=(false);if(B){D=(IsIE())}if(!(B)||D){_g[_g.length]='<img src="'+(StaticContentUrl("images/spacer.gif"))+'" id="'+(A)+'Img" style="'+(CSSClickMask())+'" alt="" galleryimg="no" onmousedown="'+(C)+'" />'}if(!(B)||!(D)){_g[_g.length]='<div id="'+(A)+'Div" style="'+(CSSClickMask())+'" onmousedown="'+(C)+'">&nbsp;</div>'}}function CSSClickMask(){var A;return("display:none;position:absolute;top:0px;left:0px;height:0px;width:0px;z-index:1;");return A}function InlineStyleLoadingDiv(A,B){var C;C=("position:absolute;"+StyleOpacity(0.4)+"z-index:"+B+";"+sIif(A,"","display:none;"));return C}var JS_THEMGR_HIDEALLPOPUPS=(["theMgr.hideAllPopups","a0"]);var JS_CANCEL=(["cancel","b0"]);var JS_HANDLEFILTERSAVEASKEYDOWN=(["handleFilterSaveAsKeydown","c0"]);var JS_HANDLEFILTERSAVEASCLICK=(["handleFilterSaveAsClick","d0"]);var JS_REPAIRFOCUS=(["repairFocus","e0"]);var JS_DOPOPUPCLICK=(["doPopupClick","f0"]);var JS_HANDLEFILTERCHANGEKEYDOWN=(["handleFilterChangeKeydown","g0"]);var JS_HANDLEFILTERCHANGECLICK=(["handleFilterChangeClick","h0"]);var JS_TOGGLEFILTERREFINE=(["toggleFilterRefine","i0"]);var JS_GIVETEXTBOXFOCUS=(["giveTextBoxFocus","j0"]);var JS_GRIDCONTROL_TOGGLECOLUMN=(["GridControl.toggleColumn","k0"]);var JS_ISKEY=(["isKey","l0"]);var JS_FLIPCHECKBOX=(["flipCheckbox","m0"]);var JS_KEYMANAGER_BROWSEGRIDROWS=(["KeyManager.browseGridRows","n0"]);var JS_SELECTIONMANAGER_GRIDGROUPERCLICK=(["SelectionManager.gridGrouperClick","o0"]);var JS_SELECTIONMANAGER_DOSELECTGROUP=(["SelectionManager.doSelectGroup","p0"]);var JS_MOUSEDOWNCOLHEADER=(["mousedownColHeader","q0"]);var JS_MOUSEMOVECOLHEADER=(["mousemoveColHeader","r0"]);var JS_DBLCLICKCOLHEADER=(["dblclickColHeader","s0"]);var JS_MOUSEDOWNGRIDROW=(["mousedownGridRow","u0"]);var JS_MOUSEOVERGRIDROW=(["mouseoverGridRow","v0"]);var JS_MOUSEOUTGRIDROW=(["mouseoutGridRow","w0"]);var JS_MOUSEUPGRIDROW=(["mouseupGridRow","x0"]);var JS_DBLCLICKGRIDROW=(["dblclickGridRow","y0"]);var JS_SELECTIONMANAGER_LASTCLICKFROMCHECKBOX=(["SelectionManager.lastClickFromCheckbox","z0"]);var JS_KEYPRESSGRIDCHECKBOX=(["keypressGridCheckbox","a1"]);var JS_MOUSEOVERCASEID=(["mouseoverCaseId","b1"]);var JS_MOUSEOUTCASEID=(["mouseoutCaseId","c1"]);var JS_FAVORITESICONS_REGISTER=(["FavoritesIcons.register","g1"]);var JS_FAVORITESICONS_TOGGLE=(["FavoritesIcons.toggle","h1"]);var JS_SELECTIONMANAGER_BLOCKCLICK=(["SelectionManager.blockClick","i1"]);var JS_GRIDCONTROL_ENABLECOLLINKS=(["GridControl.enableColLinks","j1"]);function JsFxn(B){var A;A=(B[1]);return A}function Max(B,A){var C;return((B>A?B:A));return C}function dblMax(B,A){var C;return((B>A?B:A));return C}function Min(B,A){var C;return((B<A?B:A));return C}function dblMin(B,A){var C;return((B<A?B:A));return C}function UploadFrame(A,B){_g[_g.length]='\n <iframe\nname="'+(A)+'"\nid="'+(A)+'" \n';if(B){_g[_g.length]='\n src="veryblank.html" \n'}_g[_g.length]='\n height="0"\nwidth="0"\nframeborder="0"\nhspace="0"\nvspace="0"\nclass="noborder"\nscrolling="no"\nmarginwidth=0\nmarginheight=0\nstyle="position:relative;overflow:hidden;"\nnoresize></iframe> \n'}function MoreResultsRow(D,C,A){if(C==_u){C=null}if(A==_u){A=true}var B;if(C==null){B=(Swap1((A?FB_MORE_RESULTS_NARROW_SEARCH:FB_MORE_RESULTS),CStr(D)))}else{B=(Swap1(InsertURL((A?FB_MORE_RESULTS_NARROW_SEARCH_URL:FB_MORE_RESULTS_URL),C),CStr(D)))}_g[_g.length]='<tr class="r-end more-results"><td align="center" colSpan="999">'+(B)+"</td></tr>"}function NoResultsRow(A){if(A==_u){A=999}_g[_g.length]='<tr class="r-end more-results"><td align="center" colSpan="'+(A)+'">'+(FB_NONE)+"</td></tr>"}function AttrIfNotBlank(A,C){var B;B=(sIif(!(IsNothingOrEmpty(C)),A+'="'+C+'" ',""));return B}function CTZFixForVersionFromUTC(A,B){var C;C=(A);if(B!=vbInvalidDate){C=(C+": "+CTZsDateForFixForFromUTC(B))}return C}function SFromHoursOrBlank(A,B){if(B==_u){B=false}var C;if(A==0||A==vbInvalidDouble){C=("")}else{C=(SFromHours(A,B))}return C}function SFromHours(B,C){if(C==_u){C=false}var E;if(B<0){B=CDbl(0)}if(CheckOverflow(B)){E=(FB_INFINITE);return E}var D=(CLng(B));var A=(CLng(Round((B-D)*60)));if(D==0&&A==0){E=("0 "+FB_HOURS)}else{if(D==0){E=(Pluralize(A,FB_MINUTE,FB_MINUTES))}else{E=(Pluralize(Round(D+A/60,2),FB_HOUR,FB_HOURS))}}return E}function GetWeekdays(){var A;A=([FB_SUNDAY,FB_MONDAY,FB_TUESDAY,FB_WEDNESDAY,FB_THURSDAY,FB_FRIDAY,FB_SATURDAY]);return A}function sDateWithDay(A){var B;B=(CTZsDateWithDayFromUTC(A));return B}function InternalsDateWithDay(A){var C;var B=(GetWeekdays());C=(B[Weekday(A)-1]+" "+InternalsDateNoTime(A));return C}function CTZsDateWithDayFromUTC(B){var C;var A=(CTZFromUTC(B));C=(InternalsDateWithDay(A));return C}function sDateDecorator(B,A){if(A==_u){A=true}var C;C=(CTZsDateDecoratorFromUTC(B,A));return C}var __InternalsDateDecorator_nDaysNow=_u;function InternalsDateDecorator(B,A){if(A==_u){A=true}var D;if(IsEmpty(__InternalsDateDecorator_nDaysNow)){__InternalsDateDecorator_nDaysNow=(daysSinceEpoch(CTZNow()))}var C=(daysSinceEpoch(B));if(__InternalsDateDecorator_nDaysNow==C){D=(FB_DATE_TODAY)}else{if(__InternalsDateDecorator_nDaysNow-1==C){D=(FB_DATE_YESTERDAY)}else{if(__InternalsDateDecorator_nDaysNow+1==C){D=(FB_DATE_TOMORROW)}else{if(__InternalsDateDecorator_nDaysNow>C&&A){D=(FB_DATE_PAST)}else{D=("")}}}}return D}function CTZsDateDecoratorFromUTC(B,A){if(A==_u){A=true}var C;C=(InternalsDateDecorator(CTZFromUTC(B),A));return C}function daysSinceEpoch(A){var B;B=CLng(A.valueOf()/(24*60*60*1000));return B}function ConvertIntToTime(D){var C;var B="AM";if(D>=12){B=("PM")}var A=(CDbl(D)-Int(D))*60;D=(Int(D));if(D==0){D=(12)}else{if(D>12){D=(D-12)}}C=(CTZsTimeFromUTC(CDate("1999-01-02 "+D+":"+Right("0"+A,2)+":00 "+B)));return C}function sDateForFixFor(A){var B;B=(CTZsDateForFixForFromUTC(A));return B}function InternalsDateForFixFor(A){var C;if(A==vbInvalidDate){C=("")}else{C=(InternalsDateRaw(A));var B=(InternalsDateDecorator(A,true));if((Len(B)>0)){C=(C+" ("+B+")")}}return C}function CTZsDateForFixForFromUTC(B){var C;var A=(CTZFromUTC(B));C=(InternalsDateForFixFor(A));return C}function YYYYMMDDHHMMSS(B,A){var C;var D=("");if(A){D=(" ")}C=(YYYYMMDD(B,A)+D+HHMMSS(B,A));return C}function YYYYMMDD(C,A){var D;var B=("");if(A){B=("-")}D=(Year(C)+B+Right("0"+Month(C),2)+B+Right("0"+Day(C),2));return D}function HHMMSS(B,A){var D;var C=("");if(A){C=(":")}D=(Right("0"+Hour(B),2)+C+Right("0"+Minute(B),2)+C+Right("0"+Second(B),2));return D}function SwapN(B,C){var D;D=(B);var A;for(A=LBound(C);A<=UBound(C);A++){D=(Replace(D,"%"+(A+1),C[A]))}return D}function InsertURL(A,B){var C;C=(Replace(Replace(A,"[",'<a href="'+B+'">',1,1),"]","</a>",1,1));return C}function InsertPropURL(B,C,A){var D;D=(Replace(Replace(B,"[",'<a href="'+C+'" '+A+">",1,1),"]","</a>",1,1));return D}var __RemoveIllegalTagChars_rgsIllegal=_u;function RemoveIllegalTagChars(B){var C;if(IsEmpty(__RemoveIllegalTagChars_rgsIllegal)){__RemoveIllegalTagChars_rgsIllegal=(['"',"*",":","(",")"])}var A;for(A=LBound(__RemoveIllegalTagChars_rgsIllegal);A<=UBound(__RemoveIllegalTagChars_rgsIllegal);A++){B=(Replace(B,__RemoveIllegalTagChars_rgsIllegal[A],""))}if(Len(B)>255){B=(Left(B,255))}return(B);return C}function TagWidget(I,G,F,C,J,H,B){if(F==_u){F=true}if(C==_u){C=false}if(J==_u){J=""}if(H==_u){H="sTags"}if(B==_u){B=-1}if(G&&!(C)&&UBound(I)<0){return }var A=((F?", ":"<br/>"));_g[_g.length]='<div class="tags">';if(G){if(UBound(I)<0&&C){_g[_g.length]=("("+FB_NONE+")")}var D;for(D=LBound(I);D<=UBound(I);D++){if(D>0){_g[_g.length]=(A)}_g[_g.length]=(TagLink(I[D],_u,_u,B))}}else{var E=('class="dlgText bugEditing" type="text" autocomplete="off" '+J);DlgTagTextBox(H,E+' value="'+HtmlAttributeEncode(JoinTags(I))+'"')}_g[_g.length]="</div>"}function TagLink(D,C,B,A){if(C==_u){C=D}if(B==_u){B=""}if(A==_u){A=-1}var F;var E;if(IsNormalUser()){E=('default.asp?pg=pgList&search=2&searchFor=tag:"'+urlencode(D)+'" '+B)}else{E=("default.asp?ixWiki="+CLng(A)+'&pg=pgSearchWiki&qWiki=tag:"'+urlencode(D)+'" '+B)}return('<a href="'+HtmlAttributeEncode(E)+'">'+UnicodeClean(C)+"</a>");return F}SubscriptionType={Bug:0,WikiPage:1,DiscussTopic:2};var g_me=(null);function GetMe(){var A;if(g_me==null){g_me=(new CPerson());g_me.LoadByIx(GetPersonID())}A=(g_me);return A}function IsVisible(A){var B;B=(Len(DB.Person.select(function(C){return(C.ixPerson==A&&(IsAdmin()||!(C.fDeleted)))}))!=0);return B}ACLPermission=function(A,B){if(B==_u){B=IsInheritedSection(A)}this.m_aclSection=(A);this.m_fInherited=(B);switch(A){case ACLSection.Project:this.sSectionName=(ACL_PROJECT_SECTION_NAME);break;case ACLSection.Group:this.sSectionName=(ACL_GROUP_SECTION_NAME);break;case ACLSection.DiscussGroup:this.sSectionName=(ACL_DISCUSS_GROUP_SECTION_NAME);break;case ACLSection.Mailbox:this.sSectionName=(ACL_MAILBOX_SECTION_NAME);break;case ACLSection.Wiki:this.sSectionName=(ACL_WIKI_SECTION_NAME);break}if(B&&!(IsInheritedSection(A))){throw new ArgumentException('The section "'+this.sSectionName+'" is not inheritable.',"sSection")}};ACLPermission.m_aclSection=_u;ACLPermission.prototype.get_Section=function(){var A;return(this.m_aclSection);return A};ACLPermission.m_fInherited=_u;ACLPermission.prototype.get_Inherited=function(){var A;return(this.m_fInherited);return A};ACLPermission.sSectionName=_u;ACLPermission.prototype.get_SectionName=function(){var A;return(this.sSectionName);return A};ACLSection={Project:0,Group:1,DiscussGroup:2,Mailbox:3,Wiki:4};function IsInheritedSection(A){var B;return(A==ACLSection.Project||A==ACLSection.Wiki||A==ACLSection.DiscussGroup);return B}CPermissionToken=function(){};CPermissionToken.sToken=_u;CPermissionToken.prototype.LoadFromString=function(A){this.sToken=(A)};CPermissionToken.prototype.Assert=function(A,D,B){var C;if(D!=-1){C=(this.InternalAssert(A,"{"+A.get_SectionName()+"|"+D+"|",B))}else{C=(this.AssertAny(A,B))}return C};CPermissionToken.prototype.AssertAny=function(A,B){var C;C=(this.InternalAssert(A,"["+A.get_SectionName()+"|",B));if(A.get_Inherited()&&!(C)&&IsInheritedSection(A.get_Section())){C=(this.InternalAssert(new ACLPermission(ACLSection.Group),"["+ACL_GROUP_SECTION_NAME+"|",ACL_PERMISSION_ADMIN))}return C};CPermissionToken.prototype.InternalAssert=function(B,F,C){var E;E=(false);if(C==ACL_PERMISSION_ADMIN&&IsAdmin()){E=(true);return E}var A=(InStr(1,this.sToken,F));if(A<1){return E}var D=(Mid(this.sToken,A+Len(F),1));E=(C<=CLng(D));return E};function SplitTagTokens(C,B,A){if(B==_u){B=" "}if(A==_u){A=false}var D;if(InStr(C,",")>0&&!(A)){B=(",")}return(SplitTokens(C,B));return D}function SplitTokens(P,C,G){if(C==_u){C=","}if(G==_u){G=false}var O;var I=(new Dictionary({}));var A;for(A=1;A<=Len(C);A++){I.Items[Mid(C,A,1)]=(true)}var M=(Len(P));var F=[];var K=(0);var J=("");var H=("");var N=("");if(M>0){H=(Mid(P,1,1))}if(M>1){N=(Mid(P,2,1))}var B=(1);var D=(-1);var L=(false);var E=(function(U,R,Q){var T;if(R>U){var S=(Mid(P,U,R-U));if(!(G)){S=(Replace(S,'""','"'))}F[Q]=([U,S]);return(true)}return(false);return T});while(B<=M){J=(H);H=(N);if(B+1<M){N=(Mid(P,B+2,1))}else{N=("")}if(!(L)&&I.Exists(J)){if(D>-1){if(E(D,B,K)){K=(K+1)}}D=(-1);B=(B+1)}else{if(!(G)&&J=='"'&&(H!='"'||(!(L)&&H=='"'&&N=='"'))){if(D>-1){if(E(D,B,K)){K=(K+1);D=(-1)}}L=(!(L));D=(B+1);B=(B+1)}else{if(D<0){D=(B)}if(!(G)&&J=='"'&&(H=='"'&&(L||N!='"'))){B=(B+1);H=(N);if(B+1<M){N=(Mid(P,B+2,1))}else{N=("")}}B=(B+1)}}}if(D>-1){if(E(D,B,K)){K=(K+1);D=(-1)}}return(F);return O}function JoinTags(E){var D;var C=[];var A;for(A=LBound(E);A<=UBound(E);A++){var B=(E[A]);if(InStr(B," ")>0||InStr(B,",")>0){C[A]=('"'+B+'"')}else{C[A]=(B)}}return(Join(C," "));return D}function BugEventAttachmentURL(A,F,E,B){var D;var C=("default.asp?pg=pgDownload&amp;pgType=pgFile&amp;ixBugEvent=%1&amp;ixAttachment=%2&amp;sFileName=%3&sTicket=%4");return(Swap4(C,CStr(A),CStr(F),FBUrlPathEncode(E),B));return D}function CategoryName(C){var B;var A=new CCategory();if(A.Load(C)){B=(A.sCategory)}return B}function CategoryPlural(C){var B;var A=new CCategory();if(A.Load(C)){B=(A.sPlural)}return B}function CategoryIconUrl(A,D,C){var B;if(A==0&&C==0){A=(1)}if(A==0){return("default.asp?pg=pgDownload&pgType=pgCategoryIcon&ixCategory="+D+"&ixAttachment="+C)}else{return(CategoryIconUrlFromType(A))}return B}function CategoryIconUrlFromIx(C){var B;var A=new CCategory();return(((A.Load(C)?CategoryIconUrl(A.nIconType,A.ixCategory,A.ixAttachmentIcon):null)));return B}function PriorityDisplayClean(B,A){var C;C=(B+" &#8211; "+UnicodeClean(A));return C}function ForEachBugEventAttachment(F,H,A){var C;for(C=LBound(F.rgrgsAttachments);C<=UBound(F.rgrgsAttachments);C++){var I=((F.rgrgsAttachments[C]));var E=(CLng(I[0]));var G=(CStr(I[1]));var D=((CLng(I[2])==1));var B=((CLng(I[3])==1));if(B){A(F,E,G,D)}else{H(F,E,G,D)}}}var g_dictStatusNames=(null);function StatusListSource(){var A;A=(new RecordSet(DB.Status.select()));return A}function InitStatusNames(){if(g_dictStatusNames==null){g_dictStatusNames=(new Dictionary({}));var C=(StatusListSource());while(!(C.get_EOF())){var B=(NullToZero(C.ixStatus));var E=(NullToBlank(C.sStatus));var A=(E);if(B>1){var D=(Split(A,"("));if(UBound(D)==0){A=(FB_CLOSED)}else{var F=(Split(D[1],")"));A=(FB_CLOSED+" ("+F[0]+")")}}g_dictStatusNames.Items[CStr(B)]=([E,A]);C.MoveNext()}CloseRS(C)}}function StatusName(A,B){var D;if(g_dictStatusNames==null){InitStatusNames()}var C=(g_dictStatusNames.Items[CStr(A)]);if(C==null){D=(FB_VARIOUS)}else{if(B){D=(C[1])}else{D=(C[0])}}return D}function GetStatus(B){var C;var A=new CStatus();return(((A.Load(B)?A:null)));return C}function IsResolvedStatus(B){var C;var A=(GetStatus(B));return(((A==null?false:A.fResolved)));return C}function AllowBugTitleSuggestions(A){var B;return(OurIsNumeric(A)||Len(A)>3);return B}function ShowAttachmentWarning(){_g[_g.length]="<p>";BugTip(FB_WARNING_HEADLINE,FB_ATTACHMENT_WARNING,false);_g[_g.length]="</p>"}CContactInfo=function(){};CContactInfo.sPersonLink=_u;CContactInfo.sPersonRSSLink=_u;CContactInfo.sPersonName=_u;CContactInfo.sPersonNameRaw=_u;CContactInfo.prototype.Load=function(A){if(!(IsNumeric(A))){return }if(A==1){this.SetAll(FB_CLOSED_PERSON);return }else{if(A==0){this.SetAll("");return }else{if(A==-1){this.SetAll(FB_FOGBUGZ_USER);return }}}var B=(this.GetRS(A));if(B.get_EOF()){this.Render(A,"","","")}else{this.Render((B.ixPerson),NullToBlank(B.sPhone),NullToBlank(B.sEmail),NullToBlank(B.sFullName))}CloseRS(B)};CContactInfo.prototype.SetAll=function(A){this.sPersonLink=(A);this.sPersonRSSLink=(A);this.sPersonName=(A);this.sPersonNameRaw=(A)};CContactInfo.prototype.GetRS=function(A){var B;B=(new RecordSet(DB.Person.select(function(C){return((C.ixPerson==A))})));return B};CContactInfo.prototype.Render=function(C,D,F,G){if(IsVisible(C)){var A=(FB_PHONE+": "+UnicodeClean(D)+" "+FB_EMAIL+": "+UnicodeClean(F));var B=(UnicodeClean(G));var E=(FB_EMAIL+": "+UnicodeClean(F));if(Len(D)>0){E=(FB_PHONE+": "+UnicodeClean(D)+", "+E)}this.sPersonLink=('<a href="default.asp?pg=pgPersonInfo&amp;ixPerson='+C+'" title="'+E+'"><fb:x>'+B+"</fb:x></a>");this.sPersonRSSLink=('<a href="'+GetURLPrefix()+"/default.asp?pg=pgPersonInfo&amp;ixPerson="+C+'" title="'+A+'">'+B+"</a>");this.sPersonNameRaw=(G);this.sPersonName=(B)}else{this.sPersonLink=(FB_USER+" "+C);this.sPersonRSSLink=(this.sPersonLink);this.sPersonName=(this.sPersonLink);this.sPersonNameRaw=(this.sPersonLink)}};CContactInfo.prototype.LinkByType=function(A){var B;switch(A){case PERSON_NO_LINK:B=(this.sPersonName);break;case PERSON_RSS:B=(this.sPersonRSSLink);break;case PERSON_LINK_TOOLTIP:B=(this.sPersonLink);break;case PERSON_NAME_NO_CLEAN:B=(this.sPersonNameRaw);break}return B};CContactCache=function(){this.dictContactInfo=(new Dictionary({}));this.fTriedAuthentication=(false);this.fAuthenticated=(false)};CContactCache.dictContactInfo=(null);CContactCache.fTriedAuthentication=_u;CContactCache.fAuthenticated=_u;CContactCache.prototype.GetPersonLink=function(B,E,F,G,D){var H;var A=(CStr(B));var C;if(!(this.dictContactInfo.Items[A]==null)){C=(this.dictContactInfo.Items[A])}else{C=(new CContactInfo());C.Render(B,E,F,G);this.dictContactInfo.Items[A]=(C)}H=(C.LinkByType(D));return H};CContactCache.prototype.GetPersonLinkByIxPerson=function(B,D){var E;var A=(CStr(B));if(!(this.fTriedAuthentication)){this.fAuthenticated=(IsAuthenticated())}this.fTriedAuthentication=(true);if(this.fAuthenticated){var C;if(!(this.dictContactInfo.Items[A]==null)){C=(this.dictContactInfo.Items[A])}else{C=(new CContactInfo());C.Load(B);this.dictContactInfo.Items[A]=(C)}E=(C.LinkByType(D))}else{E=(FB_USER)}return E};var s_ccc=(new CContactCache());var MAX_GRID_COLS=(23);function RenderTag(B,A,C){if(Len(C)==0&&InStr("|br|hr|input|img|area|base|basefont|","|"+LCase(B)+"|")>0){_g[_g.length]=(Swap2("<%1 %2/>",B,pictureOf(RenderAttributes,A)))}else{_g[_g.length]=(Swap3("<%1 %2>%3</%1>",B,pictureOf(RenderAttributes,A),Replace(C,"%","&#37;")))}}function HtmlAttributeEncode(A){var B;B=(Replace(Replace(Replace(A,"&","&amp;"),"<","&lt;"),'"',"&quot;"));return B}function StyleOpacity(A){var B;B="opacity:"+A+";filter:alpha(opacity="+(A*100)+");";return B}var PX_INDENT_BUG_OUTLINE=(35);function GetPinnedFieldDictKey(A,B){var C;return(A+"_"+B);return C}function Logit(A){};
function a0(){return theMgr.hideAllPopups.apply(theMgr,arguments);}function b0(){return cancel.apply(this,arguments);}function c0(){return handleFilterSaveAsKeydown.apply(this,arguments);}function d0(){return handleFilterSaveAsClick.apply(this,arguments);}function e0(){return repairFocus.apply(this,arguments);}function f0(){return doPopupClick.apply(this,arguments);}function g0(){return handleFilterChangeKeydown.apply(this,arguments);}function h0(){return handleFilterChangeClick.apply(this,arguments);}function i0(){return toggleFilterRefine.apply(this,arguments);}function j0(){return giveTextBoxFocus.apply(this,arguments);}function k0(){return GridControl.toggleColumn.apply(GridControl,arguments);}function l0(){return isKey.apply(this,arguments);}function m0(){return flipCheckbox.apply(this,arguments);}function n0(){return KeyManager.browseGridRows.apply(KeyManager,arguments);}function o0(){return SelectionManager.gridGrouperClick.apply(SelectionManager,arguments);}function p0(){return SelectionManager.doSelectGroup.apply(SelectionManager,arguments);}function q0(){return mousedownColHeader.apply(this,arguments);}function r0(){return mousemoveColHeader.apply(this,arguments);}function s0(){return dblclickColHeader.apply(this,arguments);}function u0(){return mousedownGridRow.apply(this,arguments);}function v0(){return mouseoverGridRow.apply(this,arguments);}function w0(){return mouseoutGridRow.apply(this,arguments);}function x0(){return mouseupGridRow.apply(this,arguments);}function y0(){return dblclickGridRow.apply(this,arguments);}function z0(){return SelectionManager.lastClickFromCheckbox.apply(SelectionManager,arguments);}function a1(){return keypressGridCheckbox.apply(this,arguments);}function b1(){return mouseoverCaseId.apply(this,arguments);}function c1(){return mouseoutCaseId.apply(this,arguments);}function g1(){return FavoritesIcons.register.apply(FavoritesIcons,arguments);}function h1(){return FavoritesIcons.toggle.apply(FavoritesIcons,arguments);}function i1(){return SelectionManager.blockClick.apply(SelectionManager,arguments);}function j1(){return GridControl.enableColLinks.apply(GridControl,arguments);}

	FB_1_CLOSED_SUBCASE = "[1 closed subcase]";

	FB_ACCEPT = "Accept";

	FB_ACTION_ALL_CHILDREN = "Also perform this action on subcases";

	FB_ACTION_ASSIGNED = "Assigned";

	FB_ACTION_BY = "%1 by %2";

	FB_ACTION_CLOSED = "Closed";

	FB_ACTION_CLOSED_TIME = "Closed Time";

	FB_ACTION_EDITED = "Edited";

	FB_ACTION_EMAILED = "Emailed";

	FB_ACTION_FORWARDED = "Forwarded";

	FB_ACTION_OPENED = "Opened";

	FB_ACTION_OPENED_TIME = "Opened Time";

	FB_ACTION_REACTIVATED = "Reactivated";

	FB_ACTION_REOPENED = "Reopened";

	FB_ACTION_REPLIED = "Replied";

	FB_ACTION_RESOLVED_ALL = "Resolved|Esolvedray|Gelöst|Resuelto|Resolvido|Résolu";

	FB_ACTION_RESOLVED = "Resolved";

	FB_ACTION_RESOLVED_TIME = "Resolved Time";

	FB_ACTIVE = "Active";

	FB_ADD = "Add";

	FB_ADD_CASE = "Add Case";

	FB_ADD_FIELDS = "Add Fields";

	FB_ADD_HEADING_COLUMN = "Additional Heading Column";

	FB_ADD_HEADING_ROW = "Additional Heading Row";

	FB_ADD_INTERVAL = "Add Interval";

	FB_ADD_RELEASE_NOTES = "Add Release Note";

	FB_ADD_REMOVE_COLUMN = "Add / Remove Columns";

	FB_ADD_SUBCASE = "Add Subcase";

	FB_ADD_SUBCASE_INSTRUCTIONS = "Enter a new subcase title.  You can also enter an existing case ID or search by typing words from existing titles.";

	FB_ADD_TAG = "Add Tag";

	FB_ADDING_COLUMN = "Adding column...";

	FB_ADMIN = "Site Admin";

	FB_ADVANCED = "Advanced";

	FB_AFTERHOURS = "Outside working hours";

	FB_ALIGN_LEFT = "Align Left";

	FB_ALIGN_RIGHT = "Align Right";

	FB_ALL = "All";

	FB_ALL_ACTIVE_STATUSES = "Active - Any Active Status";

	FB_ALL_AREAS = "All areas";

	FB_ALL_PRIORITIES = "All Priorities";

	FB_ALL_PROJECTS = "All projects";

	FB_ALL_RESOLUTIONS = "Resolved - Any Resolved Status";

	FB_ALSO_SENT = "Also sent";

	FB_ALWAYS_SHOW_FIELD = "Always show \"%1\"";

	FB_ALWAYS_SHOWN_REQUIRED = "\"%1\" is shown because it always has a value";

	FB_AND_TWO = "%1 and %2";

	FB_ANY_TIME = "Any time";

	FB_ANYBODY_NEW = "Anybody can create a normal account";

	FB_ANYBODY_NEW_COMMUNITY = "Anybody can create a community account";

	FB_AREA = "Area";

	FB_ASSIGN = "Assign";

	FB_ASSIGNED_TO = "Assigned To";

	FB_ASSIGNED_TO_PERSON = "Assigned to %1";

	FB_ATTACH_FILE = "Attach a file";

	FB_ATTACHMENT = "Attachment";

	FB_ATTACHMENT_WARNING = "Do not open attachments unless you trust the sender and were expecting them.";

	FB_AUTO_RESOLVE = "FogBugz will automatically resolve the conflict.";

	FB_BAD_RESPONSE = "An error has occurred.&nbsp; Please try again.&nbsp; If you continue to have trouble, contact your FogBugz administrator.";

	FB_BCC = "Bcc";

	FB_BLOCKQUOTE = "Blockquote";

	FB_BOLD = "Bold";

	FB_BOTH = "Both";

	FB_BUG_NO_EXIST_OR_CLOSED = "Case does not exist, or has been closed";

	FB_BULK_REPLY_PREVIEW_OUTGOING_EMAIL = "Preview Outgoing Email";

	FB_BULK_REPLY_TO_ALL = "Bulk reply to all correspondents";

	FB_BULLET_LIST = "Bullet List";

	FB_BURN_DOWN_DESCRIPTION = "The Burn Down Chart shows how the total remaining work for a milestone and the previous milestones in its project has changed over time.";

	FB_BURN_DOWN_THIS_DESCRIPTION = "The Burn Down Chart (this milestone only) shows how the remaining work within a milestone has changed over time.";

	FB_CALENDAR_FUTURE_DATE = "The due date must be in the future.  It has been reset to today.";

	FB_CALENDAR_TODAY = "Today";

	FB_CANCEL = "Cancel";

	FB_CANCELLING = "Cancelling...";

	FB_CANNOT_ADD_CASE = "Cannot add case";

	FB_CANNOT_PARSE_NUMBER = "Cannot parse number.";

	FB_CANNOT_SAVE_SEARCH = "Search results cannot be saved";

	FB_CANNOT_SAVE_WITH_CONFLICTS = "This article has unresolved conflicts.  Please resolve them and then save.";

	FB_CAPTURE_SCREENSHOTS = "[Capture Screenshots]";

	FB_CASE = "Case";

	FB_CASE_CLOSER = "Case Closer";

	FB_CASE_HAS_NO_ESTIMATE_SHORT = "Case %1 has no estimate";

	FB_CASE_OPENER = "Case Opener";

	FB_CASE_OUTLINE = "Case Outline";

	FB_CASE_RESOLVER = "Case Resolver";

	FB_CASES = "Cases";

	FB_CATEGORY = "Category";

	FB_CATEGORY_BUG = "Bug";

	FB_CATEGORY_FEATURE = "Feature";

	FB_CATEGORY_INQUIRY = "Inquiry";

	FB_CATEGORY_SCHEDULE_ITEM = "Schedule Item";

	FB_CC = "Cc";

	FB_CENTER = "Center";

	FB_CHECK_SPELLING = "Check Spelling";

	FB_CHECKINS = "Checkins";

	FB_CHOOSE_A_PERSON = "Choose a Person...";

	FB_CHOOSE_AN_AREA = "Choose an Area...";

	FB_CHOOSE_ATTACHMENT = "Choose file";

	FB_CHOOSE_PICTURE = "Choose picture";

	FB_CLICK_FOR_FULL = "Click for full-sized image";

	FB_CLICK_TO_SELECT = "Click to select case number";

	FB_CLOSE_ALL = "Close|Losecay|Schließen|Cerrar|Fechar|Fermer";

	FB_CLOSE = "Close";

	FB_CLOSE_OPEN_CHILDREN = "Also close subcases";

	FB_CLOSED_ALL = "Closed|Losedcay|Geschlossen|Cerrado|Fechado|Fermé";

	FB_CLOSED = "Closed";

	FB_CLOSED_BY = "Closed By";

	FB_CLOSED_PERSON = "CLOSED";

	FB_CODE = "Code";

	FB_COLUMNS_COUNT = "Columns";

	FB_COLUMNS_LOADING = "Loading Columns...";

	FB_COMMA_THREE = "%1, %2, and %3";

	FB_COMMUNITY = "Community";

	FB_COMMUNITY_PLURAL = "Community";

	FB_COMMUNITY_USER = "Community user";

	FB_CONFLICT_DETECTED = "Conflict Detected!";

	FB_CONTINUE_LOSE_CHANGES = "Abandon your changes and continue?";

	FB_CONTINUE_REPORTS = "Continue Reporting";

	FB_COPY_USER_ICON_TITLE = "Copy";

	FB_CORRESPONDENT = "Correspondent";

	FB_CORRESPONDENT_TIP = "Someone outside of FogBugz you may want to email.";

	FB_COULD_NOT_LOAD = "Could not load";

	FB_CREATE_NEW_CASE = "Create New Case";

	FB_CSS_TIMESHEET_EDIT_EM = "4";

	FB_CSS_TIMESHEET_END_TIME_EM = "7";

	FB_CTRL = "Ctrl";

	FB_CURRENT = "current";

	FB_CURRENT_FILTER_SAVED_AS = "Filter saved as '%1'";

	FB_DATA = "Data";

	FB_DATE = "Date";

	FB_DATE_CLOSED = "Date Closed";

	FB_DATE_CODE = "dd";

	FB_DATE_OPENED = "Date Opened";

	FB_DATE_PAST = "Past";

	FB_DATE_RESOLVED = "Date Resolved";

	FB_DATE_TODAY = "Today";

	FB_DATE_TOMORROW = "Tomorrow";

	FB_DATE_YESTERDAY = "Yesterday";

	FB_DAY = "day";

	FB_DAY_AFTER_TOMORROW = "day after tomorrow";

	FB_DAY_STEM = "day";

	FB_DAYS = "days";

	FB_DAYS_SHORT = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];

	FB_DECREASE_INDENT = "Decrease Indent";

	FB_DEFAULT_ASSIGNEE = "Default Assignee";

	FB_DEFAULT_REMOVE_FORMATTING = "Default (No Formatting)";

	FB_DEFAULT_RESOLUTION = "Default Resolution";

	FB_DEFAULT_STATUS = "Default Status";

	FB_DEFAULT_URL = "default.asp";

	FB_DELETE = "Delete";

	FB_DELETE_FILE_CONFIRM = "Delete Attached File";

	FB_DEV_DETAIL = "Per-User Timelines";

	FB_DEV_DETAIL_DESCRIPTION = "The Per-User Timeline graph shows the work breakdown for each user with cases that must be completed for this milestone.";

	FB_DEV_SHIP_DATES_DESCRIPTION = "The Per-User Completion Dates graph shows the estimated completion date for each user with cases for this milestone.";

	FB_DEVELOPER_SHIP_DATES = "Per-User Completion Dates";

	FB_DISCUSS = "Discuss";

	FB_DONE = "Done";

	FB_DRAFT_SAVED = "Draft&nbsp;saved&nbsp;at&nbsp;%1";

	FB_DUE = "Due";

	FB_DUE_HELP = "Does this case have a specific due date?";

	FB_DUPLICATES = "Duplicates";

	FB_DUPLICATES_OF = "Duplicate of";

	FB_EDIT = "Edit";

	FB_EDIT_ATTACHMENT = "Edit Attachment";

	FB_EDIT_INTERVAL = "Edit Interval";

	FB_EDIT_LINK = "Edit Link";

	FB_EDIT_PERSON = "Edit %1";

	FB_EDIT_RELEASE_NOTES = "Edit Release Note";

	FB_EDIT_RESOLVED_PARENT_APPLY_TO_CHILDREN = "Also set subcase status(es) to match the status of this case";

	FB_EDITABLE_NOT_SUPPORTED = "Editable mode is not supported in this browser";

	FB_EDITS_WILL_BE_LOST = "If you leave now, your changes will be lost.";

	FB_ELAPSED = "elapsed";

	FB_EMAIL = "Email";

	FB_EMAIL_FORWARDED_MESSAGE = "-----Forwarded Message-----";

	FB_EMAIL_ORIGINAL_MESSAGE_ALL = "-----Original Message-----|----Original Message------ay|-----Ursprüngliche Nachricht-----|-----Mensaje Original-----|-----Mensagem Original-----| -----Message Original----";

	FB_EMAIL_ORIGINAL_MESSAGE = "-----Original Message-----";

	FB_EMAIL_REQUIRED_PUBLIC = "Enter your valid email address.<br /><strong>Required</strong> if you want to track the status of this case.";

	FB_END = "End";

	FB_END_OF_CONFLICT = "End of Conflict";

	FB_END_TIME_BEFORE_START_TIME = "End time occurs before start time.";

	FB_ENTER_ESTIMATE = "Enter an Estimate";

	FB_ESTIMATE = "Estimate";

	FB_ESTIMATE_CURRENT = "Estimate (current)";

	FB_ESTIMATE_INCLUDING_SUBCASES = "Estimate (incl. subcases)";

	FB_ESTIMATE_ORIGINAL = "Estimate (original)";

	FB_ESTIMATE_THIS_CASE_ONLY = "Estimate (this case)";

	FB_ESTIMATING_TIPS = "Use days, hours, minutes, or weeks, for example <strong>1 day 4 hours</strong>";

	FB_EVENT_HISTORY = "Event History";

	FB_EXPLAIN_CATEGORY = "Is this a bug, feature request, or just a question?";

	FB_EXPLAIN_CHILDREN = "List any subcases for this case.";

	FB_EXPLAIN_FIXFOR = "For which milestone does this case need to be resolved?";

	FB_EXPLAIN_PARENT = "Is this a subcase for another parent case?";

	FB_EXPLAIN_TAGS = "Enter any words to tag, or describe, this case.";

	FB_EXTENSION_ADDED_MSG = "(extension added for security)";

	FB_FETCHING = "(Fetching)";

	FB_FILTER = "Filter";

	FB_FILTER_SWITCHGRIDVIEW = "Switch to Grid View";

	FB_FILTER_SWITCHLISTVIEW = "Switch to List View";

	FB_FILTER_TAG = "tagged %1";

	FB_FIREBUG_SLOW = "Firebug can make FogBugz slow. [Follow these instructions] to make FogBugz faster.  ([Close])";

	FB_FIRST_DAY_OF_WEEK = "0";

	FB_FIX_FOR = "Milestone";

	FB_FIXED_COLORS = "Fixed Colors";

	FB_FOGBUGZ = "FogBugz";

	FB_FOGBUGZ_USER = "FogBugz";

	FB_FONT = "Font";

	FB_FONT_COLOR = "Font Color";

	FB_FONT_SIZE = "Font Size";

	FB_FORWARD = "Forward";

	FB_FORWARD_FROM = "Fwd-From";

	FB_FRIDAY = "Friday";

	FB_FROM = "From";

	FB_FW = "Fw:";

	FB_GO_NEXT_REVISION = "Go to next revision";

	FB_GO_PREVIOUS_REVISION = "Go to previous revision";

	FB_GO_TO_LATEST = "Go to Latest";

	FB_GRAPH_DAY_FORMAT = "%w %m %d";

	FB_GRAPH_FULL_FORMAT = "%d %m %f";

	FB_GRAPH_LOADING_DATA = "Generating Report . . .";

	FB_GRAPH_MONTH_FORMAT = "%m %f";

	FB_GRAPH_NO_DATA = "No Data Available";

	FB_GRAPH_YEAR_FORMAT = "%f";

	FB_GROUP_BUGS_FIXFOR = "Milestone: %1";

	FB_HEADING = "Heading";

	FB_HIDE_CHECKINS = "Hide Checkins";

	FB_HIDE_QUOTED_TEXT = "- hide quoted text -";

	FB_HIGHLIGHT_COLOR = "Highlight Color";

	FB_HOUR = "hour";

	FB_HOUR_CODE = "hh";

	FB_HOURS = "hours";

	FB_HOURS_IN_SUBCASES = "%1 in subcases";

	FB_HOURS_THIS_CASE_AND_SUBCASES = "This case: %1. Subcases: %2.";

	FB_ICON_COPY = "Copy";

	FB_ICON_DELETE = "Delete";

	FB_ICON_EDIT = "Edit";

	FB_ICON_EMAIL = "Send Email";

	FB_ICON_MINUS = "-";

	FB_ICON_NEW = "New";

	FB_ICON_PLUS = "+";

	FB_IF_YOU_TYPE = "If you type";

	FB_INACTIVE = "Inactive";

	FB_INBOX = "Inbox";

	FB_INCREASE_INDENT = "Increase Indent";

	FB_INFINITE = "(infinite)";

	FB_INSERT_ATTACHMENT = "Insert Attachment";

	FB_INSERT_LINK = "Insert Link";

	FB_INSERT_PICTURE = "Insert Picture";

	FB_INSERT_SYMBOL = "Insert Symbol";

	FB_INSERT_TABLE = "Insert Table";

	FB_INTERVALS_CONFLICT = "The changes you have made to the timesheet create overlapping time intervals.";

	FB_INVALID_CASE = "Invalid case: %1";

	FB_ITALIC = "Italic";

	FB_ITEMS = "Items";

	FB_LANGUAGE = "en-US";

	FB_LAST_ACTIVITY = "Last Activity";

	FB_LAST_SEEN_BY_ME = "Last viewed by me";

	FB_LAST_TIME_I_VIEWED = "Last Time I Viewed";

	FB_LAST_UPDATED = "Last Updated";

	FB_LASTEDITED_BY = "Last Edited By";

	FB_LINK_EXAMPLE_1 = "Case #%1 in FogBugz";

	FB_LINK_EXAMPLE_2 = "Article with \"%1\" headline in this Wiki";

	FB_LINK_EXAMPLE_3 = "Article with \"FAQ\" headline in Wiki named \"Internal\"";

	FB_LINK_EXAMPLE_4 = "FogBugz project homepage for \"%1\"";

	FB_LINK_EXAMPLE_5 = "mailto:Email@Example.com";

	FB_LINK_EXAMPLE_6 = "Article #123 in FogBugz";

	FB_LINK_INPUT_EXAMPLE_1 = "1234";

	FB_LINK_INPUT_EXAMPLE_2 = "Contact Info";

	FB_LINK_INPUT_EXAMPLE_3 = "Internal:FAQ";

	FB_LINK_INPUT_EXAMPLE_4 = "YourProjectName";

	FB_LINK_INPUT_EXAMPLE_5 = "Email@Example.com";

	FB_LINK_INPUT_EXAMPLE_6 = "W123";

	FB_LINK_TO = "Link to";

	FB_LIST_ALL = "[List All]";

	FB_LOADING = "Loading...";

	FB_LOADING_BUG_DATA = "Loading latest bug data...";

	FB_LOADING_LIST_DATA = "Loading latest list view...";

	FB_LOGIN = "Login";

	FB_MENU_ADD_TO_DICTIONARY = "Add to Dictionary";

	FB_MENU_COPY = "Copy";

	FB_MENU_CREATE_NEW_ARTICLE = "New Article...";

	FB_MENU_CUT = "Cut";

	FB_MENU_DELETE_COLUMN = "Delete Column";

	FB_MENU_DELETE_ROW = "Delete Row";

	FB_MENU_DELETE_TABLE = "Delete Table";

	FB_MENU_EDIT = "Edit";

	FB_MENU_EDIT_OR_REMOVE_LINK = "Edit or Remove Link...";

	FB_MENU_GETTING_SUGGESTIONS = "Getting Suggestions";

	FB_MENU_IGNORE = "Ignore";

	FB_MENU_INSERT = "Insert";

	FB_MENU_INSERT_ATTACHMENT = "Attachment...";

	FB_MENU_INSERT_COL_LEFT = "Insert Column on Left";

	FB_MENU_INSERT_COL_RIGHT = "Insert Column on Right";

	FB_MENU_INSERT_COLUMN = "Column";

	FB_MENU_INSERT_HR = "Horizontal Rule";

	FB_MENU_INSERT_LINK = "Link...";

	FB_MENU_INSERT_LIST_OF_CASES = "List Of Cases...";

	FB_MENU_INSERT_PICTURE = "Picture...";

	FB_MENU_INSERT_RELEASE_NOTES = "Release Notes...";

	FB_MENU_INSERT_ROW = "Row";

	FB_MENU_INSERT_ROW_ABOVE = "Insert Row Above";

	FB_MENU_INSERT_ROW_BELOW = "Insert Row Below";

	FB_MENU_INSERT_SYMBOL = "Symbol...";

	FB_MENU_INSERT_TABLE = "Table...";

	FB_MENU_MERGE_DOWN = "Merge Down";

	FB_MENU_MERGE_LEFT = "Merge Left";

	FB_MENU_MERGE_RIGHT = "Merge Right";

	FB_MENU_MERGE_UP = "Merge Up";

	FB_MENU_PASTE = "Paste";

	FB_MENU_PASTE_WITHOUT_FORMATTING = "Paste without formatting";

	FB_MENU_PICTURE_PROPERTIES = "Picture Properties...";

	FB_MENU_REDO = "Redo";

	FB_MENU_SPLIT_HORIZ = "Split Horizontally";

	FB_MENU_SPLIT_VERT = "Split Vertically";

	FB_MENU_TABLE_PROPERTIES = "Table Properties...";

	FB_MENU_TURN_SPELLCHECKING_OFF = "Turn Spellchecking Off";

	FB_MENU_TURN_SPELLCHECKING_ON = "Turn Spellchecking On";

	FB_MENU_UNCHECK_DOCUMENT = "Remove Spellchecking";

	FB_MENU_UNDO = "Undo";

	FB_MENU_VISIT_LINK = "Open in New Window";

	FB_MINE_BEFORE_THEIRS = "Mine before theirs";

	FB_MINUTE = "minute";

	FB_MINUTE_CODE = "mm";

	FB_MINUTES = "minutes";

	FB_MISSING_COLOR_CHAR = "x";

	FB_MISSING_LOWER = "Missing a lowercase letter";

	FB_MISSING_NUMBER = "Missing a number";

	FB_MISSING_SPECIAL = "Missing a special character (@,#,$,etc.)";

	FB_MISSING_UPPER = "Missing an uppercase letter";

	FB_MONDAY = "Monday";

	FB_MONTH_CODE = "mm";

	FB_MONTH_STEM = "month";

	FB_MONTHS = ["January","February","March","April","May","June","July","August","September","October","November","December"];

	FB_MONTHS_SHORT = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];

	FB_MORE_RESULTS = "(First %1 results shown.)";

	FB_MORE_RESULTS_NARROW_SEARCH = "(First %1 results shown.  Narrow your search above.)";

	FB_MORE_RESULTS_NARROW_SEARCH_URL = "(First %1 results shown.  Narrow your search above or [click here] to show all.)";

	FB_MORE_RESULTS_URL = "(First %1 results shown. [Click here] to show all.)";

	FB_MOVING = "Moving...";

	FB_MUST_BE_N_CHARS_LONG = "Must be at least %1 characters long";

	FB_MUST_MATCH = "Must match";

	FB_MUST_NOT_START_OR_END_WITH_WHITESPACE = "Cannot begin or end with whitespace";

	FB_MY = "My";

	FB_N_CLOSED_SUBCASES = "[%1 closed subcases]";

	FB_NAME_OF_DEFAULT_AREA = "Misc";

	FB_NEW = "New";

	FB_NEW_ARTICLE_ALL = "New Article|Ew Articlenay|Neuer Artikel|Artículo Nuevo|Novo Artigo|Nouvel Article";

	FB_NEW_ARTICLE = "New Article";

	FB_NEW_BUG = "New Case";

	FB_NEW_HEADLINE = "Headline:";

	FB_NEW_NOTE = "Describe the case in detail.";

	FB_NEXT_BUG = "Next";

	FB_NEXT_BUG_TIP = "Next case";

	FB_NEXT_CONFLICT = "Scroll to Next Conflict";

	FB_NEXT_MONTH = "in the next month";

	FB_NEXT_STEM = "next";

	FB_NEXT_WEEK = "in the next week";

	FB_NEXT_YEAR = "in the next year";

	FB_NEXT2_MONTHS = "in the next two months";

	FB_NEXT2_WEEKS = "in the next two weeks";

	FB_NEXT3_DAYS = "in the next three days";

	FB_NEXT3_MONTHS = "in the next three months";

	FB_NEXT6_MONTHS = "in the next six months";

	FB_NO = "No";

	FB_NO_BUGZ_FOUND = "Nothing was found that matched.";

	FB_NO_CHANGE = "No Change";

	FB_NO_COLUMNS_WITHOUT_CASES = "No columns without cases...";

	FB_NO_DATE = "No Date";

	FB_NO_EMAIL = "No email";

	FB_NO_ESTIMATE_ENTERED = "Case %1 does not have an estimate.";

	FB_NO_ESTIMATED_CASES = "No estimated cases";

	FB_NO_INTERVALS_FOR_DATE = "No intervals were recorded for this date.";

	FB_NO_MORE_FIELDS_AVAILABLE = "No more fields available";

	FB_NO_PERMISSION = "No permission";

	FB_NO_PERMISSION_ON_BUG = "You do not have permission to see Case #%1.";

	FB_NO_RESPONSE = "No response was received.&nbsp; Please try again.";

	FB_NO_RSS_WITHOUT_SAVE = "Save this filter to enable an RSS feed";

	FB_NO_SNIPPETS_DEFINED = "You have not defined any snippets.";

	FB_NO_SUGGESTIONS = "No Suggestions";

	FB_NONE = "None";

	FB_NORMAL = "Normal";

	FB_NORMAL_PLURAL = "Normal";

	FB_NOT_CALCULATED = "Not yet calculated";

	FB_NOT_TRUSTED_FILE_TYPE = "(not a [trusted file type])";

	FB_NOW = "now";

	FB_NUMBER_LIST = "Number List";

	FB_NUMBER_OF_CASES = "%1 Selected Cases";

	FB_NUMBER_OF_OCCURRENCES = "Occurrences";

	FB_OF = "of";

	FB_OK = "OK";

	FB_ONE_LINE_DESC = "Enter a one-line description of the case.";

	FB_ONLY_ADMIN_NEW = "Only admins can create accounts";

	FB_ONLY_SHOW_FIELD_WITH_VALUE = "Only show \"%1\" when it has a value";

	FB_OPENED_BY = "Opened By";

	FB_ORIGINAL = "original";

	FB_OTHER_ELAPSED = "other";

	FB_PALETTE = "Palette";

	FB_PARAGRAPH_ALIGNMENT = "Switch Paragraph Direction";

	FB_PARAGRAPH_BODY = "Body";

	FB_PARENT_CASE = "Parent Case";

	FB_PAST_DUE = "in the past";

	FB_PAST_SHIP_DATES_DESCRIPTION = "The Completion Date (Over Time) graph shows how the projected completion date has changed over time.";

	FB_PHONE = "Phone";

	FB_PICTURE_PROPERTIES = "Picture Properties";

	FB_PLEASE_ENTER_TITLE = "Please enter a title.";

	FB_PREVIOUS_BUG_TIP = "Previous case";

	FB_PRIMARY_CONTACT = "Primary Contact";

	FB_PRIORITY = "Priority";

	FB_PROBABILITY = "Probability";

	FB_PROJECT = "Project";

	FB_PUBLIC_EMAILED = "Emailed";

	FB_PUBLIC_FORWARDED = "Forwarded";

	FB_PUBLIC_NOTIFICATION_MESSAGE = "Your inquiry has been received and can be tracked at the following URL: %1/default.asp?{ticket}";

	FB_PUBLIC_OPENED = "Opened";

	FB_PUBLIC_RECEIVED = "Received";

	FB_PUBLIC_REPLIED = "Replied";

	FB_QUOTE = "Quote";

	FB_RE = "Re:";

	FB_REACTIVATE = "Reactivate";

	FB_RECOMMENDED = "(Recommended)";

	FB_REDO = "Redo";

	FB_RELATIVE_PRIORITY = "Cases are usually fixed in order of priority, where 1 is highest.";

	FB_RELEASE_NOTES = "Release Notes";

	FB_RELEASE_NOTES_CHANGED = "Release notes changed to:";

	FB_RELEASE_NOTES_REMOVED = "Release notes removed.";

	FB_REMAIN = "remaining";

	FB_REMAINING_TIME = "Remaining Time";

	FB_REMOVE = "Remove";

	FB_REMOVE_CASE = "Remove Case";

	FB_REMOVING_COLUMN = "Removing column...";

	FB_REOPEN = "Reopen";

	FB_REPLY = "Reply";

	FB_REPLY_INCLUDE_CASE_INFO = "Include case-specific information";

	FB_REPLY_TO = "Reply-To";

	FB_REPLY_TOKEN_CASE = "the case ID";

	FB_REPLY_TOKEN_EMAIL = "the email associated with this mailbox";

	FB_REPLY_TOKEN_FULLNAME = "the fullname associated with this mailbox";

	FB_REPLY_TOKEN_SENDER = "the sender's email address";

	FB_REPLY_TOKEN_SENDERNAME = "the sender's name (extracted from sender's email address)";

	FB_REPLY_TOKEN_SUBJECT = "the subject of the message you are responding to";

	FB_REPLY_TOKEN_TICKET = "the external customer ID";

	FB_REPLY_TOKEN_TICKETURL = "a link to the external case";

	FB_REPLY_TOKEN_URL = "the URL of the FogBugz install";

	FB_REPLY_TOKEN_USEREMAIL = "the email address associated with the logged in user";

	FB_REPLY_TOKEN_USERNAME = "the fullname associated with the logged in user";

	FB_REPOSITORIES = "Repositories";

	FB_REPOSITORY = "Repository";

	FB_RESIZING = "Resizing...";

	FB_RESOLVE = "Resolve";

	FB_RESOLVE_ACTIVE_CHILDREN = "Also resolve subcases";

	FB_RESOLVE_CLOSE = "Resolve & Close";

	FB_RESOLVE_CONFLICT = "Resolve Conflict";

	FB_RESOLVE_CONFLICT_TIP = "Try each version below and watch the article change.  Click Accept to resolve the conflict.";

	FB_RESOLVE_CONFLICTS = "Resolve Conflicts";

	FB_RESOLVED_BY = "Resolved By";

	FB_RESTORE_OLD_REVISION = "Restore Old Revision";

	FB_RESTORING_REVISION = "Restoring revision %1";

	FB_ROWS_COUNT = "Rows";

	FB_RSS = "RSS";

	FB_RSS_TITLE = "RSS Feed";

	FB_SAFARI_SPELLCHECKER = "Safari users must enable Safari's spellchecker and check their document by right-clicking inside the wiki article, going to the \"Spelling and Grammar\" submenu, and choosing \"Check Document Now.\"";

	FB_SATURDAY = "Saturday";

	FB_SAVE = "Save";

	FB_SAVE_CURRENT_FILTER_AS = "Save current filter as...";

	FB_SAVE_CURRENT_SEARCH_AS = "Save this search as a filter...";

	FB_SCOUT_INFO = "Scout Info";

	FB_SCOUT_MESSAGE = "Scout Message";

	FB_SCOUT_REPORTS_NOVICE = "Set to <strong>Stop Reports</strong> to ignore further reports";

	FB_SCOUT_TITLE_NOVICE = "BugzScout reply sent to end-user when the same case is submitted";

	FB_SCOUT_WILL = "Scout Will";

	FB_SCOUT_WILL_TOOLTIP = "Do you want BugzScout to keep updating this case if it is reported again?";

	FB_SEARCH_AXIS_CORRESPONDENT_ALL = "Correspondent|Submitter|Orrespondentcay|Ubmittersay|Korrespondent|Briefpartner|Destinatario|Remitente|Correspondente|Remetente|Correspondant|Expéditeur";

	FB_SEARCH_AXIS_CORRESPONDENT = "Correspondent|Submitter";

	FB_SEARCH_USES_GRID = "Search results always show in Grid View.";

	FB_SEARCHING = "Searching...";

	FB_SECURITY_RESUBMIT = "Your request was made from an expired FogBugz page. For security reasons, please resubmit your change.";

	FB_SEE_ALSO = "See also";

	FB_SEEN_BY_ME = "Viewed by me";

	FB_SELECT_ALL = "Select All";

	FB_SELECT_COLOR = "Select Color";

	FB_SEND = "Send";

	FB_SEND_CLOSE = "Send & Close";

	FB_SETUP_CATEGORY_SCHEDULE_ITEM = "Schedule Item";

	FB_SETUP_CATEGORY_SCHEDULE_ITEMS = "Schedule Items";

	FB_SHIP_DATE = "Completed By";

	FB_SHIP_DATE_DESCRIPTION = "The Completion Date (Probability Distribution) graph shows the probability distribution of completion dates for a milestone.";

	FB_SHIP_DATE_DISTRIBUTION = "Completion Date (Probability Distribution)";

	FB_SHIP_DATE_OVER_TIME = "Completion Date (Over Time)";

	FB_SHOW = "Show";

	FB_SHOW_CASES_FROM = "Show cases from '%1'";

	FB_SHOW_QUOTED_TEXT = "- show quoted text -";

	FB_SHOWING = "Showing";

	FB_SNIPPET_NAME_WARNING = "'%1' is not a known snippet; type '%2' again to list them all.";

	FB_SORTING = "Sorting...";

	FB_SPAM = "Spam";

	FB_SPELLCHECKER_COMPLETE = "Spellcheck complete!";

	FB_SPELLCHECKER_DISABLED = "The spellchecker dictionary is still being imported and will be done shortly.";

	FB_SPELLCHECKER_IN_PROGRESS = "Spellchecking...";

	FB_SPELLCHECKER_LOWERCASE_ALPHABET = "abcdefghijklmnopqrstuvwxyz";

	FB_SPELLCHECKER_NO_DICTIONARY = "Unable to check spelling.  No dictionary is configured for this Wiki.";

	FB_STARRED = "Starred";

	FB_START = "Start";

	FB_START_PASTE_WOF = "Use the hotkey Ctrl+V (Paste) now to paste without formatting.";

	FB_STATUS = "Status";

	FB_STILL_GO_TO_PAGE = "Go to page and lose unsaved changes?";

	FB_STOP_REPORTS = "Stop Reports";

	FB_STOP_WORK = "Stop Work";

	FB_STRIKETHROUGH = "Strikethrough";

	FB_STYLE = "Style";

	FB_SUBCASES = "Subcases";

	FB_SUBJECT = "Subject";

	FB_SUBMITTING = "Submitting...";

	FB_SUBSCRIBE = "[Subscribe] to receive email when this case changes.";

	FB_SUBSCRIBE_DISCUSSTOPIC = "[Subscribe] to receive email when someone replies to this discussion topic.";

	FB_SUBSCRIBE_PLURAL = "[Subscribe] to receive email when any of these cases change.";

	FB_SUBSCRIBE_TERSE = "[Subscribe]";

	FB_SUBSCRIBE_WIKIPAGE = "[Subscribe] to receive email when this article changes.";

	FB_SUBSCRIPT = "Subscript";

	FB_SUNDAY = "Sunday";

	FB_SUPERSCRIPT = "Superscript";

	FB_SURE_DELETE = "Are you sure you want to delete <b>%1</b>?";

	FB_SWITCH_TO_GRID_FOR_COLUMNS = "No columns in list view...";

	FB_TABLE_PROPERTIES = "Table Properties";

	FB_TAG = "Tag";

	FB_TAGS = "Tags";

	FB_TEMPLATE_CONFLICT = "This template has been edited by someone else, and your changes conflict with the newest version.  Please resolve all conflicts before you continue.  Your changes have NOT yet been saved.";

	FB_THE_DAY_AFTER_TOMORROW = "the day after tomorrow";

	FB_THEIRS_BEFORE_MINE = "Theirs before mine";

	FB_THURSDAY = "Thursday";

	FB_TIMESHEET_ELAPSED = "timesheet";

	FB_TIPS = "Tips";

	FB_TITLE = "Title";

	FB_TITLE_COMMENT = "Title w/ Comment";

	FB_TITLE_ELAPSED = "Elapsed Time";

	FB_TITLE_EVENT = "Title w/ Event";

	FB_TO = "To";

	FB_TODAY_ALL = "today|odaytay|heute|hoy|hoje|aujourd'hui";

	FB_TODAY = "today";

	FB_TODAY_OR_TOMORROW = "today or tomorrow";

	FB_TOMORROW_ALL = "tomorrow|omorrowtay|morgen|mañana|amanhã|demain";

	FB_TOMORROW = "tomorrow";

	FB_TOTAL = "Total";

	FB_TUESDAY = "Tuesday";

	FB_UNABLE_TO_CREATE_CASE = "Unable to create case";

	FB_UNDELETE = "Undelete";

	FB_UNDERLINE = "Underline";

	FB_UNDO = "Undo";

	FB_UNSAVED_WYS_CHANGES = "You have unsaved changes.  Use the save icon in the upper left of the editor to save your work.";

	FB_UNSUBSCRIBE = "[Unsubscribe]";

	FB_UPDATING = "Updating...";

	FB_USE = "Use";

	FB_USER = "User";

	FB_USER_ACTIVE = "Active";

	FB_USER_INACTIVE = "Inactive";

	FB_USERS = "Users";

	FB_USERS_ACTIVE = "Active %1 Users";

	FB_USERS_ALL = "All %1 Users";

	FB_USERS_COMMUNITY_VIRTUAL = "Community and Virtual";

	FB_USERS_INACTIVE = "Inactive %1 Users";

	FB_USERS_NORMAL_COMMUNITY = "Normal and Community";

	FB_USERS_NORMAL_COMMUNITY_VIRTUAL = "Normal, Community, and Virtual";

	FB_USERS_NORMAL_VIRTUAL = "Normal and Virtual";

	FB_VARIOUS = "[various]";

	FB_VERSION = "Version";

	FB_VIEW_CASES = "View Cases";

	FB_VIRTUAL = "Virtual";

	FB_VIRTUAL_PLURAL = "Virtual";

	FB_VIRTUAL_USER = "Virtual user";

	FB_WARNING_HEADLINE = "Warning";

	FB_WE_LINK_TO = "We'll link to";

	FB_WEDNESDAY = "Wednesday";

	FB_WEEK_STEM = "week";

	FB_WHO_ASSIGNED_TO = "Who's going to work on this case?";

	FB_WIDTH = "Width";

	FB_WIKI_CHANGES_HAVE_BEEN_MERGED = "Changes to this article have been made by others and are merged below.";

	FB_WIKI_LINK_TEASER = "You can link to other wiki pages, cases, project homepages, and [more].";

	FB_WIKIPAGE_CONFLICT = "This article has been edited by someone else, and your changes conflict with the newest version.  You must resolve all conflicts before you can continue.  Your changes have NOT yet been saved.  Click on the red exclamation points to resolve each conflict, and then save your work.";

	FB_WIKIPAGES_LINKING_TO = "Articles linking to %1";

	FB_WORK_ON_CASE_NUMBER = "Case # ...";

	FB_WORK_ON_SCHEDULE_ITEM = "Work on a Schedule Item";

	FB_WYS_CUT_COPY_PASTE = "Please use the hotkeys %1+X (Cut), %1+C (Copy), and %1+V (Paste) instead.";

	FB_WYS_TABLE_LIMIT = "Table sizes are limited to %1 rows and %2 columns.";

	FB_YEAR_CODE = "yyyy";

	FB_YEAR_STEM = "year";

	FB_YES = "Yes";

	FB_YESTERDAY_ALL = "yesterday|yesterdayway|gestern|ayer|ontem|hier";

	FB_YESTERDAY = "yesterday";

	FB_YOUR_EMAIL = "Your Email";



/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector)}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector)}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num]},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")"}}return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem)})),"find",selector)}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return }var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data)}}i++})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1})),"filter",selector)},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur}cur=cur.parentNode;closer++}})},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector)}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return !!selector&&this.is("."+selector)},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value}values.push(value)}}return values}return(elem.value||"").replace(/\r/g,"")}return undefined}if(typeof value==="number"){value+=""}return this.each(function(){if(this.nodeType!=1){return }if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment)}}if(scripts){jQuery.each(scripts,evalScript)}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(obj){return toString.call(obj)==="[object Function]"},isArray:function(obj){return toString.call(obj)==="[object Array]"},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument)},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data))}else{script.text=data}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return }jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0}})}if(elem.offsetWidth!==0){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,Math.round(val))}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name)}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])]}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+=""}if(!elem){return }if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}elem=jQuery.makeArray(div.childNodes)}if(elem.nodeType){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i])}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))))}fragment.appendChild(ret[i])}}return scripts}return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined}return elem[name]}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem}}}else{while((elem=second[i++])!=null){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret),name,selector)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems)}return this.pushStack(ret,name,selector)}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames)}jQuery.className[state?"add":"remove"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data))}else{if(data){q.push(data)}}}return q},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0]}if(fn!==undefined){fn.call(elem)}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx"}if(data===undefined){return jQuery.queue(this[0],type)}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,isXML(context))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false}}if(type=="first"){return true}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return }Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return }div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return }Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})()}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument)};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")"}return Sizzle.matches(expr,elems)};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r};return ;window.Sizzle=Sizzle})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(elem.setInterval&&elem!=window){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces)}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid]}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle]}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces)}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem)}})}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event)}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data)}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true)}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation()}}if(event.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments)};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler)},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler)}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src)}if(src&&src.type){this.originalEvent=src;this.type=src.type}else{this.type=src}this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return }if(e.preventDefault){e.preventDefault()}e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return }if(e.stopPropagation){e.stopPropagation()}e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode}catch(e){parent=this}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix)},teardown:function(){jQuery.event.remove(this,orig,withinElement)}}});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(fn)}return this},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn})}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false)}});return stop}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return }try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()})()}}}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem)}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return }jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none"})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params==="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}if(callback){self.each(callback,[res.responseText,status,res])}}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(isTimeout){xhr.abort()}if(s.async){xhr=null}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout")}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]}catch(e){}return false},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=window["eval"]("("+data+")")}}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type});return obj}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName]}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block"}elem.remove();elemdisplay[tagName]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]()}):this.animate(genFx("toggle",3),fn,fn2)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback)}});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){jQuery(this.elem).hide()}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit}else{fx.elem[fx.prop]=fx.now}}}});if(document.documentElement.getBoundingClientRect){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}}}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft)}return{top:top,left:left}}}jQuery.offset={initialize:function(){if(this.initialized){return }var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop]}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0}return{top:top,left:left}}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px")}})})();
jQuery.ui||(function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);C.ui={version:"1.7.2",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;for(var J in N){M.plugins[J]=M.plugins[J]||[];M.plugins[J].push([L,N[J]])}},call:function(J,L,K){var N=J.plugins[L];if(!N||!J.element[0].parentNode){return }for(var M=0;M<N.length;M++){if(J.options[N[M][0]]){N[M][1].apply(J.element,K)}}}},contains:function(K,J){return document.compareDocumentPosition?K.compareDocumentPosition(J)&16:K!==J&&K.contains(J)},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;if(M[J]>0){return true}M[J]=1;L=(M[J]>0);M[J]=0;return L},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(D){var F=C.attr,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;C.attr=function(K,J,L){var M=L!==undefined;return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))};C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))}):E.call(this,J))}}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")});return I.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var J;if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?C(document):J}});C.extend(C.expr[":"],{data:function(L,K,J){return !!C.data(L,J[3])},focusable:function(K){var L=K.nodeName.toLowerCase(),J=C.attr(K,"tabindex");return(/input|select|textarea|button|object/.test(L)?!K.disabled:"a"==L||"area"==L?K.href||!isNaN(J):!isNaN(J))&&!C(K)["area"==L?"parents":"closest"](":hidden").length},tabbable:function(K){var J=C.attr(K,"tabindex");return(isNaN(J)||J>=0)&&C(K).is(":focusable")}});function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];return(typeof P=="string"?P.split(/,?\s+/):P)}var J=K("getter");if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))}return(C.inArray(O,J)!=-1)}C.widget=function(K,J){var L=K.split(".")[0];K=K.split(".")[1];C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);if(N&&P.substring(0,1)=="_"){return this}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);return(M?M[P].apply(M,O):undefined)}return this.each(function(){var Q=C.data(this,K);(!Q&&!N&&C.data(this,K,new C[L][K](this,P))._init());(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))})};C[L]=C[L]||{};C[L][K]=function(O,N){var M=this;this.namespace=L;this.widgetName=K;this.widgetEventPrefix=C[L][K].eventPrefix||K;this.widgetBaseClass=L+"-"+K;this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);this.element=C(O).bind("setData."+K,function(Q,P,R){if(Q.target==O){return M._setData(P,R)}}).bind("getData."+K,function(Q,P){if(Q.target==O){return M._getData(P)}}).bind("remove",function(){return M.destroy()})};C[L][K].prototype=C.extend({},C.widget.prototype,J);C[L][K].getterSetter="option"};C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(L,M){var K=L,J=this;if(typeof L=="string"){if(M===undefined){return this._getData(L)}K={};K[L]=M}C.each(K,function(N,O){J._setData(N,O)})},_getData:function(J){return this.options[J]},_setData:function(J,K){this.options[J]=K;if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",K)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(L,M,N){var P=this.options[L],J=(L==this.widgetEventPrefix?L:this.widgetEventPrefix+L);M=C.Event(M);M.type=J;if(M.originalEvent){for(var K=C.event.props.length,O;K;){O=C.event.props[--K];M[O]=M.originalEvent[O]}}this.element.trigger(M,N);return !(C.isFunction(P)&&P.call(this.element[0],M,N)===false||M.isDefaultPrevented())}};C.widget.defaults={disabled:false};C.ui.mouse={_mouseInit:function(){var J=this;this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;K.stopImmediatePropagation();return false}});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(L){L.originalEvent=L.originalEvent||{};if(L.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(L));this._mouseDownEvent=L;var K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);if(!M||J||!this._mouseCapture(L)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(L)&&this._mouseDelayMet(L)){this._mouseStarted=(this._mouseStart(L)!==false);if(!this._mouseStarted){L.preventDefault();return true}}this._mouseMoveDelegate=function(N){return K._mouseMove(N)};this._mouseUpDelegate=function(N){return K._mouseUp(N)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(C.browser.safari||L.preventDefault());L.originalEvent.mouseHandled=true;return true},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)}if(this._mouseStarted){this._mouseDrag(J);return J.preventDefault()}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))}return !this._mouseStarted},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(J.target==this._mouseDownEvent.target);this._mouseStop(J)}return false},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)},_mouseDelayMet:function(J){return this.mouseDelayMet},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(B){var C=this.options;this.helper=this._createHelper(B);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:B.pageX-this.offset.left,top:B.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(B);this.originalPageX=B.pageX;this.originalPageY=B.pageY;if(C.cursorAt){this._adjustOffsetFromHelper(C.cursorAt)}if(C.containment){this._setContainment()}this._trigger("start",B);this._cacheHelperProportions();if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,B)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(B,true);return true},_mouseDrag:function(B,D){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");if(!D){var C=this._uiHash();this._trigger("drag",B,C);this.position=C.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){D=A.ui.ddmanager.drop(this,C)}if(this.dropped){D=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){B._trigger("stop",C);B._clear()})}else{this._trigger("stop",C);this._clear()}return false},_getHandle:function(B){var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==B.target){C=true}});return C},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C])):(D.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((D.appendTo=="parent"?this.element[0].parentNode:D.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(E.containment)&&E.containment.constructor!=Array){var C=A(E.containment)[0];if(!C){return }var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)+(parseInt(A(C).css("paddingLeft"),10)||0)-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)+(parseInt(A(C).css("paddingTop"),10)||0)-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-(parseInt(A(C).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-(parseInt(A(C).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(E.containment.constructor==Array){this.containment=E.containment}}},_convertPositionTo:function(E,G){if(!G){G=this.position}var C=E=="absolute"?1:-1;var D=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=(/(html|body)/i).test(B[0].tagName);return{top:(G.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(F?0:B.scrollTop()))*C)),left:(G.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:B.scrollLeft())*C))}},_generatePosition:function(E){var H=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,I=(/(html|body)/i).test(B[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var D=E.pageX;var C=E.pageY;if(this.originalPosition){if(this.containment){if(E.pageX-this.offset.click.left<this.containment[0]){D=this.containment[0]+this.offset.click.left}if(E.pageY-this.offset.click.top<this.containment[1]){C=this.containment[1]+this.offset.click.top}if(E.pageX-this.offset.click.left>this.containment[2]){D=this.containment[2]+this.offset.click.left}if(E.pageY-this.offset.click.top>this.containment[3]){C=this.containment[3]+this.offset.click.top}}if(H.grid){var G=this.originalPageY+Math.round((C-this.originalPageY)/H.grid[1])*H.grid[1];C=this.containment?(!(G-this.offset.click.top<this.containment[1]||G-this.offset.click.top>this.containment[3])?G:(!(G-this.offset.click.top<this.containment[1])?G-H.grid[1]:G+H.grid[1])):G;var F=this.originalPageX+Math.round((D-this.originalPageX)/H.grid[0])*H.grid[0];D=this.containment?(!(F-this.offset.click.left<this.containment[0]||F-this.offset.click.left>this.containment[2])?F:(!(F-this.offset.click.left<this.containment[0])?F-H.grid[0]:F+H.grid[0])):F}}return{top:(C-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(I?0:B.scrollTop())))),left:(D-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():I?0:B.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(B,C,D){D=D||this._uiHash();A.ui.plugin.call(this,B,[C,D]);if(B=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return A.widget.prototype._trigger.call(this,B,C,D)},plugins:{},_uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));A.extend(A.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});A.ui.plugin.add("draggable","connectToSortable",{start:function(C,E){var D=A(this).data("draggable"),F=D.options,B=A.extend({},E,{item:D.element});D.sortables=[];A(F.connectToSortable).each(function(){var G=A.data(this,"sortable");if(G&&!G.options.disabled){D.sortables.push({instance:G,shouldRevert:G.options.revert});G._refreshItems();G._trigger("activate",C,B)}})},stop:function(C,E){var D=A(this).data("draggable"),B=A.extend({},E,{item:D.element});A.each(D.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;D.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(C);this.instance.options.helper=this.instance.options._helper;if(D.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",C,B)}})},drag:function(C,F){var E=A(this).data("draggable"),B=this;var D=function(I){var N=this.offset.click.top,M=this.offset.click.left;var G=this.positionAbs.top,K=this.positionAbs.left;var J=I.height,L=I.width;var O=I.top,H=I.left;return A.ui.isOver(G+N,K+M,O,H,J,L)};A.each(E.sortables,function(G){this.instance.positionAbs=E.positionAbs;this.instance.helperProportions=E.helperProportions;this.instance.offset.click=E.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return F.helper[0]};C.target=this.instance.currentItem[0];this.instance._mouseCapture(C,true);this.instance._mouseStart(C,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E._trigger("toSortable",C);E.dropped=this.instance.element;E.currentItem=E.element;this.instance.fromOutside=E}if(this.instance.currentItem){this.instance._mouseDrag(C)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",C,this.instance._uiHash(this.instance));this.instance._mouseStop(C,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}E._trigger("fromSortable",C);E.dropped=false}}})}});A.ui.plugin.add("draggable","cursor",{start:function(C,D){var B=A("body"),E=A(this).data("draggable").options;if(B.css("cursor")){E._cursor=B.css("cursor")}B.css("cursor",E.cursor)},stop:function(B,C){var D=A(this).data("draggable").options;if(D._cursor){A("body").css("cursor",D._cursor)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(B,C){var D=A(this).data("draggable").options;A(D.iframeFix===true?"iframe":D.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","opacity",{start:function(C,D){var B=A(D.helper),E=A(this).data("draggable").options;if(B.css("opacity")){E._opacity=B.css("opacity")}B.css("opacity",E.opacity)},stop:function(B,C){var D=A(this).data("draggable").options;if(D._opacity){A(C.helper).css("opacity",D._opacity)}}});A.ui.plugin.add("draggable","scroll",{start:function(C,D){var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(D,E){var C=A(this).data("draggable"),F=C.options,B=false;if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if(!F.axis||F.axis!="x"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop+F.scrollSpeed}else{if(D.pageY-C.overflowOffset.top<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop-F.scrollSpeed}}}if(!F.axis||F.axis!="y"){if((C.overflowOffset.left+C.scrollParent[0].offsetWidth)-D.pageX<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft+F.scrollSpeed}else{if(D.pageX-C.overflowOffset.left<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft-F.scrollSpeed}}}}else{if(!F.axis||F.axis!="x"){if(D.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}else{if(A(window).height()-(D.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}}if(!F.axis||F.axis!="y"){if(D.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}else{if(A(window).width()-(D.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}}}if(B!==false&&A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(C,D)}}});A.ui.plugin.add("draggable","snap",{start:function(C,D){var B=A(this).data("draggable"),E=B.options;B.snapElements=[];A(E.snap.constructor!=String?(E.snap.items||":data(draggable)"):E.snap).each(function(){var G=A(this);var F=G.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:G.outerWidth(),height:G.outerHeight(),top:F.top,left:F.left})}})},drag:function(N,K){var E=A(this).data("draggable"),L=E.options;var R=L.snapTolerance;var Q=K.offset.left,P=Q+E.helperProportions.width,D=K.offset.top,C=D+E.helperProportions.height;for(var O=E.snapElements.length-1;O>=0;O--){var M=E.snapElements[O].left,J=M+E.snapElements[O].width,I=E.snapElements[O].top,T=I+E.snapElements[O].height;if(!((M-R<Q&&Q<J+R&&I-R<D&&D<T+R)||(M-R<Q&&Q<J+R&&I-R<C&&C<T+R)||(M-R<P&&P<J+R&&I-R<D&&D<T+R)||(M-R<P&&P<J+R&&I-R<C&&C<T+R))){if(E.snapElements[O].snapping){(E.options.snap.release&&E.options.snap.release.call(E.element,N,A.extend(E._uiHash(),{snapItem:E.snapElements[O].item})))}E.snapElements[O].snapping=false;continue}if(L.snapMode!="inner"){var B=Math.abs(I-C)<=R;var S=Math.abs(T-D)<=R;var G=Math.abs(M-P)<=R;var H=Math.abs(J-Q)<=R;if(B){K.position.top=E._convertPositionTo("relative",{top:I-E.helperProportions.height,left:0}).top-E.margins.top}if(S){K.position.top=E._convertPositionTo("relative",{top:T,left:0}).top-E.margins.top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:M-E.helperProportions.width}).left-E.margins.left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J}).left-E.margins.left}}var F=(B||S||G||H);if(L.snapMode!="outer"){var B=Math.abs(I-D)<=R;var S=Math.abs(T-C)<=R;var G=Math.abs(M-Q)<=R;var H=Math.abs(J-P)<=R;if(B){K.position.top=E._convertPositionTo("relative",{top:I,left:0}).top-E.margins.top}if(S){K.position.top=E._convertPositionTo("relative",{top:T-E.helperProportions.height,left:0}).top-E.margins.top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:M}).left-E.margins.left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J-E.helperProportions.width}).left-E.margins.left}}if(!E.snapElements[O].snapping&&(B||S||G||H||F)){(E.options.snap.snap&&E.options.snap.snap.call(E.element,N,A.extend(E._uiHash(),{snapItem:E.snapElements[O].item})))}E.snapElements[O].snapping=(B||S||G||H||F)}}});A.ui.plugin.add("draggable","stack",{start:function(B,C){var E=A(this).data("draggable").options;var D=A.makeArray(A(E.stack.group)).sort(function(G,F){return(parseInt(A(G).css("zIndex"),10)||E.stack.min)-(parseInt(A(F).css("zIndex"),10)||E.stack.min)});A(D).each(function(F){this.style.zIndex=E.stack.min+F});this[0].style.zIndex=E.stack.min+D.length}});A.ui.plugin.add("draggable","zIndex",{start:function(C,D){var B=A(D.helper),E=A(this).data("draggable").options;if(B.css("zIndex")){E._zIndex=B.css("zIndex")}B.css("zIndex",E.zIndex)},stop:function(B,C){var D=A(this).data("draggable").options;if(D._zIndex){A(C.helper).css("zIndex",D._zIndex)}}})})(jQuery);(function(A){A.widget("ui.droppable",{_init:function(){var C=this.options,B=C.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&A.isFunction(this.options.accept)?this.options.accept:function(D){return D.is(B)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables[this.options.scope]=A.ui.ddmanager.droppables[this.options.scope]||[];A.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var B=A.ui.ddmanager.droppables[this.options.scope];for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(B,C){if(B=="accept"){this.options.accept=C&&A.isFunction(C)?C:function(D){return D.is(C)}}else{A.widget.prototype._setData.apply(this,arguments)}},_activate:function(C){var B=A.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(B&&this._trigger("activate",C,this.ui(B)))},_deactivate:function(C){var B=A.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(B&&this._trigger("deactivate",C,this.ui(B)))},_over:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element[0],(B.currentItem||B.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",C,this.ui(B))}},_out:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element[0],(B.currentItem||B.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",C,this.ui(B))}},_drop:function(C,D){var B=D||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element[0],(B.currentItem||B.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",C,this.ui(B));return this.element}return false},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,offset:B.positionAbs}}});A.extend(A.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});A.ui.intersect=function(O,I,M){if(!I.offset){return false}var D=(O.positionAbs||O.position.absolute).left,C=D+O.helperProportions.width,L=(O.positionAbs||O.position.absolute).top,K=L+O.helperProportions.height;var F=I.offset.left,B=F+I.proportions.width,N=I.offset.top,J=N+I.proportions.height;switch(M){case"fit":return(F<D&&C<B&&N<L&&K<J);break;case"intersect":return(F<D+(O.helperProportions.width/2)&&C-(O.helperProportions.width/2)<B&&N<L+(O.helperProportions.height/2)&&K-(O.helperProportions.height/2)<J);break;case"pointer":var G=((O.positionAbs||O.position.absolute).left+(O.clickOffset||O.offset.click).left),H=((O.positionAbs||O.position.absolute).top+(O.clickOffset||O.offset.click).top),E=A.ui.isOver(H,G,N,F,I.proportions.height,I.proportions.width);return E;break;case"touch":return((L>=N&&L<=J)||(K>=N&&K<=J)||(L<N&&K>J))&&((D>=F&&D<=B)||(C>=F&&C<=B)||(D<F&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(E,G){var B=A.ui.ddmanager.droppables[E.options.scope];var F=G?G.type:null;var H=(E.currentItem||E.element).find(":data(droppable)").andSelf();droppablesLoop:for(var D=0;D<B.length;D++){if(B[D].options.disabled||(E&&!B[D].options.accept.call(B[D].element[0],(E.currentItem||E.element)))){continue}for(var C=0;C<H.length;C++){if(H[C]==B[D].element[0]){B[D].proportions.height=0;continue droppablesLoop}}B[D].visible=B[D].element.css("display")!="none";if(!B[D].visible){continue}B[D].offset=B[D].element.offset();B[D].proportions={width:B[D].element[0].offsetWidth,height:B[D].element[0].offsetHeight};if(F=="mousedown"){B[D]._activate.call(B[D],G)}}},drop:function(B,C){var D=false;A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(B,this,this.options.tolerance)){D=this._drop.call(this,C)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(B.currentItem||B.element))){this.isout=1;this.isover=0;this._deactivate.call(this,C)}});return D},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F.isover=0;F.isout=1;F._out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"_over":"_out"].call(this,C);if(F&&G=="isout"){F.isout=0;F.isover=1;F._over.call(F,C)}})}}})(jQuery);(function(C){C.widget("ui.resizable",C.extend({},C.ui.mouse,{_init:function(){var E=this,I=this.options;this.element.addClass("ui-resizable");C.extend(this,{_aspectRatio:!!(I.aspectRatio),aspectRatio:I.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:I.helper||I.ghost||I.animate?I.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&C.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(C('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=I.handles||(!C(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var J=this.handles.split(",");this.handles={};for(var F=0;F<J.length;F++){var H=C.trim(J[F]),D="ui-resizable-"+H;var G=C('<div class="ui-resizable-handle '+D+'"></div>');if(/sw|se|ne|nw/.test(H)){G.css({zIndex:++I.zIndex})}if("se"==H){G.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[H]=".ui-resizable-"+H;this.element.append(G)}}this._renderAxis=function(O){O=O||this.element;for(var L in this.handles){if(this.handles[L].constructor==String){this.handles[L]=C(this.handles[L],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var M=C(this.handles[L],this.element),N=0;N=/sw|ne|nw|se|n|s/.test(L)?M.outerHeight():M.outerWidth();var K=["padding",/ne|nw|n/.test(L)?"Top":/se|sw|s/.test(L)?"Bottom":/^e$/.test(L)?"Right":"Left"].join("");O.css(K,N);this._proportionallyResize()}if(!C(this.handles[L]).length){continue}}};this._renderAxis(this.element);this._handles=C(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!E.resizing){if(this.className){var K=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}E.axis=K&&K[1]?K[1]:"se"}});if(I.autoHide){this._handles.hide();C(this.element).addClass("ui-resizable-autohide").hover(function(){C(this).removeClass("ui-resizable-autohide");E._handles.show()},function(){if(!E.resizing){C(this).addClass("ui-resizable-autohide");E._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var D=function(F){C(F).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){D(this.element);var E=this.element;E.parent().append(this.originalElement.css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);D(this.originalElement)},_mouseCapture:function(E){var F=false;for(var D in this.handles){if(C(this.handles[D])[0]==E.target){F=true}}return this.options.disabled||!!F},_mouseStart:function(F){var I=this.options,E=this.element.position(),D=this.element;this.resizing=true;this.documentScroll={top:C(document).scrollTop(),left:C(document).scrollLeft()};if(D.is(".ui-draggable")||(/absolute/).test(D.css("position"))){D.css({position:"absolute",top:E.top,left:E.left})}if(C.browser.opera&&(/relative/).test(D.css("position"))){D.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var J=B(this.helper.css("left")),G=B(this.helper.css("top"));if(I.containment){J+=C(I.containment).scrollLeft()||0;G+=C(I.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:J,top:G};this.size=this._helper?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalSize=this._helper?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalPosition={left:J,top:G};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:F.pageX,top:F.pageY};this.aspectRatio=(typeof I.aspectRatio=="number")?I.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var H=C(".ui-resizable-"+this.axis).css("cursor");C("body").css("cursor",H=="auto"?this.axis+"-resize":H);D.addClass("ui-resizable-resizing");this._propagate("start",F);return true},_mouseDrag:function(D){var G=this.helper,F=this.options,L={},O=this,I=this.originalMousePosition,M=this.axis;var P=(D.pageX-I.left)||0,N=(D.pageY-I.top)||0;var H=this._change[M];if(!H){return false}var K=H.apply(this,[D,P,N]),J=C.browser.msie&&C.browser.version<7,E=this.sizeDiff;if(this._aspectRatio||D.shiftKey){K=this._updateRatio(K,D)}K=this._respectSize(K,D);this._propagate("resize",D);G.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(K);this._trigger("resize",D,this.ui());return false},_mouseStop:function(G){this.resizing=false;var H=this.options,L=this;if(this._helper){var F=this._proportionallyResizeElements,D=F.length&&(/textarea/i).test(F[0].nodeName),E=D&&C.ui.hasScroll(F[0],"left")?0:L.sizeDiff.height,J=D?0:L.sizeDiff.width;var M={width:(L.size.width-J),height:(L.size.height-E)},I=(parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left))||null,K=(parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top))||null;if(!H.animate){this.element.css(C.extend(M,{top:K,left:I}))}L.helper.height(L.size.height);L.helper.width(L.size.width);if(this._helper&&!H.animate){this._proportionallyResize()}}C("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",G);if(this._helper){this.helper.remove()}return false},_updateCache:function(D){var E=this.options;this.offset=this.helper.offset();if(A(D.left)){this.position.left=D.left}if(A(D.top)){this.position.top=D.top}if(A(D.height)){this.size.height=D.height}if(A(D.width)){this.size.width=D.width}},_updateRatio:function(G,F){var H=this.options,I=this.position,E=this.size,D=this.axis;if(G.height){G.width=(E.height*this.aspectRatio)}else{if(G.width){G.height=(E.width/this.aspectRatio)}}if(D=="sw"){G.left=I.left+(E.width-G.width);G.top=null}if(D=="nw"){G.top=I.top+(E.height-G.height);G.left=I.left+(E.width-G.width)}return G},_respectSize:function(K,F){var I=this.helper,H=this.options,P=this._aspectRatio||F.shiftKey,O=this.axis,R=A(K.width)&&H.maxWidth&&(H.maxWidth<K.width),L=A(K.height)&&H.maxHeight&&(H.maxHeight<K.height),G=A(K.width)&&H.minWidth&&(H.minWidth>K.width),Q=A(K.height)&&H.minHeight&&(H.minHeight>K.height);if(G){K.width=H.minWidth}if(Q){K.height=H.minHeight}if(R){K.width=H.maxWidth}if(L){K.height=H.maxHeight}var E=this.originalPosition.left+this.originalSize.width,N=this.position.top+this.size.height;var J=/sw|nw|w/.test(O),D=/nw|ne|n/.test(O);if(G&&J){K.left=E-H.minWidth}if(R&&J){K.left=E-H.maxWidth}if(Q&&D){K.top=N-H.minHeight}if(L&&D){K.top=N-H.maxHeight}var M=!K.width&&!K.height;if(M&&!K.left&&K.top){K.top=null}else{if(M&&!K.top&&K.left){K.left=null}}return K},_proportionallyResize:function(){var I=this.options;if(!this._proportionallyResizeElements.length){return }var F=this.helper||this.element;for(var E=0;E<this._proportionallyResizeElements.length;E++){var G=this._proportionallyResizeElements[E];if(!this.borderDif){var D=[G.css("borderTopWidth"),G.css("borderRightWidth"),G.css("borderBottomWidth"),G.css("borderLeftWidth")],H=[G.css("paddingTop"),G.css("paddingRight"),G.css("paddingBottom"),G.css("paddingLeft")];this.borderDif=C.map(D,function(J,L){var K=parseInt(J,10)||0,M=parseInt(H[L],10)||0;return K+M})}if(C.browser.msie&&!(!(C(F).is(":hidden")||C(F).parents(":hidden").length))){continue}G.css({height:(F.height()-this.borderDif[0]-this.borderDif[2])||0,width:(F.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var E=this.element,H=this.options;this.elementOffset=E.offset();if(this._helper){this.helper=this.helper||C('<div style="overflow:hidden;"></div>');var D=C.browser.msie&&C.browser.version<7,F=(D?1:0),G=(D?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+G,height:this.element.outerHeight()+G,position:"absolute",left:this.elementOffset.left-F+"px",top:this.elementOffset.top-F+"px",zIndex:++H.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(F,E,D){return{width:this.originalSize.width+E}},w:function(G,E,D){var I=this.options,F=this.originalSize,H=this.originalPosition;return{left:H.left+E,width:F.width-E}},n:function(G,E,D){var I=this.options,F=this.originalSize,H=this.originalPosition;return{top:H.top+D,height:F.height-D}},s:function(F,E,D){return{height:this.originalSize.height+D}},se:function(F,E,D){return C.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[F,E,D]))},sw:function(F,E,D){return C.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[F,E,D]))},ne:function(F,E,D){return C.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[F,E,D]))},nw:function(F,E,D){return C.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[F,E,D]))}},_propagate:function(E,D){C.ui.plugin.call(this,E,[D,this.ui()]);(E!="resize"&&this._trigger(E,D,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));C.extend(C.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});C.ui.plugin.add("resizable","alsoResize",{start:function(E,F){var D=C(this).data("resizable"),G=D.options;_store=function(H){C(H).each(function(){C(this).data("resizable-alsoresize",{width:parseInt(C(this).width(),10),height:parseInt(C(this).height(),10),left:parseInt(C(this).css("left"),10),top:parseInt(C(this).css("top"),10)})})};if(typeof (G.alsoResize)=="object"&&!G.alsoResize.parentNode){if(G.alsoResize.length){G.alsoResize=G.alsoResize[0];_store(G.alsoResize)}else{C.each(G.alsoResize,function(H,I){_store(H)})}}else{_store(G.alsoResize)}},resize:function(F,H){var E=C(this).data("resizable"),I=E.options,G=E.originalSize,K=E.originalPosition;var J={height:(E.size.height-G.height)||0,width:(E.size.width-G.width)||0,top:(E.position.top-K.top)||0,left:(E.position.left-K.left)||0},D=function(L,M){C(L).each(function(){var P=C(this),Q=C(this).data("resizable-alsoresize"),O={},N=M&&M.length?M:["width","height","top","left"];C.each(N||["width","height","top","left"],function(R,T){var S=(Q[T]||0)+(J[T]||0);if(S&&S>=0){O[T]=S||null}});if(/relative/.test(P.css("position"))&&C.browser.opera){E._revertToRelativePosition=true;P.css({position:"absolute",top:"auto",left:"auto"})}P.css(O)})};if(typeof (I.alsoResize)=="object"&&!I.alsoResize.nodeType){C.each(I.alsoResize,function(L,M){D(L,M)})}else{D(I.alsoResize)}},stop:function(E,F){var D=C(this).data("resizable");if(D._revertToRelativePosition&&C.browser.opera){D._revertToRelativePosition=false;el.css({position:"relative"})}C(this).removeData("resizable-alsoresize-start")}});C.ui.plugin.add("resizable","animate",{stop:function(H,M){var N=C(this).data("resizable"),I=N.options;var G=N._proportionallyResizeElements,D=G.length&&(/textarea/i).test(G[0].nodeName),E=D&&C.ui.hasScroll(G[0],"left")?0:N.sizeDiff.height,K=D?0:N.sizeDiff.width;var F={width:(N.size.width-K),height:(N.size.height-E)},J=(parseInt(N.element.css("left"),10)+(N.position.left-N.originalPosition.left))||null,L=(parseInt(N.element.css("top"),10)+(N.position.top-N.originalPosition.top))||null;N.element.animate(C.extend(F,L&&J?{top:L,left:J}:{}),{duration:I.animateDuration,easing:I.animateEasing,step:function(){var O={width:parseInt(N.element.css("width"),10),height:parseInt(N.element.css("height"),10),top:parseInt(N.element.css("top"),10),left:parseInt(N.element.css("left"),10)};if(G&&G.length){C(G[0]).css({width:O.width,height:O.height})}N._updateCache(O);N._propagate("resize",H)}})}});C.ui.plugin.add("resizable","containment",{start:function(E,O){var Q=C(this).data("resizable"),I=Q.options,K=Q.element;var F=I.containment,J=(F instanceof C)?F.get(0):(/parent/.test(F))?K.parent().get(0):F;if(!J){return }Q.containerElement=C(J);if(/document/.test(F)||F==document){Q.containerOffset={left:0,top:0};Q.containerPosition={left:0,top:0};Q.parentData={element:C(document),left:0,top:0,width:C(document).width(),height:C(document).height()||document.body.parentNode.scrollHeight}}else{var M=C(J),H=[];C(["Top","Right","Left","Bottom"]).each(function(S,R){H[S]=B(M.css("padding"+R))});Q.containerOffset=M.offset();Q.containerPosition=M.position();Q.containerSize={height:(M.innerHeight()-H[3]),width:(M.innerWidth()-H[1])};var N=Q.containerOffset,D=Q.containerSize.height,L=Q.containerSize.width,G=(C.ui.hasScroll(J,"left")?J.scrollWidth:L),P=(C.ui.hasScroll(J)?J.scrollHeight:D);Q.parentData={element:J,left:N.left,top:N.top,width:G,height:P}}},resize:function(F,O){var R=C(this).data("resizable"),H=R.options,E=R.containerSize,N=R.containerOffset,L=R.size,M=R.position,P=R._aspectRatio||F.shiftKey,D={top:0,left:0},G=R.containerElement;if(G[0]!=document&&(/static/).test(G.css("position"))){D=N}if(M.left<(R._helper?N.left:0)){R.size.width=R.size.width+(R._helper?(R.position.left-N.left):(R.position.left-D.left));if(P){R.size.height=R.size.width/H.aspectRatio}R.position.left=H.helper?N.left:0}if(M.top<(R._helper?N.top:0)){R.size.height=R.size.height+(R._helper?(R.position.top-N.top):R.position.top);if(P){R.size.width=R.size.height*H.aspectRatio}R.position.top=R._helper?N.top:0}R.offset.left=R.parentData.left+R.position.left;R.offset.top=R.parentData.top+R.position.top;var K=Math.abs((R._helper?R.offset.left-D.left:(R.offset.left-D.left))+R.sizeDiff.width),Q=Math.abs((R._helper?R.offset.top-D.top:(R.offset.top-N.top))+R.sizeDiff.height);var J=R.containerElement.get(0)==R.element.parent().get(0),I=/relative|absolute/.test(R.containerElement.css("position"));if(J&&I){K-=R.parentData.left}if(K+R.size.width>=R.parentData.width){R.size.width=R.parentData.width-K;if(P){R.size.height=R.size.width/R.aspectRatio}}if(Q+R.size.height>=R.parentData.height){R.size.height=R.parentData.height-Q;if(P){R.size.width=R.size.height*R.aspectRatio}}},stop:function(E,L){var N=C(this).data("resizable"),F=N.options,J=N.position,K=N.containerOffset,D=N.containerPosition,G=N.containerElement;var H=C(N.helper),O=H.offset(),M=H.outerWidth()-N.sizeDiff.width,I=H.outerHeight()-N.sizeDiff.height;if(N._helper&&!F.animate&&(/relative/).test(G.css("position"))){C(this).css({left:O.left-D.left-K.left,width:M,height:I})}if(N._helper&&!F.animate&&(/static/).test(G.css("position"))){C(this).css({left:O.left-D.left-K.left,width:M,height:I})}}});C.ui.plugin.add("resizable","ghost",{start:function(F,G){var D=C(this).data("resizable"),H=D.options,E=D.size;D.ghost=D.originalElement.clone();D.ghost.css({opacity:0.25,display:"block",position:"relative",height:E.height,width:E.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof H.ghost=="string"?H.ghost:"");D.ghost.appendTo(D.helper)},resize:function(E,F){var D=C(this).data("resizable"),G=D.options;if(D.ghost){D.ghost.css({position:"relative",height:D.size.height,width:D.size.width})}},stop:function(E,F){var D=C(this).data("resizable"),G=D.options;if(D.ghost&&D.helper){D.helper.get(0).removeChild(D.ghost.get(0))}}});C.ui.plugin.add("resizable","grid",{resize:function(D,L){var N=C(this).data("resizable"),G=N.options,J=N.size,H=N.originalSize,I=N.originalPosition,M=N.axis,K=G._aspectRatio||D.shiftKey;G.grid=typeof G.grid=="number"?[G.grid,G.grid]:G.grid;var F=Math.round((J.width-H.width)/(G.grid[0]||1))*(G.grid[0]||1),E=Math.round((J.height-H.height)/(G.grid[1]||1))*(G.grid[1]||1);if(/^(se|s|e)$/.test(M)){N.size.width=H.width+F;N.size.height=H.height+E}else{if(/^(ne)$/.test(M)){N.size.width=H.width+F;N.size.height=H.height+E;N.position.top=I.top-E}else{if(/^(sw)$/.test(M)){N.size.width=H.width+F;N.size.height=H.height+E;N.position.left=I.left-F}else{N.size.width=H.width+F;N.size.height=H.height+E;N.position.top=I.top-E;N.position.left=I.left-F}}}}});var B=function(D){return parseInt(D,10)||0};var A=function(D){return !isNaN(parseInt(D,10))}})(jQuery);(function(A){A.widget("ui.selectable",A.extend({},A.ui.mouse,{_init:function(){var B=this;this.element.addClass("ui-selectable");this.dragged=false;var C;this.refresh=function(){C=A(B.options.filter,B.element[0]);C.each(function(){var D=A(this);var E=D.offset();A.data(this,"selectable-item",{element:this,$element:D,left:E.left,top:E.top,right:E.left+D.outerWidth(),bottom:E.top+D.outerHeight(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})})};this.refresh();this.selectees=C.addClass("ui-selectee");this._mouseInit();this.helper=A(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(D){var B=this;this.opos=[D.pageX,D.pageY];if(this.options.disabled){return }var C=this.options;this.selectees=A(C.filter,this.element[0]);this._trigger("start",D);A(C.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:D.clientX,top:D.clientY,width:0,height:0});if(C.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var E=A.data(this,"selectable-item");E.startselected=true;if(!D.metaKey){E.$element.removeClass("ui-selected");E.selected=false;E.$element.addClass("ui-unselecting");E.unselecting=true;B._trigger("unselecting",D,{unselecting:E.element})}});A(D.target).parents().andSelf().each(function(){var E=A.data(this,"selectable-item");if(E){E.$element.removeClass("ui-unselecting").addClass("ui-selecting");E.unselecting=false;E.selecting=true;E.selected=true;B._trigger("selecting",D,{selecting:E.element});return false}})},_mouseDrag:function(I){var C=this;this.dragged=true;if(this.options.disabled){return }var E=this.options;var D=this.opos[0],H=this.opos[1],B=I.pageX,G=I.pageY;if(D>B){var F=B;B=D;D=F}if(H>G){var F=G;G=H;H=F}this.helper.css({left:D,top:H,width:B-D,height:G-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==C.element[0]){return }var K=false;if(E.tolerance=="touch"){K=(!(J.left>B||J.right<D||J.top>G||J.bottom<H))}else{if(E.tolerance=="fit"){K=(J.left>D&&J.right<B&&J.top>H&&J.bottom<G)}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;C._trigger("selecting",I,{selecting:J.element})}}else{if(J.selecting){if(I.metaKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unselecting=true}C._trigger("unselecting",I,{unselecting:J.element})}}if(J.selected){if(!I.metaKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;C._trigger("unselecting",I,{unselecting:J.element})}}}});return false},_mouseStop:function(D){var B=this;this.dragged=false;var C=this.options;A(".ui-unselecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-unselecting");E.unselecting=false;E.startselected=false;B._trigger("unselected",D,{unselected:E.element})});A(".ui-selecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-selecting").addClass("ui-selected");E.selecting=false;E.selected=true;E.startselected=true;B._trigger("selected",D,{selected:E.element})});this._trigger("stop",D);this.helper.remove();return false}}));A.extend(A.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);(function(A){A.widget("ui.sortable",A.extend({},A.ui.mouse,{_init:function(){var B=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var B=this.items.length-1;B>=0;B--){this.items[B].item.removeData("sortable-item")}},_mouseCapture:function(E,F){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(E);var D=null,C=this,B=A(E.target).parents().each(function(){if(A.data(this,"sortable-item")==C){D=A(this);return false}});if(A.data(E.target,"sortable-item")==C){D=A(E.target)}if(!D){return false}if(this.options.handle&&!F){var G=false;A(this.options.handle,D).find("*").andSelf().each(function(){if(this==E.target){G=true}});if(!G){return false}}this.currentItem=D;this._removeCurrentsFromItems();return true},_mouseStart:function(E,F,B){var G=this.options,C=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(E);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");A.extend(this.offset,{click:{left:E.pageX-this.offset.left,top:E.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(E);this.originalPageX=E.pageX;this.originalPageY=E.pageY;if(G.cursorAt){this._adjustOffsetFromHelper(G.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(G.containment){this._setContainment()}if(G.cursor){if(A("body").css("cursor")){this._storedCursor=A("body").css("cursor")}A("body").css("cursor",G.cursor)}if(G.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",G.opacity)}if(G.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",G.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",E,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!B){for(var D=this.containers.length-1;D>=0;D--){this.containers[D]._trigger("activate",E,C._uiHash(this))}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}if(A.ui.ddmanager&&!G.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,E)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(E);return true},_mouseDrag:function(F){this.position=this._generatePosition(F);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var G=this.options,B=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-F.pageY<G.scrollSensitivity){this.scrollParent[0].scrollTop=B=this.scrollParent[0].scrollTop+G.scrollSpeed}else{if(F.pageY-this.overflowOffset.top<G.scrollSensitivity){this.scrollParent[0].scrollTop=B=this.scrollParent[0].scrollTop-G.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-F.pageX<G.scrollSensitivity){this.scrollParent[0].scrollLeft=B=this.scrollParent[0].scrollLeft+G.scrollSpeed}else{if(F.pageX-this.overflowOffset.left<G.scrollSensitivity){this.scrollParent[0].scrollLeft=B=this.scrollParent[0].scrollLeft-G.scrollSpeed}}}else{if(F.pageY-A(document).scrollTop()<G.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-G.scrollSpeed)}else{if(A(window).height()-(F.pageY-A(document).scrollTop())<G.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+G.scrollSpeed)}}if(F.pageX-A(document).scrollLeft()<G.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-G.scrollSpeed)}else{if(A(window).width()-(F.pageX-A(document).scrollLeft())<G.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+G.scrollSpeed)}}}if(B!==false&&A.ui.ddmanager&&!G.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,F)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var D=this.items.length-1;D>=0;D--){var E=this.items[D],C=E.item[0],H=this._intersectsWithPointer(E);if(!H){continue}if(C!=this.currentItem[0]&&this.placeholder[H==1?"next":"prev"]()[0]!=C&&!A.ui.contains(this.placeholder[0],C)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],C):true)){this.direction=H==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(E)){this._rearrange(F,E)}else{break}this._trigger("change",F,this._uiHash());break}}this._contactContainers(F);if(A.ui.ddmanager){A.ui.ddmanager.drag(this,F)}this._trigger("sort",F,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,D){if(!C){return }if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,C)}if(this.options.revert){var B=this;var E=B.placeholder.offset();B.reverting=true;A(this.helper).animate({left:E.left-this.offset.parent.left-B.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:E.top-this.offset.parent.top-B.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){B._clear(C)})}else{this._clear(C,D)}return false},cancel:function(){var B=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var C=this.containers.length-1;C>=0;C--){this.containers[C]._trigger("deactivate",null,B._uiHash(this));if(this.containers[C].containerCache.over){this.containers[C]._trigger("out",null,B._uiHash(this));this.containers[C].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}A.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){A(this.domPosition.prev).after(this.currentItem)}else{A(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};A(B).each(function(){var E=(A(D.item||this).attr(D.attribute||"id")||"").match(D.expression||(/(.+)[-=_](.+)/));if(E){C.push((D.key||E[1]+"[]")+"="+(D.key&&D.expression?E[1]:E[2]))}});return C.join("&")},toArray:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};B.each(function(){C.push(A(D.item||this).attr(D.attribute||"id")||"")});return C},_intersectsWith:function(K){var D=this.positionAbs.left,C=D+this.helperProportions.width,J=this.positionAbs.top,I=J+this.helperProportions.height;var E=K.left,B=E+K.width,L=K.top,H=L+K.height;var M=this.offset.click.top,G=this.offset.click.left;var F=(J+M)>L&&(J+M)<H&&(D+G)>E&&(D+G)<B;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>K[this.floating?"width":"height"])){return F}else{return(E<D+(this.helperProportions.width/2)&&C-(this.helperProportions.width/2)<B&&L<J+(this.helperProportions.height/2)&&I-(this.helperProportions.height/2)<H)}},_intersectsWithPointer:function(D){var E=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,D.top,D.height),C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,D.left,D.width),G=E&&C,B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(!G){return false}return this.floating?(((F&&F=="right")||B=="down")?2:1):(B&&(B=="down"?2:1))},_intersectsWithSides:function(E){var C=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,E.top+(E.height/2),E.height),D=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,E.left+(E.width/2),E.width),B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(this.floating&&F){return((F=="right"&&D)||(F=="left"&&!D))}else{return B&&((B=="down"&&C)||(B=="up"&&!C))}},_getDragVerticalDirection:function(){var B=this.positionAbs.top-this.lastPositionAbs.top;return B!=0&&(B>0?"down":"up")},_getDragHorizontalDirection:function(){var B=this.positionAbs.left-this.lastPositionAbs.left;return B!=0&&(B>0?"right":"left")},refresh:function(B){this._refreshItems(B);this.refreshPositions()},_connectWith:function(){var B=this.options;return B.connectWith.constructor==String?[B.connectWith]:B.connectWith},_getItemsAsjQuery:function(B){var J=this;var G=[];var E=[];var H=this._connectWith();if(H&&B){for(var D=H.length-1;D>=0;D--){var I=A(H[D]);for(var C=I.length-1;C>=0;C--){var F=A.data(I[C],"sortable");if(F&&F!=this&&!F.options.disabled){E.push([A.isFunction(F.options.items)?F.options.items.call(F.element):A(F.options.items,F.element).not(".ui-sortable-helper"),F])}}}}E.push([A.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):A(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var D=E.length-1;D>=0;D--){E[D][0].each(function(){G.push(this)})}return A(G)},_removeCurrentsFromItems:function(){var D=this.currentItem.find(":data(sortable-item)");for(var C=0;C<this.items.length;C++){for(var B=0;B<D.length;B++){if(D[B]==this.items[C].item[0]){this.items.splice(C,1)}}}},_refreshItems:function(B){this.items=[];this.containers=[this];var H=this.items;var N=this;var F=[[A.isFunction(this.options.items)?this.options.items.call(this.element[0],B,{item:this.currentItem}):A(this.options.items,this.element),this]];var J=this._connectWith();if(J){for(var E=J.length-1;E>=0;E--){var K=A(J[E]);for(var D=K.length-1;D>=0;D--){var G=A.data(K[D],"sortable");if(G&&G!=this&&!G.options.disabled){F.push([A.isFunction(G.options.items)?G.options.items.call(G.element[0],B,{item:this.currentItem}):A(G.options.items,G.element),G]);this.containers.push(G)}}}}for(var E=F.length-1;E>=0;E--){var I=F[E][1];var C=F[E][0];for(var D=0,L=C.length;D<L;D++){var M=A(C[D]);M.data("sortable-item",I);H.push({item:M,instance:I,width:0,height:0,left:0,top:0})}}},refreshPositions:function(B){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var D=this.items.length-1;D>=0;D--){var E=this.items[D];if(E.instance!=this.currentContainer&&this.currentContainer&&E.item[0]!=this.currentItem[0]){continue}var C=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!B){E.width=C.outerWidth();E.height=C.outerHeight()}var F=C.offset();E.left=F.left;E.top=F.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var D=this.containers.length-1;D>=0;D--){var F=this.containers[D].element.offset();this.containers[D].containerCache.left=F.left;this.containers[D].containerCache.top=F.top;this.containers[D].containerCache.width=this.containers[D].element.outerWidth();this.containers[D].containerCache.height=this.containers[D].element.outerHeight()}}},_createPlaceholder:function(D){var B=D||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var C=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(C||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!C){F.style.visibility="hidden"}return F},update:function(F,G){if(C&&!E.forcePlaceholderSize){return }if(!G.height()){G.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10))}if(!G.width()){G.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(D){for(var C=this.containers.length-1;C>=0;C--){if(this._intersectsWith(this.containers[C].containerCache)){if(!this.containers[C].containerCache.over){if(this.currentContainer!=this.containers[C]){var H=10000;var G=null;var E=this.positionAbs[this.containers[C].floating?"left":"top"];for(var B=this.items.length-1;B>=0;B--){if(!A.ui.contains(this.containers[C].element[0],this.items[B].item[0])){continue}var F=this.items[B][this.containers[C].floating?"left":"top"];if(Math.abs(F-E)<H){H=Math.abs(F-E);G=this.items[B]}}if(!G&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[C];G?this._rearrange(D,G,null,true):this._rearrange(D,null,this.containers[C].element,true);this._trigger("change",D,this._uiHash());this.containers[C]._trigger("change",D,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[C]._trigger("over",D,this._uiHash(this));this.containers[C].containerCache.over=1}}else{if(this.containers[C].containerCache.over){this.containers[C]._trigger("out",D,this._uiHash(this));this.containers[C].containerCache.over=0}}}},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C,this.currentItem])):(D.helper=="clone"?this.currentItem.clone():this.currentItem);if(!B.parents("body").length){A(D.appendTo!="parent"?D.appendTo:this.currentItem[0].parentNode)[0].appendChild(B[0])}if(B[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(B[0].style.width==""||D.forceHelperSize){B.width(this.currentItem.width())}if(B[0].style.height==""||D.forceHelperSize){B.height(this.currentItem.height())}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.currentItem.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)+(parseInt(A(C).css("paddingLeft"),10)||0)-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)+(parseInt(A(C).css("paddingTop"),10)||0)-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-(parseInt(A(C).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-(parseInt(A(C).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(E,G){if(!G){G=this.position}var C=E=="absolute"?1:-1;var D=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=(/(html|body)/i).test(B[0].tagName);return{top:(G.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(F?0:B.scrollTop()))*C)),left:(G.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:B.scrollLeft())*C))}},_generatePosition:function(E){var H=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,I=(/(html|body)/i).test(B[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var D=E.pageX;var C=E.pageY;if(this.originalPosition){if(this.containment){if(E.pageX-this.offset.click.left<this.containment[0]){D=this.containment[0]+this.offset.click.left}if(E.pageY-this.offset.click.top<this.containment[1]){C=this.containment[1]+this.offset.click.top}if(E.pageX-this.offset.click.left>this.containment[2]){D=this.containment[2]+this.offset.click.left}if(E.pageY-this.offset.click.top>this.containment[3]){C=this.containment[3]+this.offset.click.top}}if(H.grid){var G=this.originalPageY+Math.round((C-this.originalPageY)/H.grid[1])*H.grid[1];C=this.containment?(!(G-this.offset.click.top<this.containment[1]||G-this.offset.click.top>this.containment[3])?G:(!(G-this.offset.click.top<this.containment[1])?G-H.grid[1]:G+H.grid[1])):G;var F=this.originalPageX+Math.round((D-this.originalPageX)/H.grid[0])*H.grid[0];D=this.containment?(!(F-this.offset.click.left<this.containment[0]||F-this.offset.click.left>this.containment[2])?F:(!(F-this.offset.click.left<this.containment[0])?F-H.grid[0]:F+H.grid[0])):F}}return{top:(C-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(I?0:B.scrollTop())))),left:(D-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():I?0:B.scrollLeft())))}},_rearrange:function(G,F,C,E){C?C[0].appendChild(this.placeholder[0]):F.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?F.item[0]:F.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var D=this,B=this.counter;window.setTimeout(function(){if(B==D.counter){D.refreshPositions(!E)}},0)},_clear:function(D,E){this.reverting=false;var F=[],B=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var C in this._storedCSS){if(this._storedCSS[C]=="auto"||this._storedCSS[C]=="static"){this._storedCSS[C]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!E){F.push(function(G){this._trigger("receive",G,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!E){F.push(function(G){this._trigger("update",G,this._uiHash())})}if(!A.ui.contains(this.element[0],this.currentItem[0])){if(!E){F.push(function(G){this._trigger("remove",G,this._uiHash())})}for(var C=this.containers.length-1;C>=0;C--){if(A.ui.contains(this.containers[C].element[0],this.currentItem[0])&&!E){F.push((function(G){return function(H){G._trigger("receive",H,this._uiHash(this))}}).call(this,this.containers[C]));F.push((function(G){return function(H){G._trigger("update",H,this._uiHash(this))}}).call(this,this.containers[C]))}}}for(var C=this.containers.length-1;C>=0;C--){if(!E){F.push((function(G){return function(H){G._trigger("deactivate",H,this._uiHash(this))}}).call(this,this.containers[C]))}if(this.containers[C].containerCache.over){F.push((function(G){return function(H){G._trigger("out",H,this._uiHash(this))}}).call(this,this.containers[C]));this.containers[C].containerCache.over=0}}if(this._storedCursor){A("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!E){this._trigger("beforeStop",D,this._uiHash());for(var C=0;C<F.length;C++){F[C].call(this,D)}this._trigger("stop",D,this._uiHash())}return false}if(!E){this._trigger("beforeStop",D,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!E){for(var C=0;C<F.length;C++){F[C].call(this,D)}this._trigger("stop",D,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(A.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(C){var B=C||this;return{helper:B.helper,placeholder:B.placeholder||A([]),position:B.position,absolutePosition:B.positionAbs,offset:B.positionAbs,item:B.currentItem,sender:C?C.element:null}}}));A.extend(A.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);jQuery.effects||(function(D){D.effects={version:"1.7.2",save:function(G,H){for(var F=0;F<H.length;F++){if(H[F]!==null){G.data("ec.storage."+H[F],G[0].style[H[F]])}}},restore:function(G,H){for(var F=0;F<H.length;F++){if(H[F]!==null){G.css(H[F],G.data("ec.storage."+H[F]))}}},setMode:function(F,G){if(G=="toggle"){G=F.is(":hidden")?"show":"hide"}return G},getBaseline:function(G,H){var I,F;switch(G[0]){case"top":I=0;break;case"middle":I=0.5;break;case"bottom":I=1;break;default:I=G[0]/H.height}switch(G[1]){case"left":F=0;break;case"center":F=0.5;break;case"right":F=1;break;default:F=G[1]/H.width}return{x:F,y:I}},createWrapper:function(F){if(F.parent().is(".ui-effects-wrapper")){return F.parent()}var G={width:F.outerWidth(true),height:F.outerHeight(true),"float":F.css("float")};F.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var J=F.parent();if(F.css("position")=="static"){J.css({position:"relative"});F.css({position:"relative"})}else{var I=F.css("top");if(isNaN(parseInt(I,10))){I="auto"}var H=F.css("left");if(isNaN(parseInt(H,10))){H="auto"}J.css({position:F.css("position"),top:I,left:H,zIndex:F.css("z-index")}).show();F.css({position:"relative",top:0,left:0})}J.css(G);return J},removeWrapper:function(F){if(F.parent().is(".ui-effects-wrapper")){return F.parent().replaceWith(F)}return F},setTransition:function(G,I,F,H){H=H||{};D.each(I,function(K,J){unit=G.cssUnit(J);if(unit[0]>0){H[J]=unit[0]*F+unit[1]}});return H},animateClass:function(H,I,K,J){var F=(typeof K=="function"?K:(J?J:null));var G=(typeof K=="string"?K:null);return this.each(function(){var P={};var N=D(this);var O=N.attr("style")||"";if(typeof O=="object"){O=O.cssText}if(H.toggle){N.hasClass(H.toggle)?H.remove=H.toggle:H.add=H.toggle}var L=D.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(H.add){N.addClass(H.add)}if(H.remove){N.removeClass(H.remove)}var M=D.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(H.add){N.removeClass(H.add)}if(H.remove){N.addClass(H.remove)}for(var Q in M){if(typeof M[Q]!="function"&&M[Q]&&Q.indexOf("Moz")==-1&&Q.indexOf("length")==-1&&M[Q]!=L[Q]&&(Q.match(/color/i)||(!Q.match(/color/i)&&!isNaN(parseInt(M[Q],10))))&&(L.position!="static"||(L.position=="static"&&!Q.match(/left|top|bottom|right/)))){P[Q]=M[Q]}}N.animate(P,I,G,function(){if(typeof D(this).attr("style")=="object"){D(this).attr("style")["cssText"]="";D(this).attr("style")["cssText"]=O}else{D(this).attr("style",O)}if(H.add){D(this).addClass(H.add)}if(H.remove){D(this).removeClass(H.remove)}if(F){F.apply(this,arguments)}})})}};function C(G,F){var I=G[1]&&G[1].constructor==Object?G[1]:{};if(F){I.mode=F}var H=G[1]&&G[1].constructor!=Object?G[1]:(I.duration?I.duration:G[2]);H=D.fx.off?0:typeof H==="number"?H:D.fx.speeds[H]||D.fx.speeds._default;var J=I.callback||(D.isFunction(G[1])&&G[1])||(D.isFunction(G[2])&&G[2])||(D.isFunction(G[3])&&G[3]);return[G[0],I,H,J]}D.fn.extend({_show:D.fn.show,_hide:D.fn.hide,__toggle:D.fn.toggle,_addClass:D.fn.addClass,_removeClass:D.fn.removeClass,_toggleClass:D.fn.toggleClass,effect:function(G,F,H,I){return D.effects[G]?D.effects[G].call(this,{method:G,options:F||{},duration:H,callback:I}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,C(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,C(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(D.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,C(arguments,"toggle"))}},addClass:function(G,F,I,H){return F?D.effects.animateClass.apply(this,[{add:G},F,I,H]):this._addClass(G)},removeClass:function(G,F,I,H){return F?D.effects.animateClass.apply(this,[{remove:G},F,I,H]):this._removeClass(G)},toggleClass:function(G,F,I,H){return((typeof F!=="boolean")&&F)?D.effects.animateClass.apply(this,[{toggle:G},F,I,H]):this._toggleClass(G,F)},morph:function(F,H,G,J,I){return D.effects.animateClass.apply(this,[{add:H,remove:F},G,J,I])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(F){var G=this.css(F),H=[];D.each(["em","px","%","pt"],function(I,J){if(G.indexOf(J)>0){H=[parseFloat(G),J]}});return H}});D.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(G,F){D.fx.step[F]=function(H){if(H.state==0){H.start=E(H.elem,F);H.end=B(H.end)}H.elem.style[F]="rgb("+[Math.max(Math.min(parseInt((H.pos*(H.end[0]-H.start[0]))+H.start[0],10),255),0),Math.max(Math.min(parseInt((H.pos*(H.end[1]-H.start[1]))+H.start[1],10),255),0),Math.max(Math.min(parseInt((H.pos*(H.end[2]-H.start[2]))+H.start[2],10),255),0)].join(",")+")"}});function B(G){var F;if(G&&G.constructor==Array&&G.length==3){return G}if(F=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(G)){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)]}if(F=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(G)){return[parseFloat(F[1])*2.55,parseFloat(F[2])*2.55,parseFloat(F[3])*2.55]}if(F=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(G)){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)]}if(F=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(G)){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]}if(F=/rgba\(0, 0, 0, 0\)/.exec(G)){return A.transparent}return A[D.trim(G).toLowerCase()]}function E(H,F){var G;do{G=D.curCSS(H,F);if(G!=""&&G!="transparent"||D.nodeName(H,"body")){break}F="backgroundColor"}while(H=H.parentNode);return B(G)}var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};D.easing.jswing=D.easing.swing;D.extend(D.easing,{def:"easeOutQuad",swing:function(G,H,F,J,I){return D.easing[D.easing.def](G,H,F,J,I)},easeInQuad:function(G,H,F,J,I){return J*(H/=I)*H+F},easeOutQuad:function(G,H,F,J,I){return -J*(H/=I)*(H-2)+F},easeInOutQuad:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H+F}return -J/2*((--H)*(H-2)-1)+F},easeInCubic:function(G,H,F,J,I){return J*(H/=I)*H*H+F},easeOutCubic:function(G,H,F,J,I){return J*((H=H/I-1)*H*H+1)+F},easeInOutCubic:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H*H+F}return J/2*((H-=2)*H*H+2)+F},easeInQuart:function(G,H,F,J,I){return J*(H/=I)*H*H*H+F},easeOutQuart:function(G,H,F,J,I){return -J*((H=H/I-1)*H*H*H-1)+F},easeInOutQuart:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H*H*H+F}return -J/2*((H-=2)*H*H*H-2)+F},easeInQuint:function(G,H,F,J,I){return J*(H/=I)*H*H*H*H+F},easeOutQuint:function(G,H,F,J,I){return J*((H=H/I-1)*H*H*H*H+1)+F},easeInOutQuint:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H*H*H*H+F}return J/2*((H-=2)*H*H*H*H+2)+F},easeInSine:function(G,H,F,J,I){return -J*Math.cos(H/I*(Math.PI/2))+J+F},easeOutSine:function(G,H,F,J,I){return J*Math.sin(H/I*(Math.PI/2))+F},easeInOutSine:function(G,H,F,J,I){return -J/2*(Math.cos(Math.PI*H/I)-1)+F},easeInExpo:function(G,H,F,J,I){return(H==0)?F:J*Math.pow(2,10*(H/I-1))+F},easeOutExpo:function(G,H,F,J,I){return(H==I)?F+J:J*(-Math.pow(2,-10*H/I)+1)+F},easeInOutExpo:function(G,H,F,J,I){if(H==0){return F}if(H==I){return F+J}if((H/=I/2)<1){return J/2*Math.pow(2,10*(H-1))+F}return J/2*(-Math.pow(2,-10*--H)+2)+F},easeInCirc:function(G,H,F,J,I){return -J*(Math.sqrt(1-(H/=I)*H)-1)+F},easeOutCirc:function(G,H,F,J,I){return J*Math.sqrt(1-(H=H/I-1)*H)+F},easeInOutCirc:function(G,H,F,J,I){if((H/=I/2)<1){return -J/2*(Math.sqrt(1-H*H)-1)+F}return J/2*(Math.sqrt(1-(H-=2)*H)+1)+F},easeInElastic:function(G,I,F,M,L){var J=1.70158;var K=0;var H=M;if(I==0){return F}if((I/=L)==1){return F+M}if(!K){K=L*0.3}if(H<Math.abs(M)){H=M;var J=K/4}else{var J=K/(2*Math.PI)*Math.asin(M/H)}return -(H*Math.pow(2,10*(I-=1))*Math.sin((I*L-J)*(2*Math.PI)/K))+F},easeOutElastic:function(G,I,F,M,L){var J=1.70158;var K=0;var H=M;if(I==0){return F}if((I/=L)==1){return F+M}if(!K){K=L*0.3}if(H<Math.abs(M)){H=M;var J=K/4}else{var J=K/(2*Math.PI)*Math.asin(M/H)}return H*Math.pow(2,-10*I)*Math.sin((I*L-J)*(2*Math.PI)/K)+M+F},easeInOutElastic:function(G,I,F,M,L){var J=1.70158;var K=0;var H=M;if(I==0){return F}if((I/=L/2)==2){return F+M}if(!K){K=L*(0.3*1.5)}if(H<Math.abs(M)){H=M;var J=K/4}else{var J=K/(2*Math.PI)*Math.asin(M/H)}if(I<1){return -0.5*(H*Math.pow(2,10*(I-=1))*Math.sin((I*L-J)*(2*Math.PI)/K))+F}return H*Math.pow(2,-10*(I-=1))*Math.sin((I*L-J)*(2*Math.PI)/K)*0.5+M+F},easeInBack:function(G,H,F,K,J,I){if(I==undefined){I=1.70158}return K*(H/=J)*H*((I+1)*H-I)+F},easeOutBack:function(G,H,F,K,J,I){if(I==undefined){I=1.70158}return K*((H=H/J-1)*H*((I+1)*H+I)+1)+F},easeInOutBack:function(G,H,F,K,J,I){if(I==undefined){I=1.70158}if((H/=J/2)<1){return K/2*(H*H*(((I*=(1.525))+1)*H-I))+F}return K/2*((H-=2)*H*(((I*=(1.525))+1)*H+I)+2)+F},easeInBounce:function(G,H,F,J,I){return J-D.easing.easeOutBounce(G,I-H,0,J,I)+F},easeOutBounce:function(G,H,F,J,I){if((H/=I)<(1/2.75)){return J*(7.5625*H*H)+F}else{if(H<(2/2.75)){return J*(7.5625*(H-=(1.5/2.75))*H+0.75)+F}else{if(H<(2.5/2.75)){return J*(7.5625*(H-=(2.25/2.75))*H+0.9375)+F}else{return J*(7.5625*(H-=(2.625/2.75))*H+0.984375)+F}}}},easeInOutBounce:function(G,H,F,J,I){if(H<I/2){return D.easing.easeInBounce(G,H*2,0,J,I)*0.5+F}return D.easing.easeOutBounce(G,H*2-I,0,J,I)*0.5+J*0.5+F}})})(jQuery);(function(A){A.effects.blind=function(B){return this.queue(function(){var D=A(this),C=["position","top","left"];var H=A.effects.setMode(D,B.options.mode||"hide");var G=B.options.direction||"vertical";A.effects.save(D,C);D.show();var J=A.effects.createWrapper(D).css({overflow:"hidden"});var E=(G=="vertical")?"height":"width";var I=(G=="vertical")?J.height():J.width();if(H=="show"){J.css(E,0)}var F={};F[E]=H=="show"?I:0;J.animate(F,B.duration,B.options.easing,function(){if(H=="hide"){D.hide()}A.effects.restore(D,C);A.effects.removeWrapper(D);if(B.callback){B.callback.apply(D[0],arguments)}D.dequeue()})})}})(jQuery);(function(A){A.effects.bounce=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"up";var C=B.options.distance||20;var D=B.options.times||5;var G=B.duration||250;if(/show|hide/.test(J)){K.push("opacity")}A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var C=B.options.distance||(F=="top"?E.outerHeight({margin:true})/3:E.outerWidth({margin:true})/3);if(J=="show"){E.css("opacity",0).css(F,O=="pos"?-C:C)}if(J=="hide"){C=C/(D*2)}if(J!="hide"){D--}if(J=="show"){var H={opacity:1};H[F]=(O=="pos"?"+=":"-=")+C;E.animate(H,G/2,B.options.easing);C=C/2;D--}for(var I=0;I<D;I++){var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing);C=(J=="hide")?C*2:C/2}if(J=="hide"){var H={opacity:0};H[F]=(O=="pos"?"-=":"+=")+C;E.animate(H,G/2,B.options.easing,function(){E.hide();A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}else{var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery);(function(A){A.effects.clip=function(B){return this.queue(function(){var F=A(this),J=["position","top","left","height","width"];var I=A.effects.setMode(F,B.options.mode||"hide");var K=B.options.direction||"vertical";A.effects.save(F,J);F.show();var C=A.effects.createWrapper(F).css({overflow:"hidden"});var E=F[0].tagName=="IMG"?C:F;var G={size:(K=="vertical")?"height":"width",position:(K=="vertical")?"top":"left"};var D=(K=="vertical")?E.height():E.width();if(I=="show"){E.css(G.size,0);E.css(G.position,D/2)}var H={};H[G.size]=I=="show"?D:0;H[G.position]=I=="show"?0:D/2;E.animate(H,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){F.hide()}A.effects.restore(F,J);A.effects.removeWrapper(F);if(B.callback){B.callback.apply(F[0],arguments)}F.dequeue()}})})}})(jQuery);(function(A){A.effects.drop=function(B){return this.queue(function(){var E=A(this),D=["position","top","left","opacity"];var I=A.effects.setMode(E,B.options.mode||"hide");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E);var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true})/2:E.outerWidth({margin:true})/2);if(I=="show"){E.css("opacity",0).css(F,C=="pos"?-J:J)}var G={opacity:I=="show"?1:0};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.explode=function(B){return this.queue(function(){var I=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;var E=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;B.options.mode=B.options.mode=="toggle"?(A(this).is(":visible")?"hide":"show"):B.options.mode;var H=A(this).show().css("visibility","hidden");var J=H.offset();J.top-=parseInt(H.css("marginTop"),10)||0;J.left-=parseInt(H.css("marginLeft"),10)||0;var G=H.outerWidth(true);var C=H.outerHeight(true);for(var F=0;F<I;F++){for(var D=0;D<E;D++){H.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-D*(G/E),top:-F*(C/I)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:G/E,height:C/I,left:J.left+D*(G/E)+(B.options.mode=="show"?(D-Math.floor(E/2))*(G/E):0),top:J.top+F*(C/I)+(B.options.mode=="show"?(F-Math.floor(I/2))*(C/I):0),opacity:B.options.mode=="show"?0:1}).animate({left:J.left+D*(G/E)+(B.options.mode=="show"?0:(D-Math.floor(E/2))*(G/E)),top:J.top+F*(C/I)+(B.options.mode=="show"?0:(F-Math.floor(I/2))*(C/I)),opacity:B.options.mode=="show"?1:0},B.duration||500)}}setTimeout(function(){B.options.mode=="show"?H.css({visibility:"visible"}):H.css({visibility:"visible"}).hide();if(B.callback){B.callback.apply(H[0])}H.dequeue();A("div.ui-effects-explode").remove()},B.duration||500)})}})(jQuery);(function(A){A.effects.fold=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var H=A.effects.setMode(E,B.options.mode||"hide");var O=B.options.size||15;var N=!(!B.options.horizFirst);var G=B.duration?B.duration/2:A.fx.speeds._default/2;A.effects.save(E,K);E.show();var D=A.effects.createWrapper(E).css({overflow:"hidden"});var I=((H=="show")!=N);var F=I?["width","height"]:["height","width"];var C=I?[D.width(),D.height()]:[D.height(),D.width()];var J=/([0-9]+)%/.exec(O);if(J){O=parseInt(J[1],10)/100*C[H=="hide"?0:1]}if(H=="show"){D.css(N?{height:0,width:O}:{height:O,width:0})}var M={},L={};M[F[0]]=H=="show"?C[0]:O;L[F[1]]=H=="show"?C[1]:0;D.animate(M,G,B.options.easing).animate(L,G,B.options.easing,function(){if(H=="hide"){E.hide()}A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery);(function(A){A.effects.highlight=function(B){return this.queue(function(){var E=A(this),D=["backgroundImage","backgroundColor","opacity"];var H=A.effects.setMode(E,B.options.mode||"show");var C=B.options.color||"#ffff99";var G=E.css("backgroundColor");A.effects.save(E,D);E.show();E.css({backgroundImage:"none",backgroundColor:C});var F={backgroundColor:G};if(H=="hide"){F.opacity=0}E.animate(F,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(H=="hide"){E.hide()}A.effects.restore(E,D);if(H=="show"&&A.browser.msie){this.style.removeAttribute("filter")}if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.pulsate=function(B){return this.queue(function(){var D=A(this);var G=A.effects.setMode(D,B.options.mode||"show");var F=B.options.times||5;var E=B.duration?B.duration/2:A.fx.speeds._default/2;if(G=="hide"){F--}if(D.is(":hidden")){D.css("opacity",0);D.show();D.animate({opacity:1},E,B.options.easing);F=F-2}for(var C=0;C<F;C++){D.animate({opacity:0},E,B.options.easing).animate({opacity:1},E,B.options.easing)}if(G=="hide"){D.animate({opacity:0},E,B.options.easing,function(){D.hide();if(B.callback){B.callback.apply(this,arguments)}})}else{D.animate({opacity:0},E,B.options.easing).animate({opacity:1},E,B.options.easing,function(){if(B.callback){B.callback.apply(this,arguments)}})}D.queue("fx",function(){D.dequeue()});D.dequeue()})}})(jQuery);(function(A){A.effects.puff=function(B){return this.queue(function(){var F=A(this);var C=A.extend(true,{},B.options);var H=A.effects.setMode(F,B.options.mode||"hide");var G=parseInt(B.options.percent,10)||150;C.fade=true;var E={height:F.height(),width:F.width()};var D=G/100;F.from=(H=="hide")?E:{height:E.height*D,width:E.width*D};C.from=F.from;C.percent=(H=="hide")?G:100;C.mode=H;F.effect("scale",C,B.duration,B.callback);F.dequeue()})};A.effects.scale=function(B){return this.queue(function(){var G=A(this);var D=A.extend(true,{},B.options);var J=A.effects.setMode(G,B.options.mode||"effect");var H=parseInt(B.options.percent,10)||(parseInt(B.options.percent,10)==0?0:(J=="hide"?0:100));var I=B.options.direction||"both";var C=B.options.origin;if(J!="effect"){D.origin=C||["middle","center"];D.restore=true}var F={height:G.height(),width:G.width()};G.from=B.options.from||(J=="show"?{height:0,width:0}:F);var E={y:I!="horizontal"?(H/100):1,x:I!="vertical"?(H/100):1};G.to={height:F.height*E.y,width:F.width*E.x};if(B.options.fade){if(J=="show"){G.from.opacity=0;G.to.opacity=1}if(J=="hide"){G.from.opacity=1;G.to.opacity=0}}D.from=G.from;D.to=G.to;D.mode=J;G.effect("size",D,B.duration,B.callback);G.dequeue()})};A.effects.size=function(B){return this.queue(function(){var C=A(this),N=["position","top","left","width","height","overflow","opacity"];var M=["position","top","left","overflow","opacity"];var J=["width","height","overflow"];var P=["fontSize"];var K=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var F=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var G=A.effects.setMode(C,B.options.mode||"effect");var I=B.options.restore||false;var E=B.options.scale||"both";var O=B.options.origin;var D={height:C.height(),width:C.width()};C.from=B.options.from||D;C.to=B.options.to||D;if(O){var H=A.effects.getBaseline(O,D);C.from.top=(D.height-C.from.height)*H.y;C.from.left=(D.width-C.from.width)*H.x;C.to.top=(D.height-C.to.height)*H.y;C.to.left=(D.width-C.to.width)*H.x}var L={from:{y:C.from.height/D.height,x:C.from.width/D.width},to:{y:C.to.height/D.height,x:C.to.width/D.width}};if(E=="box"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(K);C.from=A.effects.setTransition(C,K,L.from.y,C.from);C.to=A.effects.setTransition(C,K,L.to.y,C.to)}if(L.from.x!=L.to.x){N=N.concat(F);C.from=A.effects.setTransition(C,F,L.from.x,C.from);C.to=A.effects.setTransition(C,F,L.to.x,C.to)}}if(E=="content"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(P);C.from=A.effects.setTransition(C,P,L.from.y,C.from);C.to=A.effects.setTransition(C,P,L.to.y,C.to)}}A.effects.save(C,I?N:M);C.show();A.effects.createWrapper(C);C.css("overflow","hidden").css(C.from);if(E=="content"||E=="both"){K=K.concat(["marginTop","marginBottom"]).concat(P);F=F.concat(["marginLeft","marginRight"]);J=N.concat(K).concat(F);C.find("*[width]").each(function(){child=A(this);if(I){A.effects.save(child,J)}var Q={height:child.height(),width:child.width()};child.from={height:Q.height*L.from.y,width:Q.width*L.from.x};child.to={height:Q.height*L.to.y,width:Q.width*L.to.x};if(L.from.y!=L.to.y){child.from=A.effects.setTransition(child,K,L.from.y,child.from);child.to=A.effects.setTransition(child,K,L.to.y,child.to)}if(L.from.x!=L.to.x){child.from=A.effects.setTransition(child,F,L.from.x,child.from);child.to=A.effects.setTransition(child,F,L.to.x,child.to)}child.css(child.from);child.animate(child.to,B.duration,B.options.easing,function(){if(I){A.effects.restore(child,J)}})})}C.animate(C.to,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(G=="hide"){C.hide()}A.effects.restore(C,I?N:M);A.effects.removeWrapper(C);if(B.callback){B.callback.apply(this,arguments)}C.dequeue()}})})}})(jQuery);(function(A){A.effects.shake=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"left";var C=B.options.distance||20;var D=B.options.times||3;var G=B.duration||B.options.duration||140;A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var H={},N={},L={};H[F]=(O=="pos"?"-=":"+=")+C;N[F]=(O=="pos"?"+=":"-=")+C*2;L[F]=(O=="pos"?"-=":"+=")+C*2;E.animate(H,G,B.options.easing);for(var I=1;I<D;I++){E.animate(N,G,B.options.easing).animate(L,G,B.options.easing)}E.animate(N,G,B.options.easing).animate(H,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}});E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery);(function(A){A.effects.slide=function(B){return this.queue(function(){var E=A(this),D=["position","top","left"];var I=A.effects.setMode(E,B.options.mode||"show");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E).css({overflow:"hidden"});var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true}):E.outerWidth({margin:true}));if(I=="show"){E.css(F,C=="pos"?-J:J)}var G={};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.transfer=function(B){return this.queue(function(){var F=A(this),H=A(B.options.to),E=H.offset(),G={top:E.top,left:E.left,height:H.innerHeight(),width:H.innerWidth()},D=F.offset(),C=A('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(B.options.className).css({top:D.top,left:D.left,height:F.innerHeight(),width:F.innerWidth(),position:"absolute"}).animate(G,B.duration,B.options.easing,function(){C.remove();(B.callback&&B.callback.apply(F[0],arguments));F.dequeue()})})}})(jQuery);
window.fDomLoaded=false;document.head=document.getElementsByTagName("head")[0];if(document.all&&!document.getElementById){document.getParent=function(A){return A.parentElement}}else{document.getParent=function(A){return A.parentNode}}function detectBrowser(){window.ie=(document.all&&!window.opera);if(navigator&&navigator.userAgent){var A=navigator.userAgent;window.webkit=(A.indexOf("WebKit/")!=-1);if(window.webkit){window.versionMajorWebKit=0;window.versionMinorWebKit=0;var C=/WebKit\/(\d)(\d\d)?/;var B=C.exec(A);if(B){window.versionMajorWebKit=parseInt(B[1]);if(B[2]){window.versionMinorWebKit=parseInt(B[2])}}window.chrome=(A.indexOf("Chrome/")!=-1);window.safari=!window.chrome&&(A.indexOf("Safari/")!=-1);window.webkitPre31=window.versionMajorWebKit<5||(window.versionMajorWebKit==5&&window.versionMinorWebKit<25);window.webkitMobile=/ Mobile\//.test(A);window.ipad=(A.indexOf("iPad")!=-1)}if(window.ie){window.ie8=(A.indexOf("MSIE 8")!=-1);window.ie7=(A.indexOf("MSIE 7")!=-1);window.ie6=(window.ie&&!window.ie7&&!window.ie8)}window.mozilla=(!window.ie&&!window.webkit&&!window.opera&&(A.indexOf("Mozilla")!=-1));window.ff3=(window.mozilla&&A.indexOf("Firefox/3")!=-1);window.macintosh=(A.indexOf("Macintosh")!=-1)}}detectBrowser();$(document).ready(domContentLoad);window.onload=function(){bodyLoad()};
function Array_push(){var A=0;for(A=0;A<arguments.length;A++){this[this.length]=arguments[A]}return this.length}if(typeof Array.prototype.push=="undefined"){Array.prototype.push=Array_push}if(document.all&&!document.getElementById){document.getElementById=function(A){return document.all[A]}}function elById(D,A){if(!D){return null}if(!A){A=document}if(!A.getElementById){return null}try{var B=A.getElementById(D);if(B&&B.id!=D){B=null}return B}catch(C){return null}}function getAbsolutePosition(C){var B={x:C.offsetLeft,y:C.offsetTop};if(C.offsetParent){var A=getAbsolutePosition(C.offsetParent);B.x+=A.x;B.y+=A.y}return B}function redraw(A){if(A&&A.style){A.style.display="none";A.style.display=""}}function preCalc(A){if(!A||!A.style){return }A.sDisplayOld=A.style.display;A.sVisibilityOld=A.style.visibility;A.style.visibility="hidden";A.style.display=""}function postCalc(A){if(!A||!A.style){return }A.style.display=A.sDisplayOld||"";A.style.visibility=A.sVisibilityOld||"visible"}function capitalize(A){if(!A||!A.length){return null}return A.substring(0,1).toUpperCase()+A.substring(1)}function saveSelection(A){if(!A||null==A.selectionStart){return }A.ixSelStart=A.selectionStart;A.ixSelEnd=A.selectionEnd}function restoreSelection(A){if(!A||null==A.ixSelStart||null==A.selectionStart){return }A.selectionStart=A.ixSelStart;A.selectionEnd=A.ixSelEnd}function adjustRows(B){if(B.bRowLock){return }var E=B.rows;if(window.ie){var A=false;while((B.scrollHeight>B.clientHeight)&&(B.rows<30)){B.rows+=3;A=true}if(A&&window.ie6){B.scrollTop=0;redraw(B);setTimeout(function(){safeFocus(B)},1)}}else{var F=B.value.split("\n");var D=1;for(var C=0;C<F.length;C++){if(F[C].length>80){D+=Math.ceil(F[C].length/80)}}D+=F.length;if(D>8){B.rows=Math.min(D,30)}}if(B.fxnResize&&B.rows!=E){B.fxnResize.call()}}function getKeyCode(A){if(document.all&&!A){return event.keyCode}else{if(0!=A.which&&typeof (A.which)!="undefined"){return A.which}else{return A.keyCode}}}function isKey(B,A){return(getKeyCode(B)==A)}function trim(A){if(!A||!A.replace){return""}if(!trim.re){trim.re=/^[\s]+|[\s]+$/g}return A.replace(trim.re,"")}window.Trim=trim;function moveToHold(A){if(A&&A.parentNode){A.oldParent=A.parentNode;A.oldSibling=A.nextSibling;A.parentNode.removeChild(A)}}function restoreFromHold(A){if(A&&A.oldParent){A.oldParent.insertBefore(A,A.oldSibling)}}function jsToVbNewLines(A){return A.replace(/(\n)/g,String.fromCharCode((document.all?10:13)))}function x(A){return cancel(A)}function cancel(A,B){if(document.all){if(B){B.event.returnValue=false}else{if(event){event.returnValue=false}}}else{if(A){A.preventDefault()}}return false}function stopFormSubmission(A){return(getKeyCode(A)==13)}function hide(A){if(!A||!A.style){return }A.style.display="none"}function show(A){if(!A||!A.style){return }A.style.display=""}function toggleVisible(A){if(!A){return }A.style.display=(A.style.display=="none"?"":"none")}function toggleVisibleById(B){var A=elById(B);if(A){toggleVisible(A)}}function removeChildren(A){if(!A||!A.childNodes){return }while(A.childNodes.length){A.removeChild(A.childNodes[0])}}function removeTextSelections(){if(window.getSelection&&window.getSelection().removeAllRanges){window.getSelection().removeAllRanges()}if(document.selection&&document.selection.empty){try{document.selection.empty()}catch(A){}}}function ourAttachEvent(C,D,B,A){if(!C){return }if(!C.hashEvents){C.hashEvents={}}if(!C.hashEvents[D]){C.hashEvents[D]=[B]}else{C.hashEvents[D].push(B)}if(C.addEventListener){C.addEventListener(D,B,A)}else{if(C.attachEvent){return C.attachEvent("on"+D,B)}else{C["on"+D]=B}}return true}function ourDispatchEvent(C,D){if(!C||!C.hashEvents||!C.hashEvents[D]){return }var B=C.hashEvents[D];for(var A=0;A<B.length;A++){if(B[A].apply){B[A].apply(this)}}}function ourHasEvent(A,B){return(A&&A.hashEvents&&A.hashEvents[B])}function calculateOffset(D,A,B){var C=0;while(D&&(!B||(getActualStyle(D,"position")!="absolute"&&getActualStyle(D,"position")!="relative"))){C+=D[A]||0;D=D.offsetParent}return C}function getActualStyle(B,A){var D="";if(B.style[A]){D=B.style[A]}else{if(document.defaultView&&document.defaultView.getComputedStyle){D=document.defaultView.getComputedStyle(B,"").getPropertyValue(jsToCss(A))}else{if(B.currentStyle){try{D=B.currentStyle[A]}catch(C){}}else{D=B.style[A]}}}return D}function setCookie(A,B,C){var D=(C?C.toString():"Thu, 4 Aug 2011 20:47:11 UTC;");document.cookie=A+"="+escape(B)+"; expires="+D}function getCookie(C){var B=document.cookie;var E=C+"=";var D=B.indexOf("; "+E);if(D==-1){D=B.indexOf(E);if(D!=0){return null}}else{D+=2}var A=document.cookie.indexOf(";",D);if(A==-1){A=B.length}return unescape(B.substring(D+E.length,A))}function giveTextBoxFocus(B){var A=null;A=elById(B);if(A!=null){safeFocus(A);if(document.selection){A.value=A.value}return true}return false}function disableElementById(A){var B=elById(A);if(B){B.disabled=true}}function shortcutCtrlKey(){return(window.macintosh?"\u2318":FB_CTRL)}function swap1(B,A){if(!B){return""}return B.replace(/%1/g,CStr(A))}function swap2(C,B,A){if(!C){return""}return swap1(C,B).replace(/%2/g,CStr(A))}function swap3(D,C,B,A){if(!D){return""}return swap2(D,C,B).replace(/%3/g,CStr(A))}function swap4(E,D,C,B,A){if(!E){return""}return swap3(E,D,C,B).replace(/%4/g,CStr(A))}function trailingAmpersand(A){if(!A){return""}if(A.substring(A.length-1)=="&"){return A}return A+"&"}function leadingAmpersand(A){if(!A){return""}if(A.charAt(0)=="&"){return A}return"&"+A}function isDisplayed(A){var B=A;if(null==B){return false}while(null!=B&&B.style){if("none"==B.style.display||"hidden"==B.style.visibility){return false}B=B.parentNode}return true}function isUnderNode(A,C){var B=A;while(null!=B){if(C==B){return true}B=B.parentNode}return false}function escapeLtGt(A){return A.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function horizontalScrollBarPadding(){return(scrollWidth()>windowWidth())?18:0}function verticalScrollBarPadding(){return !(window.ie||window.opera)||(scrollHeight()>windowHeight())?18:0}function documentHeight(){return Math.max((window.opera?document.documentElement.clientHeight:document.body.offsetHeight),windowHeight())}function documentWidth(){return(window.opera?document.documentElement.clientWidth:document.body.offsetWidth)}function windowHeight(){return(window.innerHeight?window.innerHeight:document.documentElement.clientHeight)}function windowWidth(){return(window.innerWidth?window.innerWidth:document.documentElement.clientWidth)}function windowHeightCorrected(){return windowHeight()-horizontalScrollBarPadding()}function windowWidthCorrected(){return windowWidth()-verticalScrollBarPadding()}function windowRight(){return windowWidthCorrected()+scrollLeft()}function setOpacity(B,A){if(A==null){B.style.opacity="";B.style.filter=""}else{B.style.opacity=A;B.style.filter="alpha(opacity="+A*100+")"}}function enableInputsWithin(A,B){setTimeout("doEnableInputsWithin('"+A+"', "+B+")",1)}function doEnableInputsWithin(A,B){var C=elById(A);if(!C||!isDisplayed(C)){return }if(C.tagName.toLowerCase()=="input"){C.disabled=!B;return }$("input",C).map(function(){this.disabled=!B})}function coverElement(C,B,A,D){if(!C||!B){return }if(A==null){A=calculateOffset(B,"offsetLeft")}if(D==null){D=calculateOffset(B,"offsetTop")}C.style.top=D+"px";C.style.left=A+"px";C.style.width=B.offsetWidth+"px";C.style.height=B.offsetHeight+"px"}function positionElement(B,A,C){if(!B||!B.style){return }if(A!=null){B.style.left=A+"px"}if(C!=null){B.style.top=C+"px"}}function sizeElement(C,A,B){if(!C||!C.style){return }if(A!=null){C.style.width=A+"px"}if(B!=null){C.style.height=B+"px"}}function centerInTarget(C,A,B){return positionInTarget(C,A,B,0.5,0.5)}function positionInTarget(F,C,E,D,H){if(!F){return null}if(!C||C.style.display.toLowerCase()=="none"){return positionInWindow(F,D,H)}var B=(E&&E.style.display!="none")?E:C;var A=calculateOffset(B,"offsetLeft")+(B.offsetWidth*D)-(F.offsetWidth/2);var G=calculateOffset(C,"offsetTop")+(C.offsetHeight*H)-(F.offsetHeight/2);positionElement(F,A,G);return{x:A,y:G}}function getRelativeCoordinates(G,B,D,C){if(!G||!B||!D||!C){return{x:0,y:0}}var F=G.style.display;var E=G.style.visibility;G.style.visibility="hidden";G.style.display="";var A=D(G,B);var H=C(G,B);G.style.visibility=E;G.style.display=F;return{x:A,y:H}}function getCenteredCoordinates(B,A){return getRelativeCoordinates(B,A,function(D,C){return calculateOffset(C,"offsetLeft")+(C.offsetWidth/2)-(D.offsetWidth/2)},function(D,C){return calculateOffset(C,"offsetTop")+(C.offsetHeight/2)-(D.offsetHeight/2)})}function getRightCoordinates(C,A){var B=5;return getRelativeCoordinates(C,A,function(E,D){return calculateOffset(D,"offsetLeft")+D.offsetWidth+B},function(E,D){return calculateOffset(D,"offsetTop")})}function getLeftCoordinates(C,A){var B=5;return getRelativeCoordinates(C,A,function(E,D){return calculateOffset(D,"offsetLeft")-C.offsetWidth-B},function(E,D){return calculateOffset(D,"offsetTop")})}function getBelowCoordinates(C,A){var B=5;return getRelativeCoordinates(C,A,function(E,D){return calculateOffset(D,"offsetLeft")},function(E,D){return calculateOffset(D,"offsetTop")+D.offsetHeight+B})}function getUpperCenteredCoordinates(B,A){return getRelativeCoordinates(B,A,function(D,C){return calculateOffset(C,"offsetLeft")+(C.offsetWidth/2)-(D.offsetWidth/2)},function(E,D){var C=calculateOffset(D,"offsetTop");return Math.max(C,C+(D.offsetHeight/5)-(E.offsetHeight/2))})}function getInWindowCoordinates(O,H,M,C,I,J,K){if(!O){return }var B=!isVisible(O);var D=O.style.visibility;var E=O.style.display;if(B){O.style.visibility="hidden";O.style.display=""}var L=C?C.offsetWidth:0;var P=C?C.offsetHeight:0;if(I==null){I=0}if(J==null){J=0}var N=scrollLeft();var G=inBounds(H,N+I,windowWidthCorrected()+N-O.offsetWidth-I);var A=inBounds((M-(2*J)),scrollTop()+I,windowHeightCorrected()+scrollTop()-O.offsetHeight-I);var F=I+J;if(!K&&hasRoom("right",O,H,M,F,N)){G=(H+L+F)}else{if(!K&&hasRoom("left",O,H,M,F,N)){G=(H-O.offsetWidth-F)}else{if(hasRoom("bottom",O,H,M,F,N)){A=(M+P+F)}else{if(hasRoom("top",O,H,M,F,N)){A=(M-O.offsetHeight-F)}else{if(!K){G=H}A=(M+P+F)}}}}if(B){O.style.display=E;O.style.visibility=D}return{x:G,y:A}}function centerInWindow(A){return positionInWindow(A,0.5,0.5)}function positionInWindow(C,B,E){if(!C){return null}var A=scrollLeft()+(windowWidthCorrected()*B)-(C.offsetWidth/2);var D=scrollTop()+(windowHeightCorrected()*E)-(C.offsetHeight/2);positionElement(C,A,D);return{x:A,y:D}}function moveWithinWindow(J,E){if(!J||!J.style||J.style.display.toLowerCase()=="none"){return null}if(null==E){E=25}var C=calculateOffset(J,"offsetLeft");var G=calculateOffset(J,"offsetTop");var B=C+J.offsetWidth;var F=G+J.offsetHeight;var H=scrollLeft()+E;var D=scrollLeft()+windowWidthCorrected()-E;var A=scrollTop()+E;var I=scrollTop()+windowHeightCorrected()-E;if(B>D){C=C-(B-D)}if(F>I){G=G-(F-I)}if(C<H){C=H}if(G<A){G=A}J.style.left=C+"px";J.style.top=G+"px";return{x:C,y:G}}function inBounds(C,A,B){return Math.max(A,Math.min(B,C))}function scrollTop(A){if(!A){A=window}var B=A.document.documentElement;if(B.scrollTop){return B.scrollTop}else{if(A.pageYOffset){return A.pageYOffset}else{if(A.document.body.scrollTop){return A.document.body.scrollTop}else{return 0}}}}function scrollLeft(A){if(!A){A=window}var B=A.document.documentElement;if(B.scrollLeft!=null){return B.scrollLeft}else{if(A.pageXOffset!=null){return A.pageXOffset}else{if(A.document.body.scrollLeft!=null){return A.document.body.scrollLeft}else{return 0}}}}function scrollWidth(){if(typeof window.scrollMaxX!="undefined"){if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth+window.scrollMaxX}}return document.body.scrollWidth||0}function scrollHeight(){if(typeof window.scrollMaxY!="undefined"){if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight+window.scrollMaxY}}return document.body.scrollHeight||0}function safeScrollTo(B,D,A){if(!A){A=window}try{A.scrollTo(B,D)}catch(C){}}function xMouseWindow(){return xMouse-scrollLeft()}function yMouseWindow(){return yMouse-scrollTop()}decodeLTGT.reLT=new RegExp("&lt;","gi");decodeLTGT.reGT=new RegExp("&gt;","gi");function decodeLTGT(A){return A&&A.replace(decodeLTGT.reLT,"<").replace(decodeLTGT.reGT,">")}function encodeLTGT(A){if(!A){return""}if(!encodeLTGT.reGT){encodeLTGT.reGT=new RegExp(">","gi");encodeLTGT.reLT=new RegExp("<","gi")}return A&&A.replace(encodeLTGT.reLT,"&lt;").replace(encodeLTGT.reGT,"&gt;")}function encodeAmp(A){if(!A){return""}if(!encodeAmp.re){encodeAmp.re=new RegExp("&","gi")}return A.replace(encodeAmp.re,"&amp;")}function decodeAmp(A){if(!A){return""}if(!decodeAmp.re){decodeAmp.re=new RegExp("&amp;","gi")}return A.replace(decodeAmp.re,"&")}function paintRow(A,D){if(!A||!A.cells){return }var C=A.cells;for(var B=0;B<C.length;B++){C[B].style.backgroundColor=D}}function getParentRow(A){if(!A||!A.tagName){return null}if(A.tagName.toLowerCase()=="span"&&A.id=="dlgGrid"){return null}if(A.tagName.toLowerCase()=="tr"){return A}return getParentRow(A.parentNode)}function getParentNode(B,A){if(!B||!B.tagName){return null}if(B.tagName.toLowerCase()==A.toLowerCase()){return B}return getParentNode(B.parentNode,A)}function isVisible(A){return(A&&A.style&&(A.style.display!="none")&&(A.style.visibility!="hidden"))}function repairFocus(B){try{safeFocus(B);B.blur()}catch(A){}}function replacePlaceHolders(C){if(!isDefined(rgPlaceHolders)){return C}for(var A=0;A<rgPlaceHolders.length;A++){var B=new RegExp(rgPlaceHolders[A].sPlaceHolder,"g");C=C.replace(B,decodeLTGT(rgPlaceHolders[A].sValue))}return C}function isDefined(A){return(typeof A!="undefined")}function safeFocus(A){try{if(A){if($(A).is(":visible")){A.focus()}else{if(A.onfocus){A.onfocus()}}}}catch(B){}}function safeRemove(A){try{A.parentNode.removeChild(A)}catch(B){}}function safeSubmit(A){try{A.submit();return true}catch(B){}return false}function asc(A){if(!A){return null}return A.charCodeAt(0)}var g_setInnerHTMLComplete=true;function setInnerHTML(A,C,D){g_setInnerHTMLComplete=false;if(A&&(C||C=="")){var B=A;if(typeof (A)=="string"){B=elById(A)}if(B){if(D){if(C==""){hide(B)}else{show(B)}}if(B.innerHTML||B.innerHTML==""){B.innerHTML=C;DropListControl.refreshWithin(B);g_setInnerHTMLComplete=true;return B}}}g_setInnerHTMLComplete=true;return undefined}function isCtrlOrMeta(A){return(A&&(A.ctrlKey||A.metaKey))}function isCtrlOrMetaOrShift(A){return(A&&(isCtrlOrMeta(A)||A.shiftKey))}function nextSiblingOfType(B,A){return nextSiblingMatching(B,function(C){return A==C.tagName.toLowerCase()})}function nextSiblingMatching(A,B){while(A){A=A.nextSibling;if(A&&B(A)){return A}}return null}var rgMouseButtonMap=[];var MOUSE_BUTTON_LEFT=0;var MOUSE_BUTTON_RIGHT=1;var MOUSE_BUTTON_MIDDLE=2;if(window.ie||(window.webkit&&window.versionMajorWebKit<5)){rgMouseButtonMap[1]=MOUSE_BUTTON_LEFT;rgMouseButtonMap[2]=MOUSE_BUTTON_RIGHT;rgMouseButtonMap[4]=MOUSE_BUTTON_MIDDLE}else{if(window.webkit){rgMouseButtonMap[0]=MOUSE_BUTTON_LEFT;rgMouseButtonMap[1]=MOUSE_BUTTON_MIDDLE;rgMouseButtonMap[2]=MOUSE_BUTTON_RIGHT}else{rgMouseButtonMap[0]=MOUSE_BUTTON_LEFT;rgMouseButtonMap[1]=MOUSE_BUTTON_RIGHT;rgMouseButtonMap[2]=MOUSE_BUTTON_MIDDLE}}function getButtonCode(A){if(A.button==null){return null}return rgMouseButtonMap[A.button]}function addToFxn(A,D,C){if(!A){A=window}if(!D||!C||!C.call){return }if(A[D]&&A[D].call){var B=0;while(A[D+"_"+B]!=null){B++}A[D+"_"+B]=A[D];A[D]=function(){A[D+"_"+B].apply(A,arguments);C.apply(A)}}else{A[D]=C}}function isTextNode(A){if(!A||!A.nodeName){return false}return(A.nodeName.toLowerCase()=="#text")}function getPreviousOffsetNode(B){if(!B||(!B.previousSibling&&!B.parentNode)){return null}while(!B.previousSibling&&B.parentNode){B=B.parentNode}B=B.previousSibling;if(isTextNode(B)){if(trim(B.nodeValue).length==0){return getPreviousOffsetNode(B)}var A=document.createElement("span");B.parentNode.insertBefore(A,B);A.appendChild(B);return A}if(!B.offsetHeight){return getPreviousOffsetNode(B)}return B}function getNextOffsetNode(B){if(!B||(!B.nextSibling&&!B.parentNode)){return null}while(!B.nextSibling&&B.parentNode){B=B.parentNode}B=B.nextSibling;if(isTextNode(B)){if(trim(B.nodeValue).length==0){return getNextOffsetNode(B)}var A=document.createElement("span");B.parentNode.insertBefore(A,B);A.appendChild(B);return A}if(B&&!B.offsetHeight){return getNextOffsetNode(B)}return B}function atSameHeight(B,A){if(!B||!A||!isVisible(B)||!isVisible(A)){return true}return(calculateOffset(B,"offsetTop")==calculateOffset(A,"offsetTop"))}var rgErrorElements=[];function showErrorElement(sId,sError){var oTarget=elById(sId);if(!oTarget||!oTarget.parentNode){return }var oContainerError=elById(sId+"_containerError");if(!oContainerError){oContainerError=DOM.div();with(oContainerError.style){color="#FF0000";fontSize="11px";fontWeight="bold"}oContainerError.id=sId+"_containerError";var oInsertBefore=oTarget.nextSibling;while(oInsertBefore&&oInsertBefore.id==sId+"_clone"){oInsertBefore=oInsertBefore.nextSibling}oTarget.parentNode.insertBefore(oContainerError,oInsertBefore)}if(oTarget.tagName.toLowerCase()=="input"&&oTarget.type.toLowerCase()=="text"){addClassName(oTarget,"dlgErrorBorderOnly")}oContainerError.innerHTML="";var oSpan=DOM.span();oSpan.innerHTML=sError;oContainerError.appendChild(oSpan);oContainerError.style.display="";rgErrorElements.push({sId:oTarget.id,sContainerId:oContainerError.id})}function hideAllErrorElements(){for(var A=0;A<rgErrorElements.length;A++){var B=elById(rgErrorElements[A].sId);var C=elById(rgErrorElements[A].sContainerId);if(B&&B.tagName.toLowerCase()=="input"&&B.type.toLowerCase()=="text"){removeClassName(B,"dlgErrorBorderOnly")}if(C){C.innerHTML="";C.style.display="none"}}rgErrorElements=[]}function applyToSelfAndChildren(C,B){if(!C||!B||!B.apply){return }B.apply(C,[C]);if(!C.childNodes){return }for(var A=0;A<C.childNodes.length;A++){applyToSelfAndChildren(C.childNodes[A],B)}}function insertOnClickUrl(F,G,C,E){if(!F||!G){return }if(!E){E={}}E.href=G;E.onclick=C;var B=F.substring(0,F.indexOf("["));var A=F.substring(F.indexOf("[")+1,F.indexOf("]"));var D=F.substring(F.indexOf("]")+1);return DOM.span({},B,DOM.a(E,A),D)}function replaceWithCopy(B){if(!B||!B.cloneNode||!B.parentNode){return null}var A=B.cloneNode(true);B.parentNode.replaceChild(A,B);return A}function isTagName(B,A){return B&&B.tagName&&B.tagName.toLowerCase&&A&&A.toLowerCase&&(B.tagName.toLowerCase()==A.toLowerCase())}function matchesTagName(B,A){return B&&B.tagName&&A&&(new RegExp(A,"i")).test(B.tagName)}function setWidth(B,A){if(B&&B.style&&A!=null){B.style.width=A+"px"}}function handleKeydown(D,E,B,A,F,C){B=(B&&window.webkit);if(getKeyCode(E)==13||(B&&getKeyCode(E)==32)){if(A&&A.call){return A.call(this,D,E)}}else{if(getKeyCode(E)==27){if(F&&F.call){return F.call(this,D,E)}}else{if(C&&C.call){return C.call(this,D,E)}}}return true}function isOnlyChild(A){return A&&A.parentNode&&!A.nextSibling&&!A.previousSibling}function getDescendents(D,A,C){if(!C){C=[]}if(!D||!D.childNodes){return C}for(var B=0;B<D.childNodes.length;B++){if(D.childNodes[B].nodeType!=3||A){C[C.length]=D.childNodes[B];getDescendents(D.childNodes[B],A,C)}}return C}function isWhitespaceOnly(B){if(!B){return false}var A=(B.textContent!=null)?B.textContent:B.innerText;if(A==null||A==undefined){return false}if(B.nodeType==NODE_TYPE_ELEMENT&&$("img",B).get(0)){return false}if(A.length==0){return true}if(window.webkit){return A.replace(/\s|\u00A0/g,"").length==0}else{return A.replace(/\s/g,"").length==0}}function getEventTarget(A){return A?(A.target||A.srcElement):null}function hasRoom(A,E,F,D,B,C){if(B==null){B=0}if(!E||!A){return false}if(A=="left"){return(C<(F-B-E.offsetWidth))}else{if(A=="right"){return((F+E.offsetWidth+B)<(C+windowWidthCorrected()-E.offsetWidth))}else{if(A=="top"){return(scrollTop()<(D-B-E.offsetHeight))}else{if(A=="bottom"){return((D+E.offsetHeight+B)<(scrollTop()+windowHeightCorrected()-E.offsetHeight))}else{return false}}}}}function normalizeQuotes(A){if(!A||!A.replace){return""}return A.replace(/[\u201C\u201D]/,'"').replace(/[\u2018\u2019]/,"'")}function jsToCss(A){if(!A||!A.replace){return""}if(!jsToCss.re){jsToCss.re=/([a-z]+)([A-Z]{1})/g}return A.replace(jsToCss.re,"$1-$2").toLowerCase()}function cssToJs(A){if(!A||!A.replace){return""}if(!cssToJs.re){cssToJs.re=/-(\w)/g}return A.replace(cssToJs.re,function(B,C){return C.toUpperCase()})}function addClassName(A,B){if(!A){return }A.className+=" "+B}function removeClassName(A,B){if(!A||!A.className){return }A.className=A.className.replace((new RegExp(B,"gi")),"")}function hasClassName(A,B){if(!A||!A.className){return false}return A.className.indexOf(B)>=0}function sToPx(A){if(!A||!A.replace){return 0}A=A.replace(/[^\d]/g,"");return isNaN(parseInt(A,10))?0:parseInt(A,10)}function isInDOM(A){while(A){if(isTagName(A,"body")){return true}A=A.parentNode}return false}function isChildOf(B,A){while(B&&B.parentNode){if(B.parentNode==A){return true}B=B.parentNode}return false}function isImgLoaded(A){if(!A||!A.complete){return false}if(typeof A.naturalWidth!="undefined"&&A.naturalWidth==0){return false}return true}function forAll(B,D,C){if(!B||!D||!C){return }var A=this;$(D,B).map(function(){C.apply(A,[this])})}function queueForDom(A){if(!window.fDomLoaded){setTimeout(function(){queueForDom(A)},500);return }A()}function isSSL(){return"https:"==document.location.protocol}function urlencode(C){var A;try{A=encodeURIComponent(C)}catch(B){A=escape(C)}return A.replace(/%20/g,"+")}function objIsEmpty(B){for(var A in B){return false}return true}function GetBrowserDecimalDelimiter(){return Number(1.25).toLocaleString().charAt(1)}function parseLocaleFloat(C){var A=GetBrowserDecimalDelimiter();var B=GetLocaleDecimalDelimiter();if(A!=B){C=C.replace(B,A)}return parseFloat(C)}function floatToLocaleString(A){var D=(new Number(A)).toLocaleString();var B=GetBrowserDecimalDelimiter();var C=GetLocaleDecimalDelimiter();if(B!=C){D=D.replace(B,C)}return D}function locationURLBase(){return window.location.protocol+"//"+window.location.host+window.location.pathname};
DomBuilder={IE_TRANSLATIONS:{"class":"className","for":"htmlFor",maxlength:"maxLength"},ieAttrSet:function(A,C,D){var B;if(B=this.IE_TRANSLATIONS[C]){D[B]=A[C]}else{if(C=="style"){D.style.cssText=A[C]}else{D.setAttribute(C,A[C])}}},apply:function(D){D=D||{};var B=("p|div|span|strong|em|i|img|table|tr|td|th|thead|tbody|tfoot|pre|code|h1|h2|h3|h4|h5|h6|ul|ol|li|form|input|textarea|legend|fieldset|select|option|blockquote|cite|br|hr|dd|dl|dt|address|a|button|abbr|acronym|script|link|style|bdo|ins|del|object|param|col|colgroup|optgroup|caption|label|dfn|kbd|samp|var|nbsp|iframe|nobr").split("|");var C,A=0;while(C=B[A++]){D[C.toLowerCase()]=DomBuilder.tagFunc(C)}return D},tagFunc:function(A){return function(){var C=arguments,B,D;C.slice=[].slice;if(C.length>0){if(C[0].nodeName||typeof C[0]=="string"){D=C}else{B=C[0];D=C.slice(1)}}return DomBuilder.elem(A,B,D)}},elem:function(D,A,E){A=A||{};E=E||[];var C;if(D=="nbsp"){return DOM.span({},"&nbsp;")}else{C=document.createElement((window.ie&&A.name)?"<"+D+" name="+A.name+">":D)}for(var B in A){if(typeof A[B]!="function"){if(window.ie){this.ieAttrSet(A,B,C)}else{C.setAttribute(B,A[B])}}else{C[B]=A[B]}}for(var B=0;B<E.length;B++){if(E[B]){if(typeof E[B]=="string"){if(E[B]=="&nbsp;"){C.innerHTML+="&nbsp;"}else{E[B]=document.createTextNode(E[B]);C.appendChild(E[B])}}else{C.appendChild(E[B])}}}return C}};var DOM=DomBuilder.apply();
Array.prototype.map=function(C){if(!C.apply){var D=C;C=function(E){return E[D]}}var A=[];for(var B=0;B<this.length;B++){A.push(C(this[B],this,B))}return A};Array.prototype.mapc=function(C){if(!C.apply){var E=C;C=function(F){return F[E]}}var A=[];var D;for(var B=0;B<this.length;B++){D=C(this[B],this,B);if(D!=undefined){A=A.concat(D)}}return A};Array.prototype.grep=function(C){if(!C.apply){var D=C;C=function(E){return E[D]}}var A=[];for(var B=0;B<this.length;B++){if(C(this[B],this,B)){A.push(this[B])}}return A};Array.prototype.foreach=function(B){if(!B.apply){var C=B;B=function(E,D,F){D[F]=E[C]}}for(var A=0;A<this.length;A++){B(this[A],this,A)}return };function map(D,A){var B=[];for(var C=0;C<A.length;C++){B.push(D(A[C]))}return B}Array.prototype.firstMatch=function(B){if(!B.apply){var C=B;B=function(D){return D[C]}}for(var A=0;A<this.length;A++){if(B(this[A],this,A)){return this[A]}}return undefined};Array.prototype.firstMatchIndex=function(B){if(!B.apply){var C=B;B=function(D){return D[C]}}for(var A=0;A<this.length;A++){if(B(this[A],this,A)){return A}}return undefined};Array.prototype.match=function(B){for(var A=0;A<this.length;A++){if(B(this[A],this,A)){return true}}return false};Array.prototype.shiftLeft=function(B){if(B>this.length){B=this.length}if(B<0){B=0}for(var A=0;A<this.length-B;A++){this[A]=this[A+B]}this.length=this.length-B};Array.prototype.shiftRight=function(B){if(B<0){B=0}this.length=this.length+B;for(var A=this.length-1;A>=0;A--){this[A]=this[A-B]}};Array.prototype.pop=function(){if(!this.length){return undefined}var A=this[this.length-1];this.length=this.length-1;return A};Number.prototype.times=function(B){if(!B||!B.apply||this<=0){return }for(var A=0;A<this;A++){B(A)}};function foreach(C,A){for(var B=0;B<A.length;B++){C(A[B])}};
var KeyManager=new function(){this.nHotKeysLevel=0;this.nHotKeysLevelMax=2;this.nHelperOffsetX=8;this.nHelperOffsetY=-11;this.nHelperOffsetBelowY=16;this.nHelperOffsetLeftX=-30;this.nHelperOffsetLeftY=4;this.rgReleaseKeys=["textarea","input","select-one","select","text","file"];this.sSnippetKey="";this.oPopupBrowser=null;this.oMenuBrowser=null;this.oGridBrowser=null;this.bBrowsingGrid=false;this.fxActivationKey=function(e,s,oWindow){if(!oWindow){oWindow=window}return((e.altKey||e.ctrlKey)&&!(oWindow.event&&oWindow.event.altKey&&!window.webkit)&&!(e.altKey&&e.ctrlKey)&&(";"==s||","==s))};this.rgHotKeyPopups=[];this.rgHotKeys=[{cKey:this.sSnippetKey,id:"Menu_Snippets",nLevel:1},{cKey:"a",id:"assign",nLevel:1},{cKey:"a",id:"assign0",pos:"below",nLevel:1},{cKey:"a",id:"assign1",nLevel:1},{cKey:"a",id:"idApproveThread",nLevel:1},{cKey:"b",id:"idBugFromThread",nLevel:1},{cKey:"c",id:"Button_CancelEdit",nLevel:1},{cKey:"c",id:"Button_CancelEmail",nLevel:1},{cKey:"c",id:"Button_Cancel",nLevel:1},{cKey:"c",id:"Button_CancelResolve",nLevel:1},{cKey:"c",id:"idTimesheetConfirmCancel",nLevel:1},{cKey:"d",id:"Menu_Discuss",bBrowse:true,bMenu:true,nLevel:1},{cKey:"e",id:"editClosed",nLevel:1},{cKey:"e",id:"editClosed0",pos:"below",nLevel:1},{cKey:"e",id:"editClosed1",nLevel:1},{cKey:"e",id:"edit",nLevel:1},{cKey:"e",id:"edit0",pos:"below",nLevel:1},{cKey:"e",id:"edit1",nLevel:1},{cKey:"e",id:"idEditArticle",nLevel:1},{cKey:"e",id:"idThisDiscussionGroup",nLevel:1},{cKey:"f",id:"Menu_Filter",bBrowse:true,bMenu:true,nLevel:1},{cKey:"g",id:"Menu_LogInOut",bBrowse:true,nLevel:1},{cKey:"h",id:"FBHome",pos:"homelogo",nLevel:1},{cKey:"i",id:"email",nLevel:1},{cKey:"i",id:"email0",pos:"below",nLevel:1},{cKey:"i",id:"email1",nLevel:1},{cKey:"i",id:"email1",nLevel:1},{cKey:"i",id:"idThreadInfo",nLevel:1},{cKey:"i",id:"idViewHistory",nLevel:1},{cKey:"i",id:"idViewInfo",nLevel:1},{cKey:"j",id:"browseGrid",pos:"center",nLevel:1,bNeverFocus:true},{cKey:"k",id:"Menu_Wiki",bBrowse:true,bMenu:true,nLevel:1},{cKey:"l",id:"Menu_List",nLevelAnchor:1,levelAnchorPos:"center",idLevelContainer:"mainnav",bBrowse:true,nLevel:1},{cKey:"m",id:"Menu_Email",bBrowse:true,nLevel:1},{cKey:"n",id:"Menu_New",bBrowse:true,nLevel:1},{cKey:"o",id:"Button_SendEmail",nLevel:1},{cKey:"o",id:"Button_OKEdit",nLevel:1},{cKey:"o",id:"Button_OK",nLevel:1},{cKey:"o",id:"Button_Save",nLevel:1},{cKey:"o",id:"Button_Resolve",nLevel:1},{cKey:"p",id:"Menu_Reports",bBrowse:true,bMenu:true,nLevel:1},{cKey:"q",id:"Button_SendAndCloseEmail",nLevel:1},{cKey:"q",id:"Button_ResolveAndClose",nLevel:1},{cKey:"q",id:"Button_SaveAndClose",nLevel:1},{cKey:"r",id:"resolve",nLevel:1},{cKey:"r",id:"resolve0",pos:"below",nLevel:1},{cKey:"r",id:"resolve1",nLevel:1},{cKey:"r",id:"Menu_Register",bBrowse:true,nLevel:1},{cKey:"s",id:"idDropList_searchFor_oText",pos:"center",nLevel:1},{cKey:"s",id:"searchFor",pos:"center",nLevel:1},{cKey:"t",id:"reactivate",nLevel:1},{cKey:"t",id:"reactivate0",pos:"below",nLevel:1},{cKey:"t",id:"reactivate1",nLevel:1},{cKey:"t",id:"idNewTopic",nLevel:1},{cKey:"u",id:"reopen",nLevel:1},{cKey:"u",id:"reopen0",pos:"below",nLevel:1},{cKey:"u",id:"reopen1",nLevel:1},{cKey:"u",id:"idUndeleteThread",nLevel:1},{cKey:"v",id:"move",nLevel:1},{cKey:"v",id:"idReviewHeldThreads",nLevel:1},{cKey:"v",id:"idEditReleaseNotes",nLevel:1},{cKey:"v",id:"idViewArticle",nLevel:1},{cKey:"w",id:"forward",nLevel:1},{cKey:"w",id:"forward0",pos:"below",nLevel:1},{cKey:"w",id:"forward1",nLevel:1},{cKey:"w",id:"idReviewDeletedThreads",nLevel:1},{cKey:"w",id:"idNewArticle",nLevel:1},{cKey:"x",id:"close",nLevel:1},{cKey:"x",id:"close0",pos:"below",nLevel:1},{cKey:"x",id:"close1",nLevel:1},{cKey:"x",id:"idDeleteThread",nLevel:1},{cKey:"x",id:"idKeepThreadDeleted",nLevel:1},{cKey:"y",id:"reply",nLevel:1},{cKey:"y",id:"reply0",pos:"below",nLevel:1},{cKey:"y",id:"reply1",nLevel:1},{cKey:"y",id:"idReplyToTopic",nLevel:1},{cKey:"z",id:"remind",nLevel:1},{cKey:"z",id:"linkSubscribe",pos:"below",nLevel:1},{cKey:"z",id:"linkUnsubscribe",pos:"below",nLevel:1},{cKey:"?",id:"Menu_Help",bBrowse:true,bMenu:true,nLevel:1},{cKey:"!",id:"spam",nLevel:1},{cKey:"!",id:"spam0",pos:"below",nLevel:1},{cKey:"!",id:"spam1",nLevel:1},{cKey:"/",id:"discussSearchFor",nLevel:1},{cKey:"/",id:"setmilestone",nLevel:1},{cKey:"[",id:"viewPreviousTop",pos:"below",nLevel:1},{cKey:"[",id:"viewPreviousBottom",nLevel:1},{cKey:"]",id:"viewNextTop",pos:"below",nLevel:1},{cKey:"]",id:"viewNextBottom",nLevel:1},{cKey:"+",id:"idAttachFile",nLevel:1},{cKey:"+",id:"idOlderTopics",nLevel:1},{cKey:"+",id:"idOtherTopics",nLevel:1},{cKey:"+",id:"addsubcase",nLevel:1},{cKey:".",id:"Menu_Favorites",bBrowse:true,bMenu:true,nLevel:1},{cKey:"@",id:"Menu_Extras",bBrowse:true,bMenu:true,nLevel:1},{cKey:"*",id:"star",nLevel:1},{cKey:"*",id:"star0",pos:"below",nLevel:1},{cKey:"*",id:"star1",nLevel:1},{cKey:"=",id:"Menu_Settings",bBrowse:true,bMenu:true,nLevel:1},{cKey:"-",id:"Menu_Admin",bBrowse:true,bMenu:true,nLevel:1},{cKey:"\\",id:"Menu_Working_On",bBrowse:true,bMenu:true,nLevel:1},{cKey:"a",id:"idFilterLinkPopPersonAssignedTo",bBrowse:true,bMenu:true,nLevel:2},{cKey:"b",id:"idFilterLinkPopOpenClosed",bBrowse:true,bMenu:true,nLevel:2},{cKey:"c",id:"mainColumnPopupLink",bBrowse:true,bMenu:true,nLevel:2},{cKey:"d",id:"idFilterLinkPopResolvedInLast",bBrowse:true,bMenu:true,nLevel:2},{cKey:"e",id:"idFilterLinkPopDueInNext",bBrowse:true,bMenu:true,nLevel:2},{cKey:"f",id:"idFilterOptFieldsPop",bBrowse:true,bMenu:true,nLevelAnchor:2,idLevelContainer:"idFilterDescription",levelanchorpos:"left",nLevel:2},{cKey:"f",id:"idFilterLinkPopRefine",bBrowse:true,bMenu:true,nLevelAnchor:2,idLevelContainer:"idFilterDescription",nLevel:2},{cKey:"g",id:"idViewLink",bBrowse:true,bMenu:true,nLevel:2},{cKey:"h",id:"idFilterLinkPopSubscribedBugs",bBrowse:true,bMenu:true,nLevel:2},{cKey:"i",id:"idFilterLinkPopOpenInLast",bBrowse:true,bMenu:true,nLevel:2},{cKey:"k",id:"idFilterLinkPopClosedInLast",bBrowse:true,bMenu:true,nLevel:2},{cKey:"l",id:"idFilterLinkPopClient",bBrowse:true,bMenu:true,nLevel:2},{cKey:"l",id:"idFilterLinkPopDepartment",bBrowse:true,bMenu:true,nLevel:2},{cKey:"m",id:"idFilterLinkPopToolbarActions",bBrowse:true,bMenu:true,nLevel:2},{cKey:"n",id:"idFilterLinkPopMaxrecords",bBrowse:true,bMenu:true,bMenu:true,nLevel:2},{cKey:"o",id:"idFilterLinkPopPersonOpenedBy",bBrowse:true,bMenu:true,nLevel:2},{cKey:"o",id:"idFilterOptOpenAllPop",bBrowse:true,bMenu:true,nLevel:2},{cKey:"p",id:"idFilterLinkPopProject",bBrowse:true,bMenu:true,nLevel:2},{cKey:"q",id:"idFilterLinkPopPriority",bBrowse:true,bMenu:true,nLevel:2},{cKey:"r",id:"idFilterLinkPopArea",bBrowse:true,bMenu:true,nLevel:2},{cKey:"s",id:"idFilterLinkPopStatus",bBrowse:true,bMenu:true,nLevel:2},{cKey:"s",id:"idFilterLinkPopTerm",bBrowse:true,bMenu:true,nLevel:2},{cKey:"t",id:"idFilterLinkPopCategory",bBrowse:true,bMenu:true,nLevel:2},{cKey:"u",id:"idFilterLinkPopCustom1",bBrowse:true,bMenu:true,nLevel:2},{cKey:"v",id:"idFilterLinkPopCustom2",bBrowse:true,bMenu:true,nLevel:2},{cKey:"w",id:"idFilterLinkPopSaveCurrentAs",bBrowse:true,bMenu:true,nLevel:2},{cKey:"x",id:"idFilterLinkPopFixFor",bBrowse:true,bMenu:true,nLevel:2},{cKey:"y",id:"idFilterLinkPopMissingEstimate",bBrowse:true,bMenu:true,nLevel:2},{cKey:"z",id:"idFilterLinkPopSentBy",bBrowse:true,bMenu:true,nLevel:2},{id:"idFilterSearchAnchor",nLevelAnchor:2,idLevelContainer:"idFilterDescription"}];var hkMapInit={};this.hkMap=hkMapInit;this.rgHotKeys.foreach(function(_){if(_.bBrowse){hkMapInit[_.id]=_}});this.setSnippetKey=function(sSnippetKeyInit){this.sSnippetKey=sSnippetKeyInit;this.rgHotKeys[0].cKey=this.sSnippetKey};this.registerElPopupKeys=function(elPop){if(!elPop){return }function registerNodes(rg){for(var ix=0;ix<rg.length;ix++){var el=rg[ix];var cKey=el.getAttribute("cHotKey");if(cKey){KeyManager.registerPopupKey(cKey,el.id,elPop)}if(isTagName(el,"input")&&el.type.toLowerCase()=="text"){el.setAttribute("autocomplete","off")}}}registerNodes(elPop.getElementsByTagName("input"));registerNodes(elPop.getElementsByTagName("button"));registerNodes(elPop.getElementsByTagName("a"))};this.registerPopupKey=function(cKeyInit,sId,oPopupInit){this.rgHotKeys.push({cKey:cKeyInit,id:sId,nLevel:1,oPopup:oPopupInit});this.rgHotKeyPopups[oPopupInit.id]=true};this.removePopupKeys=function(oPopup){while(this.rgHotKeys[this.rgHotKeys.length-1].oPopup==oPopup){this.rgHotKeys.pop()}};this.activateHotKeys=function(){if(0==this.nHotKeysLevel){return true}var bMadeAtLeastOne=false;var idLevelContainer="";var oTopmost=theMgr.getTopmostObject();if(!oTopmost||!oTopmost.id||!this.rgHotKeyPopups[oTopmost.id]){oTopmost=null}var keyHelpers=document.createElement("SPAN");keyHelpers.id="keyHelpers";for(var i=0;i<this.rgHotKeys.length;i++){var oKey=this.rgHotKeys[i];if(oKey.nLevel==this.nHotKeysLevel&&oKey.oPopup==oTopmost){var elHelper=elById(oKey.id);var keyHelper=null;if(null!=elHelper&&(!elHelper.getAttribute("keydisabled"))&&isDisplayed(elHelper)&&(null==elHelper.className||!$(elHelper).hasClass("actionButtonDisabled"))){var pt=getAbsolutePosition(elHelper);keyHelper=document.createElement("DIV");keyHelper.id="keyHelper_"+i;keyHelper.className="hotkeyHelper";keyHelper.style.zIndex=10;var keyToDisp=oKey.cKey.toUpperCase();if("<"==keyToDisp){keyToDisp="&lt;"}else{if(">"==keyToDisp){keyToDisp="&gt;"}}keyHelper.innerHTML=keyToDisp;this.positionKeyHelper(keyHelper,pt,elHelper,oKey.pos);keyHelpers.appendChild(keyHelper);bMadeAtLeastOne=true}}if(null!=oKey.nLevelAnchor&&this.nHotKeysLevel!=oKey.nLevelAnchor&&oTopmost==null){var elHelper=elById(oKey.id);var keyHelper=null;if(null!=elHelper&&isDisplayed(elHelper)&&(!elHelper.getAttribute("keydisabled"))&&(null==elHelper.className||("actionButtonDisabled"!=elHelper.className))){var pt=getAbsolutePosition(elHelper);keyHelper=document.createElement("DIV");keyHelper.id="keyHelper_"+i;keyHelper.className="hotkeyHelper";var keyToDisp=oKey.nLevelAnchor;keyHelper.innerHTML=keyToDisp;this.positionKeyHelper(keyHelper,pt,elHelper,oKey.levelAnchorPos);keyHelpers.appendChild(keyHelper)}}if(null!=oKey.nLevelAnchor&&this.nHotKeysLevel==oKey.nLevelAnchor&&isDisplayed(oKey.id)){idLevelContainer=oKey.idLevelContainer}}if(bMadeAtLeastOne){document.body.appendChild(keyHelpers);this.browseMenus(idLevelContainer)}if(window.opera){safeFocus(window)}if(typeof (oWysiwyg)!="undefined"){oWysiwyg.blur()}return bMadeAtLeastOne};this.positionKeyHelper=function(keyHelper,pt,elHelper,pos){var x=0;var y=0;if(keyHelper){if(pos&&"center"==pos){x=pt.x+elHelper.offsetWidth/2-5;y=pt.y+2}else{if(pos&&"homelogo"==pos){if(elHelper.firstChild==elHelper.lastChild&&isTagName(elHelper.firstChild,"img")){elHelper=elHelper.firstChild;pt=getAbsolutePosition(elHelper)}x=pt.x+elHelper.offsetWidth/2-5;y=pt.y-elHelper.offsetHeight/4}else{if(pos&&"below"==pos){x=pt.x+this.nHelperOffsetX;y=pt.y+this.nHelperOffsetBelowY}else{if(pos&&"left"==pos){x=pt.x+this.nHelperOffsetLeftX;y=pt.y+this.nHelperOffsetLeftY}else{x=pt.x+this.nHelperOffsetX;y=pt.y+this.nHelperOffsetY}}}}if(x<1){x=1}if(y<1){y=1}keyHelper.style.left=x+"px";keyHelper.style.top=y+"px"}};this.deactivateHotKeys=function(){this.nHotKeysLevel=0;this.hideHotKeys()};this.cleanupOnClick=function(){this.deactivateHotKeys();this.oMenuBrowser=null;this.bBrowsingGrid=false;if(this.oGridBrowser){this.oGridBrowser.cleanup()}var elCursor=this.getElCursor();if(elCursor){elCursor.style.display="none"}return true};this.hideHotKeys=function(){var keyHelpers=elById("keyHelpers");if(keyHelpers!=null&&keyHelpers.parentNode!=null){keyHelpers.parentNode.removeChild(keyHelpers)}};this.giveFocus=function(el){if(null==el){return false}if(true==this.hkMap[el.id].bMenu&&el.onclick){this.simulateClick(el);safeFocus(el)}else{theMgr.maskClicks();safeFocus(el)}return true};this.keystroke=function(e,oWindow){if(!oWindow){oWindow=window}var keyCode=getKeyCode(e);if(keyCode>=16&&keyCode<=18){return true}if(!window.webkit&&keyCode==191&&!document.all&&this.nHotKeysLevel&&e.shiftKey){return false}var sKey=String.fromCharCode(KeyboardMap.fix(keyCode,false,oWindow));var sTypeFocused="";var elFocused=null;var nActionLevel=this.nHotKeysLevel;if(e&&e.target&&e.target.type){sTypeFocused=e.target.type.toLowerCase();elFocused=e.target}else{if(oWindow.event&&oWindow.event.srcElement&&oWindow.event.srcElement.tagName){elFocused=oWindow.event.srcElement;sTypeFocused=elFocused.tagName.toLowerCase();if(elFocused.type){sTypeFocused=elFocused.type.toLowerCase()}e=oWindow.event}}if(0==sKey.length&&(e.altKey||e.ctrlKey)){return true}if(this.nHotKeysLevel>0){this.hideHotKeys()}if(this.fxActivationKey(e,String.fromCharCode(KeyboardMap.fix(keyCode,true,oWindow)))){IdPop.hideNow();do{this.nHotKeysLevel=(this.nHotKeysLevel+1)%(this.nHotKeysLevelMax+1)}while(!this.activateHotKeys());return cancel(e)}this.nHotKeysLevel=0;if(27==keyCode){Info.hide();if(null!=elFocused&&null!=elFocused.id&&"idSnippet"==elFocused.id.substring(0,9)){hideSnippetHelper();return cancel(e)}else{theMgr.hideAllPopups();if(theMgr.getTopmostPopup()!=null){return }if(nActionLevel==0){EditableTableManager.hideAllPanes();ShadowManager.hideAllShadows()}if(this.oMenuBrowser){this.oMenuBrowser.cleanup();this.oMenuBrowser=null}if(this.bBrowsingGrid){this.oGridBrowser.cleanup();this.bBrowsingGrid=false;this.getElCursor().style.display="none"}return cancel(e)}}if(0==nActionLevel){if(e.ctrlKey&&!e.altKey&&typeof (oWysiwyg)!="undefined"){if(!oWysiwyg.ctrlKeyDownEvent(sKey.toLowerCase())){return cancel(e)}}if(this.rgReleaseKeys.firstMatch(function(_){return _==sTypeFocused})){if(27==keyCode&&elFocused!=null&&elFocused.blur){elFocused.blur();return cancel(e)}return true}}if(!e.altKey&&!e.ctrlKey&&!e.metaKey&&((!window.opera&&(33<=keyCode&&40>=keyCode))||106==keyCode||107==keyCode||74==keyCode||75==keyCode||45==keyCode||43==keyCode)){if(0!=nActionLevel&&this.oGridBrowser&&(33==keyCode||34==keyCode||35==keyCode||36==keyCode||38==keyCode||40==keyCode)){var bMove=false;if(this.oGridBrowser.elCurrent){bMove=true}this.browseGridRows();if(40==keyCode&&!bMove){return cancel(e)}}var oListBrowser=null;if(null!=this.oPopupBrowser&&isDisplayed(this.oPopupBrowser.elContainer)){oListBrowser=this.oPopupBrowser}else{if(this.bBrowsingGrid&&null==this.oMenuBrowser&&null!=this.oGridBrowser&&null!=this.oGridBrowser.elContainer){oListBrowser=this.oGridBrowser}}if((33==keyCode&&this.oGridBrowser&&oListBrowser==this.oGridBrowser&&this.oGridBrowser.goNPrevious(this.getGridScrollNum()))||(34==keyCode&&this.oGridBrowser&&oListBrowser==this.oGridBrowser&&this.oGridBrowser.goNNext(this.getGridScrollNum()))||(35==keyCode&&oListBrowser&&oListBrowser.goToLast())||(36==keyCode&&oListBrowser&&oListBrowser.goToFirst())||(37==keyCode&&this.oMenuBrowser&&this.oMenuBrowser.goToPrevious())||((38==keyCode||107==keyCode||75==keyCode)&&oListBrowser&&oListBrowser.goToPrevious())||(39==keyCode&&this.oMenuBrowser&&this.oMenuBrowser.goToNext())||((40==keyCode||106==keyCode||74==keyCode)&&oListBrowser&&oListBrowser.goToNext())||((38==keyCode||40==keyCode)&&this.oMenuBrowser&&this.oMenuBrowser.elCurrent&&this.oMenuBrowser.elCurrent.onclick&&this.oMenuBrowser.elCurrent.onclick())){return cancel(e)}else{if(this.oMenuBrowser){if(this.oPopupBrowser&&this.oPopupBrowser.elCurrent&&(45==keyCode||43==keyCode)){var sNameRefine=null;var oFilterRefine=null;sNameRefine=this.oPopupBrowser.elCurrent.getAttribute("sNameRefine");if(sNameRefine){oFilterRefine=elById("idRefineFilter"+sNameRefine)}if(oFilterRefine&&(43==keyCode)&&oFilterRefine.style.display=="none"){this.simulateClick(this.oPopupBrowser.elCurrent)}else{if(oFilterRefine&&(45==keyCode)&&oFilterRefine.style.display!="none"){this.simulateClick(this.oPopupBrowser.elCurrent)}}}if(0==nActionLevel){return cancel(e)}else{this.oMenuBrowser.cleanup();this.oMenuBrowser=null}}}}if(!e.metaKey&&0!=nActionLevel){if(keyCode>48&&keyCode<=48+this.nHotKeysLevelMax&&!e.shiftKey){this.nHotKeysLevel=keyCode-48;if(this.activateHotKeys()){return cancel(e)}}this.oMenuBrowser=null;var oTopmost=theMgr.getTopmostObject();if(!oTopmost||!oTopmost.id||!this.rgHotKeyPopups[oTopmost.id]){oTopmost=null}var sKeyLower=sKey.toLowerCase();var sKeyUpper=sKey.toUpperCase();var key=this.rgHotKeys.firstMatch(function(_){return nActionLevel==_.nLevel&&(oTopmost==_.oPopup)&&(_.cKey==sKeyLower||_.cKey==sKeyUpper)&&isDisplayed(elById(_.id))&&!(elById(_.id)).getAttribute("keydisabled")});if(key){var elToClick=elById(key.id);if(!key.bNeverFocus){try{if(isDisplayed(elToClick)){safeFocus(elToClick)}}catch(err){}}if(this.simulateClick(elToClick)){return cancel(e)}}return cancel(e)}return true};this.simulateClick=function(elToClick){if(elToClick!=null){if(isDisplayed(elToClick)){if(document.selection&&elToClick.click){try{elToClick.click()}catch(err){}return true}else{var clicked=false;try{elToClick.click();clicked=true}catch(err){}if(!clicked){try{if(((!elToClick.onclick||elToClick.onclick())&&(!ourHasEvent(elToClick,"click")||ourDispatchEvent(elToClick,"click")))&&elToClick.href){document.location=elToClick.href}}catch(err){}}return true}}}return false};this.browseMenus=function(idContainerInit){this.oMenuBrowser=new ListBrowser(elById(idContainerInit),function(el){return el.id&&KeyManager.hkMap[el.id]},function(el){KeyManager.giveFocus(el)},function(el){theMgr.hideAllPopups()},null,null,null);return false};this.browsePopup=function(idContainerInit){this.oPopupBrowser=new ListBrowser(elById(idContainerInit),function(el){return null!=el.tagName&&"a"==el.tagName.toLowerCase()&&!(1==el.getAttribute("fKbSkip"))},function(el){if(el&&el.focus){safeFocus(el)}},function(el){},null,function(el){el.onfocus=function(){null!=KeyManager.oPopupBrowser&&KeyManager.oPopupBrowser.setElCurrent(this)};el.onmouseover=function(){var onmouseoverOld=this.getAttribute("onmouseover");if(onmouseoverOld&&typeof (onmouseoverOld)=="string"){this.onmouseoverOld=function(){return eval(onmouseoverOld)}}if(this.onmouseoverOld&&this.onmouseoverOld.apply){this.onmouseoverOld.apply(this)}if(!window.opera){safeFocus(this)}}},null);return false};this.browseCheckboxPopup=function(idContainerInit){this.oPopupBrowser=new ListBrowser(elById(idContainerInit),function(el){return null!=el.type&&"checkbox"==el.type()},function(el){safeFocus(el)},function(el){},null,function(el){el.onfocus=function(){null!=KeyManager.oPopupBrowser&&KeyManager.oPopupBrowser.setElCurrent(this)};el.onmouseover=function(){if(!window.opera){safeFocus(this)}}},null);return false};this.browseTimesheetGrid=function(idContainerInit){this.oPopupBrowser=new ListBrowser(elById(idContainerInit),function(el){return null!=el.tagName&&"img"==el.tagName.toLowerCase()&&"a"==el.parentNode.tagName.toLowerCase()},function(el){safeFocus(el.parentNode);KeyManager.gridBrowserPositionCursor(el)},function(el){return },function(el){return false},null,function(el){return });if(!this.oPopupBrowser.elCurrent){this.oPopupBrowser.goToNext()}return false};this.browseGridRows=function(){if(!this.oGridBrowser){this.setupGridBrowser()}if(this.oGridBrowser){this.oMenuBrowser=null;theMgr.maskClicks();this.bBrowsingGrid=true;if(this.oGridBrowser.elCurrent){setTimeout("KeyManager.oGridBrowser.fxEnter(KeyManager.oGridBrowser.elCurrent);",1)}else{this.oGridBrowser.goToNext()}return false}else{return true}};this.getElCursor=function(){return elById("kbCursor")};this.gridBrowserGetElPos=function(el){if(el.parentNode&&el.parentNode.parentNode&&el.parentNode.parentNode.tagName&&"tr"==el.parentNode.parentNode.tagName.toLowerCase()){el=el.parentNode.parentNode;while(window.webkit&&!el.offsetWidth&&el.firstChild){el=el.firstChild}return el}else{return el}};this.gridBrowserPositionCursor=function(el){var elPos=this.gridBrowserGetElPos(el);var elCursor=KeyManager.getElCursor();var pt=getAbsolutePosition(elPos);elCursor.style.display="block";elCursor.style.zIndex=10;elCursor.style.left=(pt.x-elCursor.offsetWidth-3)+"px";elCursor.style.top=(pt.y+(elPos.offsetHeight-elCursor.offsetHeight)/2)+"px"};this.getGridScrollNum=function(){var elPos=this.gridBrowserGetElPos(this.oGridBrowser.elCurrent);return((window.innerHeight?window.innerHeight:document.documentElement.clientHeight)/elPos.offsetHeight)-4};this.setupGridBrowser=function(){var elGrid=elById("bugGrid");if(elGrid){this.oGridBrowser=new ListBrowser(elGrid,function(el){return(null!=el.type&&"checkbox"==el.type)||(isTagName(el,"a")&&isTagName(el.firstChild,"img")&&el.firstChild.alt==FB_ICON_NEW)},function(el){ourDispatchEvent(getParentRow(el),"mouseover");safeFocus(el);KeyManager.gridBrowserPositionCursor(el)},function(el){ourDispatchEvent(getParentRow(el),"mouseout")},function(el){return false},null,function(el){})}else{if(elById("dlgGrid")){this.oGridBrowser=new ListBrowser(elById("dlgGrid"),function(el){return null!=el.tagName&&"a"==el.tagName.toLowerCase()&&((el.title&&FB_ICON_EDIT==el.title||FB_ICON_NEW==el.title)||(el.className&&el.className.indexOf("discuss")==0))},function(el){safeFocus(el);KeyManager.gridBrowserPositionCursor(el.parentNode)},function(el){return },function(el){return false},function(el){ourAttachEvent(el,"keypress",function(e){keypressDiscussList(e,el)})},function(el){return })}}return false}};function ListBrowser(A,F,B,E,G,D,C){this.fxTest=F;this.fxEnter=B;this.fxLeave=E;this.fxDoToEach=D;this.fxDeadEnd=G;this.fxOnClean=C;this.fxOnLeave=null;this.elContainer=A;this.elCurrent=null;this.setElCurrent=function(H){if(isUnderNode(H,this.elContainer)){this.elCurrent=H}};this.doFxToEach=function(){if(null==this.fxDoToEach){return }var I=this.findNextUnder(null);var H=null;while(null!=I){this.fxDoToEach(I);H=this.findNextUnder(I);if(I==H){I=null}else{I=H}}};this.traverse=function(J,L){var I=this.elCurrent;var K;for(var H=0;H<L;H++){K=(J?this.findNextUnder(this.elCurrent):this.findPreviousUnder(this.elCurrent));if(K==this.elCurrent){if(null==this.fxDeadEnd){K=(J?this.findNextUnder(null):this.findPreviousUnder(null))}else{if(null!=I){this.fxLeave(I)}this.fxEnter(this.elCurrent);return this.fxDeadEnd()}}this.elCurrent=K}if(null!=I){this.fxLeave(I)}this.fxEnter(this.elCurrent);return true};this.goToNext=function(){return this.traverse(true,1)};this.goToPrevious=function(){return this.traverse(false,1)};this.goNNext=function(H){return this.traverse(true,H)};this.goNPrevious=function(H){return this.traverse(false,H)};this.goToFirst=function(){this.dropCurrent();return this.traverse(true,1)};this.goToLast=function(){this.dropCurrent();return this.traverse(false,1)};this.dropCurrent=function(){if(this.elCurrent){this.fxLeave(this.elCurrent);this.elCurrent=null}};this.findNextUnder=function(H){return this.findUnder(H,function(I){return I.nextSibling},function(I){return I.firstChild})};this.findPreviousUnder=function(H){return this.findUnder(H,function(I){return I.previousSibling},function(I){return(document.selection?I.childNodes[I.childNodes.length-1]:I.lastChild)})};this.findUnder=function(L,J,M){if(null==this.elContainer){return null}var I=null;var H=false;var K=false;if(null!=L){I=L}else{if(null!=M(this.elContainer)){I=M(this.elContainer);H=true}else{return null}}while(null!=I){if(null!=I&&this.fxTest(I)&&H&&!K){return I}else{if(null!=I.tagName&&null!=I.style&&"none"!=I.style.display&&null!=M(I)&&!K){I=M(I);H=true;K=false}else{if(null!=J(I)){I=J(I);H=true;K=false}else{if(document.getParent(I)!=this.elContainer){I=document.getParent(I);if(this.fxOnLeave&&this.fxTest(I)){this.fxOnLeave(I)}H=true;K=true}else{I=null}}}}}return L};this.cleanup=function(){if(this.elCurrent&&this.elCurrent.blur){try{this.elCurrent.blur()}catch(H){}}if(this.fxOnClean){this.fxOnClean(this.elCurrent)}};this.doFxToEach()}var KeyboardMap=new function(){this.fix=function(H,B,A){if(!A){A=window}var F=window.ie||(window.webkit&&!window.webkitPre31);if(!F){return H}var C=navigator.userLanguage||navigator.language;if(!C){return H}var D=this.map[C];if(!D){D=this.map["en-us"]}var E=0;if(A.event.shiftKey){E+=1}if(!B&&(A.event.ctrlKey)){E+=2}if(A.event.altKey){E+=4}var G="n"+H+"s"+E;if(D[G]){return D[G]}else{return H}}};KeyboardMap.map={};KeyboardMap.map["en-us"]={n49s1:33,n222s1:34,n51s1:35,n52s1:36,n53s1:37,n55s1:38,n222s0:39,n57s1:40,n48s1:41,n56s1:42,n187s1:43,n188s0:44,n189s0:45,n190s0:46,n191s0:47,n186s1:58,n186s0:59,n188s1:60,n187s0:61,n190s1:62,n191s1:63,n50s1:64,n219s0:91,n220s0:92,n221s0:93,n54s1:94,n189s1:95,n192s0:96,n65s0:97,n66s0:98,n67s0:99,n68s0:100,n69s0:101,n70s0:102,n71s0:103,n72s0:104,n73s0:105,n74s0:106,n75s0:107,n76s0:108,n77s0:109,n78s0:110,n79s0:111,n80s0:112,n81s0:113,n82s0:114,n83s0:115,n84s0:116,n85s0:117,n86s0:118,n87s0:119,n88s0:120,n89s0:121,n90s0:122,n219s1:123,n220s1:124,n221s1:125,n192s1:126,n8s2:127,n0s0:0};
var g_ActionTokens=new function(){this.dictToken={};this.setTokens=function(A){this.dictToken=A};this.getToken=function(A){return this.dictToken[A]};this.injectURLToken=function(A){if(A.data){if(typeof A.data=="string"){A.data=this.injectURLTokenInString(A.data)}else{if(typeof A.data=="object"){this.injectURLTokenInObject(A.data)}}}if(A.url){A.url=this.injectURLTokenInString(A.url)}};this.injectURLTokenInString=function(D){if(D){var C=D.match(/[?&]sActionToken=[^&]+/i);if(C&&C.length>0){a}var B=D.match(/[?&]pre=[^&]+/i);if(B&&B.length>0){var A=B[B.length-1].slice(5);var E=this.getToken(A);if(E){D=D.replace(A,A+"&"+ACTION_TOKEN_NAME+"="+E)}}}return D};this.injectURLTokenInObject=function(C){if(C&&C.pre){var A=C.pre;var B=this.getToken(A);if(B){C[ACTION_TOKEN_NAME]=B}}}};
$.ajaxSetup({url:sDefaultURI,cache:false,timeout:300000});$(document).ajaxError(ajaxShowError);function ajaxStatus(B){var A=0;try{A=B.status}catch(C){}return A}function ajaxResponseText(B){var A="";try{A=B.responseText}catch(C){}return A}function ajaxIsBusy(A){if(!A){return false}return((A.readyState!=4)&&(A.readyState!=0))}function ajaxAbort(A){if(!A){return }if(A.readyState!=0&&A.readyState!=4){A.onreadystatechange=function(){return false};A.abort()}}function ajaxShowError(F,E,D,H,A){var C=ajaxStatus(E);if(C==0||C==200){return }if(D.fIgnoreDefaultError){return }if(A=="timeout"){ajaxDefaultFailure();return }if(!E||!ajaxResponseText(E)){return }var G=document.createElement("form");var B=document.createElement("textarea");G.appendChild(B);G.name="formWithError";G.action=FB_DEFAULT_URL;G.method="POST";B.name="sAjaxError";B.style.display="none";B.value=ajaxResponseText(E);document.body.appendChild(G);G.submit()}function ajaxDefaultFailure(){Info.showBriefly(FB_NO_RESPONSE);EditableTableManager.hideAllPanes()}function ajaxApproveSimultaneous(D,C){if(D&&D.fDenySimultaneousByCaller){if(C.fRequestOutbound){return false}var B=D.success;var A=D.error;D.success=function(E){C.fRequestOutbound=false;if(B){B(E)}};D.error=function(E){C.fRequestOutbound=false;if(A){A(E)}};C.fRequestOutbound=true}return true}var Process=new function(){var A=[];var B="";this.start=function(E,D,F,C){A[D]={fxnCleanup:F,fInfo:(C!=null)};if(!E){E=window}if(E[D]&&E[D].call){if(!E[D+"_original"]){E[D+"_original"]=E[D]}E[D]=function(){var G=B;B=D;try{E[D+"_original"].apply(E,arguments)}finally{B=G;Process.stop(D)}}}if(C){Info.show(C)}};this.cancelInfoHide=function(){if(!A[B]){return }A[B].fInfo=false};this.stop=function(C){if(!A[C]){return }if(A[C].fInfo){Info.hide();A[C].fInfo=false}A[C]=null};this.haltAll=function(){for(var C in A){if(!A[C]){continue}if(A[C].fxnCleanup&&A[C].fxnCleanup.call){A[C].fxnCleanup.call()}if(A[C].fInfo){Info.hide();A[C].fInfo=false}if(!(window.ie||window.opera||window.webkit)){A[C]=null}}}};
var ClockCalBinding=new function(){this.dictClockFromCalMap={};this.rgPairs=[];this.add=function(A,B){if(!A||!B){return }this.rgPairs.push({idCal:A,idClock:B});this.dictClockFromCalMap[A]=B;if(window.fDomLoaded){this.associate(this.rgPairs.length-1)}};this.init=function(){for(var A=0;A<this.rgPairs.length;A++){this.associate(A)}};this.associate=function(D,C){if(!this.rgPairs||!this.rgPairs[D]){return }var B=elById(this.rgPairs[D].idCal);var A=elById(this.rgPairs[D].idClock);if(!B||!A){if(!C){setTimeout(function(){ClockCalBinding.associate(D,true)},0)}return }B.onchange=this.getOnChange(B,A,true);A.onchange=this.getOnChange(B,A,false)};this.getOnChange=function(D,A,F){var E=F?A:D;var C=F?D:A;var B=F?GetLocaleTime():GetLocaleDate();return function(){if(E.value.length==0&&C.value.length==0){return }if(E.value.length==0||E.value==B){E.value=F?CTZGetWorkdayStart():CTZGetToday()}}}};function Clock(){this.txtID="";this.localeTime=GetLocaleTime();this.f12HourTime=false;var A=this.localeTime.toLowerCase();this.f12HourTime=(A.indexOf("a")!=-1)||(A.indexOf("p")!=-1);this.dt=new UTCDate()}Clock.prototype.show=function(F){if(!(elById("tblTime"))){var E=document.createElement("DIV");E.innerHTML=pictureOf(CalendarTimeTable);document.body.appendChild(E);theMgr.add("tblTime")}this.txtID=F;elById("timeTableSelect").size=20;var B=elById("timeTableSelect");B.size=20;var A=UTCFromCTZ(this.guessTime(elById(F).value));if(A.getMinutes()<30){A.setMinutes(0)}if(A.getMinutes()>30){A.setMinutes(30)}var D=this.getPrintableTime(CTZFromUTC(A));for(var C=0;C<B.options.length;C++){if(B.options[C].value==D){B.selectedIndex=C}}theMgr.showPopup("tblTime",elById(F),-2,elById(F).offsetHeight-2,false)};Clock.prototype.focus=function(A){if(A){safeFocus(elById(this.txtID))}else{safeFocus(elById("timeTableSelect"))}};Clock.prototype.setTime=function(A){this.dt=new UTCDate(A)};Clock.prototype.getPrintableTime=function(B){var G=CTZFromUTC(B?B:this.dt);var H=this.localeTime;var C=G.getHours();var A=G.getMinutes()+"";var E="";var D="";var F=(H.toLowerCase().lastIndexOf("a")!=-1)?H.toLowerCase().lastIndexOf("a"):H.toLowerCase().lastIndexOf("p");if(F>0){D=H.substr(F);D=trim(D)}if(D.length>0){if(G.getHours()==0){C="12"}if(G.getHours()>12){C=G.getHours()-12}E=D;if(G.getHours()>11){E=D.replace(/a/,"p");E=E.replace(/A/,"P")}}H=H.replace(new RegExp(FB_HOUR_CODE),(C.length==1&&!this.f12HourTime?"0":"")+C);H=H.replace(new RegExp(FB_MINUTE_CODE),A.length==1?"0"+A:A);H=H.replace(D,E);return H};Clock.prototype.hide=function(){var A=elById(this.txtID);if(A){A.value=this.getPrintableTime();if(A.onchange&&A.onchange.call){A.onchange.call()}}theMgr.hidePopup("tblTime")};Clock.prototype.guessAMPM=function(B,A){if(typeof (A)=="undefined"){A=this.f12HourTime}if(A&&B>0&&B<8){return B+12}else{return B}};Clock.prototype.guessTime=function(A){return UTCFromCTZ(this.CTZguessTime(A))};Clock.prototype.CTZguessTime=function(A){var E=CTZNow();E.setSeconds(0);E.setMinutes(0);var D=/^\s*([012]?\d)[:\.]?([012345]\d)[:\.]?([012345]?\d?)\s*$/;var F=D.exec(A);if(F){if(typeof (F[1])!="undefined"){E.setHours(this.guessAMPM(parseInt(F[1],10)))}if(typeof (F[2])!="undefined"){E.setMinutes(F[2])}if(typeof (F[3])!="undefined"){if(!isNaN(parseInt(F[3],10))){E.setSeconds(parseInt(F[3],10))}}return E}D=/^\s*([012]?\d)[:\.]?(\d\d)?[:\.]?(\d\d)?\s?([ap])\.?m?\.?\s*$/i;F=D.exec(A);if(F){if(F[4].toLowerCase()=="p"&&parseInt(F[1],10)<12){var C=F[1];if(C.length>1&&C.substr(0,1)=="0"){C=C.substr(1)}E.setHours(parseInt(C,10)+12)}else{if(F[4].toLowerCase()=="a"&&parseInt(F[1],10)==12){E.setHours(0)}else{E.setHours(F[1])}}if(!isNaN(parseInt(F[2],10))){E.setMinutes(F[2])}return E}A=trim(A.toLowerCase());if(A=="noon"){E.setHours(12);return E}if(A=="midnight"){E.setHours(0);return E}if(A=="now"){return CTZNow()}D=/^\s*(\d+)\s*$/;F=D.exec(A);if(F!=null&&typeof (F[1])!="undefined"){E.setHours(this.guessAMPM(parseInt(F[1],10)));return E}E=CTZNow();if(A.indexOf("minute")!=-1||A.indexOf("hour")!=-1){D=/(\d+)/;F=D.exec(A);if(F!=null&&typeof (F[1])!="undefined"){n=parseInt(F[1],10)}else{for(var B=0;B<this.rgNumbers.length;B++){if(A.indexOf(this.rgNumbers[B])!=-1){n=B}}}if(A.indexOf("minute")!=-1){E.setMinutes(E.getMinutes()+n)}else{E.setHours(E.getHours()+n)}return E}E.setHours(12);E.setMinutes(0);E.setSeconds(0);return E};function Calendar(){this.rgMonths=FB_MONTHS;this.rgDays=GetWeekdays();this.rgNumbers=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty","twentyone","twentytwo","twentythree","twentyfour","twentyfive","twentysix","twentyseven","twentyeight","twentynine","thirty"];this.iFirstDayOfWeek=parseInt(FB_FIRST_DAY_OF_WEEK,10);this.dt=new UTCFromCTZNoon();this.dtShowing=new UTCDate(this.dt);this.layout=[[1,2,3,4,5,6,7],[8,9,10,11,12,13,14],[15,16,17,18,19,20,21],[22,23,24,25,26,27,28],[29,30,31,1,2,3,4],[5,6,7,8,9,10,11]];this.bPastOK=false;this.bFutureOK=true;this.txtID="";this.txtTimeID="";this.localeDate=GetLocaleDate()}Calendar.prototype.drawMe=function(){if(!(elById("tblCalendar"))){var E=document.createElement("DIV");E.innerHTML=pictureOf(CalendarTable);document.body.appendChild(E);theMgr.add("tblCalendar")}var C;for(C=0;C<this.rgDays.length;C++){elById("weekday"+C.toString()).innerHTML=this.rgDays[(C+this.iFirstDayOfWeek)%(this.rgDays.length)].toString().substr(0,1)}var F=CTZFromUTC(this.dtShowing);F.setDate(1);F.setHours(12,0,1);var D=0;if(F.getDay()>this.iFirstDayOfWeek){D=F.getDay()-this.iFirstDayOfWeek}else{if(F.getDay()<this.iFirstDayOfWeek){D=F.getDay()+(6-this.iFirstDayOfWeek)+1}else{D=7}}F.setDate(F.getDate()-D);var A=UTCFromCTZNoon();for(C=0;C<6;C++){for(var B=0;B<=6;B++){this.layout[C][B]=UTCFromCTZ(F);var E=elById(C.toString()+","+B.toString());E.innerHTML=CTZFromUTC(this.layout[C][B]).getDate();if(F.getMonth()==CTZFromUTC(this.dtShowing).getMonth()){if(this.dateInRange(UTCFromCTZ(F))){E.style.color="#000000"}else{E.style.color="#777777"}}else{E.style.color="#777777"}if(this.sameDate(UTCFromCTZ(F),A)){E.style.border="1px solid black"}else{E.style.border=""}if(this.sameDate(UTCFromCTZ(F),this.dt)){E.style.backgroundColor="#cccccc"}else{E.style.backgroundColor="#ffffff"}F.setDate(F.getDate()+1)}}elById("MonthTitle").innerHTML=this.rgMonths[CTZFromUTC(this.dtShowing).getMonth()]+"&nbsp;"+(CTZFromUTC(this.dtShowing).getFullYear());return true};Calendar.prototype.focus=function(){safeFocus(elById("0,0"))};Calendar.prototype.dateInRange=function(C){var A=CTZNoon();var B=CTZFromUTC(C);return this.sameDate(B,A)||(this.bPastOK&&B<A)||(this.bFutureOK&&B>A)};Calendar.prototype.sameDate=function(B,A){return B.getYear()==A.getYear()&&B.getMonth()==A.getMonth()&&B.getDate()==A.getDate()};Calendar.prototype.fwdMonth=function(){if(this.dtShowing.getDate()>28){this.dtShowing.setDate(1)}this.dtShowing.setMonth(this.dtShowing.getMonth()+1);this.drawMe()};Calendar.prototype.backMonth=function(){if(this.dtShowing.getDate()>28){this.dtShowing.setDate(1)}this.dtShowing.setMonth(this.dtShowing.getMonth()-1);this.drawMe()};Calendar.prototype.setDay=function(C){elById(C).blur();var A=C.split(",",2);var B=this.layout[A[0]][A[1]];if(!this.dateInRange(B)){return }this.dt=B;this.dtShowing=CTZFromUTC(this.dt);this.drawMe();this.hide()};Calendar.prototype.show=function(C,A){this.txtID=C;this.txtTimeID=ClockCalBinding.dictClockFromCalMap[C];this.dtToday=new UTCDate();this.drawMe();if(A!=null){C=A}var B=elById("idCalendarTextBar");if(B){B.style.display=(this.fTextBar?"":"none")}theMgr.showPopup("tblCalendar",elById(C),-2,elById(C).offsetHeight-2,false)};Calendar.prototype.showTips=function(){if(trim(elById("calTips").innerHTML)==""){elById("calTips").innerHTML=GetCalendarTip()}else{elById("calTips").innerHTML=""}};Calendar.prototype.hide=function(){var A=elById(this.txtID);if(A){A.value=CTZsDateRawFromUTC(this.dt);if(A.onchange&&A.onchange.call){A.onchange.call()}}A=elById("calTips");if(A){A.innerHTML=""}theMgr.hidePopup("tblCalendar")};Calendar.prototype.setDate=function(A){this.dt=new UTCDate(A);this.dtShowing=new UTCDate(this.dt)};Calendar.prototype.guessDate=function(A){return UTCFromCTZ(this.CTZguessDate(A))};Calendar.prototype.CTZguessDate=function(A){var C=new BrowserDate(A);C.setHours(12,0,1);var E=CTZNoon();var K,H,B;if(A.match(/^\d?\d$/)){var J=parseInt(A,10);var L=E.getMonth();B=E.getFullYear();if(J<E.getDate()){L++;if(L>=12){L-=12;B++}}C=new BrowserDate(B,L,J,12,0,1);if(!isNaN(C)){return C}}if(A.match(/^\d\d\d\d[\:\-\.\/]\d?\d[\:\-\.\/]\d?\d$/)){K=/^(\d\d\d\d)[\:\-\.\/](\d?\d)[\:\-\.\/](\d?\d)$/;H=K.exec(A);C=new BrowserDate(parseInt(H[1],10),parseInt(H[2],10)-1,parseInt(H[3],10),12,0,1);if(!this.bPastOK&&C<E&&!(C.getYear()==E.getYear()&&C.getMonth()==E.getMonth()&&C.getDate()==E.getDate())){C=new BrowserDate(E);C.setHours(12,0,1)}if(!isNaN(C)){return C}}if(A.match(/^\d?\d[\:\-\.\/]\d?\d[\:\-\.\/]?\d?\d?\d?\d?$/)){K=/^\s*(\d?\d)[\:\-\.\/](\d?\d)[\:\-\.\/]?((\d\d)?\d\d)?\s*$/;H=K.exec(A);if(H){B=E.getFullYear();if(typeof (H[3])!="undefined"){if(H[3].length==2){B="20"+H[3]}else{if(H[3].length==4){B=H[3]}}}if(this.localeDate.indexOf(FB_MONTH_CODE)==0){C=new BrowserDate(B,parseInt(H[1],10)-1,parseInt(H[2],10),12,0,1)}else{C=new BrowserDate(B,parseInt(H[2],10)-1,parseInt(H[1],10),12,0,1)}if(!this.bPastOK&&C<E&&!(C.getYear()==E.getYear()&&C.getMonth()==E.getMonth()&&C.getDate()==E.getDate())){C=new BrowserDate(E);C.setHours(12,0,1)}if(!isNaN(C)){return C}}}var M=CTZNoon();A=trim(A.toLowerCase());if(A==FB_TODAY){return CTZNoon()}if(A==FB_TOMORROW){M.setDate(M.getDate()+1);return M}if(A==FB_DAY_AFTER_TOMORROW||A==FB_THE_DAY_AFTER_TOMORROW){M.setDate(M.getDate()+2);return M}if(A==FB_YESTERDAY){M.setDate(M.getDate()-1);return M}var F,D;for(F=0;F<this.rgDays.length;F++){if(A.indexOf(this.rgDays[F].toLowerCase().substr(0,3))!=-1&&A.indexOf(FB_MONTH_STEM)==-1){var G=M.getDay();if(F>G){M.setDate(M.getDate()+(F-G))}else{if(F<G){M.setDate(M.getDate()+(F+1+(6-G)))}else{if(A.indexOf(FB_NEXT_STEM)!=-1){M.setDate(M.getDate()+7)}}}return M}}for(F=0;F<this.rgMonths.length;F++){K=/(\d+)/;D=0;H=K.exec(A);if(H&&typeof (H[1])!="undefined"){D=parseInt(H[1],10)}if(A.indexOf(this.rgMonths[F].toLowerCase().substr(0,3))!=-1){if(D!=0){M.setMonth(F);M.setDate(D);if(M<E){M.setFullYear(M.getFullYear()+1)}}else{var I=M.getMonth();if(F>I){M.setMonth(M.getMonth()+(F-I))}else{if(F<I){M.setMonth(M.getMonth()+(F+1+(11-I)))}else{M.setMonth(M.getMonth()+12)}}M.setDate(1)}return M}}if(A.indexOf(FB_DAY_STEM)!=-1||A.indexOf(FB_WEEK_STEM)!=-1||A.indexOf(FB_MONTH_STEM)!=-1||A.indexOf(FB_YEAR_STEM)!=-1){K=/(\d+)/;D=0;H=K.exec(A);if(H==null){D=1}else{if(typeof (H[1])!="undefined"){D=parseInt(H[1],10)}}if(A.indexOf(FB_DAY_STEM)!=-1){M.setDate(M.getDate()+D)}else{if(A.indexOf(FB_WEEK_STEM)!=-1){M.setDate(M.getDate()+(7*D))}else{if(A.indexOf(FB_MONTH_STEM)!=-1){M.setMonth(M.getMonth()+D)}else{if(A.indexOf(FB_YEAR_STEM)!=-1){M.setFullYear(M.getFullYear()+D)}}}}return M}M=new BrowserDate(A);M.setHours(12,0,1);if(isNaN(M.getDate())||M.getYear()==1||M.getYear()==69){return CTZNoon()}return M};
this.IdPop=new function(){var C;var I;var H;var J;var K;var O=[];var F=[];var B=null;var P;var E;var G;var R;var M;var N;var D;var S;var L=18;var Q=4;var A=false;this.init=function(){if(!A){theMgr.addWithHandler("caseIdPopup",function(){ShadowManager.hideShadow("idPop");return true});if(!C){C=elById("caseIdPopup")}if(!I){I=elById("caseIdContent")}if(C){C.style.zIndex=4}A=true}};this.hide=function(){P=null;setTimeout(this.doHide,200)};this.hideNow=function(){P=null;this.doHide()};this.doHide=function(){if(P!=null){return }IdPop.init();if(ajaxIsBusy(B)){ajaxAbort(B)}R=false;ShadowManager.hideShadow("idPop");FadeManager.startFadeOut("idPop",C,null);if(window.ie){theMgr.showSelects()}};this.stopHide=function(){if(R){P=E}};this.show=function(){if(R){return }this.init();G=false;ShadowManager.hideShadow("idPop");positionElement(C,(xMouse+Q),(yMouse+Q));FadeManager.startFadeIn("idPop",C,IdPop.setPosition,true,IdPop.setShadow);R=true;if(window.ie){theMgr.hideSelects()}};this.setShadow=function(){ShadowManager.applyShadow("idPop",D,S,C)};this.setPosition=function(){if(G||C.style.display=="none"){return }IdPop.setSize();var T=getInWindowCoordinates(C,J,K,H,L,Q);positionElement(C,T.x,T.y);D=T.x;S=T.y;G=true};this.setSize=function(){sizeElement(C,null,I.offsetHeight)};this.startTimer=function(U,W,T){var V=T?T:500;this.init();H=W;J=calculateOffset(H,"offsetLeft");K=calculateOffset(H,"offsetTop");P=U;R=false;if(F[U]){return }if(!O[U]){setTimeout("IdPop.sendIdPopRequest("+U+")",150)}setTimeout("IdPop.fill("+U+")",V)};this.fill=function(T){if(T!=P){return }if(F[T]){return }if(!O[T]){setTimeout("IdPop.fill("+T+")",200);return }I.innerHTML=O[T];E=T;this.show()};this.sendIdPopRequest=function(T){if(T!=P){return }if(ajaxIsBusy(B)){ajaxAbort(B)}var U=this;B=$.ajax({type:"GET",url:sDefaultURI,data:{fAlaCarte:1,pg:"pgAlaCarteBugDetails",ixBug:T},fIgnoreDefaultError:true,success:function(V){U.resultIdPopRequest(V)}})};this.resultIdPopRequest=function(T){if(typeof $=="undefined"){return }var U=$("ixBug",T).text();if(U!=P){return }var V=$("sHTML",T).text();if(!V||!V.length){F[U]=true;return }O[U]=V}};
var xMouse=0;var yMouse=0;var bCancelEvents=false;var sDefaultURI;var bUserTyped=false;var bSelectBoxChanged=0;function domContentLoad(){if(typeof (g_fPageHasLoaded)=="undefined"||!g_fPageHasLoaded){return }window.fDomLoaded=true;sDefaultURI=FB_DEFAULT_URL;if(typeof (dhtmlHistory)!="undefined"){dhtmlHistory.initialize();dhtmlHistory.addListener(handleHistoryChange)}ClockCalBinding.init();hideMiniReports();restoreSubscriptionState();if(window.ie||(window.webkit&&window.versionMajorWebKit>=5)){window.document.onkeydown=handleDocumentKeydown}else{window.document.onkeypress=handleDocumentKeydown}window.document.onkeyup=handleDocumentKeyup;window.document.onmouseup=mouseupDocument;window.document.onmousemove=mousemoveDocument;window.onunload=bodyUnload;window.document.onselectstart=function(){return !bCancelEvents};window.onresize=resizeWindow;setFocusToWindow();if(window.TabManager){TabManager.setWindowTitle()}setTimeout(function(){if(window.initializeListView){initializeListView()}if(window.TabManager){TabManager.addBugEditToolTips()}updateStarsOnLoad();loadPopupContent();ShadowManager.preload()},1)}function fixCustomLogo(A){var B=$("#containerLogo img")[0];if(B){if(B.offsetHeight<A){B.style.marginTop=((A-B.offsetHeight)/2)+3+"px"}}}function bodyLoad(){if(typeof (window.oProxy)!="undefined"){oProxy.ping()}shrinkImagesToFit()}function bodyUnload(){if(window.ie6){cleanupIE6MemoryLeaks()}if(window.SelectionManager){SelectionManager.reset()}if(window.oWysiwyg&&oWysiwyg.oSpellChecker&&oWysiwyg.oSpellChecker.oDict){oWysiwyg.oSpellChecker.oDict.cancel()}}function cleanupIE6MemoryLeaks(){DropListControl.unload()}function handleFilterChangeKeydown(A,B){if(getKeyCode(B)==13){theMgr.hideAllPopups();A.form.submit();if(B){B.returnValue=false}return false}else{if(getKeyCode(B)==27){theMgr.hideAllPopups()}}return true}function loadPopupContent(){if(!window.IsLoggedIn||!IsLoggedIn()){return }if(typeof (g_ixBugSelectedInit)!="undefined"&&!g_ixBugSelected){g_ixBugSelected=g_ixBugSelectedInit}var A={fAlaCarte:1,pg:"pgAlaCartePopupContent",fPgFavorites:IntFromBool($("#pgFavorites").length>0),fList:IntFromBool(window.ListControl),fPlatformChrome:IntFromBool(window.fPlatformChrome),sSearchString:SearchString()};if(g_ixBugSelected){A.ixBug=g_ixBugSelected}$.get(sDefaultURI,A,resultPopupContent)}function resultPopupContent(A){setFavoritesContent($("sHTML_favoritesPopup",A).text(),$("sAllFavorites",A).text(),$("sHTML_pgFavorites",A).text());setPopupContent("workingOnPopup",$("sHTML_workingOnPopup",A).text(),elById("Menu_Working_On"));setPopupContent("adminPopup",$("sHTML_adminPopup",A).text(),elById("Menu_Admin"));setPopupContent("settingsPopup",$("sHTML_settingsPopup",A).text(),elById("Menu_Settings"));setPopupContent("extrasPopup",$("sHTML_extrasPopup",A).text(),elById("Menu_Extras"));if(window.ListControl){ListControl.setFilterRefinePopupContent($("sHTML_filterRefinePopup",A).text(),A);setPopupContent("columnPopup",$("sHTML_columnPopup",A).text(),elById("mainColumnPopupLink"));setPopupContent("gridViewPopup",$("sHTML_gridViewPopup",A).text(),elById("idViewLink"))}if(window.GridBoxManager){GridBoxManager.loadBoxes(A)}}function resizeWindow(A){if(window.oWysiwyg&&oWysiwyg.oMainChild){oWysiwyg.setWysSize()}if(window.ie6){if(!resizeWindow.elTB){resizeWindow.elTB=elById("tbFull")}if(!resizeWindow.elTB){return }resizeWindow.elTB.style.width=Math.max(windowWidth(),800)+"px"}}function mouseupDocument(A){if(window.SelectionManager){SelectionManager.stopDragging()}if(window.GridControl){GridControl.stopActions()}if(window.EditableTableManager){EditableTableManager.stopDragging()}if(window.FavoritesList){FavoritesList.stopDrag()}if(window.Sliders){Sliders.stopDrag()}}function mousemoveDocument(C){if(!C){C=window.event}if(C.pageX!=null){xMouse=C.pageX;yMouse=C.pageY}else{if(C.clientX!=null){xMouse=C.clientX;yMouse=C.clientY;var B=document.documentElement;var A=document.body;if(B.scrollLeft){xMouse+=B.scrollLeft}else{if(A.scrollLeft){xMouse+=A.scrollLeft}}if(B.scrollTop){yMouse+=B.scrollTop}else{if(A.scrollTop){yMouse+=A.scrollTop}}}}notifyMouseMovement()}function notifyMouseMovement(){if(window.GridControl){GridControl.notifyMovement()}if(window.SelectionManager){SelectionManager.notifyMovement()}if(window.EditableTableManager){EditableTableManager.notifyMovement()}if(window.FavoritesList){FavoritesList.notifyMovement()}if(window.Sliders){Sliders.notifyMovement()}}function hideMiniReports(){if(!window.g_fMiniReports){return }var A=$("a[id^=link_mini]");if(A.length<2){return }A.map(function(){toggleReport(this)})}function toggleReport(C){if(!C){return }var D=C.id.substring(5);var B=(getCookie("fb_"+D)!="0");var A=C.getElementsByTagName("img")[0];if(B){show(elById(D));A.setAttribute("alt","-");A.src=StaticContentUrl("images/minus.gif")}else{hide(elById(D));A.setAttribute("alt","+");A.src=StaticContentUrl("images/plus.gif")}}function handleFormKeyup(B){if(!isTagName(B,"form")){return false}if(B.getAttribute("disableCtrlEnter")){return false}var A=false;$("input:visible[type=submit][click]",B).each(function(){if(isDisplayed(this)){this.click();A=true;return false}});if(!A){B.submit()}return true}function handleDocumentKeydown(C,A){if(!C&&A){C=A.event}if(!C){C=window.event}if(!C){return }bUserTyped=true;var B=getKeyCode(C);if(window.SelectionManager){SelectionManager.checkboxDown(B)}KeyManager.keystroke(C,A);if(B==27){Process.haltAll();if(window.GridControl){GridControl.cancelActions()}}if(C.ctrlKey&&B==13){var D=getEventTarget(C);if(D&&D.form){D=D.form}if(handleFormKeyup(D,C)){return false}}return true}function isTab(A){var B=getKeyCode(A);return(B==9||(window.webkit&&B==25))}function handleDocumentKeyup(B){if(!B){B=window.event}if(!B){return }var A=getKeyCode(B);if(window.SelectionManager){SelectionManager.checkboxUp(null,B)}return true}function handleHistoryChange(A,B){if(window.ViewHistoryManager){ViewHistoryManager.addViewHistory(true);ViewHistoryManager.handleHistoryChange(A,B)}if(window.GraphHistory){GraphHistory.handleHistoryChange(A,B)}}function getOverflowAbove(B){var A=B.parentNode;while(A){if(A.scrollWidth>A.offsetWidth){return A}else{A=A.parentNode}}return null}function shrinkImagesToFit(A){if(window.GridControl){return }$("img").each(function(){shrinkImageToFit(this,A)})}function shrinkImageToFit(E,D){if(!E){return }if(!isImgLoaded(E)){setTimeout(function(){shrinkImageToFit(E,D)},200);return }if(!$(E).is(":visible")){return }var C=D?300:720;var J=D?300:1000;if(D||(E.getAttribute("inline")!=null&&E.getAttribute("noshrink")==null)){var I=getOverflowAbove(E);E.xwidth=E.offsetWidth;E.xheight=E.offsetHeight;var B=E.xwidth;var A=E.xheight;if(B==0){return }if(I&&!isTagName(I,"html")){var F=calculateOffset(I,"offsetLeft")+I.offsetWidth;var G=calculateOffset(E,"offsetLeft")+E.offsetWidth;var H=(!window.ie6?10:25);if(G+H>F){B=(E.offsetWidth-(G-F)-H);A=E.xheight*(B/E.xwidth)}}if(B>C){A=E.xheight*(C/E.xwidth);B=C;if(A>J){B=B*(J/A);A=J}}else{if(A>J){B=E.xwidth*(J/E.xheight);A=J}}if(B!=E.xwidth){E.style.width=B+"px"}if(A!=E.xheight){E.style.height=A+"px"}E.processed=true}}function showSearchingInfo(B,A){if(B&&B.metaKey){return }if(A&&A.form&&A.form.searchFor){if(A.form.searchFor.value.length>0){Info.show(FB_SEARCHING)}}}function restoreSubscriptionState(){var A=elById("idSubscriptionState");if(A){updateSubscriptionState(parseInt(A.value,10))}}function updateSubscriptionState(A){$("#containerSubscribe #subscribe").css("display",(A?"none":""));$("#containerSubscribe #unsubscribe").css("display",(A?"":"none"));$("#containerSubscribe #idSubscriptionState").attr("value",(A?1:0));if(window.goBug){goBug.fSubscribed=A}}function quickSubscription(A,B){updateSubscriptionState(B);sendNewSubscriptionRequest(A.href.replace("?","?fAlaCarte=1&"))}function sendNewSubscriptionRequest(A){$.get(A)}function quickDiscussModerate(B,A,C){$("#containerDiscussAdmin"+A+" span[id]").map(function(){var D="none";if((C&&$(this).attr("id")=="adminDeleting")||(!C&&$(this).attr("id")=="adminApproving")){D=""}$(this).css("display",D)});$.get(B.href.replace("?","?fAlaCarte=1&"),null,function(D){var F=$("ixDiscussTopic",D).text();var E=$("sHTML",D).text();if(F!=null&&E&&E.length){$("#containerDiscussTopic"+F).html(E)}})}function DeleteFixFor(D,B,E,A,C){$.post(sDefaultURI,{fAlaCarte:1,ixFixForEditing:E,ixProjectEditing:A,fAnyProject:C,pre:"preDeleteFixFor"},function(F){EditableTableManager.result(D,F)})}function UndeleteFixFor(D,B,E,A,C){$.post(sDefaultURI,{fAlaCarte:1,ixFixForEditing:E,ixProjectEditing:A,fAnyProject:C,pre:"preUndeleteFixFor"},function(F){EditableTableManager.result(D,F)})}function quickEditArea(A,B){if(!B){return }$.post(sDefaultURI,{fAlaCarte:1,ixProject:A,pre:B.form.preToEdit?B.form.preToEdit.value:"",ixArea:B.form.ixToEdit?B.form.ixToEdit.value:"",sArea:B.form.sToEdit?B.form.sToEdit.value:"",ixPersonOwner:B.form.ixPersonOwnerToEdit?B.form.ixPersonOwnerToEdit.value:-1},function(C){EditableTableManager.result("AreaTable",C)})}function quickEditCommunityPeople(D,C){var B="";$(":checkbox[name='ixBulkPerson']:checked").each(function(G,F){B+=F.value+","});var E=$(":input[name='sPeopleName']").val();var A=$(":input[name='sPeopleWildcard']").val();$.post(sDefaultURI,{fAlaCarte:1,pg:"pgAddCommunityUsers",rgixPerson:B,sPeopleName:E,sPeopleWildcard:A,ixGroup:C},function(F){EditableTableManager.result("CommunityTable",F)})}function quickEditSnippets(A){if(!A){return }$.post(sDefaultURI,{fAlaCarte:1,pre:A.form.preToEdit?A.form.preToEdit.value:"",ixSnippet:A.form.ixToEdit?A.form.ixToEdit.value:"",sName:A.form.sNameToEdit?A.form.sNameToEdit.value:"",ixPerson:A.form.ixPersonToEdit?A.form.ixPersonToEdit.value:"",fGlobal:A.form.fGlobalToEdit?A.form.fGlobalToEdit.value:"",s:A.form.sToEdit?jsToVbNewLines(A.form.sToEdit.value):"",sComment:A.form.sCommentToEdit?A.form.sCommentToEdit.value:""},resultChangeSnippet)}function quickDeleteSnippet(A){$.get(sDefaultURI+"?fAlaCarte=1&pre=preDeleteSnippet&ixSnippet="+A,null,resultChangeSnippet)}function quickDeleteAttachment(C){if(!C){return }var B={fAlaCarte:1,pre:"preDeleteFile",pg:"pgAlaCarteAttachmentList",ixAttachment:C.form.ixToDelete?C.form.ixToDelete.value:""};var A=null;if(C.form.sOwner.value=="Bug"){A=C.form.ixBugEventToEdit.value;B.ixBugEvent=A;B.ixBug=C.form.ixOwner.value;B.command="edit"}else{B.sOwner=C.form.sOwner.value;B.ixOwner=C.form.ixOwner.value}$.get(sDefaultURI,B,function(F){var D=$("BugEventsHTML",F).text();if(D){doReplaceBugEvents(D)}var E=$("ixBugEventLatestPre",F).text();var H=$("ixBugEventLatestPost",F).text();if(typeof (updateBugEventLatest)!="undefined"&&updateBugEventLatest(E,H)){updateActionButtons(F)}if(window.goBug){goBug.rgCachedViews={}}var G="containerAttachmentList"+(null==A?"":"_"+A);EditableTableManager.result("DeleteAttachment",F,G);shrinkImagesToFit()})}function quickEditReleaseNotes(D,B){if(!D){return }var A=D.form.sContainerId?D.form.sContainerId.value:"";var C=D.form.sReleaseNotesToEdit?jsToVbNewLines(D.form.sReleaseNotesToEdit.value):"";$.post(sDefaultURI,{fAlaCarte:1,pre:D.form.preToEdit?D.form.preToEdit.value:"",pg:D.form.pgToEdit?D.form.pgToEdit.value:"",ixBug:D.form.ixToEdit?D.form.ixToEdit.value:"",sReleaseNotes:C},function(E){resultChangeReleaseNotes(E,C,A,B)})}function quickDeleteArea(A,B){$.get(sDefaultURI+"?fAlaCarte=1&pre=preDeleteArea&ixProject="+A+"&ixArea="+B,null,function(C){EditableTableManager.result("AreaTable",C)})}function quickDeleteFilter(A){$.get(sDefaultURI+"?fAlaCarte=1&pre=preDeleteFilter&ixFilter="+A,null,function(B){EditableTableManager.result("FilterTable",B)})}function resultChangeSnippet(jXML){var sSnippetJS=$("sSnippetJS",jXML).text();if(sSnippetJS){rgSnippet=eval(sSnippetJS);populateSnippetSelect();refreshSnippetHelper()}EditableTableManager.result("SnippetTable",jXML)}function resultChangeReleaseNotes(C,F,E,D){if(E){EditableTableManager.result(D,$("NoteLink",C),E+"Link");EditableTableManager.result(D,$("Note",C),E)}else{var A=$("BugEventsHTML",C).text();if(A){doReplaceBugEvents(A)}var B=$("ixBugEventLatestPre",C).text();var G=$("ixBugEventLatestPost",C).text();if(updateBugEventLatest(B,G)){updateActionButtons(C)}if(window.goBug){goBug.sReleaseNotes=F;goBug.rgCachedViews={}}EditableTableManager.result(D,C)}}function showDeleteAttachment(E,D,B,F,C,A){if(!showDeleteAttachment.oPop){showDeleteAttachment.oPop=FancyPopupManager.create("DeleteAttachment")}showDeleteAttachment.oPop.oDiv.innerHTML=pictureOf(EditableAttachmentPane,D,B,F,C,A);showDeleteAttachment.oPop.show(E.id,POPUP_POSITION_CENTER)}function mouseoverCaseId(A,C,B){B=B||500;IdPop.startTimer(A,C,B);if(!C.fAttached){ourAttachEvent(C,"mouseout",mouseoutCaseId);C.fAttached=true}}function mouseoutCaseId(){IdPop.hide()}function keypressDiscussList(B,A){if("*"==String.fromCharCode(KeyboardMap.fix(getKeyCode(B),false)).toLowerCase()){new ListBrowser(A.parentNode,function(C){return null!=C.tagName&&"a"==C.tagName.toLowerCase()&&("starEmpty"==C.className||"starFull"==C.className)},null,null,null,function(C){KeyManager.simulateClick(C)},null);return cancel(B)}}function internalRowEvent(B){var C;var A;if(document.all){if(window.event&&window.event.fromElement&&window.event.toElement){C=getidParentRow(window.event.fromElement);A=getidParentRow(window.event.toElement)}}else{if(B&&B.target&&B.relatedTarget){C=getidParentRow(B.target);A=getidParentRow(B.relatedTarget)}}return(C&&A&&(C==A))}function getidParentRow(B){try{B.parentNode}catch(A){return""}if(isTagName(B,"tr")&&B.id&&B.id!="row_spam"){return B.id}if(B.parentNode){B=B.parentNode}else{return null}return getidParentRow(B)}function setFocusToWindow(){if(bUserTyped){return }if(!bUserTyped&&typeof (oFocusStart)!="undefined"&&oFocusStart){safeFocus(oFocusStart);return }if(window.TabManager&&TabManager.focusCorrectFormElement()){return }if(elById("bugerror")!=null){return }var A=$("#mainArea table.biglist input:visible").not(":checkbox").get(0);if(A&&A.style.display!="none"){safeFocus(A)}}function Book(){this.idVisible=null;this.ids=[];this.hashTies={};this.addPage=function(A){this.ids.push(A)};this.addTie=function(D,C){if(!this.hashTies[C]){this.hashTies[C]=[]}var B=D.split(",");for(var A=0;A<B.length;A++){this.hashTies[C].push(B[A])}this.showTies()};this.showTies=function(){for(var A in this.hashTies){var B=this.hashTies[A];var C=elById(A);var D=this.idVisible;if(C){C.style.display=(B.match(function(E){return E==D})?"":"none")}}}}function showTab(A,G){var D=elById("rdo_"+G);if(D&&D.disabled&&!D.checked){return }A.idVisible=G;for(var B=0;B<A.ids.length;B++){var E=elById("tab_"+A.ids[B]);var C=elById("blk_"+A.ids[B]);var F=elById("rdo_"+A.ids[B]);if(A.ids[B]==G){C.style.display="";E.style.backgroundColor="#f3f6f9";D.checked=true;if(!D.disabled){E.style.color="#000000"}DropListControl.refreshWithin(C)}else{C.style.display="none";E.style.backgroundColor="";F.checked=false;if(!F.disabled){E.style.color="#444444"}}if(window.opera){$("span",E).css("position","relative").css("top","4px");$(F).css("position","relative").css("top","2px").css("left","4px")}else{if(window.webkit){$("span",E).css("position","relative").css("top","0px")}else{if(window.mozilla&&F.name==""){$(E).css("padding-right","15px")}}}}A.showTies();KeyManager.deactivateHotKeys()}function PopupMgr(){this.ids=[];this.noHideIds=[];this.rgVisiblePopups=[];this.hashOnHideHandlers={};this.hashVisible={};this.add=function(A){this.ids.push(A);return true};this.addWithHandler=function(B,A){this.ids.push(B);this.hashOnHideHandlers[B]=A};this.addNoHide=function(A){this.noHideIds.push(A);return true};this.exists=function(B){var A=function(C){return(C==B)};return(this.noHideIds.grep(A).length>0)||(this.ids.grep(A).length>0)}}PopupMgr.prototype.isNoHideId=function(B){for(var A=0;A<theMgr.noHideIds.length;A++){if(B==theMgr.noHideIds[A]){return true}}return false};PopupMgr.prototype.showShadowPopup=function(E,A,C,D,B){return this.showPopup(E,A,C,D,B,true)};PopupMgr.prototype.showTopSmallMask=function(){if(this.rgVisiblePopups.length>0){this.showSmallMask(this.rgVisiblePopups[this.rgVisiblePopups.length-1])}};PopupMgr.prototype.populateDelayedContent=function(A){if(A&&typeof (A.newContent)!="undefined"){setInnerHTML(A,A.newContent);A.newContent=undefined}};PopupMgr.prototype.showPopup=function(D,J,I,E,G,H,F){var P=elById(D);this.populateDelayedContent(P);KeyManager.registerElPopupKeys(P);if(G||G==null){this.hideAllPopups(true)}this.showTopSmallMask();this.rgVisiblePopups.push(D);this.hashVisible[D]=true;P.fChildOfPane=EditableTableManager.isVisible();if(window.ie6){$("select",P).attr("idOwner",D)}var C=documentWidth();if(P&&((P.style.display=="none")||P.style.visibility=="hidden")){this.hideSelects();P.style.visibility="hidden";P.style.display="";if(!F){ShadowManager.fixShadow(P.id)}var Q={x:I,y:E};if(J!=null){Q=getAbsolutePosition(J);Q.y=Q.y+E;if((Q.x+I+P.offsetWidth)>windowRight()){Q.x=(Q.x-I-P.offsetWidth+J.offsetWidth)}else{Q.x=(Q.x+I)}}if(Q.x!=null&&Q.y!=null){P.style.left=Q.x+"px";P.style.top=Q.y+"px"}P.style.visibility="visible";if(H){ShadowManager.applySmallShadow(D,Q.x,Q.y,P)}if(J!=null){var O=calculateOffset(P,"offsetTop");var M=calculateOffset(J,"offsetTop");var B=calculateOffset(P,"offsetLeft");var A=calculateOffset(J,"offsetLeft");var L=(O-(M+E));var N=(B-(A+I));if(L>0){P.style.top=((M+E)-L)+"px"}if(N>0){P.style.left=((A+I)-N)+"px"}}var K=this;setTimeout(function(){K.maskClicks(C)},1)}return false};PopupMgr.prototype.showSmallMask=function(C){var A=elById(this.getMaskId(C));var B=elById(C);if(!A){if(!B){return }if(window.ie){A=DOM.img({src:StaticContentUrl("images/spacer.gif"),id:this.getMaskId(C),style:CSSClickMask(),alt:"",galleryimg:"no"})}else{A=DOM.div({id:this.getMaskId(C),style:CSSClickMask()},DOM.nbsp())}A.onmousedown=function(){theMgr.hideAllHigherPopups(C)};B.appendChild(A)}if(!A){return }coverElement(A,B,0,0);A.style.display=""};PopupMgr.prototype.hidePopup=function(E){if(!this.hashVisible[E]){return false}var D=elById(E);if(!D||D.style.display=="none"){this.hashVisible[E]=false;return false}if(this.hashOnHideHandlers[E]&&this.hashOnHideHandlers[E].apply){if(!this.hashOnHideHandlers[E].apply(window,jQuery.makeArray(arguments).splice(1))){return true}}if(D.fShadowed){ShadowManager.hideShadow(E)}if(D.style.display==""){D.style.display="none"}this.hashVisible[E]=false;KeyManager.removePopupKeys(D);var C=[];for(var A=0;A<this.rgVisiblePopups.length;A++){if(this.rgVisiblePopups[A]==E){C=this.rgVisiblePopups.splice(A,this.rgVisiblePopups.length-A);break}}this.unmaskClicks(E);this.showSelects(this.getTopmostPopup());C.foreach(function(F){if(F!=E){if(theMgr.hidePopup(F)){return true}}});var B=elById(this.getTopmostPopup());if(B&&!B.childOfPane&&EditableTableManager.isVisible()){EditableTableManager.unmaskPanes()}this.unmaskTopmostPopup();return false};PopupMgr.prototype.hideAllHigherPopups=function(B){for(var A=0;A<this.rgVisiblePopups.length;A++){if(B==this.rgVisiblePopups[A]&&this.rgVisiblePopups[A+1]){this.hidePopup(this.rgVisiblePopups[A+1]);if(this.rgVisiblePopups[A].fChildOfPane||!EditableTableManager.isVisible()){this.unmaskClicks(B)}break}}};PopupMgr.prototype.hideAllPanePopups=function(){for(var A=0;A<theMgr.rgVisiblePopups.length;A++){var B=elById(this.rgVisiblePopups[A]);if(B&&B.fChildOfPane){theMgr.hidePopup(theMgr.rgVisiblePopups[A]);break}}EditableTableManager.unmaskPanes();return false};PopupMgr.prototype.hideAllPopups=function(D){var A=true;for(var C=theMgr.ids.length-1;C>=0;C--){var B=this.ids[C];if(!this.hashVisible[B]){continue}if(theMgr.hidePopup(B)){A=false}}if(A){if((D==null||!D)&&!EditableTableManager.isVisible()){this.showSelects();this.unmaskClicks()}}else{this.unmaskTopmostPopup()}return false};PopupMgr.prototype.hideSelects=function(){if(!window.ie6){return }var K=document.getElementsByTagName("select");var E=theMgr.getTopmostPopup();var H=elById(E);var I=EditableTableManager.isVisible()&&(H!=null)&&!H.fChildOfPane;var J={};var L;for(var G=0;G<K.length;G++){var F=(E!=undefined&&K[G].idOwner==E);if(isVisible(K[G])&&!this.isNoHideId(K[G].id)&&(!F||I)){if(J[K[G].idOwner]==null){J[K[G].idOwner]=0}var C=J[K[G].idOwner]++;var B=elById(K[G].idOwner);var A=elById("input_"+K[G].idOwner+C);if(A&&A.style.display!="none"){continue}L=getAbsolutePosition(K[G]);var D;if(A){D=A}else{D=document.createElement("INPUT");D.type="text";D.id="input_"+K[G].idOwner+C;D.style.position="absolute"}D.style.left=(calculateOffset(K[G],"offsetLeft")-calculateOffset(B,"offsetLeft"))+"px";D.style.top=(calculateOffset(K[G],"offsetTop")-calculateOffset(B,"offsetTop"))+"px";D.style.display="";if(K[G].selectedIndex>=0){D.value=" "+trim(K[G].options[K[G].selectedIndex].innerHTML)}else{if(K[G].options.length>0){D.value=" "+trim(K[G].options[0].innerHTML)}}D.value=decodeLTGT(D.value);D.className=K[G].className+"_pseudo";if(K[G].style.width.length){D.style.width=K[G].style.width}if(K[G].style.fontSize.length){D.style.fontSize=K[G].style.fontSize}if(K[G].style.fontFamily.length){D.style.fontFamily=K[G].style.fontFamily}if(D.style.width!=""){D.style.width=(parseInt(D.style.width,10)-6)+"px"}if(K[G].offsetHeight){D.style.height=K[G].offsetHeight-4+"px"}if(!A){K[G].parentNode.insertBefore(D,K[G])}K[G].style.visibility="hidden"}}};PopupMgr.prototype.showSelects=function(E){if(!window.ie6){return }var D=elById(E);if(EditableTableManager.isVisible()&&D&&!D.fChildOfPane){return }var A;if(E){A=elById(E).getElementsByTagName("select")}else{A=document.getElementsByTagName("select")}for(var B=0;B<A.length;B++){var C=elById("input_"+E+B);if(C){C.style.display="none"}A[B].style.visibility="visible"}};PopupMgr.prototype.maskClicks=function(B){var A;if(null==B){A=documentWidth()}else{A=B}var C=elById("menuDisappearingMask"+maskType());if(C){C.style.display="";C.style.height=documentHeight()-horizontalScrollBarPadding()+"px";C.style.overflow="hidden";C.style.width=A+"px";if(window.ie&&typeof (oWysiwyg)!="undefined"&&oWysiwyg.oWindow.event){C.oncontextmenu=function(){return false}}else{C.oncontextmenu=function(){return true}}}EditableTableManager.maskPanes()};PopupMgr.prototype.getTopmostPopup=function(){if(this.rgVisiblePopups.length==0){return null}return this.rgVisiblePopups[this.rgVisiblePopups.length-1]};PopupMgr.prototype.getTopmostObject=function(){var C=this.getTopmostPopup();var B=null;if(C){B=elById(C)}var A=EditableTableManager.getVisiblePane();if(!B||(A&&!B.fChildOfPane)){return A}return B};PopupMgr.prototype.unmaskTopmostPopup=function(){var A=this.getTopmostPopup();if(A){this.unmaskClicks(A)}else{this.unmaskClicks()}};PopupMgr.prototype.unmaskClicks=function(C){if(C){var B=elById(this.getMaskId(C));if(B){B.style.display="none"}}else{var B=elById("menuDisappearingMask"+maskType());if(B){B.style.display="none"}EditableTableManager.unmaskPanes();for(var A=0;A<this.rgVisiblePopups.length;A++){B=elById(theMgr.getMaskId(this.rgVisiblePopups[A]));if(B){B.style.display="none"}}}};PopupMgr.prototype.getMaskId=function(A){return"clickmask_"+A+maskType()};function maskType(){return(window.ie)?"Img":"Div"}function popHelpWin(C,A){var B=window.open("help/"+A,"fbHelp","width=800, height=600, scrollbars=yes, toolbar=yes, location=yes, status=yes, menubar=yes, copyhistory=no, resizable=yes");safeFocus(B);return cancel(C)}function preFilterPopup(){if(preFilterPopup.fDone){return }if(!window.ListControl){return }var E=elById("filterPopup");if(!E){return }var D,B;if(SearchString()){B=elById("searchFor").value;D=true}else{B=(g_sFilterName!=FB_FILTER)?g_sFilterName:"";D=false}var F=pictureOf(NavBarFilterMenuSaveAs,D,B);var A=DOM.span();A.innerHTML=F;var C=$("form",E).get(0);C.insertBefore(A,C.firstChild);preFilterPopup.fDone=true}function doPopupClick(){theMgr.hideAllPopups();return true}function popFilterPopup(F,A,E,B){if(popFilterPopup.fxnInit){popFilterPopup.fxnInit()}if(!KeyManager.oMenuBrowser){KeyManager.browseMenus("listHeader");KeyManager.oMenuBrowser.setElCurrent(A)}var D=elById("idFilterOpt"+F);var C=elById("idPopText"+F);if(C&&F!="SaveCurrentAs"){C.value=B}popFilterPopup.id=A.id;if(D!=null){theMgr.showPopup("idFilterOpt"+F,A,0,A.offsetHeight+2,null,true);if(D.id!="idFilterOptRefine"){DropListControl.refreshWithin(D);ShadowManager.fixShadow(D.id)}}else{theMgr.showPopup("idFilterOptLoading",A,0,A.offsetHeight+2,null,true);return cancel(E)}if(C){setTimeout(function(){giveTextBoxFocus("idPopText"+F)},1)}else{if(null!=elById("idPopix"+F)){setTimeout(function(){safeFocus(elById("idPopix"+F))},1)}else{KeyManager.browsePopup("idFilterOptInner"+F)}}return cancel(E)}function toggleWorkingOnCollapsible(A){return toggleCollapsible(A,function(){ShadowManager.fixShadow("workingOnPopup")})}function toggleCollapsible(B,A){return toggleCollapsibleByElem(elById(B),elById(B+"Icon"),A)}function toggleCollapsibleByElem(B,C,A){if(B.style.display=="none"){B.style.display="block";C.src=StaticContentUrl("images/minus.gif")}else{B.style.display="none";C.src=StaticContentUrl("images/plus.gif")}if(A){A()}return"none"!=B.style.display}function handleListOfHoursKeydown(B,C){var A=getKeyCode(C);if(isTab(C)){setTimeout("theMgr.hideAllPopups()",1)}else{if(A==13||A==32){if(B.onclick){B.onclick.apply(B,[])}return cancel(C)}}return true}function showWorkingOnPopup(A){resetWorkingOnMenu();return refreshWorkingOnPopup(A)}function refreshWorkingOnPopup(A){if(!A){A=elById("Menu_Working_On")}return theMgr.showPopup("workingOnPopup",A,0,A.offsetHeight+2,null,true)||KeyManager.browseMenus("belowBanner")||KeyManager.oMenuBrowser.setElCurrent(A)||KeyManager.browsePopup("workingOnPopup")}function loadWorkingOnPopup(){if(typeof (g_ixBugSelectedInit)!="undefined"&&!g_ixBugSelected){g_ixBugSelected=g_ixBugSelectedInit}if(!elById("workingOnPopup")){return }$.get(sDefaultURI+"?fAlaCarte=1&pg=pgAlaCarteWorkingOnMenu"+(g_ixBugSelected?"&ixBug="+g_ixBugSelected:"")+(g_workingOn_fSelected?"&fSelected=1":""),null,function(A){setInnerHTML("Working_On",$("Working_On",A).text());setPopupContent("workingOnPopup",$("sHTML",A).text())})}function setFavoritesContent(D,C,E,B){if(B){$("#favoritesPopup").html(D)}else{setPopupContent("favoritesPopup",D,elById("Menu_Favorites"))}FavoritesIcons.setAllFavorites(C);var A=elById("pgFavorites");if(A){setInnerHTML(A,E)}}function updateStarsOnLoad(){var B=elById("span_stars");var A=elById("input_stars");if(B&&A){if(B.innerHTML!=A.value){FavoritesIcons.setAllFavorites(A.value)}}}function setPopupContent(D,C,A){var B=elById(D);if(!B){return }if(isVisible(B)){setInnerHTML(B,C);if(A){theMgr.hidePopup(D);KeyManager.simulateClick(A)}else{theMgr.hidePopup(D);theMgr.showPopup(D);ShadowManager.fixShadow(D)}}else{if(B){B.newContent=C}}}function handleWorkOnOtherSubmit(){var A="idWorkOnOtherInput";var B=elById(A);if(!B||!B.value){return false}var C=B.value;changeIxWorkingOn(C);return false}function preserveOnMouseover(A){var B=null;if(A){B=$("a",A).get(0);if(B&&B.onmouseover&&typeof (B.onmouseoverOld)=="undefined"){B.onmouseoverOld=B.onmouseover}}}function autoScrollDiv(A,C){if(A&&A.lastChild){var B=A.lastChild.offsetTop+A.lastChild.offsetHeight;if(A.offsetParent==A.lastChild.offsetParent){B-=A.offsetTop}if(B<=C){A.style.height=B+"px";A.style.overflow=""}else{A.style.height=C+"px";A.style.overflow="auto"}}}function refreshWorkingOn(){$.get(sDefaultURI+"?fAlaCarte=1&pg=pgWorkingOnAlaCarte",null,workingOnLinksCallback)}function changeIxWorkingOn(A){changeIxWorkingOnImpl(A,function(){theMgr.hideAllPopups()})}function setIxWorkingOnNothing(){changeIxWorkingOnImpl(0)}function changeIxWorkingOnImpl(B,A){$.get(sDefaultURI+"?fAlaCarte=1&pre=preChangeWorkOnAlaCarte&ixBug="+B,null,function(C){changeIxWorkingOnCallback(C,A)})}function workingOnLinksCallback(A){setInnerHTML("Working_On",$("Working_On",A).text());var D="idViewCaseLinkSpan";var B=$(D,A).text();if(B.length<=2){B=""}var C=setInnerHTML(D,B,true);if(C){preserveOnMouseover(C)}}function changeIxWorkingOnCallback(B,C){workingOnLinksCallback(B);var A=function(F){var E=setInnerHTML("idWorkOnError","<nobr>"+F+"&nbsp;&nbsp;</nobr>");if(E){show(E)}ShadowManager.fixShadow("workingOnPopup")};KeyManager.browsePopup("workingOnPopup");switch($("nCanWorkOn",B).text()){case"1":if(C&&C.call){C.call()}loadWorkingOnPopup();break;case"-1":var D=$("ixBugIn",B).text();if(!D){return }A(swap1(FB_INVALID_CASE,D));break;case"-2":A(swap1(FB_INVALID_CASE,FB_CLOSED));break;case"-3":var D=$("ixBugIn",B).text();if(!D){return }A(swap1(FB_CASE_HAS_NO_ESTIMATE_SHORT,D));EstimatePopup.show("workingOnPopup",D,changeIxWorkingOn,changeIxWorkingOn,null);break;case"-4":A(swap1(FB_INVALID_CASE,FB_NO_PERMISSION));break;case"-5":var D=$("ixBugIn",B).text();if(!D){return }A(FB_AFTERHOURS);AfterHoursPopup.show("workingOnPopup",D,null);break}ShadowManager.fixShadow("workingOnPopup")}var g_ixBugSelected;var g_workingOn_fSelected;function setWorkOnLink(A){if(A==g_ixBugSelected){return }if(0==A){setInnerHTML("idThisCaseSpan","",true);g_ixBugSelected=0;return }$.get(sDefaultURI+"?fAlaCarte=1&pg=pgWorkOnThisLink&ixBug="+A+"&fSelected=1",null,setWorkOnLinkCallback)}function setWorkOnLinkCallback(A){var C=$("sHTMLWorkOnThis",A).text();if(!C||C&&C.length==1){C=""}theMgr.populateDelayedContent(elById("workingOnPopup"));var D=setInnerHTML("idThisCaseSpan",C,true);if(D){preserveOnMouseover(D);ShadowManager.fixShadow("workingOnPopup");KeyManager.browsePopup("workingOnPopup");var E=$("ixBugSelected",A).text();if(E&&E!=""){g_ixBugSelected=Number(E)}var B=$("fSelected",A).text();if(B!=undefined&&B!=""){g_workingOn_fSelected=(Number(g_workingOn_fSelected)!=0)}}}function resetWorkingOnMenu(){hideWorkingOnError();$("#idWorkOnScheduleItemDiv").hide();$("#idWorkOnOtherDiv").hide();return true}function hideWorkingOnError(){$("#idWorkOnError").hide()}function doDlgConfirmation(A){enableInputsWithin("dlgConfirmation_"+A,false);Info.show(FB_SUBMITTING)}function addColumnDropdown(){var A=0;var B;for(A=0;true;A++){B=elById("gridCol_"+A);if(!B){disableElementById("addColumnButton");return }if(B.style.display=="none"){break}}B.style.display="";B=elById("gridCol_"+(A+1));if(!B){disableElementById("addColumnButton")}}function statusChange(E,F){if(!document.formWithProject||!document.formWithProject.command){return }var C=document.formWithProject.command.value;var J=elById("ixStatus");var I=elById("elDuplicatesEdit");var B=elById("sDuplicatesEdit");if(!J){return }var G=$(J).val();if(I){var D=new CStatus();if(D.Load(G)&&D.fDuplicate){I.style.display="";if(E){safeFocus(B)}var A=elById("bugviewContainerSide");if(!F&&A){A.style.display="none";setTimeout(function(){A.style.display=""},1)}}else{var H=elById("sEventEdit");if(I.style.display!="none"){B.blur()}if(E){H.focus();setTimeout(function(){H.focus()},1)}if(typeof (goDup)=="undefined"||goDup.ixBug<=0){I.style.display="none"}}}updateAssignedToDropdown();return false}function toggleReply(B){var A=nextSiblingOfType(B,"span");if(!A){return }if(A.style.display=="none"){A.style.display="";B.firstChild.innerHTML=FB_HIDE_QUOTED_TEXT}else{A.style.display="none";B.firstChild.innerHTML=FB_SHOW_QUOTED_TEXT}}function toggleSnippetPlaceholderTip(){var A=elById("snippetPlaceholdersTip");if(A){toggleVisible(A)}}function flipCheckbox(A){if(A){A.checked=!A.checked}}function verifyPermissions(D){var B=[elById("fReadCommunity"),elById("fReadPublic"),elById("fWriteCommunity"),elById("fWritePublic")];var C=[elById("nPermissionTypeNormal"),elById("nPermissionTypeGroup")];var A;if(C[0].checked){elById("ixGroup").disabled=true;for(A=0;A<B.length;A++){if(!B[A]){continue}B[A].disabled=false}if(D){if(D.checked){for(A=0;A<B.length;A++){if(!B[A]){continue}if(B[A].id==D.id){break}if(A==1&&B[2]&&B[2].id==D.id){continue}B[A].checked=true}}else{for(A=(B.length-1);A>=0;A--){if(!B[A]){continue}if(B[A].id==D.id){break}if(A==2&&B[1]&&B[1].id==D.id){continue}B[A].checked=false}}}}else{elById("ixGroup").disabled=false;for(A=0;A<B.length;A++){if(!B[A]){continue}B[A].checked=false;B[A].disabled=true}}DropListControl.refreshWithin(elById("idTblPerms"))}function initLogonControlTab(){var A=elById("tab_fogbugz");var B=elById("tab_ldap");if(!A||!B){return }ourAttachEvent(A,"click",function(){setTimeout(updateNewUserControl,1)});ourAttachEvent(B,"click",function(){setTimeout(updateNewUserControl,1)})}function initCommunityTab(){var B=elById("tab_on");var A=elById("tab_off");if(!B||!A){return }ourAttachEvent(B,"click",function(){setTimeout(updateNewUserControl,1)});ourAttachEvent(A,"click",function(){setTimeout(updateNewUserControl,1)})}function updateNewUserControl(){var D=elById("rdo_on");var F=elById("rdo_fogbugz");var B=elById("idNewUserControlSpan");var G=elById("idNewUserControl");if(!D||!F||!G||!B){return }var C=D.checked;var A=F.checked;var E=G.options[G.selectedIndex].value;B.innerHTML=pictureOf(NewUserControlSelect,A,NEW_USER_CONTROL_ANYBODY==E,C,NEW_USER_CONTROL_COMMUNITY==E);DropListControl.refreshWithin(B)}function initPeopleSearchUI(){var E=elById("dlgGrid");var K=elById("sPeopleName");var J=elById("fPeopleActive");var M=elById("fPeopleInactive");var A=elById("fPeopleBoth");var C=elById("fPeopleNormal");var D=elById("fPeopleCommunity");var F=elById("fPeopleVirtual");if(!E||!K||!J||!M||!A||!D||!C||!F){return }var G=function(){return"pg=pgAlaCartePeople&fRefine=1&"+queryParamCheckbox(C)+queryParamCheckbox(D)+queryParamCheckbox(F)+queryParamRadiobutton(J)+queryParamRadiobutton(M)+queryParamRadiobutton(A)+"sPeopleName="+encodeURIComponent(trim(K.value))};var H=new DynamicUpdate(E,G);function I(){H.update()}var L=function(N){setTimeout(I,1)};ourAttachEvent(K,"keyup",function(){H.queueUpdate()});ourAttachEvent(J.parentNode,"click",L);ourAttachEvent(M.parentNode,"click",L);ourAttachEvent(A.parentNode,"click",L);ourAttachEvent(C.parentNode,"click",L);ourAttachEvent(D.parentNode,"click",L);ourAttachEvent(F.parentNode,"click",L);var B=function(N){if(stopFormSubmission(N)){return cancel(N)}};ourAttachEvent(K,"keypress",B);ourAttachEvent(J.parentNode,"keypress",B);ourAttachEvent(M.parentNode,"keypress",B);ourAttachEvent(A.parentNode,"keypress",B);ourAttachEvent(C.parentNode,"keypress",B);ourAttachEvent(D.parentNode,"keypress",B);ourAttachEvent(F.parentNode,"keypress",B)}function initPeopleSearchUILite(){var E=elById("dlgGrid");var J=elById("sPeopleName");if(!E||!J){return }var F=elById("fShowAll");var D=elById("idShowAllLink");var G=function(){return"pg=pgAlaCartePeopleLite&"+queryParamCheckbox(F)+"sPeopleName="+encodeURIComponent(trim(J.value))};var H=new DynamicUpdate(E,G);function I(){H.update()}var A=H.finishUpdate;H.finishUpdate=function(L){A.call(H,L);if(F.checked){F.checked=false}else{$("#idShowAllLink").show()}EditableTableManager.fixShadow("CommunityTable")};var K=function(L){setTimeout(I,1)};ourAttachEvent(J,"keyup",function(){H.queueUpdate()});ourAttachEvent(F,"click",K);var C=function(L){F.checked=true;$("#idShowAllLink").hide();K(L);return cancel(L)};ourAttachEvent(D,"click",C);var B=function(L){if(stopFormSubmission(L)){return cancel(L)}};ourAttachEvent(J,"keypress",B);ourAttachEvent(F,"keypress",B)}function queryParamCheckbox(A){if(!A||!A.checked){return""}return A.name+"=1&"}function queryParamRadiobutton(A){if(!A||!A.checked){return""}return A.name+"="+A.value+"&"}function clickWorkOnOther(){hideWorkingOnError();hide(elById("idWorkOnScheduleItemDiv"));toggleVisible(elById("idWorkOnOtherDiv"));giveTextBoxFocus("idWorkOnOtherInput");ShadowManager.fixShadow("workingOnPopup")}function dlgInstructions(A){return DOM.div({"class":"editInstructions"},A)}function dlgInstructionsSpan(A){return DOM.span({"class":"editInstructions"},A)}function dlgHeader(A){return DOM.h1({},A)}function bugTip(B,C,A){var D=DOM.span();D.innerHTML=C;return DOM.div({"class":"bugTip",style:"width:300px",align:"left"},DOM.strong({style:(A?"color:red;":"")},B),DOM.hr(),D)}var Permissions=new function(){var A=false;var C=null;var B=null;this.init=function(){if(!A){C=elById("sSectionPermission");B=elById("ixSectionPermission")}A=true};this.quickGrant=function(D,E){this.init();$.post(sDefaultURI,{fAlaCarte:1,pre:"preGrantPermission",sSection:C?C.value:"",ixSection:B?B.value:0,ixPerson:D,iPermission:E},function(F){EditableTableManager.result("ProjectAdminTable",F)})}};var _g=[];function pictureOf(E){var C=_g;_g=[];var B=[];for(var D=1;D<arguments.length;D++){B[D-1]=arguments[D]}E.apply(this,B);var A=_g.join("");_g=C;return A}function Weekday(A){return A.getDay()+1}function DateAdd(A,D,C){var B=new UTCDate(C);switch(A){case"yyyy":B.setFullYear(B.getFullYear()+D);break;case"m":B.setMonth(B.getMonth()+D);break;case"d":B.setDate(B.getDate()+D);break;case"h":B.setHours(B.getHours()+D);break;case"n":B.setMinutes(B.getMinutes()+D);break;case"s":B.setSeconds(B.getSeconds()+D);break}return B}function checkCCDate(D,A){if((D!=null)&&(D.value!="")){var B=new String(D.value);var C="";if(A=="m"){if(B.length<2){C="0"}}if(A=="y"){if(B.length==1){C="200"}if(B.length==2){C="20"}}D.value=C+D.value}}var g_nextUniqueId=0;function getUniqueId(){while(elById("id_"+g_nextUniqueId)){g_nextUniqueId++}return"id_"+g_nextUniqueId}function EscapeNonEscapedDisplayNameChars(B){var C=0;var A;while((A=B.indexOf("\\",C))>=0){if(A==B.length-1||(B[A+1]!="\\"&&B[A+1]!='"')){B=B.slice(0,A)+"\\"+B.slice(A)}C=A+2}C=0;while((A=B.indexOf('"',C))>=0){if(A==0||B[A-1]!="\\"){B=B.slice(0,A)+"\\"+B.slice(A)}else{C=A+1}}return B};
var FadeManager=new function(){var A=[];this.startFadeIn=function(B,D,E,F,C){this.create(B);A[B].startFadeIn(D,E,F,C)};this.startFadeOut=function(B,C,D,E){this.create(B);A[B].startFadeOut(C,D,E)};this.fadeIn=function(B){this.create(B);A[B].fadeIn()};this.fadeOut=function(B){this.create(B);A[B].fadeOut()};this.create=function(B){if(!A[B]){A[B]=new Fader(B)}}};var YFTManager=new function(){var A=[];this.showYellow=function(C,B){this.create(C);A[C].showYellow(B)};this.hideYellow=function(B){this.create(B);A[B].hideYellow()};this.create=function(B){if(!A[B]){A[B]=new YFT(B)}}};var BlinkManager=new function(){var A=[];this.startBlink=function(D,C,E,F,B,G){if(B==null){B=75}if(G==null){G=0.5}this.create(D);A[D].startBlink(C,E,F,B,G)};this.stopBlink=function(B){this.create(B);A[B].stopBlink()};this.create=function(B){if(!A[B]){A[B]=new Blink(B)}};this.toggleBlink=function(B){this.create(B);A[B].toggleBlink()}};function Blink(C){var B=C;var D=document.createElement("div");var E=0;var A=-1;D.style.position="absolute";D.style.overflow="hidden";D.style.display="none";D.style.zIndex=15;document.body.appendChild(D);this.startBlink=function(H,L,I,G,K){if(I<=0||G<=0){return }var F=H.offsetHeight;var M=H.offsetWidth;var O=calculateOffset(H,"offsetTop");var N=calculateOffset(H,"offsetLeft");if(!F&&!M&&H.tagName.toLowerCase()=="tr"){var P=H.cells;if(P.length){N=calculateOffset(P[0],"offsetLeft");for(var J=0;J<P.length;J++){M+=P[J].offsetWidth;if(P[J].offsetHeight>F){F=P[J].offsetHeight;O=calculateOffset(P[J],"offsetTop")}}}}D.style.top=O+"px";D.style.left=N+"px";D.style.height=F+"px";D.style.width=M+"px";D.style.backgroundColor=L;setOpacity(D,K);this.cMsPerBlink=G;this.cBlinks=I;this.toggleBlink()};this.toggleBlink=function(){if(this.cBlinks<=0){this.stopBlink();return }if(D.style.display=="none"){D.style.display="inline";this.cBlinks--}else{D.style.display="none"}setTimeout('BlinkManager.toggleBlink("'+B+'")',this.cMsPerBlink)};this.stopBlink=function(){E=0;A=-1;D.style.display="none"}}function YFT(A){var C=A+"YFT";var B=document.createElement("div");B.style.position="absolute";B.style.overflow="hidden";B.style.padding="0px";B.style.backgroundColor="#FFFF99";B.style.display="none";this.showYellow=function(G){var J=G.offsetHeight;var E=G.offsetWidth;var I=calculateOffset(G,"offsetTop",true);var K=calculateOffset(G,"offsetLeft",true);var D=G;while(matchesTagName(D,"(tr)|(td)|(tbody)")&&D.parentNode){D=D.parentNode}if(!J&&!E&&G.tagName.toLowerCase()=="tr"){var H=G.cells;if(H.length){K=calculateOffset(H[0],"offsetLeft",true);for(var F=0;F<H.length;F++){E+=H[F].offsetWidth;if(H[F].offsetHeight>J){J=H[F].offsetHeight;I=calculateOffset(H[F],"offsetTop",true)}}}}B.style.top=I+"px";B.style.left=K+"px";B.style.height=J+"px";B.style.width=E+"px";if(D.parentNode&&!isInDOM(B)){D.parentNode.insertBefore(B,D)}FadeManager.startFadeOut(C,B,null,true)};this.hideYellow=function(){B.style.display="none"}}var ShadowManager=new function(){var A=[];this.fInited=false;this.oProtoShadowBottomContainer=null;this.oProtoShadowBottom=null;this.oProtoShadowRightContainer=null;this.oProtoShadowRight=null;this.oProtoShadowBRCornerContainer=null;this.oProtoShadowBRCorner=null;this.oProtoShadowBRCornerSmContainer=null;this.oProtoShadowBRCornerSm=null;this.oProtoShadowURCornerContainer=null;this.oProtoShadowURCorner=null;this.oProtoShadowBLCornerContainer=null;this.oProtoShadowBLCorner=null;this.applyShadow=function(B,E,C,D){this.create(B);A[B].applyShadow(E,C,D)};this.applySmallShadow=function(B,E,C,D){this.create(B);A[B].applyShadow(E,C,D,true)};this.applyRelativeShadow=function(C,D){var B=getAbsolutePosition(D);this.applyShadow(C,B.x,B.y,D)};this.fixShadow=function(B){if(A[B]){A[B].fixShadow()}};this.hideShadow=function(B){this.create(B);A[B].hideShadow()};this.hideAllShadows=function(){for(var B in A){if(A[B]&&A[B].hideShadow){A[B].hideShadow()}}};this.positionShadow=function(B,E,C,D){this.create(B);A[B].positionShadow(E,C,D)};this.create=function(B){if(!A[B]){A[B]=new Shadow(B)}};this.createShadowElements=function(C){var B=document.createElement("div");var D=document.createElement("img");B.id=C+"Container";B.className="dropShadowContainer";B.style.display="none";D.id=C;B.appendChild(D);this["oProto"+capitalize(C)+"Container"]=B;this["oProto"+capitalize(C)]=D;document.body.insertBefore(B,document.body.firstChild)};this.init=function(){if(!this.oProtoShadowBottom||!this.oProtoShadowBottomContainer){this.createShadowElements("shadowBottom")}if(!this.oProtoShadowRight||!this.oProtoShadowRightContainer){this.createShadowElements("shadowRight")}if(!this.oProtoShadowBRCorner||!this.oProtoShadowBRCornerContainer){this.createShadowElements("shadowBRCorner")}if(!this.oProtoShadowBRCorner||!this.oProtoShadowBRCornerSmContainer){this.createShadowElements("shadowBRCornerSm")}if(!this.oProtoShadowURCorner||!this.oProtoShadowURCornerContainer){this.createShadowElements("shadowURCorner")}if(!this.oProtoShadowBLCorner||!this.oProtoShadowBLCornerContainer){this.createShadowElements("shadowBLCorner")}};this.preload=function(){if(this.fInited){return }this.init();if(document.all){this.oProtoShadowBottom.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+StaticContentUrl("images/dropShadowBottom.png")+"', sizingMethod='scale');";this.oProtoShadowRight.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+StaticContentUrl("images/dropShadowRight.png")+"', sizingMethod='scale');";this.oProtoShadowBRCorner.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+StaticContentUrl("images/dropShadowBRCorner.png")+"', sizingMethod='scale');";this.oProtoShadowBRCornerSm.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+StaticContentUrl("images/dropShadowBRCornersm.png")+"', sizingMethod='scale');";this.oProtoShadowURCorner.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+StaticContentUrl("images/dropShadowURCorner.png")+"', sizingMethod='scale');";this.oProtoShadowBLCorner.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+StaticContentUrl("images/dropShadowBLCorner.png")+"', sizingMethod='scale');"}else{this.oProtoShadowBottom.src=StaticContentUrl("images/dropShadowBottom.png");this.oProtoShadowRight.src=StaticContentUrl("images/dropShadowRight.png");this.oProtoShadowBRCorner.src=StaticContentUrl("images/dropShadowBRCorner.png");this.oProtoShadowBRCornerSm.src=StaticContentUrl("images/dropShadowBRCornersm.png");this.oProtoShadowURCorner.src=StaticContentUrl("images/dropShadowURCorner.png");this.oProtoShadowBLCorner.src=StaticContentUrl("images/dropShadowBLCorner.png")}this.fInited=true}};function Shadow(K){var E;var S;var Q;var T;var O;var C;var J;var N;var G;var B;var D=K;var L=0;var P=0;var H=null;var A=false;var R=false;var M=12;var I=8;var F=2;this.getCopy=function(){if(!ShadowManager.fInited){ShadowManager.preload()}if(!ShadowManager.oProtoShadowBottomContainer){return false}if(!E){E=ShadowManager.oProtoShadowBottomContainer.cloneNode(true)}if(!S){S=$("img",E).get(0)}if(!Q){Q=ShadowManager.oProtoShadowRightContainer.cloneNode(true)}if(!T){T=$("img",Q).get(0)}if(!J){J=ShadowManager.oProtoShadowURCornerContainer.cloneNode(true)}if(!N){N=$("img",J).get(0)}if(!G){G=ShadowManager.oProtoShadowBLCornerContainer.cloneNode(true)}if(!B){B=$("img",G).get(0)}if(A){if(!O){O=ShadowManager.oProtoShadowBRCornerSmContainer.cloneNode(true)}}else{if(!O){O=ShadowManager.oProtoShadowBRCornerContainer.cloneNode(true)}}if(!C){C=$("img",O).get(0)}return true};this.positionShadow=function(Z,c,a){if(!this.getCopy()){return }L=Z;P=c;pxWidthLast=a.offsetWidth;pxHeightLast=a.offsetHeight;var e=(window.ie?0:1);var d=(window.ie?1:0);var f=(window.ie?M+1:M+1);var V=(window.ie?F:1);var Y=(window.ie?6:7);var U=4;var b=(A?3:0);var X=3+b;var W=((window.ie&&!window.ie8&&A)?1:0);sizeElement(T,M,a.offsetHeight-e-U-I);positionElement(Q,Z+a.offsetWidth-X,c+U+I-W);sizeElement(S,a.offsetWidth-e-U-I,M);positionElement(E,Z+U+I-W,c+a.offsetHeight-X);sizeElement(C,M-(e*2)+d-W-b,M-(e*2)-b);positionElement(O,Z+a.offsetWidth-V,c+a.offsetHeight-V);sizeElement(N,M-1,M-1);positionElement(J,Z+a.offsetWidth-X+1,c+d+I-Y-W);sizeElement(B,M-1,M-1);positionElement(G,Z-Y+d+I-W,c+a.offsetHeight-e-X+1)};this.insertShadowBefore=function(U){if(U.previousSibling==G){return }R=(U.style.position=="fixed");this.insertBeforeSameZIndex(Q,U);this.insertBeforeSameZIndex(E,U);this.insertBeforeSameZIndex(O,U);this.insertBeforeSameZIndex(J,U);this.insertBeforeSameZIndex(G,U)};this.insertBeforeSameZIndex=function(U,V){if(!V||!V.parentNode){return }if(V.style.zIndex){U.style.zIndex=V.style.zIndex}if(R){U.style.position="fixed"}V.parentNode.insertBefore(U,V)};this.fixShadow=function(){if(H){this.applyShadow(L,P,H,A)}};this.applyShadow=function(X,V,W,U){if(!isVisible(W)){return }W.style.border="1px solid #D6D6D6";A=U;if(!this.getCopy()){return }if(!W.fShadowed||L!=X||P!=V||H!=W||pxWidthLast!=W.offsetWidth||pxHeightLast!=W.offsetHeight){H=W;this.insertShadowBefore(W);this.positionShadow(X,V,W);W.fShadowed=true;setOpacity(E,0.99);setOpacity(Q,0.99);setOpacity(O,0.99);setOpacity(J,0.99);setOpacity(G,0.99)}Q.style.display="";E.style.display="";O.style.display="";J.style.display="";G.style.display=""};this.hideShadow=function(){if(!this.getCopy()){return }E.style.display="none";Q.style.display="none";O.style.display="none";J.style.display="none";G.style.display="none"}}function Fader(F){var E=F;var G=null;var L=null;var B=null;var J=false;var C=0;var I=0.1;var D=0.4;var A=0.01;var H=1;var K=250;this.startFadeIn=function(N,O,P,M){if(!N){return }if(P){D=window.webkit?1:0.99;I=window.ie?1:((window.webkit&&window.versionMajorWebKit>=5)?0.1:0.33)}B=N;G=O;L=M;if(G){B.style.visibility="hidden";B.style.display="";G.call();B.style.visibility="visible"}setOpacity(B,A);B.style.display="";J=true;C=0;setTimeout("FadeManager.fadeIn('"+E+"')",H)};this.startFadeOut=function(M,N,O){if(window.opera){M.style.display="none";if(N){N.call()}return }B=M;G=N;L=null;J=false;C=B.style.opacity?B.style.opacity:D;if(O){D=0.5;H=75;I=0.05;this.showFaded()}setTimeout("FadeManager.fadeOut('"+E+"')",(O?K:H))};this.fadeIn=function(){if(G){G.call()}C+=I;if(C>D){C=D}setOpacity(B,C);if((C<D)&&J){setTimeout("FadeManager.fadeIn('"+E+"')",H)}else{if(L){L.call()}}};this.showFaded=function(){C=D;setOpacity(B,C);B.style.display=""};this.fadeOut=function(){if(J){return }if(G){G.call()}C-=I;if(C<A){C=A}setOpacity(B,C);if(C>A){setTimeout("FadeManager.fadeOut('"+E+"')",H)}else{B.style.display="none";if(G){G.call()}}}}var Info=new function(){var C;var B=false;var A=!window.ie6;var D=10;this.init=function(){if(B){return }C=document.createElement("div");C.className="ghostFontBig"+(window.ie6?" fourBorders":"");C.style.background="#FFFF99";C.style.color="black";C.style.padding=(D/2)+"px "+(D)+"px";C.style.position=A?"fixed":"absolute";C.style.visibility="hidden";C.style.overflow="hidden";C.style.display="none";document.body.insertBefore(C,document.body.firstChild);B=true};this.show=function(F,I){this.init();if(!C||!F||!F.length){return }var E=elById("tbTop");if(E){C.style.height=Math.max((E.offsetHeight-D),10)+"px"}var H="<nobr>"+F+"</nobr>";C.innerHTML=H;if(C.innerHTML!=H&&!I){setTimeout(function(){Info.show(F,true)});return }C.style.display="";var G=centerInTarget(C,elById("tbTop"));C.style.top="0px";if(!A){G=moveWithinWindow(C,0)}C.style.visibility="visible";if(!window.ie6){C.style.zIndex="999";ShadowManager.applySmallShadow("info",G.x,0,C);C.style.zIndex="1000"}C.style.borderTop="0";C.style.borderLeft="0"};this.showBriefly=function(E){this.show(E);setTimeout("Info.hide()",4500)};this.hide=function(){this.init();if(!C){return }ShadowManager.hideShadow("info");C.style.display="none";C.style.visibility="hidden"};this.queue=function(E){if(!window.fDomLoaded){setTimeout(function(){Info.queue(E)},500);return }this.showBriefly(E)}};var ToolTipper_oContents;var ToolTipper_oTip;function ToolTipper(){var F;var B;var D=this;var E=null;var C=false;var A=false;this.init=function(){if(D.fInit){return }D.fInit=true;if(typeof (ToolTipper_oTip)=="undefined"){ToolTipper_oContents=DOM.nobr();ToolTipper_oTip=DOM.div({"class":"hoverBugTip",style:"display:none;"},ToolTipper_oContents);document.body.insertBefore(ToolTipper_oTip,document.body.firstChild)}F=ToolTipper_oContents;B=ToolTipper_oTip;ourAttachEvent(document.body,"keyup",function(){if(D.fVisible&&E){D.cancelTip()}})};this.fxnEventCancel=function(){D.cancelTip()};this.getFxnEventShowTip=function(H,G){return function(I){if(window.ie){if(event&&event.fromElement==event.toElement){return }var J=getEventTarget(event);if(J&&!isTagName(J,G)){return }}D.showTip(this,H)}};this.getFxnEventIntercept=function(G,H){return function(){H.apply(this);if(G){return G.apply(this,arguments)}}};this.addTip=function(G,I){if(!G||!I){return }if(!G.attributes){return }if(G.fTipAdded){return }function H(L,J){var K=G[L];G[L]=D.getFxnEventIntercept(K,J)}H("onmousedown",this.fxnEventCancel);H("onmouseover",this.getFxnEventShowTip(I,G.nodeName));H("onmouseout",this.fxnEventCancel);G.fTipAdded=true};this.showTip=function(H,I){if(!H||!I){return }this.init();if(H.tagName=="LABEL"){var G=elById(H.htmlFor);if(!G&&H.htmlFor){G=$("[name="+H.htmlFor+"]")[0]}if(G){H=G}}if(H.tagName=="SELECT"){var G=elById("idDropList_"+H.id+"_oText");if(G){H=G}}if(H.titleId){var G=elById(H.titleId);if(G){H=G}}E=H;if(C){this.doShowTip(H,I)}else{setTimeout(function(){D.doShowTip(H,I)},750)}};this.doShowTip=function(G,L){this.init();if(!E||E!=G||B.style.display==""||!isVisible(G)){return }C=true;B.style.visibility="hidden";B.style.display="";F.innerHTML=L;try{var K=calculateOffset(E,"offsetTop");var H=calculateOffset(E,"offsetLeft")}catch(J){return }var I=(H+(E.offsetWidth/2)-(B.offsetWidth/2));I=Math.min(I,(windowRight()-B.offsetWidth-20));I=Math.max(I,scrollLeft()+20);B.style.left=I+"px";B.style.top=(K+E.offsetHeight+10)+"px";B.style.visibility="visible";this.fVisible=true};this.cancelTip=function(){this.init();B.style.display="none";E=null;this.fVisible=false;setTimeout(D.stopImmediateTip,750)};this.stopImmediateTip=function(){if(E==null){C=false}}}function DynamicUpdate(B,A){this.el=B;this.fxnQS=A;this.oAjaxRequest=null;this.dtLastQueue=null;this.sLastQS=null}DynamicUpdate.prototype.queueUpdate=function(){var A=this;var B=new UTCDate();setTimeout(function(){A.dequeueUpdate(B)},250);this.dtLastQueue=B};DynamicUpdate.prototype.dequeueUpdate=function(A){if(A!=this.dtLastQueue){return }this.update()};DynamicUpdate.prototype.update=function(){var A=this.fxnQS();if(A==this.sLastQS){return }if(ajaxIsBusy(this.oAjaxRequest)){this.queueUpdate();return }var B=this;this.oAjaxRequest=$.ajax({type:"GET",url:sDefaultURI+"?fAlaCarte=1&"+A,success:function(C){B.finishUpdate(C)},fIgnoreDefaultError:true});this.sLastQS=A};DynamicUpdate.prototype.finishUpdate=function(A){if($("sError",A).text()){return }var B=$("sHTML",A).text();if(!B){return }this.el.innerHTML=B};var DynamicOptions=new function(){var A={};this.add=function(B){if(!elById("idText"+B)){return }A[B]=new DynamicOption(B)}};function DynamicOption(B){this.sName=B;this.elText=elById("idText"+B);this.elPop=elById("idPopup"+B);this.jrg=$("input",this.elPop);this.fxnAsText=window[B+"AsText"];var A=this;this.init=function(){if(!this.elText||!this.elPop){return }this.elPop.style.display="none";this.elPop.style.position="absolute";this.elPop.style.zIndex="1";this.elPop.className="popupMenu popFilterOpt dynamicOpt";theMgr.add(this.elPop.id);this.jrg.map(function(){if(this.value==FB_DONE){$(this).css("display","");ourAttachEvent(this,"click",function(){A.hide()})}else{ourAttachEvent(this,"click",function(){A.update()})}});setTimeout(function(){A.update()},1)};this.findLink=function(){$("a",this.elText).each(function(){if(this.fAttached){return }ourAttachEvent(this,"click",function(C){A.show();return cancel(C)});this.fAttached=true})};this.show=function(){theMgr.showPopup(this.elPop.id,this.elText,0,this.elText.offsetHeight+2,null,true)};this.hide=function(){theMgr.hideAllPopups()};this.update=function(){if(!this.fxnAsText){return }var C=pictureOf(this.fxnAsText,this.getParamArray());this.elText.innerHTML=C;this.findLink()};this.getParamArray=function(){var C=[];this.jrg.map(function(){if(this.type=="text"){C[C.length]=this.value}else{if(this.type=="checkbox"||this.type=="radio"){C[C.length]=this.checked}}});return C};this.init()}function flash(A){A.nFlash=4;if(A.timerFlash){clearInterval(A.timerFlash)}A.timerFlash=setInterval(function(){doFlash(A)},50)}function doFlash(A){if(A.fFlashOff){setOpacity(A,0.99);A.fFlashOff=false}else{setOpacity(A,0.1);A.fFlashOff=true}A.nFlash--;if(A.nFlash<=0){setOpacity(A,0.99);clearInterval(A.timerFlash)}};
jQuery.extend({ajax_orig:jQuery.ajax,ajax:function(A){if(g_ActionTokens){g_ActionTokens.injectURLToken(A)}if(!ajaxApproveSimultaneous(A,arguments.callee.caller)){return }return jQuery.ajax_orig(A)}});jQuery.extend({handleError:function(C,B,A,D){if(C.error){C.error(B,A,D)}if(C.global){jQuery.event.trigger("ajaxError",[B,C,D,A])}}});jQuery.fn.extend({serializeObject:function(){var A={};jQuery(jQuery(this).serializeArray()).map(function(){A[this.name]=this.value});return A}});var fxnOldHtml=jQuery.html;jQuery.fn.extend({htmlEval:jQuery.fn.html,html:function(A){if(A==undefined){return this.length?this[0].innerHTML:null}else{return this.each(function(){this.innerHTML=A})}}});jQuery.fn.extend({customTag:function(B){if(jQuery.browser.msie){var A=B.indexOf(":");if(A>=0){B=B.substring(A+1)}}if(jQuery.browser.mozilla||jQuery.browser.safari){B=B.toUpperCase()}return jQuery(jQuery.unique(jQuery("[tagName="+B+"]",this)))}});$(window).load(function(){$("#idTimingAjax").ajaxComplete(function(A,B){if(B&&B.responseXML&&B.responseXML.documentElement){this.innerHTML=$("FBTiming",B.responseXML).text()}})});$(document).ready(function(){$("#idPageNotifications").ajaxComplete(function(E,F){if(F&&F.responseXML&&F.responseXML.documentElement){var D=$("PageNotifications PageNotification",F.responseXML);var C=[];for(var A=0;A<D.length;A++){var B=$("sId",D[A]).text();if(!elById(B)){C.push($("sHtml",D[A]).text())}}if(C.length>0){this.innerHTML+=C.join("")}}})});
var POPUP_POSITION_CENTER=0;var POPUP_POSITION_RIGHT=1;var POPUP_POSITION_BELOW=2;var POPUP_POSITION_UPPER_CENTER=3;var POPUP_POSITION_LEFT=4;var POPUP_POSITION_CENTER_SCREEN=5;var EditableTableManager=new function(){var B=[];var A="";this.getTable=function(C){if(this.create(C)){return B[C]}else{return null}};this.hideAllPanes=function(){for(var C in B){if(B[C]&&B[C].hidePane){B[C].hidePane()}}};this.hidePane=function(C){if(!this.create(C)){return false}B[C].hidePane();return true};this.unmaskPanes=function(){for(var C in B){if(B[C]&&B[C].isVisible&&B[C].isVisible()){B[C].unmaskSmall()}}};this.maskPanes=function(){for(var C in B){if(B[C]&&B[C].isVisible&&B[C].isVisible()){B[C].maskSmall()}}};this.fixShadow=function(C){this.doSetShadow(C)};this.doSetShadow=function(C){this.create(C);B[C].doSetShadow()};this.registerHotKeys=function(C){this.create(C);B[C].registerHotKeys()};this.getVisiblePane=function(){for(var C in B){if(B[C]&&B[C].isVisible&&B[C].isVisible()){return B[C].getVisiblePane()}}return null};this.isVisible=function(){for(var C in B){if(B[C]&&B[C].isVisible&&B[C].isVisible()){return true}}return false};this.getMaxZIndex=function(){var D=0;for(var C in B){if(B[C]&&B[C].isVisible&&B[C].isVisible()){var E=B[C].getZIndex();if(E>D){D=E}}}return D};this.setShadow=function(C){this.create(C);B[C].setShadow()};this.setWidth=function(D,C){this.create(D);B[D].setWidth(C)};this.showDeletePane=function(G,H,F,E,D,C){this.create(G);B[G].showDeletePane(H,F,E,D?D:H,C)};this.showDetailedDeletePane=function(F,G,E,D,C,H){this.create(F);B[F].showDetailedDeletePane(G,E,D,C,H)};this.showEditPane=function(H,I,G,E,D,C,F){if(typeof (D)=="string"){D=elById(D)}this.create(H);B[H].showEditPane(I,G,E,D,C,F)};this.setDialogTemplate=function(E,C,D){this.create(E);B[E].setDialogTemplate(C,D)};this.showDialog=function(F,D,C,E){this.create(F);B[F].showDialog(D,C,E)};this.showNormalPane=function(E,D,C,F){this.create(E);B[E].showNormalPane(D,C,F)};this.repairCaret=function(C){this.create(C);B[C].repairCaret()};this.disablePaneForSubmit=function(C){this.create(C);B[C].startSubmit();B[C].enablePane(false)};this.submitDialog=function(C){if(!this.create(C)){return false}B[C].submitDialog();return true};this.result=function(D,C,E){this.create(D);B[D].result(C,E)};this.mousedownTopBar=function(C){var D=C.id.replace(/topbar/,"");this.create(D);B[D].startDragging();A=D};this.stopDragging=function(){if(A&&A.length){this.create(A);B[A].stopDragging();A=""}};this.notifyMovement=function(){if(!A||!A.length){return }this.create(A);B[A].notifyMovement()};this.setFocus=function(C){this.create(C);B[C].setFocus()};this.enablePane=function(D,C){this.create(D);B[D].enablePane(C)};this.create=function(C){if(!B[C]){B[C]=new EditableTable(C)}return B[C].init()}};function EditableTable(sName){var oTable=elById("static"+sName);var oPane=elById("edit"+sName);var oMask=elById("panemask"+sName+maskType());var oMaskSmall=elById("panemaskSmall"+sName+maskType());var oTopBar=elById("topbar"+sName);var oDelete=$("div#delete",oPane).get(0);var oEditable=$("div#editable",oPane).get(0);var oError=$("div#error",oPane).get(0);var rgErrorsShown=[];var fxnOnShow=null;var pxLeftCurrent;var pxTopCurrent;var bPositioned=false;var bShadowAdded=false;var bShrunk=false;var bDragging=false;var pxLeftDragOffset;var pxTopDragOffset;var bVisible=false;this.oEditDialogData={};this.oDeleteDialogData={};this.init=function(){oPane=elById("edit"+sName);if(oPane&&!oPane.bInitialized){oTable=elById("static"+sName);oMask=elById("panemask"+sName+maskType());oDelete=$("div#delete",oPane).get(0);oEditable=$("div#editable",oPane).get(0);oError=$("div#error",oPane).get(0);rgErrorsShown=[];if(oPane){var oTextArea=$("textarea",oPane).get(0);var pxMin=oTextArea?450:350;var pxWidth;var oWidthSpan=$("#pxWidthTable",oPane).get(0);if(oWidthSpan){pxWidth=oWidthSpan.innerHTML}if(pxWidth!=null){if(pxWidth!=0){oPane.style.width=pxWidth+"px"}else{oPane.style.width=pxMin+"px"}}else{oPane.style.width=(oTable?Math.max(oTable.offsetWidth,pxMin):pxMin)+"px"}if(window.opera){oPane.style.border="1px solid #333333"}}this.disableAllAutoComplete();oPane.bInitialized=true}return oPane&&oPane.bInitialized};this.getEditPane=function(){return oEditable};this.getDeletePane=function(){return oDelete};this.getZIndex=function(){if(oPane&&oPane.style){var nZ=Number(oPane.style.zIndex);return isNaN(nZ)?0:nZ}return 0};this.repairCaret=function(){if(window.ie||window.webkit||window.opera){return }var rgVersion=Split($.browser.version,".");if((rgVersion.length>0&&rgVersion[0]>1)||(rgVersion.length>1&&rgVersion[0]==1&&rgVersion[1]>=9)){return }if(typeof (oWysiwyg)=="undefined"){return }preCalc(oPane);preCalc(oEditable);var wrap=function(){var oD=DOM.div({style:"overflow-y:auto;overflow-x:hidden"});this.parentNode.insertBefore(oD,this);var oSib=this.nextSibling;oD.appendChild(this);while(oSib){if(isTagName(this.nextSibling,"br")){this.parentNode.removeChild(this.nextSibling);break}var oNext=oSib.nextSibling;oD.appendChild(oSib);oSib=oNext}if(oD.scrollWidth&&oD.scrollWidth>oD.offsetWidth){this.style.width=(oD.offsetWidth-10)+"px"}};$("input[type=text]",oPane).map(wrap);$("textarea",oPane).map(wrap);postCalc(oPane);postCalc(oEditable)};this.setWidth=function(pxWidth){oPane.style.width=pxWidth+"px"};this.disableAllAutoComplete=function(){$("input",oPane).attr("autocomplete","off")};this.result=function(jXML,sIdContainer){Info.hide();this.enablePane(true);if(!this.parseAndShowErrors(jXML)){var oContainer=elById(sIdContainer?sIdContainer:"container"+sName);var sHTML=$("sHTML",jXML).text();if(oContainer&&sHTML){oContainer.innerHTML=sHTML}oTable=elById("static"+sName);if(!this.parseAndShowWarning(jXML)){this.hidePane()}else{this.doSetShadow()}this.yellowFade($("idEditableRow",jXML).text());oElemLastSrc=null;window.jXML=jXML;var jelTemplates=$("DialogTemplates",jXML);var jrgXMLTemplate=$("DialogTemplate",jelTemplates);if(jrgXMLTemplate.length){this.dictDialogs={};var oSelf=this;jrgXMLTemplate.map(function(){var sDialogId=$("Id",this).text();var dlgTemplate=eval("("+$("Template",this).text()+")");if(sDialogId&&dlgTemplate){oSelf.setDialogTemplate(sDialogId,dlgTemplate)}})}KeyManager.cleanupOnClick();KeyManager.setupGridBrowser()}else{this.doSetShadow()}};this.isVisible=function(){return bVisible};this.maskSmall=function(){oMaskSmall.style.height="100%";oMaskSmall.style.width="100%";oMaskSmall.style.display=""};this.unmaskSmall=function(){oMaskSmall.style.display="none"};this.unmask=function(){oMask.style.display="none"};this.yellowFade=function(idRow){YFTManager.hideYellow(sName);var sId=sName+"_"+idRow;var oRow=elById(sId);if(oRow){YFTManager.showYellow(sName,oRow)}};this.showErrorDialog=function(sErr){this.fillDialog('<div style="width:300px">'+pictureOf(ErrorPaneContents,sName,sErr)+"</div>")};this.parseAndShowErrTag=function(jXML,sTag){var sErr=$("FogBugzXML > "+sTag,jXML).text();if(sErr&&sErr.length){if(this.isUsingTemplates()){this.showErrorDialog(sErr)}else{if(!this.showErrorPane(sErr)){alert(sErr)}}return true}return false};this.parseAndShowWarning=function(jXML){return this.parseAndShowErrTag(jXML,"sWarning")};this.parseAndShowErrors=function(jXML){this.hideAllErrors();if(this.parseAndShowErrTag(jXML,"sError")){return true}var bShowingError=false;var bFocusSet=false;var oSelf=this;$("Error",jXML).map(function(){var sError=$("sError",$(this)).text();var sId=$("sId",$(this)).text();if(sError&&sId){oSelf.showErrorElement(sError,sId);bShowingError=true;if(!bFocusSet){var oElem=$("input#"+sId,oPane).get(0);if(oElem){try{safeFocus(oElem);bFocusSet=true}catch(err){}}}}});var elDialog=$("Dialog",jXML);var sDialogHtml=$("sHtml",elDialog).text();if(sDialogHtml){this.fillDialog(sDialogHtml);this.autosizePane(true);$("input[type=text]",oPane).attr("autocomplete","off");DropListControl.refreshWithin(oPane);bShowingError=true}if(!bFocusSet){this.setFocus()}return bShowingError};this.showErrorElement=function(sError,sId){var jElem=$("input#"+sId,oPane);if(jElem.attr("className")=="dlg"){jElem.attr("className","dlgError")}$("div#error_"+sId,oPane).html(sError).css("display","");rgErrorsShown[rgErrorsShown.length]=sId};this.hideErrorElement=function(sId){var jElem=$("input#"+sId,oPane);if(jElem.attr("className")=="dlgError"){jElem.attr("className","dlg")}$("div#error_"+sId,oPane).css("display","none")};this.hideAllErrors=function(sId){if(!rgErrorsShown){return }for(var ix=0;ix<rgErrorsShown.length;ix++){this.hideErrorElement(rgErrorsShown[ix])}rgErrorsShown=[]};this.enablePane=function(bEnabled){if(!oPane){return }$("input",oPane).map(function(){var sType=$(this).attr("type");if(sType&&sType.toString&&sType.toString().toLowerCase()!="file"){if((bEnabled&&this.fDisabledByEditableTable)||!bEnabled){$(this).attr("disabled",!bEnabled);if(!bEnabled){this.fDisabledByEditableTable=true}}}});$("textarea",oPane).map(function(){$(this).attr("disabled",!bEnabled)})};this.startSubmit=function(){Process.start(this,"result",null,FB_SUBMITTING)};this.hidePane=function(){bVisible=false;if(!oPane){return }this.hideAllErrors();this.stopDragging(true);theMgr.hideAllPanePopups();theMgr.unmaskTopmostPopup();this.clearDialog();this.unmask();this.repairPageFocus();KeyManager.removePopupKeys(this.getVisiblePane());FadeManager.startFadeOut(sName,oPane,this.hideShadow);theMgr.showSelects(theMgr.getTopmostPopup());if(FancyPopupManager.fxnOnCloseHandler&&FancyPopupManager.fxnOnCloseHandler.call){FancyPopupManager.fxnOnCloseHandler.call()}if(window.ie&&oEditable){oEditable.style.position="relative"}};this.repairPageFocus=function(){if(window.ie){return }var rgInput=$("input",oPane).get();var oToFocus=null;for(var ix=0;ix<rgInput.length;ix++){if(rgInput[ix].type.toLowerCase()!="hidden"){oToFocus=rgInput[ix];break}}if(oToFocus&&oToFocus.focus){try{safeFocus(oToFocus);oToFocus.blur()}catch(err){}}};this.setPaneState=function(sState){if(oDelete){oDelete.style.display=(sState=="delete")?"":"none"}if(oError){oError.style.display=(sState=="error")?"":"none"}if(oEditable){if(window.ie&&sState=="editable"){oEditable.style.position=""}oEditable.style.display=(sState=="editable")?"":"none"}if(!oMask){return }if(sState=="delete"||sState=="editable"||sState=="error"){oMask.style.top="0px";oMask.style.left="0px";oMask.style.width=documentWidth()+"px";oMask.style.height=documentHeight()+"px";oMask.style.display=""}else{oMask.style.display="none"}};this.getVisiblePane=function(){return oPane};this.showErrorPane=function(sError){fxnOnShow=null;if(!oPane){return false}var j=$("#mainErrorContainer",oPane);if(0==j.length){return false}j.html(sError);this.setPaneState("error");this.setFocus();return true};this.showDeletePane=function(oElem,ixToDelete,sToDelete,oPosition,iPositionType){if(oPosition==null){oPosition=oElem}fxnOnShow=null;if(!oPane){return }this.fadeIn(false);this.setPaneState("delete");this.postPaneDimensions(oPosition,iPositionType);$("#delete #sToDelete",oPane).html(encodeLTGT(sToDelete));$("input[id*=ixToDelete]",oPane).val(ixToDelete);this.setFocus();theMgr.hideSelects()};this.fadeIn=function(bFocusDuringFade){bShadowAdded=false;bPositioned=false;bVisible=true;KeyManager.cleanupOnClick();this.registerHotKeys();var oSelf=this;FadeManager.startFadeIn(sName,oPane,null,true,function(){if(bFocusDuringFade){EditableTableManager.enablePane(sName,true)}EditableTableManager.setShadow(sName);if(bFocusDuringFade){EditableTableManager.setFocus(sName)}oSelf.unmaskSmall();if(fxnOnShow){fxnOnShow()}});theMgr.showTopSmallMask()};this.registerHotKeys=function(){var oVisiblePane=this.getVisiblePane();$("input[cHotKey]",oVisiblePane).map(function(){if(!$(this).attr("id")){$(this).attr("id",getUniqueId())}KeyManager.registerPopupKey($(this).attr("cHotKey"),$(this).attr("id"),oVisiblePane)})};this.setShadow=function(){if(!bPositioned||bShadowAdded||oPane.style.display=="none"){return }ShadowManager.applyShadow(sName,pxLeftCurrent,pxTopCurrent,oPane);bShadowAdded=true};this.doSetShadow=function(){ShadowManager.applyShadow(sName,pxLeftCurrent,pxTopCurrent,oPane)};this.hideShadow=function(){ShadowManager.hideShadow(sName)};this.showDetailedDeletePane=function(oElem,ixToDelete,sInfo1,sInfo2,sInfo3){fxnOnShow=null;if(!oPane){return }this.fadeIn(false);this.setPaneState("delete");this.postPaneDimensions(oElem,null);$("#delete #sToDelete",oPane).html(encodeLTGT(sInfo1));$("#delete #sToDelete2",oPane).html(encodeLTGT(sInfo2));$("#delete #sToDelete3",oPane).html(encodeLTGT(sInfo3));$("input#ixToDelete",oPane).val(ixToDelete);this.setFocus();theMgr.hideSelects()};this.showNormalPane=function(oPosition,iPositionType,fFocusOnFadeIn){if(fFocusOnFadeIn==undefined){fFocusOnFadeIn=true}if(iPositionType==null){iPositionType=POPUP_POSITION_CENTER}this.showPane(oPosition,iPositionType,fFocusOnFadeIn,null)};this.showPane=function(oPosition,iPositionType,fFocusOnFadeIn,fxnShow){fxnOnShow=fxnShow;this.fadeIn(fFocusOnFadeIn);oPane.style.visibility="hidden";this.setPaneState("editable");$("input[type=text]",oPane).attr("autocomplete","off");this.postPaneDimensions(oPosition,iPositionType);oPane.style.visibility="visible";this.doSetShadow();theMgr.hideSelects()};this.setDialogTemplate=function(sDialogId,dlgTemplate){if(!this.dictDialogs){this.dictDialogs={}}this.dictDialogs[sDialogId]=dlgTemplate};this.submitDialog=function(){if($("div#editable input[type=file]:enabled",oPane).length>0){if(this.submitDialogUpload()){EditableTableManager.disablePaneForSubmit(sName);return }}var data=$("div#editable :enabled, div#editable input:hidden",oPane).serializeObject();EditableTableManager.disablePaneForSubmit(sName);$.post(sDefaultURI,data,function(jXML){EditableTableManager.result(sName,jXML)})};this.submitDialogUpload=function(){var oIFrame=this.getUploadFrame();if(!oIFrame){return false}var form=$("div#editable form",oPane)[0];form.target=oIFrame.name;return safeSubmit(form)};this.resultDialogUpload=function(){if(!this.oIFrame){return }var oDocument=this.oIFrame.contentDocument?this.oIFrame.contentDocument:(this.oIFrame.contentWindow?this.oIFrame.contentWindow.document:null);EditableTableManager.result(sName,oDocument)};this.getUploadFrame=function(){if(!this.oIFrame){var sId="idUploadFrame_"+sName;var el=DOM.span({style:"display: none;"});el.innerHTML=pictureOf(UploadFrame,sId,true);oPane.appendChild(el);this.oIFrame=elById(sId);if(this.oIFrame){var self=this;$(this.oIFrame).load(function(){self.resultDialogUpload()})}}return this.oIFrame};this.showDialog=function(el,sDialogId,sDataId){if(!oPane||!this.dictDialogs[sDialogId]){return }this.showDialogFromTemplate(el,this.dictDialogs[sDialogId].template,this.dictDialogs[sDialogId].data[sDataId])};this.showDialogFromTemplate=function(el,sTemplate,data){var sHtml=this.fillTemplate(sTemplate,data);if(sHtml){this.fillDialog(sHtml);oPane.style.width="";this.showEditPane(el)}};this.fillTemplate=function(s,data){return FormatStringFromDict(s,data)};this.fillDialog=function(sContents){if(sContents){sContents='<form action="'+sDefaultURI+'"  method="post" enctype="multipart/form-data" onsubmit="EditableTableManager.submitDialog(\''+sName+"'); return false;\">"+sContents+"</form>"}var tmp=window.DLCL;window.DLCL=function(){};$("div#editable",oPane).htmlEval(sContents);window.DLCL=tmp};this.clearDialog=function(){if(this.isUsingTemplates()){this.fillDialog("")}};this.isUsingTemplates=function(){return(this.dictDialogs&&!objIsEmpty(this.dictDialogs))};var oElemLastSrc;this.showEditPane=function(oElem,mapValsToElems,fxnShow,oPosition,iPositionType,srcOverride){if(!oPane){return }if(oPosition==null){oPosition=oElem}var oSrc=srcOverride||oElem;if(mapValsToElems&&oElemLastSrc!=oSrc){this.replaceElements(mapValsToElems)}this.showPane(oPosition,iPositionType,true,fxnShow);oElemLastSrc=srcOverride||oElem;this.enablePane(false)};this.replaceElements=function(mapValsToElems){var oDiv=$("div#editable",oPane).get(0);for(var ix=0;ix<mapValsToElems.length;ix++){if(mapValsToElems[ix].sTag.indexOf("fb:")==0){$(oDiv).customTag(encodeLTGT(mapValsToElems[ix].sTag)).eq(0).text(mapValsToElems[ix].value)}else{if(mapValsToElems[ix].sTag=="a"||mapValsToElems[ix].sTag=="span"){var o=$(mapValsToElems[ix].sTag+"#"+mapValsToElems[ix].sId,oPane).get(0);if(o){if(mapValsToElems[ix].value.length){if(mapValsToElems[ix].sTag=="a"){o.href=mapValsToElems[ix].value}else{if(mapValsToElems[ix].fIsHtml){o.innerHTML=mapValsToElems[ix].value}else{o.innerHTML=encodeLTGT(mapValsToElems[ix].value)}}o.style.display=""}else{o.style.display="none"}}}else{var o=$(mapValsToElems[ix].sTag+"#"+mapValsToElems[ix].sId,oPane).get(0);if(o){if(o.type.toLowerCase()=="radio"||o.type.toLowerCase()=="checkbox"){o.checked=mapValsToElems[ix].value}else{o.value=mapValsToElems[ix].value}if(o.tagName.toLowerCase()=="textarea"){o.fxnResize=this.doSetShadow;if(!o.nRowsOriginal){o.nRowsOriginal=o.rows}else{o.rows=o.nRowsOriginal}adjustRows(o)}}}}}};this.postPaneDimensions=function(oElem,iPositionType){this.setPaneLoc(oElem,iPositionType);DropListControl.refreshWithin(oPane)};this.setPaneLoc=function(oElem,iPositionType){if(!oPane){return }if(oPane.offsetHeight>windowHeight()){this.shrinkPane()}else{if(bShrunk){this.unShrinkPane()}}if(iPositionType!=null){var pt;if(iPositionType==POPUP_POSITION_RIGHT){pt=getRightCoordinates(oPane,oElem)}else{if(iPositionType==POPUP_POSITION_BELOW){pt=getBelowCoordinates(oPane,oElem)}else{if(iPositionType==POPUP_POSITION_UPPER_CENTER){pt=getUpperCenteredCoordinates(oPane,oElem)}else{if(iPositionType==POPUP_POSITION_LEFT){pt=getLeftCoordinates(oPane,oElem)}else{if(iPositionType==POPUP_POSITION_CENTER_SCREEN){pt=centerInWindow(oPane)}else{pt=getCenteredCoordinates(oPane,oElem)}}}}}pxTopCurrent=pt.y;pxLeftCurrent=pt.x}else{var pxTop=(calculateOffset(oElem,"offsetTop")-25);if((pxTop+oPane.offsetHeight)>(scrollTop()+windowHeight())){pxTop=Math.max(2,(scrollTop()+windowHeight()-oPane.offsetHeight-25))}pxTopCurrent=pxTop;pxLeftCurrent=(calculateOffset(oTable,"offsetLeft")+15)}this.autosizePane();oPane.style.top=pxTopCurrent+"px";oPane.style.left=pxLeftCurrent+"px";var pt=moveWithinWindow(oPane);pxTopCurrent=pt.y;pxLeftCurrent=pt.x;bPositioned=true;oPane.style.zIndex=4;oPane.style.zIndex=EditableTableManager.getMaxZIndex()+1};this.autosizePane=function(fForce){if(!oPane||!oPane.scrollWidth){return }oTopBar.style.width="1px";if(fForce){oPane.style.width="1px"}if(fForce||oPane.scrollWidth>oPane.offsetWidth){var sWidth=(oPane.scrollWidth+15)+"px";oPane.style.width=sWidth}oTopBar.style.width=oPane.offsetWidth+"px"};this.shrinkPane=function(){$("textarea",oPane).map(function(){while(oPane.offsetHeight>windowHeight()&&this.rows>4){this.rows--}this.bRowLock=true});bShrunk=true};this.unShrinkPane=function(){$("textarea",oPane).map(function(){this.bRowLock=false;if(this){adjustRows(this)}});bShrunk=false};this.setFocus=function(){var oToFocus;var oDiv=isVisible(oDelete)?oDelete:isVisible(oEditable)?oEditable:oError;if(oDiv){oToFocus=$("button",oDiv).get(0);var jrg=$("input[type!=hidden]:visible",oDiv);if(jrg.length>0){oToFocus=jrg.get(0)}if(oToFocus&&!(oToFocus.tagName.toLowerCase()=="input"&&oToFocus.value.length==0)&&$("textarea",oDiv).length>0){oToFocus=$("textarea",oDiv).get(0)}}if(!oToFocus){return }if((oToFocus.tagName.toLowerCase()=="textarea"||oToFocus.type.toLowerCase()=="text")&&oToFocus.id){giveTextBoxFocus(oToFocus.id);adjustRows(oToFocus)}else{safeFocus(oToFocus)}};this.startDragging=function(){pxLeftDragOffset=xMouse-calculateOffset(oPane,"offsetLeft");pxTopDragOffset=yMouse-calculateOffset(oPane,"offsetTop");bDragging=true;bCancelEvents=true};this.stopDragging=function(fHiding){bDragging=false;pxLeftDragOffset=0;pxTopDragOffset=0;bCancelEvents=false;if(!fHiding){this.setFocus()}};this.notifyMovement=function(){if(bDragging){pxLeftCurrent=xMouse-pxLeftDragOffset;pxTopCurrent=yMouse-pxTopDragOffset;ShadowManager.positionShadow(sName,pxLeftCurrent,pxTopCurrent,oPane);oPane.style.left=pxLeftCurrent+"px";oPane.style.top=pxTopCurrent+"px";removeTextSelections()}}}var FancyPopupManager=new function(){this.oPrototype=null;this.hashRepairCaret={};this.fxnOnCloseHandler=null;this.create=function(C){if(!this.oPrototype){this.oPrototype=elById("containerPopupWikiPrototype")}if(!this.oPrototype){return }var A=this.oPrototype.cloneNode(true);applyToSelfAndChildren(A,function(D){if(D&&D.id){D.id=D.id.replace(/popupWikiPrototype/i,C)}});var B=elById("mainAreaContinued");if(!B){B=elById("mainArea")}if(B){B.appendChild(A);return new FancyPopup(C,$("div#editable",A).get(0))}else{return null}};this.disableForSubmit=function(A){EditableTableManager.disablePaneForSubmit(A)};this.enable=function(A){EditableTableManager.enablePane(A,true);Info.hide();this.fixShadow(A)};this.show=function(C,E,A,F){if(!E&&A!=POPUP_POSITION_CENTER_SCREEN){A=null}if(theMgr.exists(C)){theMgr.showPopup(C)}else{if(!this.hashRepairCaret[C]){EditableTableManager.repairCaret(C);this.hashRepairCaret[C]=true}var D=typeof (oWysiwyg)!="undefined";var B=E?elById(E):D?oWysiwyg.oEditable:document.body;if(D&&B==oWysiwyg.oEditable){A=POPUP_POSITION_UPPER_CENTER}EditableTableManager.showNormalPane(C,B,A,F)}};this.hide=function(){theMgr.hideAllPopups();EditableTableManager.hideAllPanes()};this.hidePane=function(A){EditableTableManager.hidePane(A)};this.fixShadow=function(A){EditableTableManager.doSetShadow(A)};this.setWidth=function(B,A){EditableTableManager.setWidth(B,A)}};function FancyPopup(A,B){this.oDiv=B;this.id=A;this.show=function(D,C,E){FancyPopupManager.show(this.id,D,C,E)};this.hide=function(){FancyPopupManager.hidePane(this.id)};this.enable=function(){FancyPopupManager.enable(this.id)};this.disableForSubmit=function(){FancyPopupManager.disableForSubmit(this.id)};this.fixShadow=function(){EditableTableManager.doSetShadow(this.id)};this.setWidth=function(C){EditableTableManager.setWidth(this.id,C)};this.setFocus=function(){EditableTableManager.setFocus(this.id)};this.noHideSelects=function(){if(!window.ie6||!this.oDiv){return }$("select",this.oDiv).map(function(){theMgr.addNoHide(this.id)})};this.autosizePane=function(C){EditableTableManager.getTable(this.id).autosizePane(C);this.fixShadow()};this.isVisible=function(){return EditableTableManager.getTable(this.id).isVisible()}};
var g_fDropListsEnabled=!window.opera&&!window.webkitPre31&&!window.webkitMobile;var oDropListAjaxRequest;var HTMLOption=function(C,B,D){var A=this;this.selected=function(){return C.options[C.selectedIndex]==A};this.value=D;this.innerHTML=B;this.textContent=DecodeHTMLEnt(B);this.getAttribute=function(E){return this[E]}};function DropList(B){if(!B||!B.options||!B.parentNode){return null}this.oSel=B;this.id="idDropList_"+this.oSel.id+"_";this.rgOpts=null;this.oText=null;this.oDropButton=null;this.oDropList=null;this.dtLastTyped=null;this.dtLastKeyboardScroll=null;this.sLastKeydown=null;this.ixSelected=-1;this.reMatch=null;this.reQuote=null;this.fAboveText=false;this.fOffsetText=false;this.cVisibleLast=0;this.pxWidthLast=0;this.sHTMLLast="";this.fTextFocused=false;this.fInitialRestore=true;this.fDisabled=false;this.pxLeftText=null;this.pxTopText=null;this.pxHeightText=null;this.fTextBox=this.oSel.fTextBox;this.fDeferred=false;this.sDelimiters=null;this.ajaxLast=null;this.oSurround=null;this.cChunks=0;this.hashChunkTokens={};this.fWriteBack=false;this.nShortTokenLength=20;if(this.fTextBox){this.pgSrc=B.getAttribute("pgSrc");this.fValueIsUserInput=false;this.fIgnoreInputTracking=B.getAttribute("fIgnoreInputTracking");this.sDelimiters=B.getAttribute("delimiters");this.fChunky=B.getAttribute("fChunky");this.fWriteBack=B.getAttribute("fWriteBack");this.fEscapeInitialQuotes=B.getAttribute("fEscapeInitialQuotes");this.nShortTokenLength=parseInt(B.getAttribute("nShortTokenLength"))||this.nShortTokenLength;if(this.pgSrc){this.fxnConfirmLookup=window[B.getAttribute("fxnConfirmLookup")]}if(this.fChunky){this.fxnChunkDisplay=window[B.getAttribute("fxnChunkDisplay")];this.fxnValidate=window[B.getAttribute("fxnValidate")];this.fIgnoreDoubleQuotes=B.getAttribute("fIgnoreDoubleQuotes")}}this.fFillParentWidth=!window.ie6&&(B.getAttribute("fFillParentWidth")||$(B).parents(".droplistsFillParent").length>0);var A=this;this.init=function(){if(this.fInited){return }if(window.webkit){if(!this.isCSSLoaded()){if(!this.oSel.fFocusDelayAttached){$(this.oSel).focus(function(){this.fFocused=true}).blur(function(){this.fFocused=false});this.oSel.fFocusDelayAttached=true}setTimeout(function(){A.init()},25);return }}this.fInited=true;this.createSkeleton();this.createBehaviors();this.refresh(true);if(this.fChunky){this.chunkCurrentTokens(true)}theMgr.addWithHandler(this.oDropList.id,function(C){if(!C){A.preHide();A.showChosenValue()}return true});if(this.oSel.fFocusDelayAttached&&this.oSel.fFocused){this.focus()}};this.isCSSLoaded=function(){if(!window.webkit||DropList.fCSSLoaded){return true}var F=document.styleSheets;for(var E=0;E<F.length;E++){var D=F[E];for(var G=0;G<D.cssRules.length;G++){var C=D.cssRules[G];if(C.styleSheet&&C.href&&C.href.indexOf("styles.")>-1&&C.href.indexOf("ixPlugin")==-1){DropList.fCSSLoaded=true}}}return DropList.fCSSLoaded};this.isLegit=function(){return isInDOM(this.oText)&&isInDOM(this.oSel)&&isInDOM(this.oDropList)};this.destroy=function(){var C=function(D){if(A[D]){if(!isInDOM(A[D])){A[D]=elById(A[D].id)}if(A[D]&&A[D].parentNode){A[D].parentNode.removeChild(A[D])}A[D]=null}};C("oText");C("oDropList");C("oDropButton");C("oSurround")};this.refresh=function(C){if(this.oSel.getAttribute("fDeferDrop")){if(!this.fDeferred&&(!window.fDomLoaded||!g_setInnerHTMLComplete)){this.fDeferred=true;return }}if(this.needsRefresh()){this.setEnabled(!this.oSel.disabled);this.createRgOpts()}if(C){if(this.fTextBox){if(this.fEscapeInitialQuotes){this.oText.value=this.escapeQuotes(this.oSel.value)}else{this.oText.value=this.oSel.value}if(this.fChunky){this.chunkCurrentTokens(true)}}this.restoreLastValue()}this.refreshDropButton()};this.fixButtonBarVerticalPosition=function(){var F=this.oDropButton;var D=this.oText;var C=$(F).closest(".bugList").length>0;var E=($(F).closest(".buttonbar .buttons").length>0||C);if(window.mozilla&&E){F.style.top="";F.style.position="";D.style.top="";D.style.position="";F.style.verticalAlign="middle";D.style.verticalAlign="middle";return true}if(window.ie&&F.parentNode.parentNode&&F.parentNode.parentNode.style.verticalAlign=="top"){F.style.top="0px";return true}else{if(window.webkit&&F.parentNode.parentNode&&F.parentNode.parentNode.style.verticalAlign=="middle"){if(C){F.style.top="-2px"}else{F.style.top="0px"}F.style.verticalAlign="top";return true}}return false};this.refreshDropButton=function(E){if(this.fTextBox){return }var H=this.oDropButton;var D=this.oText;if(!H||!D){return }if(this.fixButtonBarVerticalPosition()){return }var I=D.offsetHeight;if(!I){E=E||0;if(E<5){setTimeout(function(){A.refreshDropButton(E+1)},50);return }else{I=20}}var C=H.style;if(this.fTextBox){C.display="none"}else{if(I!=H.offsetHeight){C.height=I+"px"}}var F=D.offsetTop;var G=H.offsetTop-sToPx(H.style.top);if(F!=G){C.top=(F-G)+"px"}};this.optionsUnequal=function(){if(this.fTextBox){var F=this.oSel.options;var E=this.rgOpts;if(F.length!=E.length){return true}for(var C=0;C<F.length;C++){if(!F[C].fTracksInput&&(F[C].value!=E[C].s)){return true}}return false}else{for(var C=0;C<this.rgOpts.length;C++){var D=this.rgOpts[C].elOption;if(D&&!D.parentNode){return true}}return(this.oSel.innerHTML!=this.sHTMLLast)}};this.needsRefresh=function(){if(!this.oSel||!this.oSel.options){return false}if(this.rgOpts==null){return true}if(this.pgSrc){return true}return(this.oSel.options.length!=this.rgOpts.length)||(this.optionsUnequal())||(this.fDisabled!=(this.oSel.disabled?true:false))||(this.trueSelection()!=this.oSel.selectedIndex)};this.submitForm=function(){if(!this.oSel||!this.oSel.form){return }var C=$("input[type=submit]",this.oSel.form).get(0);if(C){$(C).click();return }this.oSel.form.submit()};this.handleKeydown=function(J){var E=getKeyCode(J);this.sLastKeydown=this.oText.value;this.fValueIsUserInput=true;this.fIgnoreNextBlur=false;if(E==13||E==9){var D=isVisible(this.oDropList);if(D){this.chooseValue(this.ixSelected)}if(this.fTextBox){this.commit();var H=$(this.oSel);var G=(!D||(this.ixSelected==0&&this.rgOpts[0].fTracksInput));if(this.fChunky&&this.oText.value.length>0){if(G){A.chunkCurrentTokens();A.focus();if(D){A.hideList()}}return cancel(J)}var C=!D&&((H.triggerHandler("keypress",J)===false)||(H.triggerHandler("keydown",J)===false)||(this.oSel.onkeypress&&this.oSel.onkeypress.apply(this.oSel,[J])===false));if(!C&&G&&E==13){if(this.oSel.form&&!this.oSel.form.getAttribute("disableCtrlEnter")){return(H.triggerHandler("keypress",J)===false)||(H.triggerHandler("keydown",J)===false)||this.submitForm()}}}if(D&&this.sDelimiters&&E==9&&this.fTextBox){return cancel(J)}return(E==13)?cancel(J):C}if(E==8){J.stopPropagation();if(this.fChunky&&this.oText.value.length==0){A.selectPreviousChunk();return cancel(J)}if(window.ie||window.opera||window.webkit){this.handleKeypress(J);return true}}if(E>=16&&E<=18){return true}if(E==27){this.cancelLookupRequest()}var I=getArrowKeyCode(J);var F=isVisible(this.oDropList);if(!F&&E!=27&&!this.pgSrc){setTimeout(function(){if(A.fTextFocused){if(I!=null){A.unFilterList()}A.showList();A.refreshSize();A.selectOpt(A.trueSelection());if(window.ie6){A.repairFocus()}}},1)}if(I!=null){if(J.altKey){return true}if(this.fTextBox&&(I==KEY_ARROW_LEFT||I==KEY_ARROW_RIGHT)){return true}if(F){if(I==KEY_ARROW_UP||I==KEY_ARROW_LEFT){this.selectNeighborVisibleOpt(false)}else{if(I==KEY_ARROW_DOWN||I==KEY_ARROW_RIGHT){this.selectNeighborVisibleOpt(true)}else{if(I==KEY_PG_UP){this.selectPgVisibleOpt(false)}else{if(I==KEY_PG_DOWN){this.selectPgVisibleOpt(true)}}}}this.scrollIntoView(this.rgOpts[this.ixSelected].oOpt)}this.dtLastKeyboardScroll=new BrowserDate();return cancel(J)}return true};this.handleKeypress=function(F){var C=getKeyCode(F);if(C==13){return cancel(F)}if(C==27){return cancel(F)}if(C==9){return true}if(this.fChunky&&this.sDelimiters){var E=String.fromCharCode(KeyboardMap.fix(C,false));if(E.length&&this.sDelimiters.indexOf(E)>-1&&this.oText.value&&(this.fIgnoreDoubleQuotes||this.isCursorOutsideDoubleQuotes())){this.chunkCurrentTokens();this.focus();return cancel(F)}}var D;this.dtLastTyped=D=new BrowserDate();setTimeout(function(){if(A.oText.value!=A.sLastKeydown){A.filterList(D)}},35);if(this.pgSrc&&getArrowKeyCode(F)==null){setTimeout(function(){if(A.oText.value!=A.sLastKeydown){A.sendLookupRequest(D)}},500)}};this.isCursorOutsideDoubleQuotes=function(){if(this.oText.value.indexOf('"')==-1){return true}var E=this.getCursorPosition();var C=this.oText.value.substring(0,E);var D=C.length-C.replace(/"/g,"").length;return D%2==0};this.showThrobber=function(){if(!this.elThrobber){this.elThrobber=DOM.img({src:StaticContentUrl("images/throbber.gif"),style:"position:absolute;display:none;z-index:1000;"});document.body.appendChild(this.elThrobber)}this.getPosition(true);$(this.elThrobber).css({left:this.pxLeftText-12,top:this.pxTopText+this.pxHeightText-15,display:""})};this.hideThrobber=function(){$(this.elThrobber).css("display","none")};this.sendLookupRequest=function(D){if(!this.pgSrc){return }if(D!=this.dtLastTyped){return }if(!this.fTextFocused){return }if(!IsNormalUser()){return }var C=this.currentTokenValue();if(!C||(!this.fIgnoreDoubleQuotes&&C.indexOf('"')>-1)||(this.fxnConfirmLookup&&!this.fxnConfirmLookup(C))){this.resultLookupRequest(null);return }this.cancelLookupRequest();this.ajaxLast=$.ajax({type:"GET",url:sDefaultURI,data:{pg:this.pgSrc,fAlaCarte:1,sParam:C},fIgnoreDefaultError:true,success:function(E){A.resultLookupRequest(E)}});this.showThrobber()};this.cancelLookupRequest=function(){this.hideThrobber();if(ajaxIsBusy(this.ajaxLast)){ajaxAbort(this.ajaxLast)}};this.resultLookupRequest=function(D){if(!this.fTextFocused){return }var C=A.oSel;this.rgOpts=[];C.options=[];if(D){if(!this.fIgnoreInputTracking){var F=new HTMLOption(this.oSel,UnicodeClean(this.currentTokenValue()));F.fTracksInput=true;this.rgOpts=[{}];C.options=[F]}moveToHold(C);var E=function(H,G){C.options.push(new HTMLOption(C,G,H,true))};$("option",D).each(function(){E($("sValue",this).text(),$("sHTML",this).text())});restoreFromHold(C)}A.refresh(false);A.dtLastTyped=new BrowserDate();A.filterList(A.dtLastTyped);this.cancelLookupRequest()};this.createRgOpts=function(){this.rgOpts=[];var E=this.oSel.options;if(!E.length){var G=this.rgOpts[0]={};G.s=G.sText="";G.fVisible=false;G.ixLoc=-1;G.ixOriginal=0;G.elOption=null;G.sImg=""}else{var C=this.oSel.getAttribute("img");for(var D=0;D<E.length;D++){var F=E[D];var G=this.rgOpts[D]={};G.s=trim(F.innerHTML);G.fVisible=G.s.length>0;G.sText=trim((F.textContent||F.innerText||DecodeHTMLEnt(F.innerHTML)));G.ixLoc=-1;G.ixOriginal=D;G.elOption=F;if(C){G.sImg=F.getAttribute("img")}G.fTracksInput=F.getAttribute("fTracksInput")}}this.sHTMLLast=this.oSel.innerHTML};this.createBehaviors=function(){this.oDropButton.onmouseover=this.fxnIfEnabled(function(){this.src=StaticContentUrl("images/dropHover.png")});this.oDropButton.onmouseout=this.fxnIfEnabled(function(){this.src=StaticContentUrl("images/dropNormal.png")});this.oDropButton.onmousedown=this.fxnIfEnabled(function(C){A.fIgnoreNextBlur=true;if(isVisible(A.oDropList)){A.hideList();return cancel(C)}A.unFilterList();A.showList();safeFocus(A.oText);return cancel(C)});this.oText.onmouseover=this.fxnIfEnabled(function(){A.oDropButton.onmouseover.apply(A.oDropButton)});this.oText.onmouseout=this.fxnIfEnabled(function(){A.oDropButton.onmouseout.apply(A.oDropButton)});$(this.oText).mousedown(this.fxnIfEnabled(function(C){if(A.fChunky&&A.fTextFocused){C.stopPropagation()}if(A.pgSrc){return }if(!isVisible(A.oDropList)){A.unFilterList();A.showList();A.refreshSize()}}));$(this.oText).blur(this.fxnIfEnabled(function(){if(!A.fIgnoreNextBlur){A.cancelLookupRequest();A.hideList();if(A.fTextBox){A.commit()}else{A.showChosenValue()}if(A.fChunky){A.chunkCurrentTokens();setTimeout(function(){if(!A.fTextFocused){A.moveInputToEnd()}},10)}}A.fIgnoreNextBlur=false;A.fTextFocused=false}));window.g_o=this;if(window.opera){$(this.oText).keypress(this.fxnIfEnabled(function(C){if(A.handleKeydown(C)){A.handleKeypress(C)}}))}else{$(this.oText).keydown(this.fxnIfEnabled(function(C){A.handleKeydown(C)}));$(this.oText).keypress(this.fxnIfEnabled(function(C){A.handleKeypress(C)}))}this.oText.onfocus=this.fxnIfEnabled(function(C){A.refreshDropButton();if(!A.fIgnoreNextFocus){if(!isVisible(A.oDropList)){A.unFilterList()}A.fTextFocused=true;if(!A.fTextBox){setTimeout(function(){if(A.fTextFocused){selectContents(A.oText)}},1)}if(A.oSel.onfocus&&A.oSel.onfocus.apply){A.oSel.onfocus.apply(A.oSel)}}A.fIgnoreNextFocus=false});this.oDropList.onmousedown=this.fxnIfEnabled(function(C){A.fIgnoreNextBlur=true;if(window.webkit){return false}return cancel(C)});$(this.oSel).bind("synch",function(){if(A.fTextBox){A.oText.value=A.oSel.value}});this.associateLabel();if(this.fChunky){$(this.oSurround).mousedown(function(C){A.deselectChunk();if($(A.oText).val().length>0){A.chunkCurrentTokens()}A.moveInputToEnd();setTimeout(function(){$(A.oText).focus()},1);C.stopPropagation()});$(document).mousedown(function(){A.deselectChunk()});$(document).keydown(function(F){var E=getKeyCode(F);if(E==8||E==46){var C=DropListControl.elChunkSelected;A.removeSelectedChunk();if(C){$(A.oText).focus();return cancel(F)}}else{if(E==13||E==9){if(isChildOf(DropListControl.elChunkSelected,A.oSurround)){A.deselectChunk();A.focus();return cancel(F)}}else{var D=null;if(DropListControl.elChunkSelected||A.fTextFocused){D=getArrowKeyCode(F)}if(A.fTextFocused&&(!(D==KEY_ARROW_LEFT||D==KEY_ARROW_UP)||A.getCursorPosition()!=0)&&(!(D==KEY_ARROW_RIGHT||D==KEY_ARROW_DOWN)||A.getCursorPosition()!=$(A.oText).val().length)){D=null}if(D==KEY_ARROW_LEFT||D==KEY_ARROW_UP){if(A.fTextFocused){A.selectChunkBeforeInput()}else{A.selectPreviousChunk()}return cancel(F)}if(D==KEY_ARROW_RIGHT||D==KEY_ARROW_DOWN){if(A.fTextFocused){A.selectChunkAfterInput()}else{A.selectNextChunk()}return cancel(F)}else{if(isChildOf(DropListControl.elChunkSelected,A.oSurround)){A.focus()}A.deselectChunk()}}}return true})}};this.associateLabel=function(){var C=document.getElementsByTagName("label");if(!C||!C.length){return }var D=C[C.length-1];var E=D.getAttribute("for")||D.getAttribute("htmlFor");if(E==this.oSel.id){D.onclick=this.oDropButton.onmousedown}};this.fxnIfEnabled=function(C){return function(D){if(A.rgOpts&&!A.fDisabled){C.apply(this,[D])}}};this.disable=function(){this.setEnabled(false)};this.enable=function(){this.setEnabled(true)};this.setEnabled=function(C){this.fDisabled=!C;this.oText.disabled=!C;this.oDropButton.src=C?StaticContentUrl("images/dropNormal.png"):StaticContentUrl("images/dropDisabled.png")};this.oSizeTester=null;this.autoSizeChunkInput=function(){if(this.oSizeTester){return }this.oSizeTester=$("<div/>").css({position:"absolute",left:-10000,top:-10000,width:"auto","font-size":$(this.oText).css("font-size"),"font-family":$(this.oText).css("font-family"),"font-weight":$(this.oText).css("font-weight"),whitespace:"nowrap"}).appendTo(this.oSurround);$(this.oText).bind("keyup keydown blur update",function(){A.oSizeTester.text($(this).val());var C=$(this).parents("a.chinput:first");C.width(Math.max(C.width(),A.oSizeTester.width()+24)).scrollLeft(0).scrollTop(0);$(this).width(A.oSizeTester.width()+64)})};this.createSkeleton=function(){var E=this.fChunky?DOM.span():DOM.nobr();this.oSel.parentNode.insertBefore(E,this.oSel);var G=getActualStyle(this.oSel,"fontSize");var H=getActualStyle(this.oSel,"fontFamily");if(!H.length){H="Tahoma,Arial,Helvetica,sans-serif"}if(!G||G=="0px"){G="12px"}var K,D,I;K=document.createElement("input");K.type="text";K.className="dlgText";K.style.margin="0";K.style.padding="1px 0 2px 4px";K.style.position="relative";K.style.top="-2px";K.style.fontSize=G;K.style.fontFamily=H;K.setAttribute("autocomplete","off");K.id=this.id+"oText";K.title=this.oSel.title;K.tabIndex=this.oSel.tabIndex;K.setAttribute("maxlength",this.oSel.getAttribute("maxlength"));$(K).css({"box-sizing":"content-box","-moz-box-sizing":"content-box","-webkit-box-sizing":"content-box","-ms-box-sizing":"content-box"});if(!this.fFillParentWidth){if(!this.fTextBox){var F=this.getSelWidth();if(F>26){K.style.width=(F-(window.chrome?24:22))+"px"}}else{var J=this.oSel.getAttribute("size");if(J){K.size=J}K.style.width=getActualStyle(this.oSel,"width")}}if(this.fTextBox){K.className=this.oSel.className}this.oSel.style.display="none";this.oText=K;E.appendChild(this.oText);if(DropList.oDropButtonProto){D=DropList.oDropButtonProto.cloneNode(false)}else{D=document.createElement("img");D.src=StaticContentUrl("images/dropNormal.png");D.style.width="18px";D.style.height="18px";D.style.top=window.ie?"2px":"3px";D.style.position="relative";DropList.oDropButtonProto=D.cloneNode(false)}D.id=this.id+"oButton";D.titleId=this.oText.id;this.oDropButton=D;if(!this.fTextBox){E.appendChild(this.oDropButton)}if(DropList.oDropListProto){I=DropList.oDropListProto.cloneNode(false)}else{I=document.createElement("div");I.style.position="absolute";I.style.backgroundColor="rgb(255,255,255)";I.style.textAlign="left";this.setFourBorderStyles(I);DropList.oDropListProto=I.cloneNode(false)}I.style.fontFamily=H;I.style.fontSize=G;I.id=this.id+"oDropList";if(this.fTextBox){if(this.fEscapeInitialQuotes){this.oText.value=this.escapeQuotes(this.oSel.value)}else{this.oText.value=this.oSel.value}this.oText.style.margin="";this.oText.style.padding="";this.oText.style.top="";this.oText.style.fontSize=this.oSel.style.fontSize}if($.browser.msie){I.style.overflowY="auto";I.style.overflowX="hidden"}else{if(window.webkit){I.className="autoscroll";I.style.maxHeight="260px"}else{I.style.overflow=(window.ie||window.opera||window.webkit)?"auto":"-moz-scrollbars-vertical"}}I.style.display="none";I.tabIndex=-1;this.oDropList=I;if(document.body.lastChild.parentNode!=document.body){document.body.lastChild.parentNode.insertBefore(this.oDropList,document.body.lastChild)}else{document.body.insertBefore(this.oDropList,document.body.lastChild)}this.oSel.onfocus=function(){A.focus()};this.fDisabled=this.oSel.disabled;if(this.fDisabled){this.disable()}if(this.fChunky){this.oText.style.border="0px";this.oText.style.outline="none";this.oText.style.paddingLeft="0px";if(window.ie){this.oText.style.paddingTop="4px"}this.oSurround=DOM.div({id:"idSurroundTemp_"+this.oSel.id,"class":"droplistSurround droplistSurroundEmpty"});if(this.fFillParentWidth){$(this.oSurround).css({position:"absolute",left:"0px",right:"0px"})}else{if(this.oText.offsetWidth>0){this.oSurround.style.width=(this.oText.offsetWidth-1)+"px"}else{this.oSurround.style.width=getActualStyle(this.oText,"width")}}this.oText.parentNode.insertBefore(this.oSurround,this.oText);this.oSurround.appendChild(DOM.a({"class":"chinput"},this.oText));this.oSurround.appendChild(DOM.div({"class":"clear"},DOM.nbsp()));this.autoSizeChunkInput()}if(this.fFillParentWidth){$(this.oSurround).css("position","relative");var C=$("<div>").css({width:"100%",position:"relative","min-height":"24px"});$(E).wrapInner(C);C=$(E).find(">div");if(this.fTextBox){C.find("input").css({width:"100%",position:"absolute"})}else{var L=$("<div>").css({left:"0px",right:"24px"});if(!window.ie6){L.css("position","absolute")}C.find("input").wrap(L).css({width:"100%",top:"3px"});C.find("img").css({position:"absolute",top:"0px",right:window.ie6?"-6px":"0px"})}}};this.escapeQuotes=function(G){var C=[];var F=G.match(new RegExp('("[^"]*"|[^'+this.sDelimiters+"])+","g"));if(!F||!F.length){return""}for(var E=0;E<F.length;E++){var D=$.trim(F[E]);if(/^".*"$/.test(D)){D=D.substr(1,D.length-2)}D=D.replace(/"/g,'""');if(new RegExp("["+this.sDelimiters+'"]').test(D)){D='"'+D+'"'}C.push(D)}return C.join(",")};this.setFourBorderStyles=function(C){C.style.borderLeft="1px solid rgb(181,178,181)";C.style.borderTop="1px solid rgb(181,178,181)";C.style.borderRight="1px solid rgb(0,0,0)";C.style.borderBottom="1px solid rgb(0,0,0)"};this.getSelWidth=function(){var E=this.oSel;if(!E){return 300}var D=E.style.width;var C=D?D.indexOf("px"):-1;if(C>0){return Number(D.substring(0,C))}else{return E.offsetWidth||300}};this.fxnMouseoverOpt=function(){if((new BrowserDate()-A.dtLastKeyboardScroll)>20){A.selectOpt(this.ix)}};this.fxnMouseupOpt=function(){A.chooseValue(this.ix)};this.createOpt=function(E){var D;if(!this.createOpt.oProto){D=document.createElement("div");var C=D.style;C.padding="0 0 0 4px";C.margin="0";C.cursor="default";C.zIndex="2";this.createOpt.oProto=D.cloneNode(false)}else{D=this.createOpt.oProto.cloneNode(false)}D.onmouseover=this.fxnMouseoverOpt;D.onmouseup=this.fxnMouseupOpt;return D};this.setOptInnerHTML=function(C){var D=this.rgOpts[C].sText;var E=((this.reMatch!=null)?D.replace(this.reMatch,"{BOLDSTART}$1{BOLDEND}"):D);E=UnicodeClean(E).replace("{BOLDSTART}","<b>").replace("{BOLDEND}","</b>");this.rgOpts[C].oOpt.innerHTML="<nobr>"+(this.rgOpts[C].sImg?'<img src="'+this.rgOpts[C].sImg+'" class="dropicon"/>':"")+E+"</nobr>"};this.restoreLastValue=function(){if(this.fTextBox&&!this.fInitialRestore){return }if(!(this.fInitialRestore&&this.oText.value.length)){this.chooseValue(this.trueSelection(),true)}this.fInitialRestore=false};this.chooseValue=function(C,D){if(!this.fTextBox&&(C==null||C<0)){this.restoreLastValue();return }if(C!=null&&!this.optIsSelectable(this.rgOpts[C])){C=this.trueSelection()}if(this.fTextBox){this.commit()}else{if(this.rgOpts[C].elOption){this.rgOpts[C].elOption.selected=true}}if(!D){this.deselectOpt(this.ixSelected);this.hideList();this.selectOpt(C)}this.showChosenValue((C!=null?this.rgOpts[C].sText:null));if(!D){if(this.oSel.onchange){this.oSel.onchange.apply(this.oSel);if(this.oSel.onclick&&this.oSel.onclick.apply){this.oSel.onclick.apply(this.oSel)}}$(this.oSel).triggerHandler("change")}};this.showChosenValue=function(C){setTimeout(function(){if(A.oText){if(!C){if(A.fTextBox){C=A.currentTokenValue()}else{C=A.rgOpts[A.trueSelection()].sText}}else{if(A.fTextBox){A.commit()}}A.setCurrentTokenValue(C);A.fValueIsUserInput=false}},1)};this.selectNeighborVisibleOpt=function(E,D){if(D==null){D=this.ixSelected}for(var C=E?(D+1):(D-1);E?(C<this.rgOpts.length):(C>=0);E?(C++):(C--)){if(this.optIsSelectable(this.rgOpts[C])){this.selectOpt(C);return }}};this.selectPgVisibleOpt=function(E){var D=this.rgOpts[this.ixSelected].oOpt.offsetTop+(E?(this.oDropList.offsetHeight-20):((-1*this.oDropList.offsetHeight)+20));for(var C=this.ixSelected;E?(C<this.rgOpts.length):(C>=0);E?(C++):(C--)){if(E&&((this.rgOpts[C].oOpt.offsetTop>=D)||(C==(this.rgOpts.length-1)))||(!E&&((this.rgOpts[C].oOpt.offsetTop<=D)||(C==0)))){this.selectOpt(C);return }}};this.optIsSelectable=function(C){return(this.fTextBox||C.fVisible)};this.selectOpt=function(C){if(!this.rgOpts[C]){return }if(!this.optIsSelectable(this.rgOpts[C])){this.selectNeighborVisibleOpt(true,C);return }this.deselectOpt(this.ixSelected);this.styleOptSelected(C);this.ixSelected=C;if(!window.ie&&!window.webkit){removeTextSelections()}};this.deselectOpt=function(C){if(!this.rgOpts[C]){return }this.styleOptNormal(C)};this.styleOptSelected=function(C){var D=this.rgOpts[C].oOpt;if(!D){return }D.style.backgroundColor="rgb(49,105,198)";D.style.color="rgb(255,255,255)"};this.styleOptNormal=function(C){var D=this.rgOpts[C].oOpt;if(!D){return }D.style.backgroundColor="rgb(255,255,255)";D.style.color="rgb(0,0,0)"};this.hasSelectionStartEnd=function(){if(window.ie){return false}try{return this.oText.selectionStart!=null}catch(C){return false}};this.setCursorPosition=function(C){if(!this.oText){return }if(this.hasSelectionStartEnd()){this.oText.selectionStart=this.oText.selectionEnd=C}else{if(document.selection&&document.selection.createRange){var D=document.selection.createRange();D.moveStart("character",-1*this.oText.value.length);D.moveStart("character",C);D.collapse(true);D.select()}}};this.getCursorPosition=function(){if(!this.oText){return -1}var E=-1;var C=-1;if(this.hasSelectionStartEnd()){E=this.oText.selectionStart;C=this.oText.selectionEnd}else{if(document.selection&&document.selection.createRange){try{E=Math.abs(document.selection.createRange().moveStart("character",-1*this.oText.value.length));C=Math.abs(document.selection.createRange().moveEnd("character",-1*this.oText.value.length))}catch(D){}}}if(E==C){return E}else{return -1}};this.getRgTokens=function(C){if(!this.oText||!this.sDelimiters){return null}var F=[];var E=SplitTokens(this.fEscapeInitialQuotes?this.escapeQuotes(this.oText.value):this.oText.value,this.sDelimiters,(!C&&this.fIgnoreDoubleQuotes));for(var D=0;D<E.length;D++){var G=trim(E[D][1]);if(G){F[F.length]=G}}return F};this.chunkCurrentTokens=function(C){moveToHold(this.oSurround);var E=this.getRgTokens(C);if(!E){return }for(var D=0;D<E.length;D++){this.oText.value=E[D];this.commit();this.setCurrentTokenValue(E[D],true)}restoreFromHold(this.oSurround)};this.collapseInput=function(){$(this.oSurround).find("a.chinput").width("4px")};this.currentTokenLocation=function(F){if(!this.oText||!this.sDelimiters){return null}var I=this.getCursorPosition();var H=null;var D=SplitTokens(this.fEscapeInitialQuotes?this.escapeQuotes(this.oText.value):this.oText.value,this.sDelimiters,this.fIgnoreDoubleQuotes);for(var C=0;C<D.length;C++){var G=D[C][0]-1;var E=G+D[C][1].length;if(G<=I&&E>=I){H={ixStart:G,ixEnd:E,fLast:(E>=trim(this.oText.value).length)}}}return H};this.currentTokenValue=function(){if(!this.oText){return""}if(!this.sDelimiters){return trim(this.oText.value)}var C=this.currentTokenLocation();if(!C||C.ixStart<0||C.ixEnd<0||C.ixEnd>this.oText.value.length){return""}return trim(this.oText.value.substring(C.ixStart,C.ixEnd))};this.setCurrentTokenValue=function(F,C){if(!this.oText){return }this.cancelLookupRequest();if(!this.fTextBox){this.oText.value=F;return }if(!this.sDelimiters){this.oText.value=F;this.commit();return }if(!C){if(this.currentTokenValue()==F){return }var G=this.currentTokenLocation(true);if(!G){return }if(!this.fChunky){var E=this.sDelimiters.charAt(0);if(G.fLast){F+=E;if(E!=" "){F+=" "}}if(G.ixStart&&E!=" "){F=" "+F}}var D=F;if(!this.fChunky){D=this.oText.value;D=D.substring(0,G.ixStart)+F+D.substring(G.ixEnd,D.length)}if(this.fChunky&&this.getRgTokens().length>1){this.oText.value=D;this.chunkCurrentTokens();return }this.oText.value=D}if(this.fChunky){this.addChunk();this.oText.value="";this.commit()}else{this.commit();this.setCursorPosition(G.ixStart+F.length+1)}};this.shortToken=function(C){return C.length<=this.nShortTokenLength?C:C.substring(0,this.nShortTokenLength-3)+"..."};this.addChunk=function(){var E=this.fTextBox?this.oText.value:this.oSel.value;var J="tok_"+E;if(this.hashChunkTokens[J]){this.resultLookupRequest(null);return }if(!this.cChunks){$(this.oSurround).removeClass("droplistSurroundEmpty")}var D=E.replace(/""/g,'"');var C=this.fxnValidate?this.fxnValidate(D):true;var K=this.cChunks++;var G=DOM.img({src:C?StaticContentUrl("images/icon-blue-x.gif"):StaticContentUrl("images/icon-red-x.png"),"class":"chunkX"});var I=this.fxnChunkDisplay?this.fxnChunkDisplay(E):E.replace(/""/g,'"');var F=this.fxnChunkDisplay?this.fxnChunkDisplay(E,true):E.replace(/""/g,'"');if(typeof F=="string"){F=this.shortToken(F)}var H=DOM.a({"class":"chunk",title:I},DOM.nobr(F,G),DOM.input({type:"hidden",name:(this.oSel.name+"_"+K),value:D,fieldValue:1}));$(H).addClass(C?"valid":"invalid");H.sTokenHash=J;$(H).mousedown(function(L){if($(A.oText).val().length){A.addChunk()}$(A.oText).parents("a.chinput:first").width($(H).width()+21).insertAfter(H);$(H).hide();$(A.oText).val($(H).find("input[type=hidden]").val());$(A.oText).triggerHandler("update");setTimeout(function(){$(A.oText).focus().select();A.removeChunk(H,true)},1);L.stopPropagation()}).mouseenter(function(){if(DropListControl.elChunkSelected!=this){$(this).addClass("hover")}}).mouseleave(function(){if(DropListControl.elChunkSelected!=this){$(this).removeClass("hover")}});$(G).mousedown(function(L){L.stopPropagation()}).click(function(L){A.removeChunk(H);return cancel(L)});this.oSurround.insertBefore(H,this.oText.parentNode);this.resultLookupRequest(null);this.hashChunkTokens[J]=true;this.fixChunkNames();$(this.oText).val("").triggerHandler("update");this.collapseInput();if(this.oSel.onchange){this.oSel.onchange.apply(this.oSel)}};this.fixChunkNames=function(){var C=0;$("a.chunk",this.oSurround).each(function(){$("input[type=hidden]",this).each(function(){this.name=A.oSel.name+"_"+C;C++})});this.cChunks=C};this.removeChunk=function(D,C){if(!D||!D.parentNode){return }D.parentNode.removeChild(D);this.fixChunkNames();if(!this.cChunks){$(this.oSurround).addClass("droplistSurroundEmpty")}this.resultLookupRequest(null);if(C){this.deselectChunk();this.focus()}this.hashChunkTokens[D.sTokenHash]=null;if(this.oSel.onchange){this.oSel.onchange.apply(this.oSel)}this.commit()};this.selectChunkBeforeInput=function(){var C=$(this.oSurround).find("a.chinput").prevAll("a.chunk:first");if(C.length){this.selectChunk(C.get(0));$(this.oSurround).find("a.chinput").insertAfter($(this.oSurround).find("a.chunk:last"))}};this.selectChunkAfterInput=function(){var C=$(this.oSurround).find("a.chinput").nextAll("a.chunk:first");if(C.length){this.selectChunk(C.get(0));$(this.oSurround).find("a.chinput").insertAfter($(this.oSurround).find("a.chunk:last"))}};this.moveInputToEnd=function(){var C=$(this.oSurround).find("a.chunk:last");if(C.length){$(this.oSurround).find("a.chinput").insertAfter(C)}};this.removeSelectedChunk=function(){if(isChildOf(DropListControl.elChunkSelected,this.oSurround)){this.removeChunk(DropListControl.elChunkSelected);DropListControl.elChunkSelected=null}};this.selectChunk=function(C){this.deselectChunk();if(!C){return }$(C).addClass("selected");safeFocus(C);DropListControl.elChunkSelected=C;this.oText.blur()};this.deselectChunk=function(){if(DropListControl.elChunkSelected){$(DropListControl.elChunkSelected).removeClass("selected").removeClass("hover");DropListControl.elChunkSelected=null}};this.selectPreviousChunk=function(){if(!isChildOf(DropListControl.elChunkSelected,this.oSurround)&&!this.fTextFocused){return }if(this.fTextFocused){this.selectChunkBeforeInput()}else{var C=DropListControl.elChunkSelected.previousSibling;if(isTagName(C,"a")&&hasClassName(C,"chunk")){this.selectChunk(C)}}};this.selectNextChunk=function(){if(!isChildOf(DropListControl.elChunkSelected,this.oSurround)){return }var C=DropListControl.elChunkSelected.nextSibling;if(isTagName(C,"a")&&hasClassName(C,"chunk")){this.selectChunk(C)}else{this.deselectChunk();this.focus()}};this.filterList=function(F){if(!this.oText){return }if(F!=this.dtLastTyped){return }var G=this.currentTokenValue();var E=G.toLowerCase();var I;this.cVisibleLast=0;for(var C=0;C<this.rgOpts.length;C++){var H=this.rgOpts[C];if(!H.sText){H.sText=""}if(!H.sLower){H.sLower=H.sText.toLowerCase()}if(H.fTracksInput){var D="";if(G){if(this.fValueIsUserInput){D=G}else{D=H.sText}}H.sText=D;H.s=UnicodeClean(D);H.fVisible=(D.length>0);if(H.fVisible){I=H.s}}else{if(H.s&&H.s!=I){H.ixLoc=H.sLower.indexOf(E);H.fVisible=(H.ixLoc!=-1)}else{H.fVisible=false}}if(H.fVisible){this.cVisibleLast++}}this.updateList(true)};this.unFilterList=function(){this.deselectOpt(this.ixSelected);this.ixSelected=this.trueSelection();this.cVisibleLast=0;for(var C=0;C<this.rgOpts.length;C++){var D=this.rgOpts[C];D.ixLoc=-1;D.fVisible=(D.s.length>0);if(D.fVisible){this.cVisibleLast++}}this.updateList()};this.sortHelper=function(D,C){if(D.fTracksInput){return(D.ixOriginal==0)?-1:1}if(C.fTracksInput){return(C.ixOriginal==0)?1:-1}return((C.ixLoc<0&&D.ixLoc>=0)?-1:(D.ixLoc<0&&C.ixLoc>=0)?1:(D.ixLoc<C.ixLoc)?-1:(C.ixLoc<D.ixLoc)?1:(D.ixOriginal<C.ixOriginal)?-1:(C.ixOriginal<D.ixOriginal)?1:0)};this.getZIndex=function(){var C=this.oSel;var E=0;while(C&&C.style){var D=getActualStyle(C,"zIndex");if(isNaN(D)){D=0}E=Math.max(E,D);C=C.parentNode}return E};this.showList=function(){var C=this.getZIndex()+2;this.oText.style.zIndex=C;this.oDropButton.style.zIndex=C;this.oDropList.style.zIndex=C;this.getPosition();theMgr.showPopup(this.oDropList.id,null,this.x,this.y,false);if(this.ixSelected>=0){this.scrollIntoView(this.rgOpts[this.ixSelected].oOpt,true)}};this.getPosition=function(D){var C=this.fChunky?this.oSurround:this.oText;var F=$(C).offset();this.pxLeftText=F.left;this.pxTopText=F.top;this.pxHeightText=C.offsetHeight;if(!D){var E=getInWindowCoordinates(this.oDropList,this.pxLeftText,this.pxTopText,C,0,0,true);this.fAboveText=(E.y<this.pxTopText);this.fOffsetText=this.fOffsetText||(E.x!=this.pxLeftText);this.x=E.x;this.y=E.y}};this.hideList=function(C){if(!isVisible(this.oDropList)){return }this.preHide();theMgr.hidePopup(this.oDropList.id,C)};this.preHide=function(){this.deselectOpt(this.ixSelected);this.oText.style.zIndex=0;this.oDropButton.style.zIndex=0;this.oDropList.style.zIndex=0;if(this.fTextBox){this.commit()}};this.scrollIntoView=function(D,C){if(!D){return }if(C||D.offsetTop<this.oDropList.scrollTop){this.oDropList.scrollTop=D.offsetTop+1}else{if((D.offsetTop+D.offsetHeight)>(this.oDropList.scrollTop+this.oDropList.offsetHeight-4)){this.oDropList.scrollTop=(D.offsetTop-this.oDropList.offsetHeight+D.offsetHeight+4)}}};this.repairFocus=function(){if(!window.ie6){return }var C=this.oText.createTextRange();var D=C.moveEnd("character",-1*this.oText.value.length);this.fIgnoreNextBlur=true;this.fIgnoreNextFocus=true;this.oText.blur();this.oText.focus();C=this.oText.createTextRange();C.moveEnd("character",-1*D);C.moveStart("character",-1*D);C.collapse();C.select()};this.focus=function(){$(this.oText).focus()};this.refreshSize=function(){var H=false;if(this.oDropList.style.display=="none"){H=true;this.oDropList.style.visibility="hidden";this.oDropList.style.display=""}var C=!window.ie6?this.oText.offsetWidth+this.oDropButton.offsetWidth-3:(this.oText.offsetWidth-2);var G=0;var I=this.rgOpts.length;this.oDropList.style.width="1px";if(this.oDropList.scrollWidth+20>C){C=this.oDropList.scrollWidth+20}for(var D=0;D<I;D++){var F=this.rgOpts[D];if(F.fVisible){if(!G&&F.oOpt){G=F.oOpt.offsetHeight}}}C=Math.min(C,windowWidthCorrected()-50);this.oDropList.style.width=C+"px";if(this.fOffsetText&&this.pxWidthLast!=C){this.getPosition();positionElement(this.oDropList,this.x,this.y)}this.pxWidthLast=C;G*=this.cVisibleLast;if(!window.webkit){this.oDropList.style.height=Math.min(G,260)+"px"}if(this.fAboveText){positionElement(this.oDropList,null,(this.pxTopText-this.oDropList.offsetHeight))}this.oDropList.scrollTop=0;this.oDropList.scrollLeft=0;if(H){this.oDropList.style.display="none";this.oDropList.style.visibility="visible"}else{var E=this.rgOpts[this.ixSelected];if(E){this.scrollIntoView(E.oOpt)}}};this.updateList=function(F){this.deselectOpt(this.ixSelected);this.oDropList.innerHTML="";if(F){try{this.reMatch=new RegExp("("+EscapeForRegExp(this.currentTokenValue())+")","i")}catch(H){this.reMatch=null}}else{this.reMatch=null}var E=this.rgOpts[this.ixSelected];var G=this.ixSelected;this.rgOpts.sort(this.sortHelper);for(var D=0;D<this.rgOpts.length;D++){var I=this.rgOpts[D];if(!I.oOpt){I.oOpt=this.createOpt(I)}I.oOpt.ix=D;if(I.fVisible){this.setOptInnerHTML(D);this.oDropList.appendChild(I.oOpt)}if(E!=null&&I==E){G=D}}this.selectOpt(F?0:G);this.refreshSize();if(this.pgSrc){var C=isVisible(this.oDropList);if(this.cVisibleLast>0&&!C){this.showList()}else{if(this.cVisibleLast<=0&&C){this.hideList(true)}}}};this.trueSelection=function(){if(this.oSel){this.oSel.selectedIndex}var D;for(var C=0;C<this.rgOpts.length;C++){if(this.rgOpts[C].elOption){if(this.rgOpts[C].elOption.selected&&this.optIsSelectable(this.rgOpts[C])){return C}if(!D){D=C}}}return D||0};this.resetChunks=function(){if(!this.fChunky){return }$("a.chunk",this.oSurround).remove();this.hashChunkTokens={};this.refresh(true)};this.serialize=function(){return $(this.oSurround).find("a.chunk input[type=hidden]").map(function(){return $(this).val()}).get().join(", ")};this.commit=function(){if(this.fWriteBack){this.oSel.value=this.serialize()}else{this.oSel.value=this.oText.value}};this.init()}var KEY_ARROW_LEFT=0;var KEY_ARROW_RIGHT=1;var KEY_ARROW_UP=2;var KEY_ARROW_DOWN=3;var KEY_PG_UP=4;var KEY_PG_DOWN=5;var rgArrowKeyMap={37:KEY_ARROW_LEFT,39:KEY_ARROW_RIGHT,38:KEY_ARROW_UP,40:KEY_ARROW_DOWN,34:KEY_PG_DOWN,33:KEY_PG_UP};function getArrowKeyCode(A){if(rgArrowKeyMap[getKeyCode(A)]!=null){return rgArrowKeyMap[getKeyCode(A)]}return null}function selectContents(A){if(A.select){A.select()}else{if(A.setSelectionRange){A.setSelectionRange(0,A.value.length)}}}var DropListControl=new function(){var B={};var A=0;this.colorChunk="#E0E9F1";this.colorChunkHover="#FFFFFF";this.colorChunkSelected="#B1C9DD";this.initialize=function(){this.refreshWithin(document.body)};this.refreshWithin=function(F,E){if(!F){return }var D=null;var C=this;$("select",F).map(function(){D=C.refresh(this)});$("input[pgSrc]",F).map(function(){D=C.refresh(this)});if(E&&D){D.focus()}};this.refreshLast=function(){var C=document.getElementsByTagName("select");if(C.length){DropListControl.refresh(C[C.length-1])}};this.refresh=function(E){if(!g_fDropListsEnabled){return }if(!E){return null}if(!isTagName(E,"select")&&!isTagName(E,"input")){return null}if(isTagName(E,"input")){if(E.type!="text"){return null}var D=$(E).attr("pgSrc");if(arguments.length!=2&&!D){return null}E.fTextBox=true;E.options=[];E.selectedIndex=0;if(!D){var F=arguments[1];E.options[0]=new HTMLOption(E,UnicodeClean(E.value));E.options[0].fTracksInput=true;for(var C=0;C<F.length;C++){E.options[C+1]=new HTMLOption(E,F[C],F[C])}}}if(hasClassName(E,"nodroplist")){E.style.visibility="visible";return null}if(!E.id){E.id="idSelectTemp_"+A++}if(window.ie){if($(E).closest("table").length>0&&!(E.offsetWidth||E.style.width)){E.nTimeout=(E.nTimeout?E.nTimeout*2:10);if(E.nTimeout<=160){setTimeout(function(){DropListControl.refresh(E)},E.nTimeout);return }}}if(B[E.id]&&B[E.id].isLegit()){B[E.id].refresh(true)}else{if(!B[E.id]||B[E.id].fInited){if(B[E.id]){B[E.id].destroy();this.unloadSingle(B[E.id])}B[E.id]=new DropList(E);if(!B[E.id].init){B[E.id]=null}}}return B[E.id]};this.restoreLastValue=function(C){if(!C||!C.id||!B[C.id]){return }B[C.id].restoreLastValue()};this.resetChunks=function(C){if(!C||!C.id||!B[C.id]){return }B[C.id].resetChunks()};this.serialize=function(C){if(!C||!C.id||!B[C.id]){return null}return B[C.id].serialize()};this.unload=function(){if(!window.ie6){return }for(var C in B){this.unloadSingle(B[C])}};this.unloadSingle=function(C){if(!window.ie6){return }if(!C||!C.oSel){return }C.oSel.onfocus=null;C.oSel=null}};function DLCL(){DropListControl.refreshLast()};
function TimeInterval(){this.properties=["ixInterval","ixBug","dtStart","dtEnd","fToDelete","fToChange","sBugTitle","sLinkClass"];this.serializeProperties=["ixInterval","ixBug","dtStart","dtEnd","fToDelete","fToChange"];var A=this;this.properties.foreach(function(B){A[B]=null});this.ixInterval=-1;this.fToDelete=false;this.sBugTitle="";this.sLinkClass=""}TimeInterval.prototype.setChanged=function(A){this.fToChange=A;Timesheet.rgixBugChanged.push(this.ixBug)};TimeInterval.prototype.compare=function(A){if(this.dtStart>A.dtStart){return 1}if(A.dtStart>this.dtStart){return -1}if(!this.Ends()){return 1}if(!A.Ends()){return -1}if(this.dtEnd>A.dtEnd){return 1}if(A.dtEnd>this.dtEnd){return -1}return 0};TimeInterval.prototype.fromSJS=function(sJS){var oSer=eval("("+sJS+")");var o=this;this.properties.foreach(function(s){o[s]=oSer[s]});if(this.ixInterval<0){this.ixInterval=Timesheet.getNextRowNumber()}this.idRow=IdTimesheetRow(this)};TimeInterval.prototype.fromPopup=function(){this.dtStart=Timesheet.getUTCDateFromCTZsTime(elById("dtStartTime").value);if(this.ixInterval<1||IsDate(this.dtEnd)){this.dtEnd=Timesheet.getUTCDateFromCTZsTime(elById("dtEndTime").value)}this.ixBug=elById("ixBugEdit").value;this.setChanged(true);return true};TimeInterval.prototype.checkBug=function(B,A,D,E,C){$.get(sDefaultURI+"?fAlaCarte=1&pg=pgCanWorkOn&ixBug="+B,null,function(F){TimeInterval.checkBugResponse(F,A,D,E,C)})};TimeInterval.checkBugResponse=function(B,A,D,E,C){switch($("nCanWorkOn",B).text()){case"1":A();break;case"-1":D();break;case"-2":A();break;case"-3":E();break;case"-4":C();break}};TimeInterval.prototype.Ends=function(){return IsDate(this.dtEnd)};TimeInterval.prototype.getEl=function(){return elById(this.idRow)};TimeInterval.prototype.toggleDeleted=function(){this.setChanged(true);this.fToDelete=!this.fToDelete;Timesheet.display();setTimeout(function(){Timesheet.check()},1);return true};TimeInterval.prototype.close=function(){this.setChanged(true);Timesheet.fCloseInterval=true;this.dtEnd=new UTCDate();Timesheet.display();setTimeout(function(){Timesheet.check()},1);return true};TimeInterval.prototype.serialize=function(){var B=this;var A=this.serializeProperties.map(function(C){if(null==B[C]){return""}if(C=="ixBug"){return CLng(B[C])}if(IsDate(B[C])){return SerializeDate(B[C])}return encodeURIComponent(B[C])});return A.join("!!!")};TimeInterval.prototype.flashChanged=function(){if(this.fToChange){YFTManager.showYellow("TimeInterval",this.getEl());this.setChanged(false)}};TimeInterval.prototype.getStartDate=function(){return this.dtStart};TimeInterval.prototype.GetBugTitle=function(){return this.sBugTitle};TimeInterval.prototype.GetLinkClass=function(){return this.sLinkClass};function DayTimesheet(A){this.dt=A;this.rgti=[]}DayTimesheet.prototype.tiByIx=function(A){return this.rgti.firstMatch(function(B){return A==B.ixInterval})};DayTimesheet.prototype.serialize=function(){return this.rgti.map(function(A){return A.serialize()}).join("|")};DayTimesheet.prototype.addTI=function(A){this.rgti.push(A);this.rgti.sort(function(C,B){return C.compare(B)})};var Timesheet=new function(){this.rgday=[];this.rgtiAdd=[];this.cNewRows=0;this.lastIntervalChanged=null;this.fChanged=false;this.fCloseInterval=false;this.dt=UTCFromCTZNoon();this.rgixBugChanged=[];this.fixShadow=function(){ClockPopup.fixShadow()};this.fixHotkeys=function(){ClockPopup.fixHotkeys()};this.getEditor=function(){if(!this.editor){this.editor=new TimeIntervalEditor()}return this.editor};this.showAdder=function(A){if(!ClockPopup.isOpen()){return true}this.fChanged=true;this.getEditor().showAdder(A);return false};this.showEditor=function(A){if(!ClockPopup.isOpen()){return true}this.fChanged=true;this.getEditor().show(this.tiByIx(A));return false};this.submitEditor=function(){if(!ClockPopup.isOpen()){return true}this.getEditor().submit();return false};this.tiByIx=function(A){return this.rgday.map(function(B){return B.tiByIx(A)}).firstMatch(function(B){return null!=B})};this.display=function(){this.clearDisplay();var B=this.getContainer();this.showDt();this.rgday=this.rgday.sort(function(E,D){return(new UTCDate(E.dt))>(new UTCDate(D.dt))?1:-1});var C=[];for(var A=0;A<this.rgday.length;A++){C=C.concat(this.rgday[A].rgti)}B.innerHTML=pictureOf(TimesheetDisplay,C,true,true,this.dt);elById("timesheet_submit").style.display=this.fChanged?"inline":"none";elById("timesheet_cancel").value=this.fChanged?FB_CANCEL:FB_CLOSE;elById("idTimesheetNext").style.visibility=InternalsDateRaw(Timesheet.dt)==InternalsDateRaw(new UTCDate())?"hidden":"visible";C.foreach(function(D){D.flashChanged()})};this.showDt=function(){elById("idTimesheetDt").innerHTML=sDateWithDay(this.dt)};this.clearDisplay=function(){var A=this.getContainer();while(A.firstChild){A.removeChild(A.firstChild)}this.hideError()};this.clearData=function(){this.rgday=[];this.rgtiAdd=[];this.cNewRows=0};this.dropEdits=function(){this.clearData();this.fChanged=false;this.fCloseInterval=false;this.rgixBugChanged=[]};this.getNextRowNumber=function(){return -(++this.cNewRows)};this.getDay=function(A){var A=new UTCDate(A);return this.rgday.firstMatch(function(B){return A.toDateString()==B.dt.toDateString()})};this.addDay=function(B){var A=this.getDay(B);if(!A){A=new DayTimesheet(B);this.rgday.push(A)}return A};this.getContainer=function(){return elById("idTimesheetContainer")};this.getErrorPane=function(){return elById("idTimesheetError")};this.showError=function(A){var B=this.getErrorPane();if(B){B.innerHTML=A;B.style.display="block"}};this.hideError=function(){var A=this.getErrorPane();if(A){A.style.display="none"}};this.serialize=function(){return this.rgtiAdd.map(function(A){return A.serialize()})+"|"+this.rgday.map(function(A){return A.serialize()}).join("|")};this.requestDt=function(A){if(A>new UTCDate()||A==this.dt){return false}this.dt=new UTCDate(A);this.showDt();this.dropEdits();$.get(sDefaultURI+"?fAlaCarte=1&pg=pgAlaCarteLoadTimesheet&dt="+SerializeDate(CTZFromUTC(this.dt)),null,Timesheet.response);return true};this.changeDt=function(A){return Timesheet.confirmLeaveEdits(function(){Timesheet.requestDt(A)},FB_CONTINUE_LOSE_CHANGES)};this.shiftDate=function(B){var A=new UTCDate(this.dt);A.setDate(this.dt.getDate()+B);return this.changeDt(A)};this.nextDt=function(){if(!ClockPopup.isOpen()){return true}this.shiftDate(1);return false};this.prevDt=function(){if(!ClockPopup.isOpen()){return true}this.shiftDate(-1);return false};this.showCalendar=function(){cal.bPastOK=true;cal.bFutureOK=false;cal.fTextBar=false;cal.setDate(this.dt);cal.show("dtPreviousTimesheet","prevTimesheetButton");cal.focus(false);return true};this.check=function(){return this.requestAlter(false)};this.commit=function(){return this.requestAlter(true)};this.requestAlter=function(A){this.fChanged=true;Info.hide();$.post(sDefaultURI,{fAlaCarte:1,pre:"prePostTimesheet",sData:this.serialize(),fCommit:(A?"1":"0")},function(B){Timesheet.response(B,true,A)})};this.response=function(A,E,D){Timesheet.rgday=[];var B=$("TimeInterval",A);if(B){if(E){Timesheet.clearData()}if(D){if("undefined"!=typeof (requestUpdateElapsedTime)){requestUpdateElapsedTime(this.rgixBugChanged)}if($("fCommitFail",A).text()!="1"){if(Timesheet.fCloseInterval){setIxWorkingOnNothing()}else{refreshWorkingOn()}Timesheet.dropEdits()}}B.map(function(){var G=new TimeInterval;G.fromSJS($(this).text());var F=Timesheet.addDay(G.dtStart);F.addTI(G)});Timesheet.display()}var C=$("sError",A).text();if(C){Timesheet.showError(C)}Timesheet.fixShadow();Timesheet.fixHotkeys()};this.confirmNavigate=function(A){Timesheet.confirmLeaveEdits(function(){ClockPopup.hide();document.location.href=A;return false},FB_STILL_GO_TO_PAGE);return false};this.confirmLeaveEdits=function(B,E){if(!Timesheet.fChanged){B();return true}var D=elById("idTimesheetConfirmMsg");var C=elById("idTimesheetResolveMsg");var A=elById("idTimesheetConfirmOk");var F=elById("idTimesheetConfirmCancel");if(!(D&&C&&A&&F)){return true}D.innerHTML=FB_EDITS_WILL_BE_LOST;C.innerHTML=E;A.value=FB_YES;A.onclick=function(){B();EditableTableManager.hidePane("TimesheetTable");return false};F.value=FB_NO;EditableTableManager.showDeletePane("TimesheetTable",ClockPopup.getElPopup(),null,null,Timesheet.getContainer(),POPUP_POSITION_CENTER);return false};this.getUTCDateFromCTZsTime=function(A){return UTCFromCTZ(CombineDateTime(CTZFromUTC(this.dt),clo.CTZguessTime(A)))}};function TimeIntervalEditor(){}TimeIntervalEditor.prototype.show=function(A){var B=this;this.tiEdit=A;this.hideErrors();EditableTableManager.showEditPane("TimesheetTable",A.getEl(),this.createEditPane(A.idRow,A.dtStart,A.dtEnd,A.ixBug,FB_EDIT_INTERVAL),function(){B.showEndTime(A.Ends())},elById("timeclockPopup"),POPUP_POSITION_LEFT)};TimeIntervalEditor.prototype.showAdder=function(A){var B=this;this.tiEdit=null;this.hideErrors();EditableTableManager.showEditPane("TimesheetTable",A,this.createEditPane(A.id,new UTCDate(),new UTCDate(),"",FB_ADD_INTERVAL),function(){B.showEndTime(true)},elById("timeclockPopup"),POPUP_POSITION_LEFT)};TimeIntervalEditor.prototype.createEditPane=function(C,E,D,B,A){return[{sId:"dtStartTime",sTag:"input",value:CTZsTimeFromUTC(E)},{sId:"dtEndTime",sTag:"input",value:CTZsTimeFromUTC(D?D:new UTCDate())},{sId:"ixBugEdit",sTag:"input",style:"display:none",value:B},{sId:"sTimesheetEdit",sTag:"span",value:A}]};TimeIntervalEditor.prototype.showEndTime=function(A){elById("idTimesheetEditorEndTime").style.display=(A?"":"none");this.fixShadow()};TimeIntervalEditor.prototype.submit=function(){var B=this;this.hideErrors();var C=this.tiEdit;var F=false;if(!C){F=true;C=new TimeInterval()}var A=function(){if(clo.guessTime(elById("dtStartTime").value)>clo.guessTime(elById("dtEndTime").value)){B.showTimeErr(FB_END_TIME_BEFORE_START_TIME);return }C.fromPopup();if(F){Timesheet.rgtiAdd.push(C)}EditableTableManager.hidePane("TimesheetTable");Timesheet.check()};var E=function(){B.showEditErr(FB_INVALID_CASE)};var G=function(){EstimatePopup.show("editTimesheetTable",elById("ixBugEdit").value,A,function(H){elById("ixBugEdit").value=H;C.fromPopup();C.checkBug(elById("ixBugEdit").value,A,E,G,D)},function(){EditableTableManager.hidePane("TimesheetTable")},POPUP_POSITION_CENTER)};var D=function(){B.showEditErr(swap1(FB_NO_PERMISSION_ON_BUG,elById("ixBugEdit").value))};C.checkBug(elById("ixBugEdit").value,A,E,G,D)};TimeIntervalEditor.prototype.fixShadow=function(){EditableTableManager.fixShadow("TimesheetTable")};TimeIntervalEditor.prototype.showEditErr=function(C){var A=elById("ixBugEdit");var B=elById("ixBugEditError");$("#ixBugEdit, #idDropList_ixBugEdit_oText").addClass("error");if(A.value.length>0){B.innerHTML=Swap1(C,elById("ixBugEdit").value);B.style.display="block"}this.fixShadow()};TimeIntervalEditor.prototype.hideEditErr=function(){var A=elById("ixBugEdit");var B=elById("ixBugEditError");$("#ixBugEdit, #idDropList_ixBugEdit_oText").removeClass("error");B.innerHTML="";this.fixShadow()};TimeIntervalEditor.prototype.showTimeErr=function(B){elById("dtStartTime").className="error";elById("dtEndTime").className="error";var A=elById("dtEditError");A.innerHTML=Swap1(B,elById("ixBugEdit").value);A.style.display="block";this.fixShadow()};TimeIntervalEditor.prototype.hideTimeErr=function(){elById("dtEditError").style.display="none";elById("dtStartTime").className="";elById("dtEndTime").className="";this.fixShadow()};TimeIntervalEditor.prototype.hideErrors=function(){this.hideEditErr();this.hideTimeErr()};var ClockPopup=new function(){var A=false;this.isOpen=function(){return A};this.closeOK=function(){return !Timesheet.fChanged};this.getElPopup=function(){if(!elById("timeclockPopup")){var B=document.createElement("DIV");B.innerHTML=pictureOf(TimesheetPopup);document.body.appendChild(B);theMgr.addWithHandler("timeclockPopup",ClockPopup.theMgrHandler)}return(elById("timeclockPopup"))};this.show=function(C){A=true;var B=elById("Working_On");if(B){theMgr.showPopup(this.getElPopup().id,B,0,20);ShadowManager.applyRelativeShadow("shadowTimeclock",this.getElPopup());Timesheet.changeDt(C?C:new UTCDate())}return false};this.fixShadow=function(){ShadowManager.fixShadow("shadowTimeclock")};this.fixHotkeys=function(){KeyManager.registerElPopupKeys(this.getElPopup())};this.hide=function(){Timesheet.dropEdits();theMgr.hideAllPopups()};this.theMgrHandler=function(){if(!ClockPopup.closeOK()){BlinkManager.startBlink("CloseBlinker",elById("timeclockPopup"),"#666666",3,65,0.65);return false}A=false;Info.hide();Timesheet.clearDisplay();if(KeyManager.getElCursor()){KeyManager.getElCursor().style.display="none"}ShadowManager.hideShadow("shadowTimeclock");ShadowManager.hideShadow("idPop");return true}};var g_obts=null;function requestBugTimesheet(A){$.get(sDefaultURI+"?fAlaCarte=1&pg=pgAlaCarteBugTimesheet&ixBug="+A,null,responseBugTimesheet);return false}function responseBugTimesheet(A){var B=$("sHTML",A).text();if(B){if(!g_obts){g_obts=FancyPopupManager.create("bugTimesheetPopup");g_obts.setWidth(450)}g_obts.oDiv.innerHTML=B}g_obts.show("bugTimesheet",POPUP_POSITION_CENTER_SCREEN,true);autoScrollDiv(elById("idBugTimesheetOverflowDiv"),450)};
var FavoritesIcons=new function(){var C=-1;var B;var A={Bug:{},WikiPage:{},DiscussTopic:{}};var D=function(G,F){A[G][F]={rgIcons:[],fFavorite:undefined,fAjax:undefined,fRemoveLater:false,fUserSet:false}};var E=function(H,F){var G=A[H][F];if(G.fRemoveLater){G.fFavorite=false}if(G.fFavorite==undefined){return }$(G.rgIcons).css("display","").parent().attr("className",(G.fFavorite?"starFull":"starEmpty"))};this.setFavorite=function(H,F,G){if(A[H][F]&&A[H][F].fFavorite!=G){if(G){if(C>=0){if(A[H][F].fRemoveLater){A[H][F].fRemoveLater=false}else{FavoritesList.change("Add",C,H,F,0)}}}else{if(C>=0){if(FavoritesList.isPopupVisible()){A[H][F].fRemoveLater=true}else{FavoritesList.change("Remove",C,H,F,0)}}}A[H][F].fFavorite=G;E(H,F)}};this.setAllFavorites=function(I){var L=[];if(I&&I.split){L=I.split(",")}var F={};for(var G=0;G<L.length;G++){F[L[G]]=true}for(var M in A){for(var H in A[M]){var J=A[M][H];var K=J.fFavorite;if(((!K&&(M+H) in F)||(K&&!((M+H) in F)))&&!J.fUserSet){A[M][H].fFavorite=!K;E(M,H)}}}if(!B){B=elById("input_stars")}if(B&&B.value){B.value=I}};this.elIsRegistered=function(H,I,G){for(var F=0;F<A[I].length;F++){if(A[I][F]==H){return true}}return false};this.register=function(I,K,H,F,J){if(this.elIsRegistered(I,K,H)){return }if(A[K][H]==undefined){D(K,H);A[K][H].fAjax=true;if(J!=undefined){A[K][H].fFavorite=J}}if(!ourHasEvent(I,"mouseover")){function G(){if(I.fAttached){return }if(I.parentNode){ourAttachEvent(I.parentNode,"click",function(L){FavoritesIcons.toggle(K,H);cancel(L)})}if(window.SM){ourAttachEvent(I,"mouseout",function(){SM.blockClick(false)})}I.fAttached=true}if(I.id!=undefined){G();ourAttachEvent(I,"mouseover",function(){if(window.SM){SM.blockClick(true)}})}else{ourAttachEvent(I,"mouseover",function(){G();if(window.SM){SM.blockClick(true)}})}}A[K][H].rgIcons.push(I);if(F!=undefined){C=F}E(K,H)};this.registerAjax=function(G,H,F){if(A[H][F]==undefined){D(H,F)}if(!A[H][F].fAjax){A[H][F].fAjax=true;$.get(sDefaultURI+"?fAlaCarte=1&pg=pgAlaCarteIsFavorite&sType="+H+"&ixItem="+F,null,function(I){FavoritesIcons.registerAjaxCallback(I,G,H,F)})}else{this.register(G,H,F,undefined,undefined)}};this.registerAjaxCallback=function(F,I,K,H){var G=parseInt($("ixDocList",F).text());var J=($("fFavorite",F).text()==1);this.register(I,K,H,G,J);this.setFavorite(K,H,J)};this.toggle=function(G,F){if(A[G][F]){A[G][F].fUserSet=true;this.setFavorite(G,F,!A[G][F].fFavorite)}};this.getRemoveLaterItems=function(){var F=[];for(var I in A){for(var G in A[I]){if(A[I][G].fRemoveLater){var H={};H.sType=I;H.ixItem=Number(G);F.push(H)}}}return F};this.sendRemoveLaterItems=function(G,I){var K="";var L="";var H=this.getRemoveLaterItems();var M,J;for(var F=0;F<H.length;F++){M=H[F].sType;J=H[F].ixItem;L=L+M+",";K=K+J+",";A[M][J].fRemoveLater=false}if(K!=""){L=L.substr(0,L.length-1);K=K.substr(0,K.length-1);FavoritesList.change("BulkRemove",C,L,K,0,G,I)}}};var FavoritesList=new function(){var C;var S;var Q;var N;var T;var E;var O;var Y;var Z;var U;var J;var b;var W;var B;var I;var G;var F;var M;var L;var A;var a=4;var R=3;var P=3;var H=5;var D="#FBFBFB";var K="#EBF0F4";var V="#B1C9DD";var X="#B1C9DD";this.initGhostDiv=function(){I=document.createElement("div");I.style.display="none";I.style.position="absolute";I.style.opacity=0.5;I.style.filter="alpha(opacity=50)";I.style.textAlign="left";I.className="favoritesPopup";I.style.color="#fff";I.style.background="#FFFFFF";I.style.border="#9F9F9F 1px solid";I.style.zIndex=4;document.body.insertBefore(I,null)};this.showGhostDiv=function(e){M=xMouse-calculateOffset(e,"offsetLeft")-1;L=yMouse-calculateOffset(e,"offsetTop")-1;I.style.height=(e.offsetHeight-(a/2)+2)+"px";I.style.width=(e.offsetWidth-(a/2))+"px";var f='<table border=0 cellspacing=0 cellpadding=0 class="biglist" width="'+I.style.width+'">';var d='<tr id="ghostRow" class="'+e.className+'">';I.innerHTML=f+d+e.innerHTML+"</tr></table>";var c=elById("ghostRow");this.unhighlightRow(c)};this.keypress=function(h,d){if(13==getKeyCode(h)){var c;if(d&&d.id){c=elById(d.id+"_link")}this.delayedClick(c,h)}else{if("*"==String.fromCharCode(KeyboardMap.fix(getKeyCode(h),false)).toLowerCase()){var g=d.id.split("_");var f=g[g.length-1];var i=g[g.length-2];FavoritesIcons.toggle(i,f)}}};this.delayedClick=function(c,d){if(c&&FavoritesIcons.getRemoveLaterItems().length){if(d){cancel(d)}FavoritesIcons.sendRemoveLaterItems(function(){KeyManager.simulateClick(c)},"pg=pgAlaCarteErrorOnly");return false}return true};this.clearLastHighlight=function(){if(A){this.unhighlightRow(A)}};this.highlightRow=function(c){if(!c||!c.tagName||!(c.tagName.toLowerCase()=="tr")){return }if(null!=KeyManager.oPopupBrowser){KeyManager.oPopupBrowser.setElCurrent(c)}var d=elById(c.id+"_link");if(d){safeFocus(d)}if(trim(c.className)=="row"){paintRow(c,V)}else{paintRow(c,X)}if(!window.opera){removeTextSelections()}if(c!=A){this.unhighlightRow(A)}A=c};this.unhighlightRow=function(c){if(!c||!c.tagName||!(c.tagName.toLowerCase()=="tr")){return }if(trim(c.className)=="row"){paintRow(c,D)}else{paintRow(c,K)}if(c==A){A=undefined}};this.showToolbar=function(c){if(A!=c){this.clearLastHighlight();this.highlightRow(c)}c.style.cursor="move";if(!c.fEventsAttached){new ListBrowser(c,function(d){return null!=d.tagName&&("a"==d.tagName.toLowerCase()||"img"==d.tagName.toLowerCase())},null,null,null,function(d){d.setAttribute("onmousedown","return false");d.setAttribute("ondrag","return false");d.setAttribute("ondragstart","return false");d.setAttribute("ondragend","return false")},null);c.fEventsAttached=true}else{}$("#"+c.id+"_spacer").css("display","none");$("#"+c.id+"_updown").css("display","")};this.hideToolbar=function(c){this.unhighlightRow(c);$("#"+c.id+"_spacer").css("display","");$("#"+c.id+"_updown").css("display","none")};this.startDrag=function(d,f,i,g,h){this.sType=i;this.ixItem=g;this.ixDocList=f;this.nPosBegin=h;this.nPos=0;this.ptDragBegin=undefined;this.fDragBegin=false;if(I==undefined){this.initGhostDiv()}this.showGhostDiv(d);this.rgYDrag=[];elTable=d.parentNode;elTable=getParentNode(elTable,"table");if(!elTable||elTable.tagName.toLowerCase()!="table"){return }this.elList=elTable;var c=this.rgYDrag;var h=0;var e=0;new ListBrowser(this.elList,function(j){return null!=j.tagName&&"tr"==j.tagName.toLowerCase()},null,null,null,function(j){var k=getAbsolutePosition(j);h=j.getAttribute("pos");c.push({yPrev:e,y:k.y+j.offsetHeight/2,el:j,nPos:h});e=k.y+j.offsetHeight/2},null);this.nPosMax=++h;c.push({yPrev:e,y:Number.POSITIVE_INFINITY,el:null,nPos:this.nPosMax});this.fDragging=true;document.body.style.cursor="move";this.notifyMovement();return false};this.stopDrag=function(){if(!this.fDragging){return false}document.body.style.cursor="auto";I.style.display="none";removeTextSelections();this.ptDragBegin=undefined;if(this.fDragBegin&&this.nPos!=this.nPosBegin&&this.nPos!=this.nPosBegin+1){this.showLoadingDiv();this.fDragging=false;this.change("Move",this.ixDocList,this.sType,this.ixItem,this.nPos)}else{this.fDragging=false;this.unmask();if(this.elArrow){this.elArrow.style.visibility="hidden"}}return false};this.placeArrow=function(c,d){if(!this.elArrow){this.elArrow=DOM.img({src:StaticContentUrl("images/rightArrow.gif"),style:"position:absolute;"});document.body.appendChild(this.elArrow)}this.elArrow.style.visibility="visible";this.elArrow.style.top=d+"px";this.elArrow.style.left=c-(this.elArrow.offsetWidth)+"px"};this.notifyMovement=function(){if(!this.fDragging){return }if(this.ptDragBegin==undefined){this.ptDragBegin={};this.ptDragBegin.x=xMouse;this.ptDragBegin.y=yMouse}if(!this.fDragBegin&&(Math.abs(yMouse-this.ptDragBegin.y)>H||Math.abs(xMouse-this.ptDragBegin.x)>H)){this.fDragBegin=true;this.mask()}removeTextSelections();document.body.style.cursor="move";if(this.fDragBegin){I.style.display="";I.style.top=(yMouse-L)+"px";I.style.left=(xMouse-M)+"px";this.elCurrDragPrev=this.elCurrDrag;this.elCurrDrag=null;this.nPos=this.nPosMax;var c=this.rgYDrag.firstMatch(function(f){return f.yPrev<yMouse&&f.y>=yMouse});if(c){this.elCurrDrag=c.el;this.nPos=c.nPos}if(this.elCurrDrag!=this.elCurrDragPrev){if(null!=this.elCurrDrag){var e=getAbsolutePosition(this.elCurrDrag);var d=getAbsolutePosition(this.elList);this.placeArrow(d.x-P,e.y-R)}else{var d=getAbsolutePosition(this.elList);this.placeArrow(d.x-P,d.y+this.elList.offsetHeight-R)}}}};this.sizeLoadingDiv=function(){var c=elById("favoritesPopup");var d=getAbsolutePosition(c);this.elLoadingDiv.style.top=d.y+"px";this.elLoadingDiv.style.left=d.x+"px";this.elLoadingDiv.style.height=c.offsetHeight+"px";this.elLoadingDiv.style.width=c.offsetWidth+"px"};this.showLoadingDiv=function(){if(!this.elLoadingDiv){this.elLoadingDiv=DOM.div({style:"background:silver;position:absolute;opacity:0.4;filter:alpha(opacity=40);z-index:4;display:none;"});document.body.appendChild(this.elLoadingDiv)}FadeManager.startFadeIn("favoritesPopup",this.elLoadingDiv,function(){FavoritesList.sizeLoadingDiv()},false)};this.hideLoadingDiv=function(){if(elById("favoritesPopup")&&this.elLoadingDiv){FadeManager.startFadeOut("favoritesPopup",this.elLoadingDiv,null,false)}};this.hideLoadingDivNow=function(){if(elById("favoritesPopup")&&this.elLoadingDiv){this.elLoadingDiv.style.display="none"}};this.mask=function(){theMgr.showSmallMask("favoritesPopup")};this.unmask=function(){theMgr.unmaskClicks("favoritesPopup")};this.onPopupShow=function(){KeyManager.oPopupBrowser=new ListBrowser(elById("favoritesPopup"),function(c){return null!=c.tagName&&(("a"==c.tagName.toLowerCase()&&"favoritesheadline"==c.className.toLowerCase())||"tr"==c.tagName.toLowerCase())},function(c){if("tr"==c.tagName.toLowerCase()){safeFocus(elById(c.id+"_link"))}else{safeFocus(c)}FavoritesList.highlightRow(c)},function(c){if(c&&c.blur){c.blur()}FavoritesList.unhighlightRow(c)},null,function(d){if("a"==d.tagName.toLowerCase()){d.onfocus=function(){null!=KeyManager.oPopupBrowser&&KeyManager.oPopupBrowser.setElCurrent(this);FavoritesList.clearLastHighlight()};d.onmouseover=function(){if(!window.opera){safeFocus(this)}};d.onmouseout=function(){if(!window.opera){this.blur()}}}else{var c=elById(d.id+"_link");if(c){ourAttachEvent(c,"keypress",function(f){FavoritesList.keypress(f,d)})}}},null);return false};this.onPopupHide=function(){document.body.style.cursor="auto";if(I&&I.style){I.style.display="none"}this.ptDragBegin=undefined;this.fDragging=false;this.unmask();if(this.elArrow){this.elArrow.style.visibility="hidden"}this.hideLoadingDivNow();if(A){this.unhighlightRow(A)}FavoritesIcons.sendRemoveLaterItems();return true};this.isPopupVisible=function(){return isVisible(elById("favoritesPopup"))};this.change=function(l,h,c,e,d,f,k){if(ajaxIsBusy(this.oAjaxRequest)){setTimeout(function(){FavoritesList.change(l,h,c,e,d)},500)}else{var j=false;if(elById("pgFavorites")){j=true}if(!f){f=function(m){FavoritesList.resultDocListChange(m)}}var g={fAlaCarte:1,pre:"preDocList"+l,ixDocList:h,sType:c,ixItem:e,nPos:d};if(k){g.pg=k}else{g.pg="pgFavoritesPopup";g.fPgFavorites=IntFromBool(j);var i=FavoritesIcons.getRemoveLaterItems();if(i.length>0){g.sTypesRemoveLater=$.map(i,function(m){return m.sType}).join(",");g.sItemsRemoveLater=$.map(i,function(m){return m.ixItem}).join(",")}}this.oAjaxRequest=$.get(sDefaultURI,g,f);if(j&&!this.isPopupVisible()){if(l=="Move"||l=="MoveUp"||l=="MoveDown"){Info.show(FB_MOVING)}else{Info.show(FB_UPDATING)}}}return false};this.resultDocListChange=function(c){var e=$("sError",c).text();if(e){alert(e);return }setFavoritesContent($("sHTML_favoritesPopup",c).text(),$("sAllFavorites",c).text(),$("sHTML_pgFavorites",c).text(),true);$("#idWorkOnFavorites").html($("sHTML_workingOnFavorites",c).text());Info.hide();this.unmask();this.hideLoadingDiv();if(this.isPopupVisible()&&KeyManager&&KeyManager.oPopupBrowser){var f=KeyManager.oPopupBrowser.elCurrent;this.onPopupShow();if(f&&f.id){this.highlightRow(elById(f.id));var d=elById(f.id+"_link");if(d){safeFocus(d)}}}if(this.elArrow){this.elArrow.style.visibility="hidden"}ShadowManager.fixShadow("favoritesPopup")}};
var EstimatePopup=new function(){this.oPopup=null;this.show=function(idAnchorEl,ixBug,fxEstInit,fxSIInit,fxCancelInit,nPos){this.fxEst=fxEstInit;this.fxSI=fxSIInit;this.fxCancel=fxCancelInit;if(!this.oPopup){var oPopup=elById("idEnterEstimateDiv");if(oPopup){this.oPopup=FancyPopupManager.create("enterEstimatePopup");oPopup.parentNode.removeChild(oPopup);this.oPopup.oDiv.appendChild(oPopup);oPopup.style.display=""}}var elt=elById("idEnterEstimateTitle");if(elt){elt.innerHTML=swap1(FB_NO_ESTIMATE_ENTERED,ixBug)}elt=elById("idIxBug");if(elt){elt.value=ixBug}this.reset();this.oPopup.show(idAnchorEl,null==nPos?POPUP_POSITION_LEFT:nPos,false);giveTextBoxFocus("idEnterEstimateInput")};this.hide=function(){this.oPopup.hide()};this.changeEstimateCallback=function(jXML){var sError=$("sError",jXML).eq(0).text();if(sError&&sError!=""){var elt=elById("idEnterEstimateError");if(elt){show(elt)}giveTextBoxFocus("idEnterEstimateInput");EstimatePopup.oPopup.fixShadow();return }var BugFieldsJS=$("BugFieldsJS",jXML).text();if(BugFieldsJS){var oBug=eval("("+BugFieldsJS+")");if(window.updateGridEstimate){updateGridEstimate(oBug,parseLocaleFloat($("hrsCurrentChange",jXML).text()),parseLocaleFloat($("hrsRemainingChange",jXML).text()))}if(window.updateViewEstimate){updateViewEstimate(oBug)}if(EstimatePopup.fxEst&&oBug.ixBug){EstimatePopup.fxEst(oBug.ixBug)}}EstimatePopup.hide()};this.submit=function(){var elt=elById("idEnterEstimateError");if(elt){hide(elt)}this.oPopup.fixShadow();var ixBug;elt=elById("idIxBug");if(elt){ixBug=IntPrefix(elt.value)}if(!ixBug){return }var elt=elById("idEnterEstimate");if(elt&&elt.checked){fEstimate=true}else{elt=elById("idSelectScheduleItem");if(!elt||!elt.checked){return }fEstimate=false}if(fEstimate){var sHrsEst;elt=elById("idEnterEstimateInput");if(elt){sHrsEst=elt.value}if(sHrsEst){changeEstimate(ixBug,sHrsEst,EstimatePopup.changeEstimateCallback)}}else{var ixScheduleItem;elt=elById("idScheduleItemInput");if(elt){ixScheduleItem=Number(elt.value)}if(ixScheduleItem){if(this.fxSI){this.fxSI(ixScheduleItem)}this.hide()}}};this.cancel=function(){this.hide();if(this.fxCancel){this.fxCancel()}this.reset()};this.reset=function(){var elt=elById("idEnterEstimateInput");if(elt&&elt.value){elt.value=""}elt=elById("idScheduleItemInput");if(elt&&elt.selectedIndex){elt.selectedIndex=0}elt=elById("idEnterEstimate");if(elt){elt.checked=true}var elt=elById("idEnterEstimateError");if(elt){hide(elt)}this.oPopup.fixShadow()}};function changeEstimate(C,B,A){if(!C||C==0){return }$.get(sDefaultURI+"?fAlaCarte=1&pre=preEditEstimate&pg=pgEstimate&ixBug="+C+"&hrsEst="+B,null,A)}var AfterHoursPopup=new function(){this.oPopup=null;this.show=function(C,B,D){if(!this.oPopup){var E=elById("idAfterHoursDiv");if(E){this.oPopup=FancyPopupManager.create("AfterHoursPopup");E.parentNode.removeChild(E);this.oPopup.oDiv.appendChild(E);E.style.display=""}}var A=elById("idAfterHoursTitle");if(A){A.innerHTML=FB_AFTERHOURS}this.oPopup.show(C,null==D?POPUP_POSITION_LEFT:D,false);this.ixBug=B};this.hide=function(){this.oPopup.hide()};this.cancel=function(){this.hide()};this.submit=function(){$.get(sDefaultURI+"?fAlaCarte=1&pre=preChangeWorkOnAlaCarte&pg=pgEstimate&ixBug="+this.ixBug+"&fOpenNew=1",null,null);this.hide()}};
function initTagSearchUI(B){var E=elById("dlgGrid");var J=elById("sTagName");if(!E||!J){return }var F="";var G=function(){return"pg=pgAlaCarteTagReport&fRefine=1&sTagName="+encodeURIComponent(trim(J.value))+(B?"&fIgnoreMax=1":"")+F};var H=new DynamicUpdate(E,G);ourAttachEvent(J,"keyup",function(){B=false;H.queueUpdate()});var A=function(L){if(stopFormSubmission(L)){return cancel(L)}};ourAttachEvent(J,"keypress",A);var K=["nameAsc","nameDesc","popAsc","popDesc"];for(var D=0;D<K.length;D++){function I(L){return function(M){F="&sOrderBy="+L;H.queueUpdate();return cancel(M)}}var C="#tagSorter"+K[D];$(C).live("click",I(K[D]));$(C+"Arrow").live("click",I(K[D]))}};
var api={};if("DropListControl" in window){api.DropListControl={};api.DropListControl.refreshLast=function(){DropListControl.refreshLast()};api.DropListControl.refresh=function(A){DropListControl.refresh(A)};api.DropListControl.refreshWithin=function(A){DropListControl.refreshWithin(A)}}if("EditableTableManager" in window){api.EditableTableControl={};api.EditableTableControl.getTable=function(A){var B=EditableTableManager.getTable(A);return(B?new api.CEditableTable(A,B):null)};api.CEditableTable=function(A,B){this.sTableId=A;this._t=B};api.CEditableTable.prototype.reloadTableAjax=function(C){if(typeof (C)=="string"){var B=C.indexOf("?");if(B<C.indexOf("=")&&B<C.indexOf("&")){C=C.substr(B+1)}}var A=this;$.post(sDefaultURI,C,function(D){A._t.result(D)})};api.CEditableTable.prototype.reloadTableFromXml=function(A){this._t.result(A)};api.CEditableTable.prototype.showDialog=function(C,A,B){this._t.showDialog(C,A,B)};api.CEditableTable.prototype.showDialogFromTemplate=function(C,A,B){this._t.showDialogFromTemplate(C,A,B)};api.CEditableTable.prototype.hideDialog=function(){this._t.hidePane()};api.CEditableTable.prototype.refreshDialog=function(){this._t.doSetShadow()};api.CEditableTable.prototype.submitDialog=function(){this._t.submitDialog()};api.CEditableTable.prototype.getTemplate=function(A){if(this._t.dictDialogs[A]){return this._t.dictDialogs[A].template}else{return null}};api.CEditableTable.prototype.getTemplateData=function(A,B){if(this._t.dictDialogs[A]&&this._t.dictDialogs[A].data[B]){return this._t.dictDialogs[A].data[B]}else{return null}}}if("FancyPopupManager" in window){api.PopupManager={idEdit:0};api.PopupManager.newPopup=function(A){return new api.Popup(A)};api.PopupManager.POPUP_POSITION_CENTER=POPUP_POSITION_CENTER;api.PopupManager.POPUP_POSITION_RIGHT=POPUP_POSITION_RIGHT;api.PopupManager.POPUP_POSITION_BELOW=POPUP_POSITION_BELOW;api.PopupManager.POPUP_POSITION_UPPER_CENTER=POPUP_POSITION_UPPER_CENTER;api.PopupManager.POPUP_POSITION_LEFT=POPUP_POSITION_LEFT;api.PopupManager.POPUP_POSITION_CENTER_SCREEN=POPUP_POSITION_CENTER_SCREEN;api.Popup=function(sName){this.sBoxName=sName;this.fReady=false;this.pxLoadingWidth=30;this.pxLoadingHeight=15;this.position=api.PopupManager.POPUP_POSITION_BELOW;var oSelf=this;oSelf.jsInit=function(sJS){eval(sJS);if(oSelf.oPopup.isVisible()){oSelf.showPopup(oSelf.elDisplayed)}}};api.Popup.prototype.setHtml=function(A){if(!this.oPopup){this.oPopup=FancyPopupManager.create("idPlugin"+this.sBoxName+"Popup")}if(A){$(this.oPopup.oDiv).html(A);this.fReady=true}else{$(this.oPopup.oDiv).empty();this.oPopup.oDiv.appendChild(DOM.div({style:"width:"+this.pxLoadingWidth+"px;height:"+this.pxLoadingHeight+"px"},FB_LOADING));this.fReady=false}this.oPopup.autosizePane(true)};api.Popup.prototype.showPopup=function(A){if(!this.oPopup){return }var C=this.position;var B;if(!A){C=POPUP_POSITION_CENTER_SCREEN}else{if(!A.id){A.id="__idPluginPopupEdit"+(++api.PopupManager.idEdit)}B=A.id}this.elDisplayed=A;this.oPopup.autosizePane(true);this.oPopup.show(B,C);this.oPopup.autosizePane(true)};api.Popup.prototype.fixShadow=function(){this.oPopup.fixShadow()};api.Popup.prototype.hide=function(){this.oPopup.hide()}}api.util={};api.util.fillTemplate=function(A,B){return FormatStringFromDict(A,B)};