/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.date.stamp"]){
dojo._hasResource["dojo.date.stamp"]=true;
dojo.provide("dojo.date.stamp");
dojo.date.stamp.fromISOString=function(_1,_2){
if(!dojo.date.stamp._isoRegExp){
dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
}
var _3=dojo.date.stamp._isoRegExp.exec(_1),_4=null;
if(_3){
_3.shift();
if(_3[1]){
_3[1]--;
}
if(_3[6]){
_3[6]*=1000;
}
if(_2){
_2=new Date(_2);
dojo.forEach(dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_5){
return _2["get"+_5]();
}),function(_6,_7){
_3[_7]=_3[_7]||_6;
});
}
_4=new Date(_3[0]||1970,_3[1]||0,_3[2]||1,_3[3]||0,_3[4]||0,_3[5]||0,_3[6]||0);
if(_3[0]<100){
_4.setFullYear(_3[0]||1970);
}
var _8=0,_9=_3[7]&&_3[7].charAt(0);
if(_9!="Z"){
_8=((_3[8]||0)*60)+(Number(_3[9])||0);
if(_9!="-"){
_8*=-1;
}
}
if(_9){
_8-=_4.getTimezoneOffset();
}
if(_8){
_4.setTime(_4.getTime()+_8*60000);
}
}
return _4;
};
dojo.date.stamp.toISOString=function(_a,_b){
var _c=function(n){
return (n<10)?"0"+n:n;
};
_b=_b||{};
var _d=[],_e=_b.zulu?"getUTC":"get",_f="";
if(_b.selector!="time"){
var _10=_a[_e+"FullYear"]();
_f=["0000".substr((_10+"").length)+_10,_c(_a[_e+"Month"]()+1),_c(_a[_e+"Date"]())].join("-");
}
_d.push(_f);
if(_b.selector!="date"){
var _11=[_c(_a[_e+"Hours"]()),_c(_a[_e+"Minutes"]()),_c(_a[_e+"Seconds"]())].join(":");
var _12=_a[_e+"Milliseconds"]();
if(_b.milliseconds){
_11+="."+(_12<100?"0":"")+_c(_12);
}
if(_b.zulu){
_11+="Z";
}else{
if(_b.selector!="time"){
var _13=_a.getTimezoneOffset();
var _14=Math.abs(_13);
_11+=(_13>0?"-":"+")+_c(Math.floor(_14/60))+":"+_c(_14%60);
}
}
_d.push(_11);
}
return _d.join("T");
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");

new Date("X");
dojo.parser=new function(){
var d=dojo;
this._attrName=d._scopeName+"Type";
this._query="["+this._attrName+"]";
function _1(_2){
if(d.isString(_2)){
return "string";
}
if(typeof _2=="number"){
return "number";
}
if(typeof _2=="boolean"){
return "boolean";
}
if(d.isFunction(_2)){
return "function";
}
if(d.isArray(_2)){
return "array";
}
if(_2 instanceof Date){
return "date";
}
if(_2 instanceof d._Url){
return "url";
}
return "object";
};
function _3(_4,_5){
switch(_5){
case "string":
return _4;
case "number":
return _4.length?Number(_4):NaN;
case "boolean":
return typeof _4=="boolean"?_4:!(_4.toLowerCase()=="false");
case "function":
if(d.isFunction(_4)){
_4=_4.toString();
_4=d.trim(_4.substring(_4.indexOf("{")+1,_4.length-1));
}
try{
if(_4===""||_4.search(/[^\w\.]+/i)!=-1){
return new Function(_4);
}else{
return d.getObject(_4,false)||new Function(_4);
}
}
catch(e){
return new Function();
}
case "array":
return _4?_4.split(/\s*,\s*/):[];
case "date":
switch(_4){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_4);
}
case "url":
return d.baseUrl+_4;
default:
return d.fromJson(_4);
}
};
var _6={};
dojo.connect(dojo,"extend",function(){
_6={};
});
function _7(_8){
if(!_6[_8]){
var _9=d.getObject(_8);
if(!_9){
return null;
}
var _a=_9.prototype;
var _b={},_c={};
for(var _d in _a){
if(_d.charAt(0)=="_"){
continue;
}
if(_d in _c){
continue;
}
var _e=_a[_d];
_b[_d]=_1(_e);
}
_6[_8]={cls:_9,params:_b};
}
return _6[_8];
};
this._functionFromScript=function(_f){
var _10="";
var _11="";
var _12=_f.getAttribute("args");
if(_12){
d.forEach(_12.split(/\s*,\s*/),function(_13,idx){
_10+="var "+_13+" = arguments["+idx+"]; ";
});
}
var _14=_f.getAttribute("with");
if(_14&&_14.length){
d.forEach(_14.split(/\s*,\s*/),function(_15){
_10+="with("+_15+"){";
_11+="}";
});
}
return new Function(_10+_f.innerHTML+_11);
};
this.instantiate=function(_16,_17,_18){
var _19=[],dp=dojo.parser;
_17=_17||{};
_18=_18||{};
d.forEach(_16,function(obj){
if(!obj){
return;
}
var _1a,_1b,_1c,_1d,_1e;
if(obj.node){
_1a=obj.node;
_1b=obj.type;
_1c=obj.clsInfo||(_1b&&_7(_1b));
_1d=_1c&&_1c.cls;
_1e=obj.scripts;
}else{
_1a=obj;
_1b=dp._attrName in _17?_17[dp._attrName]:_1a.getAttribute(dp._attrName);
_1c=_1b&&_7(_1b);
_1d=_1c&&_1c.cls;
_1e=(_1d&&(_1d._noScript||_1d.prototype._noScript)?[]:d.query("> script[type^='dojo/']",_1a));
}
if(!_1c){
throw new Error("Could not load class '"+_1b);
}
var _1f={},_20=_1a.attributes;
if(_18.defaults){
dojo.mixin(_1f,_18.defaults);
}
if(obj.inherited){
dojo.mixin(_1f,obj.inherited);
}
for(var _21 in _1c.params){
var _22=_21 in _17?{value:_17[_21],specified:true}:_20.getNamedItem(_21);
if(!_22||(!_22.specified&&(!dojo.isIE||_21.toLowerCase()!="value"))){
continue;
}
var _23=_22.value;
switch(_21){
case "class":
_23="className" in _17?_17.className:_1a.className;
break;
case "style":
_23="style" in _17?_17.style:(_1a.style&&_1a.style.cssText);
}
var _24=_1c.params[_21];
if(typeof _23=="string"){
_1f[_21]=_3(_23,_24);
}else{
_1f[_21]=_23;
}
}
var _25=[],_26=[];
d.forEach(_1e,function(_27){
_1a.removeChild(_27);
var _28=_27.getAttribute("event"),_1b=_27.getAttribute("type"),nf=d.parser._functionFromScript(_27);
if(_28){
if(_1b=="dojo/connect"){
_25.push({event:_28,func:nf});
}else{
_1f[_28]=nf;
}
}else{
_26.push(nf);
}
});
var _29=_1d.markupFactory||_1d.prototype&&_1d.prototype.markupFactory;
var _2a=_29?_29(_1f,_1a,_1d):new _1d(_1f,_1a);
_19.push(_2a);
var _2b=_1a.getAttribute("jsId");
if(_2b){
d.setObject(_2b,_2a);
}
d.forEach(_25,function(_2c){
d.connect(_2a,_2c.event,null,_2c.func);
});
d.forEach(_26,function(_2d){
_2d.call(_2a);
});
});
if(!_17._started){
d.forEach(_19,function(_2e){
if(!_18.noStart&&_2e&&_2e.startup&&!_2e._started&&(!_2e.getParent||!_2e.getParent())){
_2e.startup();
}
});
}
return _19;
};
this.parse=function(_2f,_30){
var _31;
if(!_30&&_2f&&_2f.rootNode){
_30=_2f;
_31=_30.rootNode;
}else{
_31=_2f;
}
var _32=this._attrName;
function _33(_34,_35){
var _36=dojo.clone(_34.inherited);
dojo.forEach(["dir","lang"],function(_37){
var val=_34.node.getAttribute(_37);
if(val){
_36[_37]=val;
}
});
var _38=_34.scripts;
var _39=!_34.clsInfo||!_34.clsInfo.cls.prototype.stopParser;
for(var _3a=_34.node.firstChild;_3a;_3a=_3a.nextSibling){
if(_3a.nodeType==1){
var _3b=_39&&_3a.getAttribute(_32);
if(_3b){
var _3c={"type":_3b,clsInfo:_7(_3b),node:_3a,scripts:[],inherited:_36};
_35.push(_3c);
_33(_3c,_35);
}else{
if(_38&&_3a.nodeName.toLowerCase()=="script"){
_3b=_3a.getAttribute("type");
if(_3b&&/^dojo\//i.test(_3b)){
_38.push(_3a);
}
}else{
if(_39){
_33({node:_3a,inherited:_36},_35);
}
}
}
}
}
};
var _3d=[];
_33({node:_31?dojo.byId(_31):dojo.body(),inherited:(_30&&_30.inherited)||{dir:dojo._isBodyLtr()?"ltr":"rtl"}},_3d);
return this.instantiate(_3d,null,_30);
};
}();
(function(){
var _3e=function(){
if(dojo.config.parseOnLoad){
dojo.parser.parse();
}
};
if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){
dojo._loaders.splice(1,0,_3e);
}else{
dojo._loaders.unshift(_3e);
}
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_1,_2,_3){
_3=dojo.i18n.normalizeLocale(_3);
var _4=_3.split("-");
var _5=[_1,"nls",_2].join(".");
var _6=dojo._loadedModules[_5];
if(_6){
var _7;
for(var i=_4.length;i>0;i--){
var _8=_4.slice(0,i).join("_");
if(_6[_8]){
_7=_6[_8];
break;
}
}
if(!_7){
_7=_6.ROOT;
}
if(_7){
var _9=function(){
};
_9.prototype=_7;
return new _9();
}
}
throw new Error("Bundle not found: "+_2+" in "+_1+" , locale="+_3);
};
dojo.i18n.normalizeLocale=function(_a){
var _b=_a?_a.toLowerCase():dojo.locale;
if(_b=="root"){
_b="ROOT";
}
return _b;
};
dojo.i18n._requireLocalization=function(_c,_d,_e,_f){
var _10=dojo.i18n.normalizeLocale(_e);
var _11=[_c,"nls",_d].join(".");
var _12="";
if(_f){
var _13=_f.split(",");
for(var i=0;i<_13.length;i++){
if(_10["indexOf"](_13[i])==0){
if(_13[i].length>_12.length){
_12=_13[i];
}
}
}
if(!_12){
_12="ROOT";
}
}
var _14=_f?_12:_10;
var _15=dojo._loadedModules[_11];
var _16=null;
if(_15){
if(dojo.config.localizationComplete&&_15._built){
return;
}
var _17=_14.replace(/-/g,"_");
var _18=_11+"."+_17;
_16=dojo._loadedModules[_18];
}
if(!_16){
_15=dojo["provide"](_11);
var _19=dojo._getModuleSymbols(_c);
var _1a=_19.concat("nls").join("/");
var _1b;
dojo.i18n._searchLocalePath(_14,_f,function(loc){
var _1c=loc.replace(/-/g,"_");
var _1d=_11+"."+_1c;
var _1e=false;
if(!dojo._loadedModules[_1d]){
dojo["provide"](_1d);
var _1f=[_1a];
if(loc!="ROOT"){
_1f.push(loc);
}
_1f.push(_d);
var _20=_1f.join("/")+".js";
_1e=dojo._loadPath(_20,null,function(_21){
var _22=function(){
};
_22.prototype=_1b;
_15[_1c]=new _22();
for(var j in _21){
_15[_1c][j]=_21[j];
}
});
}else{
_1e=true;
}
if(_1e&&_15[_1c]){
_1b=_15[_1c];
}else{
_15[_1c]=_1b;
}
if(_f){
return true;
}
});
}
if(_f&&_10!=_12){
_15[_10.replace(/-/g,"_")]=_15[_12.replace(/-/g,"_")];
}
};
(function(){
var _23=dojo.config.extraLocale;
if(_23){
if(!_23 instanceof Array){
_23=[_23];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_24,_25){
req(m,b,_24,_25);
if(_24){
return;
}
for(var i=0;i<_23.length;i++){
req(m,b,_23[i],_25);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_26,_27,_28){
_26=dojo.i18n.normalizeLocale(_26);
var _29=_26.split("-");
var _2a=[];
for(var i=_29.length;i>0;i--){
_2a.push(_29.slice(0,i).join("-"));
}
_2a.push(false);
if(_27){
_2a.reverse();
}
for(var j=_2a.length-1;j>=0;j--){
var loc=_2a[j]||"ROOT";
var _2b=_28(loc);
if(_2b){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_2c,_2d){
function _2e(_2f){
_2f=dojo.i18n.normalizeLocale(_2f);
dojo.i18n._searchLocalePath(_2f,true,function(loc){
for(var i=0;i<_2d.length;i++){
if(_2d[i]==loc){
dojo["require"](_2c+"_"+loc);
return true;
}
}
return false;
});
};
_2e();
var _30=dojo.config.extraLocale||[];
for(var i=0;i<_30.length;i++){
_2e(_30[i]);
}
};
}
;dojo.provide("x2sky.x2sky");dojo.setObject("x2sky.util",{adjustTextNodeWidth:function(f,e){if(e){this.adjustTextNodeToMinWidth(f,e);return}if(!f._actualValue){f._actualValue=f.innerHTML}var b=f._actualValue;if(!f.title){f.title=b}f.innerHTML=b;var g=f.offsetHeight;f.innerHTML="&nbsp;";var d=f.offsetHeight;if(!f._actualValue){dojo.style(f,{height:d+"px",overflow:"hidden"});console.debug("fixed height")}f.innerHTML=b;if(d>=g){return}var a=b.length,c=3;while(f.offsetHeight>d){f.innerHTML=b.substring(0,a-c)+"...";c++}},adjustTextNodeToMinWidth:function(f,e){var d=e;var b=f.innerHTML;f.title=b;var a=b.length,c=3;while(f.offsetWidth>d){f.innerHTML=b.substring(0,a-c)+"...";c++}},toXml:function(g,c,a){var f=[];return b(g,c,a);function e(l,j,i){var m=[];i=i||"item";m.push("<",i," ",j,'type="object">');for(var k in l){m.push(b(l[k],k))}m.push("</",i,">");return m.join("")}function d(j){var i={"'":"&apos;",'"':"&quot;",">":"&gt;","<":"&lt;","&":"&amp;"};return j.replace("&amp;","&").replace(/['"><&]/g,function(k){return i[k]||""})}function h(j,k){var m=[];m.push("<item ",k,'type="array">');for(var l=0;l<j.length;l++){m.push(b(j[l]))}m.push("</item>");return m.join("")}function b(k,j,i){if(k===undefined){return""}j=j?('name="'+j+'" '):"";switch((typeof k).toLowerCase()){case"object":if(dojo.indexOf(f,k)>=0){throw"x2sky.toXml: Object reference loop detected: "+j}f.push(k);if(!dojo.isArray(k)){return e(k,j,i)}else{return h(k,j)}break;case"string":return"<item "+j+'type="string" >'+d(k)+"</item>";break;case"number":if(Math.floor(k)==k){return"<item "+j+'type="int" >'+k+"</item>"}else{return"<item "+j+'type="double" >'+k+"</item>"}break;case"boolean":return"<item "+j+'type="boolean" >'+k.toString().toLowerCase()+"</item>";break;case"function":break;default:throw new Exception("Unknow data type: "+k);break}}},timer:{_cache:{},start:function(a){if(!a){this.defaultTimer=(new Date()).getTime()}else{this._cache[a]=(new Date()).getTime()}},end:function(d,c,a){var b=d?this._cache[d]:this.defaultTimer;if(!a){console.debug((c||"")+": "+((new Date()).getTime()-b)+"ms")}},getTime:function(a){return(new Date()).getTime()-(a?this._cache[a]:this.defaultTimer)},trackFunction:function(c,b,d){c=c||window;var a=c[b];c[b]=function(){sce.test.timer.start();a.apply(c,arguments);sce.test.timer.end(false,d||('Function "'+b+'" run time'))}}},connectEnterKey:function(a,b){a.onEnterKey=b;if(!a._enterKeyEvent){dojo.connect(a,"onkeyup",function(d){if(d.keyCode!=dojo.keys.ENTER){dojo.attr(this,"oldValue",this.value);return}var c=dojo.attr(this,"oldValue");if(c!=null&&c!=this.value){dojo.attr(this,"oldValue",a.value);return}a.onEnterKey(d)});a._enterKeyEvent=true}},loadCss:function(d){if(!d){return}var c,b;var a=document.getElementsByTagName("link");for(b=0;b<a.length;b++){if(a[b].href&&a[b].href.indexOf(d)!=-1){return}}c=document.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=d;document.getElementsByTagName("head")[0].appendChild(c)},makeButtonBusy:function(a,b){dojo.attr(a,"oldLabel",a.value);dojo.addClass(a,"disabled-button");a.value=b;a.disabled=true},cancelButtonBusy:function(a){if(dojo.attr(a,"oldLabel")){a.value=dojo.attr(a,"oldLabel")}dojo.removeClass(a,"disabled-button");a.disabled=false},storeItemToObject:function(b,c){var a=b.getAttributes(c);var d={};dojo.forEach(a,function(e){d[e]=b.getValue(c,e)});return d},isDom:function(a){return a.tagName&&a.nodeType&&a.ownerDocument},mixinTipNode:function(c,b){function a(){dojo.removeClass(b,"hide");dojo.removeClass(b,"tip-success");dojo.removeClass(b,"tip-info");dojo.removeClass(b,"tip-warn");dojo.removeClass(b,"tip-error")}c.showSuccess=function(d){a(b);b.innerHTML=d;dojo.addClass(b,"tip-success")};c.showInfo=function(d){a(b);b.innerHTML=d;dojo.addClass(b,"tip-info")};c.showError=function(d){a(b);b.innerHTML=d;dojo.addClass(b,"tip-error")};c.showWarning=function(d){a(b);b.innerHTML=d;dojo.addClass(b,"tip-warning")};c.hideTip=function(){dojo.addClass(b,"hide")}}});if(!x2sky){x2sky={}}dojo.mixin(x2sky,x2sky.util);dojo.mixin(x2sky,{getCls:function(cls){dojo.require(cls);return eval(cls)},singleton:function(a){a.getInstance=function(){if(!a._instance_){a._instance_=new a()}return a._instance_}},async:function(a){window.setTimeout(a,0)}});x2sky.date={toUTCString:function(a){var c=a;var b=[c.getUTCFullYear(),c.getUTCMonth()+1,c.getUTCDate()].join("-")+" "+[c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds()].join(":");return b},fromUTC:function(a){var b=this.fromLocal(a);return new Date(b.getTime()-b.getTimezoneOffset()*60000)},fromLocal:function(dateString){var arr=dateString.split(" ");arr=arr[0].split("-").concat(arr[1].split(":"));arr=dojo.map(arr,function(n){return n.replace(/^0*/g,"")||0});arr[1]-=1;return eval("new Date("+arr.join(",")+");")}};;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.collections._base"]){
dojo._hasResource["dojox.collections._base"]=true;
dojo.provide("dojox.collections._base");
dojox.collections.DictionaryEntry=function(k,v){
this.key=k;
this.value=v;
this.valueOf=function(){
return this.value;
};
this.toString=function(){
return String(this.value);
};
};
dojox.collections.Iterator=function(_1){
var a=_1;
var _2=0;
this.element=a[_2]||null;
this.atEnd=function(){
return (_2>=a.length);
};
this.get=function(){
if(this.atEnd()){
return null;
}
this.element=a[_2++];
return this.element;
};
this.map=function(fn,_3){
return dojo.map(a,fn,_3);
};
this.reset=function(){
_2=0;
this.element=a[_2];
};
};
dojox.collections.DictionaryIterator=function(_4){
var a=[];
var _5={};
for(var p in _4){
if(!_5[p]){
a.push(_4[p]);
}
}
var _6=0;
this.element=a[_6]||null;
this.atEnd=function(){
return (_6>=a.length);
};
this.get=function(){
if(this.atEnd()){
return null;
}
this.element=a[_6++];
return this.element;
};
this.map=function(fn,_7){
return dojo.map(a,fn,_7);
};
this.reset=function(){
_6=0;
this.element=a[_6];
};
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.collections.ArrayList"]){
dojo._hasResource["dojox.collections.ArrayList"]=true;
dojo.provide("dojox.collections.ArrayList");

dojox.collections.ArrayList=function(_1){
var _2=[];
if(_1){
_2=_2.concat(_1);
}
this.count=_2.length;
this.add=function(_3){
_2.push(_3);
this.count=_2.length;
};
this.addRange=function(a){
if(a.getIterator){
var e=a.getIterator();
while(!e.atEnd()){
this.add(e.get());
}
this.count=_2.length;
}else{
for(var i=0;i<a.length;i++){
_2.push(a[i]);
}
this.count=_2.length;
}
};
this.clear=function(){
_2.splice(0,_2.length);
this.count=0;
};
this.clone=function(){
return new dojox.collections.ArrayList(_2);
};
this.contains=function(_4){
for(var i=0;i<_2.length;i++){
if(_2[i]==_4){
return true;
}
}
return false;
};
this.forEach=function(fn,_5){
dojo.forEach(_2,fn,_5);
};
this.getIterator=function(){
return new dojox.collections.Iterator(_2);
};
this.indexOf=function(_6){
for(var i=0;i<_2.length;i++){
if(_2[i]==_6){
return i;
}
}
return -1;
};
this.insert=function(i,_7){
_2.splice(i,0,_7);
this.count=_2.length;
};
this.item=function(i){
return _2[i];
};
this.remove=function(_8){
var i=this.indexOf(_8);
if(i>=0){
_2.splice(i,1);
}
this.count=_2.length;
};
this.removeAt=function(i){
_2.splice(i,1);
this.count=_2.length;
};
this.reverse=function(){
_2.reverse();
};
this.sort=function(fn){
if(fn){
_2.sort(fn);
}else{
_2.sort();
}
};
this.setByIndex=function(i,_9){
_2[i]=_9;
this.count=_2.length;
};
this.toArray=function(){
return [].concat(_2);
};
this.toString=function(_a){
return _2.join((_a||","));
};
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.collections.Queue"]){
dojo._hasResource["dojox.collections.Queue"]=true;
dojo.provide("dojox.collections.Queue");

dojox.collections.Queue=function(_1){
var q=[];
if(_1){
q=q.concat(_1);
}
this.count=q.length;
this.clear=function(){
q=[];
this.count=q.length;
};
this.clone=function(){
return new dojox.collections.Queue(q);
};
this.contains=function(o){
for(var i=0;i<q.length;i++){
if(q[i]==o){
return true;
}
}
return false;
};
this.copyTo=function(_2,i){
_2.splice(i,0,q);
};
this.dequeue=function(){
var r=q.shift();
this.count=q.length;
return r;
};
this.enqueue=function(o){
this.count=q.push(o);
};
this.forEach=function(fn,_3){
dojo.forEach(q,fn,_3);
};
this.getIterator=function(){
return new dojox.collections.Iterator(q);
};
this.peek=function(){
return q[0];
};
this.toArray=function(){
return [].concat(q);
};
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.io.script"]){
dojo._hasResource["dojo.io.script"]=true;
dojo.provide("dojo.io.script");
(function(){
var _1=dojo.isIE?"onreadystatechange":"load",_2=/complete|loaded/;
dojo.io.script={get:function(_3){
var _4=this._makeScriptDeferred(_3);
var _5=_4.ioArgs;
dojo._ioAddQueryToUrl(_5);
dojo._ioNotifyStart(_4);
if(this._canAttach(_5)){
var _6=this.attach(_5.id,_5.url,_3.frameDoc);
if(!_5.jsonp&&!_5.args.checkString){
var _7=dojo.connect(_6,_1,function(_8){
if(_8.type=="load"||_2.test(_6.readyState)){
dojo.disconnect(_7);
_5.scriptLoaded=_8;
}
});
}
}
dojo._ioWatch(_4,this._validCheck,this._ioCheck,this._resHandle);
return _4;
},attach:function(id,_9,_a){
var _b=(_a||dojo.doc);
var _c=_b.createElement("script");
_c.type="text/javascript";
_c.src=_9;
_c.id=id;
_c.charset="utf-8";
return _b.getElementsByTagName("head")[0].appendChild(_c);
},remove:function(id,_d){
dojo.destroy(dojo.byId(id,_d));
if(this["jsonp_"+id]){
delete this["jsonp_"+id];
}
},_makeScriptDeferred:function(_e){
var _f=dojo._ioSetArgs(_e,this._deferredCancel,this._deferredOk,this._deferredError);
var _10=_f.ioArgs;
_10.id=dojo._scopeName+"IoScript"+(this._counter++);
_10.canDelete=false;
_10.jsonp=_e.callbackParamName||_e.jsonp;
if(_10.jsonp){
_10.query=_10.query||"";
if(_10.query.length>0){
_10.query+="&";
}
_10.query+=_10.jsonp+"="+(_e.frameDoc?"parent.":"")+dojo._scopeName+".io.script.jsonp_"+_10.id+"._jsonpCallback";
_10.frameDoc=_e.frameDoc;
_10.canDelete=true;
_f._jsonpCallback=this._jsonpCallback;
this["jsonp_"+_10.id]=_f;
}
return _f;
},_deferredCancel:function(dfd){
dfd.canceled=true;
if(dfd.ioArgs.canDelete){
dojo.io.script._addDeadScript(dfd.ioArgs);
}
},_deferredOk:function(dfd){
var _11=dfd.ioArgs;
if(_11.canDelete){
dojo.io.script._addDeadScript(_11);
}
return _11.json||_11.scriptLoaded||_11;
},_deferredError:function(_12,dfd){
if(dfd.ioArgs.canDelete){
if(_12.dojoType=="timeout"){
dojo.io.script.remove(dfd.ioArgs.id,dfd.ioArgs.frameDoc);
}else{
dojo.io.script._addDeadScript(dfd.ioArgs);
}
}
return _12;
},_deadScripts:[],_counter:1,_addDeadScript:function(_13){
dojo.io.script._deadScripts.push({id:_13.id,frameDoc:_13.frameDoc});
_13.frameDoc=null;
},_validCheck:function(dfd){
var _14=dojo.io.script;
var _15=_14._deadScripts;
if(_15&&_15.length>0){
for(var i=0;i<_15.length;i++){
_14.remove(_15[i].id,_15[i].frameDoc);
_15[i].frameDoc=null;
}
dojo.io.script._deadScripts=[];
}
return true;
},_ioCheck:function(dfd){
var _16=dfd.ioArgs;
if(_16.json||(_16.scriptLoaded&&!_16.args.checkString)){
return true;
}
var _17=_16.args.checkString;
if(_17&&eval("typeof("+_17+") != 'undefined'")){
return true;
}
return false;
},_resHandle:function(dfd){
if(dojo.io.script._ioCheck(dfd)){
dfd.callback(dfd);
}else{
dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"));
}
},_canAttach:function(_18){
return true;
},_jsonpCallback:function(_19){
this.ioArgs.json=_19;
}};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.cache"]){
dojo._hasResource["dojo.cache"]=true;
dojo.provide("dojo.cache");
(function(){
var _1={};
dojo.cache=function(_2,_3,_4){
if(typeof _2=="string"){
var _5=dojo.moduleUrl(_2,_3);
}else{
_5=_2;
_4=_3;
}
var _6=_5.toString();
var _7=_4;
if(_4!=undefined&&!dojo.isString(_4)){
_7=("value" in _4?_4.value:undefined);
}
var _8=_4&&_4.sanitize?true:false;
if(typeof _7=="string"){
_7=_1[_6]=_8?dojo.cache._sanitize(_7):_7;
}else{
if(_7===null){
delete _1[_6];
}else{
if(!(_6 in _1)){
_7=dojo._getText(_6);
_1[_6]=_8?dojo.cache._sanitize(_7):_7;
}
_7=_1[_6];
}
}
return _7;
};
dojo.cache._sanitize=function(_9){
if(_9){
_9=_9.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _a=_9.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_a){
_9=_a[1];
}
}else{
_9="";
}
return _9;
};
})();
}
;dojo.provide("x2sky.core.MessageEngine");dojo.declare("x2sky.core.MessageEngine",null,{baseUrl:"/",interval:200,cache:null,constructor:function(a){if(a){this.baseUrl=a}this.serverQueue=new dojox.collections.Queue();this.clientQueue=new dojox.collections.Queue();this.handlers=new dojox.collections.ArrayList();this.cache={}},addHandler:function(a){if(this.handlers.contains(a)){console.warn('Message handler "'+a.id+'" has exists. Do nothing.');return}this.handlers.add(a)},removeHandler:function(a){this.handlers.remove(a);console.debug('Message handler "'+a.id+'" is removed.')},addMessage:function(a){console.debug((a.error?"Error ":"New ")+a.type+" message: ",a);switch(a.type){case"remote":this.sendRemoteMessage(a);break;case"server":if(a.cache===true){if(this.cache[a.id]){this.addMessage(this.cache[a.id])}else{this.cache[a.id]=null;this.serverQueue.enqueue(a)}}else{delete this.cache[a.id];this.serverQueue.enqueue(a)}break;case"client":this.clientQueue.enqueue(a);break;default:throw new Exception("Unknow message type: "+a.type);break}},sendRemoteMessage:function(e){if(!/\/$/.test(e.to)){e.to+="/"}var c={_msgId:e.id,_jsonp:"true",_srcId:e.sourceId||""};for(var d in e.data){var b=typeof e.data[d];if(b=="number"||b=="string"||b=="boolean"){c[d]=e.data[d]}}var a=this;dojo.io.script.get({url:e.to+"message_bridge.aspx",content:c,timeout:10000,preventCache:true,error:function(){console.debug("error to send jsonp.");e.type="client";e.error="Failed: network problem or time out, please check and try again.";a.addMessage(e)}})},runMessageBridge:function(){var c=[];var a=this;for(var b=0;b<10&&this.serverQueue.count;b++){c.push(this.serverQueue.dequeue())}var d=dojo.map(c,function(e){return e.toXml()}).join("");if(c.length){console.debug("Sending message: "+d)}dojo.xhrPost({url:a.baseUrl+"message_bridge.aspx",content:{data:"<messages>"+d+"</messages>",serverTime:true},handleAs:"json",load:function(e){dojo.forEach(e.messages,function(f){f=new x2sky.core.Message(f);a.addMessage(f);if(f.type=="client"){if(a.cache[f.id]===null){a.cache[f.id]=f}}})},error:function(e){dojo.forEach(c,function(f){f.error="Server error or network is not available.";f.type="client";a.addMessage(f)});console.error("Message bridge xhr error: "+e)}})},_processMessage:function(a){this.handlers.forEach(function(b){if(!b.enabled||!b.matches(a)){return}console.debug('Message handler "'+b.id+'" is processing message: ',a);b.processMessage(a);console.debug('Message handler "'+b.id+'" processing finished.')},this)},start:function(){var a=this;this.clientQueueMonitor=window.setInterval(function(){while(a.clientQueue.count>0){a._processMessage(a.clientQueue.dequeue())}},this.interval);this.messageSenderTrigger=window.setInterval(function(){if(!a.serverQueue.count){return}a.runMessageBridge()},this.interval);this.stateMonitor=window.setInterval(function(){a.printSystemState()},10000)},stop:function(){window.clearInterval(this.serverQueueMonitor);window.clearInterval(this.clientQueueMonitor);window.clearInterval(this.messageBridgeTrigger);window.clearInterval(this.messageSenderTrigger);window.clearInterval(this.stateMonitor);this.serverQueue.clear();this.clientQueue.clear();this.handlers.clear()},printSystemState:function(){}});;dojo.provide("x2sky.core.UserSession");dojo.declare("x2sky.core.UserSession",null,{constructor:function(a){dojo.mixin(this,a)}});;dojo.provide("x2sky.core.MessageHandler");dojo.declare("x2sky.core.MessageHandler",null,{id:"x2sky.base_message_handler",enabled:true,constructor:function(a){dojo.mixin(this,a)}});;dojo.provide("x2sky.core.Message");dojo.declare("x2sky.core.Message",null,{type:"server",id:"x2sky.message",version:"",from:"client",to:"",time:"",error:"",data:null,constructor:function(a){this.data={};dojo.mixin(this,a)},toXml:function(){var a=['<message id="'+this.id+'">'];a.push("<type>",this.type,"</type>");a.push("<from>",this.from,"</from>");if(this.to){a.push("<to>",this.to,"</to>")}if(this.time){a.push("<time>",this.time,"</time>")}if(this.error){a.push("<error><![CDATA[",this.error,"]]></error>")}if(this.version){a.push("<version>",this.version,"</version>")}if(this.data){a.push(x2sky.toXml(this.data,"","data"))}if(this.sourceId){a.push("<source_id>",this.sourceId,"</source_id>")}a.push("</message>");return a.join("")},clone:function(){var a=new x2sky.core.Message(this);a.data=dojo.clone(a.data);return a}});;dojo.provide("x2sky.core.Dao");dojo.declare("x2sky.core.Dao",null,{application:null,_flags:{},constructor:function(a){this._handlers=[];this.initHandlers();this.application=a||null},initHandlers:function(){},sendMessage:function(a){me.addMessage(a)},addHandler:function(a){if(dojo.some(this._handlers,function(b){return b.id==a.id})){console.error('Message handler "'+a.id+'" has existed.');return}this._handlers.push(a);me.addHandler(a)},addSimpleHandler:function(e,c,b){if(this._flags[e+c]){return}this._flags[e+c]=true;var a=this;if(!b){b=c}if(!this["on"+b]){this["on"+b]=function(){};this["onError"+b]=function(){}}if(this["onError"+b]){dojo.connect(this,"onError"+b,this,"onMsgError")}var d=new x2sky.core.MessageHandler({id:e+".clientMessageHandler."+c,matches:function(f){return f.id==e+".msg"+c},processMessage:function(f){if(!f.error){a["on"+b](f)}else{a["onError"+b](f)}}});this.addHandler(d)},start:function(){},stop:function(){dojo.forEach(this.getMessageHandlers(),dojo.hitch(me,me.removeHandler))},getTimeStamp:function(){var a=new Date();return a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()},createServerMessage:function(a){var b=this.createMessage(a);b.type="server";return b},createRemoteMessage:function(a){var b=this.createMessage(a);b.type="remote";return b},createSpiderMessage:function(a){var b=this.createMessage(a);b.type="spider";return b},createClientMessage:function(a){var b=this.createMessage(a);b.type="client";return b},createRemoteMessage:function(a){var b=this.createMessage(a);b.type="remote";return b},createMessage:function(b){var c=this;var a=this.application||this;return new x2sky.core.Message(dojo.mixin({type:"server",from:"client",application:a.id,version:a.version,time:this.getTimeStamp(),error:"",data:{}},b))},getUID:function(){return(new Date()).getTime()},getMessageHandlers:function(){return this._handlers},onMsgError:function(a){console.warn(this.declaredClass+'": '+a.error)},bindEvents:function(d){var a=[];for(var b=1;b<arguments.length;b++){var c=arguments[b];a.push(dojo.connect(this,"on"+c,d,"on"+c),dojo.connect(this,"onError"+c,d,"onError"+c))}return a}});x2sky.core.Dao.singleton=function(a){a.getInstance=function(){if(!a._instance){a._instance=new a()}return a._instance}};;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.window"]){
dojo._hasResource["dojo.window"]=true;
dojo.provide("dojo.window");
dojo.window.getBox=function(){
var _1=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;
var _2=dojo._docScroll();
return {w:_1.clientWidth,h:_1.clientHeight,l:_2.x,t:_2.y};
};
dojo.window.get=function(_3){
if(dojo.isIE&&window!==document.parentWindow){
_3.parentWindow.execScript("document._parentWindow = window;","Javascript");
var _4=_3._parentWindow;
_3._parentWindow=null;
return _4;
}
return _3.parentWindow||_3.defaultView;
};
dojo.window.scrollIntoView=function(_5,_6){
try{
_5=dojo.byId(_5);
var _7=_5.ownerDocument||dojo.doc,_8=_7.body||dojo.body(),_9=_7.documentElement||_8.parentNode,_a=dojo.isIE,_b=dojo.isWebKit;
if((!(dojo.isMoz||_a||_b||dojo.isOpera)||_5==_8||_5==_9)&&(typeof _5.scrollIntoView!="undefined")){
_5.scrollIntoView(false);
return;
}
var _c=_7.compatMode=="BackCompat",_d=_c?_8:_9,_e=_b?_8:_d,_f=_d.clientWidth,_10=_d.clientHeight,rtl=!dojo._isBodyLtr(),_11=_6||dojo.position(_5),el=_5.parentNode,_12=function(el){
return ((_a<=6||(_a&&_c))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));
};
if(_12(_5)){
return;
}
while(el){
if(el==_8){
el=_e;
}
var _13=dojo.position(el),_14=_12(el);
if(el==_e){
_13.w=_f;
_13.h=_10;
if(_e==_9&&_a&&rtl){
_13.x+=_e.offsetWidth-_13.w;
}
if(_13.x<0||!_a){
_13.x=0;
}
if(_13.y<0||!_a){
_13.y=0;
}
}else{
var pb=dojo._getPadBorderExtents(el);
_13.w-=pb.w;
_13.h-=pb.h;
_13.x+=pb.l;
_13.y+=pb.t;
}
if(el!=_e){
var _15=el.clientWidth,_16=_13.w-_15;
if(_15>0&&_16>0){
_13.w=_15;
if(_a&&rtl){
_13.x+=_16;
}
}
_15=el.clientHeight;
_16=_13.h-_15;
if(_15>0&&_16>0){
_13.h=_15;
}
}
if(_14){
if(_13.y<0){
_13.h+=_13.y;
_13.y=0;
}
if(_13.x<0){
_13.w+=_13.x;
_13.x=0;
}
if(_13.y+_13.h>_10){
_13.h=_10-_13.y;
}
if(_13.x+_13.w>_f){
_13.w=_f-_13.x;
}
}
var l=_11.x-_13.x,t=_11.y-Math.max(_13.y,0),r=l+_11.w-_13.w,bot=t+_11.h-_13.h;
if(r*l>0){
var s=Math[l<0?"max":"min"](l,r);
_11.x+=el.scrollLeft;
el.scrollLeft+=(_a>=8&&!_c&&rtl)?-s:s;
_11.x-=el.scrollLeft;
}
if(bot*t>0){
_11.y+=el.scrollTop;
el.scrollTop+=Math[t<0?"max":"min"](t,bot);
_11.y-=el.scrollTop;
}
el=(el!=_e)&&!_14&&el.parentNode;
}
}
catch(error){
console.error("scrollIntoView: "+error);
_5.scrollIntoView(false);
}
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.manager"]){
dojo._hasResource["dijit._base.manager"]=true;
dojo.provide("dijit._base.manager");
dojo.declare("dijit.WidgetSet",null,{constructor:function(){
this._hash={};
this.length=0;
},add:function(_1){
if(this._hash[_1.id]){
throw new Error("Tried to register widget with id=="+_1.id+" but that id is already registered");
}
this._hash[_1.id]=_1;
this.length++;
},remove:function(id){
if(this._hash[id]){
delete this._hash[id];
this.length--;
}
},forEach:function(_2,_3){
_3=_3||dojo.global;
var i=0,id;
for(id in this._hash){
_2.call(_3,this._hash[id],i++,this._hash);
}
return this;
},filter:function(_4,_5){
_5=_5||dojo.global;
var _6=new dijit.WidgetSet(),i=0,id;
for(id in this._hash){
var w=this._hash[id];
if(_4.call(_5,w,i++,this._hash)){
_6.add(w);
}
}
return _6;
},byId:function(id){
return this._hash[id];
},byClass:function(_7){
var _8=new dijit.WidgetSet(),id,_9;
for(id in this._hash){
_9=this._hash[id];
if(_9.declaredClass==_7){
_8.add(_9);
}
}
return _8;
},toArray:function(){
var ar=[];
for(var id in this._hash){
ar.push(this._hash[id]);
}
return ar;
},map:function(_a,_b){
return dojo.map(this.toArray(),_a,_b);
},every:function(_c,_d){
_d=_d||dojo.global;
var x=0,i;
for(i in this._hash){
if(!_c.call(_d,this._hash[i],x++,this._hash)){
return false;
}
}
return true;
},some:function(_e,_f){
_f=_f||dojo.global;
var x=0,i;
for(i in this._hash){
if(_e.call(_f,this._hash[i],x++,this._hash)){
return true;
}
}
return false;
}});
(function(){
dijit.registry=new dijit.WidgetSet();
var _10=dijit.registry._hash,_11=dojo.attr,_12=dojo.hasAttr,_13=dojo.style;
dijit.byId=function(id){
return typeof id=="string"?_10[id]:id;
};
var _14={};
dijit.getUniqueId=function(_15){
var id;
do{
id=_15+"_"+(_15 in _14?++_14[_15]:_14[_15]=0);
}while(_10[id]);
return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;
};
dijit.findWidgets=function(_16){
var _17=[];
function _18(_19){
for(var _1a=_19.firstChild;_1a;_1a=_1a.nextSibling){
if(_1a.nodeType==1){
var _1b=_1a.getAttribute("widgetId");
if(_1b){
_17.push(_10[_1b]);
}else{
_18(_1a);
}
}
}
};
_18(_16);
return _17;
};
dijit._destroyAll=function(){
dijit._curFocus=null;
dijit._prevFocus=null;
dijit._activeStack=[];
dojo.forEach(dijit.findWidgets(dojo.body()),function(_1c){
if(!_1c._destroyed){
if(_1c.destroyRecursive){
_1c.destroyRecursive();
}else{
if(_1c.destroy){
_1c.destroy();
}
}
}
});
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
dijit._destroyAll();
});
}
dijit.byNode=function(_1d){
return _10[_1d.getAttribute("widgetId")];
};
dijit.getEnclosingWidget=function(_1e){
while(_1e){
var id=_1e.getAttribute&&_1e.getAttribute("widgetId");
if(id){
return _10[id];
}
_1e=_1e.parentNode;
}
return null;
};
var _1f=(dijit._isElementShown=function(_20){
var s=_13(_20);
return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_11(_20,"type")!="hidden");
});
dijit.hasDefaultTabStop=function(_21){
switch(_21.nodeName.toLowerCase()){
case "a":
return _12(_21,"href");
case "area":
case "button":
case "input":
case "object":
case "select":
case "textarea":
return true;
case "iframe":
if(dojo.isMoz){
try{
return _21.contentDocument.designMode=="on";
}
catch(err){
return false;
}
}else{
if(dojo.isWebKit){
var doc=_21.contentDocument,_22=doc&&doc.body;
return _22&&_22.contentEditable=="true";
}else{
try{
doc=_21.contentWindow.document;
_22=doc&&doc.body;
return _22&&_22.firstChild&&_22.firstChild.contentEditable=="true";
}
catch(e){
return false;
}
}
}
default:
return _21.contentEditable=="true";
}
};
var _23=(dijit.isTabNavigable=function(_24){
if(_11(_24,"disabled")){
return false;
}else{
if(_12(_24,"tabIndex")){
return _11(_24,"tabIndex")>=0;
}else{
return dijit.hasDefaultTabStop(_24);
}
}
});
dijit._getTabNavigable=function(_25){
var _26,_27,_28,_29,_2a,_2b;
var _2c=function(_2d){
dojo.query("> *",_2d).forEach(function(_2e){
if((dojo.isIE&&_2e.scopeName!=="HTML")||!_1f(_2e)){
return;
}
if(_23(_2e)){
var _2f=_11(_2e,"tabIndex");
if(!_12(_2e,"tabIndex")||_2f==0){
if(!_26){
_26=_2e;
}
_27=_2e;
}else{
if(_2f>0){
if(!_28||_2f<_29){
_29=_2f;
_28=_2e;
}
if(!_2a||_2f>=_2b){
_2b=_2f;
_2a=_2e;
}
}
}
}
if(_2e.nodeName.toUpperCase()!="SELECT"){
_2c(_2e);
}
});
};
if(_1f(_25)){
_2c(_25);
}
return {first:_26,last:_27,lowest:_28,highest:_2a};
};
dijit.getFirstInTabbingOrder=function(_30){
var _31=dijit._getTabNavigable(dojo.byId(_30));
return _31.lowest?_31.lowest:_31.first;
};
dijit.getLastInTabbingOrder=function(_32){
var _33=dijit._getTabNavigable(dojo.byId(_32));
return _33.last?_33.last:_33.highest;
};
dijit.defaultDuration=dojo.config["defaultDuration"]||200;
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.focus"]){
dojo._hasResource["dijit._base.focus"]=true;
dojo.provide("dijit._base.focus");


dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){
return dijit.getBookmark().isCollapsed;
},getBookmark:function(){
var bm,rg,tg,_1=dojo.doc.selection,cf=dijit._curFocus;
if(dojo.global.getSelection){
_1=dojo.global.getSelection();
if(_1){
if(_1.isCollapsed){
tg=cf?cf.tagName:"";
if(tg){
tg=tg.toLowerCase();
if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){
_1={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};
return {isCollapsed:(_1.end<=_1.start),mark:_1};
}
}
bm={isCollapsed:true};
}else{
rg=_1.getRangeAt(0);
bm={isCollapsed:false,mark:rg.cloneRange()};
}
}
}else{
if(_1){
tg=cf?cf.tagName:"";
tg=tg.toLowerCase();
if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){
if(_1.type&&_1.type.toLowerCase()=="none"){
return {isCollapsed:true,mark:null};
}else{
rg=_1.createRange();
return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};
}
}
bm={};
try{
rg=_1.createRange();
bm.isCollapsed=!(_1.type=="Text"?rg.htmlText.length:rg.length);
}
catch(e){
bm.isCollapsed=true;
return bm;
}
if(_1.type.toUpperCase()=="CONTROL"){
if(rg.length){
bm.mark=[];
var i=0,_2=rg.length;
while(i<_2){
bm.mark.push(rg.item(i++));
}
}else{
bm.isCollapsed=true;
bm.mark=null;
}
}else{
bm.mark=rg.getBookmark();
}
}else{
console.warn("No idea how to store the current selection for this browser!");
}
}
return bm;
},moveToBookmark:function(_3){
var _4=dojo.doc,_5=_3.mark;
if(_5){
if(dojo.global.getSelection){
var _6=dojo.global.getSelection();
if(_6&&_6.removeAllRanges){
if(_5.pRange){
var r=_5;
var n=r.node;
n.selectionStart=r.start;
n.selectionEnd=r.end;
}else{
_6.removeAllRanges();
_6.addRange(_5);
}
}else{
console.warn("No idea how to restore selection for this browser!");
}
}else{
if(_4.selection&&_5){
var rg;
if(_5.pRange){
rg=_5.range;
}else{
if(dojo.isArray(_5)){
rg=_4.body.createControlRange();
dojo.forEach(_5,function(n){
rg.addElement(n);
});
}else{
rg=_4.body.createTextRange();
rg.moveToBookmark(_5);
}
}
rg.select();
}
}
}
},getFocus:function(_7,_8){
var _9=!dijit._curFocus||(_7&&dojo.isDescendant(dijit._curFocus,_7.domNode))?dijit._prevFocus:dijit._curFocus;
return {node:_9,bookmark:(_9==dijit._curFocus)&&dojo.withGlobal(_8||dojo.global,dijit.getBookmark),openedForWindow:_8};
},focus:function(_a){
if(!_a){
return;
}
var _b="node" in _a?_a.node:_a,_c=_a.bookmark,_d=_a.openedForWindow,_e=_c?_c.isCollapsed:false;
if(_b){
var _f=(_b.tagName.toLowerCase()=="iframe")?_b.contentWindow:_b;
if(_f&&_f.focus){
try{
_f.focus();
}
catch(e){
}
}
dijit._onFocusNode(_b);
}
if(_c&&dojo.withGlobal(_d||dojo.global,dijit.isCollapsed)&&!_e){
if(_d){
_d.focus();
}
try{
dojo.withGlobal(_d||dojo.global,dijit.moveToBookmark,null,[_c]);
}
catch(e2){
}
}
},_activeStack:[],registerIframe:function(_10){
return dijit.registerWin(_10.contentWindow,_10);
},unregisterIframe:function(_11){
dijit.unregisterWin(_11);
},registerWin:function(_12,_13){
var _14=function(evt){
dijit._justMouseDowned=true;
setTimeout(function(){
dijit._justMouseDowned=false;
},0);
if(dojo.isIE&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){
return;
}
dijit._onTouchNode(_13||evt.target||evt.srcElement,"mouse");
};
var doc=dojo.isIE?_12.document.documentElement:_12.document;
if(doc){
if(dojo.isIE){
doc.attachEvent("onmousedown",_14);
var _15=function(evt){
if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){
dijit._onFocusNode(_13||evt.srcElement);
}else{
dijit._onTouchNode(_13||evt.srcElement);
}
};
doc.attachEvent("onactivate",_15);
var _16=function(evt){
dijit._onBlurNode(_13||evt.srcElement);
};
doc.attachEvent("ondeactivate",_16);
return function(){
doc.detachEvent("onmousedown",_14);
doc.detachEvent("onactivate",_15);
doc.detachEvent("ondeactivate",_16);
doc=null;
};
}else{
doc.addEventListener("mousedown",_14,true);
var _17=function(evt){
dijit._onFocusNode(_13||evt.target);
};
doc.addEventListener("focus",_17,true);
var _18=function(evt){
dijit._onBlurNode(_13||evt.target);
};
doc.addEventListener("blur",_18,true);
return function(){
doc.removeEventListener("mousedown",_14,true);
doc.removeEventListener("focus",_17,true);
doc.removeEventListener("blur",_18,true);
doc=null;
};
}
}
},unregisterWin:function(_19){
_19&&_19();
},_onBlurNode:function(_1a){
dijit._prevFocus=dijit._curFocus;
dijit._curFocus=null;
if(dijit._justMouseDowned){
return;
}
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
}
dijit._clearActiveWidgetsTimer=setTimeout(function(){
delete dijit._clearActiveWidgetsTimer;
dijit._setStack([]);
dijit._prevFocus=null;
},100);
},_onTouchNode:function(_1b,by){
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
var _1c=[];
try{
while(_1b){
var _1d=dojo.attr(_1b,"dijitPopupParent");
if(_1d){
_1b=dijit.byId(_1d).domNode;
}else{
if(_1b.tagName&&_1b.tagName.toLowerCase()=="body"){
if(_1b===dojo.body()){
break;
}
_1b=dojo.window.get(_1b.ownerDocument).frameElement;
}else{
var id=_1b.getAttribute&&_1b.getAttribute("widgetId"),_1e=id&&dijit.byId(id);
if(_1e&&!(by=="mouse"&&_1e.get("disabled"))){
_1c.unshift(id);
}
_1b=_1b.parentNode;
}
}
}
}
catch(e){
}
dijit._setStack(_1c,by);
},_onFocusNode:function(_1f){
if(!_1f){
return;
}
if(_1f.nodeType==9){
return;
}
dijit._onTouchNode(_1f);
if(_1f==dijit._curFocus){
return;
}
if(dijit._curFocus){
dijit._prevFocus=dijit._curFocus;
}
dijit._curFocus=_1f;
dojo.publish("focusNode",[_1f]);
},_setStack:function(_20,by){
var _21=dijit._activeStack;
dijit._activeStack=_20;
for(var _22=0;_22<Math.min(_21.length,_20.length);_22++){
if(_21[_22]!=_20[_22]){
break;
}
}
var _23;
for(var i=_21.length-1;i>=_22;i--){
_23=dijit.byId(_21[i]);
if(_23){
_23._focused=false;
_23._hasBeenBlurred=true;
if(_23._onBlur){
_23._onBlur(by);
}
dojo.publish("widgetBlur",[_23,by]);
}
}
for(i=_22;i<_20.length;i++){
_23=dijit.byId(_20[i]);
if(_23){
_23._focused=true;
if(_23._onFocus){
_23._onFocus(by);
}
dojo.publish("widgetFocus",[_23,by]);
}
}
}});
dojo.addOnLoad(function(){
var _24=dijit.registerWin(window);
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
dijit.unregisterWin(_24);
_24=null;
});
}
});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.AdapterRegistry"]){
dojo._hasResource["dojo.AdapterRegistry"]=true;
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_1){
this.pairs=[];
this.returnWrappers=_1||false;
};
dojo.extend(dojo.AdapterRegistry,{register:function(_2,_3,_4,_5,_6){
this.pairs[((_6)?"unshift":"push")]([_2,_3,_4,_5]);
},match:function(){
for(var i=0;i<this.pairs.length;i++){
var _7=this.pairs[i];
if(_7[1].apply(this,arguments)){
if((_7[3])||(this.returnWrappers)){
return _7[2];
}else{
return _7[2].apply(this,arguments);
}
}
}
throw new Error("No match found");
},unregister:function(_8){
for(var i=0;i<this.pairs.length;i++){
var _9=this.pairs[i];
if(_9[0]==_8){
this.pairs.splice(i,1);
return true;
}
}
return false;
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.place"]){
dojo._hasResource["dijit._base.place"]=true;
dojo.provide("dijit._base.place");


dijit.getViewport=function(){
return dojo.window.getBox();
};
dijit.placeOnScreen=function(_1,_2,_3,_4){
var _5=dojo.map(_3,function(_6){
var c={corner:_6,pos:{x:_2.x,y:_2.y}};
if(_4){
c.pos.x+=_6.charAt(1)=="L"?_4.x:-_4.x;
c.pos.y+=_6.charAt(0)=="T"?_4.y:-_4.y;
}
return c;
});
return dijit._place(_1,_5);
};
dijit._place=function(_7,_8,_9){
var _a=dojo.window.getBox();
if(!_7.parentNode||String(_7.parentNode.tagName).toLowerCase()!="body"){
dojo.body().appendChild(_7);
}
var _b=null;
dojo.some(_8,function(_c){
var _d=_c.corner;
var _e=_c.pos;
if(_9){
_9(_7,_c.aroundCorner,_d);
}
var _f=_7.style;
var _10=_f.display;
var _11=_f.visibility;
_f.visibility="hidden";
_f.display="";
var mb=dojo.marginBox(_7);
_f.display=_10;
_f.visibility=_11;
var _12=Math.max(_a.l,_d.charAt(1)=="L"?_e.x:(_e.x-mb.w)),_13=Math.max(_a.t,_d.charAt(0)=="T"?_e.y:(_e.y-mb.h)),_14=Math.min(_a.l+_a.w,_d.charAt(1)=="L"?(_12+mb.w):_e.x),_15=Math.min(_a.t+_a.h,_d.charAt(0)=="T"?(_13+mb.h):_e.y),_16=_14-_12,_17=_15-_13,_18=(mb.w-_16)+(mb.h-_17);
if(_b==null||_18<_b.overflow){
_b={corner:_d,aroundCorner:_c.aroundCorner,x:_12,y:_13,w:_16,h:_17,overflow:_18};
}
return !_18;
});
_7.style.left=_b.x+"px";
_7.style.top=_b.y+"px";
if(_b.overflow&&_9){
_9(_7,_b.aroundCorner,_b.corner);
}
return _b;
};
dijit.placeOnScreenAroundNode=function(_19,_1a,_1b,_1c){
_1a=dojo.byId(_1a);
var _1d=_1a.style.display;
_1a.style.display="";
var _1e=dojo.position(_1a,true);
_1a.style.display=_1d;
return dijit._placeOnScreenAroundRect(_19,_1e.x,_1e.y,_1e.w,_1e.h,_1b,_1c);
};
dijit.placeOnScreenAroundRectangle=function(_1f,_20,_21,_22){
return dijit._placeOnScreenAroundRect(_1f,_20.x,_20.y,_20.width,_20.height,_21,_22);
};
dijit._placeOnScreenAroundRect=function(_23,x,y,_24,_25,_26,_27){
var _28=[];
for(var _29 in _26){
_28.push({aroundCorner:_29,corner:_26[_29],pos:{x:x+(_29.charAt(1)=="L"?0:_24),y:y+(_29.charAt(0)=="T"?0:_25)}});
}
return dijit._place(_23,_28,_27);
};
dijit.placementRegistry=new dojo.AdapterRegistry();
dijit.placementRegistry.register("node",function(n,x){
return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";
},dijit.placeOnScreenAroundNode);
dijit.placementRegistry.register("rect",function(n,x){
return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;
},dijit.placeOnScreenAroundRectangle);
dijit.placeOnScreenAroundElement=function(_2a,_2b,_2c,_2d){
return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);
};
dijit.getPopupAroundAlignment=function(_2e,_2f){
var _30={};
dojo.forEach(_2e,function(pos){
switch(pos){
case "after":
_30[_2f?"BR":"BL"]=_2f?"BL":"BR";
break;
case "before":
_30[_2f?"BL":"BR"]=_2f?"BR":"BL";
break;
case "below":
_30[_2f?"BL":"BR"]=_2f?"TL":"TR";
_30[_2f?"BR":"BL"]=_2f?"TR":"TL";
break;
case "above":
default:
_30[_2f?"TL":"TR"]=_2f?"BL":"BR";
_30[_2f?"TR":"TL"]=_2f?"BR":"BL";
break;
}
});
return _30;
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.window"]){
dojo._hasResource["dijit._base.window"]=true;
dojo.provide("dijit._base.window");

dijit.getDocumentWindow=function(_1){
return dojo.window.get(_1);
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.popup"]){
dojo._hasResource["dijit._base.popup"]=true;
dojo.provide("dijit._base.popup");



dijit.popup={_stack:[],_beginZIndex:1000,_idGen:1,moveOffScreen:function(_1){
var _2=_1.parentNode;
if(!_2||!dojo.hasClass(_2,"dijitPopup")){
_2=dojo.create("div",{"class":"dijitPopup",style:{visibility:"hidden",top:"-9999px"}},dojo.body());
dijit.setWaiRole(_2,"presentation");
_2.appendChild(_1);
}
var s=_1.style;
s.display="";
s.visibility="";
s.position="";
s.top="0px";
dojo.style(_2,{visibility:"hidden",top:"-9999px"});
},getTopPopup:function(){
var _3=this._stack;
for(var pi=_3.length-1;pi>0&&_3[pi].parent===_3[pi-1].widget;pi--){
}
return _3[pi];
},open:function(_4){
var _5=this._stack,_6=_4.popup,_7=_4.orient||((_4.parent?_4.parent.isLeftToRight():dojo._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_8=_4.around,id=(_4.around&&_4.around.id)?(_4.around.id+"_dropdown"):("popup_"+this._idGen++);
var _9=_6.domNode.parentNode;
if(!_9||!dojo.hasClass(_9,"dijitPopup")){
this.moveOffScreen(_6.domNode);
_9=_6.domNode.parentNode;
}
dojo.attr(_9,{id:id,style:{zIndex:this._beginZIndex+_5.length},"class":"dijitPopup "+(_6.baseClass||_6["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:_4.parent?_4.parent.id:""});
if(dojo.isIE||dojo.isMoz){
var _a=_9.childNodes[1];
if(!_a){
_a=new dijit.BackgroundIframe(_9);
}
}
var _b=_8?dijit.placeOnScreenAroundElement(_9,_8,_7,_6.orient?dojo.hitch(_6,"orient"):null):dijit.placeOnScreen(_9,_4,_7=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_4.padding);
_9.style.visibility="visible";
_6.domNode.style.visibility="visible";
var _c=[];
_c.push(dojo.connect(_9,"onkeypress",this,function(_d){
if(_d.charOrCode==dojo.keys.ESCAPE&&_4.onCancel){
dojo.stopEvent(_d);
_4.onCancel();
}else{
if(_d.charOrCode===dojo.keys.TAB){
dojo.stopEvent(_d);
var _e=this.getTopPopup();
if(_e&&_e.onCancel){
_e.onCancel();
}
}
}
}));
if(_6.onCancel){
_c.push(dojo.connect(_6,"onCancel",_4.onCancel));
}
_c.push(dojo.connect(_6,_6.onExecute?"onExecute":"onChange",this,function(){
var _f=this.getTopPopup();
if(_f&&_f.onExecute){
_f.onExecute();
}
}));
_5.push({wrapper:_9,iframe:_a,widget:_6,parent:_4.parent,onExecute:_4.onExecute,onCancel:_4.onCancel,onClose:_4.onClose,handlers:_c});
if(_6.onOpen){
_6.onOpen(_b);
}
return _b;
},close:function(_10){
var _11=this._stack;
while(dojo.some(_11,function(_12){
return _12.widget==_10;
})){
var top=_11.pop(),_13=top.wrapper,_14=top.iframe,_15=top.widget,_16=top.onClose;
if(_15.onClose){
_15.onClose();
}
dojo.forEach(top.handlers,dojo.disconnect);
if(_15&&_15.domNode){
this.moveOffScreen(_15.domNode);
}else{
dojo.destroy(_13);
}
if(_16){
_16();
}
}
}};
dijit._frames=new function(){
var _17=[];
this.pop=function(){
var _18;
if(_17.length){
_18=_17.pop();
_18.style.display="";
}else{
if(dojo.isIE){
var _19=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";
var _1a="<iframe src='"+_19+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
_18=dojo.doc.createElement(_1a);
}else{
_18=dojo.create("iframe");
_18.src="javascript:\"\"";
_18.className="dijitBackgroundIframe";
dojo.style(_18,"opacity",0.1);
}
_18.tabIndex=-1;
dijit.setWaiRole(_18,"presentation");
}
return _18;
};
this.push=function(_1b){
_1b.style.display="none";
_17.push(_1b);
};
}();
dijit.BackgroundIframe=function(_1c){
if(!_1c.id){
throw new Error("no id");
}
if(dojo.isIE||dojo.isMoz){
var _1d=dijit._frames.pop();
_1c.appendChild(_1d);
if(dojo.isIE<7){
this.resize(_1c);
this._conn=dojo.connect(_1c,"onresize",this,function(){
this.resize(_1c);
});
}else{
dojo.style(_1d,{width:"100%",height:"100%"});
}
this.iframe=_1d;
}
};
dojo.extend(dijit.BackgroundIframe,{resize:function(_1e){
if(this.iframe&&dojo.isIE<7){
dojo.style(this.iframe,{width:_1e.offsetWidth+"px",height:_1e.offsetHeight+"px"});
}
},destroy:function(){
if(this._conn){
dojo.disconnect(this._conn);
this._conn=null;
}
if(this.iframe){
dijit._frames.push(this.iframe);
delete this.iframe;
}
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.scroll"]){
dojo._hasResource["dijit._base.scroll"]=true;
dojo.provide("dijit._base.scroll");

dijit.scrollIntoView=function(_1,_2){
dojo.window.scrollIntoView(_1,_2);
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.uacss"]){
dojo._hasResource["dojo.uacss"]=true;
dojo.provide("dojo.uacss");
(function(){
var d=dojo,_1=d.doc.documentElement,ie=d.isIE,_2=d.isOpera,_3=Math.floor,ff=d.isFF,_4=d.boxModel.replace(/-/,""),_5={dj_ie:ie,dj_ie6:_3(ie)==6,dj_ie7:_3(ie)==7,dj_ie8:_3(ie)==8,dj_quirks:d.isQuirks,dj_iequirks:ie&&d.isQuirks,dj_opera:_2,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:_3(ff)==3};
_5["dj_"+_4]=true;
var _6="";
for(var _7 in _5){
if(_5[_7]){
_6+=_7+" ";
}
}
_1.className=d.trim(_1.className+" "+_6);
dojo._loaders.unshift(function(){
if(!dojo._isBodyLtr()){
var _8="dj_rtl dijitRtl "+_6.replace(/ /g,"-rtl ");
_1.className=d.trim(_1.className+" "+_8);
}
});
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.sniff"]){
dojo._hasResource["dijit._base.sniff"]=true;
dojo.provide("dijit._base.sniff");

}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.typematic"]){
dojo._hasResource["dijit._base.typematic"]=true;
dojo.provide("dijit._base.typematic");
dijit.typematic={_fireEventAndReload:function(){
this._timer=null;
this._callback(++this._count,this._node,this._evt);
this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),this._minDelay);
this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);
},trigger:function(_1,_2,_3,_4,_5,_6,_7,_8){
if(_5!=this._obj){
this.stop();
this._initialDelay=_7||500;
this._subsequentDelay=_6||0.9;
this._minDelay=_8||10;
this._obj=_5;
this._evt=_1;
this._node=_3;
this._currentTimeout=-1;
this._count=-1;
this._callback=dojo.hitch(_2,_4);
this._fireEventAndReload();
this._evt=dojo.mixin({faux:true},_1);
}
},stop:function(){
if(this._timer){
clearTimeout(this._timer);
this._timer=null;
}
if(this._obj){
this._callback(-1,this._node,this._evt);
this._obj=null;
}
},addKeyListener:function(_9,_a,_b,_c,_d,_e,_f){
if(_a.keyCode){
_a.charOrCode=_a.keyCode;
dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}else{
if(_a.charCode){
_a.charOrCode=String.fromCharCode(_a.charCode);
dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}
}
return [dojo.connect(_9,"onkeypress",this,function(evt){
if(evt.charOrCode==_a.charOrCode&&(_a.ctrlKey===undefined||_a.ctrlKey==evt.ctrlKey)&&(_a.altKey===undefined||_a.altKey==evt.altKey)&&(_a.metaKey===undefined||_a.metaKey==(evt.metaKey||false))&&(_a.shiftKey===undefined||_a.shiftKey==evt.shiftKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_b,_9,_c,_a,_d,_e,_f);
}else{
if(dijit.typematic._obj==_a){
dijit.typematic.stop();
}
}
}),dojo.connect(_9,"onkeyup",this,function(evt){
if(dijit.typematic._obj==_a){
dijit.typematic.stop();
}
})];
},addMouseListener:function(_10,_11,_12,_13,_14,_15){
var dc=dojo.connect;
return [dc(_10,"mousedown",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_11,_10,_12,_10,_13,_14,_15);
}),dc(_10,"mouseup",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(_10,"mouseout",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(_10,"mousemove",this,function(evt){
evt.preventDefault();
}),dc(_10,"dblclick",this,function(evt){
dojo.stopEvent(evt);
if(dojo.isIE){
dijit.typematic.trigger(evt,_11,_10,_12,_10,_13,_14,_15);
setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
}
})];
},addListener:function(_16,_17,_18,_19,_1a,_1b,_1c,_1d){
return this.addKeyListener(_17,_18,_19,_1a,_1b,_1c,_1d).concat(this.addMouseListener(_16,_19,_1a,_1b,_1c,_1d));
}};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base.wai"]){
dojo._hasResource["dijit._base.wai"]=true;
dojo.provide("dijit._base.wai");
dijit.wai={onload:function(){
var _1=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());
var cs=dojo.getComputedStyle(_1);
if(cs){
var _2=cs.backgroundImage;
var _3=(cs.borderTopColor==cs.borderRightColor)||(_2!=null&&(_2=="none"||_2=="url(invalid-url:)"));
dojo[_3?"addClass":"removeClass"](dojo.body(),"dijit_a11y");
if(dojo.isIE){
_1.outerHTML="";
}else{
dojo.body().removeChild(_1);
}
}
}};
if(dojo.isIE||dojo.isMoz){
dojo._loaders.unshift(dijit.wai.onload);
}
dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(_4,_5){
var _6=this.getWaiRole(_4);
return _5?(_6.indexOf(_5)>-1):(_6.length>0);
},getWaiRole:function(_7){
return dojo.trim((dojo.attr(_7,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));
},setWaiRole:function(_8,_9){
var _a=dojo.attr(_8,"role")||"";
if(!this._XhtmlRoles.test(_a)){
dojo.attr(_8,"role",_9);
}else{
if((" "+_a+" ").indexOf(" "+_9+" ")<0){
var _b=dojo.trim(_a.replace(this._XhtmlRoles,""));
var _c=dojo.trim(_a.replace(_b,""));
dojo.attr(_8,"role",_c+(_c?" ":"")+_9);
}
}
},removeWaiRole:function(_d,_e){
var _f=dojo.attr(_d,"role");
if(!_f){
return;
}
if(_e){
var t=dojo.trim((" "+_f+" ").replace(" "+_e+" "," "));
dojo.attr(_d,"role",t);
}else{
_d.removeAttribute("role");
}
},hasWaiState:function(_10,_11){
return _10.hasAttribute?_10.hasAttribute("aria-"+_11):!!_10.getAttribute("aria-"+_11);
},getWaiState:function(_12,_13){
return _12.getAttribute("aria-"+_13)||"";
},setWaiState:function(_14,_15,_16){
_14.setAttribute("aria-"+_15,_16);
},removeWaiState:function(_17,_18){
_17.removeAttribute("aria-"+_18);
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._base"]){
dojo._hasResource["dijit._base"]=true;
dojo.provide("dijit._base");









}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._Widget"]){
dojo._hasResource["dijit._Widget"]=true;
dojo.provide("dijit._Widget");

dojo.connect(dojo,"_connect",function(_1,_2){
if(_1&&dojo.isFunction(_1._onConnect)){
_1._onConnect(_2);
}
});
dijit._connectOnUseEventHandler=function(_3){
};
dijit._lastKeyDownNode=null;
if(dojo.isIE){
(function(){
var _4=function(_5){
dijit._lastKeyDownNode=_5.srcElement;
};
dojo.doc.attachEvent("onkeydown",_4);
dojo.addOnWindowUnload(function(){
dojo.doc.detachEvent("onkeydown",_4);
});
})();
}else{
dojo.doc.addEventListener("keydown",function(_6){
dijit._lastKeyDownNode=_6.target;
},true);
}
(function(){
var _7={},_8=function(_9){
var dc=_9.declaredClass;
if(!_7[dc]){
var r=[],_a,_b=_9.constructor.prototype;
for(var _c in _b){
if(dojo.isFunction(_b[_c])&&(_a=_c.match(/^_set([a-zA-Z]*)Attr$/))&&_a[1]){
r.push(_a[1].charAt(0).toLowerCase()+_a[1].substr(1));
}
}
_7[dc]=r;
}
return _7[dc]||[];
};
dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_d,_e){
this.create(_d,_e);
},create:function(_f,_10){
this.srcNodeRef=dojo.byId(_10);
this._connects=[];
this._subscribes=[];
this._deferredConnects=dojo.clone(this._deferredConnects);
for(var _11 in this.attributeMap){
delete this._deferredConnects[_11];
}
for(_11 in this._deferredConnects){
if(this[_11]!==dijit._connectOnUseEventHandler){
delete this._deferredConnects[_11];
}
}
if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
this.id=this.srcNodeRef.id;
}
if(_f){
this.params=_f;
dojo.mixin(this,_f);
}
this.postMixInProperties();
if(!this.id){
this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
}
dijit.registry.add(this);
this.buildRendering();
if(this.domNode){
this._applyAttributes();
var _12=this.srcNodeRef;
if(_12&&_12.parentNode){
_12.parentNode.replaceChild(this.domNode,_12);
}
for(_11 in this.params){
this._onConnect(_11);
}
}
if(this.domNode){
this.domNode.setAttribute("widgetId",this.id);
}
this.postCreate();
if(this.srcNodeRef&&!this.srcNodeRef.parentNode){
delete this.srcNodeRef;
}
this._created=true;
},_applyAttributes:function(){
var _13=function(_14,_15){
if((_15.params&&_14 in _15.params)||_15[_14]){
_15.set(_14,_15[_14]);
}
};
for(var _16 in this.attributeMap){
_13(_16,this);
}
dojo.forEach(_8(this),function(a){
if(!(a in this.attributeMap)){
_13(a,this);
}
},this);
},postMixInProperties:function(){
},buildRendering:function(){
this.domNode=this.srcNodeRef||dojo.create("div");
},postCreate:function(){
if(this.baseClass){
var _17=this.baseClass.split(" ");
if(!this.isLeftToRight()){
_17=_17.concat(dojo.map(_17,function(_18){
return _18+"Rtl";
}));
}
dojo.addClass(this.domNode,_17);
}
},startup:function(){
this._started=true;
},destroyRecursive:function(_19){
this._beingDestroyed=true;
this.destroyDescendants(_19);
this.destroy(_19);
},destroy:function(_1a){
this._beingDestroyed=true;
this.uninitialize();
var d=dojo,dfe=d.forEach,dun=d.unsubscribe;
dfe(this._connects,function(_1b){
dfe(_1b,d.disconnect);
});
dfe(this._subscribes,function(_1c){
dun(_1c);
});
dfe(this._supportingWidgets||[],function(w){
if(w.destroyRecursive){
w.destroyRecursive();
}else{
if(w.destroy){
w.destroy();
}
}
});
this.destroyRendering(_1a);
dijit.registry.remove(this.id);
this._destroyed=true;
},destroyRendering:function(_1d){
if(this.bgIframe){
this.bgIframe.destroy(_1d);
delete this.bgIframe;
}
if(this.domNode){
if(_1d){
dojo.removeAttr(this.domNode,"widgetId");
}else{
dojo.destroy(this.domNode);
}
delete this.domNode;
}
if(this.srcNodeRef){
if(!_1d){
dojo.destroy(this.srcNodeRef);
}
delete this.srcNodeRef;
}
},destroyDescendants:function(_1e){
dojo.forEach(this.getChildren(),function(_1f){
if(_1f.destroyRecursive){
_1f.destroyRecursive(_1e);
}
});
},uninitialize:function(){
return false;
},onFocus:function(){
},onBlur:function(){
},_onFocus:function(e){
this.onFocus();
},_onBlur:function(){
this.onBlur();
},_onConnect:function(_20){
if(_20 in this._deferredConnects){
var _21=this[this._deferredConnects[_20]||"domNode"];
this.connect(_21,_20.toLowerCase(),_20);
delete this._deferredConnects[_20];
}
},_setClassAttr:function(_22){
var _23=this[this.attributeMap["class"]||"domNode"];
dojo.removeClass(_23,this["class"]);
this["class"]=_22;
dojo.addClass(_23,_22);
},_setStyleAttr:function(_24){
var _25=this[this.attributeMap.style||"domNode"];
if(dojo.isObject(_24)){
dojo.style(_25,_24);
}else{
if(_25.style.cssText){
_25.style.cssText+="; "+_24;
}else{
_25.style.cssText=_24;
}
}
this.style=_24;
},setAttribute:function(_26,_27){
dojo.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");
this.set(_26,_27);
},_attrToDom:function(_28,_29){
var _2a=this.attributeMap[_28];
dojo.forEach(dojo.isArray(_2a)?_2a:[_2a],function(_2b){
var _2c=this[_2b.node||_2b||"domNode"];
var _2d=_2b.type||"attribute";
switch(_2d){
case "attribute":
if(dojo.isFunction(_29)){
_29=dojo.hitch(this,_29);
}
var _2e=_2b.attribute?_2b.attribute:(/^on[A-Z][a-zA-Z]*$/.test(_28)?_28.toLowerCase():_28);
dojo.attr(_2c,_2e,_29);
break;
case "innerText":
_2c.innerHTML="";
_2c.appendChild(dojo.doc.createTextNode(_29));
break;
case "innerHTML":
_2c.innerHTML=_29;
break;
case "class":
dojo.removeClass(_2c,this[_28]);
dojo.addClass(_2c,_29);
break;
}
},this);
this[_28]=_29;
},attr:function(_2f,_30){
if(dojo.config.isDebug){
var _31=arguments.callee._ach||(arguments.callee._ach={}),_32=(arguments.callee.caller||"unknown caller").toString();
if(!_31[_32]){
dojo.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_32,"","2.0");
_31[_32]=true;
}
}
var _33=arguments.length;
if(_33>=2||typeof _2f==="object"){
return this.set.apply(this,arguments);
}else{
return this.get(_2f);
}
},get:function(_34){
var _35=this._getAttrNames(_34);
return this[_35.g]?this[_35.g]():this[_34];
},set:function(_36,_37){
if(typeof _36==="object"){
for(var x in _36){
this.set(x,_36[x]);
}
return this;
}
var _38=this._getAttrNames(_36);
if(this[_38.s]){
var _39=this[_38.s].apply(this,Array.prototype.slice.call(arguments,1));
}else{
if(_36 in this.attributeMap){
this._attrToDom(_36,_37);
}
var _3a=this[_36];
this[_36]=_37;
}
return _39||this;
},_attrPairNames:{},_getAttrNames:function(_3b){
var apn=this._attrPairNames;
if(apn[_3b]){
return apn[_3b];
}
var uc=_3b.charAt(0).toUpperCase()+_3b.substr(1);
return (apn[_3b]={n:_3b+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});
},toString:function(){
return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";
},getDescendants:function(){
return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[];
},getChildren:function(){
return this.containerNode?dijit.findWidgets(this.containerNode):[];
},nodesWithKeyClick:["input","button"],connect:function(obj,_3c,_3d){
var d=dojo,dc=d._connect,_3e=[];
if(_3c=="ondijitclick"){
if(dojo.indexOf(this.nodesWithKeyClick,obj.nodeName.toLowerCase())==-1){
var m=d.hitch(this,_3d);
_3e.push(dc(obj,"onkeydown",this,function(e){
if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
dijit._lastKeyDownNode=e.target;
e.preventDefault();
}
}),dc(obj,"onkeyup",this,function(e){
if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
dijit._lastKeyDownNode=null;
return m(e);
}
}));
}
_3c="onclick";
}
_3e.push(dc(obj,_3c,this,_3d));
this._connects.push(_3e);
return _3e;
},disconnect:function(_3f){
for(var i=0;i<this._connects.length;i++){
if(this._connects[i]==_3f){
dojo.forEach(_3f,dojo.disconnect);
this._connects.splice(i,1);
return;
}
}
},subscribe:function(_40,_41){
var d=dojo,_42=d.subscribe(_40,this,_41);
this._subscribes.push(_42);
return _42;
},unsubscribe:function(_43){
for(var i=0;i<this._subscribes.length;i++){
if(this._subscribes[i]==_43){
dojo.unsubscribe(_43);
this._subscribes.splice(i,1);
return;
}
}
},isLeftToRight:function(){
return this.dir?(this.dir=="ltr"):dojo._isBodyLtr();
},isFocusable:function(){
return this.focus&&(dojo.style(this.domNode,"display")!="none");
},placeAt:function(_44,_45){
if(_44.declaredClass&&_44.addChild){
_44.addChild(this,_45);
}else{
dojo.place(this.domNode,_44,_45);
}
return this;
},_onShow:function(){
this.onShow();
},onShow:function(){
},onHide:function(){
},onClose:function(){
return true;
}});
})();
}
;dojo.provide("x2sky.application.portal.PortletGroup");dojo.declare("x2sky.application.portal.PortletGroup",[dijit._Widget],{conns:null,switchOnMouseOver:false,_current:0,postCreate:function(){this.conns=[];this.links=dojo.query(".portlet-group-header ul li a",this.domNode);this.portlets=dojo.query(".portlet",this.domNode);if(this.links.length!=this.portlets.length){console.error("Buttons count doesn't equal to links count in portlet group.");return}for(var c=0;c<this.links.length;c++){var b=this.links[c];var d=this.portlets[c];this.connectLinkToPortlet(b,d,c)}},connectLinkToPortlet:function(c,e,b){var a=this;this.conns.push(dojo.connect(c,"onclick",d));if(this.switchOnMouseOver){this.conns.push(dojo.connect(c,"onmouseover",d))}function d(){if(b==a._current){return}dojo.removeClass(a.links[a._current],"active");dojo.removeClass(a.portlets[a._current],"current-portlet");dojo.addClass(c,"active");dojo.addClass(e,"current-portlet");a._current=b}},destroy:function(){this.inherited(arguments);dojo.forEach(this.conns,dojo.disconnect)}});;dojo.registerModulePath('x2sky', '../..');
dojo.registerModulePath('x2sky.application', '../../../applications');
if(!window.webows)webows = {};







var MessageEngine = me = webows.me = new x2sky.core.MessageEngine();
var dao = new x2sky.core.Dao();
me.start();


;dojo.provide("x2sky.application.portal.front.PortletBase");dojo.declare("x2sky.application.portal.front.PortletBase",[dijit._Widget],{conns:null,dao:dao,postCreate:function(){console.debug('Portlet "'+this.declaredClass+'" was initialized!');this.conns=[];this.dao=dao;var a=this;this.containerNode=dojo.query(".portlet-body",this.domNode)[0];dojo.query("[wPoint]",this.domNode).forEach(function(b){a[dojo.attr(b,"wPoint")]=b});dojo.query("[wEvent]",this.domNode).forEach(function(c){var d=dojo.attr(c,"wEvent");var b=d.split(",");dojo.forEach(b,function(e){var f=e.split(":");a.connect(c,dojo.trim(f[0]),dojo.trim(f[1]))})})},connect:function(){if(arguments.length==3){return this.inherited(arguments)}else{if(arguments.length==4){this.conns.push(dojo.connect.apply(dojo,arguments))}else{throw"Parameters error in front.portlet.connect"}}},destroy:function(){dojo.forEach(this.conns,dojo.disconnect)}});;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.string"]){
dojo._hasResource["dojo.string"]=true;
dojo.provide("dojo.string");
dojo.string.rep=function(_1,_2){
if(_2<=0||!_1){
return "";
}
var _3=[];
for(;;){
if(_2&1){
_3.push(_1);
}
if(!(_2>>=1)){
break;
}
_1+=_1;
}
return _3.join("");
};
dojo.string.pad=function(_4,_5,ch,_6){
if(!ch){
ch="0";
}
var _7=String(_4),_8=dojo.string.rep(ch,Math.ceil((_5-_7.length)/ch.length));
return _6?_7+_8:_8+_7;
};
dojo.string.substitute=function(_9,_a,_b,_c){
_c=_c||dojo.global;
_b=_b?dojo.hitch(_c,_b):function(v){
return v;
};
return _9.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_d,_e,_f){
var _10=dojo.getObject(_e,false,_a);
if(_f){
_10=dojo.getObject(_f,false,_c).call(_c,_10,_e);
}
return _b(_10,_e).toString();
});
};
dojo.string.trim=String.prototype.trim?dojo.trim:function(str){
str=str.replace(/^\s+/,"");
for(var i=str.length-1;i>=0;i--){
if(/\S/.test(str.charAt(i))){
str=str.substring(0,i+1);
break;
}
}
return str;
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._Templated"]){
dojo._hasResource["dijit._Templated"]=true;
dojo.provide("dijit._Templated");




dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){
this._attachPoints=[];
},_stringRepl:function(_1){
var _2=this.declaredClass,_3=this;
return dojo.string.substitute(_1,this,function(_4,_5){
if(_5.charAt(0)=="!"){
_4=dojo.getObject(_5.substr(1),false,_3);
}
if(typeof _4=="undefined"){
throw new Error(_2+" template:"+_5);
}
if(_4==null){
return "";
}
return _5.charAt(0)=="!"?_4:_4.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _6=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var _7;
if(dojo.isString(_6)){
_7=dojo._toDom(this._stringRepl(_6));
if(_7.nodeType!=1){
throw new Error("Invalid template: "+_6);
}
}else{
_7=_6.cloneNode(true);
}
this.domNode=_7;
this._attachTemplateNodes(_7);
if(this.widgetsInTemplate){
var _8=dojo.parser,_9,_a;
if(_8._query!="[dojoType]"){
_9=_8._query;
_a=_8._attrName;
_8._query="[dojoType]";
_8._attrName="dojoType";
}
var cw=(this._startupWidgets=dojo.parser.parse(_7,{noStart:!this._earlyTemplatedStartup,inherited:{dir:this.dir,lang:this.lang}}));
if(_9){
_8._query=_9;
_8._attrName=_a;
}
this._supportingWidgets=dijit.findWidgets(_7);
this._attachTemplateNodes(cw,function(n,p){
return n[p];
});
}
this._fillContent(this.srcNodeRef);
},_fillContent:function(_b){
var _c=this.containerNode;
if(_b&&_c){
while(_b.hasChildNodes()){
_c.appendChild(_b.firstChild);
}
}
},_attachTemplateNodes:function(_d,_e){
_e=_e||function(n,p){
return n.getAttribute(p);
};
var _f=dojo.isArray(_d)?_d:(_d.all||_d.getElementsByTagName("*"));
var x=dojo.isArray(_d)?0:-1;
for(;x<_f.length;x++){
var _10=(x==-1)?_d:_f[x];
if(this.widgetsInTemplate&&_e(_10,"dojoType")){
continue;
}
var _11=_e(_10,"dojoAttachPoint");
if(_11){
var _12,_13=_11.split(/\s*,\s*/);
while((_12=_13.shift())){
if(dojo.isArray(this[_12])){
this[_12].push(_10);
}else{
this[_12]=_10;
}
this._attachPoints.push(_12);
}
}
var _14=_e(_10,"dojoAttachEvent");
if(_14){
var _15,_16=_14.split(/\s*,\s*/);
var _17=dojo.trim;
while((_15=_16.shift())){
if(_15){
var _18=null;
if(_15.indexOf(":")!=-1){
var _19=_15.split(":");
_15=_17(_19[0]);
_18=_17(_19[1]);
}else{
_15=_17(_15);
}
if(!_18){
_18=_15;
}
this.connect(_10,_15,_18);
}
}
}
var _1a=_e(_10,"waiRole");
if(_1a){
dijit.setWaiRole(_10,_1a);
}
var _1b=_e(_10,"waiState");
if(_1b){
dojo.forEach(_1b.split(/\s*,\s*/),function(_1c){
if(_1c.indexOf("-")!=-1){
var _1d=_1c.split("-");
dijit.setWaiState(_10,_1d[0],_1d[1]);
}
});
}
}
},startup:function(){
dojo.forEach(this._startupWidgets,function(w){
if(w&&!w._started&&w.startup){
w.startup();
}
});
this.inherited(arguments);
},destroyRendering:function(){
dojo.forEach(this._attachPoints,function(_1e){
delete this[_1e];
},this);
this._attachPoints=[];
this.inherited(arguments);
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_1f,_20,_21){
var _22=dijit._Templated._templateCache;
var key=_20||_1f;
var _23=_22[key];
if(_23){
try{
if(!_23.ownerDocument||_23.ownerDocument==dojo.doc){
return _23;
}
}
catch(e){
}
dojo.destroy(_23);
}
if(!_20){
_20=dojo.cache(_1f,{sanitize:true});
}
_20=dojo.string.trim(_20);
if(_21||_20.match(/\$\{([^\}]+)\}/g)){
return (_22[key]=_20);
}else{
var _24=dojo._toDom(_20);
if(_24.nodeType!=1){
throw new Error("Invalid template: "+_20);
}
return (_22[key]=_24);
}
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
var _25=dijit._Templated._templateCache;
for(var key in _25){
var _26=_25[key];
if(typeof _26=="object"){
dojo.destroy(_26);
}
delete _25[key];
}
});
}
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.fx.Toggler"]){
dojo._hasResource["dojo.fx.Toggler"]=true;
dojo.provide("dojo.fx.Toggler");
dojo.declare("dojo.fx.Toggler",null,{node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,constructor:function(_1){
var _2=this;
dojo.mixin(_2,_1);
_2.node=_1.node;
_2._showArgs=dojo.mixin({},_1);
_2._showArgs.node=_2.node;
_2._showArgs.duration=_2.showDuration;
_2.showAnim=_2.showFunc(_2._showArgs);
_2._hideArgs=dojo.mixin({},_1);
_2._hideArgs.node=_2.node;
_2._hideArgs.duration=_2.hideDuration;
_2.hideAnim=_2.hideFunc(_2._hideArgs);
dojo.connect(_2.showAnim,"beforeBegin",dojo.hitch(_2.hideAnim,"stop",true));
dojo.connect(_2.hideAnim,"beforeBegin",dojo.hitch(_2.showAnim,"stop",true));
},show:function(_3){
return this.showAnim.play(_3||0);
},hide:function(_4){
return this.hideAnim.play(_4||0);
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");

(function(){
var d=dojo,_1={_fire:function(_2,_3){
if(this[_2]){
this[_2].apply(this,_3||[]);
}
return this;
}};
var _4=function(_5){
this._index=-1;
this._animations=_5||[];
this._current=this._onAnimateCtx=this._onEndCtx=null;
this.duration=0;
d.forEach(this._animations,function(a){
this.duration+=a.duration;
if(a.delay){
this.duration+=a.delay;
}
},this);
};
d.extend(_4,{_onAnimate:function(){
this._fire("onAnimate",arguments);
},_onEnd:function(){
d.disconnect(this._onAnimateCtx);
d.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;
if(this._index+1==this._animations.length){
this._fire("onEnd");
}else{
this._current=this._animations[++this._index];
this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");
this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");
this._current.play(0,true);
}
},play:function(_6,_7){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_7&&this._current.status()=="playing"){
return this;
}
var _8=d.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_9=d.connect(this._current,"onBegin",this,function(_a){
this._fire("onBegin",arguments);
}),_b=d.connect(this._current,"onPlay",this,function(_c){
this._fire("onPlay",arguments);
d.disconnect(_8);
d.disconnect(_9);
d.disconnect(_b);
});
if(this._onAnimateCtx){
d.disconnect(this._onAnimateCtx);
}
this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");
if(this._onEndCtx){
d.disconnect(this._onEndCtx);
}
this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");
this._current.play.apply(this._current,arguments);
return this;
},pause:function(){
if(this._current){
var e=d.connect(this._current,"onPause",this,function(_d){
this._fire("onPause",arguments);
d.disconnect(e);
});
this._current.pause();
}
return this;
},gotoPercent:function(_e,_f){
this.pause();
var _10=this.duration*_e;
this._current=null;
d.some(this._animations,function(a){
if(a.duration<=_10){
this._current=a;
return true;
}
_10-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_10/this._current.duration,_f);
}
return this;
},stop:function(_11){
if(this._current){
if(_11){
for(;this._index+1<this._animations.length;++this._index){
this._animations[this._index].stop(true);
}
this._current=this._animations[this._index];
}
var e=d.connect(this._current,"onStop",this,function(arg){
this._fire("onStop",arguments);
d.disconnect(e);
});
this._current.stop();
}
return this;
},status:function(){
return this._current?this._current.status():"stopped";
},destroy:function(){
if(this._onAnimateCtx){
d.disconnect(this._onAnimateCtx);
}
if(this._onEndCtx){
d.disconnect(this._onEndCtx);
}
}});
d.extend(_4,_1);
dojo.fx.chain=function(_12){
return new _4(_12);
};
var _13=function(_14){
this._animations=_14||[];
this._connects=[];
this._finished=0;
this.duration=0;
d.forEach(_14,function(a){
var _15=a.duration;
if(a.delay){
_15+=a.delay;
}
if(this.duration<_15){
this.duration=_15;
}
this._connects.push(d.connect(a,"onEnd",this,"_onEnd"));
},this);
this._pseudoAnimation=new d.Animation({curve:[0,1],duration:this.duration});
var _16=this;
d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(evt){
_16._connects.push(d.connect(_16._pseudoAnimation,evt,function(){
_16._fire(evt,arguments);
}));
});
};
d.extend(_13,{_doAction:function(_17,_18){
d.forEach(this._animations,function(a){
a[_17].apply(a,_18);
});
return this;
},_onEnd:function(){
if(++this._finished>this._animations.length){
this._fire("onEnd");
}
},_call:function(_19,_1a){
var t=this._pseudoAnimation;
t[_19].apply(t,_1a);
},play:function(_1b,_1c){
this._finished=0;
this._doAction("play",arguments);
this._call("play",arguments);
return this;
},pause:function(){
this._doAction("pause",arguments);
this._call("pause",arguments);
return this;
},gotoPercent:function(_1d,_1e){
var ms=this.duration*_1d;
d.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_1e);
});
this._call("gotoPercent",arguments);
return this;
},stop:function(_1f){
this._doAction("stop",arguments);
this._call("stop",arguments);
return this;
},status:function(){
return this._pseudoAnimation.status();
},destroy:function(){
d.forEach(this._connects,dojo.disconnect);
}});
d.extend(_13,_1);
dojo.fx.combine=function(_20){
return new _13(_20);
};
dojo.fx.wipeIn=function(_21){
var _22=_21.node=d.byId(_21.node),s=_22.style,o;
var _23=d.animateProperty(d.mixin({properties:{height:{start:function(){
o=s.overflow;
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s.height="1px";
s.display="";
s.visibility="";
return 1;
}else{
var _24=d.style(_22,"height");
return Math.max(_24,1);
}
},end:function(){
return _22.scrollHeight;
}}}},_21));
d.connect(_23,"onEnd",function(){
s.height="auto";
s.overflow=o;
});
return _23;
};
dojo.fx.wipeOut=function(_25){
var _26=_25.node=d.byId(_25.node),s=_26.style,o;
var _27=d.animateProperty(d.mixin({properties:{height:{end:1}}},_25));
d.connect(_27,"beforeBegin",function(){
o=s.overflow;
s.overflow="hidden";
s.display="";
});
d.connect(_27,"onEnd",function(){
s.overflow=o;
s.height="auto";
s.display="none";
});
return _27;
};
dojo.fx.slideTo=function(_28){
var _29=_28.node=d.byId(_28.node),top=null,_2a=null;
var _2b=(function(n){
return function(){
var cs=d.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
_2a=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=d.position(n,true);
top=ret.y;
_2a=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=_2a+"px";
}
};
})(_29);
_2b();
var _2c=d.animateProperty(d.mixin({properties:{top:_28.top||0,left:_28.left||0}},_28));
d.connect(_2c,"beforeBegin",_2c,_2b);
return _2c;
};
})();
}
;;dojo.cache('x2sky.application.content','templates/comments.html','<div class="content-comment">\n	<div class="comment-list" dojoAttachPoint="containerNode"></div>\n	<div class="add-comment add-comment-inactive" dojoAttachPoint="commentForm">\n		<img src="/userfiles/avatars/guest.jpg" class="user-avatar" dojoAttachPoint="userAvatar"/>\n		<div class="ta-wrapper"><textarea class="textarea" dojoAttachPoint="taContent" dojoAttachEvent="onblur:endComment, onfocus:beginComment">Leave a comment</textarea></div>\n		<input type="button" class="button" value="Submit" dojoAttachPoint="btnSave" dojoAttachEvent="onclick:saveComment"/>\n	</div>\n</div>');dojo.provide("x2sky.application.content.Comments");dojo.declare("x2sky.application.content.Comments",[dijit._Widget,dijit._Templated],{visible:true,target:"",targetId:"",targetTitle:"No title",targetUrl:"",targetSite:"",isLoaded:false,controlButton:null,statusNode:null,dao:dao,templateString:dojo.cache("x2sky.application.content","templates/comments.html"),postCreate:function(){this.inherited(arguments);if(!this.visible){dojo.addClass(this.domNode,"hide")}this.dao.addSimpleHandler("content","SaveComment");this.dao.addSimpleHandler("content","GetComments");this.conns=this.dao.bindEvents(this,"SaveComment","GetComments");if(!this.statusNode){this.statusNode=this.controlButton}var a=webows.us.url;if(!/\/$/.test(a)){a+="/"}if(webows.us.type!="guest"){this.userAvatar.src=a+"userfiles/avatars/av.jpg"}},showLoading:function(){dojo.addClass(this.controlButton||this.domNode,"action-loading")},hideLoading:function(){dojo.removeClass(this.controlButton||this.domNode,"action-loading")},saveComment:function(){var a=this.dao.createServerMessage({id:"content.msgSaveComment",sourceId:this.id,to:this.targetSite,data:{target:this.target,targetId:this.targetId,content:dojo.attr(this.taContent,"value"),targetTitle:this.targetTitle}});this.dao.sendMessage(a);x2sky.util.makeButtonBusy(this.btnSave,"Saving...");this.taContent.disabled=true},isLocal:function(){return !this.targetSite},onSaveComment:function(a){if(a.sourceId!=this.id){return}if(!dojo.query("div",this.containerNode)){this.containerNode.innerHTML=""}if(dojo.query(".no-comment",this.cotainerNode).length){this.containerNode.innerHTML=""}dojo.place(this.buildCommentItem(a.data),this.containerNode,"last");console.debug(this.statusNode);if(this.statusNode){this.updateCommentCount()}this.reset()},updateCommentCount:function(count){var stat=this.statusNode.innerHTML;if(typeof count=="undefined"||typeof count!="number"){/(\d+)/.test(stat);count=eval(RegExp.$1);count++}stat=stat.replace(/\d+|\*/,count);this.statusNode.innerHTML=stat},buildCommentItem:function(b){var c=dojo.create("div",{"class":"comment-item"});var a=b.authorUrl;c.innerHTML=['<div class="comment-memo"><',(a?"a":"span"),' href="',a,'" target="_blank" class="user-link">','<img src="',a+"/userfiles/avatars/",(a?"av":"guest"),".jpg",'" class="user-avatar"/>',b.author,"</",(a?"a":"span"),'><span class="date" title="'+(b.pubDateGMT||"")+'">',b.pubDate,'</span><a href="#" class="reply-button">Reply</a></div>','<div class="comment-body">',b.content,"</div>"].join("");return c},onErrorSaveComment:function(a){if(a.sourceId!=this.id){return}x2sky.util.cancelButtonBusy(this.btnSave);this.taContent.disabled=false;this.taContent.focus();console.error("error:"+a.error)},loadComments:function(){var a=this.dao.createMessage({id:"content.msgGetComments",sourceId:this.id,to:this.targetSite,data:{target:this.target,targetId:this.targetId}});this.dao.sendMessage(a)},onGetComments:function(a){if(a.sourceId!=this.id){return}this.domNode.style.display="block";this.hideLoading();this.isLoaded=true;this.updateCommentCount(a.data.comments.length);dojo.forEach(a.data.comments,function(b){dojo.place(this.buildCommentItem(b),this.containerNode,"last")},this);if(!a.data.comments.length){this.containerNode.innerHTML='<span class="no-comment">No comment yet.</span>'}this.show()},onErrorGetComments:function(a){if(a.sourceId!=this.id){return}this.hideLoading();alert("Error: "+a.error)},reset:function(){dojo.attr(this.taContent,"value","");x2sky.util.cancelButtonBusy(this.btnSave);this.taContent.disabled=false;this.endComment()},beginComment:function(){dojo.removeClass(this.commentForm,"add-comment-inactive");if(this.taContent.value=="Leave a comment"){this.taContent.value=""}},endComment:function(){if(this.taContent.value==""){dojo.addClass(this.commentForm,"add-comment-inactive");this.taContent.value="Leave a comment"}},toggleShow:function(){if(this.visible){this.hide()}else{this.show()}},show:function(){this.visible=true;if(!this.isLoaded){this.showLoading();this.loadComments();return}dojo.removeClass(this.domNode,"hide");this.domNode.style.display="none";dojo.fx.wipeIn({node:this.domNode,duration:300}).play()},hide:function(){this.visible=false;var a=this;dojo.fx.wipeOut({node:this.domNode,duration:300}).play()},destroy:function(){this.inherited(arguments);dojo.forEach(this.conns,dojo.disconnect)}});;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.dnd.common"]){
dojo._hasResource["dojo.dnd.common"]=true;
dojo.provide("dojo.dnd.common");
dojo.dnd.getCopyKeyState=dojo.isCopyKey;
dojo.dnd._uniqueId=0;
dojo.dnd.getUniqueId=function(){
var id;
do{
id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);
}while(dojo.byId(id));
return id;
};
dojo.dnd._empty={};
dojo.dnd.isFormElement=function(e){
var t=e.target;
if(t.nodeType==3){
t=t.parentNode;
}
return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.dnd.autoscroll"]){
dojo._hasResource["dojo.dnd.autoscroll"]=true;
dojo.provide("dojo.dnd.autoscroll");
dojo.dnd.getViewport=function(){
var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();
if(dojo.isMozilla){
return {w:dd.clientWidth,h:w.innerHeight};
}else{
if(!dojo.isOpera&&w.innerWidth){
return {w:w.innerWidth,h:w.innerHeight};
}else{
if(!dojo.isOpera&&dd&&dd.clientWidth){
return {w:dd.clientWidth,h:dd.clientHeight};
}else{
if(b.clientWidth){
return {w:b.clientWidth,h:b.clientHeight};
}
}
}
}
return null;
};
dojo.dnd.V_TRIGGER_AUTOSCROLL=32;
dojo.dnd.H_TRIGGER_AUTOSCROLL=32;
dojo.dnd.V_AUTOSCROLL_VALUE=16;
dojo.dnd.H_AUTOSCROLL_VALUE=16;
dojo.dnd.autoScroll=function(e){
var v=dojo.dnd.getViewport(),dx=0,dy=0;
if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx=-dojo.dnd.H_AUTOSCROLL_VALUE;
}else{
if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx=dojo.dnd.H_AUTOSCROLL_VALUE;
}
}
if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=-dojo.dnd.V_AUTOSCROLL_VALUE;
}else{
if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=dojo.dnd.V_AUTOSCROLL_VALUE;
}
}
window.scrollBy(dx,dy);
};
dojo.dnd._validNodes={"div":1,"p":1,"td":1};
dojo.dnd._validOverflow={"auto":1,"scroll":1};
dojo.dnd.autoScrollNodes=function(e){
for(var n=e.target;n;){
if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){
var s=dojo.getComputedStyle(n);
if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){
var b=dojo._getContentBox(n,s),t=dojo.position(n,true);
var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;
if(dojo.isWebKit||dojo.isOpera){
rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;
}
if(rx>0&&rx<b.w){
if(rx<w){
dx=-w;
}else{
if(rx>b.w-w){
dx=w;
}
}
}
if(ry>0&&ry<b.h){
if(ry<h){
dy=-h;
}else{
if(ry>b.h-h){
dy=h;
}
}
}
var _1=n.scrollLeft,_2=n.scrollTop;
n.scrollLeft=n.scrollLeft+dx;
n.scrollTop=n.scrollTop+dy;
if(_1!=n.scrollLeft||_2!=n.scrollTop){
return;
}
}
}
try{
n=n.parentNode;
}
catch(x){
n=null;
}
}
dojo.dnd.autoScroll(e);
};
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.dnd.Mover"]){
dojo._hasResource["dojo.dnd.Mover"]=true;
dojo.provide("dojo.dnd.Mover");


dojo.declare("dojo.dnd.Mover",null,{constructor:function(_1,e,_2){
this.node=dojo.byId(_1);
this.marginBox={l:e.pageX,t:e.pageY};
this.mouseButton=e.button;
var h=this.host=_2,d=_1.ownerDocument,_3=dojo.connect(d,"onmousemove",this,"onFirstMove");
this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_3];
if(h&&h.onMoveStart){
h.onMoveStart(this);
}
},onMouseMove:function(e){
dojo.dnd.autoScroll(e);
var m=this.marginBox;
this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY},e);
dojo.stopEvent(e);
},onMouseUp:function(e){
if(dojo.isWebKit&&dojo.isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){
this.destroy();
}
dojo.stopEvent(e);
},onFirstMove:function(e){
var s=this.node.style,l,t,h=this.host;
switch(s.position){
case "relative":
case "absolute":
l=Math.round(parseFloat(s.left))||0;
t=Math.round(parseFloat(s.top))||0;
break;
default:
s.position="absolute";
var m=dojo.marginBox(this.node);
var b=dojo.doc.body;
var bs=dojo.getComputedStyle(b);
var bm=dojo._getMarginBox(b,bs);
var bc=dojo._getContentBox(b,bs);
l=m.l-(bc.l-bm.l);
t=m.t-(bc.t-bm.t);
break;
}
this.marginBox.l=l-this.marginBox.l;
this.marginBox.t=t-this.marginBox.t;
if(h&&h.onFirstMove){
h.onFirstMove(this,e);
}
dojo.disconnect(this.events.pop());
},destroy:function(){
dojo.forEach(this.events,dojo.disconnect);
var h=this.host;
if(h&&h.onMoveStop){
h.onMoveStop(this);
}
this.events=this.node=this.host=null;
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.dnd.Moveable"]){
dojo._hasResource["dojo.dnd.Moveable"]=true;
dojo.provide("dojo.dnd.Moveable");

dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(_1,_2){
this.node=dojo.byId(_1);
if(!_2){
_2={};
}
this.handle=_2.handle?dojo.byId(_2.handle):null;
if(!this.handle){
this.handle=this.node;
}
this.delay=_2.delay>0?_2.delay:0;
this.skip=_2.skip;
this.mover=_2.mover?_2.mover:dojo.dnd.Mover;
this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];
},markupFactory:function(_3,_4){
return new dojo.dnd.Moveable(_4,_3);
},destroy:function(){
dojo.forEach(this.events,dojo.disconnect);
this.events=this.node=this.handle=null;
},onMouseDown:function(e){
if(this.skip&&dojo.dnd.isFormElement(e)){
return;
}
if(this.delay){
this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));
this._lastX=e.pageX;
this._lastY=e.pageY;
}else{
this.onDragDetected(e);
}
dojo.stopEvent(e);
},onMouseMove:function(e){
if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){
this.onMouseUp(e);
this.onDragDetected(e);
}
dojo.stopEvent(e);
},onMouseUp:function(e){
for(var i=0;i<2;++i){
dojo.disconnect(this.events.pop());
}
dojo.stopEvent(e);
},onSelectStart:function(e){
if(!this.skip||!dojo.dnd.isFormElement(e)){
dojo.stopEvent(e);
}
},onDragDetected:function(e){
new this.mover(this.node,e,this);
},onMoveStart:function(_5){
dojo.publish("/dnd/move/start",[_5]);
dojo.addClass(dojo.body(),"dojoMove");
dojo.addClass(this.node,"dojoMoveItem");
},onMoveStop:function(_6){
dojo.publish("/dnd/move/stop",[_6]);
dojo.removeClass(dojo.body(),"dojoMove");
dojo.removeClass(this.node,"dojoMoveItem");
},onFirstMove:function(_7,e){
},onMove:function(_8,_9,e){
this.onMoving(_8,_9);
var s=_8.node.style;
s.left=_9.l+"px";
s.top=_9.t+"px";
this.onMoved(_8,_9);
},onMoving:function(_a,_b){
},onMoved:function(_c,_d){
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.dnd.move"]){
dojo._hasResource["dojo.dnd.move"]=true;
dojo.provide("dojo.dnd.move");


dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){
},within:false,markupFactory:function(_1,_2){
return new dojo.dnd.move.constrainedMoveable(_2,_1);
},constructor:function(_3,_4){
if(!_4){
_4={};
}
this.constraints=_4.constraints;
this.within=_4.within;
},onFirstMove:function(_5){
var c=this.constraintBox=this.constraints.call(this,_5);
c.r=c.l+c.w;
c.b=c.t+c.h;
if(this.within){
var mb=dojo.marginBox(_5.node);
c.r-=mb.w;
c.b-=mb.h;
}
},onMove:function(_6,_7){
var c=this.constraintBox,s=_6.node.style;
s.left=(_7.l<c.l?c.l:c.r<_7.l?c.r:_7.l)+"px";
s.top=(_7.t<c.t?c.t:c.b<_7.t?c.b:_7.t)+"px";
}});
dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_8,_9){
return new dojo.dnd.move.boxConstrainedMoveable(_9,_8);
},constructor:function(_a,_b){
var _c=_b&&_b.box;
this.constraints=function(){
return _c;
};
}});
dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_d,_e){
return new dojo.dnd.move.parentConstrainedMoveable(_e,_d);
},constructor:function(_f,_10){
var _11=_10&&_10.area;
this.constraints=function(){
var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);
if(_11=="margin"){
return mb;
}
var t=dojo._getMarginExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(_11=="border"){
return mb;
}
t=dojo._getBorderExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(_11=="padding"){
return mb;
}
t=dojo._getPadExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
return mb;
};
}});
dojo.dnd.move.constrainedMover=function(fun,_12){
dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");
var _13=function(_14,e,_15){
dojo.dnd.Mover.call(this,_14,e,_15);
};
dojo.extend(_13,dojo.dnd.Mover.prototype);
dojo.extend(_13,{onMouseMove:function(e){
dojo.dnd.autoScroll(e);
var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;
l=l<c.l?c.l:c.r<l?c.r:l;
t=t<c.t?c.t:c.b<t?c.b:t;
this.host.onMove(this,{l:l,t:t});
},onFirstMove:function(){
dojo.dnd.Mover.prototype.onFirstMove.call(this);
var c=this.constraintBox=fun.call(this);
c.r=c.l+c.w;
c.b=c.t+c.h;
if(_12){
var mb=dojo.marginBox(this.node);
c.r-=mb.w;
c.b-=mb.h;
}
}});
return _13;
};
dojo.dnd.move.boxConstrainedMover=function(box,_16){
dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");
return dojo.dnd.move.constrainedMover(function(){
return box;
},_16);
};
dojo.dnd.move.parentConstrainedMover=function(_17,_18){
dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");
var fun=function(){
var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);
if(_17=="margin"){
return mb;
}
var t=dojo._getMarginExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(_17=="border"){
return mb;
}
t=dojo._getBorderExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
if(_17=="padding"){
return mb;
}
t=dojo._getPadExtents(n,s);
mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;
return mb;
};
return dojo.dnd.move.constrainedMover(fun,_18);
};
dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;
dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;
dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){
dojo._hasResource["dojo.dnd.TimedMoveable"]=true;
dojo.provide("dojo.dnd.TimedMoveable");

(function(){
var _1=dojo.dnd.Moveable.prototype.onMove;
dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(_2,_3){
if(!_3){
_3={};
}
if(_3.timeout&&typeof _3.timeout=="number"&&_3.timeout>=0){
this.timeout=_3.timeout;
}
},markupFactory:function(_4,_5){
return new dojo.dnd.TimedMoveable(_5,_4);
},onMoveStop:function(_6){
if(_6._timer){
clearTimeout(_6._timer);
_1.call(this,_6,_6._leftTop);
}
dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments);
},onMove:function(_7,_8){
_7._leftTop=_8;
if(!_7._timer){
var _9=this;
_7._timer=setTimeout(function(){
_7._timer=null;
_1.call(_9,_7,_7._leftTop);
},this.timeout);
}
}});
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._CssStateMixin"]){
dojo._hasResource["dijit._CssStateMixin"]=true;
dojo.provide("dijit._CssStateMixin");
dojo.declare("dijit._CssStateMixin",[],{cssStateNodes:{},postCreate:function(){
this.inherited(arguments);
dojo.forEach(["onmouseenter","onmouseleave","onmousedown"],function(e){
this.connect(this.domNode,e,"_cssMouseEvent");
},this);
this.connect(this,"set",function(_1,_2){
if(arguments.length>=2&&{disabled:true,readOnly:true,checked:true,selected:true}[_1]){
this._setStateClass();
}
});
dojo.forEach(["_onFocus","_onBlur"],function(ap){
this.connect(this,ap,"_setStateClass");
},this);
for(var ap in this.cssStateNodes){
this._trackMouseState(this[ap],this.cssStateNodes[ap]);
}
this._setStateClass();
},_cssMouseEvent:function(_3){
if(!this.disabled){
switch(_3.type){
case "mouseenter":
case "mouseover":
this._hovering=true;
this._active=this._mouseDown;
break;
case "mouseleave":
case "mouseout":
this._hovering=false;
this._active=false;
break;
case "mousedown":
this._active=true;
this._mouseDown=true;
var _4=this.connect(dojo.body(),"onmouseup",function(){
this._active=false;
this._mouseDown=false;
this._setStateClass();
this.disconnect(_4);
});
break;
}
this._setStateClass();
}
},_setStateClass:function(){
var _5=this.baseClass.split(" ");
function _6(_7){
_5=_5.concat(dojo.map(_5,function(c){
return c+_7;
}),"dijit"+_7);
};
if(!this.isLeftToRight()){
_6("Rtl");
}
if(this.checked){
_6("Checked");
}
if(this.state){
_6(this.state);
}
if(this.selected){
_6("Selected");
}
if(this.disabled){
_6("Disabled");
}else{
if(this.readOnly){
_6("ReadOnly");
}else{
if(this._active){
_6("Active");
}else{
if(this._hovering){
_6("Hover");
}
}
}
}
if(this._focused){
_6("Focused");
}
var tn=this.stateNode||this.domNode,_8={};
dojo.forEach(tn.className.split(" "),function(c){
_8[c]=true;
});
if("_stateClasses" in this){
dojo.forEach(this._stateClasses,function(c){
delete _8[c];
});
}
dojo.forEach(_5,function(c){
_8[c]=true;
});
var _9=[];
for(var c in _8){
_9.push(c);
}
tn.className=_9.join(" ");
this._stateClasses=_5;
},_trackMouseState:function(_a,_b){
var _c=false,_d=false,_e=false;
var _f=this,cn=dojo.hitch(this,"connect",_a);
function _10(){
var _11=("disabled" in _f&&_f.disabled)||("readonly" in _f&&_f.readonly);
dojo.toggleClass(_a,_b+"Hover",_c&&!_d&&!_11);
dojo.toggleClass(_a,_b+"Active",_d&&!_11);
dojo.toggleClass(_a,_b+"Focused",_e&&!_11);
};
cn("onmouseenter",function(){
_c=true;
_10();
});
cn("onmouseleave",function(){
_c=false;
_d=false;
_10();
});
cn("onmousedown",function(){
_d=true;
_10();
});
cn("onmouseup",function(){
_d=false;
_10();
});
cn("onfocus",function(){
_e=true;
_10();
});
cn("onblur",function(){
_e=false;
_10();
});
this.connect(this,"set",function(_12,_13){
if(_12=="disabled"||_12=="readOnly"){
_10();
}
});
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit.form._FormMixin"]){
dojo._hasResource["dijit.form._FormMixin"]=true;
dojo.provide("dijit.form._FormMixin");

dojo.declare("dijit.form._FormMixin",null,{reset:function(){
dojo.forEach(this.getDescendants(),function(_1){
if(_1.reset){
_1.reset();
}
});
},validate:function(){
var _2=false;
return dojo.every(dojo.map(this.getDescendants(),function(_3){
_3._hasBeenBlurred=true;
var _4=_3.disabled||!_3.validate||_3.validate();
if(!_4&&!_2){
dojo.window.scrollIntoView(_3.containerNode||_3.domNode);
_3.focus();
_2=true;
}
return _4;
}),function(_5){
return _5;
});
},setValues:function(_6){
dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");
return this.set("value",_6);
},_setValueAttr:function(_7){
var _8={};
dojo.forEach(this.getDescendants(),function(_9){
if(!_9.name){
return;
}
var _a=_8[_9.name]||(_8[_9.name]=[]);
_a.push(_9);
});
for(var _b in _8){
if(!_8.hasOwnProperty(_b)){
continue;
}
var _c=_8[_b],_d=dojo.getObject(_b,false,_7);
if(_d===undefined){
continue;
}
if(!dojo.isArray(_d)){
_d=[_d];
}
if(typeof _c[0].checked=="boolean"){
dojo.forEach(_c,function(w,i){
w.set("value",dojo.indexOf(_d,w.value)!=-1);
});
}else{
if(_c[0].multiple){
_c[0].set("value",_d);
}else{
dojo.forEach(_c,function(w,i){
w.set("value",_d[i]);
});
}
}
}
},getValues:function(){
dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");
return this.get("value");
},_getValueAttr:function(){
var _e={};
dojo.forEach(this.getDescendants(),function(_f){
var _10=_f.name;
if(!_10||_f.disabled){
return;
}
var _11=_f.get("value");
if(typeof _f.checked=="boolean"){
if(/Radio/.test(_f.declaredClass)){
if(_11!==false){
dojo.setObject(_10,_11,_e);
}else{
_11=dojo.getObject(_10,false,_e);
if(_11===undefined){
dojo.setObject(_10,null,_e);
}
}
}else{
var ary=dojo.getObject(_10,false,_e);
if(!ary){
ary=[];
dojo.setObject(_10,ary,_e);
}
if(_11!==false){
ary.push(_11);
}
}
}else{
var _12=dojo.getObject(_10,false,_e);
if(typeof _12!="undefined"){
if(dojo.isArray(_12)){
_12.push(_11);
}else{
dojo.setObject(_10,[_12,_11],_e);
}
}else{
dojo.setObject(_10,_11,_e);
}
}
});
return _e;
},isValid:function(){
this._invalidWidgets=dojo.filter(this.getDescendants(),function(_13){
return !_13.disabled&&_13.isValid&&!_13.isValid();
});
return !this._invalidWidgets.length;
},onValidStateChange:function(_14){
},_widgetChange:function(_15){
var _16=this._lastValidState;
if(!_15||this._lastValidState===undefined){
_16=this.isValid();
if(this._lastValidState===undefined){
this._lastValidState=_16;
}
}else{
if(_15.isValid){
this._invalidWidgets=dojo.filter(this._invalidWidgets||[],function(w){
return (w!=_15);
},this);
if(!_15.isValid()&&!_15.get("disabled")){
this._invalidWidgets.push(_15);
}
_16=(this._invalidWidgets.length===0);
}
}
if(_16!==this._lastValidState){
this._lastValidState=_16;
this.onValidStateChange(_16);
}
},connectChildren:function(){
dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));
var _17=this;
var _18=(this._changeConnections=[]);
dojo.forEach(dojo.filter(this.getDescendants(),function(_19){
return _19.validate;
}),function(_1a){
_18.push(_17.connect(_1a,"validate",dojo.hitch(_17,"_widgetChange",_1a)));
_18.push(_17.connect(_1a,"_setDisabledAttr",dojo.hitch(_17,"_widgetChange",_1a)));
});
this._widgetChange(null);
},startup:function(){
this.inherited(arguments);
this._changeConnections=[];
this.connectChildren();
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._DialogMixin"]){
dojo._hasResource["dijit._DialogMixin"]=true;
dojo.provide("dijit._DialogMixin");

dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_1){
},onCancel:function(){
},onExecute:function(){
},_onSubmit:function(){
this.onExecute();
this.execute(this.get("value"));
},_getFocusItems:function(_2){
var _3=dijit._getTabNavigable(dojo.byId(_2));
this._firstFocusItem=_3.lowest||_3.first||_2;
this._lastFocusItem=_3.last||_3.highest||this._firstFocusItem;
if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.getNodeProp(this._firstFocusItem,"type").toLowerCase()=="file"){
dojo.attr(_2,"tabIndex","0");
this._firstFocusItem=_2;
}
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit.DialogUnderlay"]){
dojo._hasResource["dijit.DialogUnderlay"]=true;
dojo.provide("dijit.DialogUnderlay");



dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(id){
dojo.attr(this.node,"id",id+"_underlay");
},_setClassAttr:function(_1){
this.node.className="dijitDialogUnderlay "+_1;
},postCreate:function(){
dojo.body().appendChild(this.domNode);
},layout:function(){
var is=this.node.style,os=this.domNode.style;
os.display="none";
var _2=dojo.window.getBox();
os.top=_2.t+"px";
os.left=_2.l+"px";
is.width=_2.w+"px";
is.height=_2.h+"px";
os.display="block";
},show:function(){
this.domNode.style.display="block";
this.layout();
this.bgIframe=new dijit.BackgroundIframe(this.domNode);
},hide:function(){
this.bgIframe.destroy();
this.domNode.style.display="none";
},uninitialize:function(){
if(this.bgIframe){
this.bgIframe.destroy();
}
this.inherited(arguments);
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._Contained"]){
dojo._hasResource["dijit._Contained"]=true;
dojo.provide("dijit._Contained");
dojo.declare("dijit._Contained",null,{getParent:function(){
var _1=dijit.getEnclosingWidget(this.domNode.parentNode);
return _1&&_1.isContainer?_1:null;
},_getSibling:function(_2){
var _3=this.domNode;
do{
_3=_3[_2+"Sibling"];
}while(_3&&_3.nodeType!=1);
return _3&&dijit.byNode(_3);
},getPreviousSibling:function(){
return this._getSibling("previous");
},getNextSibling:function(){
return this._getSibling("next");
},getIndexInParent:function(){
var p=this.getParent();
if(!p||!p.getIndexOfChild){
return -1;
}
return p.getIndexOfChild(this);
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit._Container"]){
dojo._hasResource["dijit._Container"]=true;
dojo.provide("dijit._Container");
dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},addChild:function(_1,_2){
var _3=this.containerNode;
if(_2&&typeof _2=="number"){
var _4=this.getChildren();
if(_4&&_4.length>=_2){
_3=_4[_2-1].domNode;
_2="after";
}
}
dojo.place(_1.domNode,_3,_2);
if(this._started&&!_1._started){
_1.startup();
}
},removeChild:function(_5){
if(typeof _5=="number"&&_5>0){
_5=this.getChildren()[_5];
}
if(_5){
var _6=_5.domNode;
if(_6&&_6.parentNode){
_6.parentNode.removeChild(_6);
}
}
},hasChildren:function(){
return this.getChildren().length>0;
},destroyDescendants:function(_7){
dojo.forEach(this.getChildren(),function(_8){
_8.destroyRecursive(_7);
});
},_getSiblingOfChild:function(_9,_a){
var _b=_9.domNode,_c=(_a>0?"nextSibling":"previousSibling");
do{
_b=_b[_c];
}while(_b&&(_b.nodeType!=1||!dijit.byNode(_b)));
return _b&&dijit.byNode(_b);
},getIndexOfChild:function(_d){
return dojo.indexOf(this.getChildren(),_d);
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_e){
_e.startup();
});
this.inherited(arguments);
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit.layout._LayoutWidget"]){
dojo._hasResource["dijit.layout._LayoutWidget"]=true;
dojo.provide("dijit.layout._LayoutWidget");



dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){
dojo.addClass(this.domNode,"dijitContainer");
this.inherited(arguments);
},startup:function(){
if(this._started){
return;
}
this.inherited(arguments);
var _1=this.getParent&&this.getParent();
if(!(_1&&_1.isLayoutContainer)){
this.resize();
this.connect(dojo.isIE?this.domNode:dojo.global,"onresize",function(){
this.resize();
});
}
},resize:function(_2,_3){
var _4=this.domNode;
if(_2){
dojo.marginBox(_4,_2);
if(_2.t){
_4.style.top=_2.t+"px";
}
if(_2.l){
_4.style.left=_2.l+"px";
}
}
var mb=_3||{};
dojo.mixin(mb,_2||{});
if(!("h" in mb)||!("w" in mb)){
mb=dojo.mixin(dojo.marginBox(_4),mb);
}
var cs=dojo.getComputedStyle(_4);
var me=dojo._getMarginExtents(_4,cs);
var be=dojo._getBorderExtents(_4,cs);
var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});
var pe=dojo._getPadExtents(_4,cs);
this._contentBox={l:dojo._toPixelValue(_4,cs.paddingLeft),t:dojo._toPixelValue(_4,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};
this.layout();
},layout:function(){
},_setupChild:function(_5){
dojo.addClass(_5.domNode,this.baseClass+"-child");
if(_5.baseClass){
dojo.addClass(_5.domNode,this.baseClass+"-"+_5.baseClass);
}
},addChild:function(_6,_7){
this.inherited(arguments);
if(this._started){
this._setupChild(_6);
}
},removeChild:function(_8){
dojo.removeClass(_8.domNode,this.baseClass+"-child");
if(_8.baseClass){
dojo.removeClass(_8.domNode,this.baseClass+"-"+_8.baseClass);
}
this.inherited(arguments);
}});
dijit.layout.marginBox2contentBox=function(_9,mb){
var cs=dojo.getComputedStyle(_9);
var me=dojo._getMarginExtents(_9,cs);
var pb=dojo._getPadBorderExtents(_9,cs);
return {l:dojo._toPixelValue(_9,cs.paddingLeft),t:dojo._toPixelValue(_9,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};
};
(function(){
var _a=function(_b){
return _b.substring(0,1).toUpperCase()+_b.substring(1);
};
var _c=function(_d,_e){
_d.resize?_d.resize(_e):dojo.marginBox(_d.domNode,_e);
dojo.mixin(_d,dojo.marginBox(_d.domNode));
dojo.mixin(_d,_e);
};
dijit.layout.layoutChildren=function(_f,dim,_10){
dim=dojo.mixin({},dim);
dojo.addClass(_f,"dijitLayoutContainer");
_10=dojo.filter(_10,function(_11){
return _11.layoutAlign!="client";
}).concat(dojo.filter(_10,function(_12){
return _12.layoutAlign=="client";
}));
dojo.forEach(_10,function(_13){
var elm=_13.domNode,pos=_13.layoutAlign;
var _14=elm.style;
_14.left=dim.l+"px";
_14.top=dim.t+"px";
_14.bottom=_14.right="auto";
dojo.addClass(elm,"dijitAlign"+_a(pos));
if(pos=="top"||pos=="bottom"){
_c(_13,{w:dim.w});
dim.h-=_13.h;
if(pos=="top"){
dim.t+=_13.h;
}else{
_14.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
_c(_13,{h:dim.h});
dim.w-=_13.w;
if(pos=="left"){
dim.l+=_13.w;
}else{
_14.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
_c(_13,dim);
}
}
}
});
};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojo.html"]){
dojo._hasResource["dojo.html"]=true;
dojo.provide("dojo.html");

(function(){
var _1=0,d=dojo;
dojo.html._secureForInnerHtml=function(_2){
return _2.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
dojo.html._emptyNode=dojo.empty;
dojo.html._setNodeContent=function(_3,_4){
d.empty(_3);
if(_4){
if(typeof _4=="string"){
_4=d._toDom(_4,_3.ownerDocument);
}
if(!_4.nodeType&&d.isArrayLike(_4)){
for(var _5=_4.length,i=0;i<_4.length;i=_5==_4.length?i+1:0){
d.place(_4[i],_3,"last");
}
}else{
d.place(_4,_3,"last");
}
}
return _3;
};
dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_6,_7){
dojo.mixin(this,_6||{});
_7=this.node=dojo.byId(this.node||_7);
if(!this.id){
this.id=["Setter",(_7)?_7.id||_7.tagName:"",_1++].join("_");
}
},set:function(_8,_9){
if(undefined!==_8){
this.content=_8;
}
if(_9){
this._mixin(_9);
}
this.onBegin();
this.setContent();
this.onEnd();
return this.node;
},setContent:function(){
var _a=this.node;
if(!_a){
throw new Error(this.declaredClass+": setContent given no node");
}
try{
_a=dojo.html._setNodeContent(_a,this.content);
}
catch(e){
var _b=this.onContentError(e);
try{
_a.innerHTML=_b;
}
catch(e){
console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e);
}
}
this.node=_a;
},empty:function(){
if(this.parseResults&&this.parseResults.length){
dojo.forEach(this.parseResults,function(w){
if(w.destroy){
w.destroy();
}
});
delete this.parseResults;
}
dojo.html._emptyNode(this.node);
},onBegin:function(){
var _c=this.content;
if(dojo.isString(_c)){
if(this.cleanContent){
_c=dojo.html._secureForInnerHtml(_c);
}
if(this.extractContent){
var _d=_c.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_d){
_c=_d[1];
}
}
}
this.empty();
this.content=_c;
return this.node;
},onEnd:function(){
if(this.parseContent){
this._parse();
}
return this.node;
},tearDown:function(){
delete this.parseResults;
delete this.node;
delete this.content;
},onContentError:function(_e){
return "Error occured setting content: "+_e;
},_mixin:function(_f){
var _10={},key;
for(key in _f){
if(key in _10){
continue;
}
this[key]=_f[key];
}
},_parse:function(){
var _11=this.node;
try{
this.parseResults=dojo.parser.parse({rootNode:_11,dir:this.dir,lang:this.lang});
}
catch(e){
this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);
}
},_onError:function(_12,err,_13){
var _14=this["on"+_12+"Error"].call(this,err);
if(_13){
console.error(_13,err);
}else{
if(_14){
dojo.html._setNodeContent(this.node,_14,true);
}
}
}});
dojo.html.set=function(_15,_16,_17){
if(undefined==_16){
console.warn("dojo.html.set: no cont argument provided, using empty string");
_16="";
}
if(!_17){
return dojo.html._setNodeContent(_15,_16,true);
}else{
var op=new dojo.html._ContentSetter(dojo.mixin(_17,{content:_16,node:_15}));
return op.set();
}
};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit.layout.ContentPane"]){
dojo._hasResource["dijit.layout.ContentPane"]=true;
dojo.provide("dijit.layout.ContentPane");






dojo.requireLocalization("dijit","loading",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw");
dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,ioArgs:{},isContainer:true,isLayoutContainer:true,onLoadDeferred:null,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[]}),postMixInProperties:function(){
this.inherited(arguments);
var _1=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_1);
this.errorMessage=dojo.string.substitute(this.errorMessage,_1);
if(!this.href&&this.srcNodeRef&&this.srcNodeRef.innerHTML){
this.isLoaded=true;
}
},buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},postCreate:function(){
this.domNode.title="";
if(!dojo.attr(this.domNode,"role")){
dijit.setWaiRole(this.domNode,"group");
}
dojo.addClass(this.domNode,this.baseClass);
},startup:function(){
if(this._started){
return;
}
var _2=dijit._Contained.prototype.getParent.call(this);
this._childOfLayoutWidget=_2&&_2.isLayoutContainer;
this._needLayout=!this._childOfLayoutWidget;
if(this.isLoaded){
dojo.forEach(this.getChildren(),function(_3){
_3.startup();
});
}
if(this._isShown()||this.preload){
this._onShow();
}
this.inherited(arguments);
},_checkIfSingleChild:function(){
var _4=dojo.query("> *",this.containerNode).filter(function(_5){
return _5.tagName!=="SCRIPT";
}),_6=_4.filter(function(_7){
return dojo.hasAttr(_7,"dojoType")||dojo.hasAttr(_7,"widgetId");
}),_8=dojo.filter(_6.map(dijit.byNode),function(_9){
return _9&&_9.domNode&&_9.resize;
});
if(_4.length==_6.length&&_8.length==1){
this._singleChild=_8[0];
}else{
delete this._singleChild;
}
dojo.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild);
},setHref:function(_a){
dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");
return this.set("href",_a);
},_setHrefAttr:function(_b){
this.cancel();
this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));
this.href=_b;
if(this._created&&(this.preload||this._isShown())){
this._load();
}else{
this._hrefChanged=true;
}
return this.onLoadDeferred;
},setContent:function(_c){
dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");
this.set("content",_c);
},_setContentAttr:function(_d){
this.href="";
this.cancel();
this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));
this._setContent(_d||"");
this._isDownloaded=false;
return this.onLoadDeferred;
},_getContentAttr:function(){
return this.containerNode.innerHTML;
},cancel:function(){
if(this._xhrDfd&&(this._xhrDfd.fired==-1)){
this._xhrDfd.cancel();
}
delete this._xhrDfd;
this.onLoadDeferred=null;
},uninitialize:function(){
if(this._beingDestroyed){
this.cancel();
}
this.inherited(arguments);
},destroyRecursive:function(_e){
if(this._beingDestroyed){
return;
}
this.inherited(arguments);
},resize:function(_f,_10){
if(!this._wasShown){
this._onShow();
}
this._resizeCalled=true;
if(_f){
dojo.marginBox(this.domNode,_f);
}
var cn=this.containerNode;
if(cn===this.domNode){
var mb=_10||{};
dojo.mixin(mb,_f||{});
if(!("h" in mb)||!("w" in mb)){
mb=dojo.mixin(dojo.marginBox(cn),mb);
}
this._contentBox=dijit.layout.marginBox2contentBox(cn,mb);
}else{
this._contentBox=dojo.contentBox(cn);
}
this._layoutChildren();
},_isShown:function(){
if(this._childOfLayoutWidget){
if(this._resizeCalled&&"open" in this){
return this.open;
}
return this._resizeCalled;
}else{
if("open" in this){
return this.open;
}else{
var _11=this.domNode;
return (_11.style.display!="none")&&(_11.style.visibility!="hidden")&&!dojo.hasClass(_11,"dijitHidden");
}
}
},_onShow:function(){
if(this.href){
if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)){
this.refresh();
}
}else{
if(!this._childOfLayoutWidget&&this._needLayout){
this._layoutChildren();
}
}
this.inherited(arguments);
this._wasShown=true;
},refresh:function(){
this.cancel();
this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));
this._load();
return this.onLoadDeferred;
},_load:function(){
this._setContent(this.onDownloadStart(),true);
var _12=this;
var _13={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_13,this.ioArgs);
}
var _14=(this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_13));
_14.addCallback(function(_15){
try{
_12._isDownloaded=true;
_12._setContent(_15,false);
_12.onDownloadEnd();
}
catch(err){
_12._onError("Content",err);
}
delete _12._xhrDfd;
return _15;
});
_14.addErrback(function(err){
if(!_14.canceled){
_12._onError("Download",err);
}
delete _12._xhrDfd;
return err;
});
delete this._hrefChanged;
},_onLoadHandler:function(_16){
this.isLoaded=true;
try{
this.onLoadDeferred.callback(_16);
this.onLoad(_16);
}
catch(e){
console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message);
}
},_onUnloadHandler:function(){
this.isLoaded=false;
try{
this.onUnload();
}
catch(e){
console.error("Error "+this.widgetId+" running custom onUnload code: "+e.message);
}
},destroyDescendants:function(){
if(this.isLoaded){
this._onUnloadHandler();
}
var _17=this._contentSetter;
dojo.forEach(this.getChildren(),function(_18){
if(_18.destroyRecursive){
_18.destroyRecursive();
}
});
if(_17){
dojo.forEach(_17.parseResults,function(_19){
if(_19.destroyRecursive&&_19.domNode&&_19.domNode.parentNode==dojo.body()){
_19.destroyRecursive();
}
});
delete _17.parseResults;
}
dojo.html._emptyNode(this.containerNode);
delete this._singleChild;
},_setContent:function(_1a,_1b){
this.destroyDescendants();
var _1c=this._contentSetter;
if(!(_1c&&_1c instanceof dojo.html._ContentSetter)){
_1c=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){
var _1d=this.onContentError(e);
try{
this.containerNode.innerHTML=_1d;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
})});
}
var _1e=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,dir:this.dir,lang:this.lang},this._contentSetterParams||{});
dojo.mixin(_1c,_1e);
_1c.set((dojo.isObject(_1a)&&_1a.domNode)?_1a.domNode:_1a);
delete this._contentSetterParams;
if(!_1b){
dojo.forEach(this.getChildren(),function(_1f){
if(!this.parseOnLoad||_1f.getParent){
_1f.startup();
}
},this);
this._scheduleLayout();
this._onLoadHandler(_1a);
}
},_onError:function(_20,err,_21){
this.onLoadDeferred.errback(err);
var _22=this["on"+_20+"Error"].call(this,err);
if(_21){
console.error(_21,err);
}else{
if(_22){
this._setContent(_22,true);
}
}
},_scheduleLayout:function(){
if(this._isShown()){
this._layoutChildren();
}else{
this._needLayout=true;
}
},_layoutChildren:function(){
if(this.doLayout){
this._checkIfSingleChild();
}
if(this._singleChild&&this._singleChild.resize){
var cb=this._contentBox||dojo.contentBox(this.containerNode);
this._singleChild.resize({w:cb.w,h:cb.h});
}else{
dojo.forEach(this.getChildren(),function(_23){
if(_23.resize){
_23.resize();
}
});
}
delete this._needLayout;
},onLoad:function(_24){
},onUnload:function(){
},onDownloadStart:function(){
return this.loadingMessage;
},onContentError:function(_25){
},onDownloadError:function(_26){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit.TooltipDialog"]){
dojo._hasResource["dijit.TooltipDialog"]=true;
dojo.provide("dijit.TooltipDialog");




dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:dojo.cache("dijit","templates/TooltipDialog.html","<div waiRole=\"presentation\">\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\n\t</div>\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\n</div>\n"),postCreate:function(){
this.inherited(arguments);
this.connect(this.containerNode,"onkeypress","_onKey");
this.containerNode.title=this.title;
},orient:function(_1,_2,_3){
var c=this._currentOrientClass;
if(c){
dojo.removeClass(this.domNode,c);
}
c="dijitTooltipAB"+(_3.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_3.charAt(0)=="T"?"Below":"Above");
dojo.addClass(this.domNode,c);
this._currentOrientClass=c;
},onOpen:function(_4){
this.orient(this.domNode,_4.aroundCorner,_4.corner);
this._onShow();
if(this.autofocus){
this._getFocusItems(this.containerNode);
dijit.focus(this._firstFocusItem);
}
},onClose:function(){
this.onHide();
},_onKey:function(_5){
var _6=_5.target;
var dk=dojo.keys;
if(_5.charOrCode===dk.TAB){
this._getFocusItems(this.containerNode);
}
var _7=(this._firstFocusItem==this._lastFocusItem);
if(_5.charOrCode==dk.ESCAPE){
setTimeout(dojo.hitch(this,"onCancel"),0);
dojo.stopEvent(_5);
}else{
if(_6==this._firstFocusItem&&_5.shiftKey&&_5.charOrCode===dk.TAB){
if(!_7){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(_5);
}else{
if(_6==this._lastFocusItem&&_5.charOrCode===dk.TAB&&!_5.shiftKey){
if(!_7){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(_5);
}else{
if(_5.charOrCode===dk.TAB){
_5.stopPropagation();
}
}
}
}
}});
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dijit.Dialog"]){
dojo._hasResource["dijit.Dialog"]=true;
dojo.provide("dijit.Dialog");











dojo.requireLocalization("dijit","common",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw");
dojo.declare("dijit._DialogBase",[dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin,dijit._CssStateMixin],{templateString:dojo.cache("dijit","templates/Dialog.html","<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel\" title=\"${buttonCancel}\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n"),baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){
var _1=dojo.i18n.getLocalization("dijit","common");
dojo.mixin(this,_1);
this.inherited(arguments);
},postCreate:function(){
dojo.style(this.domNode,{display:"none",position:"absolute"});
dojo.body().appendChild(this.domNode);
this.inherited(arguments);
this.connect(this,"onExecute","hide");
this.connect(this,"onCancel","hide");
this._modalconnects=[];
},onLoad:function(){
this._position();
if(this.autofocus){
this._getFocusItems(this.domNode);
dijit.focus(this._firstFocusItem);
}
this.inherited(arguments);
},_endDrag:function(e){
if(e&&e.node&&e.node===this.domNode){
this._relativePosition=dojo.position(e.node);
}
},_setup:function(){
var _2=this.domNode;
if(this.titleBar&&this.draggable){
this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(_2,{handle:this.titleBar}):new dojo.dnd.Moveable(_2,{handle:this.titleBar,timeout:0});
dojo.subscribe("/dnd/move/stop",this,"_endDrag");
}else{
dojo.addClass(_2,"dijitDialogFixed");
}
this.underlayAttrs={dialogId:this.id,"class":dojo.map(this["class"].split(/\s/),function(s){
return s+"_underlay";
}).join(" ")};
this._fadeIn=dojo.fadeIn({node:_2,duration:this.duration,beforeBegin:dojo.hitch(this,function(){
var _3=dijit._underlay;
if(!_3){
_3=dijit._underlay=new dijit.DialogUnderlay(this.underlayAttrs);
}else{
_3.set(this.underlayAttrs);
}
var ds=dijit._dialogStack,_4=948+ds.length*2;
if(ds.length==1){
_3.show();
}
dojo.style(dijit._underlay.domNode,"zIndex",_4);
dojo.style(this.domNode,"zIndex",_4+1);
}),onEnd:dojo.hitch(this,function(){
if(this.autofocus){
this._getFocusItems(this.domNode);
dijit.focus(this._firstFocusItem);
}
})});
this._fadeOut=dojo.fadeOut({node:_2,duration:this.duration,onEnd:dojo.hitch(this,function(){
_2.style.display="none";
var ds=dijit._dialogStack;
if(ds.length==0){
dijit._underlay.hide();
}else{
dojo.style(dijit._underlay.domNode,"zIndex",948+ds.length*2);
dijit._underlay.set(ds[ds.length-1].underlayAttrs);
}
if(this.refocus){
var _5=this._savedFocus;
if(ds.length>0){
var pd=ds[ds.length-1];
if(!dojo.isDescendant(_5.node,pd.domNode)){
pd._getFocusItems(pd.domNode);
_5=pd._firstFocusItem;
}
}
dijit.focus(_5);
}
})});
},uninitialize:function(){
var _6=false;
if(this._fadeIn&&this._fadeIn.status()=="playing"){
_6=true;
this._fadeIn.stop();
}
if(this._fadeOut&&this._fadeOut.status()=="playing"){
_6=true;
this._fadeOut.stop();
}
if((this.open||_6)&&!dijit._underlay._destroyed){
dijit._underlay.hide();
}
if(this._moveable){
this._moveable.destroy();
}
this.inherited(arguments);
},_size:function(){
this._checkIfSingleChild();
if(this._singleChild){
if(this._singleChildOriginalStyle){
this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle;
}
delete this._singleChildOriginalStyle;
}else{
dojo.style(this.containerNode,{width:"auto",height:"auto"});
}
var mb=dojo.marginBox(this.domNode);
var _7=dojo.window.getBox();
if(mb.w>=_7.w||mb.h>=_7.h){
var w=Math.min(mb.w,Math.floor(_7.w*0.75)),h=Math.min(mb.h,Math.floor(_7.h*0.75));
if(this._singleChild&&this._singleChild.resize){
this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;
this._singleChild.resize({w:w,h:h});
}else{
dojo.style(this.containerNode,{width:w+"px",height:h+"px",overflow:"auto",position:"relative"});
}
}else{
if(this._singleChild&&this._singleChild.resize){
this._singleChild.resize();
}
}
},_position:function(){
if(!dojo.hasClass(dojo.body(),"dojoMove")){
var _8=this.domNode,_9=dojo.window.getBox(),p=this._relativePosition,bb=p?null:dojo._getBorderBox(_8),l=Math.floor(_9.l+(p?p.x:(_9.w-bb.w)/2)),t=Math.floor(_9.t+(p?p.y:(_9.h-bb.h)/2));
dojo.style(_8,{left:l+"px",top:t+"px"});
}
},_onKey:function(_a){
var ds=dijit._dialogStack;
if(ds[ds.length-1]!=this){
return;
}
if(_a.charOrCode){
var dk=dojo.keys;
var _b=_a.target;
if(_a.charOrCode===dk.TAB){
this._getFocusItems(this.domNode);
}
var _c=(this._firstFocusItem==this._lastFocusItem);
if(_b==this._firstFocusItem&&_a.shiftKey&&_a.charOrCode===dk.TAB){
if(!_c){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(_a);
}else{
if(_b==this._lastFocusItem&&_a.charOrCode===dk.TAB&&!_a.shiftKey){
if(!_c){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(_a);
}else{
while(_b){
if(_b==this.domNode||dojo.hasClass(_b,"dijitPopup")){
if(_a.charOrCode==dk.ESCAPE){
this.onCancel();
}else{
return;
}
}
_b=_b.parentNode;
}
if(_a.charOrCode!==dk.TAB){
dojo.stopEvent(_a);
}else{
if(!dojo.isOpera){
try{
this._firstFocusItem.focus();
}
catch(e){
}
}
}
}
}
}
},show:function(){
if(this.open){
return;
}
if(!this._alreadyInitialized){
this._setup();
this._alreadyInitialized=true;
}
if(this._fadeOut.status()=="playing"){
this._fadeOut.stop();
}
this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));
this._modalconnects.push(dojo.connect(window,"onresize",this,function(){
var _d=dojo.window.getBox();
if(!this._oldViewport||_d.h!=this._oldViewport.h||_d.w!=this._oldViewport.w){
this.layout();
this._oldViewport=_d;
}
}));
this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));
dojo.style(this.domNode,{opacity:0,display:""});
this.open=true;
this._onShow();
this._size();
this._position();
dijit._dialogStack.push(this);
this._fadeIn.play();
this._savedFocus=dijit.getFocus(this);
},hide:function(){
var ds=dijit._dialogStack;
if(!this._alreadyInitialized||this!=ds[ds.length-1]){
return;
}
if(this._fadeIn.status()=="playing"){
this._fadeIn.stop();
}
ds.pop();
this._fadeOut.play();
if(this._scrollConnected){
this._scrollConnected=false;
}
dojo.forEach(this._modalconnects,dojo.disconnect);
this._modalconnects=[];
if(this._relativePosition){
delete this._relativePosition;
}
this.open=false;
this.onHide();
},layout:function(){
if(this.domNode.style.display!="none"){
if(dijit._underlay){
dijit._underlay.layout();
}
this._position();
}
},destroy:function(){
dojo.forEach(this._modalconnects,dojo.disconnect);
if(this.refocus&&this.open){
setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25);
}
this.inherited(arguments);
}});
dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._DialogBase],{});
dijit._dialogStack=[];

}
;;dojo.cache('x2sky.application.connection','templates/share_form.html','<ul class="form connection-share-form" style="">\n	<li class="hide tip-node" wPoint="tipNode">Success.</li>\n	<li class="textarea-container">\n		<img class="user-avatar" src="/userfiles/avatars/guest.jpg"/>\n		<textarea class="default-value" style="">Your comment here (optional)...</textarea>\n	</li>\n	<li class="content">You are sharing <a href=\'#\'>Nate</a>\'s blog dojo.io.script.get - timeout always fires</li>\n	<li class="button-bar"><input type="button" class="button-do" value="Share"/><input type="button" class="button-undo" value="Cancel"/></li>\n</ul>\n\n\n');dojo.provide("x2sky.application.connection.DijitShare");dojo.declare("x2sky.application.connection.DijitShare",[dijit._Widget],{target:"",targetId:"",targetSite:"",targetDescription:"",dao:this.dao,dialogContent:dojo.cache("x2sky.application.connection","templates/share_form.html"),postCreate:function(){this.inherited(arguments);this.dao.addSimpleHandler("connection","DoShare");this.dao.bindEvents(this,"DoShare")},getDialog:function(){var a=x2sky.application.connection.DijitShare;if(a._dialog){return a._dialog}a._dialog=new dijit.Dialog({title:"Sharing",autofocus:false});a._dialog.setContent(this.dialogContent);a._dialog._shareConns=[];return a._dialog},onCommentFocus:function(){if(dojo.hasClass(this.taComment,"default-value")){this.taComment.value="";dojo.removeClass(this.taComment,"default-value")}},onCommentBlur:function(){if(!this.taComment.value){this.taComment.value="Your comment here (optional)...";dojo.addClass(this.taComment,"default-value")}},disableAll:function(){dojo.attr(this.taComment,"disabled",true);dojo.attr(this.btnSave,"disabled",true);dojo.attr(this.btnCancel,"disabled",true)},enableAll:function(){dojo.attr(this.taComment,"disabled",false);dojo.attr(this.btnSave,"disabled",false);dojo.attr(this.btnCancel,"disabled",false);dojo.removeClass(this.btnCancel,"hide")},bindDialog:function(){var a=this.dialog.domNode;this.avatar=dojo.query(".user-avatar",a)[0];this.taComment=dojo.query("textarea",a)[0];this.description=dojo.query(".content",a)[0];this.btnSave=dojo.query(".button-do",a)[0];this.btnCancel=dojo.query(".button-undo",a)[0];this.tipNode=dojo.query("[wPoint=tipNode]",a)[0];dojo.forEach(this.dialog._shareConns,dojo.disconnect);this.dialog._shareConns.length=0;this.dialog._shareConns.push(dojo.connect(this.taComment,"focus",this,"onCommentFocus"),dojo.connect(this.taComment,"blur",this,"onCommentBlur"),dojo.connect(this.btnSave,"click",this,"_doShare"),dojo.connect(this.btnCancel,"click",dojo.hitch(this.dialog,"hide")))},resetDialog:function(){if(webows.us.type=="guest"){this.avatar.src="/userfiles/avatars/guest.jpg"}else{this.avatar.src=webows.us.url+"/userfiles/avatars/av.jpg"}this.taComment.value="Your comment here (optional)...";this.btnSave.value="Share";this.btnCancel.value="Cancel";dojo.addClass(this.taComment,"default-value");dojo.removeClass(this.btnCancel,"hide");dojo.addClass(this.tipNode,"hide");this.enableAll()},doShare:function(){this.dialog=this.getDialog();this.bindDialog();this.resetDialog();this.dialog.show();this.description.innerHTML=this.targetDescription;if(dojo.hasClass(this.domNode,"action-shared")){return}if(webows.us.type=="guest"){console.warn("You need to identify your self first.");return}},_doShare:function(){if(this.shared){this.dialog.hide();return}this.dao.sendMessage(this.dao.createServerMessage({id:"connection.msgDoShare",sourceId:this.id,data:{target:this.target,targetId:this.targetId,targetSite:this.targetSite,comment:dojo.hasClass(this.taComment,"default-value")?"":this.taComment.value}}));x2sky.makeButtonBusy(this.btnSave,"Sharing, please wait...");dojo.addClass(this.btnCancel,"hide");this.disableAll()},onDoShare:function(a){if(a.sourceId!=this.id){return}dojo.removeClass(this.domNode,"action-share");dojo.addClass(this.domNode,"action-shared");this.domNode.innerHTML=this.domNode.innerHTML.replace("Share","Shared");x2sky.cancelButtonBusy(this.btnSave);this.btnSave.value="Close";this.showSuccess("Sharing success.");this.shared=true},onErrorDoShare:function(a){if(a.sourceId!=this.id){return}this.showError(a.error);x2sky.cancelButtonBusy(this.btnSave);this.enableAll()},showError:function(a){dojo.removeClass(this.tipNode,"hide");this.tipNode.className="tip-error";this.tipNode.innerHTML=a},showInfo:function(a){dojo.removeClass(this.tipNode,"hide");this.tipNode.className="tip-info";this.tipNode.innerHTML=a},showSuccess:function(a){dojo.removeClass(this.tipNode,"hide");this.tipNode.className="tip-success";this.tipNode.innerHTML=a}});;dojo.provide("x2sky.application.connection.DijitLike");dojo.declare("x2sky.application.connection.DijitLike",[dijit._Widget],{target:"",targetId:"",targetTitle:"No title",targetUrl:"",postCreate:function(){this.inherited(arguments);this.dao.addSimpleHandler("connection","DoLike");this.dao.bindEvents(this,"DoLike")},doLike:function(){if(dojo.hasClass(this.domNode,"action-liked")){return}dojo.removeClass(this.domNode,"action-like");dojo.addClass(this.domNode,"action-liked");this.domNode.innerHTML=this.domNode.innerHTML.replace("Like","Liked")},onDoLike:function(a){if(a.sourceId!=this.id){return}},onErrorDoLike:function(a){if(a.sourceId!=this.id){return}}});;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight._base"]){
dojo._hasResource["dojox.highlight._base"]=true;
dojo.provide("dojox.highlight._base");
(function(){
var dh=dojox.highlight,_1="\\b(0x[A-Za-z0-9]+|\\d+(\\.\\d+)?)";
dh.constants={IDENT_RE:"[a-zA-Z][a-zA-Z0-9_]*",UNDERSCORE_IDENT_RE:"[a-zA-Z_][a-zA-Z0-9_]*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:_1,APOS_STRING_MODE:{className:"string",begin:"'",end:"'",illegal:"\\n",contains:["escape"],relevance:0},QUOTE_STRING_MODE:{className:"string",begin:"\"",end:"\"",illegal:"\\n",contains:["escape"],relevance:0},BACKSLASH_ESCAPE:{className:"escape",begin:"\\\\.",end:"^",relevance:0},C_LINE_COMMENT_MODE:{className:"comment",begin:"//",end:"$",relevance:0},C_BLOCK_COMMENT_MODE:{className:"comment",begin:"/\\*",end:"\\*/"},HASH_COMMENT_MODE:{className:"comment",begin:"#",end:"$"},C_NUMBER_MODE:{className:"number",begin:_1,end:"^",relevance:0}};
function _2(_3){
return _3.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;");
};
function _4(_5){
return dojo.every(_5.childNodes,function(_6){
return _6.nodeType==3||String(_6.nodeName).toLowerCase()=="br";
});
};
function _7(_8){
var _9=[];
dojo.forEach(_8.childNodes,function(_a){
if(_a.nodeType==3){
_9.push(_a.nodeValue);
}else{
if(String(_a.nodeName).toLowerCase()=="br"){
_9.push("\n");
}else{
throw "Complex markup";
}
}
});
return _9.join("");
};
function _b(_c){
if(!_c.keywordGroups){
for(var _d in _c.keywords){
var kw=_c.keywords[_d];
if(kw instanceof Object){
_c.keywordGroups=_c.keywords;
}else{
_c.keywordGroups={keyword:_c.keywords};
}
break;
}
}
};
function _e(_f){
if(_f.defaultMode&&_f.modes){
_b(_f.defaultMode);
dojo.forEach(_f.modes,_b);
}
};
var _10=function(_11,_12){
this.langName=_11;
this.lang=dh.languages[_11];
this.modes=[this.lang.defaultMode];
this.relevance=0;
this.keywordCount=0;
this.result=[];
if(!this.lang.defaultMode.illegalRe){
this.buildRes();
_e(this.lang);
}
try{
this.highlight(_12);
this.result=this.result.join("");
}
catch(e){
if(e=="Illegal"){
this.relevance=0;
this.keywordCount=0;
this.partialResult=this.result.join("");
this.result=_2(_12);
}else{
throw e;
}
}
};
dojo.extend(_10,{buildRes:function(){
dojo.forEach(this.lang.modes,function(_13){
if(_13.begin){
_13.beginRe=this.langRe("^"+_13.begin);
}
if(_13.end){
_13.endRe=this.langRe("^"+_13.end);
}
if(_13.illegal){
_13.illegalRe=this.langRe("^(?:"+_13.illegal+")");
}
},this);
this.lang.defaultMode.illegalRe=this.langRe("^(?:"+this.lang.defaultMode.illegal+")");
},subMode:function(_14){
var _15=this.modes[this.modes.length-1].contains;
if(_15){
var _16=this.lang.modes;
for(var i=0;i<_15.length;++i){
var _17=_15[i];
for(var j=0;j<_16.length;++j){
var _18=_16[j];
if(_18.className==_17&&_18.beginRe.test(_14)){
return _18;
}
}
}
}
return null;
},endOfMode:function(_19){
for(var i=this.modes.length-1;i>=0;--i){
var _1a=this.modes[i];
if(_1a.end&&_1a.endRe.test(_19)){
return this.modes.length-i;
}
if(!_1a.endsWithParent){
break;
}
}
return 0;
},isIllegal:function(_1b){
var _1c=this.modes[this.modes.length-1].illegalRe;
return _1c&&_1c.test(_1b);
},langRe:function(_1d,_1e){
var _1f="m"+(this.lang.case_insensitive?"i":"")+(_1e?"g":"");
return new RegExp(_1d,_1f);
},buildTerminators:function(){
var _20=this.modes[this.modes.length-1],_21={};
if(_20.contains){
dojo.forEach(this.lang.modes,function(_22){
if(dojo.indexOf(_20.contains,_22.className)>=0){
_21[_22.begin]=1;
}
});
}
for(var i=this.modes.length-1;i>=0;--i){
var m=this.modes[i];
if(m.end){
_21[m.end]=1;
}
if(!m.endsWithParent){
break;
}
}
if(_20.illegal){
_21[_20.illegal]=1;
}
var t=[];
for(i in _21){
t.push(i);
}
_20.terminatorsRe=this.langRe("("+t.join("|")+")");
},eatModeChunk:function(_23,_24){
var _25=this.modes[this.modes.length-1];
if(!_25.terminatorsRe){
this.buildTerminators();
}
_23=_23.substr(_24);
var _26=_25.terminatorsRe.exec(_23);
if(!_26){
return {buffer:_23,lexeme:"",end:true};
}
return {buffer:_26.index?_23.substr(0,_26.index):"",lexeme:_26[0],end:false};
},keywordMatch:function(_27,_28){
var _29=_28[0];
if(this.lang.case_insensitive){
_29=_29.toLowerCase();
}
for(var _2a in _27.keywordGroups){
if(_29 in _27.keywordGroups[_2a]){
return _2a;
}
}
return "";
},buildLexemes:function(_2b){
var _2c={};
dojo.forEach(_2b.lexems,function(_2d){
_2c[_2d]=1;
});
var t=[];
for(var i in _2c){
t.push(i);
}
_2b.lexemsRe=this.langRe("("+t.join("|")+")",true);
},processKeywords:function(_2e){
var _2f=this.modes[this.modes.length-1];
if(!_2f.keywords||!_2f.lexems){
return _2(_2e);
}
if(!_2f.lexemsRe){
this.buildLexemes(_2f);
}
_2f.lexemsRe.lastIndex=0;
var _30=[],_31=0,_32=_2f.lexemsRe.exec(_2e);
while(_32){
_30.push(_2(_2e.substr(_31,_32.index-_31)));
var _33=this.keywordMatch(_2f,_32);
if(_33){
++this.keywordCount;
_30.push("<span class=\""+_33+"\">"+_2(_32[0])+"</span>");
}else{
_30.push(_2(_32[0]));
}
_31=_2f.lexemsRe.lastIndex;
_32=_2f.lexemsRe.exec(_2e);
}
_30.push(_2(_2e.substr(_31,_2e.length-_31)));
return _30.join("");
},processModeInfo:function(_34,_35,end){
var _36=this.modes[this.modes.length-1];
if(end){
this.result.push(this.processKeywords(_36.buffer+_34));
return;
}
if(this.isIllegal(_35)){
throw "Illegal";
}
var _37=this.subMode(_35);
if(_37){
_36.buffer+=_34;
this.result.push(this.processKeywords(_36.buffer));
if(_37.excludeBegin){
this.result.push(_35+"<span class=\""+_37.className+"\">");
_37.buffer="";
}else{
this.result.push("<span class=\""+_37.className+"\">");
_37.buffer=_35;
}
this.modes.push(_37);
this.relevance+=typeof _37.relevance=="number"?_37.relevance:1;
return;
}
var _38=this.endOfMode(_35);
if(_38){
_36.buffer+=_34;
if(_36.excludeEnd){
this.result.push(this.processKeywords(_36.buffer)+"</span>"+_35);
}else{
this.result.push(this.processKeywords(_36.buffer+_35)+"</span>");
}
while(_38>1){
this.result.push("</span>");
--_38;
this.modes.pop();
}
this.modes.pop();
this.modes[this.modes.length-1].buffer="";
return;
}
},highlight:function(_39){
var _3a=0;
this.lang.defaultMode.buffer="";
do{
var _3b=this.eatModeChunk(_39,_3a);
this.processModeInfo(_3b.buffer,_3b.lexeme,_3b.end);
_3a+=_3b.buffer.length+_3b.lexeme.length;
}while(!_3b.end);
if(this.modes.length>1){
throw "Illegal";
}
}});
function _3c(_3d,_3e,_3f){
if(String(_3d.tagName).toLowerCase()=="code"&&String(_3d.parentNode.tagName).toLowerCase()=="pre"){
var _40=document.createElement("div"),_41=_3d.parentNode.parentNode;
_40.innerHTML="<pre><code class=\""+_3e+"\">"+_3f+"</code></pre>";
_41.replaceChild(_40.firstChild,_3d.parentNode);
}else{
_3d.className=_3e;
_3d.innerHTML=_3f;
}
};
function _42(_43,str){
var _44=new _10(_43,str);
return {result:_44.result,langName:_43,partialResult:_44.partialResult};
};
function _45(_46,_47){
var _48=_42(_47,_7(_46));
_3c(_46,_46.className,_48.result);
};
function _49(str){
var _4a="",_4b="",_4c=2,_4d=str;
for(var key in dh.languages){
if(!dh.languages[key].defaultMode){
continue;
}
var _4e=new _10(key,_4d),_4f=_4e.keywordCount+_4e.relevance,_50=0;
if(!_4a||_4f>_50){
_50=_4f;
_4a=_4e.result;
_4b=_4e.langName;
}
}
return {result:_4a,langName:_4b};
};
function _51(_52){
var _53=_49(_7(_52));
if(_53.result){
_3c(_52,_53.langName,_53.result);
}
};
dojox.highlight.processString=function(str,_54){
return _54?_42(_54,str):_49(str);
};
dojox.highlight.init=function(_55){
_55=dojo.byId(_55);
if(dojo.hasClass(_55,"no-highlight")){
return;
}
if(!_4(_55)){
return;
}
var _56=_55.className.split(/\s+/),_57=dojo.some(_56,function(_58){
if(_58.charAt(0)!="_"&&dh.languages[_58]){
_45(_55,_58);
return true;
}
return false;
});
if(!_57){
_51(_55);
}
};
dh.Code=function(p,n){
dh.init(n);
};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight"]){
dojo._hasResource["dojox.highlight"]=true;
dojo.provide("dojox.highlight");

}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.cpp"]){
dojo._hasResource["dojox.highlight.languages.cpp"]=true;
dojo.provide("dojox.highlight.languages.cpp");

(function(){
var dh=dojox.highlight,_1=dh.constants;
dh.languages.cpp={defaultMode:{lexems:[_1.UNDERSCORE_IDENT_RE],illegal:"</",contains:["comment","string","number","preprocessor"],keywords:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,"virtual":1,"operator":2,"sizeof":2,"dynamic_cast":2,"typedef":2,"const_cast":2,"const":1,"struct":1,"for":1,"static_cast":2,"union":1,"namespace":1,"unsigned":1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,"bool":1,"template":1,"mutable":1,"if":1,"public":1,"friend":2,"do":1,"return":1,"goto":1,"auto":1,"void":2,"enum":1,"else":1,"break":1,"new":1,"extern":1,"using":1,"true":1,"class":1,"asm":1,"case":1,"typeid":1,"short":1,"reinterpret_cast":2,"default":1,"double":1,"register":1,"explicit":1,"signed":1,"typename":1,"try":1,"this":1,"switch":1,"continue":1,"wchar_t":1,"inline":1,"delete":1}},modes:[_1.C_LINE_COMMENT_MODE,_1.C_BLOCK_COMMENT_MODE,_1.C_NUMBER_MODE,_1.QUOTE_STRING_MODE,_1.BACKSLASH_ESCAPE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"preprocessor",begin:"#",end:"$"}]};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.java"]){
dojo._hasResource["dojox.highlight.languages.java"]=true;
dojo.provide("dojox.highlight.languages.java");

(function(){
var dh=dojox.highlight,_1=dh.constants;
var _2={"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"abstract":1,"assert":1,"const":1,"byte":1,"for":1,"final":1,"finally":1,"implements":1,"import":1,"extends":1,"long":1,"throw":1,"instanceof":2,"static":1,"protected":1,"boolean":1,"interface":2,"native":1,"if":1,"public":1,"new":1,"do":1,"return":1,"goto":1,"package":2,"void":2,"short":1,"else":1,"break":1,"new":1,"strictfp":1,"super":1,"true":1,"class":1,"synchronized":1,"case":1,"this":1,"short":1,"throws":1,"transient":1,"double":1,"volatile":1,"try":1,"this":1,"switch":1,"continue":1};
dh.languages.java={defaultMode:{lexems:[_1.UNDERSCORE_IDENT_RE],illegal:"</",contains:["comment","string","number","function","block"],keywords:_2},modes:[_1.C_LINE_COMMENT_MODE,_1.C_BLOCK_COMMENT_MODE,_1.C_NUMBER_MODE,_1.QUOTE_STRING_MODE,_1.BACKSLASH_ESCAPE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"function",begin:"\\(",end:"\\)",contains:["comment","number","string","function","block"],keywords:_2},{lexems:[_1.UNDERSCORE_IDENT_RE],className:"block",begin:"\\{",end:"\\}",contains:["comment","string","number","function","block"],keywords:_2}]};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.delphi"]){
dojo._hasResource["dojox.highlight.languages.delphi"]=true;
dojo.provide("dojox.highlight.languages.delphi");

(function(){
var _1={"and":1,"safecall":1,"cdecl":1,"then":1,"string":1,"exports":1,"library":1,"not":1,"pascal":1,"set":1,"virtual":1,"file":1,"in":1,"array":1,"label":1,"packed":1,"end.":1,"index":1,"while":1,"const":1,"raise":1,"for":1,"to":1,"implementation":1,"with":1,"except":1,"overload":1,"destructor":1,"downto":1,"finally":1,"program":1,"exit":1,"unit":1,"inherited":1,"override":1,"if":1,"type":1,"until":1,"function":1,"do":1,"begin":1,"repeat":1,"goto":1,"nil":1,"far":1,"initialization":1,"object":1,"else":1,"var":1,"uses":1,"external":1,"resourcestring":1,"interface":1,"end":1,"finalization":1,"class":1,"asm":1,"mod":1,"case":1,"on":1,"shr":1,"shl":1,"of":1,"register":1,"xorwrite":1,"threadvar":1,"try":1,"record":1,"near":1,"stored":1,"constructor":1,"stdcall":1,"inline":1,"div":1,"out":1,"or":1,"procedure":1};
var _2={"safecall":1,"stdcall":1,"pascal":1,"stored":1,"const":1,"implementation":1,"finalization":1,"except":1,"to":1,"finally":1,"program":1,"inherited":1,"override":1,"then":1,"exports":1,"string":1,"read":1,"not":1,"mod":1,"shr":1,"try":1,"div":1,"shl":1,"set":1,"library":1,"message":1,"packed":1,"index":1,"for":1,"near":1,"overload":1,"label":1,"downto":1,"exit":1,"public":1,"goto":1,"interface":1,"asm":1,"on":1,"of":1,"constructor":1,"or":1,"private":1,"array":1,"unit":1,"raise":1,"destructor":1,"var":1,"type":1,"until":1,"function":1,"else":1,"external":1,"with":1,"case":1,"default":1,"record":1,"while":1,"protected":1,"property":1,"procedure":1,"published":1,"and":1,"cdecl":1,"do":1,"threadvar":1,"file":1,"in":1,"if":1,"end":1,"virtual":1,"write":1,"far":1,"out":1,"begin":1,"repeat":1,"nil":1,"initialization":1,"object":1,"uses":1,"resourcestring":1,"class":1,"register":1,"xorwrite":1,"inline":1};
var dh=dojox.highlight,_3=dh.constants;
dh.languages.delphi={defaultMode:{lexems:[_3.IDENT_RE],illegal:"(\"|\\$[G-Zg-z]|\\/\\*|</)",contains:["comment","string","number","function","class"],keywords:_1},case_insensitive:true,modes:[{className:"comment",begin:"{",end:"}"},{className:"comment",begin:"\\(\\*",end:"\\*\\)",relevance:10},_3.C_LINE_COMMENT_MODE,{className:"number",begin:_3.NUMBER_RE,end:"^",relevance:0},{className:"string",begin:"'",end:"'",contains:["quote"],relevance:0},{className:"string",begin:"(#\\d+)+",end:"^"},{className:"quote",begin:"''",end:"^"},{className:"function",begin:"function",end:"[:;]",lexems:[_3.IDENT_RE],keywords:{"function":1},contains:["title","params","comment"],relevance:0},{className:"function",begin:"(procedure|constructor|destructor)",end:";",lexems:[_3.IDENT_RE],keywords:{"constructor":1,"destructor":1,"procedure":1},contains:["title","params","comment"],relevance:10},{className:"title",begin:_3.IDENT_RE,end:"^"},{className:"params",begin:"\\(",end:"\\)",lexems:[_3.IDENT_RE],keywords:_1,contains:["string"]},{className:"class",begin:"=\\s*class",end:"end;",lexems:[_3.IDENT_RE],keywords:_2,contains:["string","comment","function"]}]};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages._static"]){
dojo._hasResource["dojox.highlight.languages._static"]=true;
dojo.provide("dojox.highlight.languages._static");



}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.python"]){
dojo._hasResource["dojox.highlight.languages.python"]=true;
dojo.provide("dojox.highlight.languages.python");

(function(){
var dh=dojox.highlight,_1=dh.constants;
dh.languages.python={defaultMode:{lexems:[_1.UNDERSCORE_IDENT_RE],illegal:"(</|->)",contains:["comment","string","function","class","number","decorator"],keywords:{"and":1,"elif":1,"is":1,"global":1,"as":1,"in":1,"if":1,"from":1,"raise":1,"for":1,"except":1,"finally":1,"print":1,"import":1,"pass":1,"None":1,"return":1,"exec":1,"else":1,"break":1,"not":1,"with":1,"class":1,"assert":1,"yield":1,"try":1,"while":1,"continue":1,"del":1,"or":1,"def":1,"lambda":1}},modes:[{className:"function",lexems:[_1.UNDERSCORE_IDENT_RE],begin:"\\bdef ",end:":",illegal:"$",keywords:{"def":1},contains:["title","params"],relevance:10},{className:"class",lexems:[_1.UNDERSCORE_IDENT_RE],begin:"\\bclass ",end:":",illegal:"[${]",keywords:{"class":1},contains:["title","params"],relevance:10},{className:"title",begin:_1.UNDERSCORE_IDENT_RE,end:"^"},{className:"params",begin:"\\(",end:"\\)",contains:["string"]},_1.HASH_COMMENT_MODE,_1.C_NUMBER_MODE,{className:"string",begin:"'''",end:"'''",relevance:10},{className:"string",begin:"\"\"\"",end:"\"\"\"",relevance:10},_1.APOS_STRING_MODE,_1.QUOTE_STRING_MODE,_1.BACKSLASH_ESCAPE,{className:"string",begin:"r'",end:"'",relevance:10},{className:"string",begin:"r\"",end:"\"",relevance:10},{className:"string",begin:"u'",end:"(^|[^\\\\])'",relevance:10},{className:"string",begin:"u\"",end:"(^|[^\\\\])\"",relevance:10},{className:"string",begin:"ur'",end:"'",relevance:10},{className:"string",begin:"ur\"",end:"\"",relevance:10},{className:"decorator",begin:"@",end:"$"}]};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.xquery"]){
dojo._hasResource["dojox.highlight.languages.xquery"]=true;
dojo.provide("dojox.highlight.languages.xquery");

(function(){
var _1={className:"comment",begin:"\\(\\:",end:"\\:\\)"};
var _2={"ancestor":1,"ancestor-or-self":1,"and":1,"as":1,"ascending":1,"at":1,"attribute":1,"base-uri":1,"boundary-space":1,"by":1,"case":1,"cast":1,"castable":1,"child":1,"collation":1,"comment":1,"construction":1,"copy-namespaces":1,"declare":1,"default":1,"descendant":1,"descendant-or-self":1,"descending":1,"div":1,"document":1,"document-node":1,"element":1,"else":1,"empty":1,"empty-sequence":1,"encoding":1,"eq":1,"every":1,"except":1,"external":1,"following":1,"following-sibling":1,"for":1,"function":1,"ge":1,"greatest":1,"gt":1,"idiv":1,"if":1,"import":1,"in":1,"inherit":1,"instance":1,"intersect":1,"is":1,"item":1,"lax":1,"le":1,"least":1,"let":1,"lt":1,"mod":1,"module":1,"namespace":1,"ne":1,"node":1,"no-inherit":1,"no-preserve":1,"of":1,"option":1,"or":1,"order":1,"ordered":1,"ordering":1,"parent":1,"preceding":1,"preceding-sibling":1,"preserve":1,"processing-instruction":1,"return":1,"satisfies":1,"schema":1,"schema-attribute":1,"schema-element":1,"self":1,"some":1,"stable":1,"strict":1,"strip":1,"text":1,"then":1,"to":1,"treat":1,"typeswitch":1,"union":1,"unordered":1,"validate":1,"variable":1,"version":1,"where":1,"xquery":1};
var dh=dojox.highlight,_3=dh.constants;
dh.languages.xquery={case_insensitive:true,defaultMode:{lexems:[_3.IDENT_RE],contains:["string","number","comment"],keywords:{"keyword":_2}},modes:[_1],XQUERY_COMMENT:_1};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.groovy"]){
dojo._hasResource["dojox.highlight.languages.groovy"]=true;
dojo.provide("dojox.highlight.languages.groovy");

(function(){
var dh=dojox.highlight,_1=dh.constants;
var _2={"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"abstract":1,"assert":1,"const":1,"byte":1,"for":1,"final":1,"finally":1,"implements":1,"import":1,"extends":1,"long":1,"throw":1,"instanceof":2,"static":1,"protected":1,"boolean":1,"interface":2,"native":1,"if":1,"public":1,"new":1,"do":1,"return":1,"goto":1,"package":2,"void":2,"short":1,"else":1,"break":1,"new":1,"strictfp":1,"super":1,"true":1,"class":1,"synchronized":1,"case":1,"this":1,"short":1,"throws":1,"transient":1,"double":1,"volatile":1,"try":1,"this":1,"switch":1,"continue":1,"def":2};
dh.languages.groovy={defaultMode:{lexems:[_1.UNDERSCORE_IDENT_RE],illegal:"</",contains:["comment","string","number","function","block"],keywords:_2},modes:[_1.C_LINE_COMMENT_MODE,_1.C_BLOCK_COMMENT_MODE,_1.C_NUMBER_MODE,{className:"string",begin:"\"\"\"",end:"\"\"\"",contains:["escape"],relevance:0},_1.QUOTE_STRING_MODE,_1.BACKSLASH_ESCAPE,{className:"string",begin:"'''",end:"'''",contains:["escape"],relevance:0},_1.APOS_STRING_MODE,{className:"function",begin:"\\(",end:"\\)",contains:["comment","number","string","function","block"],keywords:_2},{lexems:[_1.UNDERSCORE_IDENT_RE],className:"block",begin:"\\{",end:"\\}",contains:["comment","string","number","function","block"],keywords:_2}],GROOVY_KEYWORDS:_2};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages._dynamic"]){
dojo._hasResource["dojox.highlight.languages._dynamic"]=true;
dojo.provide("dojox.highlight.languages._dynamic");



}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.xml"]){
dojo._hasResource["dojox.highlight.languages.xml"]=true;
dojo.provide("dojox.highlight.languages.xml");

(function(){
var _1={className:"comment",begin:"<!--",end:"-->"};
var _2={className:"attribute",begin:" [a-zA-Z-]+=",end:"^",contains:["value"]};
var _3={className:"value",begin:"\"",end:"\""};
var dh=dojox.highlight,_4=dh.constants;
dh.languages.xml={defaultMode:{contains:["pi","comment","cdata","tag"]},case_insensitive:true,modes:[{className:"pi",begin:"<\\?",end:"\\?>",relevance:10},_1,{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>"},{className:"tag",begin:"</?",end:">",contains:["title","tag_internal"],relevance:1.5},{className:"title",begin:"[A-Za-z:_][A-Za-z0-9\\._:-]+",end:"^",relevance:0},{className:"tag_internal",begin:"^",endsWithParent:true,contains:["attribute"],relevance:0,illegal:"[\\+\\.]"},_2,_3],XML_COMMENT:_1,XML_ATTR:_2,XML_VALUE:_3};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.html"]){
dojo._hasResource["dojox.highlight.languages.html"]=true;
dojo.provide("dojox.highlight.languages.html");


(function(){
var _1={"code":1,"kbd":1,"font":1,"noscript":1,"style":1,"img":1,"title":1,"menu":1,"tt":1,"tr":1,"param":1,"li":1,"tfoot":1,"th":1,"input":1,"td":1,"dl":1,"blockquote":1,"fieldset":1,"big":1,"dd":1,"abbr":1,"optgroup":1,"dt":1,"button":1,"isindex":1,"p":1,"small":1,"div":1,"dir":1,"em":1,"frame":1,"meta":1,"sub":1,"bdo":1,"label":1,"acronym":1,"sup":1,"body":1,"xml":1,"basefont":1,"base":1,"br":1,"address":1,"strong":1,"legend":1,"ol":1,"script":1,"caption":1,"s":1,"col":1,"h2":1,"h3":1,"h1":1,"h6":1,"h4":1,"h5":1,"table":1,"select":1,"noframes":1,"span":1,"area":1,"dfn":1,"strike":1,"cite":1,"thead":1,"head":1,"option":1,"form":1,"hr":1,"var":1,"link":1,"b":1,"colgroup":1,"ul":1,"applet":1,"del":1,"iframe":1,"pre":1,"frameset":1,"ins":1,"tbody":1,"html":1,"samp":1,"map":1,"object":1,"a":1,"xmlns":1,"center":1,"textarea":1,"i":1,"q":1,"u":1};
var _2={className:"doctype",begin:"<!DOCTYPE",end:">",relevance:10};
var _3={className:"attribute",begin:" [a-zA-Z]+",end:"^"};
var _4={className:"value",begin:"[a-zA-Z0-9]+",end:"^"};
var dh=dojox.highlight,_5=dh.constants,_6=dh.languages,x=_6.xml;
_6.html={defaultMode:{contains:["tag","comment","doctype"]},case_insensitive:true,modes:[x.XML_COMMENT,_2,{className:"tag",lexems:[_5.IDENT_RE],keywords:_1,begin:"<[A-Za-z/]",end:">",contains:["attribute"],illegal:"[\\+\\.]"},x.XML_ATTR,_3,x.XML_VALUE,_4],HTML_TAGS:_1,HTML_DOCTYPE:_2,HTML_ATTR:_3,HTML_VALUE:_4};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.css"]){
dojo._hasResource["dojox.highlight.languages.css"]=true;
dojo.provide("dojox.highlight.languages.css");


(function(){
var dh=dojox.highlight,_1=dh.constants,_2=dh.languages;
_2.css={defaultMode:{contains:["id","class","attr_selector","rules","comment"],keywords:_2.html.HTML_TAGS,lexems:[_1.IDENT_RE],illegal:"="},case_insensitive:true,modes:[{className:"id",begin:"\\#[A-Za-z0-9_-]+",end:"^"},{className:"class",begin:"\\.[A-Za-z0-9_-]+",end:"^",relevance:0},{className:"attr_selector",begin:"\\[",end:"\\]",illegal:"$"},{className:"rules",begin:"{",end:"}",lexems:["[A-Za-z-]+"],keywords:{"play-during":1,"counter-reset":1,"counter-increment":1,"min-height":1,"quotes":1,"border-top":1,"pitch":1,"font":1,"pause":1,"list-style-image":1,"border-width":1,"cue":1,"outline-width":1,"border-left":1,"elevation":1,"richness":1,"speech-rate":1,"border-bottom":1,"border-spacing":1,"background":1,"list-style-type":1,"text-align":1,"page-break-inside":1,"orphans":1,"page-break-before":1,"text-transform":1,"line-height":1,"padding-left":1,"font-size":1,"right":1,"word-spacing":1,"padding-top":1,"outline-style":1,"bottom":1,"content":1,"border-right-style":1,"padding-right":1,"border-left-style":1,"voice-family":1,"background-color":1,"border-bottom-color":1,"outline-color":1,"unicode-bidi":1,"max-width":1,"font-family":1,"caption-side":1,"border-right-width":1,"pause-before":1,"border-top-style":1,"color":1,"border-collapse":1,"border-bottom-width":1,"float":1,"height":1,"max-height":1,"margin-right":1,"border-top-width":1,"speak":1,"speak-header":1,"top":1,"cue-before":1,"min-width":1,"width":1,"font-variant":1,"border-top-color":1,"background-position":1,"empty-cells":1,"direction":1,"border-right":1,"visibility":1,"padding":1,"border-style":1,"background-attachment":1,"overflow":1,"border-bottom-style":1,"cursor":1,"margin":1,"display":1,"border-left-width":1,"letter-spacing":1,"vertical-align":1,"clip":1,"border-color":1,"list-style":1,"padding-bottom":1,"pause-after":1,"speak-numeral":1,"margin-left":1,"widows":1,"border":1,"font-style":1,"border-left-color":1,"pitch-range":1,"background-repeat":1,"table-layout":1,"margin-bottom":1,"speak-punctuation":1,"font-weight":1,"border-right-color":1,"page-break-after":1,"position":1,"white-space":1,"text-indent":1,"background-image":1,"volume":1,"stress":1,"outline":1,"clear":1,"z-index":1,"text-decoration":1,"margin-top":1,"azimuth":1,"cue-after":1,"left":1,"list-style-position":1},contains:["comment","value"]},_1.C_BLOCK_COMMENT_MODE,{className:"value",begin:":",end:";",endsWithParent:true,excludeBegin:true,excludeEnd:true}]};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.django"]){
dojo._hasResource["dojox.highlight.languages.django"]=true;
dojo.provide("dojox.highlight.languages.django");



(function(){
var dh=dojox.highlight,_1=dh.constants,_2=dh.languages,x=_2.xml,h=_2.html;
_2.django={defaultMode:{contains:["tag","comment","doctype","template_comment","template_tag","variable"]},case_insensitive:true,modes:[x.XML_COMMENT,h.HTML_DOCTYPE,{className:"tag",lexems:[_1.IDENT_RE],keywords:h.HTML_TAGS,begin:"<[A-Za-z/]",end:">",contains:["attribute","template_comment","template_tag","variable"]},x.XML_ATTR,h.HTML_ATTR,{className:"value",begin:"\"",end:"\"",contains:["template_comment","template_tag","variable"]},h.HTML_VALUE,{className:"template_comment",begin:"\\{\\%\\s*comment\\s*\\%\\}",end:"\\{\\%\\s*endcomment\\s*\\%\\}"},{className:"template_comment",begin:"\\{#",end:"#\\}"},{className:"template_tag",begin:"\\{\\%",end:"\\%\\}",lexems:[_1.IDENT_RE],keywords:{"comment":1,"endcomment":1,"load":1,"templatetag":1,"ifchanged":1,"endifchanged":1,"if":1,"endif":1,"firstof":1,"for":1,"endfor":1,"in":1,"ifnotequal":1,"endifnotequal":1,"widthratio":1,"extends":1,"include":1,"spaceless":1,"endspaceless":1,"regroup":1,"by":1,"as":1,"ifequal":1,"endifequal":1,"ssi":1,"now":1,"with":1,"cycle":1,"url":1,"filter":1,"endfilter":1,"debug":1,"block":1,"endblock":1,"else":1},contains:["filter"]},{className:"variable",begin:"\\{\\{",end:"\\}\\}",contains:["filter"]},{className:"filter",begin:"\\|[A-Za-z]+\\:?",end:"^",excludeEnd:true,lexems:[_1.IDENT_RE],keywords:{"truncatewords":1,"removetags":1,"linebreaksbr":1,"yesno":1,"get_digit":1,"timesince":1,"random":1,"striptags":1,"filesizeformat":1,"escape":1,"linebreaks":1,"length_is":1,"ljust":1,"rjust":1,"cut":1,"urlize":1,"fix_ampersands":1,"title":1,"floatformat":1,"capfirst":1,"pprint":1,"divisibleby":1,"add":1,"make_list":1,"unordered_list":1,"urlencode":1,"timeuntil":1,"urlizetrunc":1,"wordcount":1,"stringformat":1,"linenumbers":1,"slice":1,"date":1,"dictsort":1,"dictsortreversed":1,"default_if_none":1,"pluralize":1,"lower":1,"join":1,"center":1,"default":1,"truncatewords_html":1,"upper":1,"length":1,"phone2numeric":1,"wordwrap":1,"time":1,"addslashes":1,"slugify":1,"first":1},contains:["argument"]},{className:"argument",begin:"\"",end:"\""}]};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages.javascript"]){
dojo._hasResource["dojox.highlight.languages.javascript"]=true;
dojo.provide("dojox.highlight.languages.javascript");

(function(){
var dh=dojox.highlight,_1=dh.constants;
dh.languages.javascript={defaultMode:{lexems:[_1.UNDERSCORE_IDENT_RE],contains:["string","comment","number","regexp","function"],keywords:{"keyword":{"in":1,"if":1,"for":1,"while":1,"finally":1,"var":1,"new":1,"function":1,"do":1,"return":1,"void":1,"else":1,"break":1,"catch":1,"instanceof":1,"with":1,"throw":1,"case":1,"default":1,"try":1,"this":1,"switch":1,"continue":1,"typeof":1,"delete":1},"literal":{"true":1,"false":1,"null":1}}},modes:[_1.C_LINE_COMMENT_MODE,_1.C_BLOCK_COMMENT_MODE,_1.C_NUMBER_MODE,_1.APOS_STRING_MODE,_1.QUOTE_STRING_MODE,_1.BACKSLASH_ESCAPE,{className:"regexp",begin:"/.*?[^\\\\/]/[gim]*",end:"^"},{className:"function",begin:"function\\b",end:"{",lexems:[_1.UNDERSCORE_IDENT_RE],keywords:{"function":1},contains:["title","params"]},{className:"title",begin:_1.UNDERSCORE_IDENT_RE,end:"^"},{className:"params",begin:"\\(",end:"\\)",contains:["string","comment"]}]};
})();
}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages._www"]){
dojo._hasResource["dojox.highlight.languages._www"]=true;
dojo.provide("dojox.highlight.languages._www");





}
;/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


if(!dojo._hasResource["dojox.highlight.languages._all"]){
dojo._hasResource["dojox.highlight.languages._all"]=true;
dojo.provide("dojox.highlight.languages._all");



}
;dojo.provide("x2sky.application.content.front.PortletShowContent");dojo.declare("x2sky.application.content.front.PortletShowContent",x2sky.application.portal.front.PortletBase,{postCreate:function(){this.inherited(arguments)}});dojo.declare("x2sky.application.content.front.ContentItem",[dijit._Widget],{contentType:"",commentCount:0,postCreate:function(){this.inherited(arguments);this.titleNode=dojo.query(".content-title",this.domNode)[0];this.dao=dijit.getEnclosingWidget(this.domNode.parentNode).dao;this.commentButton=dojo.query(".comment-control-button",this.domNode)[0];this.commentNode=dojo.query(".content-comment",this.domNode)[0];this.shareNode=dojo.query(".action-share",this.domNode)[0];this.likeNode=dojo.query(".action-like",this.domNode)[0];if(this.commentButton){this.connect(this.commentButton,"onclick","toggleComments")}if(webows.us.type=="owner"){dojo.addClass(this.shareNode,"hide")}else{this.connect(this.shareNode,"onclick","doShare")}if(this.likeNode){this.connect(this.likeNode,"onclick","doLike")}this.cid=dojo.attr(this.domNode,"cid")},toggleComments:function(){if(!this.dijitComment){this.dijitComment=new x2sky.application.content.Comments({target:this.contentType,targetId:this.cid,targetTitle:this.titleNode.innerHTML,controlButton:this.commentButton,visible:false,dao:this.dao},this.commentNode)}this.dijitComment.toggleShow()},doShare:function(){if(!this.dijitShare){var b='You are sharing <a href="'+webows.site.url+'">'+webows.site.ownerName+"</a>'s article: ";var a=dojo.query(".content-head > h2",this.domNode)[0].innerHTML;if(a){b+='<a href="">'+a+"</a></span>"}else{var d=dojo.query(".content-body",this.domNode)[0].innerHTML;d=d.replace(/<[^>]*>/mg,"").substring(0,100)+"...";b="<b>"+b+"</b>";b+="<br/>"+d}this.dijitShare=new x2sky.application.connection.DijitShare({dao:this.dao,target:this.contentType,targetId:this.cid,sourceType:"content",targetDescription:b},this.shareNode)}this.dijitShare.doShare()},doLike:function(){if(!this.dijitLike){this.dijitLike=new x2sky.application.connection.DijitLike({dao:this.dao,target:this.contentType,targetId:this.cid,targetTitle:this.titleNode.innerHTML,targetUrl:""},this.likeNode)}this.dijitLike.doLike()}});;dojo.provide("x2sky.application.user.front.PortletProfile");dojo.declare("x2sky.application.user.front.PortletProfile",x2sky.application.portal.front.PortletBase,{postCreate:function(){this.inherited(arguments);this.dao.addSimpleHandler("connection","DoFollow");this.dao.addSimpleHandler("connection","UnFollow");this.dao.bindEvents(this,"DoFollow","UnFollow");this.updateUI()},updateUI:function(){dojo.attr(this.btnFollow,"disabled",false);if(webows.us.type=="follower"){dojo.removeClass(this.tipNode,"hide");dojo.removeClass(this.btnFollow,"hide");dojo.removeClass(this.btnFollow,"button-do");dojo.addClass(this.btnFollow,"button-undo");this.btnFollow.value="Unfollow"}else{if(webows.us.type=="owner"){dojo.addClass(this.tipNode,"hide");dojo.addClass(this.btnFollow,"hide")}else{dojo.addClass(this.tipNode,"hide");dojo.removeClass(this.btnFollow,"hide");dojo.removeClass(this.btnFollow,"button-undo");dojo.addClass(this.btnFollow,"button-do");this.btnFollow.value="Follow me"}}},doFollow:function(){console.debug("following...");this.showLoading();if(webows.us.type=="guest"){this.showError("You must identify yourself first.");this.hideLoading();return}if(webows.us.type=="follower"){this.unFollow();return}this.dao.sendMessage(this.dao.createServerMessage({id:"connection.msgDoFollow",sourceId:this.id,data:{}}))},unFollow:function(){this.dao.sendMessage(this.dao.createServerMessage({id:"connection.msgUnFollow",sourceId:this.id,data:{}}))},onDoFollow:function(a){if(a.sourceId!=this.id){return}this.hideLoading();webows.us.type="follower";this.showSuccess("You are following "+webows.site.ownerName+".");this.updateUI()},onErrorDoFollow:function(a){if(a.sourceId!=this.id){return}this.hideLoading();this.showError(a.error)},onUnFollow:function(a){if(a.sourceId!=this.id){return}this.hideLoading();webows.us.type="webows";this.showInfo("You are not following "+webows.site.ownerName+" now.");this.updateUI()},onErrorUnFollow:function(a){if(a.sourceId!=this.id){return}this.hideLoading();this.updateUI();this.showError(a.error)},showError:function(a){dojo.removeClass(this.tipNode,"hide");this.tipNode.className="tip-warn";this.tipNode.innerHTML=a},showInfo:function(a){dojo.removeClass(this.tipNode,"hide");this.tipNode.className="tip-info";this.tipNode.innerHTML=a},showSuccess:function(a){dojo.removeClass(this.tipNode,"hide");this.tipNode.className="tip-success";this.tipNode.innerHTML=a},showLoading:function(){x2sky.makeButtonBusy(this.btnFollow,"Processing...")},hideLoading:function(){x2sky.cancelButtonBusy(this.btnFollow)}});;dojo.provide("x2sky.application.content.front.PortletDouBan");dojo.declare("x2sky.application.content.front.PortletDouBan",x2sky.application.portal.front.PortletBase,{title:"DouBan",doubanId:"",maxResults:"20",category:"book",postCreate:function(){this.inherited(arguments);if(!this.doubanId){this.containerNode.innerHTML='<span class="tip-info">DouBan id is not detected.</span>';return}var e=this;var b={book:{done:"读过",doing:"在读",wish:"想读"},movie:{done:"看过",doing:"在看",wish:"想看"},music:{done:"听过",doing:"在听",wish:"想听"}};var a=[],c=[],d=[];dojo.io.script.get({url:"http://api.douban.com/people/"+this.doubanId+"/collection",content:{cat:e.category,alt:"xd","max-results":e.maxResults},jsonp:"callback",load:function(g){var f=g.entry;e.containerNode.innerHTML="";if(!f.length){e.containerNode.innerHTML='<span class="tip-info">No content.</span>';return}dojo.forEach(f,function(j){var h=j["db:status"]["$t"];var i={img:j["db:subject"]["link"][2]["@href"],title:j["db:subject"]["title"]["$t"],url:j["db:subject"]["link"][1]["@href"],author:j["db:subject"]["author"][0].name["$t"]};switch(h){case"wish":d.push(i);break;case"read":case"watched":case"listened":a.push(i);break;case"reading":case"watching":case"listening":c.push(i);break}});e.getBookList(b[e.category].done,a);e.getBookList(b[e.category].doing,c);e.getBookList(b[e.category].wish,d)},error:function(f){this.containerNode.innerHTML='<span class="tip-info">Failed to get data, please check if you input an invalid Douban id.</span>'}})},getBookList:function(c,b){if(!b.length){return}var a=["<h5>",c,"</h5>",'<div class="images">'];a.push(dojo.map(b,function(f){var e=f.title+" ("+f.author+")";return'<a href="'+f.url+'"><img src="'+f.img+'" alt="'+e+'" title="'+e+'"/></a>'}).join(""));a.join("</div>");dojo.place(a.join(""),this.containerNode,"last")}});;;dojo.cache('x2sky.application.connection','templates/user_identifier.html','<div class=\'webows-user-identifier\'>\n	<div dojoAttachPoint="tipNode" class="hide tip-error"></div>\n	<ul class=\'form\'>\n		<li><label>Please input your webows site url:</label></li>\n		<li><input type="text" class="textbox" dojoAttachPoint="tbUrl" value=""/>\n		<li><input type="checkbox" class="checkbox" dojoAttachPoint="cbStaySignedIn" id="CBCLRM"/>\n		<label class="label-right" for="CBCLRM">Remember me</label></li>\n		<li><input type="button" class="button" value="Identify me" dojoAttachPoint="btnLogin"/></li>\n	</ul>\n</div>\n');dojo.provide("x2sky.application.connection.UserIdentifier");dojo.declare("x2sky.application.connection.UserIdentifier",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("x2sky.application.connection","templates/user_identifier.html"),dao:null,postCreate:function(){this.inherited(arguments);this.dao=this.dao||dao||null;this.dao.addSimpleHandler("connection","IdentifyUser");this.dao.addSimpleHandler("connection","GetCheckCode");this.dao.addSimpleHandler("connection","VerifyCheckCode");this.conns=this.dao.bindEvents(this,"IdentifyUser","GetCheckCode","VerifyCheckCode");this.connect(this.btnLogin,"onclick","identifyUser");this.connect(this.tipNode,"onclick",dojo.hitch(this,"hideError"));this.enableAll();x2sky.connectEnterKey(this.tbUrl,dojo.hitch(this,"identifyUser"))},identifyUser:function(){if(!this.tbUrl.value){this.showError("Please input a valid url address.");return}if(!/^http/.test(this.tbUrl.value)){this.tbUrl.value="http://"+this.tbUrl.value}if(!/\/$/.test(this.tbUrl.value)){this.tbUrl.value+="/"}var a=this.dao.createServerMessage({id:"connection.msgIdentifyUser",sourceId:this.id,data:{url:this.tbUrl.value}});this.dao.sendMessage(a);x2sky.makeButtonBusy(this.btnLogin,"Please wait...");this.disableAll();this.hideError()},onIdentifyUser:function(a){if(a.sourceId!=this.id){return}this.dao.sendMessage(this.dao.createRemoteMessage({id:"connection.msgGetCheckCode",to:this.tbUrl.value,sourceId:this.id,data:{key:a.data.key}}))},onErrorIdentifyUser:function(a){this.showError(a.error);x2sky.cancelButtonBusy(this.btnLogin);this.enableAll()},onGetCheckCode:function(a){if(a.sourceId!=this.id){return}console.debug("Succeed to get check code: "+a.data.checkCode);this.verifyCheckCode(a.data.checkCode)},onErrorGetCheckCode:function(a){this.showError('<a title="Click here to go to your site (In a new tab/window)." href="'+this.tbUrl.value+'" target="_blank">Failed: please login to your site and try again.</a>');x2sky.cancelButtonBusy(this.btnLogin);this.enableAll();console.debug("Failed to get check code.")},verifyCheckCode:function(a){var b=this.dao.createServerMessage({id:"connection.msgVerifyCheckCode",sourceId:this.id,data:{checkCode:a,url:this.tbUrl.value,staySignedIn:this.cbStaySignedIn.checked}});this.dao.sendMessage(b)},onVerifyCheckCode:function(a){if(a.sourceId!=this.id){return}console.debug("Succeed to verify check code.");this.onSuccess({url:""});this.enableAll();x2sky.cancelButtonBusy(this.btnLogin)},onSuccess:function(a){},onErrorVerifyCheckCode:function(a){if(a.sourceId!=this.id){return}console.debug("Failed to verify check code.");console.debug(a.error);this.showError(a.error);x2sky.cancelButtonBusy(this.btnLogin);this.enableAll()},showError:function(a){if(!a){dojo.addClass(this.tipNode,"hide")}else{dojo.removeClass(this.tipNode,"hide")}this.tipNode.innerHTML=a},hideError:function(){this.showError("")},disableAll:function(){dojo.forEach([this.tbUrl,this.cbStaySignedIn,this.btnLogin],function(a){a.disabled=true})},enableAll:function(){dojo.forEach([this.tbUrl,this.cbStaySignedIn,this.btnLogin],function(a){a.disabled=false})},destroy:function(){this.inherited(arguments);dojo.forEach(this.conns,dojo.disconnect)}});;dojo.provide("x2sky.application.connection.front.PortletLoginState");dojo.declare("x2sky.application.connection.front.PortletLoginState",x2sky.application.portal.front.PortletBase,{dao:null,postCreate:function(){this.inherited(arguments);this.dao.addSimpleHandler("connection","VerifyCheckCode");this.connect(this.dao,"onVerifyCheckCode","onVerifyCheckCode")},onVerifyCheckCode:function(a){if(!this.dijitUserIdentifier){this.dijitUserIdentifier=dijit.getEnclosingWidget(dojo.query(".webows-user-identifier",this.domNode)[0])}if(a.sourceId!=this.dijitUserIdentifier.id){return}document.location.reload()}});;
