/*
______________________________________________
Built Wed Jun 10 2009 15:57:53 GMT-0400 (EDT)
Terms of use below.
______________________________________________
com.philadelphiamedicine.*

Philadelphia International Medicine Translator 0.1.0.14-957
Copyright © 2005-2009 Alex Maher, All Rights Reserved.
Translations by Google™ and subject to Google™ terms and conditions.
______________________________________________
com.myjsx.*

JSX 0.3.6.1607-897
JSX Compiler 0.3.6.1260r
Copyright © 2005-2009 Alex Maher, All Rights Reserved.
Contact: alex.maher@appliqa.com

*/
var jsx=jsx||new function JSX(){function appendChildDebug(oEl,oChild,oInsertBefore){if(typeof oEl=="undefined"){throw new Error("appendChildDebug | oEl = "+oEl+" (child: "+(oChild.id||oChild.tagName)+")");}if(typeof oChild.id=="undefined"&&typeof oChild.tagName=="undefined"&&typeof oChild.nodeValue=="undefined"){throw new Error("appendChildDebug | oChild = "+oChild);}if(!oEl.parentNode){throw new Error("appendChildDebug | parent "+(oEl.id||oEl.tagName)+" is not attached to the primary tree (child: "+(oChild.id||oChild.tagName)+")");}if(oInsertBefore){oEl.insertBefore(oChild,oInsertBefore);}else{oEl.appendChild(oChild);}}var jsx=this;this.dInitStart=typeof oJsxInit!="undefined"?dStartTime:new Date;this.get_instance=function(){return "JSX";};this.instanceOf=function instanceOf(oThis,sInstance){if(oThis==null){return null;}if(sInstance){var sILC=sInstance.toLowerCase(),sTLC=this.instanceOf(oThis).toLowerCase();if(sILC==sTLC||sILC==jsx.parseLast(sTLC,".")){return true;}else{if(sILC=="error"){return jsx.typeOf(oThis,"error");}else{if(oThis.get_super){bSuppressRoot=true;return this.instanceOf(oThis.get_super(),sInstance);}else{return false;}}}}else{if(oThis.get_instance){return oThis.get_instance();}else{return this.typeOf(oThis);}}};this.typeOf=function typeOf(oThis,sType,sLogPrefix){if(oThis==null){return null;}var sThisType;if(oThis instanceof RegExp){sThisType="regexp";}else{if(oThis.valueOf&&typeof oThis.valueOf()=="object"){if(oThis instanceof Array){sThisType="array";}else{if(oThis instanceof Error){var sDefault="error";if(sType&&sType.toLowerCase()=="error"){sThisType=sDefault;}else{if(oThis instanceof EvalError){sThisType="evalerror";}else{if(oThis instanceof RangeError){sThisType="rangeerror";}else{if(oThis instanceof ReferenceError){sThisType="referenceerror";}else{if(oThis instanceof SyntaxError){sThisType="syntaxerror";}else{if(oThis instanceof TypeError){sThisType="typeerror";}else{if(oThis instanceof URIError){sThisType="urierror";}else{sThisType=sDefault;}}}}}}}}else{if(oThis.toString()=="[object Math]"){sThisType="math";}else{sThisType="object";}}}}else{if(oThis instanceof Date){sThisType="date";}else{sThisType=(oThis.valueOf?typeof oThis.valueOf():typeof oThis);}}}if(sType){return sThisType.toLowerCase()==sType.toLowerCase();}else{return sThisType;}};function StringReg(r){this.sBody=r.toString().replace(/^\/([\S\s]*?)\/g?i?m?$/,"$1");this.sParms=r.toString().replace(/^[\S\s]*?\/(g?i?m?)$/,"$1");this.getRegExp=function(){return r;};}this.contains=function contains(oThis,oVal,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "object":return this.indexOf(oThis,oVal,sThisType)!=null;case "array":case "string":return this.indexOf(oThis,oVal,sThisType)>-1;case "boolean":case "number":return oThis==oVal;default:this.logError(null,"contains: no support for type: "+sThisType);}};this.endsWith=function endsWith(oThis,oVal,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":var sValType=this.typeOf(oVal);switch(sValType){case "string":return oThis.slice(oThis.length-oVal.length)==oVal;case "regexp":var oStringReg=new StringReg(r);if(!this.endsWith(oStringReg.sBody,"$")){oStringReg.sBody+="$";}return oThis.search(oStringReg.getRegExp())>-1;default:this.logError(null,"endsWith: strings may search on another string or regexp, "+sValType+" invalid");}break;case "array":return oThis[oThis.length-1]==oVal;default:this.logError(null,"endsWith: no support for type: "+sThisType);}};this.endsWithAny=function endsWithAny(oThis,aVal,sPrefix,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":for(var i=0;i<aVal.length;i++){if(this.endsWith(oThis,(sPrefix?sPrefix:"")+aVal[i],sThisType)){return true;}}return false;default:this.logError(null,"endsWithAny: no support for type: "+sThisType);}};this.indexAfter=function indexAfter(oThis,oVal,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":var nIndex=this.indexOf(oThis,oVal,sThisType);return nIndex+(nIndex>-1?oVal.length:0);case "array":var nIndex=this.indexOf(oThis,oVal,sThisType);return nIndex+(nIndex>-1?1:0);default:this.logError(null,"indexAfter: no support for type: "+sThisType);}};this.indexOf=function indexOf(oThis,oVal,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":var sValType=this.typeOf(oVal);switch(sValType){case "string":return oThis.indexOf(oVal);case "regexp":return oThis.search(oVal);default:this.logError(null,"endsWith: strings may search on another string or regexp, "+sValType+" invalid");}break;case "array":for(var i=0;i<oThis.length;i++){if(oThis[i]==oVal){return i;}}return-1;case "object":for(var i in oThis){if(oThis[i]==oVal){return i;}}return null;default:this.logError(null,"indexOf: no support for type: "+sThisType);}};this.indexOfIgnoreCase=function indexOfIgnoreCase(oThis,sVal,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":return oThis.toLowerCase().indexOf(sVal.toLowerCase());case "array":if(typeof sVal=="string"){for(var i=0;i<oThis.length;i++){if(typeof oThis[i]=="string"&&oThis[i].toLowerCase()==sVal.toLowerCase()){return i;}}}return-1;default:this.logError(null,"indexOf: no support for type: "+sThisType);}};this.isEmpty=function isEmpty(oObject,sThisType){sThisType=sThisType||jsx.typeOf(oObject);switch(sThisType){case "array":case "string":return oObject.length==0;case "function":try{return Parser.indexMethod(oObject).length==0;}catch(e){this.logError(null,"isEmpty: no support for type: "+sThisType);break;}case "number":return oObject==0;case "object":for(var sIndex in oObject){return false;}return true;case "regexp":return oObject.valueOf().search(/^\/(?:\(\?\:\))?\/$/)>-1;default:return false;}};this.parseFirst=function parseFirst(oThis,sDelim){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":return oThis.split(sDelim?sDelim:"/").shift();case "array":return oThis[0];default:this.logError(null,"parseFirst: no support for type: "+sThisType);}};this.parseLast=function parseLast(oThis,sDelim){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":return oThis.split(sDelim?sDelim:"/").pop();case "array":return oThis[oThis.length];default:this.logError(null,"parseLast: no support for type: "+sThisType);}};this.replaceAll=function replaceAll(oThis,sOld,sNew,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":return oThis.split(sOld).join(sNew);default:this.logError(null,"replaceAll: no support for type: "+sThisType);}};this.startsWith=function startsWith(oThis,oVal,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":return oThis.indexOf(oVal)==0;case "array":return oThis[0]==oVal;default:this.logError(null,"startsWith: no support for type: "+sThisType);}};this.startsWithAny=function startsWithAny(oThis,oVal,sThisType){var sThisType=sThisType||this.typeOf(oThis);switch(sThisType){case "string":for(var i in oVal){if(this.startsWith(oThis,oVal[i],sThisType)){return true;}}return false;default:this.logError(null,"startsWithAny: no support for type: "+sThisType);}};var config=new function(){function formatDirPath(sPath,bAllowDots){var s=/\/$/.test(sPath)||!sPath?sPath:sPath+"/";s=s.replace(/\\/g,"/");return bAllowDots?s:s.replace(/\./g,"/");}this.ie=document.all?true:false;try{this.bIsChild=parent.jsx?true:false;}catch(e){this.bIsChild=false;}this.bIsCompiled=typeof oJsxInit=="undefined"?true:false;var oOvr={};if(typeof jsxConfig!="undefined"){oOvr=jsxConfig;}else{if(typeof parent.jsxConfig!="undefined"){oOvr=parent.jsxConfig;}}var sRoot=formatDirPath(typeof oOvr.sRoot!="undefined"?oOvr.sRoot:"",true);this.aSrcPath=(function(){a=[sRoot+formatDirPath(typeof oOvr.sSrcDir!="undefined"?oOvr.sSrcDir:"src/main/jsx/")];if(oOvr.aSrcDirs){for(var i in oOvr.aSrcDirs){a.push(formatDirPath(oOvr.aSrcDirs[i]));}}return a;})();this.sBinPath=sRoot+formatDirPath(typeof oOvr.sBinDir!="undefined"?oOvr.sBinDir:"browser/");this.sImgPath=sRoot+formatDirPath(typeof oOvr.sImgPath!="undefined"?oOvr.sImgPath:"img/");this.sIE6ImgPath=sRoot+"ie6/"+formatDirPath(typeof oOvr.sIE6ImgPath!="undefined"?oOvr.sIE6ImgPath:"");this.bStrictRhinoMode=oOvr.bStrictRhinoMode!=null?oOvr.bStrictRhinoMode:false;this.bStrictRebuilds=oOvr.bStrictRebuilds!=null?oOvr.bStrictRebuilds:false;this.nOutputMode=(function(){var n=oOvr.nOutputMode||0;if(/[0-4]/.test(n)==false){jsx.logError("config.nOutputMode (expected number:0,1,2,3,4) invalid value: "+n);Compiler.voidBuild("jsx");return;}return n;})();this.aWatchClasses=oOvr.aWatchClasses||[];this.bLog=oOvr.bLog||false;this.sLogPosition=typeof oOvr.sLogPosition!="undefined"?oOvr.sLogPosition:"absolute";this.nLogRecursionThreshold=oOvr.nLogRecursionThreshold||10000;this.bInfo=oOvr.bInfo!=null?oOvr.bInfo:true;this.bErrors=oOvr.bErrors!=null?oOvr.bErrors:true;this.bWarnings=oOvr.bWarnings!=null?oOvr.bWarnings:true;this.bCompileDebug=oOvr.bCompileDebug!=null?oOvr.bCompileDebug:false;this.bDebug=oOvr.bDebug!=null?oOvr.bDebug:true;this.bCatchJsErrors=oOvr.bCatchJsErrors!=null?oOvr.bCatchJsErrors:true;this.bIESupport=oOvr.bSupportIE!=null?oOvr.bSupportIE:true;this.docs=oOvr.docs!=null?oOvr.docs:false;this.bTypeWarnings=oOvr.bTypeWarnings!=null?oOvr.bTypeWarnings:true;this.bRhino=typeof bRhino!="undefined";this.sOutputFilePath=sRoot+(typeof sOutputFilePath!="undefined"?sOutputFilePath.replace(/\\/g,"/"):"output.js");this.sOutputCachePath=sRoot+formatDirPath(oOvr.sOutputCachePath!=null?oOvr.sOutputCachePath.replace(/\\/g,"/"):"cache/");this.oSysOut=this.bRhino?oSysOut:null;var sDefaultBorder="1px darkgray inset";function getDefaultAttr(){var oStyle={width:"100%",height:"300px",border:sDefaultBorder};for(var i=0;i<arguments.length;i++){for(var sIndex in arguments[i]){oStyle[sIndex]=arguments[i][sIndex];}}return oStyle;}this.oDefaultFont={fontFamily:"Courier New, courier",fontSize:"12px",color:"#CCCCCC"};this.oLogStyle=getDefaultAttr({backgroundColor:"black",border:"0px none"},this.oDefaultFont,oOvr.oLogStyle,{height:(parseInt(oOvr.oLogStyle&&oOvr.oLogStyle.height?oOvr.oLogStyle.height:getDefaultAttr().height)-parseInt(this.oDefaultFont.fontSize)*2)+"px",overflow:"auto"});this.oConsoleStyle=getDefaultAttr(this.oLogStyle,{color:"cornflowerblue",height:null,borderBottom:this.oLogStyle.border,borderTop:this.bIsChild?"0px":this.oLogStyle.border,borderRight:this.bIsChild?"0px":this.oLogStyle.border,borderLeft:this.bIsChild?"0px":this.oLogStyle.border});this.oOutputTextAreaStyle=getDefaultAttr(this.oDefaultFont,{fontSize:"8pt",color:"black"});this.oPreviewFrameStyle=getDefaultAttr(oOvr.oPreviewFrameStyle,{height:parseInt(oOvr.oPreviewFrameStyle&&oOvr.oPreviewFrameStyle.height?oOvr.oPreviewFrameStyle.height:getDefaultAttr().height)+parseInt(this.oConsoleStyle.fontSize)+10+"px"});this.oCommentStyle={color:"#E6E6E6",fontFamily:"sans-serif",fontSize:(parseInt(this.oDefaultFont.fontSize)-1)+"px"};}();var Dom=config.bRhino?{el:function(){},iFrame:function(){}}:new function(){var bIE=config.ie;this.el=function jsxEl(sTag,aAttributes,aChildren){var oEl;if(aAttributes&&bIE&&aAttributes.name){oEl=document.createElement("<A name='"+aAttributes.name+"'></A>");}else{oEl=document.createElement(sTag);}if(aAttributes){this.setAttr(oEl,aAttributes);}if(aChildren){this.append(oEl,aChildren);}return oEl;};this.append=function jsxAppend(oEl,aChildren){if(aChildren==null){return;}if(jsx.typeOf(aChildren)!="array"){aChildren=[aChildren];}for(var i=0;i<aChildren.length;i++){var oChild=aChildren[i];try{if(oChild.tagName||oChild.nodeValue){appendChildDebug(oEl,oChild);}else{appendChildDebug(oEl,this.text(oChild));}}catch(e){var sMessage=oEl.tagName+": "+e.message;if(jsx.logError){jsx.logError(oEl,sMessage);}else{alert(sMessage);}}}};this.setStyle=function jsxSetStyle(oEl,aStyles){return this.setAttr(oEl.style,aStyles);};this.setAttr=function jsxSetAttr(oEl,aAttr){if(jsx.typeOf(aAttr)!="array"){aAttr=[aAttr];}for(var i=0;i<aAttr.length;i++){var oAttr=aAttr[i];if(oAttr.style){this.setAttr(oEl.style,oAttr.style);delete oAttr.style;}if(oAttr.onkeyup){var sFunc="new "+oAttr.onkeyup.toString()+"(event,this);";oEl.setAttribute("onkeyup",(config.ie?new Function(sFunc):sFunc));delete oAttr.onkeyup;}for(var iMember in oAttr){try{oEl[iMember]=oAttr[iMember];}catch(e){var sMessage=e.message+" "+iMember+": "+oAttr[iMember];if(jsx.logError){jsx.logError(sMessage);}else{alert("Dom.setAttr: "+sMessage);}}}}return oEl;};this.textWrap=function textWrapImpl(sTag,oStyle,nIndent){var oSpan=Dom.el(sTag,{style:oStyle||{}});if(nIndent){var aIndent=[];for(var i=0;i<nIndent;i++){aIndent.push("&nbsp;&nbsp;");}oSpan.innerHTML=aIndent.join("");}return oSpan;};this.text=function jsxText(sString){return document.createTextNode(sString?sString:"\xa0");};this.wrapInDiv=function jsxWrapInDiv(oEl,aAttributes){throw new Error("illegal");var oDiv=Dom.el("div");appendChildDebug(oDiv,oEl);return this.setAttr(oDiv,aAttributes);};this.iFrame=function jsxIframe(oStyle,oChild,aText,bFixed,oInsertBefore){throw new Error("out of date");var oEl=this.el("iframe",{style:oStyle});var oDiv=Dom.el("div",{style:{align:"center"}});if(bFixed){var oAppendToBodyDiv=this.el("div",{style:{position:"relative"}});if(oInsertBefore){appendChildDebug(document.body,oAppendToBodyDiv,oInsertBefore);}else{appendChildDebug(document.body,oAppendToBodyDiv);}this.setAttr(oDiv,{style:{position:config.sLogPosition,top:"0px",left:"0px",right:"0px",zIndex:50}});var oWrapStyle={};if(oStyle.height){oWrapStyle.height=oStyle.height;}if(oStyle.width){oWrapStyle.width=oStyle.width;}appendChildDebug(oDiv,oEl);appendChildDebug(oAppendToBodyDiv,Dom.el("div",{id:"spacer",style:oWrapStyle}));}else{var oAppendToBodyDiv=oDiv;if(oInsertBefore){appendChildDebug(document.body,oAppendToBodyDiv,oInsertBefore);}else{appendChildDebug(document.body,oAppendToBodyDiv);}appendChildDebug(oDiv,oEl);}var aHtml=[];aHtml.push("<body style=\"margin:0px;border:0px;padding:0px;height:100%;"+this.jsToCss(oStyle,["border"])+"\">");if(oChild){aHtml.push(this.wrapInDiv(oChild).innerHTML);}if(aText){aHtml=aHtml.concat(aText);}aHtml.push("</body>");var oDoc=this.getIframeDoc(oEl);oDoc.open();for(var i=0;i<aHtml.length;i++){oDoc.writeln(aHtml[i]);}oDoc.close();return oEl;};this.jsToCss=function(oStyle,aExclude){var aStyle=[];for(var sProp in oStyle){if(!aExclude||!jsx.startsWithAny(sProp,aExclude)){var aCss=[];for(var i=0;i<sProp.length;i++){var iProp=sProp.charAt(i);if(iProp.toUpperCase()==iProp){aCss.push("-");}aCss.push(iProp.toLowerCase());}aStyle.push(aCss.join("")+":'"+oStyle[sProp]+"';");}}return aStyle.join("");};this.getIframeDoc=function jsxGetIframeDoc(oIframe){var oDoc=oIframe.contentWindow||oIframe.contentDocument;oDoc=oDoc.document||oDoc;return oDoc;};this.appendIFrame=function jsxAppendIFrame(oIframe,oNewEl){var oDoc=this.getIframeDoc(oIframe);if(config.ie){oDoc.body.innerHTML+=oNewEl.outerHTML;}else{appendChildDebug(oDoc.body,oNewEl);}};}();var oLogger_=new function Logger(){if(config.ie){(function breakMemoryLeak(){function close(){oMasterDiv_=null;oLogDiv_=null;window.detachEvent("onunload",close);}window.attachEvent("onunload",close);})();}var oLogger=this;this.get_instance=function get_instanceImpl(){return "Logger";};this.oCommandHistory=new function(){this.aCommands=[];this.nCurrentIndex=0;}();var getTimeStamp=(function(){function leadZeros(nDigit,nFinalLength){var aDigit=nDigit.toString().split("");for(var i=aDigit.length;i<nFinalLength;i++){aDigit.unshift("0");}return aDigit.join("");}return function(dDate){return(leadZeros(dDate.getHours(),2)+":"+leadZeros(dDate.getMinutes(),2)+":"+leadZeros(dDate.getSeconds(),2)+"."+leadZeros(dDate.getMilliseconds(),3));};})();this.getTimeStamp=getTimeStamp;var oMasterDiv_;var oLogDiv_=config.bIsChild?parent.jsx.getLog():!config.bLog||config.bRhino?Dom.el("div"):(function(){var oStyle=config.oLogStyle,oLog=Dom.el("div",{id:"oLogDiv_",style:oStyle});if(config.bIsCompiled){var oAnchor=Dom.el("div",{id:"oLogDiv_.anchor",style:{position:"relative",zIndex:50}}),oPositioner=Dom.el("div",{id:"oLogDiv_.positioner",style:{align:"center"}});Dom.setAttr(oPositioner,{style:{position:"fixed",top:"0px",left:"0px",right:"0px",zIndex:50}});appendChildDebug(document.body,oAnchor,document.body.firstChild);oMasterDiv_=oAnchor;appendChildDebug(oAnchor,oPositioner);appendChildDebug(oPositioner,oLog);var oWrapStyle={};if(oStyle.height){oWrapStyle.height=oStyle.height;}if(oStyle.width){oWrapStyle.width=oStyle.width;}appendChildDebug(oAnchor,Dom.el("div",{id:"oLogDiv_.spacer",style:oWrapStyle}));}else{var oCenteringDiv=Dom.el("div",{id:"oLogDiv_.centerer",style:{align:"center"}});appendChildDebug(document.body,oCenteringDiv);oMasterDiv_=oCenteringDiv;appendChildDebug(oCenteringDiv,oLog);}return oLog;})();this.getLog=function getLogImpl(){return oLogDiv_;};this.getMasterDiv=function getMasterDivImpl(){return oMasterDiv_;};var attachMessage=(function attachMessageInit(){var oContainerEl,nCancelRelease=null,bScrollFrozen=false,nRecursionCount=0,nRecursionThreshold=config.nLogRecursionThreshold;oLogger.scrollToBottom=function scrollInit(){oLogDiv_.scrollTop=oLogDiv_.scrollHeight;};oLogger.release=function releaseImpl(){oContainerEl.style.display="";oContainerEl=null;nCancelRelease=null;};function release(){return setTimeout("if(jsx){jsx.getLogger().release();setTimeout('jsx.getLogger().scrollToBottom();',100);}",250);}return function attachMessageImpl(aEl,oStyle,bNoScroll){if(bNoScroll){bScrollFrozen=bNoScroll;}else{bScrollFrozen=false;}if(oContainerEl==null){oContainerEl=Dom.el("div",{id:"log_container",style:{display:"none"}});appendChildDebug(oLogDiv_,oContainerEl);nRecursionCount=0;}if(jsx.typeOf(aEl)!="array"){aEl=[aEl];}if(nCancelRelease){clearTimeout(nCancelRelease);nRecursionCount+=1;}Dom.append(oContainerEl,aEl);nCancelRelease=release();if(nRecursionCount>nRecursionThreshold){nRecursionCount=0;throw new Error("attachMessage | too many simultaneous log lines (limit "+nRecursionThreshold+") | infinite recursion suspected");}};})();var formatEntry=(function formatEntryInit(){var sDmk=" | ";return function formatEntryImpl(oObject,sType,sMessage,bStamp){if(bStamp){sMessage=getTimeStamp(new Date)+sDmk+(sType?sType+sDmk:"")+(oObject?jsx.instanceOf(oObject)+sDmk:"")+sMessage;}return sMessage;};})();this.logOutput=config.bIsChild?parent.jsx.getLogger().logOutput:function(nLine){var oStyle={color:"yellow"};if(typeof aJsxOutput_=="undefined"){return;}var aOutput=aJsxOutput_;var nLineAdjusted=nLine-8;if(config.ie){nLineAdjusted/=2;}var sClass="";var sCode=aOutput[nLineAdjusted];if(!sCode){this.append(null,"ERROR SYNTAX",sClass+"...Error source not found in output...",oStyle);return;}for(var i=nLineAdjusted;i>-1;i--){var sOutput=aOutput[i];if(sOutput&&sOutput.search(/^this\.(\w+_\w+_\w+)\=\(function\(\)\{$/)>-1){sClass="jsx."+RegExp.$1.replace(/_/g,".");break;}}this.append(null,"ERROR SYNTAX",sClass,oStyle);var aCode=Parser.indexMethod(sCode);if(aCode.length){this.append(null,null,sCode.slice(0,sCode.search(/\{/)+1),oStyle,1);for(var i=0;i<aCode.length;i++){this.append(null,null,aCode[i],oStyle,2);}if(/^try/.test(sCode)){sCode=sCode.slice(jsx.indexAfter(sCode,aCode.join(""))+1);aCode=Parser.indexMethod(sCode);if(aCode.length){this.append(null,null,"}"+sCode.slice(0,sCode.search(/\{/)+1),oStyle,1);for(var i=0;i<aCode.length;i++){this.append(null,null,aCode[i],oStyle,2);}this.append(null,null,"}",oStyle,1);}else{this.append(null,null,sCode,oStyle,1);}}else{this.append(null,null,"}",oStyle,1);}}else{this.append(null,null,sCode,oStyle,1);}};this.append=(function appendInit(){var write;if(config.ie){(function(){function close(){write=null;oLogger.append=null;window.detachEvent("onunload",close);}window.attachEvent("onunload",close);})();}if(!config.bLog){return function(){};}else{if(config.bRhino){write=(function(){var oSysOut=config.oSysOut;return function(sMessage){oSysOut.println(sMessage);};})();}else{write=function writeImpl(sMessage,oStyle,nIndent,oATagAttr){if(oATagAttr){var oA=Dom.el("a",oATagAttr);attachMessage(oA,null,nIndent);var oStyleWrap=Dom.textWrap("div",oStyle,nIndent);appendChildDebug(oA,oStyleWrap);appendChildDebug(oStyleWrap,Dom.text(sMessage));}else{var oStyleWrap=Dom.textWrap("div",oStyle,nIndent);attachMessage(oStyleWrap,oStyle,nIndent);if(sMessage!=null){appendChildDebug(oStyleWrap,Dom.text(sMessage));}return oStyleWrap;}};}return function appendImpl(oObject,sType,sMessage,oStyle,nIndent,oATagAttr){nIndent=nIndent||0;if(sMessage==null&&(oObject!=null&&(jsx.typeOf(oObject)=="string"||oObject.toString()))){sMessage=oObject;oObject=null;}return write(sMessage!=null?formatEntry(oObject,sType,sMessage,nIndent<=0):null,oStyle,nIndent,oATagAttr);};}})();this.getLine=function(){return " -------------------------------------------------------------";};}();var oConsole_=config.bLog&&config.bIsCompiled?new function ConsoleInit(){this.get_instance=function get_instanceImpl(){return "Console";};if(config.ie){(function breakConsoleLeak(){function close(){oConsole_=null;window.detachEvent("onunload",close);}window.attachEvent("onunload",close);})();}var oLogParent=oLogger_.getLog().parentNode,oTable=Dom.el("table",{style:config.oConsoleStyle});appendChildDebug(oLogParent,oTable);var oRow=oTable.insertRow(-1),oHeaderColumn=Dom.setAttr(oRow.insertCell(-1),{style:{width:"1px"}}),oInputColumn=oRow.insertCell(-1),onKeyUp=function onKeyUpImpl(oEvt,oEl){var nKey=oEvt.keyCode||oEvt.which;var c=jsx.getLogger().oCommandHistory;if(nKey==13&&oEl.value){jsx.logInput(oEl.value);if(!jsx.contains(c.aCommands,oEl.value)){c.aCommands.push(oEl.value);}c.nCurrentIndex=c.aCommands.length;oEl.value="";oEl.focus();var aEvalString=["try{"];aEvalString.push(c.aCommands[c.nCurrentIndex-1]);aEvalString.push("}catch(e){jsx.logException(null,e.message||e);}");eval(aEvalString.join(""));}else{if(nKey==38){c.nCurrentIndex=c.nCurrentIndex-1>-1?c.nCurrentIndex-1:0;oEl.value=c.aCommands[c.nCurrentIndex];}else{if(nKey==40){c.nCurrentIndex=c.nCurrentIndex+1<c.aCommands.length?c.nCurrentIndex+1:c.aCommands.length-1;oEl.value=c.aCommands[c.nCurrentIndex];}}}},oInput=Dom.el("input",[{type:"text",value:"",onkeyup:onKeyUp,style:config.oConsoleStyle},{style:{position:"relative",border:"0px solid "+config.oConsoleStyle.backgroundColor,height:""}}]);appendChildDebug(oHeaderColumn,Dom.text("INPUT:>"));appendChildDebug(oInputColumn,oInput);if(!config.bIsChild){if(!config.ie){Dom.setAttr(oTable,{style:{position:config.sLogPosition,top:config.oLogStyle.height}});}appendChildDebug(oLogParent.parentNode,Dom.el("div",{id:"consoleSpacer",style:{height:(oTable.offsetHeight)+"px"}}));}}():null;this.getConfig=function getConfig(){return config;};this.getDom=function getDom(){return Dom;};this.getLogger=function getLogger(){return oLogger_;};this.getLog=oLogger_.getLog;this.getTimeDiff=function getTimeDiffImpl(dFirst,dLast){var nMs=(dLast?dLast.getTime():new Date().getTime())-dFirst.getTime(),nS=parseInt(nMs/1000),nM=parseInt(nS/60);nS=nS-nM*60;return(nM>0?nM+"m:":"")+nS+"s";};function UncaughtException(sMessage,sUrl,nLine){this.get_instance=function(){return "UncaughtException";};var stackPattern_=/(@(?:file|https?)\:)/g;var stackDelimiter_="$1 $1$1";var stackSplitter_=/@(?:file|https?)\:\s@(?:file|https?)\:/;var message_=formatMessage(sMessage);var stack_=formatStack(sMessage,sUrl,nLine);this.getLine=function(){if(nLine){return nLine;}var sFirstLine=stack_[0];if(sFirstLine==null){sFirstLine=message_.slice(message_.search(/([Ll]ine\:?\s)/)+RegExp.$1.length);return sFirstLine.slice(0,sFirstLine.search(/\D/))*1;}var nStart=sFirstLine.search(/\d+\|/);var nStop=sFirstLine.indexOf("|");return sFirstLine.slice(nStart,nStop)*1;};function formatMessage(sMessage){sMessage=sMessage.replace(/^uncaught\s*exception:\s*/,"");var nIndex=sMessage.search(stackPattern_);return nIndex>-1?sMessage.slice(0,nIndex):sMessage;}function formatStack(sMessage,sUrl,nLine){var aStack=sMessage.replace(stackPattern_,stackDelimiter_).split(stackSplitter_);aStack.shift();if(!aStack.length&&sUrl&&nLine){aStack.push("@"+sUrl+":"+nLine);}return aStack;}this.get_message=function(){return message_;};this.getStack=function(){return stack_;};this.toString=function(){return message_+" "+stack_.join(" ");};}this.logError=(function logErrorInit(){if(config.bLog&&config.bErrors){function write(sString,oObject,nIndent){oLogger_.append(oObject,"ERROR",sString,{color:"#F00000"},nIndent);}return function logErrorImpl(oObject,sMessage,sUrl,nLine){write(sMessage,oObject,null);if(sUrl){write("@"+sUrl+":"+nLine,null,1);}else{var e=new Error();if(e.stack){var aStack=e.stack.split(/\n/);aStack.splice(0,2);aStack.pop();for(var i=0;i<aStack.length;i++){var aStackI=aStack[i];var sFileLine=aStackI.slice(aStackI.indexOf("@"));var sMethod=aStackI.slice(0,aStackI.indexOf("@"));if(sMethod&&sMethod.indexOf("(")==0){sMethod="annonymous"+sMethod;}write(sFileLine+(sMethod?":"+sMethod:""),null,1);}}}};}else{return function(){};}})();this.logException=(function logExceptionInit(){if(config.bLog&&config.bErrors){function write(oObject,oException,sString,nIndent){oLogger_.append(oObject,jsx.parseLast(jsx.instanceOf(oException),"."),sString,{color:"#F00000"},nIndent);}return function logExceptionImpl(oObject,oException){if(oException==null){oException=oObject;oObject=jsx;}if(typeof oException.get_message=="undefined"){jsx.logError(oObject,oException);}else{try{write(oObject,oException,oException.get_message(),0);var aStack=oException.getStack();for(var i=0;i<aStack.length;i++){write(oObject,oException,aStack[i],1);}}catch(e){write(oObject,oException,"LogException handler FAILURE - iterating properties");for(var i in oException){write(oObject,oException,"oException."+i+" = "+oException[i],1);}}}};}else{return function logExceptionNull(){};}})();this.logCompileDebug=(function logCompileDebugInit(){if(config.bLog&&config.bCompileDebug){return function logCompileDebugImpl(oObject,sMessage){oLogger_.append(oObject,"DEBUG-COMPILE",sMessage,{color:"#47D247"});};}else{return function logCompileDebugNull(){};}})();this.logComment=(function logCommentInit(){if(config.bLog){return function logCommentImpl(oObject,xMessage,oATagAttr,nAttrIndex){nAttrIndex=nAttrIndex||0;if(xMessage==null){xMessage=oObject;}if(jsx.typeOf(xMessage)!="array"){xMessage=[xMessage];}for(var i=0;i<xMessage.length;i++){oLogger_.append(null,null,xMessage[i],config.oCommentStyle,1,(oATagAttr&&nAttrIndex==i?oATagAttr:null));}};}else{return function logCommentNull(){};}})();this.logTitle=(function logTitleInit(){if(config.bLog){return function logTitleImpl(oObject,aMessage,nTitleSize,oATagAttr){if(jsx.typeOf(aMessage)!="array"){aMessage=[aMessage];}var sLine="--------------",nAttrIndex=0;switch(nTitleSize){case 1:aMessage[0]=sLine+" "+aMessage[0]+" "+sLine;break;case 2:aMessage.unshift(sLine+sLine+sLine+sLine+sLine+sLine+sLine+sLine);break;default:aMessage[0]=aMessage[0]+" "+sLine;}aMessage.unshift("");this.logComment(oObject,aMessage,oATagAttr);};}else{return function logTitleNull(){};}})();this.logDebug=(function logDebugInit(){if(config.bLog&&config.bDebug){return function logDebugImpl(oObject,sMessage,nIndent){oLogger_.append(oObject,"DEBUG",sMessage,{color:"#47D247"},nIndent);};}else{return function logDebugNull(){};}})();this.logInfo=(function logInfoInit(){if(config.bLog&&config.bInfo){return function logInfoImpl(oObject,sMessage,oStyle,nIndent){oLogger_.append(oObject,"INFO",sMessage,oStyle,nIndent);};}else{return function logInfoNull(){};}})();this.logInput=(function logInputInit(){if(config.bLog){return function logInputImpl(sMessage){oLogger_.append(null,"INPUT",sMessage,{color:"cornflowerblue"});};}else{return function logInputNull(){};}})();this.logWarning=(function logWarningInit(){if(config.bLog){return function logWarningImpl(oObject,sMessage,nIndent){oLogger_.append(oObject,"WARN",sMessage,{color:"yellow"},nIndent);};}else{return function logWarningNull(){};}})();this.onerror=(function onerrorInit(){var mLogOutput;if(config.bLog){if(config.bIsChild&&config.nOutputMode>1){mLogOutput=function(nLine){oLogger_.logOutput(nLine);};}else{if(config.bIsChild){mLogOutput=function(){jsx.logWarning("error syntax display not available in projection output mode: "+config.nOutputMode);};}else{mLogOutput=function(){};}}return function onerrorImpl(sMessage,sUrl,nLine){if(typeof sMessage=="undefined"){jsx.logError("error in jsx.onerror: no message defined in error caught");sMessage="";}var oException=new UncaughtException(sMessage,sUrl,nLine);mLogOutput(oException.getLine());jsx.logException(null,oException);return false;};}else{return function(){};}})();if(config.bCatchJsErrors){window.onerror=jsx.onerror;}this.version=function versionImpl(){var a=aMetadata,i,l=aMetadata.length,j,m,a2;for(i=0;i<l;i++){a2=a[i];m=a2.length;oLogger_.append(null,null,"______________________________________________",null,1);for(j=0;j<m;j++){oLogger_.append(null,null,a2[j],null,1);}}oLogger_.append(null,null,"",null,1);};this.logCode=(function logCodeInit(){if(config.bLog){return function logCodeImpl(oObject,xCode,xComment){var aCode=[];var aComment=[];if(jsx.typeOf(xCode)=="array"){for(var i=0;i<xCode.length;i++){aCode.push(xCode[i]);i+=1;aComment.push(xCode[i]);}}else{aCode.push(xCode);aComment.push(xComment);}for(var i=0;i<aCode.length;i++){var oLine=oLogger_.append(null,null,null,null,1);oLine.appendChild(Dom.textWrap(aCode[i]));var sComment=aComment[i];if(sComment){var oCommentSpan=Dom.textWrap("span",null,2);oLine.appendChild(oCommentSpan);oCommentSpan.appendChild(Dom.text("// "+sComment,config.oCommentStyle));}}};}else{return function logCodeNull(){};}})();this.testOutput=(function(){if(config.bLog){return function testOutput(sString,sExpectedString){var aCorrectOutput=[],sIncorrectOutput="";if(sString==null){sString="";}sString=sString.toString();sExpectedString=sExpectedString.toString();try{if(sString!=sExpectedString){for(var i=0;i<sExpectedString.length;i++){if(sString.charAt(i)&&sExpectedString.charAt(i)==sString.charAt(i)){aCorrectOutput.push(sString.charAt(i));}else{if(sString.charAt(i)){sIncorrectOutput=sString.slice(i);break;}else{sIncorrectOutput="MISSING EXPECTED: "+sExpectedString.slice(i);break;}}}if(sString.length>sExpectedString.length&&sIncorrectOutput==""){sIncorrectOutput=sString.slice(sExpectedString.length);}}else{aCorrectOutput.push(sString);}}catch(e){sIncorrectOutput="ERROR: "+e.message+" -----------> typeof sString = "+typeof sString+" && sString = "+sString;}var aSpans=[];var oLine=oLogger_.append(null,null,null,{color:"#62FF62"});if(aCorrectOutput.length){oLine.appendChild(Dom.text(aCorrectOutput.join("")));}if(sIncorrectOutput.length){var oIncorrectSpanStyle=Dom.textWrap("span",{color:"red",fontWeight:"bold"});oLine.appendChild(oIncorrectSpanStyle);oIncorrectSpanStyle.appendChild(Dom.text(sIncorrectOutput));}};}else{return function(){};}})();var oJsxClassInits_={};var oJsxDocs_=[];function jsxMergeClass_(oStatic,oInstance){for(var sIndex in oStatic){if(sIndex!="prototype"){var oMember=oStatic[sIndex];oInstance.prototype[sIndex]=oMember;oInstance[sIndex]=oMember;}}}var bSuppressRoot;function isRootSuppressed(){if(bSuppressRoot){bSuppressRoot=false;return true;}else{return false;}}function jsx_get(o){var bSuppressRoot=isRootSuppressed();var oGetEvent={get_instance:function(){return "GetEvent";},sGetter:o.g,xVal:o.v,log:function(){jsx.logInfo(this,"-------------------------------------------------");jsx.logInfo(this,"GetEvent Properties: "+this.sGetter);for(var i in this){jsx.logInfo(this,i+": "+(typeof this[i]=="function"?"[ function ]":this[i]));}}};if(o.o&&o.g!="get_instance"&&!bSuppressRoot){o.o(oGetEvent);}if(oGetEvent.xVal==null||typeof oGetEvent.xVal=="undefined"){return null;}if(oGetEvent.xVal.get_root&&!bSuppressRoot){return oGetEvent.xVal.get_root();}return o.b?oGetEvent.xVal.valueOf():oGetEvent.xVal;}var jsx_set=(function(){var ValidationException,mSet=function mSetInit(o){oJsxClassInits_.com_myjsx_ui_data_ValidationException();ValidationException=jsx.com_myjsx_ui_data_ValidationException;mSet=mJsxFinalSet;return mJsxFinalSet(o);};function mJsxFinalSet(o){var oSetEvent={get_instance:function(){return "SetEvent";},sName:o.s,xOld:o.v,xNew:o.n,vLimit:o.l||null,sType:o.t||null,aOnChange:[]},sErrorMessage;if(typeof o.n=="undefined"){if(typeof o.t!="undefined"){throw new ValidationException(o.s+"=( "+(o.n?jsx.instanceOf(o.n):"*")+":"+(o.n||"value undefined")+" ); "+o.s+" no value provided",true);}else{jsx.logWarning(o.s+" = ? | no value provided");return;}}var bFirstSet=typeof o.v=="undefined";if(bFirstSet||o.n!=o.v){if(o.o){o.o(oSetEvent);}if(!bFirstSet&&o.v&&o.v.set_root&&(o.t==null||!jsx.instanceOf(oSetEvent.xNew,o.t))){return o.v.set_root(oSetEvent.xNew);}else{if(oSetEvent.xNew!=null&&o.t!=null&&!jsx.instanceOf(oSetEvent.xNew,o.t)){sErrorMessage=o.s+" = ( "+(oSetEvent.xNew?jsx.instanceOf(oSetEvent.xNew):"")+":"+oSetEvent.xNew+" ); expected "+(o.t?o.t:o.l?"":"*")+(o.l?(o.t?"(":"")+" limit: [ "+o.l+" ] "+(o.t?")":""):"");throw new ValidationException(sErrorMessage,true);}else{if(o.l!=null&&!jsx.contains(o.l,oSetEvent.xNew)){sErrorMessage=o.s+" = ( "+(oSetEvent.xNew?jsx.instanceOf(oSetEvent.xNew):"")+":"+oSetEvent.xNew+" ); expected "+(o.t?o.t:o.l?"":"*")+(o.l?(o.t?"(":"")+" limit: [ "+o.l+" ] "+(o.t?")":""):"");throw new ValidationException(sErrorMessage,true);}else{o.m(oSetEvent.xNew);for(var i in o.aOnChange){o.aOnChange[i]();}return oSetEvent.xNew;}}}}}return function(o){return mSet(o);};})();this.com_myjsx_Omnitypes=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;oJsxClassInits_.com_myjsx_lang_Exception();jsx.com_myjsx_Omnitypes=new Static;}return f;})();function Static(){var jsx_=jsx,get_=jsx_get,set_=jsx_set,Exception=jsx_.com_myjsx_lang_Exception;var instance_="jsx.com.myjsx.Omnitypes";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};function StringReg(r){this.sBody=r.toString().replace(/^\/([\S\s]*?)\/g?i?m?$/,"$1");this.sParms=r.toString().replace(/^[\S\s]*?\/(g?i?m?)$/,"$1");this.getRegExp=function(){return r;};}this.contains=function contains(oThis,oVal,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "object":return this.indexOf(oThis,oVal,sThisType)!=null;case "array":case "string":return this.indexOf(oThis,oVal,sThisType)>-1;case "boolean":case "number":return oThis==oVal;default:jsx_.logError(this,null,"contains: no support for type: "+sThisType);}};this.endsWith=function endsWith(oThis,oVal,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":var sValType=jsx_.typeOf(oVal);switch(sValType){case "string":return oThis.slice(oThis.length-oVal.length)==oVal;default:jsx_.logError(this,null,"endsWith: strings may search on another string or regexp, "+sValType+" invalid");}break;case "array":return oThis[oThis.length-1]==oVal;default:jsx_.logError(this,null,"endsWith: no support for type: "+sThisType);}};this.endsWithAny=function endsWithAny(oThis,aVal,sPrefix,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":for(var i=0;i<aVal.length;i++){if(this.endsWith(oThis,(sPrefix?sPrefix:"")+aVal[i],sThisType)){return true;}}return false;default:jsx_.logError(this,null,"endsWithAny: no support for type: "+sThisType);}};this.indexAfter=function indexAfter(oThis,oVal,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":var nIndex=this.indexOf(oThis,oVal,sThisType);return nIndex+(nIndex>-1?oVal.length:0);case "array":var nIndex=this.indexOf(oThis,oVal,sThisType);return nIndex+(nIndex>-1?1:0);default:jsx_.logError(this,null,"indexAfter: no support for type: "+sThisType);}};this.indexOf=function indexOf(oThis,oVal,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":var sValType=jsx_.typeOf(oVal);switch(sValType){case "string":return oThis.indexOf(oVal);case "regexp":return oThis.search(oVal);default:jsx_.logError(this,null,"endsWith: strings may search on another string or regexp, "+sValType+" invalid");}break;case "array":for(var i=0;i<oThis.length;i++){if(oThis[i]==oVal){return i;}}return-1;case "object":for(var i in oThis){if(oThis[i]==oVal){return i;}}return null;default:jsx_.logError(this,null,"indexOf: no support for type: "+sThisType);}};this.indexOfIgnoreCase=function indexOfIgnoreCase(oThis,sVal,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);var sValType=jsx_.typeOf(sVal);if(sValType!="string"){throw new Exception("indexOfIgnoreCase only searches against a string, type "+sValType+" invalid");}switch(sThisType){case "string":return oThis.toLowerCase().indexOf(sVal.toLowerCase());case "array":if(typeof sVal=="string"){for(var i=0;i<oThis.length;i++){var iThis=oThis[i];if(jsx_.typeOf(iThis,"string")&&iThis.toLowerCase()==sVal.toLowerCase()){return i;}}}return-1;case "object":for(var i in oThis){var iThis=oThis[i];if(jsx_.typeOf(iThis,"string")&&iThis.toLowerCase()==sVal.toLowerCase()){return i;}}return null;default:jsx_.logError(this,null,"indexOf: no support for type: "+sThisType);}};this.isEmpty=function isEmpty(oObject,sThisType){sThisType=sThisType||jsx_.typeOf(oObject);if(oObject==null){return true;}switch(sThisType){case "array":case "string":return oObject.length==0;case "number":return oObject==0;case "object":for(var sIndex in oObject){return false;}return true;case "regexp":return oObject.valueOf().search(/^\/(?:\(\?\:\))?\/$/)>-1;default:return false;}};this.parseFirst=function parseFirst(oThis,sDelim){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":return oThis.split(sDelim?sDelim:"/").shift();case "array":return oThis[0];default:jsx_.logError(this,null,"parseFirst: no support for type: "+sThisType);}};this.parseLast=function parseLast(oThis,sDelim){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":return oThis.split(sDelim?sDelim:"/").pop();case "array":return oThis[oThis.length];default:jsx_.logError(this,null,"parseLast: no support for type: "+sThisType);}};this.replaceAll=function replaceAll(oThis,sOld,sNew,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":return oThis.split(sOld).join(sNew);default:jsx_.logError(this,null,"replaceAll: no support for type: "+sThisType);}};this.startsWith=function startsWith(oThis,oVal,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":return oThis.indexOf(oVal)==0;case "array":return oThis[0]==oVal;default:jsx_.logError(this,null,"startsWith: no support for type: "+sThisType);}};this.startsWithAny=function startsWithAny(oThis,oVal,sThisType){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":for(var i in oVal){if(this.startsWith(oThis,oVal[i],sThisType)){return true;}}return false;default:jsx_.logError(this,null,"startsWithAny: no support for type: "+sThisType);}};this.trim=function(oThis){var sThisType=sThisType||jsx_.typeOf(oThis);switch(sThisType){case "string":return oThis.replace(/^[ \u00A0\f\n\r\t\v\u2028\u2029]*(\S*[\s\S]*\S)[ \u00A0\f\n\r\t\v\u2028\u2029]*$/,"$1");default:jsx_.logError(this,null,"trim: no support for type: "+sThisType);}};function instance(){}jsxMergeClass_(this,instance);return instance;}oJsxClassInits_.com_myjsx_Omnitypes=init;return init;})();this.com_myjsx_com_google_TranslatorHelper=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;oJsxClassInits_.com_myjsx_lang_Exception();oJsxClassInits_.com_myjsx_lang_Cookie();oJsxClassInits_.com_myjsx_lang_StringX();oJsxClassInits_.com_myjsx_dom_TextNodes();jsx.com_myjsx_com_google_TranslatorHelper=new Static;}return f;})();function Static(){var this_=this;var jsx_=jsx,get_=jsx_get,set_=jsx_set,Exception=jsx_.com_myjsx_lang_Exception,Cookie=jsx_.com_myjsx_lang_Cookie,StringX=jsx_.com_myjsx_lang_StringX,TextNodes=jsx_.com_myjsx_dom_TextNodes;var oNode,oDefaultNode,mRemoveWaitMessage;var instance_="jsx.com.myjsx.com.google.TranslatorHelper";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};var xExcludeIds=[];var sDefaultLang="en";var sLang=Cookie.get("lang")||"en";this.setDefaultNode=function setNodeImpl(oNewNode){oNode=oNewNode;oDefaultNode=oNewNode;if(sLang!=sDefaultLang){oNewNode.style.display="none";}};this.addExcludeIds=function addExcludeIdsImpl(xIds){if(jsx_.typeOf(xIds,"string")){xExcludeIds.push(xIds);}else{if(jsx_.typeOf(xIds,"array")){xExcludeIds=xExcludeIds.concat(xIds);}else{throw new Exception("addExcludeIdsImpl: unknown xIds type (expected array or string): "+jsx_.typeOf(xIds));}}};this.clearExcludeIds=function clearExcludeIdsImpl(){xExcludeIds=[];};function setNewLanguage(sLangCode){Cookie.set("lang",sLangCode);if(sLang!=sDefaultLang){window.location.reload();}else{sLang=sLangCode;oNode=oDefaultNode;translate();}}this.setNewLanguage=function setNewLanguageImpl(sLangCode){if(sLangCode&&sLangCode!=sLang){if(sLangCode==sDefaultLang){setNewLanguage(sLangCode);}else{var oDiv=document.getElementById("translation_disclaimer"),sTranslationText=oDiv.firstChild.nodeValue;if(oDiv){sendTranslateRequest(sTranslationText,function confirmDisclaimer(xResult){if(xResult.translation){sTranslationText=xResult.translation+"\n\n--\n\n"+sTranslationText;}if(confirm(sTranslationText+"\n ")){setNewLanguage(sLangCode);}},sLangCode);}else{setNewLanguage(sLangCode);}}}};function addWaitMessage(oNode,mOnComplete){oNode.style.display="none";var oDiv=document.getElementById("translating_message");if(!oDiv){oDiv=document.createElement("div");oDiv.style.position="fixed";oDiv.style.display="none";oDiv.style.top="15px";oDiv.style.left="15px";oDiv.style.zIndex="50";oDiv.style.textAlign="center";oDiv.style.border="1px black solid";oDiv.style.padding="5px 30px";oDiv.style.backgroundColor="white";oDiv.style.color="black";document.body.appendChild(oDiv);oDiv.appendChild(document.createTextNode("Translating... (Powered by Google)"));}sendTranslateRequest(oDiv.firstChild.nodeValue,function displayTranslatedWaitMessage(xResult){if(xResult.translation){oDiv.firstChild.nodeValue=xResult.translation;}oDiv.style.display="block";mRemoveWaitMessage=function removeWaitMessage(){if(oDiv){oDiv.style.display="none";}oNode.style.display="";mRemoveWaitMessage=null;};if(mOnComplete){mOnComplete();}});}function removeWaitMessage(){if(mRemoveWaitMessage){mRemoveWaitMessage();}}this.updateOnChange=(function updateOnChangeInit(){var bActive=false,oNodeCheck=null,aOriginalValues=null,nIntervalId=null;return function updateOnChangeImpl(sId){if(!bActive){if(sLang!=sDefaultLang){oNodeCheck=document.getElementById(sId);addWaitMessage(oNodeCheck);bActive=true;aOriginalValues=TextNodes.get(oNodeCheck,xExcludeIds,true).getValues(true);nIntervalId=window.setInterval(this_.updateOnChange,200);}}else{var oCurrentNodes=TextNodes.get(oNodeCheck,xExcludeIds,true);if(oCurrentNodes.hasChanged(aOriginalValues)){oNode=oNodeCheck;oNodeCheck=null;aOriginalValues=null;window.clearInterval(nIntervalId);nIntervalId=null;bActive=false;translate();}}};})();function sendTranslateRequest(sText,mResult,sLangCodeOvr){google.language.translate(sText,sDefaultLang,sLangCodeOvr||sLang,function mFormatTranslation(xResult){if(xResult.translation){xResult.translation=StringX.formatChars(xResult.translation);}mResult(xResult);});}var translate=(function translateInit(){function translate(){var nMaxLength=1875;var oNodeManager=TextNodes.get(oNode,xExcludeIds),aNodeValues=oNodeManager.getValues(),sDemarker="<br>";aNodeValues.unshift(document.title.toString());var aToTranslate=[],sToTranslate=aNodeValues.join(sDemarker).replace(/\s+/g," ");while(escape(sToTranslate).length>nMaxLength){var sRequestHardStop=unescape(escape(sToTranslate).substring(0,nMaxLength)),nCleanStopIndex=sRequestHardStop.lastIndexOf(sDemarker);if(nCleanStopIndex==-1){nCleanStopIndex=Math.max(sRequestHardStop.lastIndexOf("."),sRequestHardStop.lastIndexOf(":"))+1;}else{nCleanStopIndex+=sDemarker.length;}aToTranslate.push(sRequestHardStop.substring(0,nCleanStopIndex));sToTranslate=sToTranslate.substring(nCleanStopIndex);}aToTranslate.push(sToTranslate);var aTranslatedRequests=[];function processResult(xResult){var sTranslation=xResult.translation;if(sTranslation){aTranslatedRequests.push(sTranslation);if(aToTranslate.length){sendTranslateRequest(aToTranslate.shift(),processResult);}else{var aTranslatedNodeValues=aTranslatedRequests.join("").split(sDemarker);document.title=aTranslatedNodeValues.shift();oNodeManager.replace(aTranslatedNodeValues);removeWaitMessage();}}else{removeWaitMessage();}}if(aToTranslate.length){sendTranslateRequest(aToTranslate.shift(),processResult);}}return function translateImpl(){addWaitMessage(oNode,translate);};})();function instance(){}jsxMergeClass_(this,instance);Static:{google.load("language","1");if(sLang!=sDefaultLang){google.setOnLoadCallback(translate);}}return instance;}oJsxClassInits_.com_myjsx_com_google_TranslatorHelper=init;return init;})();this.com_myjsx_dom_TextNodes=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;jsx.com_myjsx_dom_TextNodes=new Static;}return f;})();function Static(){var jsx_=jsx,get_=jsx_get,set_=jsx_set;var instance_="jsx.com.myjsx.dom.TextNodes";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};function NodeManager(){var o={},NodeManager=this;this.get=function getImpl(){var a=[];for(var i in o){a=a.concat(o[i]);}return a;};this.getValues=function getValuesImpl(bSuppressTrim){var a=[];if(bSuppressTrim){for(var sIndexType in o){var aNodesOfType=o[sIndexType];for(var i in aNodesOfType){a.push(aNodesOfType[i][sIndexType]);}}}else{for(var sIndexType in o){var aNodesOfType=o[sIndexType];for(var i in aNodesOfType){a.push(aNodesOfType[i][sIndexType]);}}}return a;};this.push=function pushImpl(sIndexType,oNode){o[sIndexType]=o[sIndexType]||[];o[sIndexType].push(oNode);};this.replace=function replaceImpl(aNewValues){var aWorkingValues=[].concat(aNewValues);for(var sIndexType in o){var aNodesOfType=o[sIndexType];for(var i in aNodesOfType){aNodesOfType[i][sIndexType]=aWorkingValues[i];}aWorkingValues.splice(0,aNodesOfType.length);}};this.hasNodes=function hasNodesImpl(){for(var sIndexType in o){return true;}return false;};this.hasChanged=function replaceImpl(aNewValues){var aAlert=[];if(aNewValues.length>0!=NodeManager.hasNodes()){return true;}else{if(!aNewValues.length&&!NodeManager.hasNodes()){return false;}}var aCurrentValues=NodeManager.getValues(true);for(var i in aCurrentValues){if(aCurrentValues[i]!=aNewValues[i]){return true;}}return false;};this.removeByIds=function removeByIdsImpl(xIds){if(typeof xIds=="undefined"){return;}if(typeof xIds=="string"){xIds=[xIds];}var rIds=new RegExp("(?:"+xIds.join("|")+")");for(var j in o){var aNodesOfType=o[j];for(var k=0;k<aNodesOfType.length;k++){if(rIds.test(aNodesOfType[k].parentNode.id)){aNodesOfType.splice(k,1);k--;}}}};}this.get=(function getInit(){function get(oNode,rExcludeIds,bFirstOnly,oNodeManager){if((bFirstOnly&&oNodeManager.hasNodes())||(rExcludeIds&&rExcludeIds.test(oNode.id||""))||oNode.nodeName=="#comment"){return oNodeManager;}else{if(oNode.nodeName=="#text"){if(/\w/.test(oNode.nodeValue.replace(/^\s*/,"").replace(/\s*$/,""))){oNodeManager.push("nodeValue",oNode);}}else{if(/input/i.test(oNode.tagName)&&(/(?:submit|button|image)/i.test(oNode.type))){if(/\w/.test(oNode.value.replace(/^\s*/,"").replace(/\s*$/,""))){oNodeManager.push("value",oNode);}}else{var aChildNodes=oNode.childNodes;if(aChildNodes){for(var i=0;i<aChildNodes.length;i++){get(aChildNodes[i],rExcludeIds,bFirstOnly,oNodeManager);}}}}}return oNodeManager;}return function getImpl(oNode,xExcludeIds,bFirstOnly){var rExcludeIds;if(xExcludeIds){if(typeof xExcludeIds=="string"){xExcludeIds=[xExcludeIds];}rExcludeIds=new RegExp("(?:"+xExcludeIds.join("|")+")");}return get(oNode,rExcludeIds,bFirstOnly,new NodeManager());};})();function instance(){}jsxMergeClass_(this,instance);return instance;}oJsxClassInits_.com_myjsx_dom_TextNodes=init;return init;})();this.com_myjsx_lang_Cookie=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;oJsxClassInits_.com_myjsx_lang_Exception();jsx.com_myjsx_lang_Cookie=new Static;}return f;})();function Static(){var jsx_=jsx,get_=jsx_get,set_=jsx_set,Exception=jsx_.com_myjsx_lang_Exception;var instance_="jsx.com.myjsx.lang.Cookie";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};this.set=function setImpl(sName,sValue,nDays,sPath,sDomain,bSecure){var o={};if(!sName||typeof sValue=="undefined"){throw new Exception("cookie name and value must be provided");}o[sName]=escape(sValue);if(nDays){o.expires=new Date(new Date().getTime()+(nDays*24*60*60*1000)).toGMTString();}o.path=sPath||"/";if(sDomain){o.domain=sDomain;}var a=[];for(var i in o){a.push(i+"="+o[i]);}if(bSecure){a.push("secure");}document.cookie=a.join("; ");};this.get=(function getInit(){var rNON_STRINGS=/^(?:null|true|false)\b/;return function getImpl(sName){var a=document.cookie.split(";"),r=new RegExp("^\\s*"+sName+"\\=");for(var i=0;i<a.length;i++){var sPair=a[i];if(r.test(sPair)){var sValue=unescape(sPair.replace(r,""));if(rNON_STRINGS.test(sValue)||(sValue!=""&&!isNaN(sValue))){return eval("("+sValue+")");}else{return sValue;}}}return null;};})();this.clear=function clearImpl(sName){this.set(sName,"",-1);};function instance(){}jsxMergeClass_(this,instance);return instance;}oJsxClassInits_.com_myjsx_lang_Cookie=init;return init;})();this.com_myjsx_lang_Exception=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;oJsxClassInits_.com_myjsx_Omnitypes();jsx.com_myjsx_lang_Exception=new Static;}return f;})();function Static(){var jsx_=jsx,get_=jsx_get,set_=jsx_set,Omnitypes=jsx_.com_myjsx_Omnitypes;var instance_="jsx.com.myjsx.lang.Exception";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};var aSUPPORTED_FILES_=["html","htm","jsp","js"];function get_aSUPPORTED_FILES(){return get_({g:"aSUPPORTED_FILES_",v:aSUPPORTED_FILES_});};var sLINE_RECOGNITION_="\\.(?:"+get_aSUPPORTED_FILES().join("|")+")\\:\\d+";function get_sLINE_RECOGNITION(){return get_({g:"sLINE_RECOGNITION_",v:sLINE_RECOGNITION_});};var rSTACK_PATTERN_=new RegExp("("+get_sLINE_RECOGNITION()+")\\s?","g");function get_rSTACK_PATTERN(){return get_({g:"rSTACK_PATTERN_",v:rSTACK_PATTERN_});};var rSTACK_SPLITTER_=new RegExp(get_sLINE_RECOGNITION()+"\\s");function get_rSTACK_SPLITTER(){return get_({g:"rSTACK_SPLITTER_",v:rSTACK_SPLITTER_});};var sSTACK_DELIMITER_="$1$1 ";function get_sSTACK_DELIMITER(){return get_({g:"sSTACK_DELIMITER_",v:sSTACK_DELIMITER_});};function formatStack(oError){var aStack=[];if(oError.stack){var aUnformattedStack=oError.stack.replace(get_rSTACK_PATTERN(),get_sSTACK_DELIMITER()).split(get_rSTACK_SPLITTER());for(var i=0;i<aUnformattedStack.length;i++){var iStack=aUnformattedStack[i];if(iStack.length&&iStack.search(/@\:0/)==-1){var nIndex=iStack.search(/@(?:file|https?)\:\/{2,3}/);aStack.push(iStack.slice(nIndex)+(iStack.length-nIndex<iStack.length?"|"+iStack.slice(0,nIndex).replace(/\s/g,"~"):""));}}}return aStack;}instance.prototype.toString=function(){return this.get_message()+" "+this.getStack().join(" ");};instance.prototype.getLine=function(nLine){var sFirstLine=nLine||this.getStack()[0];var nStart=sFirstLine.search(/\d+\|/);var nStop=Omnitypes.indexOf(sFirstLine,"|");return sFirstLine.slice(nStart,nStop)*1;};function instance(sMessage){var this_=this;var bStackTrimmed_;var error_=new Error;function get_error(){return get_({g:"error_",v:error_});};function set_error(x){return set_({s:"error_",v:error_,n:x,m:function set_errorImpl(x){error_=x;},t:"error"});};var message_="";this.get_message=function get_message(){return get_({g:"message_",v:message_});};this.set_message=function set_message(x){return set_({s:"message_",v:message_,n:x,m:function set_messageImpl(x){message_=x;},t:"string"});};var aStack_=[];function get_aStack(){return get_({g:"aStack_",v:aStack_});};function set_aStack(x){return set_({s:"aStack_",v:aStack_,n:x,m:function set_aStackImpl(x){aStack_=x;},t:"array"});};this.get_bStackTrimmed=function get_bStackTrimmed(){return get_({g:"bStackTrimmed_",v:bStackTrimmed_,b:true});};this.set_bStackTrimmed=function set_bStackTrimmed(x){return set_({s:"bStackTrimmed_",v:bStackTrimmed_,n:x,m:function set_bStackTrimmedImpl(x){bStackTrimmed_=x;},t:"boolean",o:onSet_bStackTrimmed});};function onSet_bStackTrimmed(o){if(o.xOld){o.xNew=true;}}this.getStack=function(n){if(this.get_bStackTrimmed()){return get_aStack();}n=n||0;if(get_aStack){var aStack=get_aStack();for(var i=0;i<n;i++){aStack.shift();}this.set_bStackTrimmed(true);return aStack;}else{if(this.get_super){n+=1;return this.get_super().getStack(n);}}};(function instanceImpl(){this_.set_message(sMessage||"");set_aStack(formatStack(get_error()));})();}jsxMergeClass_(this,instance);return instance;}oJsxClassInits_.com_myjsx_lang_Exception=init;return init;})();this.com_myjsx_lang_StringX=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;jsx.com_myjsx_lang_StringX=new Static;}return f;})();function Static(){var jsx_=jsx,get_=jsx_get,set_=jsx_set;var instance_="jsx.com.myjsx.lang.StringX";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};this.formatChars=function formatCharsImpl(s){return s.replace(/\&quot;/g,"\"").replace(/\&amp;/g,"&").replace(/\&#39;/g,"'");};function instance(){}jsxMergeClass_(this,instance);return instance;}oJsxClassInits_.com_myjsx_lang_StringX=init;return init;})();this.com_myjsx_ui_data_ValidationException=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;oJsxClassInits_.com_myjsx_lang_Exception();jsx.com_myjsx_ui_data_ValidationException=new Static;}return f;})();function Static(){var jsx_=jsx,get_=jsx_get,set_=jsx_set,Exception=jsx_.com_myjsx_lang_Exception;var super_=Exception;this.get_super=function(){return super_;};var instance_="jsx.com.myjsx.ui.data.ValidationException";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};function instance(sMessage,bSuppressFirstLine){var super_=new Exception(sMessage);this.get_super=function get_super(){return get_({g:"super_",v:super_});};this.toString=super_.toString,this.getLine=super_.getLine,this.get_message=super_.get_message,this.set_message=super_.set_message,this.get_bStackTrimmed=super_.get_bStackTrimmed,this.set_bStackTrimmed=super_.set_bStackTrimmed;var bSuppressFirstLine_=false;function get_bSuppressFirstLine(){return get_({g:"bSuppressFirstLine_",v:bSuppressFirstLine_,b:true});};function set_bSuppressFirstLine(x){return set_({s:"bSuppressFirstLine_",v:bSuppressFirstLine_,n:x,m:function set_bSuppressFirstLineImpl(x){bSuppressFirstLine_=x;},t:"boolean"});};this.getStack=function(n){if(this.get_bStackTrimmed()){return this.get_super().getStack();}n=n||0;n+=(jsx_.instanceOf(this,"ValidationException")&&get_bSuppressFirstLine()?3:2);return this.get_super().getStack(n);};(function instanceImpl(){set_bSuppressFirstLine(bSuppressFirstLine!=null?bSuppressFirstLine:false);})();}jsxMergeClass_(this,instance);Static:{}return instance;}oJsxClassInits_.com_myjsx_ui_data_ValidationException=init;return init;})();this.com_philadelphiamedicine_Translator=(function(){var init=(function(){var b=false;function f(){if(b){return null;}b=true;oJsxClassInits_.com_myjsx_com_google_TranslatorHelper();jsx.com_philadelphiamedicine_Translator=new Static;}return f;})();function Static(){var jsx_=jsx,get_=jsx_get,set_=jsx_set,TranslatorHelper=jsx_.com_myjsx_com_google_TranslatorHelper;var instance_="jsx.com.philadelphiamedicine.Translator";this.get_instance=function get_instance(){return get_({g:"instance_",v:instance_});};this.setNewLanguage=TranslatorHelper.setNewLanguage;this.updateOnChange=TranslatorHelper.updateOnChange;function instance(){}jsxMergeClass_(this,instance);Static:{TranslatorHelper.addExcludeIds("no_translate");var oNode=document.getElementById("outerpage");TranslatorHelper.setDefaultNode(oNode);}return instance;}oJsxClassInits_.com_philadelphiamedicine_Translator=init;return init;})();var aMetadata=[["Built Wed Jun 10 2009 15:57:53 GMT-0400 (EDT)","Terms of use below."],["com.philadelphiamedicine.*","Philadelphia International Medicine Translator 0.1.0.14-957","Copyright \u00A9 2005-2009 Alex Maher, All Rights Reserved.","Translations by Google™ and subject to Google™ terms and conditions."],["com.myjsx.*","JSX 0.3.6.1607-897","JSX Compiler 0.3.6.1260r","Copyright \u00A9 2005-2009 Alex Maher, All Rights Reserved.","Contact: alex.maher@appliqa.com"]];jsx.logInfo(null,"Philadelphia International Medicine Translator 0.1.0.14-957");jsx.logInfo(null,"Copyright \u00A9 2005-2009 Alex Maher, All Rights Reserved.");jsx.logInfo(null,"Translations by Google™ and subject to Google™ terms and conditions.");jsx.logInfo(null,"JSX 0.3.6.1607-897 | Copyright \u00A9 2005-2009 Alex Maher, All Rights Reserved. | alex.maher@appliqa.com");if (!config.bIsChild){jsx.logInfo(null,"Built Wed Jun 10 2009 15:57:53 GMT-0400 (EDT)");}for(var i in oJsxClassInits_)oJsxClassInits_[i]();}();var Translator=jsx.com_philadelphiamedicine_Translator;

