 function registerNamespaces(){for(var i=0;i<arguments.length;i++){var astrParts=arguments[i].split(".");var root=window;for(var j=0;j<astrParts.length;j++){if(!root[astrParts[j]]){root[astrParts[j]]=new Object()}root=root[astrParts[j]]}}}registerNamespaces("Plaxo.Util");Plaxo.Util.Timer={timers:{},startTimer:function(id){if(!this.enabled)return;this.timers.id=new Date().getTime()},getElapsedTime:function(id){if(!this.enabled)return;var start=this.timers.id;if(!start){alert('Unknown timer: '+id)}return new Date().getTime()-start},alertElapsedTime:function(id){if(!this.enabled)return;alert('Elapsed time for "'+id+'": '+this.getElapsedTime(id))},enabled:true,setTimersEnabled:function(state){this.enabled=state}};Plaxo.Util.Looper={doLoop:function(list,func,doneFunc,loopSize,start){if(!loopSize)loopSize=500;if(!start)start=0;var max=start+loopSize;var lastLoop=false;if(max>list.length){max=list.length;lastLoop=true}for(var i=start;i<max;i++){func(list,i)}if(lastLoop){if(doneFunc)doneFunc()}else{setTimeout(function(){Plaxo.Util.Looper.doLoop(list,func,doneFunc,loopSize,max)},0)}}};registerNamespaces("Plaxo.Form");Plaxo.Form={getSelectValue:function(sel){if(!sel)return null;if(!sel.options)return sel.value;return sel.options[sel.selectedIndex].value},focusFirstVisibleFormElem:function(f,findFirstBlankField){for(var i=0;i<f.length;i++){var el=f.elements[i];if(el.type!='hidden'&&el.style.display!='none'&&(!findFirstBlankField||el.value.length==0)&&el.focus){el.focus();break}}}};registerNamespaces("Plaxo.String");Plaxo.String={contains:function(whole,part){return whole.indexOf(part)!=-1},alnumChars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_",isalnum:function(ch){return this.contains(this.alnumChars,ch)},otherSafeEmailChars:".-+=",findBoundary:function(s,start,forward){if(forward){for(var i=start;i<s.length;i++){var ch=s.charAt(i);if(!Plaxo.String.isalnum(ch)&&!this.contains(this.otherSafeEmailChars,ch)){return i-1}}return s.length-1}else{for(var i=start-1;i>=0;i--){var ch=s.charAt(i);if(!Plaxo.String.isalnum(ch)&&!this.contains(this.otherSafeEmailChars,ch)){return i+1}}return 0}},removeDups:function(strs,ignoreCase){var uniqueStrs=[];var oldStrs={};for(var i=0;i<strs.length;i++){var s=strs[i];if(ignoreCase)s=s.toLowerCase();if(!oldStrs[s]){uniqueStrs.push(strs[i]);oldStrs[s]=1}}return uniqueStrs}};registerNamespaces("Plaxo.Debug");Plaxo.Debug={logLevel:0,assert:function(expr,msg){if(!expr){if(!msg)msg='unk';throw new Error('Assertion failed: '+msg)}},error:function(msg){if(this.logLevel<1)return;alert(msg);msg=this.format(msg,1);if(this.dumpEnabled)dump(msg)},warning:function(msg){if(this.logLevel<2)return;msg=this.format(msg,2);if(this.dumpEnabled)dump(msg);else alert(msg)},trace:function(msg){if(this.logLevel<3)return;msg=this.format(msg,3);if(this.dumpEnabled)dump(msg);else window.status=msg},format:function(msg,level){var d=new Date();return level+'|'+d.toLocaleTimeString()+'.'+d.getMilliseconds()+'|'+msg+'\n'},dumpEnabled:false,initialize:function(){var PREFS_CID="@mozilla.org/preferences;1";var PREFS_I_PREF="nsIPref";var PREF_STRING="browser.dom.window.dump.enabled";try{var Pref=new Components.Constructor(PREFS_CID,PREFS_I_PREF);var pref=new Pref();pref.SetBoolPref(PREF_STRING,true);this.dumpEnabled=true}catch(e){if(typeof(dump)!='undefined'){this.dumpEnabled=true}}}};Plaxo.Debug.initialize();function Array_push(){var A_p=0;for(A_p=0;A_p<arguments.length;A_p++){this[this.length]=arguments[A_p]}return this.length};function Array_pop(){var response=this[this.length-1];this.length--;return response};function Array_unshift(){this.reverse();for(var i=arguments.length-1;i>=0;i--)this[this.length]=arguments[i];this.reverse();return this.length}if(typeof(Array.prototype.unshift)=="undefined"){Array.prototype.unshift=Array_unshift}if(typeof(Array.prototype.pop)=="undefined"){Array.prototype.pop=Array_pop}if(typeof Array.prototype.push=="undefined"){Array.prototype.push=Array_push};function isWhitespace(c){return c==' '||c=='\t'||c=='\r'||c=='\n'};function String_trim(trimset){if(this.length==0)return this;if(!trimset)trimset=" \t\r\n";var start=0;while(start<this.length&&trimset.indexOf(this.charAt(start))!=-1)start++;var end=this.length-1;while(end>start&&trimset.indexOf(this.charAt(end))!=-1)end--;if(start>0||end<this.length-1){return this.substring(start,end+1)}else return this}if(typeof String.prototype.trim=="undefined"){String.prototype.trim=String_trim};function String_endsWith(s){if(!s)return true;if(s.length>this.length)return false;var start=this.length-s.length;for(var i=0;i<s.length;i++){if(s.charAt(i)!=this.charAt(start+i)){return false}}return true}if(typeof String.prototype.endsWith=="undefined"){String.prototype.endsWith=String_endsWith}