/**
 * create the dojo config variable so we don't need to supply inline.
 * this file is used by embed.build.php, and tweetizen.build.php
 */
 
 djConfig = {
 	isDebug: false, 
 	parseOnLoad: false, 
 	locale: 'en'
 };
 /*
	Copyright (c) 2004-2008, 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
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

(function(){
var _1=null;
if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){
var _2="",_3="",_4="",_5={},_6={};
_1=_1||djConfig.scopeMap;
for(var i=0;i<_1.length;i++){
var _8=_1[i];
_2+="var "+_8[0]+" = {}; "+_8[1]+" = "+_8[0]+";"+_8[1]+"._scopeName = '"+_8[1]+"';";
_3+=(i==0?"":",")+_8[0];
_4+=(i==0?"":",")+_8[1];
_5[_8[0]]=_8[1];
_6[_8[1]]=_8[0];
}
eval(_2+"dojo._scopeArgs = ["+_4+"];");
dojo._scopePrefixArgs=_3;
dojo._scopePrefix="(function("+_3+"){";
dojo._scopeSuffix="})("+_4+")";
dojo._scopeMap=_5;
dojo._scopeMapRev=_6;
}
(function(){
if(!this["console"]){
this.console={};
}
var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];
var i=0,tn;
while((tn=cn[i++])){
if(!console[tn]){
(function(){
var _c=tn+"";
console[_c]=("log" in console)?function(){
var a=Array.apply({},arguments);
a.unshift(_c+":");
console["log"](a.join(" "));
}:function(){
};
})();
}
}
if(typeof dojo=="undefined"){
this.dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};
}
var d=dojo;
if(typeof dijit=="undefined"){
this.dijit={_scopeName:"dijit"};
}
if(typeof dojox=="undefined"){
this.dojox={_scopeName:"dojox"};
}
if(!d._scopeArgs){
d._scopeArgs=[dojo,dijit,dojox];
}
d.global=this;
d.config={isDebug:false,debugAtAllCosts:false};
if(typeof djConfig!="undefined"){
for(var _f in djConfig){
d.config[_f]=djConfig[_f];
}
}
var _10=["Browser","Rhino","Spidermonkey","Mobile"];
var t;
while((t=_10.shift())){
d["is"+t]=false;
}
dojo.locale=d.config.locale;
var rev="$Rev: 15997 $".match(/\d+/);
dojo.version={major:0,minor:1,patch:0,flag:"",revision:rev?+rev[0]:999999,toString:function(){
with(d.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
if(typeof OpenAjax!="undefined"){
OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());
}
dojo._mixin=function(obj,_14){
var _15={};
for(var x in _14){
if(_15[x]===undefined||_15[x]!=_14[x]){
obj[x]=_14[x];
}
}
if(d["isIE"]&&_14){
var p=_14.toString;
if(typeof p=="function"&&p!=obj.toString&&p!=_15.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){
obj.toString=_14.toString;
}
}
return obj;
};
dojo.mixin=function(obj,_19){
for(var i=1,l=arguments.length;i<l;i++){
d._mixin(obj,arguments[i]);
}
return obj;
};
dojo._getProp=function(_1c,_1d,_1e){
var obj=_1e||d.global;
for(var i=0,p;obj&&(p=_1c[i]);i++){
if(i==0&&this._scopeMap[p]){
p=this._scopeMap[p];
}
obj=(p in obj?obj[p]:(_1d?obj[p]={}:undefined));
}
return obj;
};
dojo.setObject=function(_22,_23,_24){
var _25=_22.split("."),p=_25.pop(),obj=d._getProp(_25,true,_24);
return obj&&p?(obj[p]=_23):undefined;
};
dojo.getObject=function(_28,_29,_2a){
return d._getProp(_28.split("."),_29,_2a);
};
dojo.exists=function(_2b,obj){
return !!d.getObject(_2b,false,obj);
};
dojo["eval"]=function(_2d){
return d.global.eval?d.global.eval(_2d):eval(_2d);
};
d.deprecated=d.experimental=function(){
};
})();
(function(){
var d=dojo;
d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_2f){
var mp=this._modulePrefixes;
return !!(mp[_2f]&&mp[_2f].value);
},_getModulePrefix:function(_31){
var mp=this._modulePrefixes;
if(this._moduleHasPrefix(_31)){
return mp[_31].value;
}
return _31;
},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});
dojo._loadPath=function(_33,_34,cb){
var uri=((_33.charAt(0)=="/"||_33.match(/^\w+:/))?"":this.baseUrl)+_33;
try{
return !_34?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_34,cb);
}
catch(e){
console.error(e);
return false;
}
};
dojo._loadUri=function(uri,cb){
if(this._loadedUrls[uri]){
return true;
}
var _39=this._getText(uri,true);
if(!_39){
return false;
}
this._loadedUrls[uri]=true;
this._loadedUrls.push(uri);
if(cb){
_39="("+_39+")";
}else{
_39=this._scopePrefix+_39+this._scopeSuffix;
}
if(d.isMoz){
_39+="\r\n//@ sourceURL="+uri;
}
var _3a=d["eval"](_39);
if(cb){
cb(_3a);
}
return true;
};
dojo._loadUriAndCheck=function(uri,_3c,cb){
var ok=false;
try{
ok=this._loadUri(uri,cb);
}
catch(e){
console.error("failed loading "+uri+" with error: "+e);
}
return !!(ok&&this._loadedModules[_3c]);
};
dojo.loaded=function(){
this._loadNotifying=true;
this._postLoad=true;
var mll=d._loaders;
this._loaders=[];
for(var x=0;x<mll.length;x++){
mll[x]();
}
this._loadNotifying=false;
if(d._postLoad&&d._inFlightCount==0&&mll.length){
d._callLoaded();
}
};
dojo.unloaded=function(){
var mll=this._unloaders;
while(mll.length){
(mll.pop())();
}
};
d._onto=function(arr,obj,fn){
if(!fn){
arr.push(obj);
}else{
if(fn){
var _45=(typeof fn=="string")?obj[fn]:fn;
arr.push(function(){
_45.call(obj);
});
}
}
};
dojo.addOnLoad=function(obj,_47){
d._onto(d._loaders,obj,_47);
if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){
d._callLoaded();
}
};
var dca=d.config.addOnLoad;
if(dca){
d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);
}
dojo.addOnUnload=function(obj,_4a){
d._onto(d._unloaders,obj,_4a);
};
dojo._modulesLoaded=function(){
if(d._postLoad){
return;
}
if(d._inFlightCount>0){
console.warn("files still in flight!");
return;
}
d._callLoaded();
};
dojo._callLoaded=function(){
if(typeof setTimeout=="object"||(dojo.config.useXDomain&&d.isOpera)){
if(dojo.isAIR){
setTimeout(function(){
dojo.loaded();
},0);
}else{
setTimeout(dojo._scopeName+".loaded();",0);
}
}else{
d.loaded();
}
};
dojo._getModuleSymbols=function(_4b){
var _4c=_4b.split(".");
for(var i=_4c.length;i>0;i--){
var _4e=_4c.slice(0,i).join(".");
if((i==1)&&!this._moduleHasPrefix(_4e)){
_4c[0]="../"+_4c[0];
}else{
var _4f=this._getModulePrefix(_4e);
if(_4f!=_4e){
_4c.splice(0,i,_4f);
break;
}
}
}
return _4c;
};
dojo._global_omit_module_check=false;
dojo.loadInit=function(_50){
_50();
};
dojo._loadModule=dojo.require=function(_51,_52){
_52=this._global_omit_module_check||_52;
var _53=this._loadedModules[_51];
if(_53){
return _53;
}
var _54=this._getModuleSymbols(_51).join("/")+".js";
var _55=(!_52)?_51:null;
var ok=this._loadPath(_54,_55);
if(!ok&&!_52){
throw new Error("Could not load '"+_51+"'; last tried '"+_54+"'");
}
if(!_52&&!this._isXDomain){
_53=this._loadedModules[_51];
if(!_53){
throw new Error("symbol '"+_51+"' is not defined after loading '"+_54+"'");
}
}
return _53;
};
dojo.provide=function(_57){
_57=_57+"";
return (d._loadedModules[_57]=d.getObject(_57,true));
};
dojo.platformRequire=function(_58){
var _59=_58.common||[];
var _5a=_59.concat(_58[d._name]||_58["default"]||[]);
for(var x=0;x<_5a.length;x++){
var _5c=_5a[x];
if(_5c.constructor==Array){
d._loadModule.apply(d,_5c);
}else{
d._loadModule(_5c);
}
}
};
dojo.requireIf=function(_5d,_5e){
if(_5d===true){
var _5f=[];
for(var i=1;i<arguments.length;i++){
_5f.push(arguments[i]);
}
d.require.apply(d,_5f);
}
};
dojo.requireAfterIf=d.requireIf;
dojo.registerModulePath=function(_61,_62){
d._modulePrefixes[_61]={name:_61,value:_62};
};
dojo.requireLocalization=function(_63,_64,_65,_66){
d.require("dojo.i18n");
d.i18n._requireLocalization.apply(d.hostenv,arguments);
};
var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");
var ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
dojo._Url=function(){
var n=null;
var _a=arguments;
var uri=[_a[0]];
for(var i=1;i<_a.length;i++){
if(!_a[i]){
continue;
}
var _6d=new d._Url(_a[i]+"");
var _6e=new d._Url(uri[0]+"");
if(_6d.path==""&&!_6d.scheme&&!_6d.authority&&!_6d.query){
if(_6d.fragment!=n){
_6e.fragment=_6d.fragment;
}
_6d=_6e;
}else{
if(!_6d.scheme){
_6d.scheme=_6e.scheme;
if(!_6d.authority){
_6d.authority=_6e.authority;
if(_6d.path.charAt(0)!="/"){
var _6f=_6e.path.substring(0,_6e.path.lastIndexOf("/")+1)+_6d.path;
var _70=_6f.split("/");
for(var j=0;j<_70.length;j++){
if(_70[j]=="."){
if(j==_70.length-1){
_70[j]="";
}else{
_70.splice(j,1);
j--;
}
}else{
if(j>0&&!(j==1&&_70[0]=="")&&_70[j]==".."&&_70[j-1]!=".."){
if(j==(_70.length-1)){
_70.splice(j,1);
_70[j-1]="";
}else{
_70.splice(j-1,2);
j-=2;
}
}
}
}
_6d.path=_70.join("/");
}
}
}
}
uri=[];
if(_6d.scheme){
uri.push(_6d.scheme,":");
}
if(_6d.authority){
uri.push("//",_6d.authority);
}
uri.push(_6d.path);
if(_6d.query){
uri.push("?",_6d.query);
}
if(_6d.fragment){
uri.push("#",_6d.fragment);
}
}
this.uri=uri.join("");
var r=this.uri.match(ore);
this.scheme=r[2]||(r[1]?"":n);
this.authority=r[4]||(r[3]?"":n);
this.path=r[5];
this.query=r[7]||(r[6]?"":n);
this.fragment=r[9]||(r[8]?"":n);
if(this.authority!=n){
r=this.authority.match(ire);
this.user=r[3]||n;
this.password=r[4]||n;
this.host=r[6]||r[7];
this.port=r[9]||n;
}
};
dojo._Url.prototype.toString=function(){
return this.uri;
};
dojo.moduleUrl=function(_73,url){
var loc=d._getModuleSymbols(_73).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
var _76=loc.indexOf(":");
if(loc.charAt(0)!="/"&&(_76==-1||_76>loc.indexOf("/"))){
loc=d.baseUrl+loc;
}
return new d._Url(loc,url);
};
})();
if(typeof window!="undefined"){
dojo.isBrowser=true;
dojo._name="browser";
(function(){
var d=dojo;
if(document&&document.getElementsByTagName){
var _78=document.getElementsByTagName("script");
var _79=/dojo(\.xd)?\.js(\W|$)/i;
for(var i=0;i<_78.length;i++){
var src=_78[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_79);
if(m){
if(!d.config.baseUrl){
d.config.baseUrl=src.substring(0,m.index);
}
var cfg=_78[i].getAttribute("djConfig");
if(cfg){
var _7e=eval("({ "+cfg+" })");
for(var x in _7e){
dojo.config[x]=_7e[x];
}
}
break;
}
}
}
d.baseUrl=d.config.baseUrl;
var n=navigator;
var dua=n.userAgent;
var dav=n.appVersion;
var tv=parseFloat(dav);
if(dua.indexOf("Opera")>=0){
d.isOpera=tv;
}
var _84=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);
if(_84){
d.isSafari=parseFloat(dav.split("Version/")[1])||(parseFloat(dav.substr(_84+7))>419.3)?3:2;
}
if(dua.indexOf("AdobeAIR")>=0){
d.isAIR=1;
}
if(dav.indexOf("Konqueror")>=0||d.isSafari){
d.isKhtml=tv;
}
if(dua.indexOf("Gecko")>=0&&!d.isKhtml){
d.isMozilla=d.isMoz=tv;
}
if(d.isMoz){
d.isFF=parseFloat(dua.split("Firefox/")[1])||undefined;
}
if(document.all&&!d.isOpera){
d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;
}
if(dojo.isIE&&window.location.protocol==="file:"){
dojo.config.ieForceActiveXXhr=true;
}
var cm=document.compatMode;
d.isQuirks=cm=="BackCompat"||cm=="QuirksMode"||d.isIE<6;
d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();
d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
d._xhrObj=function(){
var _86=null;
var _87=null;
if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){
try{
_86=new XMLHttpRequest();
}
catch(e){
}
}
if(!_86){
for(var i=0;i<3;++i){
var _89=d._XMLHTTP_PROGIDS[i];
try{
_86=new ActiveXObject(_89);
}
catch(e){
_87=e;
}
if(_86){
d._XMLHTTP_PROGIDS=[_89];
break;
}
}
}
if(!_86){
throw new Error("XMLHTTP not available: "+_87);
}
return _86;
};
d._isDocumentOk=function(_8a){
var _8b=_8a.status||0;
return (_8b>=200&&_8b<300)||_8b==304||_8b==1223||(!_8b&&(location.protocol=="file:"||location.protocol=="chrome:"));
};
var _8c=window.location+"";
var _8d=document.getElementsByTagName("base");
var _8e=(_8d&&_8d.length>0);
d._getText=function(uri,_90){
var _91=this._xhrObj();
if(!_8e&&dojo._Url){
uri=(new dojo._Url(_8c,uri)).toString();
}
if(d.config.cacheBust){
uri+="";
uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");
}
_91.open("GET",uri,false);
try{
_91.send(null);
if(!d._isDocumentOk(_91)){
var err=Error("Unable to load "+uri+" status:"+_91.status);
err.status=_91.status;
err.responseText=_91.responseText;
throw err;
}
}
catch(e){
if(_90){
return null;
}
throw e;
}
return _91.responseText;
};
d._windowUnloaders=[];
d.windowUnloaded=function(){
var mll=this._windowUnloaders;
while(mll.length){
(mll.pop())();
}
};
d.addOnWindowUnload=function(obj,_95){
d._onto(d._windowUnloaders,obj,_95);
};
})();
dojo._initFired=false;
dojo._loadInit=function(e){
dojo._initFired=true;
var _97=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_97!="domcontentloaded"&&_97!="load")){
return;
}
arguments.callee.initialized=true;
if("_khtmlTimer" in dojo){
clearInterval(dojo._khtmlTimer);
delete dojo._khtmlTimer;
}
if(dojo._inFlightCount==0){
dojo._modulesLoaded();
}
};
dojo._fakeLoadInit=function(){
dojo._loadInit({type:"load"});
};
if(!dojo.config.afterOnLoad){
if(document.addEventListener){
if(dojo.isOpera||dojo.isFF>=3||(dojo.isMoz&&dojo.config.enableMozDomContentLoaded===true)){
document.addEventListener("DOMContentLoaded",dojo._loadInit,null);
}
window.addEventListener("load",dojo._loadInit,null);
}
if(dojo.isAIR){
window.addEventListener("load",dojo._loadInit,null);
}else{
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
dojo._khtmlTimer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dojo._loadInit();
}
},10);
}
}
}
(function(){
var _w=window;
var _99=function(_9a,fp){
var _9c=_w[_9a]||function(){
};
_w[_9a]=function(){
fp.apply(_w,arguments);
_9c.apply(_w,arguments);
};
};
if(dojo.isIE){
if(!dojo.config.afterOnLoad){
document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");
}
try{
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
catch(e){
}
}
_99("onbeforeunload",function(){
dojo.unloaded();
});
_99("onunload",function(){
dojo.windowUnloaded();
});
})();
}
(function(){
var mp=dojo.config["modulePaths"];
if(mp){
for(var _9e in mp){
dojo.registerModulePath(_9e,mp[_9e]);
}
}
})();
if(dojo.config.isDebug){
dojo.require("dojo._firebug.firebug");
}
if(dojo.config.debugAtAllCosts){
dojo.config.useXDomain=true;
dojo.require("dojo._base._loader.loader_xd");
dojo.require("dojo._base._loader.loader_debug");
dojo.require("dojo.i18n");
}
if(!dojo._hasResource["dojo._base.lang"]){
dojo._hasResource["dojo._base.lang"]=true;
dojo.provide("dojo._base.lang");
dojo.isString=function(it){
return !!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String);
};
dojo.isArray=function(it){
return it&&(it instanceof Array||typeof it=="array");
};
dojo.isFunction=(function(){
var _a1=function(it){
return it&&(typeof it=="function"||it instanceof Function);
};
return dojo.isSafari?function(it){
if(typeof it=="function"&&it=="[object NodeList]"){
return false;
}
return _a1(it);
}:_a1;
})();
dojo.isObject=function(it){
return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));
};
dojo.isArrayLike=function(it){
var d=dojo;
return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));
};
dojo.isAlien=function(it){
return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.extend=function(_a8,_a9){
for(var i=1,l=arguments.length;i<l;i++){
dojo._mixin(_a8.prototype,arguments[i]);
}
return _a8;
};
dojo._hitchArgs=function(_ac,_ad){
var pre=dojo._toArray(arguments,2);
var _af=dojo.isString(_ad);
return function(){
var _b0=dojo._toArray(arguments);
var f=_af?(_ac||dojo.global)[_ad]:_ad;
return f&&f.apply(_ac||this,pre.concat(_b0));
};
};
dojo.hitch=function(_b2,_b3){
if(arguments.length>2){
return dojo._hitchArgs.apply(dojo,arguments);
}
if(!_b3){
_b3=_b2;
_b2=null;
}
if(dojo.isString(_b3)){
_b2=_b2||dojo.global;
if(!_b2[_b3]){
throw (["dojo.hitch: scope[\"",_b3,"\"] is null (scope=\"",_b2,"\")"].join(""));
}
return function(){
return _b2[_b3].apply(_b2,arguments||[]);
};
}
return !_b2?_b3:function(){
return _b3.apply(_b2,arguments||[]);
};
};
dojo.delegate=dojo._delegate=(function(){
function TMP(){
};
return function(obj,_b5){
TMP.prototype=obj;
var tmp=new TMP();
if(_b5){
dojo._mixin(tmp,_b5);
}
return tmp;
};
})();
(function(){
var _b7=function(obj,_b9,_ba){
return (_ba||[]).concat(Array.prototype.slice.call(obj,_b9||0));
};
var _bb=function(obj,_bd,_be){
var arr=_be||[];
for(var x=_bd||0;x<obj.length;x++){
arr.push(obj[x]);
}
return arr;
};
dojo._toArray=(!dojo.isIE)?_b7:function(obj){
return ((obj.item)?_bb:_b7).apply(this,arguments);
};
})();
dojo.partial=function(_c2){
var arr=[null];
return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));
};
dojo.clone=function(o){
if(!o){
return o;
}
if(dojo.isArray(o)){
var r=[];
for(var i=0;i<o.length;++i){
r.push(dojo.clone(o[i]));
}
return r;
}
if(!dojo.isObject(o)){
return o;
}
if(o.nodeType&&o.cloneNode){
return o.cloneNode(true);
}
if(o instanceof Date){
return new Date(o.getTime());
}
var r=new o.constructor();
for(var i in o){
if(!(i in r)||r[i]!=o[i]){
r[i]=dojo.clone(o[i]);
}
}
return r;
};
dojo.trim=function(str){
return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
};
}
if(!dojo._hasResource["dojo._base.declare"]){
dojo._hasResource["dojo._base.declare"]=true;
dojo.provide("dojo._base.declare");
dojo.declare=function(_c8,_c9,_ca){
var dd=arguments.callee,_cc;
if(dojo.isArray(_c9)){
_cc=_c9;
_c9=_cc.shift();
}
if(_cc){
dojo.forEach(_cc,function(m){
if(!m){
throw (_c8+": mixin #"+i+" is null");
}
_c9=dd._delegate(_c9,m);
});
}
var _ce=dd._delegate(_c9);
_ca=_ca||{};
_ce.extend(_ca);
dojo.extend(_ce,{declaredClass:_c8,_constructor:_ca.constructor});
_ce.prototype.constructor=_ce;
return dojo.setObject(_c8,_ce);
};
dojo.mixin(dojo.declare,{_delegate:function(_cf,_d0){
var bp=(_cf||0).prototype,mp=(_d0||0).prototype,dd=dojo.declare;
var _d4=dd._makeCtor();
dojo.mixin(_d4,{superclass:bp,mixin:mp,extend:dd._extend});
if(_cf){
_d4.prototype=dojo._delegate(bp);
}
dojo.extend(_d4,dd._core,mp||0,{_constructor:null,preamble:null});
_d4.prototype.constructor=_d4;
_d4.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;
return _d4;
},_extend:function(_d5){
var i,fn;
for(i in _d5){
if(dojo.isFunction(fn=_d5[i])&&!0[i]){
fn.nom=i;
fn.ctor=this;
}
}
dojo.extend(this,_d5);
},_makeCtor:function(){
return function(){
this._construct(arguments);
};
},_core:{_construct:function(_d8){
var c=_d8.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_d8,ii,fn;
if(a[0]){
if(((fn=a[0].preamble))){
a=fn.apply(this,a)||a;
}
}
if((fn=c.prototype.preamble)){
a=fn.apply(this,a)||a;
}
if(ct&&ct.apply){
ct.apply(this,a);
}
if(mct&&mct.apply){
mct.apply(this,a);
}
if((ii=c.prototype._constructor)){
ii.apply(this,_d8);
}
if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){
ct.apply(this,_d8);
}
},_findMixin:function(_e1){
var c=this.constructor,p,m;
while(c){
p=c.superclass;
m=c.mixin;
if(m==_e1||(m instanceof _e1.constructor)){
return p;
}
if(m&&m._findMixin&&(m=m._findMixin(_e1))){
return m;
}
c=p&&p.constructor;
}
},_findMethod:function(_e5,_e6,_e7,has){
var p=_e7,c,m,f;
do{
c=p.constructor;
m=c.mixin;
if(m&&(m=this._findMethod(_e5,_e6,m,has))){
return m;
}
if((f=p[_e5])&&(has==(f==_e6))){
return p;
}
p=c.superclass;
}while(p);
return !has&&(p=this._findMixin(_e7))&&this._findMethod(_e5,_e6,p,has);
},inherited:function(_ed,_ee,_ef){
var a=arguments;
if(!dojo.isString(a[0])){
_ef=_ee;
_ee=_ed;
_ed=_ee.callee.nom;
}
a=_ef||_ee;
var c=_ee.callee,p=this.constructor.prototype,fn,mp;
if(this[_ed]!=c||p[_ed]==c){
mp=(c.ctor||0).superclass||this._findMethod(_ed,c,p,true);
if(!mp){
throw (this.declaredClass+": inherited method \""+_ed+"\" mismatch");
}
p=this._findMethod(_ed,c,mp,false);
}
fn=p&&p[_ed];
if(!fn){
throw (mp.declaredClass+": inherited method \""+_ed+"\" not found");
}
return fn.apply(this,a);
}}});
}
if(!dojo._hasResource["dojo._base.connect"]){
dojo._hasResource["dojo._base.connect"]=true;
dojo.provide("dojo._base.connect");
dojo._listener={getDispatcher:function(){
return function(){
var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;
var r=t&&t.apply(this,arguments);
var lls;
lls=[].concat(ls);
for(var i in lls){
if(!(i in ap)){
lls[i].apply(this,arguments);
}
}
return r;
};
},add:function(_fc,_fd,_fe){
_fc=_fc||dojo.global;
var f=_fc[_fd];
if(!f||!f._listeners){
var d=dojo._listener.getDispatcher();
d.target=f;
d._listeners=[];
f=_fc[_fd]=d;
}
return f._listeners.push(_fe);
},remove:function(_101,_102,_103){
var f=(_101||dojo.global)[_102];
if(f&&f._listeners&&_103--){
delete f._listeners[_103];
}
}};
dojo.connect=function(obj,_106,_107,_108,_109){
var a=arguments,args=[],i=0;
args.push(dojo.isString(a[0])?null:a[i++],a[i++]);
var a1=a[i+1];
args.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);
for(var l=a.length;i<l;i++){
args.push(a[i]);
}
return dojo._connect.apply(this,args);
};
dojo._connect=function(obj,_10f,_110,_111){
var l=dojo._listener,h=l.add(obj,_10f,dojo.hitch(_110,_111));
return [obj,_10f,h,l];
};
dojo.disconnect=function(_114){
if(_114&&_114[0]!==undefined){
dojo._disconnect.apply(this,_114);
delete _114[0];
}
};
dojo._disconnect=function(obj,_116,_117,_118){
_118.remove(obj,_116,_117);
};
dojo._topics={};
dojo.subscribe=function(_119,_11a,_11b){
return [_119,dojo._listener.add(dojo._topics,_119,dojo.hitch(_11a,_11b))];
};
dojo.unsubscribe=function(_11c){
if(_11c){
dojo._listener.remove(dojo._topics,_11c[0],_11c[1]);
}
};
dojo.publish=function(_11d,args){
var f=dojo._topics[_11d];
if(f){
f.apply(this,args||[]);
}
};
dojo.connectPublisher=function(_120,obj,_122){
var pf=function(){
dojo.publish(_120,arguments);
};
return (_122)?dojo.connect(obj,_122,pf):dojo.connect(obj,pf);
};
}
if(!dojo._hasResource["dojo._base.Deferred"]){
dojo._hasResource["dojo._base.Deferred"]=true;
dojo.provide("dojo._base.Deferred");
dojo.Deferred=function(_124){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_124;
this.silentlyCancelled=false;
};
dojo.extend(dojo.Deferred,{_nextId:(function(){
var n=1;
return function(){
return n++;
};
})(),cancel:function(){
var err;
if(this.fired==-1){
if(this.canceller){
err=this.canceller(this);
}else{
this.silentlyCancelled=true;
}
if(this.fired==-1){
if(!(err instanceof Error)){
var res=err;
err=new Error("Deferred Cancelled");
err.dojoType="cancel";
err.cancelResult=res;
}
this.errback(err);
}
}else{
if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){
this.results[0].cancel();
}
}
},_resback:function(res){
this.fired=((res instanceof Error)?1:0);
this.results[this.fired]=res;
this._fire();
},_check:function(){
if(this.fired!=-1){
if(!this.silentlyCancelled){
throw new Error("already called!");
}
this.silentlyCancelled=false;
return;
}
},callback:function(res){
this._check();
this._resback(res);
},errback:function(res){
this._check();
if(!(res instanceof Error)){
res=new Error(res);
}
this._resback(res);
},addBoth:function(cb,cbfn){
var _12d=dojo.hitch.apply(dojo,arguments);
return this.addCallbacks(_12d,_12d);
},addCallback:function(cb,cbfn){
return this.addCallbacks(dojo.hitch.apply(dojo,arguments));
},addErrback:function(cb,cbfn){
return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));
},addCallbacks:function(cb,eb){
this.chain.push([cb,eb]);
if(this.fired>=0){
this._fire();
}
return this;
},_fire:function(){
var _134=this.chain;
var _135=this.fired;
var res=this.results[_135];
var self=this;
var cb=null;
while((_134.length>0)&&(this.paused==0)){
var f=_134.shift()[_135];
if(!f){
continue;
}
var func=function(){
var ret=f(res);
if(typeof ret!="undefined"){
res=ret;
}
_135=((res instanceof Error)?1:0);
if(res instanceof dojo.Deferred){
cb=function(res){
self._resback(res);
self.paused--;
if((self.paused==0)&&(self.fired>=0)){
self._fire();
}
};
this.paused++;
}
};
if(dojo.config.isDebug){
func.call(this);
}else{
try{
func.call(this);
}
catch(err){
_135=1;
res=err;
}
}
}
this.fired=_135;
this.results[_135]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
}
if(!dojo._hasResource["dojo._base.json"]){
dojo._hasResource["dojo._base.json"]=true;
dojo.provide("dojo._base.json");
dojo.fromJson=function(json){
return eval("("+json+")");
};
dojo._escapeString=function(str){
return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
};
dojo.toJsonIndentStr="\t";
dojo.toJson=function(it,_140,_141){
if(it===undefined){
return "undefined";
}
var _142=typeof it;
if(_142=="number"||_142=="boolean"){
return it+"";
}
if(it===null){
return "null";
}
if(dojo.isString(it)){
return dojo._escapeString(it);
}
var _143=arguments.callee;
var _144;
_141=_141||"";
var _145=_140?_141+dojo.toJsonIndentStr:"";
var tf=it.__json__||it.json;
if(dojo.isFunction(tf)){
_144=tf.call(it);
if(it!==_144){
return _143(_144,_140,_145);
}
}
if(it.nodeType&&it.cloneNode){
throw new Error("Can't serialize DOM nodes");
}
var sep=_140?" ":"";
var _148=_140?"\n":"";
if(dojo.isArray(it)){
var res=dojo.map(it,function(obj){
var val=_143(obj,_140,_145);
if(typeof val!="string"){
val="undefined";
}
return _148+_145+val;
});
return "["+res.join(","+sep)+_148+_141+"]";
}
if(_142=="function"){
return null;
}
var _14c=[],key;
for(key in it){
var _14e,val;
if(typeof key=="number"){
_14e="\""+key+"\"";
}else{
if(typeof key=="string"){
_14e=dojo._escapeString(key);
}else{
continue;
}
}
val=_143(it[key],_140,_145);
if(typeof val!="string"){
continue;
}
_14c.push(_148+_145+_14e+":"+sep+val);
}
return "{"+_14c.join(","+sep)+_148+_141+"}";
};
}
if(!dojo._hasResource["dojo._base.array"]){
dojo._hasResource["dojo._base.array"]=true;
dojo.provide("dojo._base.array");
(function(){
var _150=function(arr,obj,cb){
return [dojo.isString(arr)?arr.split(""):arr,obj||dojo.global,dojo.isString(cb)?new Function("item","index","array",cb):cb];
};
dojo.mixin(dojo,{indexOf:function(_154,_155,_156,_157){
var step=1,end=_154.length||0,i=0;
if(_157){
i=end-1;
step=end=-1;
}
if(_156!=undefined){
i=_156;
}
if((_157&&i>end)||i<end){
for(;i!=end;i+=step){
if(_154[i]==_155){
return i;
}
}
}
return -1;
},lastIndexOf:function(_15a,_15b,_15c){
return dojo.indexOf(_15a,_15b,_15c,true);
},forEach:function(arr,_15e,_15f){
if(!arr||!arr.length){
return;
}
var _p=_150(arr,_15f,_15e);
arr=_p[0];
for(var i=0,l=arr.length;i<l;++i){
_p[2].call(_p[1],arr[i],i,arr);
}
},_everyOrSome:function(_163,arr,_165,_166){
var _p=_150(arr,_166,_165);
arr=_p[0];
for(var i=0,l=arr.length;i<l;++i){
var _16a=!!_p[2].call(_p[1],arr[i],i,arr);
if(_163^_16a){
return _16a;
}
}
return _163;
},every:function(arr,_16c,_16d){
return this._everyOrSome(true,arr,_16c,_16d);
},some:function(arr,_16f,_170){
return this._everyOrSome(false,arr,_16f,_170);
},map:function(arr,_172,_173){
var _p=_150(arr,_173,_172);
arr=_p[0];
var _175=(arguments[3]?(new arguments[3]()):[]);
for(var i=0,l=arr.length;i<l;++i){
_175.push(_p[2].call(_p[1],arr[i],i,arr));
}
return _175;
},filter:function(arr,_179,_17a){
var _p=_150(arr,_17a,_179);
arr=_p[0];
var _17c=[];
for(var i=0,l=arr.length;i<l;++i){
if(_p[2].call(_p[1],arr[i],i,arr)){
_17c.push(arr[i]);
}
}
return _17c;
}});
})();
}
if(!dojo._hasResource["dojo._base.Color"]){
dojo._hasResource["dojo._base.Color"]=true;
dojo.provide("dojo._base.Color");
dojo.Color=function(_17f){
if(_17f){
this.setColor(_17f);
}
};
dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};
dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){
var t=this;
t.r=r;
t.g=g;
t.b=b;
t.a=a;
},setColor:function(_185){
var d=dojo;
if(d.isString(_185)){
d.colorFromString(_185,this);
}else{
if(d.isArray(_185)){
d.colorFromArray(_185,this);
}else{
this._set(_185.r,_185.g,_185.b,_185.a);
if(!(_185 instanceof d.Color)){
this.sanitize();
}
}
}
return this;
},sanitize:function(){
return this;
},toRgb:function(){
var t=this;
return [t.r,t.g,t.b];
},toRgba:function(){
var t=this;
return [t.r,t.g,t.b,t.a];
},toHex:function(){
var arr=dojo.map(["r","g","b"],function(x){
var s=this[x].toString(16);
return s.length<2?"0"+s:s;
},this);
return "#"+arr.join("");
},toCss:function(_18c){
var t=this,rgb=t.r+", "+t.g+", "+t.b;
return (_18c?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";
},toString:function(){
return this.toCss(true);
}});
dojo.blendColors=function(_18f,end,_191,obj){
var d=dojo,t=obj||new dojo.Color();
d.forEach(["r","g","b","a"],function(x){
t[x]=_18f[x]+(end[x]-_18f[x])*_191;
if(x!="a"){
t[x]=Math.round(t[x]);
}
});
return t.sanitize();
};
dojo.colorFromRgb=function(_196,obj){
var m=_196.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);
};
dojo.colorFromHex=function(_199,obj){
var d=dojo,t=obj||new d.Color(),bits=(_199.length==4)?4:8,mask=(1<<bits)-1;
_199=Number("0x"+_199.substr(1));
if(isNaN(_199)){
return null;
}
d.forEach(["b","g","r"],function(x){
var c=_199&mask;
_199>>=bits;
t[x]=bits==4?17*c:c;
});
t.a=1;
return t;
};
dojo.colorFromArray=function(a,obj){
var t=obj||new dojo.Color();
t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));
if(isNaN(t.a)){
t.a=1;
}
return t.sanitize();
};
dojo.colorFromString=function(str,obj){
var a=dojo.Color.named[str];
return a&&dojo.colorFromArray(a,obj)||dojo.colorFromRgb(str,obj)||dojo.colorFromHex(str,obj);
};
}
if(!dojo._hasResource["dojo._base"]){
dojo._hasResource["dojo._base"]=true;
dojo.provide("dojo._base");
}
if(!dojo._hasResource["dojo._base.window"]){
dojo._hasResource["dojo._base.window"]=true;
dojo.provide("dojo._base.window");
dojo.doc=window["document"]||null;
dojo.body=function(){
return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];
};
dojo.setContext=function(_1a7,_1a8){
dojo.global=_1a7;
dojo.doc=_1a8;
};
dojo._fireCallback=function(_1a9,_1aa,_1ab){
if(_1aa&&dojo.isString(_1a9)){
_1a9=_1aa[_1a9];
}
return _1a9.apply(_1aa,_1ab||[]);
};
dojo.withGlobal=function(_1ac,_1ad,_1ae,_1af){
var rval;
var _1b1=dojo.global;
var _1b2=dojo.doc;
try{
dojo.setContext(_1ac,_1ac.document);
rval=dojo._fireCallback(_1ad,_1ae,_1af);
}
finally{
dojo.setContext(_1b1,_1b2);
}
return rval;
};
dojo.withDoc=function(_1b3,_1b4,_1b5,_1b6){
var rval;
var _1b8=dojo.doc;
try{
dojo.doc=_1b3;
rval=dojo._fireCallback(_1b4,_1b5,_1b6);
}
finally{
dojo.doc=_1b8;
}
return rval;
};
}
if(!dojo._hasResource["dojo._base.event"]){
dojo._hasResource["dojo._base.event"]=true;
dojo.provide("dojo._base.event");
(function(){
var del=(dojo._event_listener={add:function(node,name,fp){
if(!node){
return;
}
name=del._normalizeEventName(name);
fp=del._fixCallback(name,fp);
var _1bd=name;
if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){
var ofp=fp;
name=(name=="mouseenter")?"mouseover":"mouseout";
fp=function(e){
try{
e.relatedTarget.tagName;
}
catch(e2){
return;
}
if(!dojo.isDescendant(e.relatedTarget,node)){
return ofp.call(this,e);
}
};
}
node.addEventListener(name,fp,false);
return fp;
},remove:function(node,_1c1,_1c2){
if(node){
_1c1=del._normalizeEventName(_1c1);
if(!dojo.isIE&&(_1c1=="mouseenter"||_1c1=="mouseleave")){
_1c1=(_1c1=="mouseenter")?"mouseover":"mouseout";
}
node.removeEventListener(_1c1,_1c2,false);
}
},_normalizeEventName:function(name){
return name.slice(0,2)=="on"?name.slice(2):name;
},_fixCallback:function(name,fp){
return name!="keypress"?fp:function(e){
return fp.call(this,del._fixEvent(e,this));
};
},_fixEvent:function(evt,_1c8){
switch(evt.type){
case "keypress":
del._setKeyChar(evt);
break;
}
return evt;
},_setKeyChar:function(evt){
evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";
evt.charOrCode=evt.keyChar||evt.keyCode;
},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});
dojo.fixEvent=function(evt,_1cb){
return del._fixEvent(evt,_1cb);
};
dojo.stopEvent=function(evt){
evt.preventDefault();
evt.stopPropagation();
};
var _1cd=dojo._listener;
dojo._connect=function(obj,_1cf,_1d0,_1d1,_1d2){
var _1d3=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);
var lid=!_1d3?0:(!_1d2?1:2),l=[dojo._listener,del,_1cd][lid];
var h=l.add(obj,_1cf,dojo.hitch(_1d0,_1d1));
return [obj,_1cf,h,lid];
};
dojo._disconnect=function(obj,_1d8,_1d9,_1da){
([dojo._listener,del,_1cd][_1da]).remove(obj,_1d8,_1d9);
};
dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};
if(dojo.isIE){
var _1db=function(e,code){
try{
return (e.keyCode=code);
}
catch(e){
return 0;
}
};
var iel=dojo._listener;
var _1df=dojo._ieListenersName="_"+dojo._scopeName+"_listeners";
if(!dojo.config._allow_leaks){
_1cd=iel=dojo._ie_listener={handlers:[],add:function(_1e0,_1e1,_1e2){
_1e0=_1e0||dojo.global;
var f=_1e0[_1e1];
if(!f||!f[_1df]){
var d=dojo._getIeDispatcher();
d.target=f&&(ieh.push(f)-1);
d[_1df]=[];
f=_1e0[_1e1]=d;
}
return f[_1df].push(ieh.push(_1e2)-1);
},remove:function(_1e6,_1e7,_1e8){
var f=(_1e6||dojo.global)[_1e7],l=f&&f[_1df];
if(f&&l&&_1e8--){
delete ieh[l[_1e8]];
delete l[_1e8];
}
}};
var ieh=iel.handlers;
}
dojo.mixin(del,{add:function(node,_1ec,fp){
if(!node){
return;
}
_1ec=del._normalizeEventName(_1ec);
if(_1ec=="onkeypress"){
var kd=node.onkeydown;
if(!kd||!kd[_1df]||!kd._stealthKeydownHandle){
var h=del.add(node,"onkeydown",del._stealthKeyDown);
kd=node.onkeydown;
kd._stealthKeydownHandle=h;
kd._stealthKeydownRefs=1;
}else{
kd._stealthKeydownRefs++;
}
}
return iel.add(node,_1ec,del._fixCallback(fp));
},remove:function(node,_1f1,_1f2){
_1f1=del._normalizeEventName(_1f1);
iel.remove(node,_1f1,_1f2);
if(_1f1=="onkeypress"){
var kd=node.onkeydown;
if(--kd._stealthKeydownRefs<=0){
iel.remove(node,"onkeydown",kd._stealthKeydownHandle);
delete kd._stealthKeydownHandle;
}
}
},_normalizeEventName:function(_1f4){
return _1f4.slice(0,2)!="on"?"on"+_1f4:_1f4;
},_nop:function(){
},_fixEvent:function(evt,_1f6){
if(!evt){
var w=_1f6&&(_1f6.ownerDocument||_1f6.document||_1f6).parentWindow||window;
evt=w.event;
}
if(!evt){
return (evt);
}
evt.target=evt.srcElement;
evt.currentTarget=(_1f6||evt.srcElement);
evt.layerX=evt.offsetX;
evt.layerY=evt.offsetY;
var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;
var _1fa=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
var _1fb=dojo._getIeDocumentElementOffset();
evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1fa.scrollLeft||0)-_1fb.x;
evt.pageY=evt.clientY+(_1fa.scrollTop||0)-_1fb.y;
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
evt.stopPropagation=del._stopPropagation;
evt.preventDefault=del._preventDefault;
return del._fixKeys(evt);
},_fixKeys:function(evt){
switch(evt.type){
case "keypress":
var c=("charCode" in evt?evt.charCode:evt.keyCode);
if(c==10){
c=0;
evt.keyCode=13;
}else{
if(c==13||c==27){
c=0;
}else{
if(c==3){
c=99;
}
}
}
evt.charCode=c;
del._setKeyChar(evt);
break;
}
return evt;
},_stealthKeyDown:function(evt){
var kp=evt.currentTarget.onkeypress;
if(!kp||!kp[_1df]){
return;
}
var k=evt.keyCode;
var _201=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
if(_201||evt.ctrlKey){
var c=_201?0:k;
if(evt.ctrlKey){
if(k==3||k==13){
return;
}else{
if(c>95&&c<106){
c-=48;
}else{
if((!evt.shiftKey)&&(c>=65&&c<=90)){
c+=32;
}else{
c=del._punctMap[c]||c;
}
}
}
}
var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
kp.call(evt.currentTarget,faux);
evt.cancelBubble=faux.cancelBubble;
evt.returnValue=faux.returnValue;
_1db(evt,faux.keyCode);
}
},_stopPropagation:function(){
this.cancelBubble=true;
},_preventDefault:function(){
this.bubbledKeyCode=this.keyCode;
if(this.ctrlKey){
_1db(this,0);
}
this.returnValue=false;
}});
dojo.stopEvent=function(evt){
evt=evt||window.event;
del._stopPropagation.call(evt);
del._preventDefault.call(evt);
};
}
del._synthesizeEvent=function(evt,_206){
var faux=dojo.mixin({},evt,_206);
del._setKeyChar(faux);
faux.preventDefault=function(){
evt.preventDefault();
};
faux.stopPropagation=function(){
evt.stopPropagation();
};
return faux;
};
if(dojo.isOpera){
dojo.mixin(del,{_fixEvent:function(evt,_209){
switch(evt.type){
case "keypress":
var c=evt.which;
if(c==3){
c=99;
}
c=((c<41)&&(!evt.shiftKey)?0:c);
if((evt.ctrlKey)&&(!evt.shiftKey)&&(c>=65)&&(c<=90)){
c+=32;
}
return del._synthesizeEvent(evt,{charCode:c});
}
return evt;
}});
}
if(dojo.isSafari){
del._add=del.add;
del._remove=del.remove;
dojo.mixin(del,{add:function(node,_20c,fp){
if(!node){
return;
}
var _20e=del._add(node,_20c,fp);
if(del._normalizeEventName(_20c)=="keypress"){
_20e._stealthKeyDownHandle=del._add(node,"keydown",function(evt){
var k=evt.keyCode;
var _211=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
if(_211||evt.ctrlKey){
var c=_211?0:k;
if(evt.ctrlKey){
if(k==3||k==13){
return;
}else{
if(c>95&&c<106){
c-=48;
}else{
if((!evt.shiftKey)&&(c>=65&&c<=90)){
c+=32;
}else{
c=del._punctMap[c]||c;
}
}
}
}
var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
fp.call(evt.currentTarget,faux);
}
});
}
return _20e;
},remove:function(node,_215,_216){
if(node){
if(_216._stealthKeyDownHandle){
del._remove(node,"keydown",_216._stealthKeyDownHandle);
}
del._remove(node,_215,_216);
}
},_fixEvent:function(evt,_218){
switch(evt.type){
case "keypress":
if(evt.faux){
return evt;
}
var c=evt.charCode;
c=c>=32?c:0;
return del._synthesizeEvent(evt,{charCode:c,faux:true});
}
return evt;
}});
}
})();
if(dojo.isIE){
dojo._ieDispatcher=function(args,_21b){
var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];
var r=t&&t.apply(_21b,args);
var lls=[].concat(ls);
for(var i in lls){
if(!(i in ap)){
h[lls[i]].apply(_21b,args);
}
}
return r;
};
dojo._getIeDispatcher=function(){
return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");
};
dojo._event_listener._fixCallback=function(fp){
var f=dojo._event_listener._fixEvent;
return function(e){
return fp.call(this,f(e,this));
};
};
}
}
if(!dojo._hasResource["dojo._base.html"]){
dojo._hasResource["dojo._base.html"]=true;
dojo.provide("dojo._base.html");
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
if(dojo.isIE||dojo.isOpera){
dojo.byId=function(id,doc){
if(dojo.isString(id)){
var _d=doc||dojo.doc;
var te=_d.getElementById(id);
if(te&&te.attributes.id.value==id){
return te;
}else{
var eles=_d.all[id];
if(!eles||!eles.length){
return eles;
}
var i=0;
while((te=eles[i++])){
if(te.attributes.id.value==id){
return te;
}
}
}
}else{
return id;
}
};
}else{
dojo.byId=function(id,doc){
return dojo.isString(id)?(doc||dojo.doc).getElementById(id):id;
};
}
(function(){
var d=dojo;
var _230=null;
dojo.addOnWindowUnload(function(){
_230=null;
});
dojo._destroyElement=function(node){
node=d.byId(node);
try{
if(!_230||_230.ownerDocument!=node.ownerDocument){
_230=node.ownerDocument.createElement("div");
}
_230.appendChild(node.parentNode?node.parentNode.removeChild(node):node);
_230.innerHTML="";
}
catch(e){
}
};
dojo.isDescendant=function(node,_233){
try{
node=d.byId(node);
_233=d.byId(_233);
while(node){
if(node===_233){
return true;
}
node=node.parentNode;
}
}
catch(e){
}
return false;
};
dojo.setSelectable=function(node,_235){
node=d.byId(node);
if(d.isMozilla){
node.style.MozUserSelect=_235?"":"none";
}else{
if(d.isKhtml){
node.style.KhtmlUserSelect=_235?"auto":"none";
}else{
if(d.isIE){
var v=(node.unselectable=_235?"":"on");
d.query("*",node).forEach("item.unselectable = '"+v+"'");
}
}
}
};
var _237=function(node,ref){
ref.parentNode.insertBefore(node,ref);
return true;
};
var _23a=function(node,ref){
var pn=ref.parentNode;
if(ref==pn.lastChild){
pn.appendChild(node);
}else{
return _237(node,ref.nextSibling);
}
return true;
};
dojo.place=function(node,_23f,_240){
if(!node||!_23f){
return false;
}
node=d.byId(node);
_23f=d.byId(_23f);
if(typeof _240=="number"){
var cn=_23f.childNodes;
if(!cn.length||cn.length<=_240){
_23f.appendChild(node);
return true;
}
return _237(node,_240<=0?_23f.firstChild:cn[_240]);
}
switch(_240){
case "before":
return _237(node,_23f);
case "after":
return _23a(node,_23f);
case "first":
if(_23f.firstChild){
return _237(node,_23f.firstChild);
}
default:
_23f.appendChild(node);
return true;
}
};
dojo.boxModel="content-box";
if(d.isIE){
var _dcm=document.compatMode;
d.boxModel=_dcm=="BackCompat"||_dcm=="QuirksMode"||d.isIE<6?"border-box":"content-box";
}
var gcs;
if(d.isSafari){
gcs=function(node){
var s;
if(node instanceof HTMLElement){
var dv=node.ownerDocument.defaultView;
s=dv.getComputedStyle(node,null);
if(!s&&node.style){
node.style.display="";
s=dv.getComputedStyle(node,null);
}
}
return s||{};
};
}else{
if(d.isIE){
gcs=function(node){
return node.nodeType==1?node.currentStyle:{};
};
}else{
gcs=function(node){
return node instanceof HTMLElement?node.ownerDocument.defaultView.getComputedStyle(node,null):{};
};
}
}
dojo.getComputedStyle=gcs;
if(!d.isIE){
dojo._toPixelValue=function(_249,_24a){
return parseFloat(_24a)||0;
};
}else{
dojo._toPixelValue=function(_24b,_24c){
if(!_24c){
return 0;
}
if(_24c=="medium"){
return 4;
}
if(_24c.slice&&(_24c.slice(-2)=="px")){
return parseFloat(_24c);
}
with(_24b){
var _24d=style.left;
var _24e=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_24c;
_24c=style.pixelLeft;
}
catch(e){
_24c=0;
}
style.left=_24d;
runtimeStyle.left=_24e;
}
return _24c;
};
}
var px=d._toPixelValue;
var astr="DXImageTransform.Microsoft.Alpha";
var af=function(n,f){
try{
return n.filters.item(astr);
}
catch(e){
return f?{}:null;
}
};
dojo._getOpacity=d.isIE?function(node){
try{
return af(node).Opacity/100;
}
catch(e){
return 1;
}
}:function(node){
return gcs(node).opacity;
};
dojo._setOpacity=d.isIE?function(node,_257){
var ov=_257*100;
node.style.zoom=1;
af(node,1).Enabled=(_257==1?false:true);
if(!af(node)){
node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";
}else{
af(node,1).Opacity=ov;
}
if(node.nodeName.toLowerCase()=="tr"){
d.query("> td",node).forEach(function(i){
d._setOpacity(i,_257);
});
}
return _257;
}:function(node,_25b){
return node.style.opacity=_25b;
};
var _25c={left:true,top:true};
var _25d=/margin|padding|width|height|max|min|offset/;
var _25e=function(node,type,_261){
type=type.toLowerCase();
if(d.isIE){
if(_261=="auto"){
if(type=="height"){
return node.offsetHeight;
}
if(type=="width"){
return node.offsetWidth;
}
}
if(type=="fontweight"){
switch(_261){
case 700:
return "bold";
case 400:
default:
return "normal";
}
}
}
if(!(type in _25c)){
_25c[type]=_25d.test(type);
}
return _25c[type]?px(node,_261):_261;
};
var _262=d.isIE?"styleFloat":"cssFloat";
var _263={"cssFloat":_262,"styleFloat":_262,"float":_262};
dojo.style=function(node,_265,_266){
var n=d.byId(node),args=arguments.length,op=(_265=="opacity");
_265=_263[_265]||_265;
if(args==3){
return op?d._setOpacity(n,_266):n.style[_265]=_266;
}
if(args==2&&op){
return d._getOpacity(n);
}
var s=gcs(n);
if(args==2&&!d.isString(_265)){
for(var x in _265){
d.style(node,x,_265[x]);
}
return s;
}
return (args==1)?s:_25e(n,_265,s[_265]||n.style[_265]);
};
dojo._getPadExtents=function(n,_26d){
var s=_26d||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);
return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};
};
dojo._getBorderExtents=function(n,_272){
var ne="none",s=_272||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);
return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};
};
dojo._getPadBorderExtents=function(n,_278){
var s=_278||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);
return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};
};
dojo._getMarginExtents=function(n,_27d){
var s=_27d||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);
if(d.isSafari&&(s.position!="absolute")){
r=l;
}
return {l:l,t:t,w:l+r,h:t+b};
};
dojo._getMarginBox=function(node,_284){
var s=_284||gcs(node),me=d._getMarginExtents(node,s);
var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;
if(d.isMoz){
var sl=parseFloat(s.left),st=parseFloat(s.top);
if(!isNaN(sl)&&!isNaN(st)){
l=sl,t=st;
}else{
if(p&&p.style){
var pcs=gcs(p);
if(pcs.overflow!="visible"){
var be=d._getBorderExtents(p,pcs);
l+=be.l,t+=be.t;
}
}
}
}else{
if(d.isOpera){
if(p){
var be=d._getBorderExtents(p);
l-=be.l;
t-=be.t;
}
}
}
return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};
};
dojo._getContentBox=function(node,_28f){
var s=_28f||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;
if(!w){
w=node.offsetWidth,h=node.offsetHeight;
}else{
h=node.clientHeight,be.w=be.h=0;
}
if(d.isOpera){
pe.l+=be.l;
pe.t+=be.t;
}
return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};
};
dojo._getBorderBox=function(node,_296){
var s=_296||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);
return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};
};
dojo._setBox=function(node,l,t,w,h,u){
u=u||"px";
var s=node.style;
if(!isNaN(l)){
s.left=l+u;
}
if(!isNaN(t)){
s.top=t+u;
}
if(w>=0){
s.width=w+u;
}
if(h>=0){
s.height=h+u;
}
};
dojo._isButtonTag=function(node){
return node.tagName=="BUTTON"||node.tagName=="INPUT"&&node.getAttribute("type").toUpperCase()=="BUTTON";
};
dojo._usesBorderBox=function(node){
var n=node.tagName;
return d.boxModel=="border-box"||n=="TABLE"||dojo._isButtonTag(node);
};
dojo._setContentSize=function(node,_2a5,_2a6,_2a7){
if(d._usesBorderBox(node)){
var pb=d._getPadBorderExtents(node,_2a7);
if(_2a5>=0){
_2a5+=pb.w;
}
if(_2a6>=0){
_2a6+=pb.h;
}
}
d._setBox(node,NaN,NaN,_2a5,_2a6);
};
dojo._setMarginBox=function(node,_2aa,_2ab,_2ac,_2ad,_2ae){
var s=_2ae||gcs(node);
var bb=d._usesBorderBox(node),pb=bb?_2b2:d._getPadBorderExtents(node,s);
if(dojo.isSafari){
if(dojo._isButtonTag(node)){
var ns=node.style;
if(_2ac>=0&&!ns.width){
ns.width="4px";
}
if(_2ad>=0&&!ns.height){
ns.height="4px";
}
}
}
var mb=d._getMarginExtents(node,s);
if(_2ac>=0){
_2ac=Math.max(_2ac-pb.w-mb.w,0);
}
if(_2ad>=0){
_2ad=Math.max(_2ad-pb.h-mb.h,0);
}
d._setBox(node,_2aa,_2ab,_2ac,_2ad);
};
var _2b2={l:0,t:0,w:0,h:0};
dojo.marginBox=function(node,box){
var n=d.byId(node),s=gcs(n),b=box;
return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);
};
dojo.contentBox=function(node,box){
var n=d.byId(node),s=gcs(n),b=box;
return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);
};
var _2bf=function(node,prop){
if(!(node=(node||0).parentNode)){
return 0;
}
var val,_2c3=0,_b=d.body();
while(node&&node.style){
if(gcs(node).position=="fixed"){
return 0;
}
val=node[prop];
if(val){
_2c3+=val-0;
if(node==_b){
break;
}
}
node=node.parentNode;
}
return _2c3;
};
dojo._docScroll=function(){
var _b=d.body(),_w=d.global,de=d.doc.documentElement;
return {y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||d._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};
};
dojo._isBodyLtr=function(){
return !("_bodyLtr" in d)?d._bodyLtr=gcs(d.body()).direction=="ltr":d._bodyLtr;
};
dojo._getIeDocumentElementOffset=function(){
var de=d.doc.documentElement;
return (d.isIE>=7)?{x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top}:{x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};
};
dojo._fixIeBiDiScrollLeft=function(_2c9){
var dd=d.doc;
if(d.isIE&&!dojo._isBodyLtr()){
var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;
return _2c9+de.clientWidth-de.scrollWidth;
}
return _2c9;
};
dojo._abs=function(node,_2cd){
var _2ce=node.ownerDocument;
var ret={x:0,y:0};
var db=d.body();
if(d.isIE||(d.isFF>=3)){
var _2d1=node.getBoundingClientRect();
var cs;
if(d.isFF){
var dv=node.ownerDocument.defaultView;
cs=dv.getComputedStyle(db.parentNode,null);
}
var _2d4=(d.isIE)?d._getIeDocumentElementOffset():{x:px(db.parentNode,cs.marginLeft),y:px(db.parentNode,cs.marginTop)};
ret.x=_2d1.left-_2d4.x;
ret.y=_2d1.top-_2d4.y;
}else{
if(node["offsetParent"]){
var _2d5;
if(d.isSafari&&(gcs(node).position=="absolute")&&(node.parentNode==db)){
_2d5=db;
}else{
_2d5=db.parentNode;
}
var cs=gcs(node);
var n=node;
if(d.isOpera&&cs.position!="absolute"){
n=n.offsetParent;
}
ret.x-=_2bf(n,"scrollLeft");
ret.y-=_2bf(n,"scrollTop");
var _2d7=node;
do{
var n=_2d7.offsetLeft;
if(!d.isOpera||n>0){
ret.x+=isNaN(n)?0:n;
}
var t=_2d7.offsetTop;
ret.y+=isNaN(t)?0:t;
var cs=gcs(_2d7);
if(_2d7!=node){
if(d.isSafari){
ret.x+=px(_2d7,cs.borderLeftWidth);
ret.y+=px(_2d7,cs.borderTopWidth);
}else{
if(d.isFF){
ret.x+=2*px(_2d7,cs.borderLeftWidth);
ret.y+=2*px(_2d7,cs.borderTopWidth);
}
}
}
if(d.isFF&&cs.position=="static"){
var _2d9=_2d7.parentNode;
while(_2d9!=_2d7.offsetParent){
var pcs=gcs(_2d9);
if(pcs.position=="static"){
ret.x+=px(_2d7,pcs.borderLeftWidth);
ret.y+=px(_2d7,pcs.borderTopWidth);
}
_2d9=_2d9.parentNode;
}
}
_2d7=_2d7.offsetParent;
}while((_2d7!=_2d5)&&_2d7);
}else{
if(node.x&&node.y){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
if(_2cd){
var _2db=d._docScroll();
ret.y+=_2db.y;
ret.x+=_2db.x;
}
return ret;
};
dojo.coords=function(node,_2dd){
var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);
var abs=d._abs(n,_2dd);
mb.x=abs.x;
mb.y=abs.y;
return mb;
};
var _2e2=d.isIE<8;
var _2e3=function(name){
switch(name.toLowerCase()){
case "tabindex":
return _2e2?"tabIndex":"tabindex";
case "for":
case "htmlfor":
return _2e2?"htmlFor":"for";
case "class":
return d.isIE?"className":"class";
default:
return name;
}
};
var _2e5={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType"};
dojo.hasAttr=function(node,name){
node=d.byId(node);
var _2e8=_2e3(name);
_2e8=_2e8=="htmlFor"?"for":_2e8;
var attr=node.getAttributeNode&&node.getAttributeNode(_2e8);
return attr?attr.specified:false;
};
var _2ea={};
var _ctr=0;
var _2ec=dojo._scopeName+"attrid";
dojo.attr=function(node,name,_2ef){
var args=arguments.length;
if(args==2&&!d.isString(name)){
for(var x in name){
d.attr(node,x,name[x]);
}
return;
}
node=d.byId(node);
name=_2e3(name);
if(args==3){
if(d.isFunction(_2ef)){
var _2f2=d.attr(node,_2ec);
if(!_2f2){
_2f2=_ctr++;
d.attr(node,_2ec,_2f2);
}
if(!_2ea[_2f2]){
_2ea[_2f2]={};
}
var h=_2ea[_2f2][name];
if(h){
d.disconnect(h);
}else{
try{
delete node[name];
}
catch(e){
}
}
_2ea[_2f2][name]=d.connect(node,name,_2ef);
}else{
if((typeof _2ef=="boolean")||(name=="innerHTML")){
node[name]=_2ef;
}else{
if((name=="style")&&(!d.isString(_2ef))){
d.style(node,_2ef);
}else{
node.setAttribute(name,_2ef);
}
}
}
return;
}else{
var prop=_2e5[name.toLowerCase()];
if(prop){
return node[prop];
}else{
var _2f5=node[name];
return (typeof _2f5=="boolean"||typeof _2f5=="function")?_2f5:(d.hasAttr(node,name)?node.getAttribute(name):null);
}
}
};
dojo.removeAttr=function(node,name){
d.byId(node).removeAttribute(_2e3(name));
};
var _2f8="className";
dojo.hasClass=function(node,_2fa){
return ((" "+d.byId(node)[_2f8]+" ").indexOf(" "+_2fa+" ")>=0);
};
dojo.addClass=function(node,_2fc){
node=d.byId(node);
var cls=node[_2f8];
if((" "+cls+" ").indexOf(" "+_2fc+" ")<0){
node[_2f8]=cls+(cls?" ":"")+_2fc;
}
};
dojo.removeClass=function(node,_2ff){
node=d.byId(node);
var t=d.trim((" "+node[_2f8]+" ").replace(" "+_2ff+" "," "));
if(node[_2f8]!=t){
node[_2f8]=t;
}
};
dojo.toggleClass=function(node,_302,_303){
if(_303===undefined){
_303=!d.hasClass(node,_302);
}
d[_303?"addClass":"removeClass"](node,_302);
};
})();
}
if(!dojo._hasResource["dojo._base.NodeList"]){
dojo._hasResource["dojo._base.NodeList"]=true;
dojo.provide("dojo._base.NodeList");
(function(){
var d=dojo;
var tnl=function(arr){
arr.constructor=dojo.NodeList;
dojo._mixin(arr,dojo.NodeList.prototype);
return arr;
};
var _307=function(func,_309){
return function(){
var _a=arguments;
var aa=d._toArray(_a,0,[null]);
var s=this.map(function(i){
aa[0]=i;
return d[func].apply(d,aa);
});
return (_309||((_a.length>1)||!d.isString(_a[0])))?this:s;
};
};
dojo.NodeList=function(){
return tnl(Array.apply(null,arguments));
};
dojo.NodeList._wrap=tnl;
dojo.extend(dojo.NodeList,{slice:function(){
var a=d._toArray(arguments);
return tnl(a.slice.apply(this,a));
},splice:function(){
var a=d._toArray(arguments);
return tnl(a.splice.apply(this,a));
},concat:function(){
var a=d._toArray(arguments,0,[this]);
return tnl(a.concat.apply([],a));
},indexOf:function(_311,_312){
return d.indexOf(this,_311,_312);
},lastIndexOf:function(){
return d.lastIndexOf.apply(d,d._toArray(arguments,0,[this]));
},every:function(_313,_314){
return d.every(this,_313,_314);
},some:function(_315,_316){
return d.some(this,_315,_316);
},map:function(func,obj){
return d.map(this,func,obj,d.NodeList);
},forEach:function(_319,_31a){
d.forEach(this,_319,_31a);
return this;
},coords:function(){
return d.map(this,d.coords);
},attr:_307("attr"),style:_307("style"),addClass:_307("addClass",true),removeClass:_307("removeClass",true),toggleClass:_307("toggleClass",true),connect:_307("connect",true),place:function(_31b,_31c){
var item=d.query(_31b)[0];
return this.forEach(function(i){
d.place(i,item,_31c);
});
},orphan:function(_31f){
return (_31f?d._filterQueryResult(this,_31f):this).forEach("if(item.parentNode){ item.parentNode.removeChild(item); }");
},adopt:function(_320,_321){
var item=this[0];
return d.query(_320).forEach(function(ai){
d.place(ai,item,_321||"last");
});
},query:function(_324){
if(!_324){
return this;
}
var ret=d.NodeList();
this.forEach(function(item){
ret=ret.concat(d.query(_324,item).filter(function(_327){
return (_327!==undefined);
}));
});
return ret;
},filter:function(_328){
var _329=this;
var _a=arguments;
var r=d.NodeList();
var rp=function(t){
if(t!==undefined){
r.push(t);
}
};
if(d.isString(_328)){
_329=d._filterQueryResult(this,_a[0]);
if(_a.length==1){
return _329;
}
_a.shift();
}
d.forEach(d.filter(_329,_a[0],_a[1]),rp);
return r;
},addContent:function(_32e,_32f){
var ta=d.doc.createElement("span");
if(d.isString(_32e)){
ta.innerHTML=_32e;
}else{
ta.appendChild(_32e);
}
if(_32f===undefined){
_32f="last";
}
var ct=(_32f=="first"||_32f=="after")?"lastChild":"firstChild";
this.forEach(function(item){
var tn=ta.cloneNode(true);
while(tn[ct]){
d.place(tn[ct],item,_32f);
}
});
return this;
},empty:function(){
return this.forEach("item.innerHTML='';");
},instantiate:function(_334,_335){
var c=d.isFunction(_334)?_334:d.getObject(_334);
return this.forEach(function(i){
new c(_335||{},i);
});
},at:function(){
var nl=new dojo.NodeList();
dojo.forEach(arguments,function(i){
if(this[i]){
nl.push(this[i]);
}
},this);
return nl;
}});
d.forEach(["blur","focus","click","keydown","keypress","keyup","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit","load","error"],function(evt){
var _oe="on"+evt;
d.NodeList.prototype[_oe]=function(a,b){
return this.connect(_oe,a,b);
};
});
})();
}
if(!dojo._hasResource["dojo._base.query"]){
dojo._hasResource["dojo._base.query"]=true;
dojo.provide("dojo._base.query");
(function(){
var d=dojo;
var _33f=dojo.isIE?"children":"childNodes";
var _340=false;
var _341=function(_342){
if(">~+".indexOf(_342.charAt(_342.length-1))>=0){
_342+=" *";
}
_342+=" ";
var ts=function(s,e){
return d.trim(_342.slice(s,e));
};
var _346=[];
var _347=-1;
var _348=-1;
var _349=-1;
var _34a=-1;
var _34b=-1;
var inId=-1;
var _34d=-1;
var lc="";
var cc="";
var _350;
var x=0;
var ql=_342.length;
var _353=null;
var _cp=null;
var _355=function(){
if(_34d>=0){
var tv=(_34d==x)?null:ts(_34d,x);
_353[(">~+".indexOf(tv)<0)?"tag":"oper"]=tv;
_34d=-1;
}
};
var _357=function(){
if(inId>=0){
_353.id=ts(inId,x).replace(/\\/g,"");
inId=-1;
}
};
var _358=function(){
if(_34b>=0){
_353.classes.push(ts(_34b+1,x).replace(/\\/g,""));
_34b=-1;
}
};
var _359=function(){
_357();
_355();
_358();
};
for(;lc=cc,cc=_342.charAt(x),x<ql;x++){
if(lc=="\\"){
continue;
}
if(!_353){
_350=x;
_353={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null};
_34d=x;
}
if(_347>=0){
if(cc=="]"){
if(!_cp.attr){
_cp.attr=ts(_347+1,x);
}else{
_cp.matchFor=ts((_349||_347+1),x);
}
var cmf=_cp.matchFor;
if(cmf){
if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){
_cp.matchFor=cmf.substring(1,cmf.length-1);
}
}
_353.attrs.push(_cp);
_cp=null;
_347=_349=-1;
}else{
if(cc=="="){
var _35b=("|~^$*".indexOf(lc)>=0)?lc:"";
_cp.type=_35b+cc;
_cp.attr=ts(_347+1,x-_35b.length);
_349=x+1;
}
}
}else{
if(_348>=0){
if(cc==")"){
if(_34a>=0){
_cp.value=ts(_348+1,x);
}
_34a=_348=-1;
}
}else{
if(cc=="#"){
_359();
inId=x+1;
}else{
if(cc=="."){
_359();
_34b=x;
}else{
if(cc==":"){
_359();
_34a=x;
}else{
if(cc=="["){
_359();
_347=x;
_cp={};
}else{
if(cc=="("){
if(_34a>=0){
_cp={name:ts(_34a+1,x),value:null};
_353.pseudos.push(_cp);
}
_348=x;
}else{
if(cc==" "&&lc!=cc){
_359();
if(_34a>=0){
_353.pseudos.push({name:ts(_34a+1,x)});
}
_353.hasLoops=(_353.pseudos.length||_353.attrs.length||_353.classes.length);
_353.query=ts(_350,x);
_353.otag=_353.tag=(_353["oper"])?null:(_353.tag||"*");
if(_353.tag){
_353.tag=_353.tag.toUpperCase();
}
_346.push(_353);
_353=null;
}
}
}
}
}
}
}
}
}
return _346;
};
var _35c={"*=":function(attr,_35e){
return "[contains(@"+attr+", '"+_35e+"')]";
},"^=":function(attr,_360){
return "[starts-with(@"+attr+", '"+_360+"')]";
},"$=":function(attr,_362){
return "[substring(@"+attr+", string-length(@"+attr+")-"+(_362.length-1)+")='"+_362+"']";
},"~=":function(attr,_364){
return "[contains(concat(' ',@"+attr+",' '), ' "+_364+" ')]";
},"|=":function(attr,_366){
return "[contains(concat(' ',@"+attr+",' '), ' "+_366+"-')]";
},"=":function(attr,_368){
return "[@"+attr+"='"+_368+"']";
}};
var _369=function(_36a,_36b,_36c,_36d){
d.forEach(_36b.attrs,function(attr){
var _36f;
if(attr.type&&_36a[attr.type]){
_36f=_36a[attr.type](attr.attr,attr.matchFor);
}else{
if(attr.attr.length){
_36f=_36c(attr.attr);
}
}
if(_36f){
_36d(_36f);
}
});
};
var _370=function(_371){
var _372=".";
var _373=_341(d.trim(_371));
while(_373.length){
var tqp=_373.shift();
var _375;
var _376="";
if(tqp.oper==">"){
_375="/";
tqp=_373.shift();
}else{
if(tqp.oper=="~"){
_375="/following-sibling::";
tqp=_373.shift();
}else{
if(tqp.oper=="+"){
_375="/following-sibling::";
_376="[position()=1]";
tqp=_373.shift();
}else{
_375="//";
}
}
}
_372+=_375+tqp.tag+_376;
if(tqp.id){
_372+="[@id='"+tqp.id+"'][1]";
}
d.forEach(tqp.classes,function(cn){
var cnl=cn.length;
var _379=" ";
if(cn.charAt(cnl-1)=="*"){
_379="";
cn=cn.substr(0,cnl-1);
}
_372+="[contains(concat(' ',@class,' '), ' "+cn+_379+"')]";
});
_369(_35c,tqp,function(_37a){
return "[@"+_37a+"]";
},function(_37b){
_372+=_37b;
});
}
return _372;
};
var _37c={};
var _37d=function(path){
if(_37c[path]){
return _37c[path];
}
var doc=d.doc;
var _380=_370(path);
var tf=function(_382){
var ret=[];
var _384;
var tdoc=doc;
if(_382){
tdoc=(_382.nodeType==9)?_382:_382.ownerDocument;
}
try{
_384=tdoc.evaluate(_380,_382,null,XPathResult.ANY_TYPE,null);
}
catch(e){
}
var _386=_384.iterateNext();
while(_386){
ret.push(_386);
_386=_384.iterateNext();
}
return ret;
};
return _37c[path]=tf;
};
var _387={};
var _388={};
var _389=function(_38a,_38b){
if(!_38a){
return _38b;
}
if(!_38b){
return _38a;
}
return function(){
return _38a.apply(window,arguments)&&_38b.apply(window,arguments);
};
};
var _38c=function(root){
var ret=[];
var te,x=0,tret=root[_33f];
while((te=tret[x++])){
if(te.nodeType==1){
ret.push(te);
}
}
return ret;
};
var _392=function(root,_394){
var ret=[];
var te=root;
while(te=te.nextSibling){
if(te.nodeType==1){
ret.push(te);
if(_394){
break;
}
}
}
return ret;
};
var _397=function(_398,_399,_39a,idx){
var nidx=idx+1;
var _39d=(_399.length==nidx);
var tqp=_399[idx];
if(tqp.oper){
var ecn=(tqp.oper==">")?_38c(_398):_392(_398,(tqp.oper=="+"));
if(!ecn||!ecn.length){
return;
}
nidx++;
_39d=(_399.length==nidx);
var tf=_3a1(_399[idx+1]);
for(var x=0,ecnl=ecn.length,te;x<ecnl,te=ecn[x];x++){
if(tf(te)){
if(_39d){
_39a.push(te);
}else{
_397(te,_399,_39a,nidx);
}
}
}
}
var _3a5=_3a6(tqp)(_398);
if(_39d){
while(_3a5.length){
_39a.push(_3a5.shift());
}
}else{
while(_3a5.length){
_397(_3a5.shift(),_399,_39a,nidx);
}
}
};
var _3a7=function(_3a8,_3a9){
var ret=[];
var x=_3a8.length-1,te;
while((te=_3a8[x--])){
_397(te,_3a9,ret,0);
}
return ret;
};
var _3a1=function(q){
if(_387[q.query]){
return _387[q.query];
}
var ff=null;
if(q.tag){
if(q.tag=="*"){
ff=_389(ff,function(elem){
return (elem.nodeType==1);
});
}else{
ff=_389(ff,function(elem){
return ((elem.nodeType==1)&&(q[_340?"otag":"tag"]==elem.tagName));
});
}
}
if(q.id){
ff=_389(ff,function(elem){
return ((elem.nodeType==1)&&(elem.id==q.id));
});
}
if(q.hasLoops){
ff=_389(ff,_3b2(q));
}
return _387[q.query]=ff;
};
var _3b3=function(node){
var pn=node.parentNode;
var pnc=pn.childNodes;
var nidx=-1;
var _3b8=pn.firstChild;
if(!_3b8){
return nidx;
}
var ci=node["__cachedIndex"];
var cl=pn["__cachedLength"];
if(((typeof cl=="number")&&(cl!=pnc.length))||(typeof ci!="number")){
pn["__cachedLength"]=pnc.length;
var idx=1;
do{
if(_3b8===node){
nidx=idx;
}
if(_3b8.nodeType==1){
_3b8["__cachedIndex"]=idx;
idx++;
}
_3b8=_3b8.nextSibling;
}while(_3b8);
}else{
nidx=ci;
}
return nidx;
};
var _3bc=0;
var _3bd="";
var _3be=function(elem,attr){
if(attr=="class"){
return elem.className||_3bd;
}
if(attr=="for"){
return elem.htmlFor||_3bd;
}
if(attr=="style"){
return elem.style.cssText||_3bd;
}
return (_340?elem.getAttribute(attr):elem.getAttribute(attr,2))||_3bd;
};
var _3c1={"*=":function(attr,_3c3){
return function(elem){
return (_3be(elem,attr).indexOf(_3c3)>=0);
};
},"^=":function(attr,_3c6){
return function(elem){
return (_3be(elem,attr).indexOf(_3c6)==0);
};
},"$=":function(attr,_3c9){
var tval=" "+_3c9;
return function(elem){
var ea=" "+_3be(elem,attr);
return (ea.lastIndexOf(_3c9)==(ea.length-_3c9.length));
};
},"~=":function(attr,_3ce){
var tval=" "+_3ce+" ";
return function(elem){
var ea=" "+_3be(elem,attr)+" ";
return (ea.indexOf(tval)>=0);
};
},"|=":function(attr,_3d3){
var _3d4=" "+_3d3+"-";
return function(elem){
var ea=" "+(elem.getAttribute(attr,2)||"");
return ((ea==_3d3)||(ea.indexOf(_3d4)==0));
};
},"=":function(attr,_3d8){
return function(elem){
return (_3be(elem,attr)==_3d8);
};
}};
var _3da={"checked":function(name,_3dc){
return function(elem){
return !!d.attr(elem,"checked");
};
},"first-child":function(name,_3df){
return function(elem){
if(elem.nodeType!=1){
return false;
}
var fc=elem.previousSibling;
while(fc&&(fc.nodeType!=1)){
fc=fc.previousSibling;
}
return (!fc);
};
},"last-child":function(name,_3e3){
return function(elem){
if(elem.nodeType!=1){
return false;
}
var nc=elem.nextSibling;
while(nc&&(nc.nodeType!=1)){
nc=nc.nextSibling;
}
return (!nc);
};
},"empty":function(name,_3e7){
return function(elem){
var cn=elem.childNodes;
var cnl=elem.childNodes.length;
for(var x=cnl-1;x>=0;x--){
var nt=cn[x].nodeType;
if((nt==1)||(nt==3)){
return false;
}
}
return true;
};
},"contains":function(name,_3ee){
return function(elem){
if(_3ee.charAt(0)=="\""||_3ee.charAt(0)=="'"){
_3ee=_3ee.substr(1,_3ee.length-2);
}
return (elem.innerHTML.indexOf(_3ee)>=0);
};
},"not":function(name,_3f1){
var ntf=_3a1(_341(_3f1)[0]);
return function(elem){
return (!ntf(elem));
};
},"nth-child":function(name,_3f5){
var pi=parseInt;
if(_3f5=="odd"){
_3f5="2n+1";
}else{
if(_3f5=="even"){
_3f5="2n";
}
}
if(_3f5.indexOf("n")!=-1){
var _3f7=_3f5.split("n",2);
var pred=_3f7[0]?(_3f7[0]=="-"?-1:pi(_3f7[0])):1;
var idx=_3f7[1]?pi(_3f7[1]):0;
var lb=0,ub=-1;
if(pred>0){
if(idx<0){
idx=(idx%pred)&&(pred+(idx%pred));
}else{
if(idx>0){
if(idx>=pred){
lb=idx-idx%pred;
}
idx=idx%pred;
}
}
}else{
if(pred<0){
pred*=-1;
if(idx>0){
ub=idx;
idx=idx%pred;
}
}
}
if(pred>0){
return function(elem){
var i=_3b3(elem);
return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);
};
}else{
_3f5=idx;
}
}
var _3fe=pi(_3f5);
return function(elem){
return (_3b3(elem)==_3fe);
};
}};
var _400=(d.isIE)?function(cond){
var clc=cond.toLowerCase();
return function(elem){
return (_340?elem.getAttribute(cond):elem[cond]||elem[clc]);
};
}:function(cond){
return function(elem){
return (elem&&elem.getAttribute&&elem.hasAttribute(cond));
};
};
var _3b2=function(_406){
var _407=(_388[_406.query]||_387[_406.query]);
if(_407){
return _407;
}
var ff=null;
if(_406.id){
if(_406.tag!="*"){
ff=_389(ff,function(elem){
return (elem.tagName==_406[_340?"otag":"tag"]);
});
}
}
d.forEach(_406.classes,function(_40a,idx,arr){
var _40d=_40a.charAt(_40a.length-1)=="*";
if(_40d){
_40a=_40a.substr(0,_40a.length-1);
}
var re=new RegExp("(?:^|\\s)"+_40a+(_40d?".*":"")+"(?:\\s|$)");
ff=_389(ff,function(elem){
return re.test(elem.className);
});
ff.count=idx;
});
d.forEach(_406.pseudos,function(_410){
if(_3da[_410.name]){
ff=_389(ff,_3da[_410.name](_410.name,_410.value));
}
});
_369(_3c1,_406,_400,function(_411){
ff=_389(ff,_411);
});
if(!ff){
ff=function(){
return true;
};
}
return _388[_406.query]=ff;
};
var _412={};
var _3a6=function(_413,root){
var fHit=_412[_413.query];
if(fHit){
return fHit;
}
if(_413.id&&!_413.hasLoops&&!_413.tag){
return _412[_413.query]=function(root){
return [d.byId(_413.id)];
};
}
var _417=_3b2(_413);
var _418;
if(_413.tag&&_413.id&&!_413.hasLoops){
_418=function(root){
var te=d.byId(_413.id,(root.ownerDocument||root));
if(_417(te)){
return [te];
}
};
}else{
var tret;
if(!_413.hasLoops){
_418=function(root){
var ret=[];
var te,x=0,tret=root.getElementsByTagName(_413[_340?"otag":"tag"]);
while((te=tret[x++])){
ret.push(te);
}
return ret;
};
}else{
_418=function(root){
var ret=[];
var te,x=0,tret=root.getElementsByTagName(_413[_340?"otag":"tag"]);
while((te=tret[x++])){
if(_417(te)){
ret.push(te);
}
}
return ret;
};
}
}
return _412[_413.query]=_418;
};
var _424={};
var _425={"*":d.isIE?function(root){
return root.all;
}:function(root){
return root.getElementsByTagName("*");
},"~":_392,"+":function(root){
return _392(root,true);
},">":_38c};
var _429=function(_42a){
var _42b=_341(d.trim(_42a));
if(_42b.length==1){
var tt=_3a6(_42b[0]);
tt.nozip=true;
return tt;
}
var sqf=function(root){
var _42f=_42b.slice(0);
var _430;
if(_42f[0].oper==">"){
_430=[root];
}else{
_430=_3a6(_42f.shift())(root);
}
return _3a7(_430,_42f);
};
return sqf;
};
var _431=((document["evaluate"]&&!d.isSafari)?function(_432,root){
var _434=_432.split(" ");
if((!_340)&&(document["evaluate"])&&(_432.indexOf(":")==-1)&&(_432.indexOf("+")==-1)){
if(((_434.length>2)&&(_432.indexOf(">")==-1))||(_434.length>3)||(_432.indexOf("[")>=0)||((1==_434.length)&&(0<=_432.indexOf(".")))){
return _37d(_432);
}
}
return _429(_432);
}:_429);
var _435=function(_436){
if(_425[_436]){
return _425[_436];
}
if(0>_436.indexOf(",")){
return _425[_436]=_431(_436);
}else{
var _437=_436.split(/\s*,\s*/);
var tf=function(root){
var _43a=0;
var ret=[];
var tp;
while((tp=_437[_43a++])){
ret=ret.concat(_431(tp,tp.indexOf(" "))(root));
}
return ret;
};
return _425[_436]=tf;
}
};
var _43d=0;
var _zip=function(arr){
if(arr&&arr.nozip){
return d.NodeList._wrap(arr);
}
var ret=new d.NodeList();
if(!arr){
return ret;
}
if(arr[0]){
ret.push(arr[0]);
}
if(arr.length<2){
return ret;
}
_43d++;
if(d.isIE&&_340){
var _441=_43d+"";
arr[0].setAttribute("_zipIdx",_441);
for(var x=1,te;te=arr[x];x++){
if(arr[x].getAttribute("_zipIdx")!=_441){
ret.push(te);
}
te.setAttribute("_zipIdx",_441);
}
}else{
arr[0]["_zipIdx"]=_43d;
for(var x=1,te;te=arr[x];x++){
if(arr[x]["_zipIdx"]!=_43d){
ret.push(te);
}
te["_zipIdx"]=_43d;
}
}
return ret;
};
d.query=function(_444,root){
if(_444.constructor==d.NodeList){
return _444;
}
if(!d.isString(_444)){
return new d.NodeList(_444);
}
if(d.isString(root)){
root=d.byId(root);
}
root=root||d.doc;
var od=root.ownerDocument||root.documentElement;
_340=(root.contentType&&root.contentType=="application/xml")||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));
return _zip(_435(_444)(root));
};
d.query.pseudos=_3da;
d._filterQueryResult=function(_447,_448){
var tnl=new d.NodeList();
var ff=(_448)?_3a1(_341(_448)[0]):function(){
return true;
};
for(var x=0,te;te=_447[x];x++){
if(ff(te)){
tnl.push(te);
}
}
return tnl;
};
})();
}
if(!dojo._hasResource["dojo._base.xhr"]){
dojo._hasResource["dojo._base.xhr"]=true;
dojo.provide("dojo._base.xhr");
(function(){
var _d=dojo;
function setValue(obj,name,_450){
var val=obj[name];
if(_d.isString(val)){
obj[name]=[val,_450];
}else{
if(_d.isArray(val)){
val.push(_450);
}else{
obj[name]=_450;
}
}
};
dojo.formToObject=function(_452){
var ret={};
var _454="file|submit|image|reset|button|";
_d.forEach(dojo.byId(_452).elements,function(item){
var _in=item.name;
var type=(item.type||"").toLowerCase();
if(_in&&type&&_454.indexOf(type)==-1&&!item.disabled){
if(type=="radio"||type=="checkbox"){
if(item.checked){
setValue(ret,_in,item.value);
}
}else{
if(item.multiple){
ret[_in]=[];
_d.query("option",item).forEach(function(opt){
if(opt.selected){
setValue(ret,_in,opt.value);
}
});
}else{
setValue(ret,_in,item.value);
if(type=="image"){
ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0;
}
}
}
}
});
return ret;
};
dojo.objectToQuery=function(map){
var enc=encodeURIComponent;
var _45b=[];
var _45c={};
for(var name in map){
var _45e=map[name];
if(_45e!=_45c[name]){
var _45f=enc(name)+"=";
if(_d.isArray(_45e)){
for(var i=0;i<_45e.length;i++){
_45b.push(_45f+enc(_45e[i]));
}
}else{
_45b.push(_45f+enc(_45e));
}
}
}
return _45b.join("&");
};
dojo.formToQuery=function(_461){
return _d.objectToQuery(_d.formToObject(_461));
};
dojo.formToJson=function(_462,_463){
return _d.toJson(_d.formToObject(_462),_463);
};
dojo.queryToObject=function(str){
var ret={};
var qp=str.split("&");
var dec=decodeURIComponent;
_d.forEach(qp,function(item){
if(item.length){
var _469=item.split("=");
var name=dec(_469.shift());
var val=dec(_469.join("="));
if(_d.isString(ret[name])){
ret[name]=[ret[name]];
}
if(_d.isArray(ret[name])){
ret[name].push(val);
}else{
ret[name]=val;
}
}
});
return ret;
};
dojo._blockAsync=false;
dojo._contentHandlers={"text":function(xhr){
return xhr.responseText;
},"json":function(xhr){
return _d.fromJson(xhr.responseText||null);
},"json-comment-filtered":function(xhr){
if(!dojo.config.useCommentedJson){
console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");
}
var _46f=xhr.responseText;
var _470=_46f.indexOf("/*");
var _471=_46f.lastIndexOf("*/");
if(_470==-1||_471==-1){
throw new Error("JSON was not comment filtered");
}
return _d.fromJson(_46f.substring(_470+2,_471));
},"javascript":function(xhr){
return _d.eval(xhr.responseText);
},"xml":function(xhr){
var _474=xhr.responseXML;
if(_d.isIE&&(!_474||_474.documentElement==null)){
_d.forEach(["MSXML2","Microsoft","MSXML","MSXML3"],function(_475){
try{
var dom=new ActiveXObject(_475+".XMLDOM");
dom.async=false;
dom.loadXML(xhr.responseText);
_474=dom;
}
catch(e){
}
});
}
return _474;
}};
dojo._contentHandlers["json-comment-optional"]=function(xhr){
var _478=_d._contentHandlers;
if(xhr.responseText&&xhr.responseText.indexOf("/*")!=-1){
return _478["json-comment-filtered"](xhr);
}else{
return _478["json"](xhr);
}
};
dojo._ioSetArgs=function(args,_47a,_47b,_47c){
var _47d={args:args,url:args.url};
var _47e=null;
if(args.form){
var form=_d.byId(args.form);
var _480=form.getAttributeNode("action");
_47d.url=_47d.url||(_480?_480.value:null);
_47e=_d.formToObject(form);
}
var _481=[{}];
if(_47e){
_481.push(_47e);
}
if(args.content){
_481.push(args.content);
}
if(args.preventCache){
_481.push({"dojo.preventCache":new Date().valueOf()});
}
_47d.query=_d.objectToQuery(_d.mixin.apply(null,_481));
_47d.handleAs=args.handleAs||"text";
var d=new _d.Deferred(_47a);
d.addCallbacks(_47b,function(_483){
return _47c(_483,d);
});
var ld=args.load;
if(ld&&_d.isFunction(ld)){
d.addCallback(function(_485){
return ld.call(args,_485,_47d);
});
}
var err=args.error;
if(err&&_d.isFunction(err)){
d.addErrback(function(_487){
return err.call(args,_487,_47d);
});
}
var _488=args.handle;
if(_488&&_d.isFunction(_488)){
d.addBoth(function(_489){
return _488.call(args,_489,_47d);
});
}
d.ioArgs=_47d;
return d;
};
var _48a=function(dfd){
dfd.canceled=true;
var xhr=dfd.ioArgs.xhr;
var _at=typeof xhr.abort;
if(_at=="function"||_at=="object"||_at=="unknown"){
xhr.abort();
}
var err=dfd.ioArgs.error;
if(!err){
err=new Error("xhr cancelled");
err.dojoType="cancel";
}
return err;
};
var _48f=function(dfd){
var ret=_d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
return (typeof ret=="undefined")?null:ret;
};
var _492=function(_493,dfd){
return _493;
};
var _495=null;
var _496=[];
var _497=function(){
var now=(new Date()).getTime();
if(!_d._blockAsync){
for(var i=0,tif;i<_496.length&&(tif=_496[i]);i++){
var dfd=tif.dfd;
var func=function(){
if(!dfd||dfd.canceled||!tif.validCheck(dfd)){
_496.splice(i--,1);
}else{
if(tif.ioCheck(dfd)){
_496.splice(i--,1);
tif.resHandle(dfd);
}else{
if(dfd.startTime){
if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){
_496.splice(i--,1);
var err=new Error("timeout exceeded");
err.dojoType="timeout";
dfd.errback(err);
dfd.cancel();
}
}
}
}
};
if(dojo.config.isDebug){
func.call(this);
}else{
try{
func.call(this);
}
catch(e){
dfd.errback(e);
}
}
}
}
if(!_496.length){
clearInterval(_495);
_495=null;
return;
}
};
dojo._ioCancelAll=function(){
try{
_d.forEach(_496,function(i){
try{
i.dfd.cancel();
}
catch(e){
}
});
}
catch(e){
}
};
if(_d.isIE){
_d.addOnWindowUnload(_d._ioCancelAll);
}
_d._ioWatch=function(dfd,_4a0,_4a1,_4a2){
if(dfd.ioArgs.args.timeout){
dfd.startTime=(new Date()).getTime();
}
_496.push({dfd:dfd,validCheck:_4a0,ioCheck:_4a1,resHandle:_4a2});
if(!_495){
_495=setInterval(_497,50);
}
_497();
};
var _4a3="application/x-www-form-urlencoded";
var _4a4=function(dfd){
return dfd.ioArgs.xhr.readyState;
};
var _4a6=function(dfd){
return 4==dfd.ioArgs.xhr.readyState;
};
var _4a8=function(dfd){
var xhr=dfd.ioArgs.xhr;
if(_d._isDocumentOk(xhr)){
dfd.callback(dfd);
}else{
var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);
err.status=xhr.status;
err.responseText=xhr.responseText;
dfd.errback(err);
}
};
dojo._ioAddQueryToUrl=function(_4ac){
if(_4ac.query.length){
_4ac.url+=(_4ac.url.indexOf("?")==-1?"?":"&")+_4ac.query;
_4ac.query=null;
}
};
dojo.xhr=function(_4ad,args,_4af){
var dfd=_d._ioSetArgs(args,_48a,_48f,_492);
dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);
if(_4af){
if("postData" in args){
dfd.ioArgs.query=args.postData;
}else{
if("putData" in args){
dfd.ioArgs.query=args.putData;
}
}
}else{
_d._ioAddQueryToUrl(dfd.ioArgs);
}
var _4b1=dfd.ioArgs;
var xhr=_4b1.xhr;
xhr.open(_4ad,_4b1.url,args.sync!==true,args.user||undefined,args.password||undefined);
if(args.headers){
for(var hdr in args.headers){
if(hdr.toLowerCase()==="content-type"&&!args.contentType){
args.contentType=args.headers[hdr];
}else{
xhr.setRequestHeader(hdr,args.headers[hdr]);
}
}
}
xhr.setRequestHeader("Content-Type",args.contentType||_4a3);
if(!args.headers||!args.headers["X-Requested-With"]){
xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");
}
if(dojo.config.isDebug){
xhr.send(_4b1.query);
}else{
try{
xhr.send(_4b1.query);
}
catch(e){
dfd.ioArgs.error=e;
dfd.cancel();
}
}
_d._ioWatch(dfd,_4a4,_4a6,_4a8);
xhr=null;
return dfd;
};
dojo.xhrGet=function(args){
return _d.xhr("GET",args);
};
dojo.rawXhrPost=dojo.xhrPost=function(args){
return _d.xhr("POST",args,true);
};
dojo.rawXhrPut=dojo.xhrPut=function(args){
return _d.xhr("PUT",args,true);
};
dojo.xhrDelete=function(args){
return _d.xhr("DELETE",args);
};
})();
}
if(!dojo._hasResource["dojo._base.fx"]){
dojo._hasResource["dojo._base.fx"]=true;
dojo.provide("dojo._base.fx");
(function(){
var d=dojo;
dojo._Line=function(_4b9,end){
this.start=_4b9;
this.end=end;
this.getValue=function(n){
return ((this.end-this.start)*n)+this.start;
};
};
d.declare("dojo._Animation",null,{constructor:function(args){
d.mixin(this,args);
if(d.isArray(this.curve)){
this.curve=new d._Line(this.curve[0],this.curve[1]);
}
},duration:350,repeat:0,rate:10,_percent:0,_startRepeatCount:0,_fire:function(evt,args){
if(this[evt]){
if(dojo.config.isDebug){
this[evt].apply(this,args||[]);
}else{
try{
this[evt].apply(this,args||[]);
}
catch(e){
console.error("exception in animation handler for:",evt);
console.error(e);
}
}
}
return this;
},play:function(_4bf,_4c0){
var _t=this;
if(_4c0){
_t._stopTimer();
_t._active=_t._paused=false;
_t._percent=0;
}else{
if(_t._active&&!_t._paused){
return _t;
}
}
_t._fire("beforeBegin");
var de=_4bf||_t.delay;
var _p=dojo.hitch(_t,"_play",_4c0);
if(de>0){
setTimeout(_p,de);
return _t;
}
_p();
return _t;
},_play:function(_4c4){
var _t=this;
_t._startTime=new Date().valueOf();
if(_t._paused){
_t._startTime-=_t.duration*_t._percent;
}
_t._endTime=_t._startTime+_t.duration;
_t._active=true;
_t._paused=false;
var _4c6=_t.curve.getValue(_t._percent);
if(!_t._percent){
if(!_t._startRepeatCount){
_t._startRepeatCount=_t.repeat;
}
_t._fire("onBegin",[_4c6]);
}
_t._fire("onPlay",[_4c6]);
_t._cycle();
return _t;
},pause:function(){
this._stopTimer();
if(!this._active){
return this;
}
this._paused=true;
this._fire("onPause",[this.curve.getValue(this._percent)]);
return this;
},gotoPercent:function(_4c7,_4c8){
this._stopTimer();
this._active=this._paused=true;
this._percent=_4c7;
if(_4c8){
this.play();
}
return this;
},stop:function(_4c9){
if(!this._timer){
return this;
}
this._stopTimer();
if(_4c9){
this._percent=1;
}
this._fire("onStop",[this.curve.getValue(this._percent)]);
this._active=this._paused=false;
return this;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}
return "stopped";
},_cycle:function(){
var _t=this;
if(_t._active){
var curr=new Date().valueOf();
var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);
if(step>=1){
step=1;
}
_t._percent=step;
if(_t.easing){
step=_t.easing(step);
}
_t._fire("onAnimate",[_t.curve.getValue(step)]);
if(_t._percent<1){
_t._startTimer();
}else{
_t._active=false;
if(_t.repeat>0){
_t.repeat--;
_t.play(null,true);
}else{
if(_t.repeat==-1){
_t.play(null,true);
}else{
if(_t._startRepeatCount){
_t.repeat=_t._startRepeatCount;
_t._startRepeatCount=0;
}
}
}
_t._percent=0;
_t._fire("onEnd");
_t._stopTimer();
}
}
return _t;
}});
var ctr=0;
var _4ce=[];
var _4cf={run:function(){
}};
var _4d0=null;
dojo._Animation.prototype._startTimer=function(){
if(!this._timer){
this._timer=d.connect(_4cf,"run",this,"_cycle");
ctr++;
}
if(!_4d0){
_4d0=setInterval(d.hitch(_4cf,"run"),this.rate);
}
};
dojo._Animation.prototype._stopTimer=function(){
if(this._timer){
d.disconnect(this._timer);
this._timer=null;
ctr--;
}
if(ctr<=0){
clearInterval(_4d0);
_4d0=null;
ctr=0;
}
};
var _4d1=(d.isIE)?function(node){
var ns=node.style;
if(!ns.width.length&&d.style(node,"width")=="auto"){
ns.width="auto";
}
}:function(){
};
dojo._fade=function(args){
args.node=d.byId(args.node);
var _4d5=d.mixin({properties:{}},args);
var _4d6=(_4d5.properties.opacity={});
_4d6.start=!("start" in _4d5)?function(){
return Number(d.style(_4d5.node,"opacity"));
}:_4d5.start;
_4d6.end=_4d5.end;
var anim=d.animateProperty(_4d5);
d.connect(anim,"beforeBegin",d.partial(_4d1,_4d5.node));
return anim;
};
dojo.fadeIn=function(args){
return d._fade(d.mixin({end:1},args));
};
dojo.fadeOut=function(args){
return d._fade(d.mixin({end:0},args));
};
dojo._defaultEasing=function(n){
return 0.5+((Math.sin((n+1.5)*Math.PI))/2);
};
var _4db=function(_4dc){
this._properties=_4dc;
for(var p in _4dc){
var prop=_4dc[p];
if(prop.start instanceof d.Color){
prop.tempColor=new d.Color();
}
}
this.getValue=function(r){
var ret={};
for(var p in this._properties){
var prop=this._properties[p];
var _4e3=prop.start;
if(_4e3 instanceof d.Color){
ret[p]=d.blendColors(_4e3,prop.end,r,prop.tempColor).toCss();
}else{
if(!d.isArray(_4e3)){
ret[p]=((prop.end-_4e3)*r)+_4e3+(p!="opacity"?prop.units||"px":"");
}
}
}
return ret;
};
};
dojo.animateProperty=function(args){
args.node=d.byId(args.node);
if(!args.easing){
args.easing=d._defaultEasing;
}
var anim=new d._Animation(args);
d.connect(anim,"beforeBegin",anim,function(){
var pm={};
for(var p in this.properties){
if(p=="width"||p=="height"){
this.node.display="block";
}
var prop=this.properties[p];
prop=pm[p]=d.mixin({},(d.isObject(prop)?prop:{end:prop}));
if(d.isFunction(prop.start)){
prop.start=prop.start();
}
if(d.isFunction(prop.end)){
prop.end=prop.end();
}
var _4e9=(p.toLowerCase().indexOf("color")>=0);
function getStyle(node,p){
var v=({height:node.offsetHeight,width:node.offsetWidth})[p];
if(v!==undefined){
return v;
}
v=d.style(node,p);
return (p=="opacity")?Number(v):(_4e9?v:parseFloat(v));
};
if(!("end" in prop)){
prop.end=getStyle(this.node,p);
}else{
if(!("start" in prop)){
prop.start=getStyle(this.node,p);
}
}
if(_4e9){
prop.start=new d.Color(prop.start);
prop.end=new d.Color(prop.end);
}else{
prop.start=(p=="opacity")?Number(prop.start):parseFloat(prop.start);
}
}
this.curve=new _4db(pm);
});
d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));
return anim;
};
dojo.anim=function(node,_4ee,_4ef,_4f0,_4f1,_4f2){
return d.animateProperty({node:node,duration:_4ef||d._Animation.prototype.duration,properties:_4ee,easing:_4f0,onEnd:_4f1}).play(_4f2||0);
};
})();
}
if(!dojo._hasResource["dojo._base.browser"]){
dojo._hasResource["dojo._base.browser"]=true;
dojo.provide("dojo._base.browser");
if(dojo.config.require){
dojo.forEach(dojo.config.require,"dojo['require'](item);");
}
}
if(dojo.config.afterOnLoad&&dojo.isBrowser){
window.setTimeout(dojo._fakeLoadInit,1000);
}
})();
/*
	Copyright (c) 2004-2008, 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
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

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(){
var _1=dojo.doc;
if(_1.selection){
var s=_1.selection;
if(s.type=="Text"){
return !s.createRange().htmlText.length;
}else{
return !s.createRange().length;
}
}else{
var _3=dojo.global;
var _4=_3.getSelection();
if(dojo.isString(_4)){
return !_4;
}else{
return _4.isCollapsed||!_4.toString();
}
}
},getBookmark:function(){
var _5,_6=dojo.doc.selection;
if(_6){
var _7=_6.createRange();
if(_6.type.toUpperCase()=="CONTROL"){
if(_7.length){
_5=[];
var i=0,_9=_7.length;
while(i<_9){
_5.push(_7.item(i++));
}
}else{
_5=null;
}
}else{
_5=_7.getBookmark();
}
}else{
if(window.getSelection){
_6=dojo.global.getSelection();
if(_6){
_7=_6.getRangeAt(0);
_5=_7.cloneRange();
}
}else{
console.warn("No idea how to store the current selection for this browser!");
}
}
return _5;
},moveToBookmark:function(_a){
var _b=dojo.doc;
if(_b.selection){
var _c;
if(dojo.isArray(_a)){
_c=_b.body.createControlRange();
dojo.forEach(_a,function(n){
_c.addElement(n);
});
}else{
_c=_b.selection.createRange();
_c.moveToBookmark(_a);
}
_c.select();
}else{
var _e=dojo.global.getSelection&&dojo.global.getSelection();
if(_e&&_e.removeAllRanges){
_e.removeAllRanges();
_e.addRange(_a);
}else{
console.warn("No idea how to restore selection for this browser!");
}
}
},getFocus:function(_f,_10){
return {node:_f&&dojo.isDescendant(dijit._curFocus,_f.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_10||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_10||dojo.global,dijit.getBookmark):null,openedForWindow:_10};
},focus:function(_11){
if(!_11){
return;
}
var _12="node" in _11?_11.node:_11,_13=_11.bookmark,_14=_11.openedForWindow;
if(_12){
var _15=(_12.tagName.toLowerCase()=="iframe")?_12.contentWindow:_12;
if(_15&&_15.focus){
try{
_15.focus();
}
catch(e){
}
}
dijit._onFocusNode(_12);
}
if(_13&&dojo.withGlobal(_14||dojo.global,dijit.isCollapsed)){
if(_14){
_14.focus();
}
try{
dojo.withGlobal(_14||dojo.global,dijit.moveToBookmark,null,[_13]);
}
catch(e){
}
}
},_activeStack:[],registerWin:function(_16){
if(!_16){
_16=window;
}
dojo.connect(_16.document,"onmousedown",function(evt){
dijit._justMouseDowned=true;
setTimeout(function(){
dijit._justMouseDowned=false;
},0);
dijit._onTouchNode(evt.target||evt.srcElement);
});
var doc=_16.document;
if(doc){
if(dojo.isIE){
doc.attachEvent("onactivate",function(evt){
if(evt.srcElement.tagName.toLowerCase()!="#document"){
dijit._onFocusNode(evt.srcElement);
}
});
doc.attachEvent("ondeactivate",function(evt){
dijit._onBlurNode(evt.srcElement);
});
}else{
doc.addEventListener("focus",function(evt){
dijit._onFocusNode(evt.target);
},true);
doc.addEventListener("blur",function(evt){
dijit._onBlurNode(evt.target);
},true);
}
}
doc=null;
},_onBlurNode:function(_1d){
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(_1e){
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
var _1f=[];
try{
while(_1e){
if(_1e.dijitPopupParent){
_1e=dijit.byId(_1e.dijitPopupParent).domNode;
}else{
if(_1e.tagName&&_1e.tagName.toLowerCase()=="body"){
if(_1e===dojo.body()){
break;
}
_1e=dijit.getDocumentWindow(_1e.ownerDocument).frameElement;
}else{
var id=_1e.getAttribute&&_1e.getAttribute("widgetId");
if(id){
_1f.unshift(id);
}
_1e=_1e.parentNode;
}
}
}
}
catch(e){
}
dijit._setStack(_1f);
},_onFocusNode:function(_21){
if(!_21){
return;
}
if(_21.nodeType==9){
return;
}
if(_21.nodeType==9){
var _22=dijit.getDocumentWindow(_21).frameElement;
if(!_22){
return;
}
_21=_22;
}
dijit._onTouchNode(_21);
if(_21==dijit._curFocus){
return;
}
if(dijit._curFocus){
dijit._prevFocus=dijit._curFocus;
}
dijit._curFocus=_21;
dojo.publish("focusNode",[_21]);
},_setStack:function(_23){
var _24=dijit._activeStack;
dijit._activeStack=_23;
for(var _25=0;_25<Math.min(_24.length,_23.length);_25++){
if(_24[_25]!=_23[_25]){
break;
}
}
for(var i=_24.length-1;i>=_25;i--){
var _27=dijit.byId(_24[i]);
if(_27){
_27._focused=false;
_27._hasBeenBlurred=true;
if(_27._onBlur){
_27._onBlur();
}
if(_27._setStateClass){
_27._setStateClass();
}
dojo.publish("widgetBlur",[_27]);
}
}
for(i=_25;i<_23.length;i++){
_27=dijit.byId(_23[i]);
if(_27){
_27._focused=true;
if(_27._onFocus){
_27._onFocus();
}
if(_27._setStateClass){
_27._setStateClass();
}
dojo.publish("widgetFocus",[_27]);
}
}
}});
dojo.addOnLoad(dijit.registerWin);
}
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={};
},add:function(_28){
if(this._hash[_28.id]){
throw new Error("Tried to register widget with id=="+_28.id+" but that id is already registered");
}
this._hash[_28.id]=_28;
},remove:function(id){
delete this._hash[id];
},forEach:function(_2a){
for(var id in this._hash){
_2a(this._hash[id]);
}
},filter:function(_2c){
var res=new dijit.WidgetSet();
this.forEach(function(_2e){
if(_2c(_2e)){
res.add(_2e);
}
});
return res;
},byId:function(id){
return this._hash[id];
},byClass:function(cls){
return this.filter(function(_31){
return _31.declaredClass==cls;
});
}});
dijit.registry=new dijit.WidgetSet();
dijit._widgetTypeCtr={};
dijit.getUniqueId=function(_32){
var id;
do{
id=_32+"_"+(_32 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_32]:dijit._widgetTypeCtr[_32]=0);
}while(dijit.byId(id));
return id;
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
dijit.registry.forEach(function(_34){
_34.destroy();
});
});
}
dijit.byId=function(id){
return (dojo.isString(id))?dijit.registry.byId(id):id;
};
dijit.byNode=function(_36){
return dijit.registry.byId(_36.getAttribute("widgetId"));
};
dijit.getEnclosingWidget=function(_37){
while(_37){
if(_37.getAttribute&&_37.getAttribute("widgetId")){
return dijit.registry.byId(_37.getAttribute("widgetId"));
}
_37=_37.parentNode;
}
return null;
};
dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};
dijit._isElementShown=function(_38){
var _39=dojo.style(_38);
return (_39.visibility!="hidden")&&(_39.visibility!="collapsed")&&(_39.display!="none")&&(dojo.attr(_38,"type")!="hidden");
};
dijit.isTabNavigable=function(_3a){
if(dojo.hasAttr(_3a,"disabled")){
return false;
}
var _3b=dojo.hasAttr(_3a,"tabindex");
var _3c=dojo.attr(_3a,"tabindex");
if(_3b&&_3c>=0){
return true;
}
var _3d=_3a.nodeName.toLowerCase();
if(((_3d=="a"&&dojo.hasAttr(_3a,"href"))||dijit._tabElements[_3d])&&(!_3b||_3c>=0)){
return true;
}
return false;
};
dijit._getTabNavigable=function(_3e){
var _3f,_40,_41,_42,_43,_44;
var _45=function(_46){
dojo.query("> *",_46).forEach(function(_47){
var _48=dijit._isElementShown(_47);
if(_48&&dijit.isTabNavigable(_47)){
var _49=dojo.attr(_47,"tabindex");
if(!dojo.hasAttr(_47,"tabindex")||_49==0){
if(!_3f){
_3f=_47;
}
_40=_47;
}else{
if(_49>0){
if(!_41||_49<_42){
_42=_49;
_41=_47;
}
if(!_43||_49>=_44){
_44=_49;
_43=_47;
}
}
}
}
if(_48&&_47.nodeName.toUpperCase()!="SELECT"){
_45(_47);
}
});
};
if(dijit._isElementShown(_3e)){
_45(_3e);
}
return {first:_3f,last:_40,lowest:_41,highest:_43};
};
dijit.getFirstInTabbingOrder=function(_4a){
var _4b=dijit._getTabNavigable(dojo.byId(_4a));
return _4b.lowest?_4b.lowest:_4b.first;
};
dijit.getLastInTabbingOrder=function(_4c){
var _4d=dijit._getTabNavigable(dojo.byId(_4c));
return _4d.last?_4d.last:_4d.highest;
};
dijit.defaultDuration=dojo.config["defaultDuration"]||200;
}
if(!dojo._hasResource["dojo.AdapterRegistry"]){
dojo._hasResource["dojo.AdapterRegistry"]=true;
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_4e){
this.pairs=[];
this.returnWrappers=_4e||false;
};
dojo.extend(dojo.AdapterRegistry,{register:function(_4f,_50,_51,_52,_53){
this.pairs[((_53)?"unshift":"push")]([_4f,_50,_51,_52]);
},match:function(){
for(var i=0;i<this.pairs.length;i++){
var _55=this.pairs[i];
if(_55[1].apply(this,arguments)){
if((_55[3])||(this.returnWrappers)){
return _55[2];
}else{
return _55[2].apply(this,arguments);
}
}
}
throw new Error("No match found");
},unregister:function(_56){
for(var i=0;i<this.pairs.length;i++){
var _58=this.pairs[i];
if(_58[0]==_56){
this.pairs.splice(i,1);
return true;
}
}
return false;
}});
}
if(!dojo._hasResource["dijit._base.place"]){
dojo._hasResource["dijit._base.place"]=true;
dojo.provide("dijit._base.place");
dijit.getViewport=function(){
var _59=dojo.global;
var _5a=dojo.doc;
var w=0,h=0;
var de=_5a.documentElement;
var dew=de.clientWidth,deh=de.clientHeight;
if(dojo.isMozilla){
var _60,_61,_62,_63;
var dbw=_5a.body.clientWidth;
if(dbw>dew){
_60=dew;
_62=dbw;
}else{
_62=dew;
_60=dbw;
}
var dbh=_5a.body.clientHeight;
if(dbh>deh){
_61=deh;
_63=dbh;
}else{
_63=deh;
_61=dbh;
}
w=(_62>_59.innerWidth)?_60:_62;
h=(_63>_59.innerHeight)?_61:_63;
}else{
if(!dojo.isOpera&&_59.innerWidth){
w=_59.innerWidth;
h=_59.innerHeight;
}else{
if(dojo.isIE&&de&&deh){
w=dew;
h=deh;
}else{
if(dojo.body().clientWidth){
w=dojo.body().clientWidth;
h=dojo.body().clientHeight;
}
}
}
}
var _66=dojo._docScroll();
return {w:w,h:h,l:_66.x,t:_66.y};
};
dijit.placeOnScreen=function(_67,pos,_69,_6a){
var _6b=dojo.map(_69,function(_6c){
return {corner:_6c,pos:pos};
});
return dijit._place(_67,_6b);
};
dijit._place=function(_6d,_6e,_6f){
var _70=dijit.getViewport();
if(!_6d.parentNode||String(_6d.parentNode.tagName).toLowerCase()!="body"){
dojo.body().appendChild(_6d);
}
var _71=null;
dojo.some(_6e,function(_72){
var _73=_72.corner;
var pos=_72.pos;
if(_6f){
_6f(_6d,_72.aroundCorner,_73);
}
var _75=_6d.style;
var _76=_75.display;
var _77=_75.visibility;
_75.visibility="hidden";
_75.display="";
var mb=dojo.marginBox(_6d);
_75.display=_76;
_75.visibility=_77;
var _79=(_73.charAt(1)=="L"?pos.x:Math.max(_70.l,pos.x-mb.w)),_7a=(_73.charAt(0)=="T"?pos.y:Math.max(_70.t,pos.y-mb.h)),_7b=(_73.charAt(1)=="L"?Math.min(_70.l+_70.w,_79+mb.w):pos.x),_7c=(_73.charAt(0)=="T"?Math.min(_70.t+_70.h,_7a+mb.h):pos.y),_7d=_7b-_79,_7e=_7c-_7a,_7f=(mb.w-_7d)+(mb.h-_7e);
if(_71==null||_7f<_71.overflow){
_71={corner:_73,aroundCorner:_72.aroundCorner,x:_79,y:_7a,w:_7d,h:_7e,overflow:_7f};
}
return !_7f;
});
_6d.style.left=_71.x+"px";
_6d.style.top=_71.y+"px";
if(_71.overflow&&_6f){
_6f(_6d,_71.aroundCorner,_71.corner);
}
return _71;
};
dijit.placeOnScreenAroundNode=function(_80,_81,_82,_83){
_81=dojo.byId(_81);
var _84=_81.style.display;
_81.style.display="";
var _85=_81.offsetWidth;
var _86=_81.offsetHeight;
var _87=dojo.coords(_81,true);
_81.style.display=_84;
return dijit._placeOnScreenAroundRect(_80,_87.x,_87.y,_85,_86,_82,_83);
};
dijit.placeOnScreenAroundRectangle=function(_88,_89,_8a,_8b){
return dijit._placeOnScreenAroundRect(_88,_89.x,_89.y,_89.width,_89.height,_8a,_8b);
};
dijit._placeOnScreenAroundRect=function(_8c,x,y,_8f,_90,_91,_92){
var _93=[];
for(var _94 in _91){
_93.push({aroundCorner:_94,corner:_91[_94],pos:{x:x+(_94.charAt(1)=="L"?0:_8f),y:y+(_94.charAt(0)=="T"?0:_90)}});
}
return dijit._place(_8c,_93,_92);
};
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(_99,_9a,_9b,_9c){
return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);
};
}
if(!dojo._hasResource["dijit._base.window"]){
dojo._hasResource["dijit._base.window"]=true;
dojo.provide("dijit._base.window");
dijit.getDocumentWindow=function(doc){
if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
var win=doc._parentWindow;
doc._parentWindow=null;
return win;
}
return doc._parentWindow||doc.parentWindow||doc.defaultView;
};
}
if(!dojo._hasResource["dijit._base.popup"]){
dojo._hasResource["dijit._base.popup"]=true;
dojo.provide("dijit._base.popup");
dijit.popup=new function(){
var _9f=[],_a0=1000,_a1=1;
this.prepare=function(_a2){
dojo.body().appendChild(_a2);
var s=_a2.style;
if(s.display=="none"){
s.display="";
}
s.visibility="hidden";
s.position="absolute";
s.top="-9999px";
};
this.open=function(_a4){
var _a5=_a4.popup,_a6=_a4.orient||{"BL":"TL","TL":"BL"},_a7=_a4.around,id=(_a4.around&&_a4.around.id)?(_a4.around.id+"_dropdown"):("popup_"+_a1++);
var _a9=dojo.doc.createElement("div");
dijit.setWaiRole(_a9,"presentation");
_a9.id=id;
_a9.className="dijitPopup";
_a9.style.zIndex=_a0+_9f.length;
_a9.style.left=_a9.style.top="0px";
_a9.style.visibility="hidden";
if(_a4.parent){
_a9.dijitPopupParent=_a4.parent.id;
}
dojo.body().appendChild(_a9);
var s=_a5.domNode.style;
s.display="";
s.visibility="";
s.position="";
_a9.appendChild(_a5.domNode);
var _ab=new dijit.BackgroundIframe(_a9);
var _ac=_a7?dijit.placeOnScreenAroundElement(_a9,_a7,_a6,_a5.orient?dojo.hitch(_a5,"orient"):null):dijit.placeOnScreen(_a9,_a4,_a6=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);
_a9.style.visibility="visible";
var _ad=[];
var _ae=function(){
for(var pi=_9f.length-1;pi>0&&_9f[pi].parent===_9f[pi-1].widget;pi--){
}
return _9f[pi];
};
_ad.push(dojo.connect(_a9,"onkeypress",this,function(evt){
if(evt.charOrCode==dojo.keys.ESCAPE&&_a4.onCancel){
dojo.stopEvent(evt);
_a4.onCancel();
}else{
if(evt.charOrCode===dojo.keys.TAB){
dojo.stopEvent(evt);
var _b1=_ae();
if(_b1&&_b1.onCancel){
_b1.onCancel();
}
}
}
}));
if(_a5.onCancel){
_ad.push(dojo.connect(_a5,"onCancel",null,_a4.onCancel));
}
_ad.push(dojo.connect(_a5,_a5.onExecute?"onExecute":"onChange",null,function(){
var _b2=_ae();
if(_b2&&_b2.onExecute){
_b2.onExecute();
}
}));
_9f.push({wrapper:_a9,iframe:_ab,widget:_a5,parent:_a4.parent,onExecute:_a4.onExecute,onCancel:_a4.onCancel,onClose:_a4.onClose,handlers:_ad});
if(_a5.onOpen){
_a5.onOpen(_ac);
}
return _ac;
};
this.close=function(_b3){
while(dojo.some(_9f,function(_b4){
return _b4.widget==_b3;
})){
var top=_9f.pop(),_b6=top.wrapper,_b7=top.iframe,_b8=top.widget,_b9=top.onClose;
if(_b8.onClose){
_b8.onClose();
}
dojo.forEach(top.handlers,dojo.disconnect);
if(!_b8||!_b8.domNode){
return;
}
this.prepare(_b8.domNode);
_b7.destroy();
dojo._destroyElement(_b6);
if(_b9){
_b9();
}
}
};
}();
dijit._frames=new function(){
var _ba=[];
this.pop=function(){
var _bb;
if(_ba.length){
_bb=_ba.pop();
_bb.style.display="";
}else{
if(dojo.isIE){
var _bc=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";
var _bd="<iframe src='"+_bc+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
_bb=dojo.doc.createElement(_bd);
}else{
_bb=dojo.doc.createElement("iframe");
_bb.src="javascript:\"\"";
_bb.className="dijitBackgroundIframe";
}
_bb.tabIndex=-1;
dojo.body().appendChild(_bb);
}
return _bb;
};
this.push=function(_be){
_be.style.display="";
if(dojo.isIE){
_be.style.removeExpression("width");
_be.style.removeExpression("height");
}
_ba.push(_be);
};
}();
if(dojo.isIE<7){
dojo.addOnLoad(function(){
var f=dijit._frames;
dojo.forEach([f.pop()],f.push);
});
}
dijit.BackgroundIframe=function(_c0){
if(!_c0.id){
throw new Error("no id");
}
if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){
var _c1=dijit._frames.pop();
_c0.appendChild(_c1);
if(dojo.isIE){
_c1.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+_c0.id+"').offsetWidth");
_c1.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+_c0.id+"').offsetHeight");
}
this.iframe=_c1;
}
};
dojo.extend(dijit.BackgroundIframe,{destroy:function(){
if(this.iframe){
dijit._frames.push(this.iframe);
delete this.iframe;
}
}});
}
if(!dojo._hasResource["dijit._base.scroll"]){
dojo._hasResource["dijit._base.scroll"]=true;
dojo.provide("dijit._base.scroll");
dijit.scrollIntoView=function(_c2){
_c2=dojo.byId(_c2);
var _c3=_c2.ownerDocument.body;
var _c4=_c3.parentNode;
if(dojo.isFF==2||_c2==_c3||_c2==_c4){
_c2.scrollIntoView(false);
return;
}
var rtl=!dojo._isBodyLtr();
var _c6=dojo.doc.compatMode!="BackCompat";
var _c7=(_c6&&!dojo.isSafari)?_c4:_c3;
function addPseudoAttrs(_c8){
var _c9=_c8.parentNode;
var _ca=_c8.offsetParent;
if(_ca==null){
_c8=_c7;
_ca=_c4;
_c9=null;
}
_c8._offsetParent=(_ca==_c3)?_c7:_ca;
_c8._parent=(_c9==_c3)?_c7:_c9;
_c8._start={H:_c8.offsetLeft,V:_c8.offsetTop};
_c8._scroll={H:_c8.scrollLeft,V:_c8.scrollTop};
_c8._renderedSize={H:_c8.offsetWidth,V:_c8.offsetHeight};
var bp=dojo._getBorderExtents(_c8);
_c8._borderStart={H:bp.l,V:bp.t};
_c8._borderSize={H:bp.w,V:bp.h};
_c8._clientSize=(_c8._offsetParent==_c4&&dojo.isSafari&&_c6)?{H:_c4.clientWidth,V:_c4.clientHeight}:{H:_c8.clientWidth,V:_c8.clientHeight};
_c8._scrollBarSize={V:null,H:null};
for(var dir in _c8._scrollBarSize){
var _cd=_c8._renderedSize[dir]-_c8._clientSize[dir]-_c8._borderSize[dir];
_c8._scrollBarSize[dir]=(_c8._clientSize[dir]>0&&_cd>=15&&_cd<=17)?_cd:0;
}
_c8._isScrollable={V:null,H:null};
for(dir in _c8._isScrollable){
var _ce=dir=="H"?"V":"H";
_c8._isScrollable[dir]=_c8==_c7||_c8._scroll[dir]||_c8._scrollBarSize[_ce];
}
};
var _cf=_c2;
while(_cf!=null){
addPseudoAttrs(_cf);
var _d0=_cf._parent;
if(_d0){
_d0._child=_cf;
}
_cf=_d0;
}
for(var dir in _c7._renderedSize){
_c7._renderedSize[dir]=Math.min(_c7._clientSize[dir],_c7._renderedSize[dir]);
}
var _d2=_c2;
while(_d2!=_c7){
_cf=_d2._parent;
if(_cf.tagName=="TD"){
var _d3=_cf._parent._parent._parent;
if(_d3._offsetParent==_d2._offsetParent&&_cf._offsetParent!=_d2._offsetParent){
_cf=_d3;
}
}
var _d4=_d2==_c7||(_cf._offsetParent!=_d2._offsetParent);
for(dir in _d2._start){
var _d5=dir=="H"?"V":"H";
if(rtl&&dir=="H"&&(dojo.isSafari||dojo.isIE)&&_cf._clientSize.H>0){
var _d6=_cf.scrollWidth-_cf._clientSize.H;
if(_d6>0){
_cf._scroll.H-=_d6;
}
}
if(dojo.isIE&&_cf._offsetParent.tagName=="TABLE"){
_cf._start[dir]-=_cf._offsetParent._borderStart[dir];
_cf._borderStart[dir]=_cf._borderSize[dir]=0;
}
if(_cf._clientSize[dir]==0){
_cf._renderedSize[dir]=_cf._clientSize[dir]=_cf._child._clientSize[dir];
if(rtl&&dir=="H"){
_cf._start[dir]-=_cf._renderedSize[dir];
}
}else{
_cf._renderedSize[dir]-=_cf._borderSize[dir]+_cf._scrollBarSize[dir];
}
_cf._start[dir]+=_cf._borderStart[dir];
var _d7=_d2._start[dir]-(_d4?0:_cf._start[dir])-_cf._scroll[dir];
var _d8=_d7+_d2._renderedSize[dir]-_cf._renderedSize[dir];
var _d9,_da=(dir=="H")?"scrollLeft":"scrollTop";
var _db=(dir=="H"&&rtl);
var _dc=_db?-_d8:_d7;
var _dd=_db?-_d7:_d8;
if(_dc<=0){
_d9=_dc;
}else{
if(_dd<=0){
_d9=0;
}else{
if(_dc<_dd){
_d9=_dc;
}else{
_d9=_dd;
}
}
}
var _de=0;
if(_d9!=0){
var _df=_cf[_da];
_cf[_da]+=_db?-_d9:_d9;
_de=_cf[_da]-_df;
_d7-=_de;
_dd-=_db?-_de:_de;
}
_cf._renderedSize[dir]=_d2._renderedSize[dir]+_cf._scrollBarSize[dir]-((_cf._isScrollable[dir]&&_dd>0)?_dd:0);
_cf._start[dir]+=(_d7>=0||!_cf._isScrollable[dir])?_d7:0;
}
_d2=_cf;
}
};
}
if(!dojo._hasResource["dijit._base.sniff"]){
dojo._hasResource["dijit._base.sniff"]=true;
dojo.provide("dijit._base.sniff");
(function(){
var d=dojo;
var ie=d.isIE;
var _e2=d.isOpera;
var maj=Math.floor;
var ff=d.isFF;
var _e5=d.boxModel.replace(/-/,"");
var _e6={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_e2,dj_opera8:maj(_e2)==8,dj_opera9:maj(_e2)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};
_e6["dj_"+_e5]=true;
var _e7=dojo.doc.documentElement;
for(var p in _e6){
if(_e6[p]){
if(_e7.className){
_e7.className+=" "+p;
}else{
_e7.className=p;
}
}
}
dojo._loaders.unshift(function(){
if(!dojo._isBodyLtr()){
_e7.className+=" dijitRtl";
for(var p in _e6){
if(_e6[p]){
_e7.className+=" "+p+"-rtl";
}
}
}
});
})();
}
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=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));
this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);
},trigger:function(evt,_eb,_ec,_ed,obj,_ef,_f0){
if(obj!=this._obj){
this.stop();
this._initialDelay=_f0||500;
this._subsequentDelay=_ef||0.9;
this._obj=obj;
this._evt=evt;
this._node=_ec;
this._currentTimeout=-1;
this._count=-1;
this._callback=dojo.hitch(_eb,_ed);
this._fireEventAndReload();
}
},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(_f1,_f2,_f3,_f4,_f5,_f6){
if(_f2.keyCode){
_f2.charOrCode=_f2.keyCode;
dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}else{
if(_f2.charCode){
_f2.charOrCode=String.fromCharCode(_f2.charCode);
dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}
}
return [dojo.connect(_f1,"onkeypress",this,function(evt){
if(evt.charOrCode==_f2.charOrCode&&(_f2.ctrlKey===undefined||_f2.ctrlKey==evt.ctrlKey)&&(_f2.altKey===undefined||_f2.altKey==evt.ctrlKey)&&(_f2.shiftKey===undefined||_f2.shiftKey==evt.ctrlKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(_f2,_f3,_f1,_f4,_f2,_f5,_f6);
}else{
if(dijit.typematic._obj==_f2){
dijit.typematic.stop();
}
}
}),dojo.connect(_f1,"onkeyup",this,function(evt){
if(dijit.typematic._obj==_f2){
dijit.typematic.stop();
}
})];
},addMouseListener:function(_f9,_fa,_fb,_fc,_fd){
var dc=dojo.connect;
return [dc(_f9,"mousedown",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);
}),dc(_f9,"mouseup",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(_f9,"mouseout",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(_f9,"mousemove",this,function(evt){
dojo.stopEvent(evt);
}),dc(_f9,"dblclick",this,function(evt){
dojo.stopEvent(evt);
if(dojo.isIE){
dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);
setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
}
})];
},addListener:function(_104,_105,_106,_107,_108,_109,_10a){
return this.addKeyListener(_105,_106,_107,_108,_109,_10a).concat(this.addMouseListener(_104,_107,_108,_109,_10a));
}};
}
if(!dojo._hasResource["dijit._base.wai"]){
dojo._hasResource["dijit._base.wai"]=true;
dojo.provide("dijit._base.wai");
dijit.wai={onload:function(){
var div=dojo.doc.createElement("div");
div.id="a11yTestNode";
div.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().appendChild(div);
var cs=dojo.getComputedStyle(div);
if(cs){
var _10d=cs.backgroundImage;
var _10e=(cs.borderTopColor==cs.borderRightColor)||(_10d!=null&&(_10d=="none"||_10d=="url(invalid-url:)"));
dojo[_10e?"addClass":"removeClass"](dojo.body(),"dijit_a11y");
if(dojo.isIE){
div.outerHTML="";
}else{
dojo.body().removeChild(div);
}
}
}};
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(elem,role){
var _111=this.getWaiRole(elem);
if(role){
return (_111.indexOf(role)>-1);
}else{
return (_111.length>0);
}
},getWaiRole:function(elem){
return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));
},setWaiRole:function(elem,role){
var _115=dojo.attr(elem,"role")||"";
if(dojo.isFF<3||!this._XhtmlRoles.test(_115)){
dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);
}else{
if((" "+_115+" ").indexOf(" "+role+" ")<0){
var _116=dojo.trim(_115.replace(this._XhtmlRoles,""));
var _117=dojo.trim(_115.replace(_116,""));
dojo.attr(elem,"role",_117+(_117?" ":"")+role);
}
}
},removeWaiRole:function(elem,role){
var _11a=dojo.attr(elem,"role");
if(!_11a){
return;
}
if(role){
var _11b=dojo.isFF<3?"wairole:"+role:role;
var t=dojo.trim((" "+_11a+" ").replace(" "+_11b+" "," "));
dojo.attr(elem,"role",t);
}else{
elem.removeAttribute("role");
}
},hasWaiState:function(elem,_11e){
if(dojo.isFF<3){
return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_11e);
}else{
return elem.hasAttribute?elem.hasAttribute("aria-"+_11e):!!elem.getAttribute("aria-"+_11e);
}
},getWaiState:function(elem,_120){
if(dojo.isFF<3){
return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_120);
}else{
var _121=elem.getAttribute("aria-"+_120);
return _121?_121:"";
}
},setWaiState:function(elem,_123,_124){
if(dojo.isFF<3){
elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_123,_124);
}else{
elem.setAttribute("aria-"+_123,_124);
}
},removeWaiState:function(elem,_126){
if(dojo.isFF<3){
elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_126);
}else{
elem.removeAttribute("aria-"+_126);
}
}});
}
if(!dojo._hasResource["dijit._base"]){
dojo._hasResource["dijit._base"]=true;
dojo.provide("dijit._base");
}
if(!dojo._hasResource["dijit._Widget"]){
dojo._hasResource["dijit._Widget"]=true;
dojo.provide("dijit._Widget");
dojo.require("dijit._base");
dojo.connect(dojo,"connect",function(_127,_128){
if(_127&&dojo.isFunction(_127._onConnect)){
_127._onConnect(_128);
}
});
dijit._connectOnUseEventHandler=function(_129){
};
(function(){
var _12a={};
var _12b=function(dc){
if(!_12a[dc]){
var r=[];
var _12e;
var _12f=dojo.getObject(dc).prototype;
for(var _130 in _12f){
if(dojo.isFunction(_12f[_130])&&(_12e=_130.match(/^_set([a-zA-Z]*)Attr$/))&&_12e[1]){
r.push(_12e[1].charAt(0).toLowerCase()+_12e[1].substr(1));
}
}
_12a[dc]=r;
}
return _12a[dc]||[];
};
dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",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")),postscript:function(_131,_132){
this.create(_131,_132);
},create:function(_133,_134){
this.srcNodeRef=dojo.byId(_134);
this._connects=[];
this._deferredConnects=dojo.clone(this._deferredConnects);
for(var attr in this.attributeMap){
delete this._deferredConnects[attr];
}
for(attr in this._deferredConnects){
if(this[attr]!==dijit._connectOnUseEventHandler){
delete this._deferredConnects[attr];
}
}
if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
this.id=this.srcNodeRef.id;
}
if(_133){
this.params=_133;
dojo.mixin(this,_133);
}
this.postMixInProperties();
if(!this.id){
this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
}
dijit.registry.add(this);
this.buildRendering();
if(this.domNode){
this._applyAttributes();
for(attr in this.params){
this._onConnect(attr);
}
}
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 _136=function(attr,_138){
if((_138.params&&attr in _138.params)||_138[attr]){
_138.attr(attr,_138[attr]);
}
};
for(var attr in this.attributeMap){
_136(attr,this);
}
dojo.forEach(_12b(this.declaredClass),function(a){
if(!(a in this.attributeMap)){
_136(a,this);
}
},this);
},postMixInProperties:function(){
},buildRendering:function(){
this.domNode=this.srcNodeRef||dojo.doc.createElement("div");
},postCreate:function(){
},startup:function(){
this._started=true;
},destroyRecursive:function(_13b){
this.destroyDescendants(_13b);
this.destroy(_13b);
},destroy:function(_13c){
this.uninitialize();
dojo.forEach(this._connects,function(_13d){
dojo.forEach(_13d,dojo.disconnect);
});
dojo.forEach(this._supportingWidgets||[],function(w){
if(w.destroy){
w.destroy();
}
});
this.destroyRendering(_13c);
dijit.registry.remove(this.id);
},destroyRendering:function(_13f){
if(this.bgIframe){
this.bgIframe.destroy(_13f);
delete this.bgIframe;
}
if(this.domNode){
if(!_13f){
dojo._destroyElement(this.domNode);
}
delete this.domNode;
}
if(this.srcNodeRef){
if(!_13f){
dojo._destroyElement(this.srcNodeRef);
}
delete this.srcNodeRef;
}
},destroyDescendants:function(_140){
dojo.forEach(this.getDescendants(),function(_141){
if(_141.destroy){
_141.destroy(_140);
}
});
},uninitialize:function(){
return false;
},onFocus:function(){
},onBlur:function(){
},_onFocus:function(e){
this.onFocus();
},_onBlur:function(){
this.onBlur();
},_onConnect:function(_143){
if(_143 in this._deferredConnects){
var _144=this[this._deferredConnects[_143]||"domNode"];
this.connect(_144,_143.toLowerCase(),this[_143]);
delete this._deferredConnects[_143];
}
},_setClassAttr:function(_145){
var _146=this[this.attributeMap["class"]||"domNode"];
dojo.removeClass(_146,this["class"]);
this["class"]=_145;
dojo.addClass(_146,_145);
},_setStyleAttr:function(_147){
var _148=this[this.attributeMap["style"]||"domNode"];
if(_148.style.cssText){
_148.style.cssText+="; "+_147;
}else{
_148.style.cssText=_147;
}
this["style"]=_147;
},setAttribute:function(attr,_14a){
dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");
this.attr(attr,_14a);
},_attrToDom:function(attr,_14c){
var _14d=this.attributeMap[attr];
dojo.forEach(dojo.isArray(_14d)?_14d:[_14d],function(_14e){
var _14f=this[_14e.node||_14e||"domNode"];
var type=_14e.type||"attribute";
switch(type){
case "attribute":
if(dojo.isFunction(_14c)){
_14c=dojo.hitch(this,_14c);
}
if(/^on[A-Z][a-zA-Z]*$/.test(attr)){
attr=attr.toLowerCase();
}
dojo.attr(_14f,attr,_14c);
break;
case "innerHTML":
_14f.innerHTML=_14c;
break;
case "class":
dojo.removeClass(_14f,this[attr]);
dojo.addClass(_14f,_14c);
break;
}
},this);
this[attr]=_14c;
},attr:function(name,_152){
var args=arguments.length;
if(args==1&&!dojo.isString(name)){
for(var x in name){
this.attr(x,name[x]);
}
return this;
}
var _155=this._getAttrNames(name);
if(args==2){
if(this[_155.s]){
return this[_155.s](_152)||this;
}else{
if(name in this.attributeMap){
this._attrToDom(name,_152);
}
this[name]=_152;
}
return this;
}else{
if(this[_155.g]){
return this[_155.g]();
}else{
return this[name];
}
}
},_attrPairNames:{},_getAttrNames:function(name){
var apn=this._attrPairNames;
if(apn[name]){
return apn[name];
}
var uc=name.charAt(0).toUpperCase()+name.substr(1);
return apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"};
},toString:function(){
return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";
},getDescendants:function(){
if(this.containerNode){
var list=dojo.query("[widgetId]",this.containerNode);
return list.map(dijit.byNode);
}else{
return [];
}
},nodesWithKeyClick:["input","button"],connect:function(obj,_15b,_15c){
var d=dojo;
var dco=d.hitch(d,"connect",obj);
var _15f=[];
if(_15b=="ondijitclick"){
if(!this.nodesWithKeyClick[obj.nodeName]){
var m=d.hitch(this,_15c);
_15f.push(dco("onkeydown",this,function(e){
if(!d.isFF&&e.keyCode==d.keys.ENTER){
return m(e);
}else{
if(e.keyCode==d.keys.SPACE){
d.stopEvent(e);
}
}
}),dco("onkeyup",this,function(e){
if(e.keyCode==d.keys.SPACE){
return m(e);
}
}));
if(d.isFF){
_15f.push(dco("onkeypress",this,function(e){
if(e.keyCode==d.keys.ENTER){
return m(e);
}
}));
}
}
_15b="onclick";
}
_15f.push(dco(_15b,this,_15c));
this._connects.push(_15f);
return _15f;
},disconnect:function(_164){
for(var i=0;i<this._connects.length;i++){
if(this._connects[i]==_164){
dojo.forEach(_164,dojo.disconnect);
this._connects.splice(i,1);
return;
}
}
},isLeftToRight:function(){
return dojo._isBodyLtr();
},isFocusable:function(){
return this.focus&&(dojo.style(this.domNode,"display")!="none");
},placeAt:function(_166,_167){
if(_166["declaredClass"]&&_166["addChild"]){
_166.addChild(this,_167);
}else{
dojo.place(this.domNode,_166,_167);
}
return this;
}});
})();
}
if(!dojo._hasResource["dojo.string"]){
dojo._hasResource["dojo.string"]=true;
dojo.provide("dojo.string");
dojo.string.rep=function(str,num){
if(num<=0||!str){
return "";
}
var buf=[];
for(;;){
if(num&1){
buf.push(str);
}
if(!(num>>=1)){
break;
}
str+=str;
}
return buf.join("");
};
dojo.string.pad=function(text,size,ch,end){
if(!ch){
ch="0";
}
var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));
return end?out+pad:pad+out;
};
dojo.string.substitute=function(_171,map,_173,_174){
_174=_174||dojo.global;
_173=(!_173)?function(v){
return v;
}:dojo.hitch(_174,_173);
return _171.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_176,key,_178){
var _179=dojo.getObject(key,false,map);
if(_178){
_179=dojo.getObject(_178,false,_174).call(_174,_179,key);
}
return _173(_179,key).toString();
});
};
dojo.string.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;
};
}
if(!dojo._hasResource["dojo.date.stamp"]){
dojo._hasResource["dojo.date.stamp"]=true;
dojo.provide("dojo.date.stamp");
dojo.date.stamp.fromISOString=function(_17c,_17d){
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 _17e=dojo.date.stamp._isoRegExp.exec(_17c);
var _17f=null;
if(_17e){
_17e.shift();
if(_17e[1]){
_17e[1]--;
}
if(_17e[6]){
_17e[6]*=1000;
}
if(_17d){
_17d=new Date(_17d);
dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){
return _17d["get"+prop]();
}).forEach(function(_181,_182){
if(_17e[_182]===undefined){
_17e[_182]=_181;
}
});
}
_17f=new Date(_17e[0]||1970,_17e[1]||0,_17e[2]||1,_17e[3]||0,_17e[4]||0,_17e[5]||0,_17e[6]||0);
var _183=0;
var _184=_17e[7]&&_17e[7].charAt(0);
if(_184!="Z"){
_183=((_17e[8]||0)*60)+(Number(_17e[9])||0);
if(_184!="-"){
_183*=-1;
}
}
if(_184){
_183-=_17f.getTimezoneOffset();
}
if(_183){
_17f.setTime(_17f.getTime()+_183*60000);
}
}
return _17f;
};
dojo.date.stamp.toISOString=function(_185,_186){
var _=function(n){
return (n<10)?"0"+n:n;
};
_186=_186||{};
var _189=[];
var _18a=_186.zulu?"getUTC":"get";
var date="";
if(_186.selector!="time"){
var year=_185[_18a+"FullYear"]();
date=["0000".substr((year+"").length)+year,_(_185[_18a+"Month"]()+1),_(_185[_18a+"Date"]())].join("-");
}
_189.push(date);
if(_186.selector!="date"){
var time=[_(_185[_18a+"Hours"]()),_(_185[_18a+"Minutes"]()),_(_185[_18a+"Seconds"]())].join(":");
var _18e=_185[_18a+"Milliseconds"]();
if(_186.milliseconds){
time+="."+(_18e<100?"0":"")+_(_18e);
}
if(_186.zulu){
time+="Z";
}else{
if(_186.selector!="time"){
var _18f=_185.getTimezoneOffset();
var _190=Math.abs(_18f);
time+=(_18f>0?"-":"+")+_(Math.floor(_190/60))+":"+_(_190%60);
}
}
_189.push(time);
}
return _189.join("T");
};
}
if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.parser=new function(){
var d=dojo;
var _192=d._scopeName+"Type";
var qry="["+_192+"]";
function val2type(_194){
if(d.isString(_194)){
return "string";
}
if(typeof _194=="number"){
return "number";
}
if(typeof _194=="boolean"){
return "boolean";
}
if(d.isFunction(_194)){
return "function";
}
if(d.isArray(_194)){
return "array";
}
if(_194 instanceof Date){
return "date";
}
if(_194 instanceof d._Url){
return "url";
}
return "object";
};
function str2obj(_195,type){
switch(type){
case "string":
return _195;
case "number":
return _195.length?Number(_195):NaN;
case "boolean":
return typeof _195=="boolean"?_195:!(_195.toLowerCase()=="false");
case "function":
if(d.isFunction(_195)){
_195=_195.toString();
_195=d.trim(_195.substring(_195.indexOf("{")+1,_195.length-1));
}
try{
if(_195.search(/[^\w\.]+/i)!=-1){
_195=d.parser._nameAnonFunc(new Function(_195),this);
}
return d.getObject(_195,false);
}
catch(e){
return new Function();
}
case "array":
return _195?_195.split(/\s*,\s*/):[];
case "date":
switch(_195){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_195);
}
case "url":
return d.baseUrl+_195;
default:
return d.fromJson(_195);
}
};
var _197={};
function getClassInfo(_198){
if(!_197[_198]){
var cls=d.getObject(_198);
if(!d.isFunction(cls)){
throw new Error("Could not load class '"+_198+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var _19a=cls.prototype;
var _19b={};
for(var name in _19a){
if(name.charAt(0)=="_"){
continue;
}
var _19d=_19a[name];
_19b[name]=val2type(_19d);
}
_197[_198]={cls:cls,params:_19b};
}
return _197[_198];
};
this._functionFromScript=function(_19e){
var _19f="";
var _1a0="";
var _1a1=_19e.getAttribute("args");
if(_1a1){
d.forEach(_1a1.split(/\s*,\s*/),function(part,idx){
_19f+="var "+part+" = arguments["+idx+"]; ";
});
}
var _1a4=_19e.getAttribute("with");
if(_1a4&&_1a4.length){
d.forEach(_1a4.split(/\s*,\s*/),function(part){
_19f+="with("+part+"){";
_1a0+="}";
});
}
return new Function(_19f+_19e.innerHTML+_1a0);
};
this.instantiate=function(_1a6){
var _1a7=[];
d.forEach(_1a6,function(node){
if(!node){
return;
}
var type=node.getAttribute(_192);
if((!type)||(!type.length)){
return;
}
var _1aa=getClassInfo(type);
var _1ab=_1aa.cls;
var ps=_1ab._noScript||_1ab.prototype._noScript;
var _1ad={};
var _1ae=node.attributes;
for(var name in _1aa.params){
var item=_1ae.getNamedItem(name);
if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){
continue;
}
var _1b1=item.value;
switch(name){
case "class":
_1b1=node.className;
break;
case "style":
_1b1=node.style&&node.style.cssText;
}
var _1b2=_1aa.params[name];
_1ad[name]=str2obj(_1b1,_1b2);
}
if(!ps){
var _1b3=[],_1b4=[];
d.query("> script[type^='dojo/']",node).orphan().forEach(function(_1b5){
var _1b6=_1b5.getAttribute("event"),type=_1b5.getAttribute("type"),nf=d.parser._functionFromScript(_1b5);
if(_1b6){
if(type=="dojo/connect"){
_1b3.push({event:_1b6,func:nf});
}else{
_1ad[_1b6]=nf;
}
}else{
_1b4.push(nf);
}
});
}
var _1b8=_1ab["markupFactory"];
if(!_1b8&&_1ab["prototype"]){
_1b8=_1ab.prototype["markupFactory"];
}
var _1b9=_1b8?_1b8(_1ad,node,_1ab):new _1ab(_1ad,node);
_1a7.push(_1b9);
var _1ba=node.getAttribute("jsId");
if(_1ba){
d.setObject(_1ba,_1b9);
}
if(!ps){
d.forEach(_1b3,function(_1bb){
d.connect(_1b9,_1bb.event,null,_1bb.func);
});
d.forEach(_1b4,function(func){
func.call(_1b9);
});
}
});
d.forEach(_1a7,function(_1bd){
if(_1bd&&_1bd.startup&&!_1bd._started&&(!_1bd.getParent||!_1bd.getParent())){
_1bd.startup();
}
});
return _1a7;
};
this.parse=function(_1be){
var list=d.query(qry,_1be);
var _1c0=this.instantiate(list);
return _1c0;
};
}();
(function(){
var _1c1=function(){
if(dojo.config["parseOnLoad"]==true){
dojo.parser.parse();
}
};
if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){
dojo._loaders.splice(1,0,_1c1);
}else{
dojo._loaders.unshift(_1c1);
}
})();
dojo.parser._anonCtr=0;
dojo.parser._anon={};
dojo.parser._nameAnonFunc=function(_1c2,_1c3){
var jpn="$joinpoint";
var nso=(_1c3||dojo.parser._anon);
if(dojo.isIE){
var cn=_1c2["__dojoNameCache"];
if(cn&&nso[cn]===_1c2){
return _1c2["__dojoNameCache"];
}
}
var ret="__"+dojo.parser._anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.parser._anonCtr++;
}
nso[ret]=_1c2;
return ret;
};
}
if(!dojo._hasResource["dijit._Templated"]){
dojo._hasResource["dijit._Templated"]=true;
dojo.provide("dijit._Templated");
dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){
var _1c9=this.declaredClass,_1ca=this;
return dojo.string.substitute(tmpl,this,function(_1cb,key){
if(key.charAt(0)=="!"){
_1cb=_1ca[key.substr(1)];
}
if(typeof _1cb=="undefined"){
throw new Error(_1c9+" template:"+key);
}
if(_1cb==null){
return "";
}
return key.charAt(0)=="!"?_1cb:_1cb.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _1cd=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var node;
if(dojo.isString(_1cd)){
node=dijit._Templated._createNodesFromText(this._stringRepl(_1cd))[0];
}else{
node=_1cd.cloneNode(true);
}
this.domNode=node;
this._attachTemplateNodes(node);
var _1cf=this.srcNodeRef;
if(_1cf&&_1cf.parentNode){
_1cf.parentNode.replaceChild(node,_1cf);
}
if(this.widgetsInTemplate){
var cw=(this._supportingWidgets=dojo.parser.parse(node));
this._attachTemplateNodes(cw,function(n,p){
return n[p];
});
}
this._fillContent(_1cf);
},_fillContent:function(_1d3){
var dest=this.containerNode;
if(_1d3&&dest){
while(_1d3.hasChildNodes()){
dest.appendChild(_1d3.firstChild);
}
}
},_attachTemplateNodes:function(_1d5,_1d6){
_1d6=_1d6||function(n,p){
return n.getAttribute(p);
};
var _1d9=dojo.isArray(_1d5)?_1d5:(_1d5.all||_1d5.getElementsByTagName("*"));
var x=dojo.isArray(_1d5)?0:-1;
var _1db={};
for(;x<_1d9.length;x++){
var _1dc=(x==-1)?_1d5:_1d9[x];
if(this.widgetsInTemplate&&_1d6(_1dc,"dojoType")){
continue;
}
var _1dd=_1d6(_1dc,"dojoAttachPoint");
if(_1dd){
var _1de,_1df=_1dd.split(/\s*,\s*/);
while((_1de=_1df.shift())){
if(dojo.isArray(this[_1de])){
this[_1de].push(_1dc);
}else{
this[_1de]=_1dc;
}
}
}
var _1e0=_1d6(_1dc,"dojoAttachEvent");
if(_1e0){
var _1e1,_1e2=_1e0.split(/\s*,\s*/);
var trim=dojo.trim;
while((_1e1=_1e2.shift())){
if(_1e1){
var _1e4=null;
if(_1e1.indexOf(":")!=-1){
var _1e5=_1e1.split(":");
_1e1=trim(_1e5[0]);
_1e4=trim(_1e5[1]);
}else{
_1e1=trim(_1e1);
}
if(!_1e4){
_1e4=_1e1;
}
this.connect(_1dc,_1e1,_1e4);
}
}
}
var role=_1d6(_1dc,"waiRole");
if(role){
dijit.setWaiRole(_1dc,role);
}
var _1e7=_1d6(_1dc,"waiState");
if(_1e7){
dojo.forEach(_1e7.split(/\s*,\s*/),function(_1e8){
if(_1e8.indexOf("-")!=-1){
var pair=_1e8.split("-");
dijit.setWaiState(_1dc,pair[0],pair[1]);
}
});
}
}
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_1ea,_1eb,_1ec){
var _1ed=dijit._Templated._templateCache;
var key=_1eb||_1ea;
var _1ef=_1ed[key];
if(_1ef){
if(!_1ef.ownerDocument||_1ef.ownerDocument==dojo.doc){
return _1ef;
}
dojo._destroyElement(_1ef);
}
if(!_1eb){
_1eb=dijit._Templated._sanitizeTemplateString(dojo._getText(_1ea));
}
_1eb=dojo.string.trim(_1eb);
if(_1ec||_1eb.match(/\$\{([^\}]+)\}/g)){
return (_1ed[key]=_1eb);
}else{
return (_1ed[key]=dijit._Templated._createNodesFromText(_1eb)[0]);
}
};
dijit._Templated._sanitizeTemplateString=function(_1f0){
if(_1f0){
_1f0=_1f0.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _1f1=_1f0.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_1f1){
_1f0=_1f1[1];
}
}else{
_1f0="";
}
return _1f0;
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
var _1f2=dijit._Templated._templateCache;
for(var key in _1f2){
var _1f4=_1f2[key];
if(!isNaN(_1f4.nodeType)){
dojo._destroyElement(_1f4);
}
delete _1f2[key];
}
});
}
(function(){
var _1f5={cell:{re:/^<t[dh][\s\r\n>]/i,pre:"<table><tbody><tr>",post:"</tr></tbody></table>"},row:{re:/^<tr[\s\r\n>]/i,pre:"<table><tbody>",post:"</tbody></table>"},section:{re:/^<(thead|tbody|tfoot)[\s\r\n>]/i,pre:"<table>",post:"</table>"}};
var tn;
dijit._Templated._createNodesFromText=function(text){
if(tn&&tn.ownerDocument!=dojo.doc){
dojo._destroyElement(tn);
tn=undefined;
}
if(!tn){
tn=dojo.doc.createElement("div");
tn.style.display="none";
dojo.body().appendChild(tn);
}
var _1f8="none";
var _1f9=text.replace(/^\s+/,"");
for(var type in _1f5){
var map=_1f5[type];
if(map.re.test(_1f9)){
_1f8=type;
text=map.pre+text+map.post;
break;
}
}
tn.innerHTML=text;
if(tn.normalize){
tn.normalize();
}
var tag={cell:"tr",row:"tbody",section:"table"}[_1f8];
var _1fd=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;
var _1fe=[];
while(_1fd.firstChild){
_1fe.push(_1fd.removeChild(_1fd.firstChild));
}
tn.innerHTML="";
return _1fe;
};
})();
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
if(!dojo._hasResource["dojo.dnd.common"]){
dojo._hasResource["dojo.dnd.common"]=true;
dojo.provide("dojo.dnd.common");
dojo.dnd._isMac=navigator.appVersion.indexOf("Macintosh")>=0;
dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey";
dojo.dnd.getCopyKeyState=function(e){
return e[dojo.dnd._copyKey];
};
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;
};
}
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._abs(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.isSafari||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 _216=n.scrollLeft,_217=n.scrollTop;
n.scrollLeft=n.scrollLeft+dx;
n.scrollTop=n.scrollTop+dy;
if(_216!=n.scrollLeft||_217!=n.scrollTop){
return;
}
}
}
try{
n=n.parentNode;
}
catch(x){
n=null;
}
}
dojo.dnd.autoScroll(e);
};
}
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(node,e,host){
this.node=dojo.byId(node);
this.marginBox={l:e.pageX,t:e.pageY};
this.mouseButton=e.button;
var h=this.host=host,d=node.ownerDocument,_21d=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),_21d];
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});
dojo.stopEvent(e);
},onMouseUp:function(e){
if(dojo.isSafari&&dojo.dnd._isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){
this.destroy();
}
dojo.stopEvent(e);
},onFirstMove:function(){
var s=this.node.style,l,t,h=this.host;
switch(s.position){
case "relative":
case "absolute":
l=Math.round(parseFloat(s.left));
t=Math.round(parseFloat(s.top));
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);
}
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;
}});
}
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(node,_22c){
this.node=dojo.byId(node);
if(!_22c){
_22c={};
}
this.handle=_22c.handle?dojo.byId(_22c.handle):null;
if(!this.handle){
this.handle=this.node;
}
this.delay=_22c.delay>0?_22c.delay:0;
this.skip=_22c.skip;
this.mover=_22c.mover?_22c.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(_22d,node){
return new dojo.dnd.Moveable(node,_22d);
},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(_235){
dojo.publish("/dnd/move/start",[_235]);
dojo.addClass(dojo.body(),"dojoMove");
dojo.addClass(this.node,"dojoMoveItem");
},onMoveStop:function(_236){
dojo.publish("/dnd/move/stop",[_236]);
dojo.removeClass(dojo.body(),"dojoMove");
dojo.removeClass(this.node,"dojoMoveItem");
},onFirstMove:function(_237){
},onMove:function(_238,_239){
this.onMoving(_238,_239);
var s=_238.node.style;
s.left=_239.l+"px";
s.top=_239.t+"px";
this.onMoved(_238,_239);
},onMoving:function(_23b,_23c){
},onMoved:function(_23d,_23e){
}});
}
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(_23f,node){
return new dojo.dnd.move.constrainedMoveable(node,_23f);
},constructor:function(node,_242){
if(!_242){
_242={};
}
this.constraints=_242.constraints;
this.within=_242.within;
},onFirstMove:function(_243){
var c=this.constraintBox=this.constraints.call(this,_243);
c.r=c.l+c.w;
c.b=c.t+c.h;
if(this.within){
var mb=dojo.marginBox(_243.node);
c.r-=mb.w;
c.b-=mb.h;
}
},onMove:function(_246,_247){
var c=this.constraintBox,s=_246.node.style;
s.left=(_247.l<c.l?c.l:c.r<_247.l?c.r:_247.l)+"px";
s.top=(_247.t<c.t?c.t:c.b<_247.t?c.b:_247.t)+"px";
}});
dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_24a,node){
return new dojo.dnd.move.boxConstrainedMoveable(node,_24a);
},constructor:function(node,_24d){
var box=_24d&&_24d.box;
this.constraints=function(){
return box;
};
}});
dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_24f,node){
return new dojo.dnd.move.parentConstrainedMoveable(node,_24f);
},constructor:function(node,_252){
var area=_252&&_252.area;
this.constraints=function(){
var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);
if(area=="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(area=="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(area=="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,_259){
dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");
var _25a=function(node,e,_25d){
dojo.dnd.Mover.call(this,node,e,_25d);
};
dojo.extend(_25a,dojo.dnd.Mover.prototype);
dojo.extend(_25a,{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(_259){
var mb=dojo.marginBox(this.node);
c.r-=mb.w;
c.b-=mb.h;
}
}});
return _25a;
};
dojo.dnd.move.boxConstrainedMover=function(box,_266){
dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");
return dojo.dnd.move.constrainedMover(function(){
return box;
},_266);
};
dojo.dnd.move.parentConstrainedMover=function(area,_268){
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(area=="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(area=="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(area=="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,_268);
};
dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;
dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;
dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover;
}
if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){
dojo._hasResource["dojo.dnd.TimedMoveable"]=true;
dojo.provide("dojo.dnd.TimedMoveable");
(function(){
var _26e=dojo.dnd.Moveable.prototype.onMove;
dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(node,_270){
if(!_270){
_270={};
}
if(_270.timeout&&typeof _270.timeout=="number"&&_270.timeout>=0){
this.timeout=_270.timeout;
}
},markupFactory:function(_271,node){
return new dojo.dnd.TimedMoveable(node,_271);
},onMoveStop:function(_273){
if(_273._timer){
clearTimeout(_273._timer);
_26e.call(this,_273,_273._leftTop);
}
dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments);
},onMove:function(_274,_275){
_274._leftTop=_275;
if(!_274._timer){
var _t=this;
_274._timer=setTimeout(function(){
_274._timer=null;
_26e.call(_t,_274,_274._leftTop);
},this.timeout);
}
}});
})();
}
if(!dojo._hasResource["dojo.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");
dojo.provide("dojo.fx.Toggler");
(function(){
var _277={_fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,args||[]);
}
return this;
}};
var _27a=function(_27b){
this._index=-1;
this._animations=_27b||[];
this._current=this._onAnimateCtx=this._onEndCtx=null;
this.duration=0;
dojo.forEach(this._animations,function(a){
this.duration+=a.duration;
if(a.delay){
this.duration+=a.delay;
}
},this);
};
dojo.extend(_27a,{_onAnimate:function(){
this._fire("onAnimate",arguments);
},_onEnd:function(){
dojo.disconnect(this._onAnimateCtx);
dojo.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=dojo.connect(this._current,"onAnimate",this,"_onAnimate");
this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");
this._current.play(0,true);
}
},play:function(_27d,_27e){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_27e&&this._current.status()=="playing"){
return this;
}
var _27f=dojo.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_280=dojo.connect(this._current,"onBegin",this,function(arg){
this._fire("onBegin",arguments);
}),_282=dojo.connect(this._current,"onPlay",this,function(arg){
this._fire("onPlay",arguments);
dojo.disconnect(_27f);
dojo.disconnect(_280);
dojo.disconnect(_282);
});
if(this._onAnimateCtx){
dojo.disconnect(this._onAnimateCtx);
}
this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");
if(this._onEndCtx){
dojo.disconnect(this._onEndCtx);
}
this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");
this._current.play.apply(this._current,arguments);
return this;
},pause:function(){
if(this._current){
var e=dojo.connect(this._current,"onPause",this,function(arg){
this._fire("onPause",arguments);
dojo.disconnect(e);
});
this._current.pause();
}
return this;
},gotoPercent:function(_286,_287){
this.pause();
var _288=this.duration*_286;
this._current=null;
dojo.some(this._animations,function(a){
if(a.duration<=_288){
this._current=a;
return true;
}
_288-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_288/this._current.duration,_287);
}
return this;
},stop:function(_28a){
if(this._current){
if(_28a){
for(;this._index+1<this._animations.length;++this._index){
this._animations[this._index].stop(true);
}
this._current=this._animations[this._index];
}
var e=dojo.connect(this._current,"onStop",this,function(arg){
this._fire("onStop",arguments);
dojo.disconnect(e);
});
this._current.stop();
}
return this;
},status:function(){
return this._current?this._current.status():"stopped";
},destroy:function(){
if(this._onAnimateCtx){
dojo.disconnect(this._onAnimateCtx);
}
if(this._onEndCtx){
dojo.disconnect(this._onEndCtx);
}
}});
dojo.extend(_27a,_277);
dojo.fx.chain=function(_28d){
return new _27a(_28d);
};
var _28e=function(_28f){
this._animations=_28f||[];
this._connects=[];
this._finished=0;
this.duration=0;
dojo.forEach(_28f,function(a){
var _291=a.duration;
if(a.delay){
_291+=a.delay;
}
if(this.duration<_291){
this.duration=_291;
}
this._connects.push(dojo.connect(a,"onEnd",this,"_onEnd"));
},this);
this._pseudoAnimation=new dojo._Animation({curve:[0,1],duration:this.duration});
dojo.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){
this._connects.push(dojo.connect(this._pseudoAnimation,evt,dojo.hitch(this,"_fire",evt)));
},this);
};
dojo.extend(_28e,{_doAction:function(_293,args){
dojo.forEach(this._animations,function(a){
a[_293].apply(a,args);
});
return this;
},_onEnd:function(){
if(++this._finished==this._animations.length){
this._fire("onEnd");
}
},_call:function(_296,args){
var t=this._pseudoAnimation;
t[_296].apply(t,args);
},play:function(_299,_29a){
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(_29b,_29c){
var ms=this.duration*_29b;
dojo.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_29c);
});
this._call("gotoPercent",arguments);
return this;
},stop:function(_29f){
this._doAction("stop",arguments);
this._call("stop",arguments);
return this;
},status:function(){
return this._pseudoAnimation.status();
},destroy:function(){
dojo.forEach(this._connects,dojo.disconnect);
}});
dojo.extend(_28e,_277);
dojo.fx.combine=function(_2a0){
return new _28e(_2a0);
};
})();
dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){
var _t=this;
dojo.mixin(_t,args);
_t.node=args.node;
_t._showArgs=dojo.mixin({},args);
_t._showArgs.node=_t.node;
_t._showArgs.duration=_t.showDuration;
_t.showAnim=_t.showFunc(_t._showArgs);
_t._hideArgs=dojo.mixin({},args);
_t._hideArgs.node=_t.node;
_t._hideArgs.duration=_t.hideDuration;
_t.hideAnim=_t.hideFunc(_t._hideArgs);
dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));
dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));
},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_2a3){
return this.showAnim.play(_2a3||0);
},hide:function(_2a4){
return this.hideAnim.play(_2a4||0);
}});
dojo.fx.wipeIn=function(args){
args.node=dojo.byId(args.node);
var node=args.node,s=node.style,o;
var anim=dojo.animateProperty(dojo.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 _2aa=dojo.style(node,"height");
return Math.max(_2aa,1);
}
},end:function(){
return node.scrollHeight;
}}}},args));
dojo.connect(anim,"onEnd",function(){
s.height="auto";
s.overflow=o;
});
return anim;
};
dojo.fx.wipeOut=function(args){
var node=args.node=dojo.byId(args.node);
var s=node.style;
var o;
var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));
dojo.connect(anim,"beforeBegin",function(){
o=s.overflow;
s.overflow="hidden";
s.display="";
});
dojo.connect(anim,"onEnd",function(){
s.overflow=o;
s.height="auto";
s.display="none";
});
return anim;
};
dojo.fx.slideTo=function(args){
var node=(args.node=dojo.byId(args.node));
var top=null;
var left=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));
dojo.connect(anim,"beforeBegin",anim,init);
return anim;
};
}
if(!dojo._hasResource["dijit._Container"]){
dojo._hasResource["dijit._Container"]=true;
dojo.provide("dijit._Container");
dojo.declare("dijit._Contained",null,{getParent:function(){
for(var p=this.domNode.parentNode;p;p=p.parentNode){
var id=p.getAttribute&&p.getAttribute("widgetId");
if(id){
var _2bc=dijit.byId(id);
return _2bc.isContainer?_2bc:null;
}
}
return null;
},_getSibling:function(_2bd){
var node=this.domNode;
do{
node=node[_2bd+"Sibling"];
}while(node&&node.nodeType!=1);
if(!node){
return null;
}
var id=node.getAttribute("widgetId");
return dijit.byId(id);
},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);
}});
dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},addChild:function(_2c1,_2c2){
var _2c3=this.containerNode;
if(_2c2&&typeof _2c2=="number"){
var _2c4=dojo.query("> [widgetId]",_2c3);
if(_2c4&&_2c4.length>=_2c2){
_2c3=_2c4[_2c2-1];
_2c2="after";
}
}
dojo.place(_2c1.domNode,_2c3,_2c2);
if(this._started&&!_2c1._started){
_2c1.startup();
}
},removeChild:function(_2c5){
if(typeof _2c5=="number"&&_2c5>0){
_2c5=this.getChildren()[_2c5];
}
if(!_2c5||!_2c5.domNode){
return;
}
var node=_2c5.domNode;
node.parentNode.removeChild(node);
},_nextElement:function(node){
do{
node=node.nextSibling;
}while(node&&node.nodeType!=1);
return node;
},_firstElement:function(node){
node=node.firstChild;
if(node&&node.nodeType!=1){
node=this._nextElement(node);
}
return node;
},getChildren:function(){
return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);
},hasChildren:function(){
return !!this._firstElement(this.containerNode);
},destroyDescendants:function(_2c9){
dojo.forEach(this.getChildren(),function(_2ca){
_2ca.destroyRecursive(_2c9);
});
},_getSiblingOfChild:function(_2cb,dir){
var node=_2cb.domNode;
var _2ce=(dir>0?"nextSibling":"previousSibling");
do{
node=node[_2ce];
}while(node&&(node.nodeType!=1||!dijit.byNode(node)));
return node?dijit.byNode(node):null;
},getIndexOfChild:function(_2cf){
var _2d0=this.getChildren();
for(var i=0,c;c=_2d0[i];i++){
if(c==_2cf){
return i;
}
}
return -1;
}});
dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_2d3,_2d4){
var _2d5=this._keyNavCodes={};
var prev=dojo.hitch(this,this.focusPrev);
var next=dojo.hitch(this,this.focusNext);
dojo.forEach(_2d3,function(code){
_2d5[code]=prev;
});
dojo.forEach(_2d4,function(code){
_2d5[code]=next;
});
this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus");
},startupKeyNavChildren:function(){
dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));
},addChild:function(_2da,_2db){
dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);
this._startupChild(_2da);
},focus:function(){
this.focusFirstChild();
},focusFirstChild:function(){
this.focusChild(this._getFirstFocusableChild());
},focusNext:function(){
if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){
this.focusedChild.focusNext();
return;
}
var _2dc=this._getNextFocusableChild(this.focusedChild,1);
if(_2dc.getFocalNodes){
this.focusChild(_2dc,_2dc.getFocalNodes()[0]);
}else{
this.focusChild(_2dc);
}
},focusPrev:function(){
if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){
this.focusedChild.focusPrev();
return;
}
var _2dd=this._getNextFocusableChild(this.focusedChild,-1);
if(_2dd.getFocalNodes){
var _2de=_2dd.getFocalNodes();
this.focusChild(_2dd,_2de[_2de.length-1]);
}else{
this.focusChild(_2dd);
}
},focusChild:function(_2df,node){
if(_2df){
if(this.focusedChild&&_2df!==this.focusedChild){
this._onChildBlur(this.focusedChild);
}
this.focusedChild=_2df;
if(node&&_2df.focusFocalNode){
_2df.focusFocalNode(node);
}else{
_2df.focus();
}
}
},_startupChild:function(_2e1){
if(_2e1.getFocalNodes){
dojo.forEach(_2e1.getFocalNodes(),function(node){
dojo.attr(node,"tabindex",-1);
this._connectNode(node);
},this);
}else{
var node=_2e1.focusNode||_2e1.domNode;
if(_2e1.isFocusable()){
dojo.attr(node,"tabindex",-1);
}
this._connectNode(node);
}
},_connectNode:function(node){
this.connect(node,"onfocus","_onNodeFocus");
this.connect(node,"onblur","_onNodeBlur");
},_onContainerFocus:function(evt){
if(evt.target===this.domNode){
this.focusFirstChild();
}
},_onContainerKeypress:function(evt){
if(evt.ctrlKey||evt.altKey){
return;
}
var func=this._keyNavCodes[evt.charOrCode];
if(func){
func();
dojo.stopEvent(evt);
}
},_onNodeFocus:function(evt){
dojo.attr(this.domNode,"tabindex",-1);
var _2e9=dijit.getEnclosingWidget(evt.target);
if(_2e9&&_2e9.isFocusable()){
this.focusedChild=_2e9;
}
dojo.stopEvent(evt);
},_onNodeBlur:function(evt){
if(this.tabIndex){
dojo.attr(this.domNode,"tabindex",this.tabIndex);
}
dojo.stopEvent(evt);
},_onChildBlur:function(_2eb){
},_getFirstFocusableChild:function(){
return this._getNextFocusableChild(null,1);
},_getNextFocusableChild:function(_2ec,dir){
if(_2ec){
_2ec=this._getSiblingOfChild(_2ec,dir);
}
var _2ee=this.getChildren();
for(var i=0;i<_2ee.length;i++){
if(!_2ec){
_2ec=_2ee[(dir>0)?0:(_2ee.length-1)];
}
if(_2ec.isFocusable()){
return _2ec;
}
_2ec=this._getSiblingOfChild(_2ec,dir);
}
return null;
}});
}
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");
dojo.addClass(this.domNode,this.baseClass);
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_2f0){
_2f0.startup();
});
if(!this.getParent||!this.getParent()){
this.resize();
this.connect(dojo.global,"onresize","resize");
}
this.inherited(arguments);
},resize:function(_2f1,_2f2){
var node=this.domNode;
if(_2f1){
dojo.marginBox(node,_2f1);
if(_2f1.t){
node.style.top=_2f1.t+"px";
}
if(_2f1.l){
node.style.left=_2f1.l+"px";
}
}
var mb=_2f2||{};
dojo.mixin(mb,_2f1||{});
if(!("h" in mb)||!("w" in mb)){
mb=dojo.mixin(dojo.marginBox(node),mb);
}
var cs=dojo.getComputedStyle(node);
var me=dojo._getMarginExtents(node,cs);
var be=dojo._getBorderExtents(node,cs);
var bb=this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)};
var pe=dojo._getPadExtents(node,cs);
this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};
this.layout();
},layout:function(){
},_setupChild:function(_2fa){
if(_2fa.baseClass){
dojo.addClass(_2fa.domNode,this.baseClass+"-"+_2fa.baseClass);
}
},addChild:function(_2fb,_2fc){
this.inherited(arguments);
if(this._started){
this._setupChild(_2fb);
}
},removeChild:function(_2fd){
if(_2fd.baseClass){
dojo.removeClass(_2fd.domNode,this.baseClass+"-"+_2fd.baseClass);
}
this.inherited(arguments);
}});
dijit.layout.marginBox2contentBox=function(node,mb){
var cs=dojo.getComputedStyle(node);
var me=dojo._getMarginExtents(node,cs);
var pb=dojo._getPadBorderExtents(node,cs);
return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};
};
(function(){
var _303=function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
};
var size=function(_306,dim){
_306.resize?_306.resize(dim):dojo.marginBox(_306.domNode,dim);
dojo.mixin(_306,dojo.marginBox(_306.domNode));
dojo.mixin(_306,dim);
};
dijit.layout.layoutChildren=function(_308,dim,_30a){
dim=dojo.mixin({},dim);
dojo.addClass(_308,"dijitLayoutContainer");
_30a=dojo.filter(_30a,function(item){
return item.layoutAlign!="client";
}).concat(dojo.filter(_30a,function(item){
return item.layoutAlign=="client";
}));
dojo.forEach(_30a,function(_30d){
var elm=_30d.domNode,pos=_30d.layoutAlign;
var _310=elm.style;
_310.left=dim.l+"px";
_310.top=dim.t+"px";
_310.bottom=_310.right="auto";
dojo.addClass(elm,"dijitAlign"+_303(pos));
if(pos=="top"||pos=="bottom"){
size(_30d,{w:dim.w});
dim.h-=_30d.h;
if(pos=="top"){
dim.t+=_30d.h;
}else{
_310.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
size(_30d,{h:dim.h});
dim.w-=_30d.w;
if(pos=="left"){
dim.l+=_30d.w;
}else{
_310.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
size(_30d,dim);
}
}
}
});
};
})();
}
if(!dojo._hasResource["dojo.html"]){
dojo._hasResource["dojo.html"]=true;
dojo.provide("dojo.html");
(function(){
var _311=0;
dojo.html._secureForInnerHtml=function(cont){
return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
dojo.html._emptyNode=function(node){
while(node.firstChild){
dojo._destroyElement(node.firstChild);
}
};
dojo.html._setNodeContent=function(node,cont,_316){
if(_316){
dojo.html._emptyNode(node);
}
if(typeof cont=="string"){
var pre="",post="",walk=0,name=node.nodeName.toLowerCase();
switch(name){
case "tr":
pre="<tr>";
post="</tr>";
walk+=1;
case "tbody":
case "thead":
pre="<tbody>"+pre;
post+="</tbody>";
walk+=1;
case "table":
pre="<table>"+pre;
post+="</table>";
walk+=1;
break;
}
if(walk){
var n=node.ownerDocument.createElement("div");
n.innerHTML=pre+cont+post;
do{
n=n.firstChild;
}while(--walk);
dojo.forEach(n.childNodes,function(n){
node.appendChild(n.cloneNode(true));
});
}else{
node.innerHTML=cont;
}
}else{
if(cont.nodeType){
node.appendChild(cont);
}else{
dojo.forEach(cont,function(n){
node.appendChild(n.cloneNode(true));
});
}
}
return node;
};
dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_31e,node){
dojo.mixin(this,_31e||{});
node=this.node=dojo.byId(this.node||node);
if(!this.id){
this.id=["Setter",(node)?node.id||node.tagName:"",_311++].join("_");
}
if(!(this.node||node)){
new Error(this.declaredClass+": no node provided to "+this.id);
}
},set:function(cont,_321){
if(undefined!==cont){
this.content=cont;
}
if(_321){
this._mixin(_321);
}
this.onBegin();
this.setContent();
this.onEnd();
return this.node;
},setContent:function(){
var node=this.node;
if(!node){
console.error("setContent given no node");
}
try{
node=dojo.html._setNodeContent(node,this.content);
}
catch(e){
var _323=this.onContentError(e);
try{
node.innerHTML=_323;
}
catch(e){
console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e);
}
}
this.node=node;
},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 cont=this.content;
if(dojo.isString(cont)){
if(this.cleanContent){
cont=dojo.html._secureForInnerHtml(cont);
}
if(this.extractContent){
var _326=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_326){
cont=_326[1];
}
}
}
this.empty();
this.content=cont;
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(err){
return "Error occured setting content: "+err;
},_mixin:function(_328){
var _329={},key;
for(key in _328){
if(key in _329){
continue;
}
this[key]=_328[key];
}
},_parse:function(){
var _32b=this.node;
try{
this.parseResults=dojo.parser.parse(_32b,true);
}
catch(e){
this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);
}
},_onError:function(type,err,_32e){
var _32f=this["on"+type+"Error"].call(this,err);
if(_32e){
console.error(_32e,err);
}else{
if(_32f){
dojo.html._setNodeContent(this.node,_32f,true);
}
}
}});
dojo.html.set=function(node,cont,_332){
if(undefined==cont){
console.warn("dojo.html.set: no cont argument provided, using empty string");
cont="";
}
if(!_332){
return dojo.html._setNodeContent(node,cont,true);
}else{
var op=new dojo.html._ContentSetter(dojo.mixin(_332,{content:cont,node:node}));
return op.set();
}
};
})();
}
if(!dojo._hasResource["dojo.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_334,_335,_336){
_336=dojo.i18n.normalizeLocale(_336);
var _337=_336.split("-");
var _338=[_334,"nls",_335].join(".");
var _339=dojo._loadedModules[_338];
if(_339){
var _33a;
for(var i=_337.length;i>0;i--){
var loc=_337.slice(0,i).join("_");
if(_339[loc]){
_33a=_339[loc];
break;
}
}
if(!_33a){
_33a=_339.ROOT;
}
if(_33a){
var _33d=function(){
};
_33d.prototype=_33a;
return new _33d();
}
}
throw new Error("Bundle not found: "+_335+" in "+_334+" , locale="+_336);
};
dojo.i18n.normalizeLocale=function(_33e){
var _33f=_33e?_33e.toLowerCase():dojo.locale;
if(_33f=="root"){
_33f="ROOT";
}
return _33f;
};
dojo.i18n._requireLocalization=function(_340,_341,_342,_343){
var _344=dojo.i18n.normalizeLocale(_342);
var _345=[_340,"nls",_341].join(".");
var _346="";
if(_343){
var _347=_343.split(",");
for(var i=0;i<_347.length;i++){
if(_344["indexOf"](_347[i])==0){
if(_347[i].length>_346.length){
_346=_347[i];
}
}
}
if(!_346){
_346="ROOT";
}
}
var _349=_343?_346:_344;
var _34a=dojo._loadedModules[_345];
var _34b=null;
if(_34a){
if(dojo.config.localizationComplete&&_34a._built){
return;
}
var _34c=_349.replace(/-/g,"_");
var _34d=_345+"."+_34c;
_34b=dojo._loadedModules[_34d];
}
if(!_34b){
_34a=dojo["provide"](_345);
var syms=dojo._getModuleSymbols(_340);
var _34f=syms.concat("nls").join("/");
var _350;
dojo.i18n._searchLocalePath(_349,_343,function(loc){
var _352=loc.replace(/-/g,"_");
var _353=_345+"."+_352;
var _354=false;
if(!dojo._loadedModules[_353]){
dojo["provide"](_353);
var _355=[_34f];
if(loc!="ROOT"){
_355.push(loc);
}
_355.push(_341);
var _356=_355.join("/")+".js";
_354=dojo._loadPath(_356,null,function(hash){
var _358=function(){
};
_358.prototype=_350;
_34a[_352]=new _358();
for(var j in hash){
_34a[_352][j]=hash[j];
}
});
}else{
_354=true;
}
if(_354&&_34a[_352]){
_350=_34a[_352];
}else{
_34a[_352]=_350;
}
if(_343){
return true;
}
});
}
if(_343&&_344!=_346){
_34a[_344.replace(/-/g,"_")]=_34a[_346.replace(/-/g,"_")];
}
};
(function(){
var _35a=dojo.config.extraLocale;
if(_35a){
if(!_35a instanceof Array){
_35a=[_35a];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_35e,_35f){
req(m,b,_35e,_35f);
if(_35e){
return;
}
for(var i=0;i<_35a.length;i++){
req(m,b,_35a[i],_35f);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_361,down,_363){
_361=dojo.i18n.normalizeLocale(_361);
var _364=_361.split("-");
var _365=[];
for(var i=_364.length;i>0;i--){
_365.push(_364.slice(0,i).join("-"));
}
_365.push(false);
if(down){
_365.reverse();
}
for(var j=_365.length-1;j>=0;j--){
var loc=_365[j]||"ROOT";
var stop=_363(loc);
if(stop){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_36a,_36b){
function preload(_36c){
_36c=dojo.i18n.normalizeLocale(_36c);
dojo.i18n._searchLocalePath(_36c,true,function(loc){
for(var i=0;i<_36b.length;i++){
if(_36b[i]==loc){
dojo["require"](_36a+"_"+loc);
return true;
}
}
return false;
});
};
preload();
var _36f=dojo.config.extraLocale||[];
for(var i=0;i<_36f.length;i++){
preload(_36f[i]);
}
};
}
if(!dojo._hasResource["dijit.layout.ContentPane"]){
dojo._hasResource["dijit.layout.ContentPane"]=true;
dojo.provide("dijit.layout.ContentPane");
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,_isRealContent:true,postMixInProperties:function(){
this.inherited(arguments);
var _371=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_371);
this.errorMessage=dojo.string.substitute(this.errorMessage,_371);
},buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},postCreate:function(){
this.domNode.title="";
if(!dijit.hasWaiRole(this.domNode)){
dijit.setWaiRole(this.domNode,"group");
}
dojo.addClass(this.domNode,this.baseClass);
},startup:function(){
if(this._started){
return;
}
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild){
this._singleChild.startup();
}
}
this._loadCheck();
this.inherited(arguments);
},_checkIfSingleChild:function(){
var _372=dojo.query(">",this.containerNode),_373=_372.filter(function(node){
return dojo.hasAttr(node,"dojoType")||dojo.hasAttr(node,"widgetId");
}),_375=dojo.filter(_373.map(dijit.byNode),function(_376){
return _376&&_376.domNode&&_376.resize;
});
if(_372.length==_373.length&&_375.length==1){
this.isContainer=true;
this._singleChild=_375[0];
}else{
delete this.isContainer;
delete this._singleChild;
}
},refresh:function(){
return this._prepareLoad(true);
},setHref:function(href){
dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated.\tUse attr('href', ...) instead.","","2.0");
return this.attr("href",href);
},_setHrefAttr:function(href){
this.href=href;
if(this._created){
return this._prepareLoad();
}
},setContent:function(data){
dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use attr('content', ...) instead.","","2.0");
this.attr("content",data);
},_setContentAttr:function(data){
this.href="";
this.cancel();
this._setContent(data||"");
this._isDownloaded=false;
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild&&this._singleChild.resize){
this._singleChild.startup();
var cb=this._contentBox||dojo.contentBox(this.containerNode);
this._singleChild.resize({w:cb.w,h:cb.h});
}
}
},_getContentAttr:function(){
return this.containerNode.innerHTML;
},cancel:function(){
if(this._xhrDfd&&(this._xhrDfd.fired==-1)){
this._xhrDfd.cancel();
}
delete this._xhrDfd;
},destroyRecursive:function(_37c){
if(this._beingDestroyed){
return;
}
this._beingDestroyed=true;
this.inherited(arguments);
},resize:function(size){
dojo.marginBox(this.domNode,size);
var node=this.containerNode,mb=dojo.mixin(dojo.marginBox(node),size||{});
var cb=this._contentBox=dijit.layout.marginBox2contentBox(node,mb);
if(this._singleChild&&this._singleChild.resize){
this._singleChild.resize({w:cb.w,h:cb.h});
}
},_prepareLoad:function(_381){
this.cancel();
this.isLoaded=false;
this._loadCheck(_381);
},_isShown:function(){
if("open" in this){
return this.open;
}else{
var node=this.domNode;
return (node.style.display!="none")&&(node.style.visibility!="hidden");
}
},_loadCheck:function(_383){
var _384=this._isShown();
if(this.href&&(_383||(this.preload&&!this.isLoaded&&!this._xhrDfd)||(this.refreshOnShow&&_384&&!this._xhrDfd)||(!this.isLoaded&&_384&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._setContent(this.onDownloadStart(),true);
var self=this;
var _386={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_386,this.ioArgs);
}
var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_386);
hand.addCallback(function(html){
try{
self._isDownloaded=true;
self._setContent(html,false);
self.onDownloadEnd();
}
catch(err){
self._onError("Content",err);
}
delete self._xhrDfd;
return html;
});
hand.addErrback(function(err){
if(!hand.cancelled){
self._onError("Download",err);
}
delete self._xhrDfd;
return err;
});
},_onLoadHandler:function(data){
this.isLoaded=true;
try{
this.onLoad(data);
}
catch(e){
console.error("Error "+this.widgetId+" running custom onLoad code");
}
},_onUnloadHandler:function(){
this.isLoaded=false;
try{
this.onUnload();
}
catch(e){
console.error("Error "+this.widgetId+" running custom onUnload code");
}
},destroyDescendants:function(){
if(this._isRealContent){
this._onUnloadHandler();
}
var _38b=this._contentSetter;
if(_38b){
_38b.empty();
}else{
this.inherited(arguments);
dojo.html._emptyNode(this.containerNode);
}
},_setContent:function(cont,_38d){
this.destroyDescendants();
this._isRealContent=!_38d;
var _38e=this._contentSetter;
if(!(_38e&&_38e instanceof dojo.html._ContentSetter)){
_38e=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){
var _390=this.onContentError(e);
try{
this.containerNode.innerHTML=_390;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
})});
}
var _391=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});
dojo.mixin(_38e,_391);
_38e.set((dojo.isObject(cont)&&cont.domNode)?cont.domNode:cont);
delete this._contentSetterParams;
if(!_38d){
this._onLoadHandler(cont);
}
},_onError:function(type,err,_394){
var _395=this["on"+type+"Error"].call(this,err);
if(_394){
console.error(_394,err);
}else{
if(_395){
this._setContent(_395,true);
}
}
},_createSubWidgets:function(){
try{
dojo.parser.parse(this.containerNode,true);
}
catch(e){
this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));
}
},onLoad:function(data){
},onUnload:function(){
},onDownloadStart:function(){
return this.loadingMessage;
},onContentError:function(_397){
},onDownloadError:function(_398){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
if(!dojo._hasResource["dijit.form.Form"]){
dojo._hasResource["dijit.form.Form"]=true;
dojo.provide("dijit.form.Form");
dojo.declare("dijit.form._FormMixin",null,{reset:function(){
dojo.forEach(this.getDescendants(),function(_399){
if(_399.reset){
_399.reset();
}
});
},validate:function(){
var _39a=false;
return dojo.every(dojo.map(this.getDescendants(),function(_39b){
_39b._hasBeenBlurred=true;
var _39c=_39b.disabled||!_39b.validate||_39b.validate();
if(!_39c&&!_39a){
dijit.scrollIntoView(_39b.containerNode||_39b.domNode);
_39b.focus();
_39a=true;
}
return _39c;
}),function(item){
return item;
});
},setValues:function(val){
dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.","","2.0");
return this.attr("value",val);
},_setValueAttr:function(obj){
var map={};
dojo.forEach(this.getDescendants(),function(_3a1){
if(!_3a1.name){
return;
}
var _3a2=map[_3a1.name]||(map[_3a1.name]=[]);
_3a2.push(_3a1);
});
for(var name in map){
if(!map.hasOwnProperty(name)){
continue;
}
var _3a4=map[name],_3a5=dojo.getObject(name,false,obj);
if(_3a5===undefined){
continue;
}
if(!dojo.isArray(_3a5)){
_3a5=[_3a5];
}
if(typeof _3a4[0].checked=="boolean"){
dojo.forEach(_3a4,function(w,i){
w.attr("value",dojo.indexOf(_3a5,w.value)!=-1);
});
}else{
if(_3a4[0]._multiValue){
_3a4[0].attr("value",_3a5);
}else{
dojo.forEach(_3a4,function(w,i){
w.attr("value",_3a5[i]);
});
}
}
}
},getValues:function(){
dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.","","2.0");
return this.attr("value");
},_getValueAttr:function(){
var obj={};
dojo.forEach(this.getDescendants(),function(_3ab){
var name=_3ab.name;
if(!name||_3ab.disabled){
return;
}
var _3ad=_3ab.attr("value");
if(typeof _3ab.checked=="boolean"){
if(/Radio/.test(_3ab.declaredClass)){
if(_3ad!==false){
dojo.setObject(name,_3ad,obj);
}
}else{
var ary=dojo.getObject(name,false,obj);
if(!ary){
ary=[];
dojo.setObject(name,ary,obj);
}
if(_3ad!==false){
ary.push(_3ad);
}
}
}else{
dojo.setObject(name,_3ad,obj);
}
});
return obj;
},isValid:function(){
this._invalidWidgets=[];
return dojo.every(this.getDescendants(),function(_3af){
var _3b0=_3af.disabled||!_3af.isValid||_3af.isValid();
if(!_3b0){
this._invalidWidgets.push(_3af);
}
return _3b0;
},this);
},onValidStateChange:function(_3b1){
},_widgetChange:function(_3b2){
var _3b3=this._lastValidState;
if(!_3b2||this._lastValidState===undefined){
_3b3=this.isValid();
if(this._lastValidState===undefined){
this._lastValidState=_3b3;
}
}else{
if(_3b2.isValid){
this._invalidWidgets=dojo.filter(this._invalidWidgets||[],function(w){
return (w!=_3b2);
},this);
if(!_3b2.isValid()&&!_3b2.attr("disabled")){
this._invalidWidgets.push(_3b2);
}
_3b3=(this._invalidWidgets.length===0);
}
}
if(_3b3!==this._lastValidState){
this._lastValidState=_3b3;
this.onValidStateChange(_3b3);
}
},connectChildren:function(){
dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));
var _3b5=this;
var _3b6=this._changeConnections=[];
dojo.forEach(dojo.filter(this.getDescendants(),function(item){
return item.validate;
}),function(_3b8){
_3b6.push(_3b5.connect(_3b8,"validate",dojo.hitch(_3b5,"_widgetChange",_3b8)));
_3b6.push(_3b5.connect(_3b8,"_setDisabledAttr",dojo.hitch(_3b5,"_widgetChange",_3b8)));
});
this._widgetChange(null);
},startup:function(){
this.inherited(arguments);
this._changeConnections=[];
this.connectChildren();
}});
dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' name='${name}'></form>",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),execute:function(_3b9){
},onExecute:function(){
},_setEncTypeAttr:function(_3ba){
this.encType=_3ba;
dojo.attr(this.domNode,"encType",_3ba);
if(dojo.isIE){
this.domNode.encoding=_3ba;
}
},postCreate:function(){
if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){
var item=this.srcNodeRef.attributes.getNamedItem("encType");
if(item&&!item.specified&&(typeof item.value=="string")){
this.attr("encType",item.value);
}
}
this.inherited(arguments);
},onReset:function(e){
return true;
},_onReset:function(e){
var faux={returnValue:true,preventDefault:function(){
this.returnValue=false;
},stopPropagation:function(){
},currentTarget:e.currentTarget,target:e.target};
if(!(this.onReset(faux)===false)&&faux.returnValue){
this.reset();
}
dojo.stopEvent(e);
return false;
},_onSubmit:function(e){
var fp=dijit.form.Form.prototype;
if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){
dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");
this.onExecute();
this.execute(this.getValues());
}
if(this.onSubmit(e)===false){
dojo.stopEvent(e);
}
},onSubmit:function(e){
return this.isValid();
},submit:function(){
if(!(this.onSubmit()===false)){
this.containerNode.submit();
}
}});
}
if(!dojo._hasResource["dijit.Dialog"]){
dojo._hasResource["dijit.Dialog"]=true;
dojo.provide("dijit.Dialog");
dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper' id='${id}_wrapper'><div class='dijitDialogUnderlay ${class}' id='${id}' dojoAttachPoint='node'></div></div>",attributeMap:{},postCreate:function(){
dojo.body().appendChild(this.domNode);
this.bgIframe=new dijit.BackgroundIframe(this.domNode);
},layout:function(){
var _3c2=dijit.getViewport();
var is=this.node.style,os=this.domNode.style;
os.top=_3c2.t+"px";
os.left=_3c2.l+"px";
is.width=_3c2.w+"px";
is.height=_3c2.h+"px";
var _3c5=dijit.getViewport();
if(_3c2.w!=_3c5.w){
is.width=_3c5.w+"px";
}
if(_3c2.h!=_3c5.h){
is.height=_3c5.h+"px";
}
},show:function(){
this.domNode.style.display="block";
this.layout();
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
},hide:function(){
this.domNode.style.display="none";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
},uninitialize:function(){
if(this.bgIframe){
this.bgIframe.destroy();
}
}});
dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_3c6){
},onCancel:function(){
},onExecute:function(){
},_onSubmit:function(){
this.onExecute();
this.execute(this.attr("value"));
},_getFocusItems:function(_3c7){
var _3c8=dijit._getTabNavigable(dojo.byId(_3c7));
this._firstFocusItem=_3c8.lowest||_3c8.first||_3c7;
this._lastFocusItem=_3c8.last||_3c8.highest||this._firstFocusItem;
if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){
dojo.attr(_3c7,"tabindex","0");
this._firstFocusItem=_3c7;
}
}});
dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:null,templateString:"<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\r\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\r\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\r\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel\" title=\"${buttonCancel}\">\r\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\r\n\t</span>\r\n\t</div>\r\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\r\n</div>\r\n",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}]}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,postMixInProperties:function(){
var _3c9=dojo.i18n.getLocalization("dijit","common");
dojo.mixin(this,_3c9);
this.inherited(arguments);
},postCreate:function(){
var s=this.domNode.style;
s.visibility="hidden";
s.position="absolute";
s.display="";
s.top="-9999px";
dojo.body().appendChild(this.domNode);
this.inherited(arguments);
this.connect(this,"onExecute","hide");
this.connect(this,"onCancel","hide");
this._modalconnects=[];
},onLoad:function(){
this._position();
this.inherited(arguments);
},_endDrag:function(e){
if(e&&e.node&&e.node===this.domNode){
var vp=dijit.getViewport();
var p=e._leftTop||dojo.coords(e.node,true);
this._relativePosition={t:p.t-vp.t,l:p.l-vp.l};
}
},_setup:function(){
var node=this.domNode;
if(this.titleBar&&this.draggable){
this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(node,{handle:this.titleBar}):new dojo.dnd.Moveable(node,{handle:this.titleBar,timeout:0});
dojo.subscribe("/dnd/move/stop",this,"_endDrag");
}else{
dojo.addClass(node,"dijitDialogFixed");
}
this._underlay=new dijit.DialogUnderlay({id:this.id+"_underlay","class":dojo.map(this["class"].split(/\s/),function(s){
return s+"_underlay";
}).join(" ")});
var _3d0=this._underlay;
this._fadeIn=dojo.fadeIn({node:node,duration:this.duration,onBegin:dojo.hitch(_3d0,"show")});
this._fadeOut=dojo.fadeOut({node:node,duration:this.duration,onEnd:function(){
node.style.visibility="hidden";
node.style.top="-9999px";
_3d0.hide();
}});
},uninitialize:function(){
if(this._fadeIn&&this._fadeIn.status()=="playing"){
this._fadeIn.stop();
}
if(this._fadeOut&&this._fadeOut.status()=="playing"){
this._fadeOut.stop();
}
if(this._underlay){
this._underlay.destroy();
}
if(this._moveable){
this._moveable.destroy();
}
},_size:function(){
var mb=dojo.marginBox(this.domNode);
var _3d2=dijit.getViewport();
if(mb.w>=_3d2.w||mb.h>=_3d2.h){
dojo.style(this.containerNode,{width:Math.min(mb.w,Math.floor(_3d2.w*0.75))+"px",height:Math.min(mb.h,Math.floor(_3d2.h*0.75))+"px",overflow:"auto",position:"relative"});
}
},_position:function(){
if(!dojo.hasClass(dojo.body(),"dojoMove")){
var node=this.domNode;
var _3d4=dijit.getViewport();
var p=this._relativePosition;
var mb=p?null:dojo.marginBox(node);
dojo.style(node,{left:Math.floor(_3d4.l+(p?p.l:(_3d4.w-mb.w)/2))+"px",top:Math.floor(_3d4.t+(p?p.t:(_3d4.h-mb.h)/2))+"px"});
}
},_onKey:function(evt){
if(evt.charOrCode){
var dk=dojo.keys;
var node=evt.target;
if(evt.charOrCode===dk.TAB){
this._getFocusItems(this.domNode);
}
var _3da=(this._firstFocusItem==this._lastFocusItem);
if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){
if(!_3da){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){
if(!_3da){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
while(node){
if(node==this.domNode){
if(evt.charOrCode==dk.ESCAPE){
this.onCancel();
}else{
return;
}
}
node=node.parentNode;
}
if(evt.charOrCode!==dk.TAB){
dojo.stopEvent(evt);
}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,"layout"));
this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));
dojo.style(this.domNode,{opacity:0,visibility:""});
this.open=true;
this._loadCheck();
this._size();
this._position();
this._fadeIn.play();
this._savedFocus=dijit.getFocus(this);
if(this.autofocus){
this._getFocusItems(this.domNode);
setTimeout(dojo.hitch(dijit,"focus",this._firstFocusItem),50);
}
},hide:function(){
if(!this._alreadyInitialized){
return;
}
if(this._fadeIn.status()=="playing"){
this._fadeIn.stop();
}
this._fadeOut.play();
if(this._scrollConnected){
this._scrollConnected=false;
}
dojo.forEach(this._modalconnects,dojo.disconnect);
this._modalconnects=[];
if(this.refocus){
this.connect(this._fadeOut,"onEnd",dojo.hitch(dijit,"focus",this._savedFocus));
}
if(this._relativePosition){
delete this._relativePosition;
}
this.open=false;
},layout:function(){
if(this.domNode.style.visibility!="hidden"){
this._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.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,"class":"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:null,templateString:"<div waiRole=\"presentation\">\r\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\r\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\r\n\t</div>\r\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\r\n</div>\r\n",postCreate:function(){
this.inherited(arguments);
this.connect(this.containerNode,"onkeypress","_onKey");
this.containerNode.title=this.title;
},orient:function(node,_3dc,_3dd){
this.domNode.className=this["class"]+" dijitTooltipAB"+(_3dd.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_3dd.charAt(0)=="T"?"Below":"Above");
},onOpen:function(pos){
this.orient(this.domNode,pos.aroundCorner,pos.corner);
this._loadCheck();
if(this.autofocus){
this._getFocusItems(this.containerNode);
dijit.focus(this._firstFocusItem);
}
},_onKey:function(evt){
var node=evt.target;
var dk=dojo.keys;
if(evt.charOrCode===dk.TAB){
this._getFocusItems(this.containerNode);
}
var _3e2=(this._firstFocusItem==this._lastFocusItem);
if(evt.charOrCode==dk.ESCAPE){
this.onCancel();
dojo.stopEvent(evt);
}else{
if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){
if(!_3e2){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){
if(!_3e2){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
if(evt.charOrCode===dk.TAB){
evt.stopPropagation();
}
}
}
}
}});
}
if(!dojo._hasResource["dojo.data.util.filter"]){
dojo._hasResource["dojo.data.util.filter"]=true;
dojo.provide("dojo.data.util.filter");
dojo.data.util.filter.patternToRegExp=function(_3e3,_3e4){
var rxp="^";
var c=null;
for(var i=0;i<_3e3.length;i++){
c=_3e3.charAt(i);
switch(c){
case "\\":
rxp+=c;
i++;
rxp+=_3e3.charAt(i);
break;
case "*":
rxp+=".*";
break;
case "?":
rxp+=".";
break;
case "$":
case "^":
case "/":
case "+":
case ".":
case "|":
case "(":
case ")":
case "{":
case "}":
case "[":
case "]":
rxp+="\\";
default:
rxp+=c;
}
}
rxp+="$";
if(_3e4){
return new RegExp(rxp,"mi");
}else{
return new RegExp(rxp,"m");
}
};
}
if(!dojo._hasResource["dojo.data.util.sorter"]){
dojo._hasResource["dojo.data.util.sorter"]=true;
dojo.provide("dojo.data.util.sorter");
dojo.data.util.sorter.basicComparator=function(a,b){
var ret=0;
if(a>b||typeof a==="undefined"||a===null){
ret=1;
}else{
if(a<b||typeof b==="undefined"||b===null){
ret=-1;
}
}
return ret;
};
dojo.data.util.sorter.createSortFunction=function(_3eb,_3ec){
var _3ed=[];
function createSortFunction(attr,dir){
return function(_3f0,_3f1){
var a=_3ec.getValue(_3f0,attr);
var b=_3ec.getValue(_3f1,attr);
var _3f4=null;
if(_3ec.comparatorMap){
if(typeof attr!=="string"){
attr=_3ec.getIdentity(attr);
}
_3f4=_3ec.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
}
_3f4=_3f4||dojo.data.util.sorter.basicComparator;
return dir*_3f4(a,b);
};
};
var _3f5;
for(var i=0;i<_3eb.length;i++){
_3f5=_3eb[i];
if(_3f5.attribute){
var _3f7=(_3f5.descending)?-1:1;
_3ed.push(createSortFunction(_3f5.attribute,_3f7));
}
}
return function(rowA,rowB){
var i=0;
while(i<_3ed.length){
var ret=_3ed[i++](rowA,rowB);
if(ret!==0){
return ret;
}
}
return 0;
};
};
}
if(!dojo._hasResource["dojo.data.util.simpleFetch"]){
dojo._hasResource["dojo.data.util.simpleFetch"]=true;
dojo.provide("dojo.data.util.simpleFetch");
dojo.data.util.simpleFetch.fetch=function(_3fc){
_3fc=_3fc||{};
if(!_3fc.store){
_3fc.store=this;
}
var self=this;
var _3fe=function(_3ff,_400){
if(_400.onError){
var _401=_400.scope||dojo.global;
_400.onError.call(_401,_3ff,_400);
}
};
var _402=function(_403,_404){
var _405=_404.abort||null;
var _406=false;
var _407=_404.start?_404.start:0;
var _408=(_404.count&&(_404.count!==Infinity))?(_407+_404.count):_403.length;
_404.abort=function(){
_406=true;
if(_405){
_405.call(_404);
}
};
var _409=_404.scope||dojo.global;
if(!_404.store){
_404.store=self;
}
if(_404.onBegin){
_404.onBegin.call(_409,_403.length,_404);
}
if(_404.sort){
_403.sort(dojo.data.util.sorter.createSortFunction(_404.sort,self));
}
if(_404.onItem){
for(var i=_407;(i<_403.length)&&(i<_408);++i){
var item=_403[i];
if(!_406){
_404.onItem.call(_409,item,_404);
}
}
}
if(_404.onComplete&&!_406){
var _40c=null;
if(!_404.onItem){
_40c=_403.slice(_407,_408);
}
_404.onComplete.call(_409,_40c,_404);
}
};
this._fetchItems(_3fc,_402,_3fe);
return _3fc;
};
}
if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){
dojo._hasResource["dojo.data.ItemFileReadStore"]=true;
dojo.provide("dojo.data.ItemFileReadStore");
dojo.declare("dojo.data.ItemFileReadStore",null,{constructor:function(_40d){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._jsonFileUrl=_40d.url;
this._jsonData=_40d.data;
this._datatypeMap=_40d.typeMap||{};
if(!this._datatypeMap["Date"]){
this._datatypeMap["Date"]={type:Date,deserialize:function(_40e){
return dojo.date.stamp.fromISOString(_40e);
}};
}
this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
this._itemsByIdentity=null;
this._storeRefPropName="_S";
this._itemNumPropName="_0";
this._rootItemPropName="_RI";
this._reverseRefMap="_RRM";
this._loadInProgress=false;
this._queuedFetches=[];
if(_40d.urlPreventCache!==undefined){
this.urlPreventCache=_40d.urlPreventCache?true:false;
}
if(_40d.clearOnClose){
this.clearOnClose=true;
}
},url:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,_assertIsItem:function(item){
if(!this.isItem(item)){
throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
}
},_assertIsAttribute:function(_410){
if(typeof _410!=="string"){
throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
}
},getValue:function(item,_412,_413){
var _414=this.getValues(item,_412);
return (_414.length>0)?_414[0]:_413;
},getValues:function(item,_416){
this._assertIsItem(item);
this._assertIsAttribute(_416);
return item[_416]||[];
},getAttributes:function(item){
this._assertIsItem(item);
var _418=[];
for(var key in item){
if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){
_418.push(key);
}
}
return _418;
},hasAttribute:function(item,_41b){
return this.getValues(item,_41b).length>0;
},containsValue:function(item,_41d,_41e){
var _41f=undefined;
if(typeof _41e==="string"){
_41f=dojo.data.util.filter.patternToRegExp(_41e,false);
}
return this._containsValue(item,_41d,_41e,_41f);
},_containsValue:function(item,_421,_422,_423){
return dojo.some(this.getValues(item,_421),function(_424){
if(_424!==null&&!dojo.isObject(_424)&&_423){
if(_424.toString().match(_423)){
return true;
}
}else{
if(_422===_424){
return true;
}
}
});
},isItem:function(_425){
if(_425&&_425[this._storeRefPropName]===this){
if(this._arrayOfAllItems[_425[this._itemNumPropName]]===_425){
return true;
}
}
return false;
},isItemLoaded:function(_426){
return this.isItem(_426);
},loadItem:function(_427){
this._assertIsItem(_427.item);
},getFeatures:function(){
return this._features;
},getLabel:function(item){
if(this._labelAttr&&this.isItem(item)){
return this.getValue(item,this._labelAttr);
}
return undefined;
},getLabelAttributes:function(item){
if(this._labelAttr){
return [this._labelAttr];
}
return null;
},_fetchItems:function(_42a,_42b,_42c){
var self=this;
var _42e=function(_42f,_430){
var _431=[];
if(_42f.query){
var _432=_42f.queryOptions?_42f.queryOptions.ignoreCase:false;
var _433={};
for(var key in _42f.query){
var _435=_42f.query[key];
if(typeof _435==="string"){
_433[key]=dojo.data.util.filter.patternToRegExp(_435,_432);
}
}
for(var i=0;i<_430.length;++i){
var _437=true;
var _438=_430[i];
if(_438===null){
_437=false;
}else{
for(var key in _42f.query){
var _435=_42f.query[key];
if(!self._containsValue(_438,key,_435,_433[key])){
_437=false;
}
}
}
if(_437){
_431.push(_438);
}
}
_42b(_431,_42f);
}else{
for(var i=0;i<_430.length;++i){
var item=_430[i];
if(item!==null){
_431.push(item);
}
}
_42b(_431,_42f);
}
};
if(this._loadFinished){
_42e(_42a,this._getItemsArray(_42a.queryOptions));
}else{
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_42a,filter:_42e});
}else{
this._loadInProgress=true;
var _43a={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache};
var _43b=dojo.xhrGet(_43a);
_43b.addCallback(function(data){
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
_42e(_42a,self._getItemsArray(_42a.queryOptions));
self._handleQueuedFetches();
}
catch(e){
self._loadFinished=true;
self._loadInProgress=false;
_42c(e,_42a);
}
});
_43b.addErrback(function(_43d){
self._loadInProgress=false;
_42c(_43d,_42a);
});
}
}else{
if(this._jsonData){
try{
this._loadFinished=true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData=null;
_42e(_42a,this._getItemsArray(_42a.queryOptions));
}
catch(e){
_42c(e,_42a);
}
}else{
_42c(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_42a);
}
}
}
},_handleQueuedFetches:function(){
if(this._queuedFetches.length>0){
for(var i=0;i<this._queuedFetches.length;i++){
var _43f=this._queuedFetches[i];
var _440=_43f.args;
var _441=_43f.filter;
if(_441){
_441(_440,this._getItemsArray(_440.queryOptions));
}else{
this.fetchItemByIdentity(_440);
}
}
this._queuedFetches=[];
}
},_getItemsArray:function(_442){
if(_442&&_442.deep){
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close:function(_443){
if(this.clearOnClose&&(this._jsonFileUrl!=="")){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._itemsByIdentity=null;
this._loadInProgress=false;
this._queuedFetches=[];
}
},_getItemsFromLoadedData:function(_444){
var _445=false;
function valueIsAnItem(_446){
var _447=((_446!=null)&&(typeof _446=="object")&&(!dojo.isArray(_446)||_445)&&(!dojo.isFunction(_446))&&(_446.constructor==Object||dojo.isArray(_446))&&(typeof _446._reference=="undefined")&&(typeof _446._type=="undefined")&&(typeof _446._value=="undefined"));
return _447;
};
var self=this;
function addItemAndSubItemsToArrayOfAllItems(_449){
self._arrayOfAllItems.push(_449);
for(var _44a in _449){
var _44b=_449[_44a];
if(_44b){
if(dojo.isArray(_44b)){
var _44c=_44b;
for(var k=0;k<_44c.length;++k){
var _44e=_44c[k];
if(valueIsAnItem(_44e)){
addItemAndSubItemsToArrayOfAllItems(_44e);
}
}
}else{
if(valueIsAnItem(_44b)){
addItemAndSubItemsToArrayOfAllItems(_44b);
}
}
}
}
};
this._labelAttr=_444.label;
var i;
var item;
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=_444.items;
for(i=0;i<this._arrayOfTopLevelItems.length;++i){
item=this._arrayOfTopLevelItems[i];
if(dojo.isArray(item)){
_445=true;
}
addItemAndSubItemsToArrayOfAllItems(item);
item[this._rootItemPropName]=true;
}
var _451={};
var key;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
for(key in item){
if(key!==this._rootItemPropName){
var _453=item[key];
if(_453!==null){
if(!dojo.isArray(_453)){
item[key]=[_453];
}
}else{
item[key]=[null];
}
}
_451[key]=key;
}
}
while(_451[this._storeRefPropName]){
this._storeRefPropName+="_";
}
while(_451[this._itemNumPropName]){
this._itemNumPropName+="_";
}
while(_451[this._reverseRefMap]){
this._reverseRefMap+="_";
}
var _454;
var _455=_444.identifier;
if(_455){
this._itemsByIdentity={};
this._features["dojo.data.api.Identity"]=_455;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
_454=item[_455];
var _456=_454[0];
if(!this._itemsByIdentity[_456]){
this._itemsByIdentity[_456]=item;
}else{
if(this._jsonFileUrl){
throw new Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_455+"].  Value collided: ["+_456+"]");
}else{
if(this._jsonData){
throw new Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_455+"].  Value collided: ["+_456+"]");
}
}
}
}
}else{
this._features["dojo.data.api.Identity"]=Number;
}
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
item[this._storeRefPropName]=this;
item[this._itemNumPropName]=i;
}
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
for(key in item){
_454=item[key];
for(var j=0;j<_454.length;++j){
_453=_454[j];
if(_453!==null&&typeof _453=="object"){
if(_453._type&&_453._value){
var type=_453._type;
var _459=this._datatypeMap[type];
if(!_459){
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");
}else{
if(dojo.isFunction(_459)){
_454[j]=new _459(_453._value);
}else{
if(dojo.isFunction(_459.deserialize)){
_454[j]=_459.deserialize(_453._value);
}else{
throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
}
}
}
}
if(_453._reference){
var _45a=_453._reference;
if(!dojo.isObject(_45a)){
_454[j]=this._itemsByIdentity[_45a];
}else{
for(var k=0;k<this._arrayOfAllItems.length;++k){
var _45c=this._arrayOfAllItems[k];
var _45d=true;
for(var _45e in _45a){
if(_45c[_45e]!=_45a[_45e]){
_45d=false;
}
}
if(_45d){
_454[j]=_45c;
}
}
}
if(this.referenceIntegrity){
var _45f=_454[j];
if(this.isItem(_45f)){
this._addReferenceToMap(_45f,item,key);
}
}
}else{
if(this.isItem(_453)){
if(this.referenceIntegrity){
this._addReferenceToMap(_453,item,key);
}
}
}
}
}
}
}
},_addReferenceToMap:function(_460,_461,_462){
},getIdentity:function(item){
var _464=this._features["dojo.data.api.Identity"];
if(_464===Number){
return item[this._itemNumPropName];
}else{
var _465=item[_464];
if(_465){
return _465[0];
}
}
return null;
},fetchItemByIdentity:function(_466){
if(!this._loadFinished){
var self=this;
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_466});
}else{
this._loadInProgress=true;
var _468={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache};
var _469=dojo.xhrGet(_468);
_469.addCallback(function(data){
var _46b=_466.scope?_466.scope:dojo.global;
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
var item=self._getItemByIdentity(_466.identity);
if(_466.onItem){
_466.onItem.call(_46b,item);
}
self._handleQueuedFetches();
}
catch(error){
self._loadInProgress=false;
if(_466.onError){
_466.onError.call(_46b,error);
}
}
});
_469.addErrback(function(_46d){
self._loadInProgress=false;
if(_466.onError){
var _46e=_466.scope?_466.scope:dojo.global;
_466.onError.call(_46e,_46d);
}
});
}
}else{
if(this._jsonData){
self._getItemsFromLoadedData(self._jsonData);
self._jsonData=null;
self._loadFinished=true;
var item=self._getItemByIdentity(_466.identity);
if(_466.onItem){
var _470=_466.scope?_466.scope:dojo.global;
_466.onItem.call(_470,item);
}
}
}
}else{
var item=this._getItemByIdentity(_466.identity);
if(_466.onItem){
var _470=_466.scope?_466.scope:dojo.global;
_466.onItem.call(_470,item);
}
}
},_getItemByIdentity:function(_471){
var item=null;
if(this._itemsByIdentity){
item=this._itemsByIdentity[_471];
}else{
item=this._arrayOfAllItems[_471];
}
if(item===undefined){
item=null;
}
return item;
},getIdentityAttributes:function(item){
var _474=this._features["dojo.data.api.Identity"];
if(_474===Number){
return null;
}else{
return [_474];
}
},_forceLoad:function(){
var self=this;
if(this._jsonFileUrl){
var _476={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,sync:true};
var _477=dojo.xhrGet(_476);
_477.addCallback(function(data){
try{
if(self._loadInProgress!==true&&!self._loadFinished){
self._getItemsFromLoadedData(data);
self._loadFinished=true;
}else{
if(self._loadInProgress){
throw new Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");
}
}
}
catch(e){
throw e;
}
});
_477.addErrback(function(_479){
throw _479;
});
}else{
if(this._jsonData){
self._getItemsFromLoadedData(self._jsonData);
self._jsonData=null;
self._loadFinished=true;
}
}
}});
dojo.extend(dojo.data.ItemFileReadStore,dojo.data.util.simpleFetch);
}
if(!dojo._hasResource["dojo.io.script"]){
dojo._hasResource["dojo.io.script"]=true;
dojo.provide("dojo.io.script");
dojo.io.script={get:function(args){
var dfd=this._makeScriptDeferred(args);
var _47c=dfd.ioArgs;
dojo._ioAddQueryToUrl(_47c);
if(this._canAttach(_47c)){
this.attach(_47c.id,_47c.url,args.frameDoc);
}
dojo._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);
return dfd;
},attach:function(id,url,_47f){
var doc=(_47f||dojo.doc);
var _481=doc.createElement("script");
_481.type="text/javascript";
_481.src=url;
_481.id=id;
_481.charset="utf-8";
doc.getElementsByTagName("head")[0].appendChild(_481);
},remove:function(id,_483){
dojo._destroyElement(dojo.byId(id,_483));
if(this["jsonp_"+id]){
delete this["jsonp_"+id];
}
},_makeScriptDeferred:function(args){
var dfd=dojo._ioSetArgs(args,this._deferredCancel,this._deferredOk,this._deferredError);
var _486=dfd.ioArgs;
_486.id=dojo._scopeName+"IoScript"+(this._counter++);
_486.canDelete=false;
if(args.callbackParamName){
_486.query=_486.query||"";
if(_486.query.length>0){
_486.query+="&";
}
_486.query+=args.callbackParamName+"="+(args.frameDoc?"parent.":"")+dojo._scopeName+".io.script.jsonp_"+_486.id+"._jsonpCallback";
_486.frameDoc=args.frameDoc;
_486.canDelete=true;
dfd._jsonpCallback=this._jsonpCallback;
this["jsonp_"+_486.id]=dfd;
}
return dfd;
},_deferredCancel:function(dfd){
dfd.canceled=true;
if(dfd.ioArgs.canDelete){
dojo.io.script._addDeadScript(dfd.ioArgs);
}
},_deferredOk:function(dfd){
if(dfd.ioArgs.canDelete){
dojo.io.script._addDeadScript(dfd.ioArgs);
}
if(dfd.ioArgs.json){
return dfd.ioArgs.json;
}else{
return dfd.ioArgs;
}
},_deferredError:function(_489,dfd){
if(dfd.ioArgs.canDelete){
if(_489.dojoType=="timeout"){
dojo.io.script.remove(dfd.ioArgs.id,dfd.ioArgs.frameDoc);
}else{
dojo.io.script._addDeadScript(dfd.ioArgs);
}
}
return _489;
},_deadScripts:[],_counter:1,_addDeadScript:function(_48b){
dojo.io.script._deadScripts.push({id:_48b.id,frameDoc:_48b.frameDoc});
_48b.frameDoc=null;
},_validCheck:function(dfd){
var _48d=dojo.io.script;
var _48e=_48d._deadScripts;
if(_48e&&_48e.length>0){
for(var i=0;i<_48e.length;i++){
_48d.remove(_48e[i].id,_48e[i].frameDoc);
_48e[i].frameDoc=null;
}
dojo.io.script._deadScripts=[];
}
return true;
},_ioCheck:function(dfd){
if(dfd.ioArgs.json){
return true;
}
var _491=dfd.ioArgs.args.checkString;
if(_491&&eval("typeof("+_491+") != '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(_493){
return true;
},_jsonpCallback:function(json){
this.ioArgs.json=json;
}};
}
if(!dojo._hasResource["dojox.rpc.Service"]){
dojo._hasResource["dojox.rpc.Service"]=true;
dojo.provide("dojox.rpc.Service");
dojo.declare("dojox.rpc.Service",null,{constructor:function(smd,_496){
var url;
var self=this;
function processSmd(smd){
smd._baseUrl=new dojo._Url(location.href,url||".")+"";
self._smd=smd;
for(var _49a in self._smd.services){
var _49b=_49a.split(".");
var _49c=self;
for(var i=0;i<_49b.length-1;i++){
_49c=_49c[_49b[i]]||(_49c[_49b[i]]={});
}
_49c[_49b[_49b.length-1]]=self._generateService(_49a,self._smd.services[_49a]);
}
};
if(smd){
if((dojo.isString(smd))||(smd instanceof dojo._Url)){
if(smd instanceof dojo._Url){
url=smd+"";
}else{
url=smd;
}
var text=dojo._getText(url);
if(!text){
throw new Error("Unable to load SMD from "+smd);
}else{
processSmd(dojo.fromJson(text));
}
}else{
processSmd(smd);
}
}
this._options=(_496?_496:{});
this._requestId=0;
},_generateService:function(_49f,_4a0){
if(this[_4a0]){
throw new Error("WARNING: "+_49f+" already exists for service. Unable to generate function");
}
_4a0.name=_49f;
var func=dojo.hitch(this,"_executeMethod",_4a0);
var _4a2=dojox.rpc.transportRegistry.match(_4a0.transport||this._smd.transport);
if(_4a2.getExecutor){
func=_4a2.getExecutor(func,_4a0,this);
}
var _4a3=_4a0.returns||(_4a0._schema={});
var _4a4="/"+_49f+"/";
_4a3._service=func;
func.servicePath=_4a4;
func._schema=_4a3;
func.id=dojox.rpc.Service._nextId++;
return func;
},_getRequest:function(_4a5,args){
var smd=this._smd;
var _4a8=dojox.rpc.envelopeRegistry.match(_4a5.envelope||smd.envelope||"NONE");
if(_4a8.namedParams){
if((args.length==1)&&dojo.isObject(args[0])){
args=args[0];
}else{
var data={};
for(var i=0;i<_4a5.parameters.length;i++){
if(typeof args[i]!="undefined"||!_4a5.parameters[i].optional){
data[_4a5.parameters[i].name]=args[i];
}
}
args=data;
}
var _4ab=(_4a5.parameters||[]).concat(smd.parameters||[]);
if(_4a5.strictParameters||smd.strictParameters){
for(i in args){
var _4ac=false;
for(j=0;j<_4ab.length;j++){
if(_4ab[i].name==i){
_4ac=true;
}
}
if(!_4ac){
delete args[i];
}
}
}
for(i=0;i<_4ab.length;i++){
var _4ad=_4ab[i];
if(!_4ad.optional&&_4ad.name&&!args[_4ad.name]){
if(_4ad["default"]){
args[_4ad.name]=_4ad["default"];
}else{
if(!(_4ad.name in args)){
throw new Error("Required parameter "+_4ad.name+" was omitted");
}
}
}
}
}else{
if(_4a5.parameters&&_4a5.parameters[0]&&_4a5.parameters[0].name&&(args.length==1)&&dojo.isObject(args[0])){
if(_4a8.namedParams===false){
args=dojox.rpc.toOrdered(_4a5,args);
}else{
args=args[0];
}
}
}
if(dojo.isObject(this._options)){
args=dojo.mixin(args,this._options);
}
var _4ae=_4a5._schema||_4a5.returns;
var _4af=_4a8.serialize.apply(this,[smd,_4a5,args]);
_4af._envDef=_4a8;
var _4b0=(_4a5.contentType||smd.contentType||_4af.contentType);
return dojo.mixin(_4af,{sync:dojox.rpc._sync,contentType:_4b0,headers:{},target:_4af.target||dojox.rpc.getTarget(smd,_4a5),transport:_4a5.transport||smd.transport||_4af.transport,envelope:_4a5.envelope||smd.envelope||_4af.envelope,timeout:_4a5.timeout||smd.timeout,callbackParamName:_4a5.callbackParamName||smd.callbackParamName,schema:_4ae,handleAs:_4af.handleAs||"auto",preventCache:_4a5.preventCache||smd.preventCache,frameDoc:this._options.frameDoc||undefined});
},_executeMethod:function(_4b1){
var args=[];
var i;
for(i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
var _4b4=this._getRequest(_4b1,args);
var _4b5=dojox.rpc.transportRegistry.match(_4b4.transport).fire(_4b4);
_4b5.addBoth(function(_4b6){
return _4b4._envDef.deserialize.call(this,_4b6);
});
return _4b5;
}});
dojox.rpc.getTarget=function(smd,_4b8){
var dest=smd._baseUrl;
if(smd.target){
dest=new dojo._Url(dest,smd.target)+"";
}
if(_4b8.target){
dest=new dojo._Url(dest,_4b8.target)+"";
}
return dest;
};
dojox.rpc.toOrdered=function(_4ba,args){
if(dojo.isArray(args)){
return args;
}
var data=[];
for(var i=0;i<_4ba.parameters.length;i++){
data.push(args[_4ba.parameters[i].name]);
}
return data;
};
dojox.rpc.transportRegistry=new dojo.AdapterRegistry(true);
dojox.rpc.envelopeRegistry=new dojo.AdapterRegistry(true);
dojox.rpc.envelopeRegistry.register("URL",function(str){
return str=="URL";
},{serialize:function(smd,_4c0,data){
var d=dojo.objectToQuery(data);
return {data:d,transport:"POST"};
},deserialize:function(_4c3){
return _4c3;
},namedParams:true});
dojox.rpc.envelopeRegistry.register("JSON",function(str){
return str=="JSON";
},{serialize:function(smd,_4c6,data){
var d=dojo.toJson(data);
return {data:d,handleAs:"json",contentType:"application/json"};
},deserialize:function(_4c9){
return _4c9;
}});
dojox.rpc.envelopeRegistry.register("PATH",function(str){
return str=="PATH";
},{serialize:function(smd,_4cc,data){
var i;
var _4cf=dojox.rpc.getTarget(smd,_4cc);
if(dojo.isArray(data)){
for(i=0;i<data.length;i++){
_4cf+="/"+data[i];
}
}else{
for(i in data){
_4cf+="/"+i+"/"+data[i];
}
}
return {data:"",target:_4cf};
},deserialize:function(_4d0){
return _4d0;
}});
dojox.rpc.transportRegistry.register("POST",function(str){
return str=="POST";
},{fire:function(r){
r.url=r.target;
r.postData=r.data;
return dojo.rawXhrPost(r);
}});
dojox.rpc.transportRegistry.register("GET",function(str){
return str=="GET";
},{fire:function(r){
r.url=r.target+(r.data?"?"+r.data:"");
return dojo.xhrGet(r);
}});
dojox.rpc.transportRegistry.register("JSONP",function(str){
return str=="JSONP";
},{fire:function(r){
r.url=r.target+((r.target.indexOf("?")==-1)?"?":"&")+r.data;
r.callbackParamName=r.callbackParamName||"callback";
return dojo.io.script.get(r);
}});
dojox.rpc.Service._nextId=1;
dojo._contentHandlers.auto=function(xhr){
var _4d8=dojo._contentHandlers;
var _4d9=xhr.getResponseHeader("Content-Type");
results=!_4d9?_4d8.text(xhr):_4d9.match(/\/.*json/)?_4d8.json(xhr):_4d9.match(/\/javascript/)?_4d8.javascript(xhr):_4d9.match(/\/xml/)?_4d8.xml(xhr):_4d8.text(xhr);
return results;
};
}
if(!dojo._hasResource["dojox.data.ServiceStore"]){
dojo._hasResource["dojox.data.ServiceStore"]=true;
dojo.provide("dojox.data.ServiceStore");
dojo.declare("dojox.data.ServiceStore",dojox.data.ClientFilter,{constructor:function(_4da){
this.byId=this.fetchItemByIdentity;
this._index={};
if(_4da){
dojo.mixin(this,_4da);
}
this.idAttribute=(_4da&&_4da.idAttribute)||(this.schema&&this.schema._idAttr);
this.labelAttribute=this.labelAttribute||"label";
},schema:null,idAttribute:"id",syncMode:false,getSchema:function(){
return this.schema;
},loadLazyValues:true,getValue:function(item,_4dc,_4dd){
var _4de=item[_4dc];
return _4de||(_4dc in item?_4de:item._loadObject?(dojox.rpc._sync=true)&&arguments.callee.call(this,dojox.data.ServiceStore.prototype.loadItem({item:item})||{},_4dc,_4dd):_4dd);
},getValues:function(item,_4e0){
var val=this.getValue(item,_4e0);
return val instanceof Array?val:val===undefined?[]:[val];
},getAttributes:function(item){
var res=[];
for(var i in item){
res.push(i);
}
return res;
},hasAttribute:function(item,_4e6){
return _4e6 in item;
},containsValue:function(item,_4e8,_4e9){
return dojo.indexOf(this.getValues(item,_4e8),_4e9)>-1;
},isItem:function(item){
return typeof item=="object";
},isItemLoaded:function(item){
return item&&!item._loadObject;
},loadItem:function(args){
var item;
if(args.item._loadObject){
args.item._loadObject(function(_4ee){
item=_4ee;
delete item._loadObject;
var func=_4ee instanceof Error?args.onError:args.onItem;
if(func){
func.call(args.scope,_4ee);
}
});
}
return item;
},_currentId:0,_processResults:function(_4f0,_4f1){
if(_4f0&&typeof _4f0=="object"){
var id=_4f0.__id;
if(!id){
if(this.idAttribute){
id=_4f0[this.idAttribute];
}else{
id=this._currentId++;
}
if(id!==undefined){
var _4f3=this._index[id];
if(_4f3){
for(var j in _4f3){
delete _4f3[j];
}
_4f0=dojo.mixin(_4f3,_4f0);
}
_4f0.__id=id;
this._index[id]=_4f0;
}
}
for(var i in _4f0){
_4f0[i]=this._processResults(_4f0[i],_4f1).items;
}
}
var _4f6=_4f0.length;
return {totalCount:_4f1.request.count==_4f6?_4f6*2:_4f6,items:_4f0};
},close:function(_4f7){
return _4f7&&_4f7.abort&&_4f7.abort();
},fetch:function(args){
args=args||{};
if("syncMode" in args?args.syncMode:this.syncMode){
dojox.rpc._sync=true;
}
var self=this;
var _4fa=args.scope||self;
var _4fb=this.cachingFetch?this.cachingFetch(args):this._doQuery(args);
_4fb.request=args;
_4fb.addCallback(function(_4fc){
if(args.clientQuery){
_4fc=self.clientSideFetch({query:args.clientFetch,sort:args.sort,start:args.start,count:args.count},_4fc);
}
var _4fd=self._processResults(_4fc,_4fb);
_4fc=args.results=_4fd.items;
if(args.onBegin){
args.onBegin.call(_4fa,_4fd.totalCount,args);
}
if(args.onItem){
for(var i=0;i<_4fc.length;i++){
args.onItem.call(_4fa,_4fc[i],args);
}
}
if(args.onComplete){
args.onComplete.call(_4fa,args.onItem?null:_4fc,args);
}
return _4fc;
});
_4fb.addErrback(args.onError&&dojo.hitch(_4fa,args.onError));
args.abort=function(){
_4fb.ioArgs.xhr.abort();
};
args.store=this;
return args;
},_doQuery:function(args){
var _500=typeof args.queryStr=="string"?args.queryStr:args.query;
return this.service(_500);
},getFeatures:function(){
return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true,"dojo.data.api.Schema":this.schema};
},getLabel:function(item){
return this.getValue(item,this.labelAttribute);
},getLabelAttributes:function(item){
return [this.labelAttribute];
},getIdentity:function(item){
if(!("__id" in item)){
throw new Error("Identity attribute not found");
}
return item.__id;
},getIdentityAttributes:function(item){
return [this.idAttribute];
},fetchItemByIdentity:function(args){
var item=this._index[(args._prefix||"")+args.identity];
if(item&&args.onItem){
args.onItem.call(args.scope,item);
}else{
return this.fetch({query:args.identity,onComplete:args.onItem,onError:args.onError,scope:args.scope}).results;
}
return item;
}});
}
if(!dojo._hasResource["dojox.fx._base"]){
dojo._hasResource["dojox.fx._base"]=true;
dojo.provide("dojox.fx._base");
dojo.mixin(dojox.fx,{anim:dojo.anim,animateProperty:dojo.animateProperty,fadeTo:dojo._fade,fadeIn:dojo.fadeIn,fadeOut:dojo.fadeOut,combine:dojo.fx.combine,chain:dojo.fx.chain,slideTo:dojo.fx.slideTo,wipeIn:dojo.fx.wipeIn,wipeOut:dojo.fx.wipeOut});
dojox.fx.sizeTo=function(args){
var node=args.node=dojo.byId(args.node);
var _509=args.method||"chain";
if(!args.duration){
args.duration=500;
}
if(_509=="chain"){
args.duration=Math.floor(args.duration/2);
}
var top,_50b,left,_50d,_50e,_50f=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
_50e=parseInt(cs.width);
_50f=parseInt(cs.height);
_50d=left-Math.floor((args.width-_50e)/2);
_50b=top-Math.floor((args.height-_50f)/2);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var _515=dojo.animateProperty(dojo.mixin({properties:{height:{start:_50f,end:args.height||0,unit:"px"},top:{start:top,end:_50b}}},args));
var _516=dojo.animateProperty(dojo.mixin({properties:{width:{start:_50e,end:args.width||0,unit:"px"},left:{start:left,end:_50d}}},args));
var anim=dojo.fx[(args.method=="combine"?"combine":"chain")]([_515,_516]);
dojo.connect(anim,"beforeBegin",anim,init);
return anim;
};
dojox.fx.slideBy=function(args){
var node=args.node=dojo.byId(args.node);
var top=null;
var left=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var _521=dojo.animateProperty(dojo.mixin({properties:{top:top+(args.top||0),left:left+(args.left||0)}},args));
dojo.connect(_521,"beforeBegin",_521,init);
return _521;
};
dojox.fx.crossFade=function(args){
if(dojo.isArray(args.nodes)){
var _523=args.nodes[0]=dojo.byId(args.nodes[0]);
var op1=dojo.style(_523,"opacity");
var _525=args.nodes[1]=dojo.byId(args.nodes[1]);
var op2=dojo.style(_525,"opacity");
var _527=dojo.fx.combine([dojo[(op1==0?"fadeIn":"fadeOut")](dojo.mixin({node:_523},args)),dojo[(op1==0?"fadeOut":"fadeIn")](dojo.mixin({node:_525},args))]);
return _527;
}else{
return false;
}
};
dojox.fx.highlight=function(args){
var node=args.node=dojo.byId(args.node);
args.duration=args.duration||400;
var _52a=args.color||"#ffff99";
var _52b=dojo.style(node,"backgroundColor");
var _52c=(_52b=="transparent"||_52b=="rgba(0, 0, 0, 0)")?_52b:false;
var anim=dojo.animateProperty(dojo.mixin({properties:{backgroundColor:{start:_52a,end:_52b}}},args));
if(_52c){
dojo.connect(anim,"onEnd",anim,function(){
node.style.backgroundColor=_52c;
});
}
return anim;
};
dojox.fx.wipeTo=function(args){
args.node=dojo.byId(args.node);
var node=args.node,s=node.style;
var dir=(args.width?"width":"height");
var _532=args[dir];
var _533={};
_533[dir]={start:function(){
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s[dir]="1px";
s.display="";
s.visibility="";
return 1;
}else{
var now=dojo.style(node,dir);
return Math.max(now,1);
}
},end:_532,unit:"px"};
var anim=dojo.animateProperty(dojo.mixin({properties:_533},args));
return anim;
};
}
if(!dojo._hasResource["dojox.fx"]){
dojo._hasResource["dojox.fx"]=true;
dojo.provide("dojox.fx");
}
if(!dojo._hasResource["tweetizen.ui.InputHelper"]){
dojo._hasResource["tweetizen.ui.InputHelper"]=true;
dojo.provide("tweetizen.ui.InputHelper");
tweetizen.ui.InputHelper.clickToClear=function(_536){
var _537=dojo.attr(_536,"clearValue");
if(_537){
if(_536.value==""){
_536.value=_537;
}
dojo.connect(_536,"onfocus",this,function(){
if(_536.value==_537){
_536.value="";
}
});
dojo.connect(_536,"onblur",this,function(){
if(_536.value==""){
_536.value=_537;
}
});
dojo.attr(_536,"hasClickToClear",true);
}
};
}
if(!dojo._hasResource["tweetizen.data.Locations"]){
dojo._hasResource["tweetizen.data.Locations"]=true;
dojo.provide("tweetizen.data.Locations");
tweetizen.data.Locations=(function(){
var _538="http://www.tweetizen.com/";
var _539={"USER_LOGIN":"user.login","USER_LOGOUT":"user.logout","USER_GROUPS":"user.groups","USER_TWEET":"user.tweet","USER_GENERAL":"user.general","USER_FRIENDSHIP":"user.friendship","TWEET_COUNT":"tweet.count","DIRECT_MESSAGE":"user.dm","OAUTH_WINDOW":"oauth.window","OAUTH_CALLBACK":"user.dm"};
return {getLocation:function(_53a,_53b){
return (_53b==true?_538:"")+_539[_53a];
}};
})();
}
if(!dojo._hasResource["tweetizen.ui.LoginDialog"]){
dojo._hasResource["tweetizen.ui.LoginDialog"]=true;
dojo.provide("tweetizen.ui.LoginDialog");
dojo.declare("tweetizen.ui.LoginDialog",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"login_dialog_container\">\r\n\t\r\n\t<div class=\"login_dialog\">\r\n\t\t<div class=\"login_content\">\r\n\t\t\t<h1>Login to Twitter</h1>\r\n\t\t\t<input type=\"text\" class=\"username text\" dojoAttachPoint=\"_usernameElement\" clearValue=\"Twitter username\" />\r\n\t\t\t<input type=\"password\" class=\"password text\" dojoAttachPoint=\"_passwordElement\" dojoAttachEvent=\"onkeyup: _passwordElement_OnKeyUp\" clearValue=\"Twitter password\" />\r\n\t\t\t<div class=\"controls_container\">\r\n\t\t\t\t<button class=\"login_button\" dojoAttachPoint=\"_loginButtonElement\" dojoAttachEvent=\"click: _onLoginButtonClick\">Login</button>\r\n\t\t\t\t<button class=\"cancel_button\" dojoAttachPoint=\"_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t\r\n\t\t\t\t<!-- \r\n\t\t\t\t<div class=\"remember_me\">\r\n\t\t\t\t\t<input id=\"${id}_chk\" type=\"checkbox\" dojoAttachPoint=\"_rememberMeElement\" dojoAttachEvent=\"onchange: _onRememberMeChange\"/>\r\n\t\t\t\t\t<label for=\"${id}_chk\">Remember</label>\r\n\t\t\t\t</div>\r\n\t\t\t-->\r\n\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\n</div>\r\n",onAfterLogin_Publish:null,isLoggedIn:null,_dialogTitle:"Login...",_dialog:null,_dialogId:null,_usernameElement:null,_passwordElement:null,_rememberMeElement:null,_loginButtonElement:null,_cancelButtonElement:null,postCreate:function(){
tweetizen.ui.InputHelper.clickToClear(this._usernameElement);
tweetizen.ui.InputHelper.clickToClear(this._passwordElement);
this._dialogId=this.id+"_Dialog";
this._dialog=new dijit.Dialog({id:this._dialogId,showTitle:false,titleBar:false,autofocus:false,draggable:false},this.domNode);
},show:function(){
this._dialog.show();
},login:function(){
this._enableLoginControls(false);
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_LOGIN"),content:{username:this._usernameElement.value,password:this._passwordElement.value},handleAs:"json",load:dojo.hitch(this,"_onLogin_Success"),error:dojo.hitch(this,"_onLogin_Error")});
},_onLogin_Success:function(_53c,io){
this._enableLoginControls(true);
tweetizen.logged_in_user=_53c;
this._dialog.hide();
if(this.onAfterLogin_Publish!=null){
dojo.publish(this.onAfterLogin_Publish);
}
dojo.publish("Tweetizen/OnLogin",[_53c]);
},_onLogin_Error:function(data,io){
var _540="";
if(io.xhr.status==401){
_540="Username or Password incorrect";
}else{
if(io.xhr.status==503){
_540="Sorry! Twitter seems to be having some problems, please try signing in again...";
}else{
var _541=dojo.fromJson(data.responseText);
_540="Eeep, We are sorry but there has been an Error!\n- "+_541.error;
}
}
this._enableLoginControls(true);
alert(_540);
},_enableLoginControls:function(_542){
var _543=(_542?"addClass":"removeClass");
dojo[_543](this.domNode,"disabled_controls");
dojo.attr(this._loginButtonElement,"disabled",!_542);
dojo.attr(this._usernameElement,"disabled",!_542);
dojo.attr(this._passwordElement,"disabled",!_542);
dojo.attr(this._cancelButtonElement,"disabled",!_542);
},_passwordElement_OnKeyUp:function(e){
if(e.keyCode==13&&this._validateLoginDetails()){
this.login();
}
},_onLoginButtonClick:function(e){
if(this._validateLoginDetails()){
this.login();
}
},_onCancelButtonClick:function(e){
this._dialog.hide();
},_onRememberMeChange:function(e){
},_validateLoginDetails:function(){
this._usernameElement.focus();
if(this._usernameElement.value==""){
alert("Please enter a Username");
return false;
}
this._passwordElement.focus();
if(this._passwordElement.value==""){
alert("Please enter a Password");
return false;
}
return true;
}});
}
if(!dojo._hasResource["tweetizen.ui.OAuthWindow"]){
dojo._hasResource["tweetizen.ui.OAuthWindow"]=true;
dojo.provide("tweetizen.ui.OAuthWindow");
dojo.declare("tweetizen.ui.OAuthWindow",[],{onAfterLogin_Publish:null,_windowWidth:820,_windowHeight:450,_window:null,constructor:function(_548){
dojo.mixin(this,_548);
},show:function(){
var url=tweetizen.data.Locations.getLocation("OAUTH_WINDOW");
url+="?host="+window.location.host;
var _54a=(window.screen.width-this._windowWidth)/2;
var _54b=(window.screen.height-this._windowHeight)/2;
this._window=window.open(url,"oauth_window","status=0, menubar=0"+",width="+this._windowWidth+",height="+this._windowHeight+",left="+_54a+",top="+_54b);
this._window.focus();
tweetizen._oauth_success=dojo.hitch(this,"_oauthWindow_Callback");
},_oauthWindow_Callback:function(){
delete tweetizen._oauth_success;
this._getUserDetails();
},_getUserDetails:function(){
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_GENERAL"),content:{action:"INITIALIZE_OAUTH"},handleAs:"json",load:dojo.hitch(this,"_getUserDetails_Success"),error:dojo.hitch(this,"_getUserDetails_Error")});
},_getUserDetails_Success:function(_54c,io){
tweetizen.logged_in_user=_54c;
if(this.onAfterLogin_Publish!=null){
dojo.publish(this.onAfterLogin_Publish);
}
dojo.publish("Tweetizen/OnLogin",[_54c]);
},_getUserDetails_Error:function(data,io){
if(io.xhr.status!=401){
alert("Oops, an error has occured!");
}
}});
}
if(!dojo._hasResource["tweetizen.ui.LoginPanel"]){
dojo._hasResource["tweetizen.ui.LoginPanel"]=true;
dojo.provide("tweetizen.ui.LoginPanel");
dojo.declare("tweetizen.ui.LoginPanel",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"login_panel\" style=\"display: none\">\r\n\t<div class=\"login_wrapper\">\r\n\t\r\n\t\t<!-- login -->\r\n\t\t<div class=\"login\" dojoAttachPoint=\"_loginContainerElement\" style=\"display: block\">\r\n\t\t\t\r\n\t\t<span dojoAttachPoint=\"_notLoggedInHeading\" style=\"display: inline\">\r\n\t  \t<h2>Start Here</h2>\r\n\t\t\t<p>Tweetizen is a simple web-based tool designed to help you filter the daily influx of tweets, and easily find the ones that are relevant to you.</p>\r\n\t\t\t<p>Get started in 3 easy steps:</p>\r\n\t\t\t<ul>\r\n\t\t\t\t<li class=\"step_one\">Login to your twitter account</li>\r\n\t\t\t\t<li class=\"step_two\">Create a group</li>\r\n\t\t\t\t<li class=\"step_three\">Share and enjoy!</li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<div id=\"login_btn\">\r\n\t\t\t\t<button class=\"login_button\" dojoAttachPoint=\"_loginButtonElement\" dojoAttachEvent=\"click: _onLoginButtonClick\"></button>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"get_twitter_account\">\r\n\t\t\t\tNew to Twitter? <a href=\"http://www.twitter.com/signup\" target=\"_new\">Sign up here</a>\r\n\t\t\t</div>\t\r\n\t\t\t\r\n  \t</span>\r\n\t\t\t\r\n\t\t</div>\r\n\r\n\t</div>\r\n</div>\r\n",_loginContainerElement:null,_loginButtonElement:null,postCreate:function(){
dojo.subscribe("Tweetizen/OnLogin",this,"hideLogin");
dojo.subscribe("LogoutPanel/OnLogout",this,"displayLogin");
if(!this.isLoggedIn()){
this.displayLogin();
}
},isLoggedIn:function(){
return tweetizen.logged_in_user!=null;
},displayLogin:function(){
this.domNode.style.display="block";
this.domNode.parentNode.style.display="block";
},hideLogin:function(){
this.domNode.style.display="none";
this.domNode.parentNode.style.display="none";
},displayLoginDialog:function(){
var _550=new tweetizen.auth_widget();
_550.show();
},_onLoginButtonClick:function(e){
this.displayLoginDialog();
}});
}
if(!dojo._hasResource["tweetizen.ui.LogoutPanel"]){
dojo._hasResource["tweetizen.ui.LogoutPanel"]=true;
dojo.provide("tweetizen.ui.LogoutPanel");
dojo.declare("tweetizen.ui.LogoutPanel",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"logout_panel\" style=\"display: none\">\r\n\t<button id=\"logout_button\" class=\"logout_button\" dojoAttachPoint=\"_logoutButtonElement\" dojoAttachEvent=\"click: _onLogoutButtonClick\">\r\n\t</button>\r\n</div>\r\n",_logoutButtonElement:null,postCreate:function(){
dojo.subscribe("LoginPanel/logout",this,"logout");
dojo.subscribe("Tweetizen/OnLogin",this,"displayLogout");
if(this.isLoggedIn()){
this.displayLogout();
}
},isLoggedIn:function(){
return tweetizen.logged_in_user!=null;
},_attachLogoutButtonConnection:function(){
this._logoutButton=dojo.byId(this.LOGOUT_BUTTON_ID);
dojo.connect(this._logoutButton,"click",this,"logout");
},displayLogout:function(){
this.domNode.style.display="block";
this.domNode.parentNode.style.display="block";
},hideLogout:function(){
this.domNode.style.display="none";
this.domNode.parentNode.style.display="none";
},_enableLogoutControls:function(_552){
var _553=(_552?"addClass":"removeClass");
dojo[_553](this.domNode,"disabled_controls");
dojo.attr(this._logoutButtonElement,"disabled",!_552);
},logout:function(){
this._enableLogoutControls(false);
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_LOGOUT"),content:{logout:true},load:dojo.hitch(this,"_onLogout_Success"),error:dojo.hitch(this,"_onLogout_Error")});
},_onLogout_Success:function(_554,io){
tweetizen.logged_in_user=null;
window.auto_load=null;
this.hideLogout();
dojo.publish("LogoutPanel/OnLogout");
this._enableLogoutControls(true);
},_onLogout_Error:function(data,io){
console.error("A logout error has occured: ",data);
this._enableLogoutControls(true);
},_onLogoutButtonClick:function(e){
this.logout();
}});
}
if(!dojo._hasResource["tweetizen.ui.GroupHelper"]){
dojo._hasResource["tweetizen.ui.GroupHelper"]=true;
dojo.provide("tweetizen.ui.GroupHelper");
tweetizen.ui.GroupHelper.buildQuery=function(_559,_55a,tags,_55c,_55d,_55e,_55f){
var _560="";
if(_559!=null&&_559!=""){
_560+=_559;
if(tags.length>0){
_560+=(_55c=="OR"?" OR ":" ");
}
}
if(tags!=null){
dojo.forEach(tags,function(tag,_562){
_560+=(_562>0?" "+_55c+" ":"");
_560+="#"+tag;
},this);
}
if(_55d==true){
_560+=" -RT ";
}
if(_55e==true){
_560+=" filter:links ";
}
if(_55a!=null){
dojo.forEach(_55a,function(user,_564){
_560+=(_564>0?" OR ":"");
_560+="from:"+user;
},this);
}
return dojo.trim(_560);
};
tweetizen.ui.GroupHelper.queryFromJson=function(data){
var _566=tweetizen.ui.GroupHelper.buildQuery(data.search,data.users,data.tags,data.tag_operator,data.ignore_retweets,data.only_hyperlinks,data.language);
return dojo.trim(_566);
};
}
if(!dojo._hasResource["dojox.data.QueryReadStore"]){
dojo._hasResource["dojox.data.QueryReadStore"]=true;
dojo.provide("dojox.data.QueryReadStore");
dojo.declare("dojox.data.QueryReadStore",null,{url:"",requestMethod:"get",_className:"dojox.data.QueryReadStore",_items:[],_lastServerQuery:null,_numRows:-1,lastRequestHash:null,doClientPaging:false,doClientSorting:false,_itemsByIdentity:null,_identifier:null,_features:{"dojo.data.api.Read":true,"dojo.data.api.Identity":true},_labelAttr:"label",constructor:function(_567){
dojo.mixin(this,_567);
},getValue:function(item,_569,_56a){
this._assertIsItem(item);
if(!dojo.isString(_569)){
throw new Error(this._className+".getValue(): Invalid attribute, string expected!");
}
if(!this.hasAttribute(item,_569)){
if(_56a){
return _56a;
}
}
return item.i[_569];
},getValues:function(item,_56c){
this._assertIsItem(item);
var ret=[];
if(this.hasAttribute(item,_56c)){
ret.push(item.i[_56c]);
}
return ret;
},getAttributes:function(item){
this._assertIsItem(item);
var ret=[];
for(var i in item.i){
ret.push(i);
}
return ret;
},hasAttribute:function(item,_572){
return this.isItem(item)&&typeof item.i[_572]!="undefined";
},containsValue:function(item,_574,_575){
var _576=this.getValues(item,_574);
var len=_576.length;
for(var i=0;i<len;i++){
if(_576[i]==_575){
return true;
}
}
return false;
},isItem:function(_579){
if(_579){
return typeof _579.r!="undefined"&&_579.r==this;
}
return false;
},isItemLoaded:function(_57a){
return this.isItem(_57a);
},loadItem:function(args){
if(this.isItemLoaded(args.item)){
return;
}
},fetch:function(_57c){
_57c=_57c||{};
if(!_57c.store){
_57c.store=this;
}
var self=this;
var _57e=function(_57f,_580){
if(_580.onError){
var _581=_580.scope||dojo.global;
_580.onError.call(_581,_57f,_580);
}
};
var _582=function(_583,_584,_585){
var _586=_584.abort||null;
var _587=false;
var _588=_584.start?_584.start:0;
if(self.doClientPaging==false){
_588=0;
}
var _589=_584.count?(_588+_584.count):_583.length;
_584.abort=function(){
_587=true;
if(_586){
_586.call(_584);
}
};
var _58a=_584.scope||dojo.global;
if(!_584.store){
_584.store=self;
}
if(_584.onBegin){
_584.onBegin.call(_58a,_585,_584);
}
if(_584.sort&&self.doClientSorting){
_583.sort(dojo.data.util.sorter.createSortFunction(_584.sort,self));
}
if(_584.onItem){
for(var i=_588;(i<_583.length)&&(i<_589);++i){
var item=_583[i];
if(!_587){
_584.onItem.call(_58a,item,_584);
}
}
}
if(_584.onComplete&&!_587){
var _58d=null;
if(!_584.onItem){
_58d=_583.slice(_588,_589);
}
_584.onComplete.call(_58a,_58d,_584);
}
};
this._fetchItems(_57c,_582,_57e);
return _57c;
},getFeatures:function(){
return this._features;
},close:function(_58e){
},getLabel:function(item){
if(this._labelAttr&&this.isItem(item)){
return this.getValue(item,this._labelAttr);
}
return undefined;
},getLabelAttributes:function(item){
if(this._labelAttr){
return [this._labelAttr];
}
return null;
},_xhrFetchHandler:function(data,_592,_593,_594){
data=this._filterResponse(data);
if(data.label){
this._labelAttr=data.label;
}
var _595=data.numRows||-1;
this._items=[];
dojo.forEach(data.items,function(e){
this._items.push({i:e,r:this});
},this);
var _597=data.identifier;
this._itemsByIdentity={};
if(_597){
this._identifier=_597;
var i;
for(i=0;i<this._items.length;++i){
var item=this._items[i].i;
var _59a=item[_597];
if(!this._itemsByIdentity[_59a]){
this._itemsByIdentity[_59a]=item;
}else{
throw new Error(this._className+":  The json data as specified by: ["+this.url+"] is malformed.  Items within the list have identifier: ["+_597+"].  Value collided: ["+_59a+"]");
}
}
}else{
this._identifier=Number;
for(i=0;i<this._items.length;++i){
this._items[i].n=i;
}
}
_595=this._numRows=(_595===-1)?this._items.length:_595;
_593(this._items,_592,_595);
this._numRows=_595;
},_fetchItems:function(_59b,_59c,_59d){
var _59e=_59b.serverQuery||_59b.query||{};
if(!this.doClientPaging){
_59e.start=_59b.start||0;
if(_59b.count){
_59e.count=_59b.count;
}
}
if(!this.doClientSorting){
if(_59b.sort){
var sort=_59b.sort[0];
if(sort&&sort.attribute){
var _5a0=sort.attribute;
if(sort.descending){
_5a0="-"+_5a0;
}
_59e.sort=_5a0;
}
}
}
if(this.doClientPaging&&this._lastServerQuery!==null&&dojo.toJson(_59e)==dojo.toJson(this._lastServerQuery)){
this._numRows=(this._numRows===-1)?this._items.length:this._numRows;
_59c(this._items,_59b,this._numRows);
}else{
var _5a1=this.requestMethod.toLowerCase()=="post"?dojo.xhrPost:dojo.xhrGet;
var _5a2=_5a1({url:this.url,handleAs:"json-comment-optional",content:_59e});
_5a2.addCallback(dojo.hitch(this,function(data){
this._xhrFetchHandler(data,_59b,_59c,_59d);
}));
_5a2.addErrback(function(_5a4){
_59d(_5a4,_59b);
});
this.lastRequestHash=new Date().getTime()+"-"+String(Math.random()).substring(2);
this._lastServerQuery=dojo.mixin({},_59e);
}
},_filterResponse:function(data){
return data;
},_assertIsItem:function(item){
if(!this.isItem(item)){
throw new Error(this._className+": Invalid item argument.");
}
},_assertIsAttribute:function(_5a7){
if(typeof _5a7!=="string"){
throw new Error(this._className+": Invalid attribute argument ('"+_5a7+"').");
}
},fetchItemByIdentity:function(_5a8){
if(this._itemsByIdentity){
var item=this._itemsByIdentity[_5a8.identity];
if(!(item===undefined)){
if(_5a8.onItem){
var _5aa=_5a8.scope?_5a8.scope:dojo.global;
_5a8.onItem.call(_5aa,{i:item,r:this});
}
return;
}
}
var _5ab=function(_5ac,_5ad){
var _5ae=_5a8.scope?_5a8.scope:dojo.global;
if(_5a8.onError){
_5a8.onError.call(_5ae,_5ac);
}
};
var _5af=function(_5b0,_5b1){
var _5b2=_5a8.scope?_5a8.scope:dojo.global;
try{
var item=null;
if(_5b0&&_5b0.length==1){
item=_5b0[0];
}
if(_5a8.onItem){
_5a8.onItem.call(_5b2,item);
}
}
catch(error){
if(_5a8.onError){
_5a8.onError.call(_5b2,error);
}
}
};
var _5b4={serverQuery:{id:_5a8.identity}};
this._fetchItems(_5b4,_5af,_5ab);
},getIdentity:function(item){
var _5b6=null;
if(this._identifier===Number){
_5b6=item.n;
}else{
_5b6=item.i[this._identifier];
}
return _5b6;
},getIdentityAttributes:function(item){
return [this._identifier];
}});
}
if(!dojo._hasResource["tweetizen.ui.GroupList"]){
dojo._hasResource["tweetizen.ui.GroupList"]=true;
dojo.provide("tweetizen.ui.GroupList");
dojo.declare("tweetizen.ui.GroupList",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"group_list group_list_loading\">\r\n\t<div dojoAttachPoint=\"_itemsContainer\"></div>\r\n\t\r\n\t<!-- group_list_item template element -->\t\r\n\t<div class=\"group_list_item\" dojoAttachPoint=\"_groupListItem_TemplateElement\" style=\"display:none\">\r\n\t\t<div class=\"group_name\"></div>\r\n\t\t<!-- edit_group element, this is removed in public view -->\r\n\t\t<div class=\"delete_group\" title=\"Delete this group\"></div>\r\n\t\t<div class=\"edit_group\" title=\"Edit this group\"></div>\r\n\t\t<br style=\"clear: both\" />\r\n\t</div>\r\n<div>\r\n",data_url:null,data:null,editable:false,store:null,_storeRequest:null,_isLoading:null,_itemsContainer:null,_groupListItem_TemplateElement:null,postCreate:function(){
dojo.subscribe("GroupList/RemoveSelectedItems",dojo.hitch(this,"_removeSelectedItems"));
if(this.data!=null){
this._initializeDataObject();
}else{
if(this.data_url!=null){
this._initializeDataStore();
}
}
},_initializeDataObject:function(){
setTimeout(dojo.hitch(this,function(){
this.store=new dojox.data.QueryReadStore({});
this.store._xhrFetchHandler(this.data,{},dojo.hitch(this,"_dataStore_OnComplete"));
}),10);
},_initializeDataStore:function(){
this.store=new dojox.data.QueryReadStore({url:this.data_url,requestMethod:"post",useCache:false});
this._storeRequest={};
this._storeRequest.onBegin=dojo.hitch(this,"_dataStore_OnBegin");
this._storeRequest.onComplete=dojo.hitch(this,"_dataStore_OnComplete");
this._storeRequest.onError=dojo.hitch(this,"_dataStore_OnError");
this.refreshData();
},refreshData:function(){
this.store.fetch(this._storeRequest);
},_setLoading:function(_5b8){
this._isLoading=_5b8;
var _5b9=(_5b8?"addClass":"removeClass");
dojo[_5b9](this.domNode,"group_list_loading");
},_createGroupItem:function(_5ba){
var _5bb=dojo.clone(this._groupListItem_TemplateElement);
_5bb.removeAttribute("dojoAttachPoint");
_5bb.style.display="block";
_5bb.id="group_"+this.store.getValue(_5ba,"id");
var _5bc=dojo.query(".group_name",_5bb)[0];
var name=this.store.getValue(_5ba,"name");
name=name.replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;");
_5bc.innerHTML=name;
_5bb.onclick=dojo.hitch(this,function(){
this._onGroupItemClick(_5bb,_5ba);
});
var _5be=dojo.query(".edit_group",_5bb)[0];
var _5bf=dojo.query(".delete_group",_5bb)[0];
if(this.editable==true){
_5be.setAttribute("groupId",_5bb.id);
_5be.onclick=dojo.hitch(this,function(e){
this._onEditClick(_5bb,_5ba,e);
});
_5bf.setAttribute("groupId",_5bb.id);
_5bf.onclick=dojo.hitch(this,function(e){
this._onDeleteClick(_5bb,_5ba,e);
});
}else{
_5be.parentNode.removeChild(_5be);
_5bf.parentNode.removeChild(_5bf);
}
this._itemsContainer.appendChild(_5bb);
},_onEditClick:function(_5c2,_5c3,e){
var _5c5=this._objectFromDataItem(_5c3);
new tweetizen.ui.GroupDialog({isEditing:true,groupObject:_5c5}).show();
dojo.stopEvent(e);
},_onDeleteClick:function(_5c6,_5c7,e){
if(confirm("Are you sure you wish to permanently delete this group?")){
var _5c9=this._objectFromDataItem(_5c7);
this._deleteGroup(_5c9.id);
}
dojo.stopEvent(e);
},_deleteGroup:function(_5ca){
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_GROUPS"),content:{action:"delete",id:_5ca,user_id:tweetizen.logged_in_user.id},handleAs:"text",load:dojo.hitch(this,"_onGroupDeleteSuccess"),error:dojo.hitch(this,"_onGroupDeleteError")});
},_onGroupDeleteSuccess:function(data,io){
dojo.publish("GroupList/OnGroupDelete");
this.refreshData();
},_onGroupDeleteError:function(data,io){
alert("Whoops, there was an error deleting this group: "+data);
console.error(data);
},_onGroupItemClick:function(_5cf,_5d0){
dojo.publish("TrendsPanel/RemoveSelectedItems");
this._removeSelectedItems();
dojo.addClass(_5cf,"selected_group_list_item");
var _5d1=this._objectFromDataItem(_5d0);
var _5d2=tweetizen.ui.GroupHelper.queryFromJson(_5d1);
dojo.publish("GroupList/OnGroupClick",[_5d1.id,_5d1.name,_5d2,_5d1]);
dojo.publish("TweetList/LoadGroup",[_5d1.id,_5d1.name,_5d2,_5d1]);
},_removeSelectedItems:function(){
dojo.query(".selected_group_list_item").removeClass("selected_group_list_item");
},_objectFromDataItem:function(_5d3){
var obj={};
var _5d5=this.store.getAttributes(_5d3);
dojo.forEach(_5d5,function(_5d6){
obj[_5d6]=this.store.getValue(_5d3,_5d6);
},this);
return obj;
},selectFirstItem:function(){
var _5d7=dojo.query((":first-child"),this._itemsContainer);
if(_5d7.length>0){
_5d7[0].onclick();
}
},selectItemById:function(id){
var _5d9=dojo.query(("#group_"+id),this._itemsContainer);
if(_5d9.length>0){
_5d9[0].onclick();
}
},_dataStore_OnBegin:function(_5da){
this._itemsContainer.innerHTML="";
this._setLoading(true);
},_dataStore_OnComplete:function(_5db,_5dc){
dojo.forEach(_5db,function(_5dd){
this._createGroupItem(_5dd);
},this);
if(_5db.length>0){
var _br=dojo.doc.createElement("br");
_br.style.clear="both";
this._itemsContainer.appendChild(_br);
}
this._setLoading(false);
dojo.publish("GroupList"+this.id+"OnDataLoad",[]);
},_dataStore_OnError:function(e){
console.error("A Data error has occured loading groups: "+e);
}});
}
if(!dojo._hasResource["tweetizen.ui.GroupDialog"]){
dojo._hasResource["tweetizen.ui.GroupDialog"]=true;
dojo.provide("tweetizen.ui.GroupDialog");
dojo.declare("tweetizen.ui.GroupDialog",[dijit._Widget,dijit._Templated],{templateString:"<div> <!-- top level div replaced with dialog -->\r\n\t<form dojoAttachPoint=\"_form\" onsubmit=\"javascript: return false;\" class=\"group_form\">\r\n\t\t\r\n\t\t<div class=\"group_dialog\" dojoAttachPoint=\"_groupDialogElement\">\r\n\t\t\r\n\t\t\t<!-- \r\n\t\t\t\tfirst step, choose name and group type\r\n\t\t\t-->\t\r\n\t\t\t\r\n\t\t\t<div class=\"step name_step\" dojoAttachPoint=\"_nameStepElement\">\r\n\t\t\t\t<h1>Create a Twitter Group</h1>\r\n\t\t\t\t<p>Grouping is a great way to filter tweets. Get started by naming your group and filtering by one of the two types below.</p>\r\n\t\t\t\t<!-- group name section -->\r\n\t\t\t\t<div class=\"section section_name\">\r\n\t\t\t\t\t<div class=\"title name_title\">\r\n\t\t\t\t\t\t<h2>Your Group's Name:</h2>\r\n\t\t\t\t\t\t<h3>Choose a name for your group (required)</h3>\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"section_inner\">\r\n\t\t\t\t\t\t<input type=\"text\" class=\"group_name text\" dojoAttachPoint=\"_groupNameElement\" maxlength=\"21\" />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- group type section -->\r\n\t\t\t\t<div class=\"section section_type\">\r\n\t\t\t\t\t<div class=\"title type_title\">\r\n\t\t\t\t\t\t<h2>Filter By:</h2>\r\n\t\t\t\t\t\t<h3>Choose one of the below</h3>\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"section_inner\">\r\n\t\t\t\t\t\t<!-- group type buttons -->\r\n\t\t\t\t\t\t<div class=\"group_type type_topic\" dojoAttachPoint=\"_groupTypeButtonTopicElement\" dojoAttachEvent=\"click: _onGroupTypeClick\">\r\n\t\t\t\t\t\t\t<div class=\"group_name\">Your Interests</div>\r\n\t\t\t\t\t\t\t<div class=\"group_desc\">All tweets on a topic</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"group_type type_people\" dojoAttachPoint=\"_groupTypeButtonPeopleElement\" dojoAttachEvent=\"click: _onGroupTypeClick\">\r\n\t\t\t\t\t\t\t<div class=\"group_name\">Your Friends &amp; Family</div>\r\n\t\t\t\t\t\t\t<div class=\"group_desc\">Just tweets from people you choose</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<!-- buttons -->\r\n\t\t\t\t<div class=\"button_container\">\r\n\t\t\t\t\t<button class=\"cancel\" dojoAttachPoint=\"_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t\t<button class=\"next\" dojoAttachPoint=\"_nextButtonElement\" dojoAttachEvent=\"click: _onNextButtonClick\" disabled=\"true\">Next &raquo;</button>\r\n\r\n\t\t\t\t</div>\r\n\r\n\r\n\t\t\t\t\r\n\t\t\t<!-- end first step -->\t\r\n\t\t\t</div>\r\n\r\n\r\n\r\n\r\n\t\t\t<!-- \r\n\t\t\t\tpeople step, create group from people \r\n\t\t\t-->\t\r\n\t\t\t\r\n\t\t\t<div class=\"step people_step\" dojoAttachPoint=\"_peopleStepElement\" style=\"display: none\">\r\n\t\t\t\t<h1>Create a Twitter Group</h1>\r\n\t\t\t\t<p>Tweetizen allows you to group your friends and family. However, due to current twitter limitations, you can only add up to 10 friends per group.</p>\r\n\r\n\t\t\t\t<div class=\"section section_people\">\r\n\t\t\t\t\t<div class=\"title people_title\">\r\n\t\t\t\t\t\t<h2>Add Your Friends &amp; Family:</h2>\r\n\t\t\t\t\t\t<h3>Enter twitter username</h3>\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"section_inner\">\r\n\t\t\t\t\t\t<label for=\"{$id}_people\" class=\"tag_people\">Username:</label>\r\n\t\t\t\t\t\t<input type=\"text\" value=\"\" id=\"{$id}_people\" class=\"person_name text\" dojoAttachPoint=\"_addPersonElement\" dojoAttachEvent=\"onkeydown: _personElement_OnKeyDown\" />\r\n\t\t\t\t\t\t<button class=\"add\" dojoAttachPoint=\"_addPersonButtonElement\" dojoAttachEvent=\"click: _onAddPersonButtonClick\">+ add</button>\r\n\t\t\t\t\t\t<!-- person template element -->\r\n\t\t\t\t\t\t<div class=\"person\" dojoAttachPoint=\"_personElement_Template\" style=\"display: none\"></div>\r\n\t\t\t\t\t\t<!-- tag container (contains many tag elements from template -->\r\n\t\t\t\t\t\t<div class=\"current_people_container\" dojoAttachPoint=\"_peopleContainerElement\"></div>\t\r\n\t\t\t\t\t\t<div class=\"helper\">* Click on a person to remove from the list</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- buttons -->\r\n\t\t\t\t<div class=\"button_container fam\">\r\n\t\t\t\t\t<button class=\"back\" dojoAttachPoint=\"_people_backButtonElement\" dojoAttachEvent=\"click: _onBackButtonClick\">&laquo; Back</button>\r\n\t\t\t\t\t<button class=\"cancel\" dojoAttachPoint=\"_people_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t\t<button class=\"save\" dojoAttachPoint=\"_people_saveButtonElement\" dojoAttachEvent=\"click: _onSaveButtonClick\">Save</button>\r\n\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t<!-- end people step -->\t\r\n\t\t\t</div>\r\n\r\n\r\n\r\n\r\n\t\t\t<!-- \r\n\t\t\t\ttopic step, create a group from topic \r\n\t\t\t-->\t\r\n\t\t\t\r\n\t\t\t<div class=\"step topic_step\" dojoAttachPoint=\"_topicStepElement\" style=\"display: none\">\r\n\t\t\t\t<h1>Create a Twitter Group</h1>\r\n\t\t\t\t<p>Tweetizen allows you to create groups based on your interests. You can choose to filter by text or #tags or a combination of both. More advanced options at the bottom.</p>\r\n\r\n\t\t\t\t<!-- tags section -->\r\n\t\t\t\t<div class=\"section section_search\">\r\n\t\t\t\t\t<div class=\"title search_title\">\r\n\t\t\t\t\t\t<h2>Filter by Keyword:</h2>\r\n\t\t\t\t\t\t<h3>Enter keywords that will be filtered for tweets</h3>\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"section_inner\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<!-- search query -->\r\n\t\t\t\t\t\t<div class=\"search_query_container\">\r\n\t\t\t\t\t\t\t<input id=\"_searchtext\" type=\"text\" class=\"search_text text\" dojoAttachPoint=\"_searchTextElement\" maxlength=\"140\" />\r\n\t\t\t\t\t\t</div>\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t<!-- end tags section -->\r\n\t\t\t\t</div>\r\n\r\n\r\n\t\t\t\t<!-- tags section -->\r\n\t\t\t\t<div class=\"section section_tags\">\r\n\t\t\t\t\t<div class=\"title tags_title\">\r\n\t\t\t\t\t\t<h2>Filter by Tags:</h2>\r\n\t\t\t\t\t\t<h3>Add any number of tags to filter by</h3>\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"section_inner\">\r\n\t\t\t\t\t\t<label for=\"{$id}_tag\" class=\"tag_label\">Tags:</label>\r\n\t\t\t\t\t\t<input type=\"text\" id=\"{$id}_tag\" class=\"tag_name text\" dojoAttachPoint=\"_addTagElement\" dojoAttachEvent=\"onkeydown: _tagElement_OnKeyDown\"/>\r\n\t\t\t\t\t\t<button class=\"add\" dojoAttachPoint=\"_addTagButtonElement\" dojoAttachEvent=\"click: _onAddTagButtonClick\">+ add</button>\r\n\t\t\t\t\t\t<!-- tag template element -->\r\n\t\t\t\t\t\t<span class=\"tag\" dojoAttachPoint=\"_tagElement_Template\" style=\"display: none\"></span>\r\n\t\t\t\t\t\t<!-- tag container (contains many tag elements from template -->\r\n\t\t\t\t\t\t<div class=\"current_tags_container\" dojoAttachPoint=\"_tagsContainerElement\"></div>\t\r\n\t\t\t\t\t\t<div class=\"helper\">* Click on a tag to remove from the list</div>\r\n\r\n\t\t\t\t\t\t<div class=\"advanced_link\" dojoAttachPoint=\"_advancedLinkElement\" dojoAttachEvent=\"click: _onAdvancedClick\">advanced options &raquo;</div>\r\n\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t<!-- end tags section -->\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\r\n\r\n\t\t\t\t<!-- buttons -->\r\n\t\t\t\t<div class=\"button_container fam\">\r\n\t\t\t\t\t<button class=\"back\" dojoAttachPoint=\"_topic_backButtonElement\" dojoAttachEvent=\"click: _onBackButtonClick\">&laquo; Back</button>\r\n\t\t\t\t\t<button class=\"cancel\" dojoAttachPoint=\"_topic_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t\t<button class=\"save\" dojoAttachPoint=\"_topic_saveButtonElement\" dojoAttachEvent=\"click: _onSaveButtonClick\">Save</button>\r\n\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t<!-- end topic step -->\t\r\n\t\t\t</div>\r\n\r\n\t\t\t\r\n\t\t\t<!-- advanced section (hidden by default) -->\t\r\n\t\t\t<div class=\"topic_advanced\" dojoAttachPoint=\"_advancedGroupSettingsElement\" style=\"display:none\">\r\n\t\t\t\t<h1>Advanced Options</h1>\r\n\t\t\t\t<p>For the pro users who REALLY want to drill down the tweets!</p>\r\n\r\n\t\t\t\t<div class=\"section section_groupoperator\">\t\r\n\t\t\t\t\t<div class=\"title title_operator\">\r\n\t\t\t\t\t\t<h2>Group Operators:</h2>\r\n\t\t\t\t\t\t<h3>Refine your group</h3>\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<br />\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"section_inner\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"tag_operator_container\">\r\n\t\t\t\t\t\t\t<input type=\"radio\" id=\"${id}_op_or\" name=\"tag_operator\" dojoAttachPoint=\"_operatorOrElement\" value=\"OR\" checked=\"true\" />\r\n\t\t\t\t\t\t\t<label for=\"${id}_op_or\" >Use ANY of these tags &amp; text</label>\r\n\t\t\t\t\t\t\t<br style=\"clear:both\" /><br  />\r\n\t\t\t\t\t\t\t<input type=\"radio\" id=\"${id}_op_and\" name=\"tag_operator\" dojoAttachPoint=\"_operatorAndElement\" value=\"AND\" />\r\n\t\t\t\t\t\t\t<label for=\"${id}_op_and\" >Use ALL of these tags &amp; text</label>\r\n\t\t\t\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"section section_advanced\">\t\r\n\t\t\t\t\t<div class=\"title title_advanced\">\r\n\t\t\t\t\t\t<h2>Other:</h2>\r\n\t\t\t\t\t\t<h3>The finer details...</h3>\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<br />\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"section_inner\">\r\n\r\n\t\t\t\t\t\t<div class=\"checkbox_container\">\r\n\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"${id}_ig_rt\" name=\"ignore_retweets\" dojoAttachPoint=\"_ignoreRetweetsElement\" value=\"ignore_retweets\" checked=\"true\" />\r\n\t\t\t\t\t\t\t<label for=\"${id}_ig_rt\" >Ignore Retweets</label>\r\n\t\t\t\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"checkbox_container\">\r\n\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"${id}_only_lnks\" name=\"only_hyperlinks\" dojoAttachPoint=\"_onlyHyperlinksElement\" value=\"only_hyperlinks\" />\r\n\t\t\t\t\t\t\t<label for=\"${id}_only_lnks\" >Must Contain Links  </label>\r\n\t\t\t\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"language_container\">\r\n\t\t\t\t\t\t\t<label for=\"${id}_language\" >Language:</label>\r\n\t\t\t\t\t\t\t<select id=\"${id}_language\" class=\"language_select\" name=\"language\" dojoAttachPoint=\"_languageSelectionElement\"><option selected=\"selected\" value=\"any\">Any Language</option><option value=\"ar\">Arabic (العربية)</option><option value=\"da\">Danish (dansk)</option><option value=\"nl\">Dutch (Nederlands)</option><option value=\"en\">English</option><option value=\"fi\">Finnish (suomen kieli)</option><option value=\"fr\">French (français)</option><option value=\"de\">German (Deutsch)</option><option value=\"hu\">Hungarian (Magyar)</option><option value=\"is\">Icelandic (Íslenska)</option><option value=\"it\">Italian (Italiano)</option><option value=\"ja\">Japanese (日本語)</option><option value=\"no\">Norwegian (Norsk)</option><option value=\"pl\">Polish (polski)</option><option value=\"pt\">Portuguese (Português)</option><option value=\"ru\">Russian (русский язык)</option><option value=\"es\">Spanish (español)</option><option value=\"sv\">Swedish (Svenska)</option><option value=\"th\">Thai (ไทย)</option></select>   \r\n\t\t\t\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n<!-- buttons -->\r\n\t\t\t\t<div class=\"button_container dia\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\t\r\n\t\t\t<!-- end advaneced section -->\r\n\t\t\t\r\n\t\t\r\n\t\t</div>\r\n\t\t\r\n\t</form>\t\t\r\n</div>\r\n\r\n\r\n",MAX_QUERY_LENGTH:140,isEditing:false,groupObject:null,_dialogId:null,_dialog:null,_workingTags:null,_workingPeople:null,_form:null,_groupDialogElement:null,_nameStepElement:null,_topicStepElement:null,_people_StepElement:null,_groupTypeButtonTopicElement:null,_groupTypeButtonPeopleElement:null,_nextButtonElement:null,_advancedGroupSettingsElement:null,_groupNameElement:null,_addTagElement:null,_tagsContainerElement:null,_addTagButtonElement:null,_addPersongElement:null,_peopleContainerElement:null,_addPersonButtonElement:null,_operatorOrElement:null,_operatorAndElement:null,_ignoreRetweetsElement:null,_onlyHyperlinksElement:null,_languageSelectionElement:null,_advancedLinkElement:null,_searchTextElement:null,_saveButtonElement:null,_cancelButtonElement:null,_tagElement_Template:null,_personElement_Template:null,postCreate:function(){
this._workingTags=[];
this._workingPeople=[];
if(!dojo.isFF){
dojo.connect(this._addTagElement,"onkeydown",this,"_tagElement_OnKeyDown");
}
this._dialogId=this.id+"_Dialog";
this._dialog=new dijit.Dialog({id:this._dialogId,showTitle:false,autofocus:false,titleBar:false,draggable:false},this.domNode);
if(this.groupObject){
this._loadGroupData();
}else{
this._initializeNewGroup();
}
},show:function(){
this._dialog.show();
},_initializeNewGroup:function(){
this.groupObject={id:"0",name:null,search:null,users:null,tags:null,tag_operator:null,ignore_retweets:null,only_hyperlinks:null,language:null};
},_loadGroupData:function(){
if(this.groupObject!=null){
this._workingTags=this.groupObject.tags.slice();
this._workingPeople=this.groupObject.users.slice();
this._groupNameElement.value=this.groupObject.name;
this._operatorOrElement.checked=(this.groupObject.tag_operator=="OR");
this._operatorAndElement.checked=(this.groupObject.tag_operator=="AND");
this._ignoreRetweetsElement.checked=this.groupObject.ignore_retweets;
this._onlyHyperlinksElement.checked=this.groupObject.only_hyperlinks;
this._languageSelectionElement.value=this.groupObject.language;
this._searchTextElement.value=this.groupObject.search;
if(this._workingTags&&this._workingTags.length>0){
this._refreshTags();
}
if(this._workingPeople&&this._workingPeople.length>0){
this._refreshPeople();
}
if(this.groupObject.users!=null&&this.groupObject.users.length>0){
this._selectGroupTypeButton(this._groupTypeButtonPeopleElement);
this._displayStep(this._peopleStepElement);
}else{
this._selectGroupTypeButton(this._groupTypeButtonTopicElement);
this._displayStep(this._topicStepElement);
}
}
},_refreshTags:function(){
this._tagsContainerElement.innerHTML="";
dojo.forEach(this._workingTags,function(tag,_5e1,tags){
var _5e3=dojo.clone(this._tagElement_Template);
_5e3.removeAttribute("dojoAttachPoint");
_5e3.style.display="inline";
_5e3.setAttribute("tag_index",_5e1);
_5e3.setAttribute("title","Click to remove '"+tag+"' tag...");
_5e3.innerHTML=tag;
dojo.connect(_5e3,"onclick",this,function(){
if(confirm("Are you sure you with to remove the '"+tag+"' tag?")){
this._workingTags.splice(_5e3.getAttribute("tag_index"),1);
this._refreshTags();
}
});
this._tagsContainerElement.appendChild(_5e3);
if(_5e1<this._workingTags.length-1){
var _5e4=dojo.doc.createElement("span");
dojo.addClass(_5e4,"comma");
_5e4.innerHTML=", ";
this._tagsContainerElement.appendChild(_5e4);
}
},this);
},_addTag:function(tag){
tag=tag.replace(/#/g,"");
this._workingTags.push(tag);
this._refreshTags();
},_refreshPeople:function(){
this._peopleContainerElement.innerHTML="";
dojo.forEach(this._workingPeople,function(_5e6,_5e7,_5e8){
var _5e9=dojo.clone(this._personElement_Template);
_5e9.removeAttribute("dojoAttachPoint");
_5e9.style.display="block";
_5e9.setAttribute("person_index",_5e7);
_5e9.setAttribute("title","Click to remove "+_5e6);
_5e9.innerHTML=_5e6;
dojo.connect(_5e9,"onclick",this,function(){
if(confirm("Are you sure you with to remove "+_5e6+"?")){
this._workingPeople.splice(_5e9.getAttribute("person_index"),1);
this._refreshPeople();
}
});
this._peopleContainerElement.appendChild(_5e9);
},this);
},_addPerson:function(_5ea){
_5ea=_5ea.replace(/@/g,"");
this._workingPeople.push(_5ea);
this._refreshPeople();
},_toggleAdvancedSettings:function(){
if(this._advancedGroupSettingsElement.style.display=="block"){
this._advancedGroupSettingsElement.style.display="none";
}else{
this._advancedGroupSettingsElement.style.display="block";
}
this._dialog.layout();
this._dialog.layout();
},_enableControls:function(_5eb){
var _5ec=(_5eb?"addClass":"removeClass");
dojo[_5ec](this.domNode,"disabled_controls");
dojo.attr(this._groupNameElement,"disabled",!_5eb);
dojo.attr(this._operatorOrElement,"disabled",!_5eb);
dojo.attr(this._operatorAndElement,"disabled",!_5eb);
dojo.attr(this._ignoreRetweetsElement,"disabled",!_5eb);
dojo.attr(this._onlyHyperlinksElement,"disabled",!_5eb);
dojo.attr(this._languageSelectionElement,"disabled",!_5eb);
dojo.attr(this._addTagElement,"disabled",!_5eb);
dojo.attr(this._nextButtonElement,"disabled",!_5eb);
dojo.attr(this._cancelButtonElement,"disabled",!_5eb);
dojo.attr(this._searchTextElement,"disabled",!_5eb);
dojo.attr(this._people_saveButtonElement,"disabled",!_5eb);
dojo.attr(this._people_cancelButtonElement,"disabled",!_5eb);
dojo.attr(this._people_backButtonElement,"disabled",!_5eb);
dojo.attr(this._topic_saveButtonElement,"disabled",!_5eb);
dojo.attr(this._topic_cancelButtonElement,"disabled",!_5eb);
dojo.attr(this._topic_backButtonElement,"disabled",!_5eb);
},cancel:function(){
this._dialog.hide();
},_getGroupObject:function(){
if(this._getSelectedStepElement()==this._peopleStepElement){
this.groupObject.name=this._groupNameElement.value;
this.groupObject.users=this._workingPeople.slice();
this.groupObject.search=null;
this.groupObject.tags=null;
this.groupObject.tag_operator=null;
this.groupObject.ignore_retweets=null;
this.groupObject.only_hyperlinks=null;
this.groupObject.language=null;
}else{
this.groupObject.name=this._groupNameElement.value;
this.groupObject.users=null;
this.groupObject.search=this._searchTextElement.value;
this.groupObject.tags=this._workingTags.slice();
this.groupObject.tag_operator=(this._operatorOrElement.checked?"OR":"AND");
this.groupObject.ignore_retweets=this._ignoreRetweetsElement.checked;
this.groupObject.only_hyperlinks=this._onlyHyperlinksElement.checked;
this.groupObject.language=this._languageSelectionElement.value;
}
return this.groupObject;
},save:function(){
var _5ed=this._getGroupObject();
_5ed.action="save";
_5ed.user_id=tweetizen.logged_in_user.id;
if(_5ed.tags!=null){
_5ed.tags=_5ed.tags.join(",");
}else{
if(_5ed.users!=null){
_5ed.users=_5ed.users.join(",");
}
}
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_GROUPS"),content:_5ed,handleAs:"json",load:dojo.hitch(this,"_onGroupSaveSuccess"),error:dojo.hitch(this,"_onGroupSaveError")});
this._enableControls(false);
},_onGroupSaveSuccess:function(data,io){
dojo.publish("GroupDialog/OnGroupSave",[data]);
this._enableControls(true);
this._dialog.hide();
},_onGroupSaveError:function(data,io){
alert("Whoops, there was an error saving this group: "+data.message);
console.error(data);
this._enableControls(true);
},_validate:function(){
var _5f2=true;
if(!this._validateNameStep()){
return false;
}
if(this._getSelectedStepElement()==this._peopleStepElement){
_5f2=this._validatePeopleStep();
}else{
_5f2=this._validateTopicStep();
}
return _5f2;
},_validateNameStep:function(){
if(this._groupNameElement.value==""){
alert("Please enter a name for this group");
return false;
}
var _5f3=/^([\s#&+a-zA-Z0-9_-]+)$/;
if(!_5f3.test(this._groupNameElement.value)){
alert("Whoops, Invalid Character!\nGroup names can only contain letters, numbers and any of: '&+#_-'");
return false;
}
if(dojo.query(".group_type_selected",this._nameStepElement)[0]==null){
alert("Please select the type of group you wish to create");
return false;
}
return true;
},_validateTopicStep:function(){
if(this._workingTags.length==0&&this._searchTextElement.value==""){
alert("Please enter at least one tag, or a search query for this group");
return false;
}
return this._validateQuery();
},_validatePeopleStep:function(){
if(this._workingPeople.length==0){
alert("Please enter at least one person to this group");
return false;
}else{
return true;
}
},_validateTag:function(tag){
var _5f5=true;
if(tag==""||tag==null){
alert("Please enter a tag to add.");
return false;
}
if(tag.indexOf(" ")>-1){
alert("Tags cannot contain spaces, to add multiple tags use a comma.");
return false;
}
var _5f6=/^([a-zA-Z0-9_-]+)$/;
if(!_5f6.test(tag)){
alert("Whoops, Invalid Character!\nTags can only contain letters, numbers, dashes and underscores.");
return false;
}
for(var i=0;i<this._workingTags.length;i++){
if(this._workingTags[i]==tag){
alert("Whoops, you have already included the tag '"+tag+"'");
_5f5=false;
}
}
if(_5f5==true&&!this._validateQuery(tag)){
_5f5=false;
}
return _5f5;
},_validatePerson:function(_5f8){
var _5f9=true;
if(_5f8==""||_5f8==null){
alert("Please enter a username to add.");
return false;
}
if(_5f8.indexOf(" ")>-1){
alert("Usernames cannot contain spaces, to add multiple usernames use a comma.");
return false;
}
var _5fa=/^([a-zA-Z0-9_-]+)$/;
if(!_5fa.test(_5f8)){
alert("Whoops, Invalid Character!Usernames can only contain letters, numbers, dashes and underscores.");
return false;
}
for(var i=0;i<this._workingPeople.length;i++){
if(this._workingPeople[i]==_5f8){
alert("Whoops, you have already included this person '"+_5f8+"'");
_5f9=false;
}
}
if(_5f9==true&&!this._validateQuery(_5f8)){
_5f9=false;
}
return _5f9;
},_validateQuery:function(_5fc){
var _5fd=this._getGroupObject();
var _5fe=(_5fd.users!=null);
if(_5fc){
if(_5fe){
_5fd.users.push(_5fc);
}else{
_5fd.tags.push(_5fc);
}
}
var _5ff=tweetizen.ui.GroupHelper.queryFromJson(_5fd);
if(_5ff.length>this.MAX_QUERY_LENGTH){
if(_5fe){
alert("Doh! you have reached our maximum group size, no more people can be added to this group.");
}else{
alert("Doh! you have reached our maximum group size. Either there are too many tags in this group, or it has a search query that is too long.");
}
return false;
}else{
return true;
}
},_getSelectedStepElement:function(){
var _600=dojo.query(".group_type_selected",this._nameStepElement)[0];
if(dojo.hasClass(_600,"type_topic")){
return this._topicStepElement;
}else{
if(dojo.hasClass(_600,"type_people")){
return this._peopleStepElement;
}
}
},_displayStep:function(_601){
dojo.query(".step",this._groupDialogElement).style({"display":"none"});
_601.style.display="block";
},_selectGroupTypeButton:function(_602){
dojo.query(".group_type",this._nameStepElement).removeClass("group_type_selected");
dojo.addClass(_602,"group_type_selected");
},_tagElement_OnKeyDown:function(e){
if(e.keyCode==13){
this._onAddTagButtonClick();
dojo.stopEvent(e);
}
},_onAddTagButtonClick:function(e){
var _605=this._addTagElement.value.replace(/#/g,"");
var tags=_605.split(",");
var _607=false;
for(var i=0;i<tags.length;i++){
var _609=dojo.trim(tags[i]);
if(!this._validateTag(_609)){
_607=true;
break;
}
}
if(!_607){
for(var i=0;i<tags.length;i++){
this._addTag(dojo.trim(tags[i]));
}
this._addTagElement.value="";
}
},_personElement_OnKeyDown:function(e){
if(e.keyCode==13){
this._onAddPersonButtonClick();
dojo.stopEvent(e);
}
},_onAddPersonButtonClick:function(e){
var _60c=this._addPersonElement.value.replace(/@/g,"");
var _60d=_60c.split(",");
var _60e=false;
for(var i=0;i<_60d.length;i++){
var _610=dojo.trim(_60d[i]);
if(!this._validatePerson(_610)){
_60e=true;
break;
}
}
if(!_60e){
for(var i=0;i<_60d.length;i++){
this._addPerson(dojo.trim(_60d[i]));
}
this._addPersonElement.value="";
}
},_onAdvancedClick:function(e){
this._toggleAdvancedSettings();
},_onGroupTypeClick:function(e){
var _613=(dojo.hasClass(e.target.parentNode,"group_type")?e.target.parentNode:e.target);
if(dojo.hasClass(_613,"group_type")){
this._selectGroupTypeButton(_613);
this._nextButtonElement.removeAttribute("disabled");
}
},_onCancelButtonClick:function(e){
this.cancel();
},_onSaveButtonClick:function(e){
if(this._validate()){
this.save();
}
},_onNextButtonClick:function(e){
if(this._validateNameStep()){
var _617=this._getSelectedStepElement();
this._displayStep(_617);
}
},_onBackButtonClick:function(e){
this._nextButtonElement.removeAttribute("disabled");
this._displayStep(this._nameStepElement);
}});
}
if(!dojo._hasResource["tweetizen.ui.GroupsPanelPrivate"]){
dojo._hasResource["tweetizen.ui.GroupsPanelPrivate"]=true;
dojo.provide("tweetizen.ui.GroupsPanelPrivate");
dojo.declare("tweetizen.ui.GroupsPanelPrivate",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"groups_panel_private\">\r\n\t<div class=\"group_heading\">\r\n  \t<h2>Your Groups</h2>\r\n\t</div>\r\n\t\r\n\t<div class=\"no_groups\" dojoAttachPoint=\"_noGroupsElement\" style=\"display: none\">Welcome fellow Tweetizen!<br />Get started by creating a group:</div>\r\n\t<div dojoAttachPoint=\"_groupListElement\" class=\"group_list\"></div>\r\n\t<button class=\"create_group\" dojoAttachPoint=\"_createGroupButtonElement\" dojoAttachEvent=\"click: _onCreateGroupClick\"></button>\r\n<div>\r\n",_groupsLocation:null,_groupList:null,_groupDialog:null,_lastSelectedGroupId:null,_groupListElement:null,_noGroupsElement:null,_createGroupButtonElement:null,postCreate:function(){
this._groupsLocation=tweetizen.data.Locations.getLocation("USER_GROUPS");
dojo.subscribe("Tweetizen/OnLogin",dojo.hitch(this,"_refreshView"));
dojo.subscribe("GroupList/OnGroupDelete",dojo.hitch(this,"_refreshView"));
dojo.subscribe("GroupDialog/OnGroupSave",dojo.hitch(this,"_refreshViewWithCurrentGroup"));
dojo.subscribe("LogoutPanel/OnLogout",dojo.hitch(this,function(){
this.destroy(true);
}));
this._refreshView();
},_refreshViewWithCurrentGroup:function(_619){
this._lastSelectedGroupId=_619.id;
this._refreshView();
},_refreshView:function(){
if(!this._groupList){
this._groupList=new tweetizen.ui.GroupList({data_url:this._groupsLocation,editable:true},this._groupListElement);
dojo.subscribe("GroupList"+this._groupList.id+"OnDataLoad",dojo.hitch(this,"_onGroupsLoad"));
}else{
this._groupList.refreshData();
}
},_onGroupsLoad:function(){
if(this._groupList._itemsContainer.childNodes.length>0){
this._groupList.domNode.style.display="block";
this._noGroupsElement.style.display="none";
this._selectItem();
}else{
this._groupList.domNode.style.display="none";
this._noGroupsElement.style.display="block";
dojo.publish("GroupPanelPublic/SelectFirstItem");
}
},_selectItem:function(){
if(tweetizen.logged_in_user&&window.auto_load==null){
if(this._lastSelectedGroupId!=null){
this._groupList.selectItemById(this._lastSelectedGroupId);
this._lastSelectedGroupId=null;
}else{
if(this._groupList._itemsContainer.childNodes.length>0){
this._groupList.selectFirstItem();
}else{
dojo.publish("GroupPanelPublic/SelectFirstItem");
}
}
}
},_onCreateGroupClick:function(e){
this._groupDialog=new tweetizen.ui.GroupDialog();
this._groupDialog.show();
}});
}
if(!dojo._hasResource["tweetizen.ui.GroupsPanelPublic"]){
dojo._hasResource["tweetizen.ui.GroupsPanelPublic"]=true;
dojo.provide("tweetizen.ui.GroupsPanelPublic");
dojo.declare("tweetizen.ui.GroupsPanelPublic",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"groups_panel_public\">\r\n\t<div class=\"group_heading\">\r\n\t\t\r\n\t\t<span dojoAttachPoint=\"_notLoggedInHeading\" style=\"display: inline\">\r\n\r\n  \t\t</span>\r\n\r\n\t  \t<h2 class=\"popular\">Popular Groups</h2>\r\n\r\n\t\t<span dojoAttachPoint=\"_loggedInHeading\" style=\"display: none\">\r\n  \t</span>\r\n  \t\r\n\t</div>\r\n\t<!-- GroupList -->\r\n\t<div dojoAttachPoint=\"_groupListElement\" class=\"group_list\"></div>\r\n<div>\r\n",data:null,_groupsLocation:null,_groupList:null,_groupListElement:null,_notLoggedInHeading:null,_loggedInHeading:null,postCreate:function(){
this._groupsLocation=dojo.moduleUrl("tweetizen.data","json/groups.json");
dojo.subscribe("GroupPanelPublic/SelectFirstItem",dojo.hitch(this,"selectFirstItem"));
dojo.subscribe("LoginPanel/OnLogout",dojo.hitch(this,"_selectItem"));
dojo.subscribe("Tweetizen/OnLogin",dojo.hitch(this,"_refreshHeadingView"));
dojo.subscribe("LoginPanel/OnLogout",dojo.hitch(this,"_refreshHeadingView"));
this._refreshHeadingView();
this._refreshView();
},_refreshView:function(){
if(!this._groupList){
var _61b="public_group_list";
dojo.subscribe("GroupList"+_61b+"OnDataLoad",dojo.hitch(this,"_selectItem"));
this._groupList=new tweetizen.ui.GroupList({id:_61b,data:this.data,editable:false},this._groupListElement);
}else{
this._groupList.refreshData();
}
},_refreshHeadingView:function(){
this._loggedInHeading.style.display=(tweetizen.logged_in_user?"inline":"none");
this._notLoggedInHeading.style.display=(tweetizen.logged_in_user?"none":"inline");
},selectFirstItem:function(){
if(this._groupList){
this._groupList.selectFirstItem();
}else{
this._selectFirstItem=true;
}
},_selectItem:function(){
if(window.auto_load!=null){
return;
}
if(tweetizen.logged_in_user==null){
this.selectFirstItem();
}
if(this._selectFirstItem==true){
this.selectFirstItem();
}
}});
}
if(!dojo._hasResource["tweetizen.ui.UserProfileDialog"]){
dojo._hasResource["tweetizen.ui.UserProfileDialog"]=true;
dojo.provide("tweetizen.ui.UserProfileDialog");
dojo.declare("tweetizen.ui.UserProfileDialog",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"up_dialog_container\">\r\n\t\r\n\t<div class=\"up_dialog\">\r\n\t\t<div class=\"up_content\">\r\n\t\t<h1>Twitter Profile</h1>\r\n\t\t\r\n\t\t\t<!-- follow/unfollow buttons -->\r\n\t\t\t<div dojoAttachPoint=\"_followContainer\" style=\"visibility: hidden\">\r\n\t\t\t\t<button class=\"follow\" dojoAttachPoint=\"_followButtonElement\" dojoAttachEvent=\"click: _onFollowButtonClick\" style=\"display:block\">follow</button>\r\n\t\t\t\t<button class=\"unfollow\" dojoAttachPoint=\"_unfollowButtonElement\" dojoAttachEvent=\"click: _onUnFollowButtonClick\" style=\"display:none\">unfollow</button>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t<div class=\"header\">\r\n\r\n\t\t\t\t<div class=\"profile_image\" dojoAttachPoint=\"_profileImageElement\"></div>\r\n\t\t\t\t<h2>\r\n\t\t\t\t\t<span class=\"username\" dojoAttachPoint=\"_usernameElement\"></span>\r\n\t\t\t\t\t<div class=\"fullname\" dojoAttachPoint=\"_fullnameElement\"></div>\r\n\t\t\t\t\t<div dojoAttachPoint=\"_urlContainer\" style=\"display:none\"><a class=\"url\" dojoAttachPoint=\"_urlElement\" href=\"\" target=\"_new\"></a></div>\r\n\t\t\t\t</h2>\r\n\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"profile_info profile_info_loading\" dojoAttachPoint=\"_profileInfoElement\">\r\n\t\t\t\t\r\n\t\t\t\t<!-- description -->\r\n\t\t\t\t<div class=\"profile_item\" dojoAttachPoint=\"_descriptionItemElement\" style=\"display:none\">\r\n\t\t\t\t\t<div class=\"description\" dojoAttachPoint=\"_descriptionElement\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- location -->\r\n\t\t\t\t<div class=\"profile_item\" dojoAttachPoint=\"_locationItemElement\" style=\"display:none\">\r\n\t\t\t\t\t<div class=\"property\">Location:</div>\r\n\t\t\t\t\t<div class=\"value\" dojoAttachPoint=\"_locationElement\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- joined -->\r\n\t\t\t\t<div class=\"profile_item\" dojoAttachPoint=\"_created_atItemElement\" style=\"display:none\">\r\n\t\t\t\t\t<div class=\"property\">Joined:</div>\r\n\t\t\t\t\t<div class=\"value\" dojoAttachPoint=\"_created_atElement\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- followers -->\r\n\t\t\t\t<div class=\"profile_item\" dojoAttachPoint=\"_followers_countItemElement\" style=\"display:none\">\r\n\t\t\t\t\t<div class=\"property\">Followers:</div>\r\n\t\t\t\t\t<div class=\"value\" dojoAttachPoint=\"_followers_countElement\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- friends -->\r\n\t\t\t\t<div class=\"profile_item\" dojoAttachPoint=\"_friends_countItemElement\" style=\"display:none\">\r\n\t\t\t\t\t<div class=\"property\">Friends:</div>\r\n\t\t\t\t\t<div class=\"value\" dojoAttachPoint=\"_friends_countElement\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- favourites -->\r\n\t\t\t\t<div class=\"profile_item\" dojoAttachPoint=\"_favourites_countItemElement\" style=\"display:none\">\r\n\t\t\t\t\t<div class=\"property\">Favourites:</div>\r\n\t\t\t\t\t<div class=\"value\" dojoAttachPoint=\"_favourites_countElement\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"controls_container\">\r\n\t\t\t\t<button class=\"cancel_button\" dojoAttachPoint=\"_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Close</button>\r\n\t\t\t\t<button class=\"view_tweets_button\" disabled=\"true\" dojoAttachPoint=\"_viewTweetsButtonElement\" dojoAttachEvent=\"click: _onViewTweetsButtonClick\">View Tweets</button>\r\n\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\n</div>\r\n",_dialog:null,_dialogId:null,username:null,PROFILE_URL:"http://twitter.com/users/show/",_cancelButtonElement:null,_viewTweetsButtonElement:null,_usernameElement:null,_profileImageElement:null,_fullnameElement:null,_urlContainer:null,_urlElement:null,_profileInfoElement:null,_descriptionItemElement:null,_descriptionElement:null,_locationItemElement:null,_locationElement:null,_joinedItemElement:null,_joinedElement:null,_followers_countItemElement:null,_followers_countElement:null,_friends_countItemElement:null,_friends_countElement:null,_favourites_countItemElement:null,_favourites_countElement:null,_followContainer:null,_followButtonElement:null,_unfollowButtonElement:null,postCreate:function(){
if(this.username==null){
alert("Error - no username specified");
return false;
}
this._usernameElement.innerHTML=this.username;
this._dialogId=this.id+"_Dialog";
this._dialog=new dijit.Dialog({id:this._dialogId,showTitle:false,autofocus:false,titleBar:false,draggable:false},this.domNode);
},show:function(){
this._dialog.show();
if(tweetizen.logged_in_user!=null&&tweetizen.logged_in_user.twitter_data.screen_name!=this.username){
this._checkFriendship();
}
this._refreshData();
},_refreshData:function(){
var _url=this.PROFILE_URL+this.username+".json";
var _61d=dojo.io.script.get({url:_url,timeout:4000,callbackParamName:"callback",load:dojo.hitch(this,"_onDataReceived_Success"),error:dojo.hitch(this,"_onDataReceived_Error")});
},_onDataReceived_Success:function(data,io){
dojo.removeClass(this._profileInfoElement,"profile_info_loading");
this._loadProfileData(data);
},_onDataReceived_Error:function(data,io){
alert("Error could not retrieve profile information for user '"+this.username+"'");
this._closeDialog();
},_loadProfileData:function(data){
dojo.style(this._profileImageElement,"backgroundImage","url('"+data.profile_image_url+"')");
this._fullnameElement.innerHTML=data.name;
if(data.url!=null){
this._urlElement.innerHTML=data.url;
this._urlElement.setAttribute("href",data.url);
this._urlContainer.style.display="block";
}
this._setPropertyValue("description",data);
this._setPropertyValue("location",data);
this._setPropertyValue("created_at",data);
this._setPropertyValue("followers_count",data);
this._setPropertyValue("friends_count",data);
this._setPropertyValue("favourites_count",data);
var _623=this._created_atElement.innerHTML.split(" ");
this._created_atElement.innerHTML=_623[0]+" "+_623[1]+" "+_623[2]+" "+_623[5];
this._viewTweetsButtonElement.removeAttribute("disabled");
if(tweetizen.logged_in_user!=null&&tweetizen.logged_in_user.twitter_data.screen_name!=this.username){
this._followContainer.style.visibility="visible";
}
},_setPropertyValue:function(_624,data){
var _626=this["_"+_624+"ItemElement"];
var _627=this["_"+_624+"Element"];
if(_626!=null&&_627!=null){
var _628=data[_624];
if(_628!=null){
_627.innerHTML=data[_624];
}
_626.style.display=(_628==null?"none":"block");
}else{
console.error("could not set property for: ",_624,_626,_627);
}
},_checkFriendship:function(){
var _url=tweetizen.data.Locations.getLocation("USER_FRIENDSHIP");
dojo.xhrPost({url:_url,handleAs:"json",content:{action:"FRIENDSHIP_EXISTS",username:this.username},load:dojo.hitch(this,"_onCheckFriendship_Success"),error:dojo.hitch(this,"_onCheckFriendship_Error")});
},_onCheckFriendship_Success:function(data,io){
var _62c=!data.exists;
this._showFollowButton(_62c);
},_onCheckFriendship_Error:function(data,io){
data=dojo.fromJson(data.responseText);
console.error("An error has occured checking if the friendship exists: ",data.error);
},_showFollowButton:function(show){
this._followButtonElement.style.display=(show?"block":"none");
this._unfollowButtonElement.style.display=(show?"none":"block");
},_followUser:function(_630){
var _url=tweetizen.data.Locations.getLocation("USER_FRIENDSHIP");
dojo.xhrPost({url:_url,handleAs:"json",content:{action:(_630?"FOLLOW_USER":"UNFOLLOW_USER"),username:this.username},load:dojo.hitch(this,function(data,io){
this._onFollowUser_Success(_630,data,io);
}),error:dojo.hitch(this,function(data,io){
this._onFollowUser_Error(_630,data,io);
})});
},_onFollowUser_Success:function(_636,data,io){
this._showFollowButton(!_636);
},_onFollowUser_Error:function(_639,data,io){
data=dojo.fromJson(data.responseText);
console.error("An error has occured following this user: ",data.error);
},_closeDialog:function(){
this._dialog.hide();
this.destroy();
},_onViewTweetsButtonClick:function(e){
dojo.publish("TweetList/LoadQuery",["from:"+this.username]);
this._closeDialog();
},_onFollowButtonClick:function(e){
this._followUser(true);
},_onUnFollowButtonClick:function(e){
this._followUser(false);
},_onCancelButtonClick:function(e){
this._closeDialog();
}});
}
if(!dojo._hasResource["tweetizen.ui.DirectMessageDialog"]){
dojo._hasResource["tweetizen.ui.DirectMessageDialog"]=true;
dojo.provide("tweetizen.ui.DirectMessageDialog");
dojo.declare("tweetizen.ui.DirectMessageDialog",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dm_dialog_container\">\r\n\t\r\n\t<div class=\"dm_dialog\">\r\n\t\t<div class=\"dm_content\">\r\n\t\t\t\r\n\t\t\t<div class=\"header\">\r\n\t\t\t\t<h1><span class=\"username\" dojoAttachPoint=\"_usernameElement\"></span> - Direct Message </h1>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"character_count\" dojoAttachPoint=\"_characterCountElement\">140</div>\r\n\t\t\t<br style=\"clear:both\" />\r\n\t\t\t\r\n\t\t\t<textarea class=\"message_text\" dojoAttachPoint=\"_messageTextElement\" dojoAttachEvent=\"onchange: _messageTextElement_OnChange, onkeyup: _messageTextElement_OnChange\"></textarea>\r\n\t\t\t\t<h2>Note - this person must be your Twitter friend</h2>\t\r\n\r\n\t\t\t\r\n\t\t\t<div class=\"controls_container\">\r\n\t\t\t\t<button class=\"cancel_button\" dojoAttachPoint=\"_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t<button class=\"send_button\" disabled=\"true\" dojoAttachPoint=\"_sendButtonElement\" dojoAttachEvent=\"click: _onSendButtonClick\">Send</button>\r\n\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\n</div>\r\n",onAfterLogin_Publish:null,_dialog:null,_dialogId:null,username:null,MAX_CHARACTER_LENGTH:140,_characterCountElement:null,_messageTextElement:null,_sendButtonElement:null,_cancelButtonElement:null,postCreate:function(){
if(this.username==null){
alert("Error - no username specified");
return false;
}
this._usernameElement.innerHTML="@"+this.username;
this._dialogId=this.id+"_Dialog";
this._dialog=new dijit.Dialog({id:this._dialogId,showTitle:false,autofocus:false,titleBar:false,draggable:false},this.domNode);
this.onAfterLogin_Publish="DirectMessageDialog/OnAfterSucessfulLogin";
dojo.subscribe(this.onAfterLogin_Publish,dojo.hitch(this,"_onAfterLogin"));
},show:function(){
this._dialog.show();
},_sendMessage:function(){
this._enableControls(false);
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("DIRECT_MESSAGE"),content:{username:this.username,message:this._messageTextElement.value},handleAs:"json",load:dojo.hitch(this,"_onSendMessage_Success"),error:dojo.hitch(this,"_onSendMessage_Error")});
},_onSendMessage_Success:function(data,io){
dojo.publish("DirectMessageDialog/OnDirectMessageSent",[this.username,this._messageTextElement.value]);
this._closeDialog();
},_onSendMessage_Error:function(data,io){
var _644="";
if(io.xhr.status==500){
_644="Ooops, it appears as though you are not Signed In.";
alert(_644);
this._openLoginDialog();
}else{
if(io.xhr.responseText){
var _645=dojo.fromJson(io.xhr.responseText);
_644="Error: "+_645.error;
alert(_644);
}else{
_644="Sorry! Twitter seems to be having some problems, please try again in a few seconds...";
alert(_644);
}
}
this._enableControls(true);
},_openLoginDialog:function(_646){
this._dialog.hide();
var _647=(_646==true?null:this.onAfterLogin_Publish);
var _648=new tweetizen.ui.LoginDialog({onAfterLogin_Publish:_647},dojo.doc.createElement("div"));
_648.show();
},_onAfterLogin:function(){
this._dialog.show();
this._onSendButtonClick();
},_validate:function(){
if(this.username==null||this.username==""){
alert("Eeep, no user specified. Please close this dialog and try again.");
return false;
}
if(this._messageTextElement.value==""){
alert("Please enter a message to send @"+this.username);
return false;
}
return true;
},_enableControls:function(_649){
var _64a=(_649?"addClass":"removeClass");
dojo[_64a](this.domNode,"disabled_controls");
dojo.attr(this._messageTextElement,"disabled",!_649);
dojo.attr(this._sendButtonElement,"disabled",!_649);
dojo.attr(this._cancelButtonElement,"disabled",!_649);
},_updateRemainingCharacters:function(){
var _64b=(this.MAX_CHARACTER_LENGTH-this._messageTextElement.value.length);
this._characterCountElement.innerHTML=_64b;
if(_64b<0){
dojo.addClass(this._characterCountElement,"character_count_over");
this._sendButtonElement.setAttribute("disabled",true);
dojo.addClass(this._sendButtonElement,"submit_tweet_disabled");
}else{
dojo.removeClass(this._characterCountElement,"character_count_over");
this._sendButtonElement.removeAttribute("disabled");
dojo.removeClass(this._sendButtonElement,"submit_tweet_disabled");
}
},_closeDialog:function(){
this._dialog.hide();
this.destroy();
},_messageTextElement_OnChange:function(e){
this._updateRemainingCharacters();
},_onSendButtonClick:function(e){
if(this._validate()){
this._sendMessage();
}
},_onCancelButtonClick:function(e){
this._closeDialog();
}});
}
if(!dojo._hasResource["tweetizen.ui.Tweet"]){
dojo._hasResource["tweetizen.ui.Tweet"]=true;
dojo.provide("tweetizen.ui.Tweet");
dojo.declare("tweetizen.ui.Tweet",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"tweet\">\r\n\t<div class=\"profile_image\" dojoAttachPoint=\"_profileImageElement\"></div>\r\n\t<div class=\"tweet_information\" dojoAttachPoint=\"_tweetInformationElement\">\r\n\t\t<div class=\"from_user\" dojoAttachPoint=\"_fromUserElement\" dojoAttachEvent=\"click: _onFromUser_OnClick\"></div>\r\n\t\t<div class=\"created_at\" dojoAttachPoint=\"_createdAtElement\"></div>\r\n\t\t\r\n\t\t\r\n\t\t<div class=\"tweet_button retweet\" dojoAttachEvent=\"click: _retweetElement_OnClick\" title=\"Retweet this tweet...\"></div>\r\n\t\t<div class=\"tweet_button reply\" dojoAttachEvent=\"click: _replyElement_OnClick\" title=\"Reply to this tweet...\"></div>\r\n\t\t<div class=\"tweet_button direct_message\" dojoAttachEvent=\"click: _directMessageElement_OnClick\" title=\"Send Direct Message...\"></div>\r\n\t\t\r\n\t\t<div class=\"text\" dojoAttachPoint=\"_textElement\"></div>\r\n\t</div>\r\n\t<div style=\"clear:both\"></div>\r\n</div>\r\n",dataItem:null,isStoreItem:null,store:null,tweetId:null,tweetText:null,tweetTextHTML:null,userImage:null,userName:null,userId:null,toUserId:null,isoLanguageCode:null,createdAt:null,_profileImageElement:null,_tweetInformationElement:null,_fromUserElement:null,_textElement:null,_createdAtElement:null,_global_userclick_subscribed:false,postCreate:function(){
this.onAfterLogin_Publish="Tweet-"+this.id+"/OnAfterSuccessfulLogin";
dojo.subscribe(this.onAfterLogin_Publish,dojo.hitch(this,"_openDirectMessageDialog"));
if(this.dataItem!=null){
this._loadTweetData();
}else{
throw "Error - Tweet data item is null";
}
},_loadTweetData:function(){
this.tweetId=this._getValue("id");
this.tweetText=this._getValue("text");
this.tweetTextHTML=this._getTweetText(this.tweetText);
this.userImage=this._getValue("profile_image_url");
this.userName=this._getValue("from_user");
this.userId=this._getValue("from_user_id");
this.toUserId=this._getValue("to_user_id");
this.isoLanguageCode=this._getValue("iso_language_code");
this.createdAt=this._getValue("created_at");
this.domNode.id="tweet_"+this.tweetId;
dojo.style(this._profileImageElement,"backgroundImage","url('"+this.userImage+"')");
dojo.attr(this._fromUserElement,"innerHTML",this.userName);
dojo.attr(this._textElement,"innerHTML",this.tweetTextHTML);
dojo.attr(this._createdAtElement,"innerHTML",this._parseDateTime(this.createdAt));
},_getValue:function(_64f){
return (this.isStoreitem?this.store.getValue(this.dataItem,_64f):this.dataItem[_64f]);
},_getTweetText:function(text){
text=text.replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;");
var _651=this._parseHyperlinks(text);
_651=this._parseUsernames(_651);
return _651;
},_parseHyperlinks:function(text){
return text.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/g,function(_653){
return "<a class='ext_link' href='"+_653+"' target='_new'>"+_653+"</a>";
});
},_parseUsernames:function(text){
return text.replace(/[@]+[A-Za-z0-9-_]+/g,function(_655){
var _656=_655.replace("@","");
return "<a class='user_link' href='javascript:void(0);' onclick=\"dojo.publish('Tweet/DisplayProfile', ['"+_656+"'])\"'>"+_655+"</a>";
});
},_parseDateTime:function(_657){
var _658=Date.parse(_657);
var _659=(arguments.length>1)?arguments[1]:new Date();
var _65a=parseInt((_659.getTime()-_658)/1000,0);
if(_65a<60){
return "less than a minute ago";
}else{
if(_65a<120){
return "about a minute ago";
}else{
if(_65a<(45*60)){
return (parseInt(_65a/60,0)).toString()+" minutes ago";
}else{
if(_65a<(90*60)){
return "about an hour ago";
}else{
if(_65a<(24*60*60)){
return "about "+(parseInt(_65a/3600,0)).toString()+" hours ago";
}else{
if(_65a<(48*60*60)){
return "1 day ago";
}else{
return (parseInt(_65a/86400,0)).toString()+" days ago";
}
}
}
}
}
}
},_displayUserProfile:function(_65b){
var _65c=new tweetizen.ui.UserProfileDialog({username:_65b},dojo.doc.createElement("div"));
_65c.show();
},_openDirectMessageDialog:function(){
var _65d=new tweetizen.ui.DirectMessageDialog({username:this.userName},dojo.doc.createElement("div"));
_65d.show();
},_openLoginDialog:function(_65e){
var _65f=(_65e==true?null:this.onAfterLogin_Publish);
var _660=new tweetizen.auth_widget({onAfterLogin_Publish:_65f});
_660.show();
},_onFromUser_OnClick:function(e){
this._displayUserProfile(e.target.innerHTML);
},_replyElement_OnClick:function(e){
dojo.publish("Tweet/OnReplyClick",[this.tweetId,this.userName]);
window.scroll(0,0);
},_retweetElement_OnClick:function(e){
dojo.publish("Tweet/OnRetweetClick",[this.userName,this.tweetText]);
window.scroll(0,0);
},_directMessageElement_OnClick:function(e){
if(tweetizen.logged_in_user!=null){
this._openDirectMessageDialog();
}else{
this._openLoginDialog();
}
}});
dojo.subscribe("Tweet/DisplayProfile",function(_665){
var _666=new tweetizen.ui.UserProfileDialog({username:_665},dojo.doc.createElement("div"));
_666.show();
});
}
if(!dojo._hasResource["tweetizen.ui.ShareDialog"]){
dojo._hasResource["tweetizen.ui.ShareDialog"]=true;
dojo.provide("tweetizen.ui.ShareDialog");
dojo.declare("tweetizen.ui.ShareDialog",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"share_dialog_container\">\r\n\t\r\n\t<div class=\"share_dialog\">\r\n\t\t<div class=\"share_content\">\r\n\t\t\t\r\n\t\t\t<div class=\"header\">\r\n\t\t\t\t<h1>Share URL</h1>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"description\">\r\n\t\t\t\tTo share this group with your friends and fellow tweetizens, simply give them the URL below.\r\n\t\t\t</div >\r\n\t\t\t\r\n\t\t\t<input type=\"text\" class=\"url_text\" dojoAttachPoint=\"_urlTextElement\" />\r\n\t\t\t\r\n\t\t\t<div class=\"controls_container\">\r\n\t\t\t\t<button class=\"cancel_button\" dojoAttachPoint=\"_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\n</div>\r\n",_dialog:null,_dialogId:null,groupData:null,queryData:null,BASE_URL:"",_urlTextElement:null,_cancelButtonElement:null,postCreate:function(){
if(window.abs_srv_path){
this.BASE_URL=window.abs_srv_path;
}else{
alert("Error - could not find 'window.abs_srv_path'");
return;
}
this._dialogId=this.id+"_Dialog";
this._dialog=new dijit.Dialog({id:this._dialogId,showTitle:false,autofocus:false,titleBar:false,draggable:false},this.domNode);
},show:function(){
this._dialog.show();
this.refreshUrl();
},refreshUrl:function(){
if(this.groupData!=null){
var _667=this.groupData.obj.user_id;
if(_667==0){
this._displayUrl("popular/"+this.groupData.group_name);
}else{
this._getScreenName(_667);
}
}else{
if(this.queryData!=null){
this._displayUrl("trends/"+this.queryData);
}
}
},_displayUrl:function(_668){
_668=escape(_668);
_668=_668.replace(new RegExp("\\+","g"),"%2B");
_668=_668.replace(new RegExp("\\%20","g"),"+");
_668=escape(_668);
var url=this.BASE_URL+_668;
this._urlTextElement.value=url;
this._urlTextElement.focus();
this._urlTextElement.select();
},_enableControls:function(_66a){
var _66b=(_66a?"addClass":"removeClass");
dojo[_66b](this.domNode,"disabled_controls");
dojo.attr(this._urlTextElement,"disabled",!_66a);
},_getScreenName:function(_66c){
this._enableControls(false);
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_GENERAL"),content:{action:"ID_TO_USERNAME",user_id:_66c},handleAs:"json",load:dojo.hitch(this,"_onGetScreenName_Success"),error:dojo.hitch(this,"_onGetScreenName_Error")});
},_onGetScreenName_Success:function(data,io){
this._enableControls(true);
this._displayUrl("users/"+data.screenname+"/"+this.groupData.group_name);
},_onGetScreenName_Error:function(data,io){
this._enableControls(true);
alert("Ooops! Sorry, an error has occured and we could not retrieve this url!");
console.error(data);
},_closeDialog:function(){
this._dialog.hide();
this.destroy();
},_onCancelButtonClick:function(e){
this._closeDialog();
}});
}
if(!dojo._hasResource["tweetizen.ui.EmbedDialog"]){
dojo._hasResource["tweetizen.ui.EmbedDialog"]=true;
dojo.provide("tweetizen.ui.EmbedDialog");
dojo.declare("tweetizen.ui.EmbedDialog",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"embed_dialog_container\">\r\n\t\r\n\t<div class=\"embed_dialog\">\r\n\t\t<div class=\"embed_content\">\r\n\t\t\t\r\n\t\t\t<div class=\"header\">\r\n\t\t\t\t<h1>Embed Group Widget</h1>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<!-- step one, enter details -->\r\n\t\t\t<div dojoAttachPoint=\"_embedStepOneElement\" class=\"step step_one\" style=\"display: block\">\r\n\t\t\t\t<div class=\"description\">\r\n\t\t\t\t\tPlease fill out the following information before embedding:<br /><br />\r\n\t\t\t\t</div >\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"step_one_inner\">\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"contact_email\">\r\n\t\t\t\t\t\t<h2>Your Email Address:</h2>\r\n\t\t\t\t\t\t<h3>So we can get in touch with you when we update (required)</h3>\t\r\n\t\t\t\t\t\t<input type=\"text\" maxlength=\"200\" dojoattachpoint=\"_emailElement\" class=\"text\" value=\"\" />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"contact_url\">\r\n\t\t\t\t\t\t<h2>Your site's URL:</h2>\r\n\t\t\t\t\t\t<h3>The URL of your blog or website you wish to embed this widget (required)</h3>\t\r\n\t\t\t\t\t\t<input type=\"text\" maxlength=\"200\" dojoattachpoint=\"_urlElement\" class=\"text\" value=\"http://\" />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"terms\">\r\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"terms_chk\" dojoAttachPoint=\"_termsCheckboxElement\" />\r\n\t\t\t\t\t\t<label for=\"terms_chk\">I agree to the <a href=\"terms\" target=\"_new\">Terms and Conditions</a></label>\r\n\t\t\t\t\t</div>\t\r\n\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- step one buttons -->\r\n\t\t\t\t<div class=\"controls_container\">\r\n\t\t\t\t\t<button class=\"next_button\" dojoAttachPoint=\"_nextButtonElement\" dojoAttachEvent=\"click: _onNextButtonClick\">Next</button>\r\n\t\t\t\t\t<button class=\"cancel_button\" dojoAttachPoint=\"_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t<!-- end step one -->\t\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<!-- step two, get code -->\r\n\t\t\t<div dojoAttachPoint=\"_embedStepTwoElement\" class=\"step step_two\" style=\"display: none\">\r\n\t\t\t\t<div class=\"description\">\r\n\t\t\t\t\tPlease insert the following HTML into your blog or website:<br /><br />\r\n\t\t\t\t</div >\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"step_two_inner\">\r\n\t\t\t\t\r\n\t\t\t\t\t<div class=\"code_description\">\r\n\t\t\t\t\t\tAdd just before the closing &lt;/head&gt; section of your HTML file:\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"code_text\" dojoAttachPoint=\"_codeTextElement\">\r\n\t\t\t\t\t\t&lt;style type=&quot;text/css&quot;&gt;@import &quot;<span class=\"base_url\"></span>/embed<span class=\"embed_version\"></span>.css&quot;;&lt;/style&gt;\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"code_description\">\r\n\t\t\t\t\t\tAdd to the &lt;body&gt; section of your HTML file where you wish the widget to appear:\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"code_text code_loading\" dojoAttachPoint=\"_codeTextElement\">\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t&lt;div id=&quot;twtzn&quot; class=&quot;tweetizen_embed&quot;&gt;&lt;/div&gt;\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t&lt;script type=&quot;text/javascript&quot; src=&quot;<span class=\"base_url\"></span>/tweetizen.embed<span class=\"embed_version\"></span>.js&quot;&gt;&lt;/script&gt;\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t&lt;script type=&quot;text/javascript&quot; src=&quot;<span class=\"base_url\"></span><span dojoAttachPoint=\"_embedParamsElement\">temporaryparameters</span>&quot;&gt;&lt;/script&gt;\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<!-- step two buttons -->\r\n\t\t\t\t<div class=\"controls_container\">\r\n\t\t\t\t\t<div class=\"faq_link\">Check our <a href=\"http://www.tweetizen.com/faq\" target=\"_new\">FAQ</a> for styling assistance.</div>\r\n\t\t\t\t\t<button class=\"ok_button\" dojoAttachPoint=\"_okButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Ok</button>\r\n\t\t\t\t\t<button class=\"cancel_button\" dojoAttachPoint=\"_cancelButtonElement\" dojoAttachEvent=\"click: _onCancelButtonClick\">Cancel</button>\r\n\t\t\t\t\t<br style=\"clear:both\" />\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t<!-- end step two -->\t\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\n</div>\r\n",_dialog:null,_dialogId:null,EMBED_VERSION:"v01",BASE_URL:"http://embed.tweetizen.com",groupData:null,queryData:null,_param_user:null,_param_group:null,_param_query:null,_embedParamsElement:null,_embedStepOneElement:null,_embedStepOTwoElement:null,_codeTextElement:null,_nextButtonElement:null,_cancelButtonElement:null,_emailElement:null,_urlElement:null,_termsCheckboxElement:null,postCreate:function(){
this._dialogId=this.id+"_Dialog";
this._dialog=new dijit.Dialog({id:this._dialogId,showTitle:false,autofocus:false,titleBar:false,draggable:false},this.domNode);
},show:function(){
this._dialog.show();
this.refreshCode();
},_saveStepOne:function(_672){
this._enableControls(false);
if(this._param_user==null&&this._param_group==null&&this._param_query==null){
alert("Error - no embed group information not loaded...");
this.refreshCode();
return;
}
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_GENERAL"),content:{action:"EMBED",email:this._emailElement.value,url:this._urlElement.value,p_user:this._param_user,p_group:this._param_group,p_query:this._param_query},handleAs:"json",load:dojo.hitch(this,"_saveStepOne_Success"),error:dojo.hitch(this,"_saveStepOne_Error")});
},_saveStepOne_Success:function(data,io){
this._enableControls(true);
this._completeStepOne();
},_saveStepOne_Error:function(data,io){
this._enableControls(true);
if(io.xhr.status==500){
alert("Ooops, it appears as though you are not Signed In.");
}else{
alert("Ooops! Sorry, there has been an error saving this information!");
}
console.error(data);
},_completeStepOne:function(){
this._embedStepOneElement.style.display="none";
this._embedStepTwoElement.style.display="block";
},refreshCode:function(){
if(this.groupData!=null){
var _677=this.groupData.obj.user_id;
if(_677==0){
this._setGroupParams(this.groupData.group_name);
}else{
this._getScreenName(_677);
}
}else{
if(this.queryData!=null){
this._setQueryParams(this.queryData);
}
}
dojo.query(".base_url").forEach(function(node){
node.innerHTML=this.BASE_URL;
},this);
},_setUserGroupParams:function(user,_67a){
this._param_user=user;
this._param_group=_67a;
user=this._escape_param(user);
_67a=this._escape_param(_67a);
this._embedParamsElement.innerHTML="?id=twtzn&u="+user+"&g="+_67a;
dojo.removeClass(this._codeTextElement,"code_loading");
},_setGroupParams:function(_67b){
this._param_group=_67b;
_67b=this._escape_param(_67b);
this._embedParamsElement.innerHTML="?id=twtzn&g="+_67b;
dojo.removeClass(this._codeTextElement,"code_loading");
},_setQueryParams:function(_67c){
this._param_query=_67c;
_67c=this._escape_param(_67c);
this._embedParamsElement.innerHTML="?id=twtzn&q="+_67c;
dojo.removeClass(this._codeTextElement,"code_loading");
},_escape_param:function(_67d){
_67d=escape(_67d);
_67d=_67d.replace(new RegExp("\\+","g"),"%2B");
_67d=_67d.replace(new RegExp("\\%20","g"),"+");
_67d=escape(_67d);
return _67d;
},_enableControls:function(_67e){
var _67f=(_67e?"addClass":"removeClass");
dojo[_67f](this.domNode,"disabled_controls");
dojo.attr(this._urlElement,"disabled",!_67e);
dojo.attr(this._emailElement,"disabled",!_67e);
dojo.attr(this._codeTextElement,"disabled",!_67e);
},_getScreenName:function(_680){
this._enableControls(false);
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_GENERAL"),content:{action:"ID_TO_USERNAME",user_id:_680},handleAs:"json",load:dojo.hitch(this,"_onGetScreenName_Success"),error:dojo.hitch(this,"_onGetScreenName_Error")});
},_onGetScreenName_Success:function(data,io){
this._enableControls(true);
this._setUserGroupParams(data.screenname,this.groupData.group_name);
},_onGetScreenName_Error:function(data,io){
this._enableControls(true);
alert("Ooops! Sorry, an error has occured and we could not retrieve this url!");
console.error(data);
},_closeDialog:function(){
this._dialog.hide();
this.destroy();
},_validateStepOne:function(){
if(this._emailElement.value==""||this._emailElement.value.indexOf("@")==-1||this._emailElement.value.indexOf(".")==-1){
alert("Please enter a valid email address");
return false;
}else{
if(this._urlElement.value==""||this._urlElement.value.length<=7||this._urlElement.value.indexOf(".")==-1){
alert("Please enter the URL of your website");
return false;
}
}
if(this._termsCheckboxElement.checked==false){
alert("Please agree to the Terms and Conditions before continuing");
return false;
}
return true;
},_onCancelButtonClick:function(e){
this._closeDialog();
},_onNextButtonClick:function(e){
if(this._validateStepOne()){
this._saveStepOne();
}
}});
}
if(!dojo._hasResource["tweetizen.ui.TweetList"]){
dojo._hasResource["tweetizen.ui.TweetList"]=true;
dojo.provide("tweetizen.ui.TweetList");
dojo.declare("tweetizen.ui.TweetList",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"tweet_list tweet_list_loading\">\r\n\t\r\n\t<div class=\"header\" dojoAttachPoint=\"_headerElement\">\r\n\t\t\r\n\t\t<div class=\"title\">Viewing: <span class=\"title_text\" dojoAttachPoint=\"_titleTextElement\"></span></div>\r\n\t\t\r\n\t\t<div class=\"embed_group button\" dojoAttachPoint=\"_embedGroupButton\" dojoAttachEvent=\"click: _onEmbed_OnClick\">Embed</div>\r\n\t\t<div class=\"share_group button\" dojoAttachPoint=\"_shareGroupButton\" dojoAttachEvent=\"click: _onShare_OnClick\">Share</div>\r\n\t\t<div class=\"auto_update button\" dojoAttachPoint=\"_autoUpdateButton\" dojoAttachEvent=\"click: _onAutoUpdate_OnClick\">Auto Update</div>\r\n\r\n\t\t<span style=\"clear:both\"></span>\r\n  </div>\t\t\r\n  \r\n  <!-- new tweets element -->\r\n\t<div class=\"new_tweets\" dojoAttachPoint=\"_newTweetsElement\" dojoAttachEvent=\"click: _newTweetsElement_OnClick\"></div>\r\n  \r\n\t<!-- no tweet results -->\r\n\t<div class=\"no_tweet_results\" dojoAttachPoint=\"_noTweetResultsElement\">\r\n\t\tOops! Sorry, but the tags you chose did not yield any tweets.<br />Try another search.\r\n\t</div>\t\r\n  \r\n  <!-- tweet collection -->\r\n\t<div class=\"tweet_collection\" dojoAttachPoint=\"_tweetCollectionElement\"></div>\r\n\t\r\n\t<!-- pager --> \r\n\t<div class=\"pager\" dojoAttachPoint=\"_pagerElement\">\r\n\t\t<a href=\"javascript:void(0);\" class=\"newer_link disabled\" dojoAttachPoint=\"_newerLinkElement\" dojoAttachEvent=\"click: _newerLinkElement_OnClick\" title=\"Newer Tweets\">less</a>\r\n\t\t<a href=\"javascript:void(0);\" class=\"older_link link_large\" dojoAttachPoint=\"_olderLinkElement\" dojoAttachEvent=\"click: _olderLinkElement_OnClick\" title=\"Older Tweets\">more</a>\r\n\t\t<br style=\"clear: both\" />\r\n\t</div>\t\r\n\t\r\n</div>\r\n",UPDATED_TWEET_COLOR:"#ffedbb",UPDATED_TWEET_FADE_TIME:1600,store:null,_isLoading:false,_currentGroupData:null,_currentQueryData:null,onAfterLogin_Publish:null,_lastQuery:null,_currentPage:1,per_page:12,autoUpdate:false,checkForUpdates:true,_updateCheckOffset:30000,_updateIntervalRef:null,_lastUpdateData:null,_tweetCollectionElement:null,_noTweetResultsElement:null,_headerElement:null,_newerLinkElement:null,_olderLinkElement:null,_newTweetsElement:null,_titleTextElement:null,_autoUpdateButton:null,_shareGroupButton:null,_embedGroupButton:null,_pagerElement:null,postCreate:function(){
if(this.store!=null){
this._initializeDataStore();
}
dojo.subscribe("TweetList/LoadGroup",this,"loadGroup");
dojo.subscribe("TweetList/LoadQuery",this,"loadQuery");
this.onAfterLogin_Publish="TweetList/OnAfterSucessfulLogin";
dojo.subscribe(this.onAfterLogin_Publish,dojo.hitch(this,"_onEmbed_OnClick"));
if(window.auto_load!=null){
this._loadAutoLoad();
}
},_loadAutoLoad:function(){
if(typeof window.auto_load=="string"){
dojo.publish("TweetList/LoadQuery",[window.auto_load]);
}else{
var _687=tweetizen.ui.GroupHelper.queryFromJson(window.auto_load);
dojo.publish("TweetList/LoadGroup",[window.auto_load.id,window.auto_load.name,_687,window.auto_load]);
}
},_initializeDataStore:function(){
this.store.request=this.store.request||{};
this.store.request.onBegin=dojo.hitch(this,"_dataStore_OnBegin");
this.store.request.onComplete=dojo.hitch(this,"_dataStore_OnComplete");
if(this.store.id!=null){
dojo.subscribe("TwitterSearchStore"+this.store.id+"/NewItems",dojo.hitch(this,"_OnUpdatedItems"));
}
},_setLoading:function(_688){
this._isLoading=_688;
var _689=(_688?"addClass":"removeClass");
dojo[_689](this.domNode,"tweet_list_loading");
},_createTweet:function(_68a){
var _68b=new tweetizen.ui.Tweet({dataItem:_68a,isStoreItem:true,store:this.store});
this._tweetCollectionElement.appendChild(_68b.domNode);
},_createTweetUpdate:function(_68c){
var _68d=new tweetizen.ui.Tweet({dataItem:_68c,isStoreItem:false});
if(this._tweetCollectionElement.childNodes.length>0){
this._tweetCollectionElement.insertBefore(_68d.domNode,this._tweetCollectionElement.firstChild);
this._highlightTweet(_68d.domNode);
}else{
this._tweetCollectionElement.appendChild(_68d.domNode);
}
if(this._tweetCollectionElement.childNodes.length>this.per_page){
this._tweetCollectionElement.removeChild(this._tweetCollectionElement.lastChild);
this._enableOlderLink(true);
}
},_highlightTweet:function(_68e){
if(!dojo.isSafari){
dojox.fx.highlight({node:_68e,color:this.UPDATED_TWEET_COLOR,duration:this.UPDATED_TWEET_FADE_TIME}).play();
}else{
_68e.style.backgroundColor=this.UPDATED_TWEET_COLOR;
setTimeout(function(){
_68e.style.backgroundColor="transparent";
},this.UPDATED_TWEET_FADE_TIME);
}
},_setCurrentPage:function(page){
this._currentPage=page;
this._enableNewerLink(page!=1);
this._enableOlderLink(this.store.has_next_page);
if(this._currentPage==1){
this._showNewTweetCount(false);
this._autoUpdateButton.style.display="block";
this._startUpdateCheck();
}else{
this._autoUpdateButton.style.display="none";
}
},_enableNewerLink:function(_690){
var _691=(!_690?"addClass":"removeClass");
dojo[_691](this._newerLinkElement,"disabled");
if(!_690){
dojo.addClass(this._olderLinkElement,"link_large");
}else{
dojo.removeClass(this._olderLinkElement,"link_large");
}
},_enableOlderLink:function(_692){
var _693=(!_692?"addClass":"removeClass");
dojo[_693](this._olderLinkElement,"disabled");
},_showNewTweetCount:function(_694){
if(_694!=false){
this._newTweetsElement.innerHTML=_694+(_694==1?" new Tweet...":" new Tweets...");
this._newTweetsElement.style.display="block";
}else{
this._newTweetsElement.style.display="none";
}
},_navigatePages:function(_695){
if((this._currentPage+_695)>=1){
this._currentPage+=_695;
this.store.request.query.page=this._currentPage;
this.store.request.query.rpp=this.per_page;
this._setLoading(true);
this.store.fetch(this.store.request);
}
},_startUpdateCheck:function(){
this._stopUpdateCheck();
if(this.checkForUpdates){
this._updateIntervalRef=setInterval(dojo.hitch(this,function(){
this._checkForUpdates();
}),this._updateCheckOffset);
}
},_stopUpdateCheck:function(){
if(this._updateIntervalRef!=null){
clearInterval(this._updateIntervalRef);
}
},_checkForUpdates:function(){
this.store.checkForNewItems(this.autoUpdate);
},_displayShareDialog:function(){
var _696=new tweetizen.ui.ShareDialog({groupData:this._currentGroupData,queryData:this._currentQueryData},dojo.doc.createElement("div"));
_696.show();
},_displayEmbedDialog:function(){
var _697=new tweetizen.ui.EmbedDialog({groupData:this._currentGroupData,queryData:this._currentQueryData},dojo.doc.createElement("div"));
_697.show();
},_OnUpdatedItems:function(_698,_699){
if(this.autoUpdate){
this._showNewTweetCount(false);
this._loadUpdatedItems(_699);
}else{
this._showNewTweetCount(_698);
this._lastUpdateData=_699;
}
},_loadUpdatedItems:function(_69a){
for(var i=0;i<_69a.length;i++){
if(i<this.per_page){
var _69c=_69a[i];
this._createTweetUpdate(_69c,true);
}else{
i=_69a.length;
break;
}
}
},_dataStore_OnBegin:function(_69d){
this._setLoading(true);
},_dataStore_OnComplete:function(_69e){
dojo.attr(this._tweetCollectionElement,"innerHTML","");
this._noTweetResultsElement.style.display="none";
if(_69e.length>0){
this._displayNoResults(false);
dojo.forEach(_69e,function(_69f){
this._createTweet(_69f);
},this);
if(this.store.request.query.page){
this._setCurrentPage(this.store.request.query.page);
}
}else{
this._displayNoResults(true);
}
this._setLoading(false);
},_displayNoResults:function(_6a0){
if(_6a0){
this._noTweetResultsElement.style.display="block";
this._pagerElement.style.display="none";
}else{
this._noTweetResultsElement.style.display="none";
this._pagerElement.style.display="block";
}
},loadGroup:function(_6a1,_6a2,_6a3,obj){
this._stopUpdateCheck();
dojo.attr(this._tweetCollectionElement,"innerHTML","");
this._setLoading(true);
if(obj.language==null||obj.language=="any"){
obj.language="all";
}
var _6a5={q:_6a3,lang:obj.language};
this.store.fetch({query:_6a5});
var _6a6=_6a2.replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;");
this._titleTextElement.innerHTML=_6a6;
this._currentGroupData={"group_id":_6a1,"group_name":_6a2,"query":_6a3,"obj":obj};
this._currentQueryData=null;
this._lastQuery=_6a3;
},loadQuery:function(_6a7){
this._stopUpdateCheck();
dojo.attr(this._tweetCollectionElement,"innerHTML","");
this._setLoading(true);
this.store.fetch({query:{q:_6a7}});
var _6a8=_6a7.replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;");
this._titleTextElement.innerHTML=_6a7;
this._currentQueryData=_6a7;
this._currentGroupData=null;
this._lastQuery=_6a7;
},_openLoginDialog:function(_6a9){
var _6aa=(_6a9==true?null:this.onAfterLogin_Publish);
var _6ab=new tweetizen.auth_widget({onAfterLogin_Publish:_6aa});
_6ab.show();
},_newTweetsElement_OnClick:function(){
if(this._lastUpdateData==null){
return;
}
if(this._currentPage==1){
this._showNewTweetCount(false);
this.store.resetMaxId();
this._loadUpdatedItems(this._lastUpdateData);
}else{
dojo.attr(this._tweetCollectionElement,"innerHTML","");
this._setLoading(true);
var _6ac=dojo.clone(this._lastQuery);
_6ac.page=1;
this.store.fetch({query:{q:_6ac}});
}
this._lastUpdateData=null;
},_onEmbed_OnClick:function(e){
if(tweetizen.logged_in_user!=null){
this._displayEmbedDialog();
}else{
this._openLoginDialog();
}
},_onShare_OnClick:function(e){
this._displayShareDialog();
},_onAutoUpdate_OnClick:function(){
var _6af=dojo.hasClass(this._autoUpdateButton,"button_selected");
if(_6af){
dojo.removeClass(this._autoUpdateButton,"button_selected");
this.autoUpdate=false;
}else{
dojo.addClass(this._autoUpdateButton,"button_selected");
this.autoUpdate=true;
}
},_newerLinkElement_OnClick:function(){
if(!dojo.hasClass(this._newerLinkElement,"disabled")){
this._navigatePages(-1);
}
},_olderLinkElement_OnClick:function(){
if(!dojo.hasClass(this._olderLinkElement,"disabled")){
this._navigatePages(1);
}
}});
(function(){
var _6b0="(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)";
var _6b1="([!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]*)";
this.titleCaps=function(_6b2){
var _6b3=[],_6b4=/[:.;?!] |(?: |^)["Ò]/g,_6b5=0;
while(true){
var m=_6b4.exec(_6b2);
_6b3.push(_6b2.substring(_6b5,m?m.index:_6b2.length).replace(/\b([A-Za-z][a-z.'Õ]*)\b/g,function(all){
return /[A-Za-z]\.[A-Za-z]/.test(all)?all:upper(all);
}).replace(RegExp("\\b"+_6b0+"\\b","ig"),lower).replace(RegExp("^"+_6b1+_6b0+"\\b","ig"),function(all,_6b9,word){
return _6b9+upper(word);
}).replace(RegExp("\\b"+_6b0+_6b1+"$","ig"),upper));
_6b5=_6b4.lastIndex;
if(m){
_6b3.push(m[0]);
}else{
break;
}
}
return _6b3.join("").replace(/ V(s?)\. /ig," v$1. ").replace(/(['Õ])S\b/ig,"$1s").replace(/\b(AT&T|Q&A)\b/ig,function(all){
return all.toUpperCase();
});
};
function lower(word){
return word.toLowerCase();
};
function upper(word){
return word.substr(0,1).toUpperCase()+word.substr(1);
};
})();
}
if(!dojo._hasResource["tweetizen.ui.Tweeter"]){
dojo._hasResource["tweetizen.ui.Tweeter"]=true;
dojo.provide("tweetizen.ui.Tweeter");
dojo.declare("tweetizen.ui.Tweeter",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"tweeter\">\r\n\t<div class=\"title\">What are you doing?</div>\r\n\t<div class=\"character_count\" dojoAttachPoint=\"_characterCountElement\">140</div>\r\n\t\r\n\t<div class=\"tweet_content_container\" dojoAttachPoint=\"_tweetContentContainer\">\r\n\t\t<textarea class=\"tweet_text\" dojoAttachPoint=\"_tweetTextElement\" dojoAttachEvent=\"onchange: _tweetTextElement_OnChange, onkeyup: _tweetTextElement_OnChange\"></textarea>\r\n\t\t\r\n\t\t<div class=\"tag_container\" dojoAttachPoint=\"_tagContainerElement\" style=\"display:none\">\r\n\t\t\t<div class=\"tag_title\">Tag Your Tweet:</div>\r\n\t\t\t<span dojoAttachPoint=\"_tagCollectionElement\"></span>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"people_container\" dojoAttachPoint=\"_peopleContainerElement\" style=\"display:none\">\r\n\t\t\t<div class=\"people_title\">Quick Tweet:</div>\r\n\t\t\t<select class=\"people_collection\" dojoAttachPoint=\"_peopleCollectionElement\"></select>\r\n\t\t\t<div class=\"insert_person\" dojoAttachPoint=\"_insertPersonButtonElement\" dojoAttachEvent=\"click: _onInsertPersonButtonClick\">insert</div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<button class=\"submit_tweet submit_tweet_disabled\" disabled=\"true\" dojoAttachPoint=\"_submitButtonElement\" dojoAttachEvent=\"click: _submitButton_OnClick\"></button>\r\n\t\t<br style=\"clear:both\" />\r\n\t\t\r\n\t\t<!-- tag item template, replecated for every tag item... -->\r\n\t\t<div class=\"tag\" dojoAttachPoint=\"_tagItemTemplateElement\" style=\"display:none\"></div>\r\n\t\t\r\n\t</div>\r\n</div>\r\n",onAfterLogin_Publish:null,MAX_CHARACTER_LENGTH:140,_reply_to_tweet_id:null,_last_reply_username:null,_tweetContentContainer:null,_characterCountElement:null,_tweetTextElement:null,_tagContainerElement:null,_tagCollectionElement:null,_tagItemTemplateElement:null,_submitButtonElement:null,_peopleContainerElement:null,_peopleCollectionElement:null,_insertPersonButtonElement:null,postCreate:function(){
dojo.subscribe("TweetList/LoadGroup",dojo.hitch(this,"_onGroupChange"));
dojo.subscribe("TweetList/LoadQuery",dojo.hitch(this,"_onLoadQuery"));
dojo.subscribe("Tweet/OnReplyClick",dojo.hitch(this,"_onReplyClick"));
dojo.subscribe("Tweet/OnRetweetClick",dojo.hitch(this,"_onRetweetClick"));
this.onAfterLogin_Publish="Tweetizen/OnAfterSuccessfulLogin";
dojo.subscribe(this.onAfterLogin_Publish,dojo.hitch(this,"_submitButton_OnClick"));
},_onGroupChange:function(_6be,_6bf,_6c0,_6c1){
this._peopleContainerElement.style.display="none";
this._tagContainerElement.style.display="none";
if(_6be>0){
if(_6c1.tags!=null&&_6c1.tags.length>0){
this._refreshTags(_6c1.tags);
}else{
if(_6c1.users!=null&&_6c1.users.length>0){
this._refreshPeople(_6c1.users);
}
}
}
},_refreshTags:function(tags){
this._tagCollectionElement.innerHTML="";
this._peopleContainerElement.style.display="none";
this._tagContainerElement.style.display="block";
dojo.forEach(tags,function(tag){
var _6c4=dojo.clone(this._tagItemTemplateElement);
_6c4.removeAttribute("dojoAttachPoint");
_6c4.style.display="block";
var _6c5=tag.substr(0,1).toUpperCase()+tag.substr(1);
_6c4.innerHTML=_6c5;
dojo.connect(_6c4,"click",this,function(){
this._toggleTweetTag(_6c4,tag);
});
this._tagCollectionElement.appendChild(_6c4);
},this);
},_refreshPeople:function(_6c6){
this._peopleCollectionElement.length=0;
this._tagContainerElement.style.display="none";
this._peopleContainerElement.style.display="block";
dojo.forEach(_6c6,function(_6c7){
var _6c8=new Option(("@"+_6c7),("@"+_6c7),false,false);
this._peopleCollectionElement.options[this._peopleCollectionElement.options.length]=_6c8;
},this);
},_onLoadQuery:function(_6c9){
this._peopleContainerElement.style.display="none";
if(_6c9&&_6c9.substr(0,1)=="#"){
var tag=_6c9.substr(1);
this._refreshTags([tag]);
}else{
this._tagCollectionElement.innerHTML="";
this._tagContainerElement.style.display="none";
}
},_toggleTweetTag:function(_6cb,tag){
var _6cd=" #"+tag;
if(!dojo.hasClass(_6cb,"tag_selected")){
dojo.addClass(_6cb,"tag_selected");
this._tweetTextElement.value+=_6cd;
}else{
dojo.removeClass(_6cb,"tag_selected");
this._tweetTextElement.value=this._tweetTextElement.value.replace(new RegExp(_6cd+"\\b","g"),"");
}
this._updateRemainingCharacters();
this._tweetTextElement.focus();
},_sendTweet:function(){
this._enableControls(false);
var _6ce=null;
if(this._isReplying()){
_6ce=this._reply_to_tweet_id;
}
dojo.xhrPost({url:tweetizen.data.Locations.getLocation("USER_TWEET"),content:{tweet:this._tweetTextElement.value,reply_to:_6ce},handleAs:"text",load:dojo.hitch(this,"_onSendTweet_Success"),error:dojo.hitch(this,"_onSendTweet_Error")});
},_isReplying:function(){
if(this._reply_to_tweet_id&&this._last_reply_username){
if(this._tweetTextElement.value.substr(0,this._last_reply_username.length)==this._last_reply_username){
return true;
}
}
return false;
},_onSendTweet_Success:function(data,io){
this._tweetTextElement.value="";
this._submitButtonElement.setAttribute("disabled",true);
this._reply_to_tweet_id=null;
this._last_reply_username=null;
this._unCheckAllTags();
this._enableControls(true);
this._updateRemainingCharacters();
dojo.publish("Tweeter/OnTweetSent");
},_onSendTweet_Error:function(data,io){
var _6d3="";
if(io.xhr.status==500){
_6d3="Ooops, it appears as though you are not Signed In.";
alert(_6d3);
this._openLoginDialog();
}else{
_6d3="Sorry! Twitter seems to be having some problems, please try again in a few seconds...";
alert(_6d3);
}
this._enableControls(true);
},_enableControls:function(_6d4){
var _6d5=(_6d4?"addClass":"removeClass");
dojo[_6d5](this.domNode,"disabled_controls");
dojo.attr(this._tweetTextElement,"disabled",!_6d4);
dojo.attr(this._submitButtonElement,"disabled",!_6d4);
},_updateRemainingCharacters:function(){
var _6d6=(this.MAX_CHARACTER_LENGTH-this._tweetTextElement.value.length);
this._characterCountElement.innerHTML=_6d6;
if(_6d6<0){
dojo.addClass(this._characterCountElement,"character_count_over");
}else{
dojo.removeClass(this._characterCountElement,"character_count_over");
}
if(_6d6==this.MAX_CHARACTER_LENGTH){
this._submitButtonElement.setAttribute("disabled",true);
dojo.addClass(this._submitButtonElement,"submit_tweet_disabled");
this._reply_to_tweet_id=null;
this._last_reply_username=null;
}else{
this._submitButtonElement.removeAttribute("disabled");
dojo.removeClass(this._submitButtonElement,"submit_tweet_disabled");
}
},_unCheckAllTags:function(){
dojo.query(".tag_selected",this.domNode).removeClass("tag_selected");
},_validate:function(){
if(dojo.trim(this._tweetTextElement.value)==""){
alert("Please enter a Tweet to send");
return false;
}else{
if(this._tweetTextElement.value.length>this.MAX_CHARACTER_LENGTH){
alert("Tweet text cannot be longer than "+this.MAX_CHARACTER_LENGTH+" characters!");
return false;
}
}
return true;
},_insertUsername:function(_6d7){
var _6d8=this._tweetTextElement.value;
if(_6d8.length>0&&_6d8.substr(0,1)=="@"){
var _6d9=_6d8.substr(_6d8.indexOf(" ")+1);
this._tweetTextElement.value=_6d9;
}
this._tweetTextElement.value=_6d7+" "+this._tweetTextElement.value;
},_openLoginDialog:function(_6da){
var _6db=(_6da==true?null:this.onAfterLogin_Publish);
var _6dc=new tweetizen.auth_widget({onAfterLogin_Publish:_6db});
_6dc.show();
},_onReplyClick:function(_6dd,_6de){
this._reply_to_tweet_id=_6dd;
this._last_reply_username="@"+_6de;
this._insertUsername("@"+_6de);
this._updateRemainingCharacters();
},_onRetweetClick:function(_6df,_6e0){
this._reply_to_tweet_id=null;
this._last_reply_username=null;
this._tweetTextElement.value=("RT @"+_6df+": "+_6e0);
this._updateRemainingCharacters();
},_submitButton_OnClick:function(e){
if(tweetizen.logged_in_user!=null){
if(this._validate()){
this._sendTweet();
}
}else{
this._openLoginDialog();
}
},_onInsertPersonButtonClick:function(){
this._insertUsername(this._peopleCollectionElement.value);
this._updateRemainingCharacters();
this._reply_to_tweet_id=null;
this._last_reply_username=null;
},_tweetTextElement_OnChange:function(e){
this._updateRemainingCharacters();
}});
}
if(!dojo._hasResource["tweetizen.data.TwitterSearchStore"]){
dojo._hasResource["tweetizen.data.TwitterSearchStore"]=true;
dojo.provide("tweetizen.data.TwitterSearchStore");
dojo.declare("tweetizen.data.TwitterSearchStore",[dojox.data.ServiceStore],{max_id:null,has_next_page:null,has_previous_page:null,constructor:function(){
var svc=new dojox.rpc.Service(tweetizen.data._twitterSearchSMD);
this.id=Math.floor(Math.random()*9999999999);
this.service=svc.query;
this.idAttribute="id";
this.labelAttribute="text";
this.request={};
},fetch:function(_6e4){
var _6e5=dojo.mixin(this.request,_6e4);
_6e5.since_id=null;
_6e4=this.request;
return this.inherited(arguments);
},_processResults:function(data,_6e7){
if(data.page==1){
this.max_id=data.max_id;
}
this.has_next_page=(data.next_page!=null);
this.has_previous_page=(data.previous_page!=null);
var _6e8=data.results;
return {totalCount:_6e8.length,items:_6e8};
},resetMaxId:function(){
this.max_id=this.last_update_max_id;
},checkForNewItems:function(_6e9){
var _6ea=dojo.clone(this.request.query);
_6ea.page=1;
_6ea.rpp=100;
_6ea.since_id=this.max_id;
var _6eb=this.service(_6ea);
_6eb.addCallback(dojo.hitch(this,function(_6ec){
if(_6ec.max_id=="-1"){
return;
}
this.last_update_max_id=_6ec.max_id;
if(_6e9){
this.max_id=_6ec.max_id;
}
var _6ed=_6ec.results.length;
if(_6ed>0){
dojo.publish("TwitterSearchStore"+this.id+"/NewItems",[_6ed,_6ec.results]);
}
}));
}});
tweetizen.data._twitterSearchSMD={"SMDVersion":"2.0","id":"http://search.twitter.com/search","description":"Twitter Search API",transport:"JSONP",envelope:"URL",additionalParameters:true,target:"http://search.twitter.com/search.json",services:{query:{parameters:[{name:"q",type:"string",optional:false},{name:"lang",type:"string",optional:true},{name:"rpp",type:"integer","default":12},{name:"page",type:"integer","default":1},{name:"since_id",type:"string",optional:true},{name:"geocode",type:"string",optional:true},{name:"show_user",type:"boolean",optional:true}]}}};
}
if(!dojo._hasResource["tweetizen.ui.TrendsPanel"]){
dojo._hasResource["tweetizen.ui.TrendsPanel"]=true;
dojo.provide("tweetizen.ui.TrendsPanel");
dojo.declare("tweetizen.ui.TrendsPanel",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"trends_panel\">\r\n\t<div class=\"caption\">\r\n\t\t<h2>Latest Twitter Trends</h2>\r\n\t</div>\r\n\t<ul class=\"trends_container\" dojoAttachPoint=\"_trendsContainerElement\"></ul>\r\n</div>\r\n",TRENDS_URL:"http://search.twitter.com/trends.json",TRENDS_DISPLAY_COUNT:5,_trendsContainerElement:null,postCreate:function(){
dojo.subscribe("TrendsPanel/RemoveSelectedItems",dojo.hitch(this,"_removeSelectedItems"));
this._refreshData();
},_refreshData:function(){
var _6ee=dojo.io.script.get({url:this.TRENDS_URL,callbackParamName:"callback"});
_6ee.addCallback(dojo.hitch(this,"_onDataReceived_Success"));
_6ee.addErrback(dojo.hitch(this,"_onDataReceived_Error"));
},_onDataReceived_Success:function(data,io){
this._loadTrendResults(data.trends);
},_onDataReceived_Error:function(data,io){
console.error("Error retieving trends data",data);
},_loadTrendResults:function(_6f3){
dojo.forEach(_6f3,function(_6f4,_6f5){
if(_6f5<this.TRENDS_DISPLAY_COUNT){
var _6f6=this._createTrend(_6f4);
this._trendsContainerElement.appendChild(_6f6);
}
},this);
},_createTrend:function(_6f7){
var _6f8=dojo.doc.createElement("li");
_6f8.setAttribute("class","trend");
var name=_6f7.name.replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;");
_6f8.innerHTML=name;
dojo.connect(_6f8,"onclick",this,function(){
dojo.publish("TweetList/LoadQuery",[_6f7.name]);
dojo.publish("GroupList/RemoveSelectedItems");
this._removeSelectedItems();
dojo.addClass(_6f8,"selected_trend");
});
return _6f8;
},_removeSelectedItems:function(){
dojo.query(".selected_trend",this.domNode).removeClass("selected_trend");
}});
}
if(!dojo._hasResource["tweetizen.ui.FeaturedPanel"]){
dojo._hasResource["tweetizen.ui.FeaturedPanel"]=true;
dojo.provide("tweetizen.ui.FeaturedPanel");
dojo.declare("tweetizen.ui.FeaturedPanel",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"featured_panel\">\r\n\t<div class=\"caption\">\r\n\t\t<h2>Featured Groups</h2>\r\n\t</div>\r\n\t\r\n\t<!-- group images -->\r\n\t<div class=\"group_images\" dojoAttachPoint=\"_groupImageCollection\"></div>\r\n</div>\r\n",data:null,_groupImageCollection:null,postCreate:function(){
if(this.data!=null){
this._refreshData();
}else{
console.error("Error - Featured group data was not supplied");
}
},_refreshData:function(){
var _6fa;
for(var _6fb=0;_6fb<this.data.length;_6fb++){
_6fa=this.data[_6fb];
var _6fc=dojo.doc.createElement("img");
dojo.addClass(_6fc,"group_image");
_6fc.setAttribute("title",_6fa.name);
_6fc.setAttribute("src",_6fa.img);
_6fc.setAttribute("indx",_6fb);
dojo.connect(_6fc,"click",this,"_groupImage_OnClick");
this._groupImageCollection.appendChild(_6fc);
}
var _6fd=dojo.doc.createElement("br");
_6fd.style.clear="both";
this._groupImageCollection.appendChild(_6fd);
},_groupImage_OnClick:function(e){
var _6ff=e.target.getAttribute("indx");
var _700=this.data[parseInt(_6ff,0)];
var _701=tweetizen.ui.GroupHelper.queryFromJson(_700);
dojo.publish("TweetList/LoadGroup",[_700.id,_700.name,_701,_700]);
}});
}
dojo.provide("tweetizen.nls.app_en");dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en");dijit.nls.loading.en={"loadingState":"Loading...","errorState":"Sorry, an error occurred"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={"buttonOk":"OK","buttonCancel":"Cancel","buttonSave":"Save","itemClose":"Close"};
