";
this._cacheLocalBlockFormatNames();
},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_cacheLocalBlockFormatNames:function(){
if(!this._native2LocalFormatNames["p"]){
var obj=this.object;
var _8c9=false;
if(!obj){
try{
obj=dojo.html.createExternalElement(dojo.doc(),"object");
obj.classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";
dojo.body().appendChild(obj);
obj.DocumentHTML="";
}
catch(e){
_8c9=true;
}
}
try{
var _8ca=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");
obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_8ca);
var _8cb=new VBArray(_8ca.Names);
var _8cc=_8cb.toArray();
var _8cd=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"];
for(var i=0;i<_8cd.length;++i){
if(_8cd[i].length>0){
this._local2NativeFormatNames[_8cc[i]]=_8cd[i];
this._native2LocalFormatNames[_8cd[i]]=_8cc[i];
}
}
}
catch(e){
_8c9=true;
}
if(obj&&!this.object){
dojo.body().removeChild(obj);
}
}
return !_8c9;
},_isResized:function(){
return false;
},onLoad:function(e){
this.isLoaded=true;
if(this.object){
this.document=this.object.DOM;
this.window=this.document.parentWindow;
this.editNode=this.document.body.firstChild;
this.editingArea.style.height=this.height?this.height:this.minHeight;
if(!this.height){
this.connect(this,"onDisplayChanged","_updateHeight");
}
this.window._frameElement=this.object;
}else{
if(this.iframe&&!dojo.render.html.ie){
this.editNode=this.document.body;
if(!this.height){
this.connect(this,"onDisplayChanged","_updateHeight");
}
try{
this.document.execCommand("useCSS",false,true);
this.document.execCommand("styleWithCSS",false,false);
}
catch(e2){
}
if(dojo.render.html.safari){
this.connect(this.editNode,"onblur","onBlur");
this.connect(this.editNode,"onfocus","onFocus");
this.connect(this.editNode,"onclick","onFocus");
this.interval=setInterval(dojo.lang.hitch(this,"onDisplayChanged"),750);
}else{
if(dojo.render.html.mozilla||dojo.render.html.opera){
var doc=this.document;
var _8d1=dojo.event.browser.addListener;
var self=this;
dojo.lang.forEach(this.events,function(e){
var l=_8d1(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e));
if(e=="onBlur"){
var _8d5={unBlur:function(e){
dojo.event.browser.removeListener(doc,"blur",l);
}};
dojo.event.connect("before",self,"close",_8d5,"unBlur");
}
});
}
}
}else{
if(dojo.render.html.ie){
if(!this.height){
this.connect(this,"onDisplayChanged","_updateHeight");
}
this.editNode.style.zoom=1;
}
}
}
this._applyEditingAreaStyleSheets();
if(this.focusOnLoad){
this.focus();
}
this.onDisplayChanged(e);
if(this.onLoadDeferred){
this.onLoadDeferred.callback(true);
}
},onKeyDown:function(e){
if((!e)&&(this.object)){
e=dojo.event.browser.fixEvent(this.window.event);
}
if((dojo.render.html.ie)&&(e.keyCode==e.KEY_TAB)){
e.preventDefault();
e.stopPropagation();
this.execCommand((e.shiftKey?"outdent":"indent"));
}else{
if(dojo.render.html.ie){
if((65<=e.keyCode)&&(e.keyCode<=90)){
e.charCode=e.keyCode;
this.onKeyPress(e);
}
}
}
},onKeyUp:function(e){
return;
},KEY_CTRL:1,onKeyPress:function(e){
if((!e)&&(this.object)){
e=dojo.event.browser.fixEvent(this.window.event);
}
var _8da=e.ctrlKey?this.KEY_CTRL:0;
if(this._keyHandlers[e.key]){
var _8db=this._keyHandlers[e.key],i=0,_8dd;
while(_8dd=_8db[i++]){
if(_8da==_8dd.modifiers){
e.preventDefault();
_8dd.handler.call(this);
break;
}
}
}
dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
},addKeyHandler:function(key,_8df,_8e0){
if(!(this._keyHandlers[key] instanceof Array)){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({modifiers:_8df||0,handler:_8e0});
},onKeyPressed:function(e){
this.onDisplayChanged();
},onClick:function(e){
this.onDisplayChanged(e);
},onBlur:function(e){
},_initialFocus:true,onFocus:function(e){
if((dojo.render.html.mozilla)&&(this._initialFocus)){
this._initialFocus=false;
if(dojo.string.trim(this.editNode.innerHTML)==" "){
this.placeCursorAtStart();
}
}
},blur:function(){
if(this.iframe){
this.window.blur();
}else{
if(this.object){
this.document.body.blur();
}else{
if(this.editNode){
this.editNode.blur();
}
}
}
},focus:function(){
if(this.iframe&&!dojo.render.html.ie){
this.window.focus();
}else{
if(this.object){
this.document.focus();
}else{
if(this.editNode&&this.editNode.focus){
this.editNode.focus();
}else{
dojo.debug("Have no idea how to focus into the editor!");
}
}
}
},onDisplayChanged:function(e){
},_activeX:{command:{bold:5000,italic:5023,underline:5048,justifycenter:5024,justifyleft:5025,justifyright:5026,cut:5003,copy:5002,paste:5032,"delete":5004,undo:5049,redo:5033,removeformat:5034,selectall:5035,unlink:5050,indent:5018,outdent:5031,insertorderedlist:5030,insertunorderedlist:5051,inserttable:5022,insertcell:5019,insertcol:5020,insertrow:5021,deletecells:5005,deletecols:5006,deleterows:5007,mergecells:5029,splitcell:5047,setblockformat:5043,getblockformat:5011,getblockformatnames:5012,setfontname:5044,getfontname:5013,setfontsize:5045,getfontsize:5014,setbackcolor:5042,getbackcolor:5010,setforecolor:5046,getforecolor:5015,findtext:5008,font:5009,hyperlink:5016,image:5017,lockelement:5027,makeabsolute:5028,sendbackward:5036,bringforward:5037,sendbelowtext:5038,bringabovetext:5039,sendtoback:5040,bringtofront:5041,properties:5052},ui:{"default":0,prompt:1,noprompt:2},status:{notsupported:0,disabled:1,enabled:3,latched:7,ninched:11},appearance:{flat:0,inset:1},state:{unchecked:0,checked:1,gray:2}},_normalizeCommand:function(cmd){
var drh=dojo.render.html;
var _8e8=cmd.toLowerCase();
if(_8e8=="formatblock"){
if(drh.safari){
_8e8="heading";
}
}else{
if(this.object){
switch(_8e8){
case "createlink":
_8e8="hyperlink";
break;
case "insertimage":
_8e8="image";
break;
}
}else{
if(_8e8=="hilitecolor"&&!drh.mozilla){
_8e8="backcolor";
}
}
}
return _8e8;
},_safariIsLeopard:function(){
var _8e9=false;
if(dojo.render.html.safari){
var tmp=dojo.render.html.UA.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
_8e9=true;
}
}
return _8e9;
},queryCommandAvailable:function(_8ec){
var ie=1;
var _8ee=1<<1;
var _8ef=1<<2;
var _8f0=1<<3;
var _8f1=1<<4;
var _8f2=this._safariIsLeopard();
function isSupportedBy(_8f3){
return {ie:Boolean(_8f3&ie),mozilla:Boolean(_8f3&_8ee),safari:Boolean(_8f3&_8ef),safari420:Boolean(_8f3&_8f1),opera:Boolean(_8f3&_8f0)};
}
var _8f4=null;
switch(_8ec.toLowerCase()){
case "bold":
case "italic":
case "underline":
case "subscript":
case "superscript":
case "fontname":
case "fontsize":
case "forecolor":
case "hilitecolor":
case "justifycenter":
case "justifyfull":
case "justifyleft":
case "justifyright":
case "delete":
case "selectall":
_8f4=isSupportedBy(_8ee|ie|_8ef|_8f0);
break;
case "createlink":
case "unlink":
case "removeformat":
case "inserthorizontalrule":
case "insertimage":
case "insertorderedlist":
case "insertunorderedlist":
case "indent":
case "outdent":
case "formatblock":
case "inserthtml":
case "undo":
case "redo":
case "strikethrough":
_8f4=isSupportedBy(_8ee|ie|_8f0|_8f1);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
_8f4=isSupportedBy(ie);
break;
case "cut":
case "copy":
case "paste":
_8f4=isSupportedBy(ie|_8ee|_8f1);
break;
case "inserttable":
_8f4=isSupportedBy(_8ee|(this.object?ie:0));
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_8f4=isSupportedBy(this.object?ie:0);
break;
default:
return false;
}
return (dojo.render.html.ie&&_8f4.ie)||(dojo.render.html.mozilla&&_8f4.mozilla)||(dojo.render.html.safari&&_8f4.safari)||(_8f2&&_8f4.safari420)||(dojo.render.html.opera&&_8f4.opera);
},execCommand:function(_8f5,_8f6){
var _8f7;
this.focus();
_8f5=this._normalizeCommand(_8f5);
if(_8f6!=undefined){
if(_8f5=="heading"){
throw new Error("unimplemented");
}else{
if(_8f5=="formatblock"){
if(this.object){
_8f6=this._native2LocalFormatNames[_8f6];
}else{
if(dojo.render.html.ie){
_8f6="<"+_8f6+">";
}
}
}
}
}
if(this.object){
switch(_8f5){
case "hilitecolor":
_8f5="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_8f5="set"+_8f5;
break;
case "formatblock":
_8f5="setblockformat";
}
if(_8f5=="strikethrough"){
_8f5="inserthtml";
var _8f8=this.document.selection.createRange();
if(!_8f8.htmlText){
return;
}
_8f6=_8f8.htmlText.strike();
}else{
if(_8f5=="inserthorizontalrule"){
_8f5="inserthtml";
_8f6="
";
}
}
if(_8f5=="inserthtml"){
var _8f8=this.document.selection.createRange();
if(this.document.selection.type.toUpperCase()=="CONTROL"){
for(var i=0;i<_8f8.length;i++){
_8f8.item(i).outerHTML=_8f6;
}
}else{
_8f8.pasteHTML(_8f6);
_8f8.select();
}
_8f7=true;
}else{
if(arguments.length==1){
_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt);
}else{
_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt,_8f6);
}
}
}else{
if(_8f5=="inserthtml"){
if(dojo.render.html.ie){
var _8fa=this.document.selection.createRange();
_8fa.pasteHTML(_8f6);
_8fa.select();
return true;
}else{
return this.document.execCommand(_8f5,false,_8f6);
}
}else{
if((_8f5=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){
var _8fb=this.window.getSelection();
var _8fc=_8fb.getRangeAt(0);
var _8fd=_8fc.startContainer;
var _8fe=_8fc.startOffset;
var _8ff=_8fc.endContainer;
var _900=_8fc.endOffset;
var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]);
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]);
_8f7=this.document.execCommand("unlink",false,null);
var _8fc=this.document.createRange();
_8fc.setStart(_8fd,_8fe);
_8fc.setEnd(_8ff,_900);
_8fb.removeAllRanges();
_8fb.addRange(_8fc);
return _8f7;
}else{
if((_8f5=="hilitecolor")&&(dojo.render.html.mozilla)){
this.document.execCommand("useCSS",false,false);
_8f7=this.document.execCommand(_8f5,false,_8f6);
this.document.execCommand("useCSS",false,true);
}else{
if((dojo.render.html.ie)&&((_8f5=="backcolor")||(_8f5=="forecolor"))){
_8f6=arguments.length>1?_8f6:null;
_8f7=this.document.execCommand(_8f5,false,_8f6);
}else{
_8f6=arguments.length>1?_8f6:null;
if(_8f6||_8f5!="createlink"){
_8f7=this.document.execCommand(_8f5,false,_8f6);
}
}
}
}
}
}
this.onDisplayChanged();
return _8f7;
},queryCommandEnabled:function(_902){
_902=this._normalizeCommand(_902);
if(this.object){
switch(_902){
case "hilitecolor":
_902="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_902="set"+_902;
break;
case "formatblock":
_902="setblockformat";
break;
case "strikethrough":
_902="bold";
break;
case "inserthorizontalrule":
return true;
}
if(typeof this._activeX.command[_902]=="undefined"){
return false;
}
var _903=this.object.QueryStatus(this._activeX.command[_902]);
return ((_903!=this._activeX.status.notsupported)&&(_903!=this._activeX.status.disabled));
}else{
if(dojo.render.html.mozilla){
if(_902=="unlink"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]);
}else{
if(_902=="inserttable"){
return true;
}
}
}
var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_902);
}
},queryCommandState:function(_905){
_905=this._normalizeCommand(_905);
if(this.object){
if(_905=="forecolor"){
_905="setforecolor";
}else{
if(_905=="backcolor"){
_905="setbackcolor";
}else{
if(_905=="strikethrough"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]);
}else{
if(_905=="inserthorizontalrule"){
return false;
}
}
}
}
if(typeof this._activeX.command[_905]=="undefined"){
return null;
}
var _906=this.object.QueryStatus(this._activeX.command[_905]);
return ((_906==this._activeX.status.latched)||(_906==this._activeX.status.ninched));
}else{
return this.document.queryCommandState(_905);
}
},queryCommandValue:function(_907){
_907=this._normalizeCommand(_907);
if(this.object){
switch(_907){
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_907="get"+_907;
return this.object.execCommand(this._activeX.command[_907],this._activeX.ui.noprompt);
case "formatblock":
var _908=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt);
if(_908){
return this._local2NativeFormatNames[_908];
}
}
}else{
if(dojo.render.html.ie&&_907=="formatblock"){
return this._local2NativeFormatNames[this.document.queryCommandValue(_907)]||this.document.queryCommandValue(_907);
}
return this.document.queryCommandValue(_907);
}
},placeCursorAtStart:function(){
this.focus();
if(dojo.render.html.moz&&this.editNode.firstChild&&this.editNode.firstChild.nodeType!=dojo.dom.TEXT_NODE){
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.firstChild]);
}else{
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]);
}
dojo.withGlobal(this.window,"collapse",dojo.html.selection,[true]);
},placeCursorAtEnd:function(){
this.focus();
if(dojo.render.html.moz&&this.editNode.lastChild&&this.editNode.lastChild.nodeType!=dojo.dom.TEXT_NODE){
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.lastChild]);
}else{
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]);
}
dojo.withGlobal(this.window,"collapse",dojo.html.selection,[false]);
},replaceEditorContent:function(html){
html=this._preFilterContent(html);
if(this.isClosed){
this.domNode.innerHTML=html;
}else{
if(this.window&&this.window.getSelection&&!dojo.render.html.moz){
this.editNode.innerHTML=html;
}else{
if((this.window&&this.window.getSelection)||(this.document&&this.document.selection)){
this.execCommand("selectall");
if(dojo.render.html.moz&&!html){
html=" ";
}
this.execCommand("inserthtml",html);
}
}
}
},_preFilterContent:function(html){
var ec=html;
dojo.lang.forEach(this.contentPreFilters,function(ef){
ec=ef(ec);
});
if(this.contentDomPreFilters.length>0){
var dom=dojo.doc().createElement("div");
dom.style.display="none";
dojo.body().appendChild(dom);
dom.innerHTML=ec;
dojo.lang.forEach(this.contentDomPreFilters,function(ef){
dom=ef(dom);
});
ec=dom.innerHTML;
dojo.body().removeChild(dom);
}
return ec;
},_postFilterContent:function(html){
var ec=html;
if(this.contentDomPostFilters.length>0){
var dom=this.document.createElement("div");
dom.innerHTML=ec;
dojo.lang.forEach(this.contentDomPostFilters,function(ef){
dom=ef(dom);
});
ec=dom.innerHTML;
}
dojo.lang.forEach(this.contentPostFilters,function(ef){
ec=ef(ec);
});
return ec;
},_lastHeight:0,_updateHeight:function(){
if(!this.isLoaded){
return;
}
if(this.height){
return;
}
var _914=dojo.html.getBorderBox(this.editNode).height;
if(!_914){
_914=dojo.html.getBorderBox(this.document.body).height;
}
if(_914==0){
dojo.debug("Can not figure out the height of the editing area!");
return;
}
this._lastHeight=_914;
this.editorObject.style.height=this._lastHeight+"px";
this.window.scrollTo(0,0);
},_saveContent:function(e){
var _916=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
_916.value+=this._SEPARATOR+this.saveName+":"+this.getEditorContent();
},getEditorContent:function(){
var ec="";
try{
ec=(this._content.length>0)?this._content:this.editNode.innerHTML;
if(dojo.string.trim(ec)==" "){
ec="";
}
}
catch(e){
}
if(dojo.render.html.ie&&!this.object){
var re=new RegExp("(?:
[\n\r]*)+$","i");
ec=ec.replace(re,"");
}
ec=this._postFilterContent(ec);
if(this.relativeImageUrls){
var _919=dojo.global().location.protocol+"//"+dojo.global().location.host;
var _91a=dojo.global().location.pathname;
if(_91a.match(/\/$/)){
}else{
var _91b=_91a.split("/");
if(_91b.length){
_91b.pop();
}
_91a=_91b.join("/")+"/";
}
var _91c=new RegExp("(
![]()
]* src=[\"'])("+_919+"("+_91a+")?)","ig");
ec=ec.replace(_91c,"$1");
}
return ec;
},close:function(save,_91e){
if(this.isClosed){
return false;
}
if(arguments.length==0){
save=true;
}
this._content=this._postFilterContent(this.editNode.innerHTML);
var _91f=(this.savedContent!=this._content);
if(this.interval){
clearInterval(this.interval);
}
if(dojo.render.html.ie&&!this.object){
dojo.event.browser.clean(this.editNode);
}
if(this.iframe){
delete this.iframe;
}
if(this.textarea){
with(this.textarea.style){
position="";
left=top="";
if(dojo.render.html.ie){
overflow=this.__overflow;
this.__overflow=null;
}
}
if(save){
this.textarea.value=this._content;
}else{
this.textarea.value=this.savedContent;
}
dojo.html.removeNode(this.domNode);
this.domNode=this.textarea;
}else{
if(save){
if(dojo.render.html.moz){
var nc=dojo.doc().createElement("span");
this.domNode.appendChild(nc);
nc.innerHTML=this.editNode.innerHTML;
}else{
this.domNode.innerHTML=this._content;
}
}else{
this.domNode.innerHTML=this.savedContent;
}
}
dojo.html.removeClass(this.domNode,"RichTextEditable");
this.isClosed=true;
this.isLoaded=false;
delete this.editNode;
if(this.window._frameElement){
this.window._frameElement=null;
}
this.window=null;
this.document=null;
this.object=null;
this.editingArea=null;
this.editorObject=null;
return _91f;
},destroyRendering:function(){
},destroy:function(){
this.destroyRendering();
if(!this.isClosed){
this.close(false);
}
dojo.widget.RichText.superclass.destroy.call(this);
},connect:function(_921,_922,_923){
dojo.event.connect(_921,_922,this,_923);
},disconnect:function(_924,_925,_926){
dojo.event.disconnect(_924,_925,this,_926);
},disconnectAllWithRoot:function(_927){
dojo.deprecated("disconnectAllWithRoot","is deprecated. No need to disconnect manually","0.5");
},_fixContentForMoz:function(html){
html=html.replace(/
])/gi,"/gi,"");
html=html.replace(/])/gi,"/gi,"");
return html;
}});
dojo.provide("dojo.lang.type");
dojo.lang.whatAmI=function(_929){
dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");
return dojo.lang.getType(_929);
};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_92a){
try{
if(dojo.lang.isArray(_92a)){
return "array";
}
if(dojo.lang.isFunction(_92a)){
return "function";
}
if(dojo.lang.isString(_92a)){
return "string";
}
if(dojo.lang.isNumber(_92a)){
return "number";
}
if(dojo.lang.isBoolean(_92a)){
return "boolean";
}
if(dojo.lang.isAlien(_92a)){
return "alien";
}
if(dojo.lang.isUndefined(_92a)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_92a)){
return name;
}
}
if(dojo.lang.isObject(_92a)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_92c){
return (!isNaN(_92c)&&isFinite(_92c)&&(_92c!=null)&&!dojo.lang.isBoolean(_92c)&&!dojo.lang.isArray(_92c)&&!/^\s*$/.test(_92c));
};
dojo.lang.isBuiltIn=function(_92d){
return (dojo.lang.isArray(_92d)||dojo.lang.isFunction(_92d)||dojo.lang.isString(_92d)||dojo.lang.isNumber(_92d)||dojo.lang.isBoolean(_92d)||(_92d==null)||(_92d instanceof Error)||(typeof _92d=="error"));
};
dojo.lang.isPureObject=function(_92e){
return ((_92e!=null)&&dojo.lang.isObject(_92e)&&_92e.constructor==Object);
};
dojo.lang.isOfType=function(_92f,type,_931){
var _932=false;
if(_931){
_932=_931["optional"];
}
if(_932&&((_92f===null)||dojo.lang.isUndefined(_92f))){
return true;
}
if(dojo.lang.isArray(type)){
var _933=type;
for(var i in _933){
var _935=_933[i];
if(dojo.lang.isOfType(_92f,_935)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_92f);
case Function:
case "function":
return dojo.lang.isFunction(_92f);
case String:
case "string":
return dojo.lang.isString(_92f);
case Number:
case "number":
return dojo.lang.isNumber(_92f);
case "numeric":
return dojo.lang.isNumeric(_92f);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_92f);
case Object:
case "object":
return dojo.lang.isObject(_92f);
case "pureobject":
return dojo.lang.isPureObject(_92f);
case "builtin":
return dojo.lang.isBuiltIn(_92f);
case "alien":
return dojo.lang.isAlien(_92f);
case "undefined":
return dojo.lang.isUndefined(_92f);
case null:
case "null":
return (_92f===null);
case "optional":
dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5");
return ((_92f===null)||dojo.lang.isUndefined(_92f));
default:
if(dojo.lang.isFunction(type)){
return (_92f instanceof type);
}else{
dojo.raise("dojo.lang.isOfType() was passed an invalid type");
}
}
}
dojo.raise("If we get here, it means a bug was introduced above.");
};
dojo.lang.getObject=function(str){
var _937=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_937[i++]];
}while(i<_937.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _93b=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_93b[i++]];
}while(i<_93b.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_93e,_93f){
if(!_93e){
var _940="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_93f){
_940+="Here's the assert message:\n"+_93f+"\n";
}
throw new Error(_940);
}
};
dojo.lang.assertType=function(_941,type,_943){
if(dojo.lang.isString(_943)){
dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5");
}
if(!dojo.lang.isOfType(_941,type,_943)){
if(!dojo.lang.assertType._errorMessage){
dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed.";
}
dojo.lang.assert(false,dojo.lang.assertType._errorMessage);
}
};
dojo.lang.assertValidKeywords=function(_944,_945,_946){
var key;
if(!_946){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_946=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_945)){
for(key in _944){
if(!dojo.lang.inArray(_945,key)){
dojo.lang.assert(false,_946+" "+key);
}
}
}else{
for(key in _944){
if(!(key in _945)){
dojo.lang.assert(false,_946+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_948){
this.pairs=[];
this.returnWrappers=_948||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_94a,wrap,_94c,_94d){
var type=(_94d)?"unshift":"push";
this.pairs[type]([name,_94a,wrap,_94c]);
},match:function(){
for(var i=0;i";
this.iframe=dojo.doc().createElement(html);
this.iframe.tabIndex=-1;
if(node){
node.appendChild(this.iframe);
this.domNode=node;
}else{
dojo.body().appendChild(this.iframe);
this.iframe.style.display="none";
}
}
};
dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){
if(this.iframe&&this.domNode&&this.domNode.parentNode){
var _963=dojo.html.getMarginBox(this.domNode);
if(_963.width==0||_963.height==0){
dojo.lang.setTimeout(this,this.onResized,100);
return;
}
this.iframe.style.width=_963.width+"px";
this.iframe.style.height=_963.height+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
var _965=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
with(this.iframe.style){
width=_965.width+"px";
height=_965.height+"px";
left=_965.left+"px";
top=_965.top+"px";
}
},setZIndex:function(node){
if(!this.iframe){
return;
}
if(dojo.dom.isNode(node)){
this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;
}else{
if(!isNaN(node)){
this.iframe.style.zIndex=node;
}
}
},show:function(){
if(this.iframe){
this.iframe.style.display="block";
}
},hide:function(){
if(this.iframe){
this.iframe.style.display="none";
}
},remove:function(){
if(this.iframe){
dojo.html.removeNode(this.iframe,true);
delete this.iframe;
this.iframe=null;
}
}});
dojo.provide("dojo.widget.PopupContainer");
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
this.queueOnAnimationFinish=[];
},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){
return false;
},applyPopupBasicStyle:function(){
with(this.domNode.style){
display="none";
position="absolute";
}
},aboutToShow:function(){
},open:function(x,y,_96a,_96b,_96c,_96d){
if(this.isShowingNow){
return;
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.open,arguments);
return;
}
this.aboutToShow();
var _96e=false,node,_970;
if(typeof x=="object"){
node=x;
_970=_96b;
_96b=_96a;
_96a=y;
_96e=true;
}
this.parent=_96a;
dojo.body().appendChild(this.domNode);
_96b=_96b||_96a["domNode"]||[];
var _971=null;
this.isTopLevel=true;
while(_96a){
if(_96a!==this&&(_96a.setOpenedSubpopup!=undefined&&_96a.applyPopupBasicStyle!=undefined)){
_971=_96a;
this.isTopLevel=false;
_971.setOpenedSubpopup(this);
break;
}
_96a=_96a.parent;
}
this.parentPopup=_971;
this.popupIndex=_971?_971.popupIndex+1:1;
if(this.isTopLevel){
var _972=dojo.html.isNode(_96b)?_96b:null;
dojo.widget.PopupManager.opened(this,_972);
}
if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark);
}else{
this._bookmark=null;
}
if(_96b instanceof Array){
_96b={left:_96b[0],top:_96b[1],width:0,height:0};
}
with(this.domNode.style){
display="";
zIndex=this.beginZIndex+this.popupIndex;
}
if(_96e){
this.move(node,_96d,_970);
}else{
this.move(x,y,_96d,_96c);
}
this.domNode.style.display="none";
this.explodeSrc=_96b;
this.show();
this.isShowingNow=true;
},move:function(x,y,_975,_976){
var _977=(typeof x=="object");
if(_977){
var _978=_975;
var node=x;
_975=y;
if(!_978){
_978={"BL":"TL","TL":"BL"};
}
dojo.html.placeOnScreenAroundElement(this.domNode,node,_975,this.aroundBox,_978);
}else{
if(!_976){
_976="TL,TR,BL,BR";
}
dojo.html.placeOnScreen(this.domNode,x,y,_975,true,_976);
}
},close:function(_97a){
if(_97a){
this.domNode.style.display="none";
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.close,[]);
return;
}
this.closeSubpopup(_97a);
this.hide();
if(this.bgIframe){
this.bgIframe.hide();
this.bgIframe.size({left:0,top:0,width:0,height:0});
}
if(this.isTopLevel){
dojo.widget.PopupManager.closed(this);
}
this.isShowingNow=false;
if(this.parent){
setTimeout(dojo.lang.hitch(this,function(){
try{
if(this.parent["focus"]){
this.parent.focus();
}else{
this.parent.domNode.focus();
}
}
catch(e){
dojo.debug("No idea how to focus to parent",e);
}
}),10);
}
if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
if(this.openedForWindow){
this.openedForWindow.focus();
}
try{
dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
}
catch(e){
}
}
this._bookmark=null;
},closeAll:function(_97b){
if(this.parentPopup){
this.parentPopup.closeAll(_97b);
}else{
this.close(_97b);
}
},setOpenedSubpopup:function(_97c){
this.currentSubpopup=_97c;
},closeSubpopup:function(_97d){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_97d);
this.currentSubpopup=null;
},onShow:function(){
dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
if(dojo.render.html.ie){
if(!this.bgIframe){
this.bgIframe=new dojo.html.BackgroundIframe();
this.bgIframe.setZIndex(this.domNode);
}
this.bgIframe.size(this.domNode);
this.bgIframe.show();
}
this.processQueue();
},processQueue:function(){
if(!this.queueOnAnimationFinish.length){
return;
}
var func=this.queueOnAnimationFinish.shift();
var args=this.queueOnAnimationFinish.shift();
func.apply(this,args);
},onHide:function(){
dojo.widget.HtmlWidget.prototype.onHide.call(this);
if(this.openedSize){
with(this.domNode.style){
width=this.openedSize.w;
height=this.openedSize.h;
}
}
this.processQueue();
}});
dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{isContainer:true,fillInTemplate:function(){
this.applyPopupBasicStyle();
dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments);
}});
dojo.widget.PopupManager=new function(){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
this.focusNode=null;
this.registeredWindows=[];
this.registerWin=function(win){
if(!win.__PopupManagerRegistered){
dojo.event.connect(win.document,"onmousedown",this,"onClick");
dojo.event.connect(win,"onscroll",this,"onClick");
dojo.event.connect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=true;
this.registeredWindows.push(win);
}
};
this.registerAllWindows=function(_981){
if(!_981){
_981=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
}
this.registerWin(_981);
for(var i=0;i<_981.frames.length;i++){
try{
var win=dojo.html.getDocumentWindow(_981.frames[i].document);
if(win){
this.registerAllWindows(win);
}
}
catch(e){
}
}
};
this.unRegisterWin=function(win){
if(win.__PopupManagerRegistered){
dojo.event.disconnect(win.document,"onmousedown",this,"onClick");
dojo.event.disconnect(win,"onscroll",this,"onClick");
dojo.event.disconnect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=false;
}
};
this.unRegisterAllWindows=function(){
for(var i=0;i]*>([\s\S]*?)<\/title>/i;
while(_9c6=_9d0.exec(s)){
_9c3.push(_9c6[1]);
s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length);
}
if(this.adjustPaths){
var _9d1=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _9d2=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _9d3=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_9d1.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_9cd="";
while(attr=_9d2.exec(tag)){
path="";
_9cf=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_9d3.exec(_9cf)){
path=_9cf;
}else{
path=(new dojo.uri.Uri(url,_9cf).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_9cf,url);
break;
default:
path=_9cf;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_9cd+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_9cd+tag;
}
s=str+s;
}
_9d0=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_9c6=_9d0.exec(s)){
if(_9c6[1]&&_9c6[1].toLowerCase()=="style"){
_9c9.push(dojo.html.fixPathsInCssText(_9c6[2],url));
}else{
if(attr=_9c6[3].match(/href=(['"]?)([^'">]*)\1/i)){
_9c9.push({path:attr[2]});
}
}
s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length);
}
var _9d0=/");
}
this._detectVersion();
this._detectCommunicationVersion();
};
dojo.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,commVersion:6,installing:false,isVersionOrAbove:function(_31c,_31d,_31e){
_31e=parseFloat("."+_31e);
if(this.versionMajor>=_31c&&this.versionMinor>=_31d&&this.versionRevision>=_31e){
return true;
}else{
return false;
}
},_detectVersion:function(){
var _31f;
for(var _320=25;_320>0;_320--){
if(dojo.render.html.ie){
_31f=VBGetSwfVer(_320);
}else{
_31f=this._JSFlashInfo(_320);
}
if(_31f==-1){
this.capable=false;
return;
}else{
if(_31f!=0){
var _321;
if(dojo.render.html.ie){
var _322=_31f.split(" ");
var _323=_322[1];
_321=_323.split(",");
}else{
_321=_31f.split(".");
}
this.versionMajor=_321[0];
this.versionMinor=_321[1];
this.versionRevision=_321[2];
var _324=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(_324);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_325){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _326=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _327=navigator.plugins["Shockwave Flash"+_326].description;
var _328=_327.split(" ");
var _329=_328[2].split(".");
var _32a=_329[0];
var _32b=_329[1];
if(_328[3]!=""){
var _32c=_328[3].split("r");
}else{
var _32c=_328[4].split("r");
}
var _32d=_32c[1]>0?_32c[1]:0;
var _32e=_32a+"."+_32b+"."+_32d;
return _32e;
}
}
return -1;
},_detectCommunicationVersion:function(){
if(this.capable==false){
this.commVersion=null;
return;
}
if(typeof djConfig["forceFlashComm"]!="undefined"&&typeof djConfig["forceFlashComm"]!=null){
this.commVersion=djConfig["forceFlashComm"];
return;
}
if(dojo.render.html.safari==true||dojo.render.html.opera==true){
this.commVersion=8;
}else{
this.commVersion=6;
}
}};
dojo.flash.Embed=function(_32f){
this._visible=_32f;
};
dojo.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){
switch(window.location.protocol){
case "https:":
return "https";
break;
default:
return "http";
break;
}
},write:function(_330,_331){
if(dojo.lang.isUndefined(_331)){
_331=false;
}
var _332=new dojo.string.Builder();
_332.append("width: "+this.width+"px; ");
_332.append("height: "+this.height+"px; ");
if(this._visible==false){
_332.append("position: absolute; ");
_332.append("z-index: 10000; ");
_332.append("top: -1000px; ");
_332.append("left: -1000px; ");
}
_332=_332.toString();
var _333;
var _334;
if(_330==6){
_334=dojo.flash.flash6_version;
var _335=djConfig.baseRelativePath;
_334=_334+"?baseRelativePath="+escape(_335);
_333="