if(!dojo._hasResource["dijit.layout.ContentPane"]){
dojo._hasResource["dijit.layout.ContentPane"]=true;
dojo.provide("dijit.layout.ContentPane");
dojo.require("dijit._Widget");
dojo.require("dijit.layout._LayoutWidget");
dojo.require("dojo.parser");
dojo.require("dojo.string");
dojo.requireLocalization("dijit","loading",null,"zh,pt,da,tr,ru,ROOT,de,sv,ja,he,fi,nb,el,ar,pt-pt,cs,fr,es,ko,nl,zh-tw,pl,it,hu");
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,"class":"dijitContentPane",doLayout:"auto",postCreate:function(){
this.domNode.title="";
if(!this.containerNode){
this.containerNode=this.domNode;
}
if(this.preload){
this._loadCheck();
}
var _1=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_1);
this.errorMessage=dojo.string.substitute(this.errorMessage,_1);
var _2=dijit.getWaiRole(this.domNode);
if(!_2){
dijit.setWaiRole(this.domNode,"group");
}
dojo.addClass(this.domNode,this["class"]);
},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 _3=dojo.query(">",this.containerNode||this.domNode),_4=_3.filter("[widgetId]");
if(_3.length==1&&_4.length==1){
this.isContainer=true;
this._singleChild=dijit.byNode(_4[0]);
}else{
delete this.isContainer;
delete this._singleChild;
}
},refresh:function(){
return this._prepareLoad(true);
},setHref:function(_5){
this.href=_5;
return this._prepareLoad();
},setContent:function(_6){
if(!this._isDownloaded){
this.href="";
this._onUnloadHandler();
}
this._setContent(_6||"");
this._isDownloaded=false;
if(this.parseOnLoad){
this._createSubWidgets();
}
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild&&this._singleChild.resize){
this._singleChild.startup();
this._singleChild.resize(this._contentBox||dojo.contentBox(this.containerNode||this.domNode));
}
}
this._onLoadHandler();
},cancel:function(){
if(this._xhrDfd&&(this._xhrDfd.fired==-1)){
this._xhrDfd.cancel();
}
delete this._xhrDfd;
},destroy:function(){
if(this._beingDestroyed){
return;
}
this._onUnloadHandler();
this._beingDestroyed=true;
this.inherited("destroy",arguments);
},resize:function(_7){
dojo.marginBox(this.domNode,_7);
var _8=this.containerNode||this.domNode,mb=dojo.mixin(dojo.marginBox(_8),_7||{});
this._contentBox=dijit.layout.marginBox2contentBox(_8,mb);
if(this._singleChild&&this._singleChild.resize){
this._singleChild.resize(this._contentBox);
}
},_prepareLoad:function(_a){
this.cancel();
this.isLoaded=false;
this._loadCheck(_a);
},_isShown:function(){
if("open" in this){
return this.open;
}else{
var _b=this.domNode;
return (_b.style.display!="none")&&(_b.style.visibility!="hidden");
}
},_loadCheck:function(_c){
var _d=this._isShown();
if(this.href&&(_c||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_d&&!this._xhrDfd)||(!this.isLoaded&&_d&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._onUnloadHandler();
this._setContent(this.onDownloadStart.call(this));
var _e=this;
var _f={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_f,this.ioArgs);
}
var _10=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_f);
_10.addCallback(function(_11){
try{
_e.onDownloadEnd.call(_e);
_e._isDownloaded=true;
_e.setContent.call(_e,_11);
}
catch(err){
_e._onError.call(_e,"Content",err);
}
delete _e._xhrDfd;
return _11;
});
_10.addErrback(function(err){
if(!_10.cancelled){
_e._onError.call(_e,"Download",err);
}
delete _e._xhrDfd;
return err;
});
},_onLoadHandler:function(){
this.isLoaded=true;
try{
this.onLoad.call(this);
}
catch(e){
console.error("Error "+this.widgetId+" running custom onLoad code");
}
},_onUnloadHandler:function(){
this.isLoaded=false;
this.cancel();
try{
this.onUnload.call(this);
}
catch(e){
console.error("Error "+this.widgetId+" running custom onUnload code");
}
},_setContent:function(_13){
this.destroyDescendants();
try{
var _14=this.containerNode||this.domNode;
while(_14.firstChild){
dojo._destroyElement(_14.firstChild);
}
if(typeof _13=="string"){
if(this.extractContent){
match=_13.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(match){
_13=match[1];
}
}
_14.innerHTML=_13;
}else{
if(_13.nodeType){
_14.appendChild(_13);
}else{
dojo.forEach(_13,function(n){
_14.appendChild(n.cloneNode(true));
});
}
}
}
catch(e){
var _16=this.onContentError(e);
try{
_14.innerHTML=_16;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
}
},_onError:function(_17,err,_19){
var _1a=this["on"+_17+"Error"].call(this,err);
if(_19){
console.error(_19,err);
}else{
if(_1a){
this._setContent.call(this,_1a);
}
}
},_createSubWidgets:function(){
var _1b=this.containerNode||this.domNode;
try{
dojo.parser.parse(_1b,true);
}
catch(e){
this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));
}
},onLoad:function(e){
},onUnload:function(e){
},onDownloadStart:function(){
return this.loadingMessage;
},onContentError:function(_1e){
},onDownloadError:function(_1f){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
if(!dojo._hasResource["dijit.form.Form"]){
dojo._hasResource["dijit.form.Form"]=true;
dojo.provide("dijit.form.Form");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare("dijit.form._FormMixin",null,{reset:function(){
dojo.forEach(this.getDescendants(),function(_1){
if(_1.reset){
_1.reset();
}
});
},validate:function(){
var _2=false;
return dojo.every(dojo.map(this.getDescendants(),function(_3){
_3._hasBeenBlurred=true;
var _4=!_3.validate||_3.validate();
if(!_4&&!_2){
dijit.scrollIntoView(_3.containerNode||_3.domNode);
_3.focus();
_2=true;
}
return _4;
}),"return item;");
},setValues:function(_5){
var _6={};
dojo.forEach(this.getDescendants(),function(_7){
if(!_7.name){
return;
}
var _8=_6[_7.name]||(_6[_7.name]=[]);
_8.push(_7);
});
for(var _9 in _6){
var _a=_6[_9],_b=dojo.getObject(_9,false,_5);
if(!dojo.isArray(_b)){
_b=[_b];
}
if(typeof _a[0].checked=="boolean"){
dojo.forEach(_a,function(w,i){
w.setValue(dojo.indexOf(_b,w.value)!=-1);
});
}else{
if(_a[0]._multiValue){
_a[0].setValue(_b);
}else{
dojo.forEach(_a,function(w,i){
w.setValue(_b[i]);
});
}
}
}
},getValues:function(){
var obj={};
dojo.forEach(this.getDescendants(),function(_11){
var _12=_11.name;
if(!_12){
return;
}
var _13=(_11.getValue&&!_11._getValueDeprecated)?_11.getValue():_11.value;
if(typeof _11.checked=="boolean"){
if(/Radio/.test(_11.declaredClass)){
if(_13!==false){
dojo.setObject(_12,_13,obj);
}
}else{
var ary=dojo.getObject(_12,false,obj);
if(!ary){
ary=[];
dojo.setObject(_12,ary,obj);
}
if(_13!==false){
ary.push(_13);
}
}
}else{
dojo.setObject(_12,_13,obj);
}
});
return obj;
},isValid:function(){
return dojo.every(this.getDescendants(),function(_15){
return !_15.isValid||_15.isValid();
});
}});
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(_16){
},onExecute:function(){
},setAttribute:function(_17,_18){
this.inherited(arguments);
switch(_17){
case "encType":
if(dojo.isIE){
this.domNode.encoding=_18;
}
}
},postCreate:function(){
if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){
var _19=this.srcNodeRef.attributes.getNamedItem("encType");
if(_19&&!_19.specified&&(typeof _19.value=="string")){
this.setAttribute("encType",_19.value);
}
}
this.inherited(arguments);
},onReset:function(e){
return true;
},_onReset:function(e){
var _1c={returnValue:true,preventDefault:function(){
this.returnValue=false;
},stopPropagation:function(){
},currentTarget:e.currentTarget,target:e.target};
if(!(this.onReset(_1c)===false)&&_1c.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["dojox.fx._base"]){
dojo._hasResource["dojox.fx._base"]=true;
dojo.provide("dojox.fx._base");
dojo.require("dojo.fx");
dojox.fx.sizeTo=function(_1){
var _2=(_1.node=dojo.byId(_1.node));
var _3=_1.method||"chain";
if(!_1.duration){
_1.duration=500;
}
if(_3=="chain"){
_1.duration=Math.floor(_1.duration/2);
}
var _4,_5,_6,_7,_8,_9=null;
var _a=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var _d=cs.position;
_4=(_d=="absolute"?n.offsetTop:parseInt(cs.top)||0);
_6=(_d=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
_8=parseInt(cs.width);
_9=parseInt(cs.height);
_7=_6-Math.floor((_1.width-_8)/2);
_5=_4-Math.floor((_1.height-_9)/2);
if(_d!="absolute"&&_d!="relative"){
var _e=dojo.coords(n,true);
_4=_e.y;
_6=_e.x;
n.style.position="absolute";
n.style.top=_4+"px";
n.style.left=_6+"px";
}
};
})(_2);
_a();
var _f=dojo.animateProperty(dojo.mixin({properties:{height:{start:_9,end:_1.height||0,unit:"px"},top:{start:_4,end:_5}}},_1));
var _10=dojo.animateProperty(dojo.mixin({properties:{width:{start:_8,end:_1.width||0,unit:"px"},left:{start:_6,end:_7}}},_1));
var _11=dojo.fx[((_1.method=="combine")?"combine":"chain")]([_f,_10]);
dojo.connect(_11,"beforeBegin",_11,_a);
return _11;
};
dojox.fx.slideBy=function(_12){
var _13=(_12.node=dojo.byId(_12.node));
var top=null;
var _15=null;
var _16=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
_15=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
_15=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=_15+"px";
}
};
})(_13);
_16();
var _1b=dojo.animateProperty(dojo.mixin({properties:{top:{end:top+(_12.top||0)},left:{end:_15+(_12.left||0)}}},_12));
dojo.connect(_1b,"beforeBegin",_1b,_16);
return _1b;
};
dojox.fx.crossFade=function(_1c){
if(dojo.isArray(_1c.nodes)){
var _1d=_1c.nodes[0]=dojo.byId(_1c.nodes[0]);
var op1=dojo.style(_1d,"opacity");
var _1f=_1c.nodes[1]=dojo.byId(_1c.nodes[1]);
var op2=dojo.style(_1f,"opacity");
var _21=dojo.fx.combine([dojo[((op1==0)?"fadeIn":"fadeOut")](dojo.mixin({node:_1d},_1c)),dojo[((op1==0)?"fadeOut":"fadeIn")](dojo.mixin({node:_1f},_1c))]);
return _21;
}else{
return false;
}
};
dojox.fx.highlight=function(_22){
var _23=(_22.node=dojo.byId(_22.node));
_22.duration=_22.duration||400;
var _24=_22.color||"#ffff99";
var _25=dojo.style(_23,"backgroundColor");
var _26=(_25=="transparent"||_25=="rgba(0, 0, 0, 0)");
var _27=dojo.animateProperty(dojo.mixin({properties:{backgroundColor:{start:_24,end:_25}}},_22));
dojo.connect(_27,"onEnd",_27,function(){
if(_26){
_23.style.backgroundColor="transparent";
}
});
return _27;
};
dojox.fx.wipeTo=function(_28){
_28.node=dojo.byId(_28.node);
var _29=_28.node,s=_29.style;
var dir=(_28.width?"width":"height");
var _2c=_28[dir];
var _2d={};
_2d[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(_29,dir);
return Math.max(now,1);
}
},end:_2c,unit:"px"};
var _2f=dojo.animateProperty(dojo.mixin({properties:_2d},_28));
return _2f;
};
}
if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){
dojo._hasResource["dojo.data.ItemFileReadStore"]=true;
dojo.provide("dojo.data.ItemFileReadStore");
dojo.require("dojo.data.util.filter");
dojo.require("dojo.data.util.simpleFetch");
dojo.require("dojo.date.stamp");
dojo.declare("dojo.data.ItemFileReadStore",null,{constructor:function(_1){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._jsonFileUrl=_1.url;
this._jsonData=_1.data;
this._datatypeMap=_1.typeMap||{};
if(!this._datatypeMap["Date"]){
this._datatypeMap["Date"]={type:Date,deserialize:function(_2){
return dojo.date.stamp.fromISOString(_2);
}};
}
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=[];
},url:"",_assertIsItem:function(_3){
if(!this.isItem(_3)){
throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
}
},_assertIsAttribute:function(_4){
if(typeof _4!=="string"){
throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
}
},getValue:function(_5,_6,_7){
var _8=this.getValues(_5,_6);
return (_8.length>0)?_8[0]:_7;
},getValues:function(_9,_a){
this._assertIsItem(_9);
this._assertIsAttribute(_a);
return _9[_a]||[];
},getAttributes:function(_b){
this._assertIsItem(_b);
var _c=[];
for(var _d in _b){
if((_d!==this._storeRefPropName)&&(_d!==this._itemNumPropName)&&(_d!==this._rootItemPropName)&&(_d!==this._reverseRefMap)){
_c.push(_d);
}
}
return _c;
},hasAttribute:function(_e,_f){
return this.getValues(_e,_f).length>0;
},containsValue:function(_10,_11,_12){
var _13=undefined;
if(typeof _12==="string"){
_13=dojo.data.util.filter.patternToRegExp(_12,false);
}
return this._containsValue(_10,_11,_12,_13);
},_containsValue:function(_14,_15,_16,_17){
return dojo.some(this.getValues(_14,_15),function(_18){
if(_18!==null&&!dojo.isObject(_18)&&_17){
if(_18.toString().match(_17)){
return true;
}
}else{
if(_16===_18){
return true;
}
}
});
},isItem:function(_19){
if(_19&&_19[this._storeRefPropName]===this){
if(this._arrayOfAllItems[_19[this._itemNumPropName]]===_19){
return true;
}
}
return false;
},isItemLoaded:function(_1a){
return this.isItem(_1a);
},loadItem:function(_1b){
this._assertIsItem(_1b.item);
},getFeatures:function(){
return this._features;
},getLabel:function(_1c){
if(this._labelAttr&&this.isItem(_1c)){
return this.getValue(_1c,this._labelAttr);
}
return undefined;
},getLabelAttributes:function(_1d){
if(this._labelAttr){
return [this._labelAttr];
}
return null;
},_fetchItems:function(_1e,_1f,_20){
var _21=this;
var _22=function(_23,_24){
var _25=[];
if(_23.query){
var _26=_23.queryOptions?_23.queryOptions.ignoreCase:false;
var _27={};
for(var key in _23.query){
var _29=_23.query[key];
if(typeof _29==="string"){
_27[key]=dojo.data.util.filter.patternToRegExp(_29,_26);
}
}
for(var i=0;i<_24.length;++i){
var _2b=true;
var _2c=_24[i];
if(_2c===null){
_2b=false;
}else{
for(var key in _23.query){
var _29=_23.query[key];
if(!_21._containsValue(_2c,key,_29,_27[key])){
_2b=false;
}
}
}
if(_2b){
_25.push(_2c);
}
}
_1f(_25,_23);
}else{
for(var i=0;i<_24.length;++i){
var _2d=_24[i];
if(_2d!==null){
_25.push(_2d);
}
}
_1f(_25,_23);
}
};
if(this._loadFinished){
_22(_1e,this._getItemsArray(_1e.queryOptions));
}else{
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_1e,filter:_22});
}else{
this._loadInProgress=true;
var _2e={url:_21._jsonFileUrl,handleAs:"json-comment-optional"};
var _2f=dojo.xhrGet(_2e);
_2f.addCallback(function(_30){
try{
_21._getItemsFromLoadedData(_30);
_21._loadFinished=true;
_21._loadInProgress=false;
_22(_1e,_21._getItemsArray(_1e.queryOptions));
_21._handleQueuedFetches();
}
catch(e){
_21._loadFinished=true;
_21._loadInProgress=false;
_20(e,_1e);
}
});
_2f.addErrback(function(_31){
_21._loadInProgress=false;
_20(_31,_1e);
});
}
}else{
if(this._jsonData){
try{
this._loadFinished=true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData=null;
_22(_1e,this._getItemsArray(_1e.queryOptions));
}
catch(e){
_20(e,_1e);
}
}else{
_20(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_1e);
}
}
}
},_handleQueuedFetches:function(){
if(this._queuedFetches.length>0){
for(var i=0;i<this._queuedFetches.length;i++){
var _33=this._queuedFetches[i];
var _34=_33.args;
var _35=_33.filter;
if(_35){
_35(_34,this._getItemsArray(_34.queryOptions));
}else{
this.fetchItemByIdentity(_34);
}
}
this._queuedFetches=[];
}
},_getItemsArray:function(_36){
if(_36&&_36.deep){
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close:function(_37){
},_getItemsFromLoadedData:function(_38){
function valueIsAnItem(_39){
var _3a=((_39!=null)&&(typeof _39=="object")&&(!dojo.isArray(_39))&&(!dojo.isFunction(_39))&&(_39.constructor==Object)&&(typeof _39._reference=="undefined")&&(typeof _39._type=="undefined")&&(typeof _39._value=="undefined"));
return _3a;
};
var _3b=this;
function addItemAndSubItemsToArrayOfAllItems(_3c){
_3b._arrayOfAllItems.push(_3c);
for(var _3d in _3c){
var _3e=_3c[_3d];
if(_3e){
if(dojo.isArray(_3e)){
var _3f=_3e;
for(var k=0;k<_3f.length;++k){
var _41=_3f[k];
if(valueIsAnItem(_41)){
addItemAndSubItemsToArrayOfAllItems(_41);
}
}
}else{
if(valueIsAnItem(_3e)){
addItemAndSubItemsToArrayOfAllItems(_3e);
}
}
}
}
};
this._labelAttr=_38.label;
var i;
var _43;
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=_38.items;
for(i=0;i<this._arrayOfTopLevelItems.length;++i){
_43=this._arrayOfTopLevelItems[i];
addItemAndSubItemsToArrayOfAllItems(_43);
_43[this._rootItemPropName]=true;
}
var _44={};
var key;
for(i=0;i<this._arrayOfAllItems.length;++i){
_43=this._arrayOfAllItems[i];
for(key in _43){
if(key!==this._rootItemPropName){
var _46=_43[key];
if(_46!==null){
if(!dojo.isArray(_46)){
_43[key]=[_46];
}
}else{
_43[key]=[null];
}
}
_44[key]=key;
}
}
while(_44[this._storeRefPropName]){
this._storeRefPropName+="_";
}
while(_44[this._itemNumPropName]){
this._itemNumPropName+="_";
}
while(_44[this._reverseRefMap]){
this._reverseRefMap+="_";
}
var _47;
var _48=_38.identifier;
if(_48){
this._itemsByIdentity={};
this._features["dojo.data.api.Identity"]=_48;
for(i=0;i<this._arrayOfAllItems.length;++i){
_43=this._arrayOfAllItems[i];
_47=_43[_48];
var _49=_47[0];
if(!this._itemsByIdentity[_49]){
this._itemsByIdentity[_49]=_43;
}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: ["+_48+"].  Value collided: ["+_49+"]");
}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: ["+_48+"].  Value collided: ["+_49+"]");
}
}
}
}
}else{
this._features["dojo.data.api.Identity"]=Number;
}
for(i=0;i<this._arrayOfAllItems.length;++i){
_43=this._arrayOfAllItems[i];
_43[this._storeRefPropName]=this;
_43[this._itemNumPropName]=i;
}
for(i=0;i<this._arrayOfAllItems.length;++i){
_43=this._arrayOfAllItems[i];
for(key in _43){
_47=_43[key];
for(var j=0;j<_47.length;++j){
_46=_47[j];
if(_46!==null&&typeof _46=="object"){
if(_46._type&&_46._value){
var _4b=_46._type;
var _4c=this._datatypeMap[_4b];
if(!_4c){
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+_4b+"'");
}else{
if(dojo.isFunction(_4c)){
_47[j]=new _4c(_46._value);
}else{
if(dojo.isFunction(_4c.deserialize)){
_47[j]=_4c.deserialize(_46._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(_46._reference){
var _4d=_46._reference;
if(!dojo.isObject(_4d)){
_47[j]=this._itemsByIdentity[_4d];
}else{
for(var k=0;k<this._arrayOfAllItems.length;++k){
var _4f=this._arrayOfAllItems[k];
var _50=true;
for(var _51 in _4d){
if(_4f[_51]!=_4d[_51]){
_50=false;
}
}
if(_50){
_47[j]=_4f;
}
}
}
if(this.referenceIntegrity){
var _52=_47[j];
if(this.isItem(_52)){
this._addReferenceToMap(_52,_43,key);
}
}
}else{
if(this.isItem(_46)){
if(this.referenceIntegrity){
this._addReferenceToMap(_46,_43,key);
}
}
}
}
}
}
}
},_addReferenceToMap:function(_53,_54,_55){
},getIdentity:function(_56){
var _57=this._features["dojo.data.api.Identity"];
if(_57===Number){
return _56[this._itemNumPropName];
}else{
var _58=_56[_57];
if(_58){
return _58[0];
}
}
return null;
},fetchItemByIdentity:function(_59){
if(!this._loadFinished){
var _5a=this;
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_59});
}else{
this._loadInProgress=true;
var _5b={url:_5a._jsonFileUrl,handleAs:"json-comment-optional"};
var _5c=dojo.xhrGet(_5b);
_5c.addCallback(function(_5d){
var _5e=_59.scope?_59.scope:dojo.global;
try{
_5a._getItemsFromLoadedData(_5d);
_5a._loadFinished=true;
_5a._loadInProgress=false;
var _5f=_5a._getItemByIdentity(_59.identity);
if(_59.onItem){
_59.onItem.call(_5e,_5f);
}
_5a._handleQueuedFetches();
}
catch(error){
_5a._loadInProgress=false;
if(_59.onError){
_59.onError.call(_5e,error);
}
}
});
_5c.addErrback(function(_60){
_5a._loadInProgress=false;
if(_59.onError){
var _61=_59.scope?_59.scope:dojo.global;
_59.onError.call(_61,_60);
}
});
}
}else{
if(this._jsonData){
_5a._getItemsFromLoadedData(_5a._jsonData);
_5a._jsonData=null;
_5a._loadFinished=true;
var _62=_5a._getItemByIdentity(_59.identity);
if(_59.onItem){
var _63=_59.scope?_59.scope:dojo.global;
_59.onItem.call(_63,_62);
}
}
}
}else{
var _62=this._getItemByIdentity(_59.identity);
if(_59.onItem){
var _63=_59.scope?_59.scope:dojo.global;
_59.onItem.call(_63,_62);
}
}
},_getItemByIdentity:function(_64){
var _65=null;
if(this._itemsByIdentity){
_65=this._itemsByIdentity[_64];
}else{
_65=this._arrayOfAllItems[_64];
}
if(_65===undefined){
_65=null;
}
return _65;
},getIdentityAttributes:function(_66){
var _67=this._features["dojo.data.api.Identity"];
if(_67===Number){
return null;
}else{
return [_67];
}
},_forceLoad:function(){
var _68=this;
if(this._jsonFileUrl){
var _69={url:_68._jsonFileUrl,handleAs:"json-comment-optional",sync:true};
var _6a=dojo.xhrGet(_69);
_6a.addCallback(function(_6b){
try{
if(_68._loadInProgress!==true&&!_68._loadFinished){
_68._getItemsFromLoadedData(_6b);
_68._loadFinished=true;
}
}
catch(e){
console.log(e);
throw e;
}
});
_6a.addErrback(function(_6c){
throw _6c;
});
}else{
if(this._jsonData){
_68._getItemsFromLoadedData(_68._jsonData);
_68._jsonData=null;
_68._loadFinished=true;
}
}
}});
dojo.extend(dojo.data.ItemFileReadStore,dojo.data.util.simpleFetch);
}
if(!dojo._hasResource["dojox.image.ThumbnailPicker"]){
dojo._hasResource["dojox.image.ThumbnailPicker"]=true;
dojo.provide("dojox.image.ThumbnailPicker");
dojo.experimental("dojox.image.ThumbnailPicker");
dojo.require("dojo.fx");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare("dojox.image.ThumbnailPicker",[dijit._Widget,dijit._Templated],{imageStore:null,request:null,size:500,thumbHeight:75,thumbWidth:100,useLoadNotifier:false,useHyperlink:false,hyperlinkTarget:"new",isClickable:true,isScrollable:true,isHorizontal:true,autoLoad:true,linkAttr:"link",imageThumbAttr:"imageUrlThumb",imageLargeAttr:"imageUrl",pageSize:20,titleAttr:"title",templateString:"<div dojoAttachPoint=\"outerNode\" class=\"thumbOuter\">\n\t<div dojoAttachPoint=\"navPrev\" class=\"thumbNav thumbClickable\">\n\t  <img src=\"\" dojoAttachPoint=\"navPrevImg\"/>    \n\t</div>\n\t<div dojoAttachPoint=\"thumbScroller\" class=\"thumbScroller\">\n\t  <div dojoAttachPoint=\"thumbsNode\" class=\"thumbWrapper\"></div>\n\t</div>\n\t<div dojoAttachPoint=\"navNext\" class=\"thumbNav thumbClickable\">\n\t  <img src=\"\" dojoAttachPoint=\"navNextImg\"/>  \n\t</div>\n</div>\n",tempImgPath:dojo.moduleUrl("dojo","resources/blank.gif"),_thumbs:[],_thumbIndex:0,_maxPhotos:0,_loadedImages:{},postCreate:function(){
this.widgetid=this.id;
this.inherited(arguments);
this.pageSize=Number(this.pageSize);
this._scrollerSize=this.size-(51*2);
var _1=this._sizeProperty=this.isHorizontal?"width":"height";
dojo.style(this.outerNode,"textAlign","center");
dojo.style(this.outerNode,_1,this.size+"px");
dojo.style(this.thumbScroller,_1,this._scrollerSize+"px");
if(this.useHyperlink){
dojo.subscribe(this.getClickTopicName(),this,function(_2){
var _3=_2.index;
var _4=this.imageStore.getValue(_2.data,this.linkAttr);
if(!_4){
return;
}
if(this.hyperlinkTarget=="new"){
window.open(_4);
}else{
window.location=_4;
}
});
}
if(this.isScrollable){
dojo.require("dojox.fx.scroll");
dojo.require("dojox.fx.easing");
}
if(this.isClickable){
dojo.addClass(this.thumbsNode,"thumbClickable");
}
this._totalSize=0;
this.init();
},init:function(){
if(this.isInitialized){
return false;
}
var _5=this.isHorizontal?"Horiz":"Vert";
dojo.addClass(this.navPrev,"prev"+_5);
dojo.addClass(this.navNext,"next"+_5);
dojo.addClass(this.thumbsNode,"thumb"+_5);
dojo.addClass(this.outerNode,"thumb"+_5);
this.navNextImg.setAttribute("src",this.tempImgPath);
this.navPrevImg.setAttribute("src",this.tempImgPath);
this.connect(this.navPrev,"onclick","_prev");
this.connect(this.navNext,"onclick","_next");
this.isInitialized=true;
if(this.isHorizontal){
this._offsetAttr="offsetLeft";
this._sizeAttr="offsetWidth";
this._scrollAttr="scrollLeft";
}else{
this._offsetAttr="offsetTop";
this._sizeAttr="offsetHeight";
this._scrollAttr="scrollTop";
}
this._updateNavControls();
if(this.imageStore&&this.request){
this._loadNextPage();
}
return true;
},getClickTopicName:function(){
return (this.widgetId||this.id)+"/select";
},getShowTopicName:function(){
return (this.widgetId||this.id)+"/show";
},setDataStore:function(_6,_7,_8){
this.reset();
this.request={query:{},start:_7.start||0,count:_7.count||10,onBegin:dojo.hitch(this,function(_9){
this._maxPhotos=_9;
})};
if(_7.query){
dojo.mixin(this.request.query,_7.query);
}
if(_8){
dojo.forEach(["imageThumbAttr","imageLargeAttr","linkAttr","titleAttr"],function(_a){
if(_8[_a]){
this[_a]=_8[_a];
}
},this);
}
this.request.start=0;
this.request.count=this.pageSize;
this.imageStore=_6;
if(!this.init()){
this._loadNextPage();
}
},reset:function(){
this._loadedImages={};
dojo.forEach(this._thumbs,function(_b){
if(_b){
if(_b.parentNode){
_b.parentNode.removeChild(_b);
}
}
});
this._thumbs=[];
this.isInitialized=false;
this._noImages=true;
},isVisible:function(_c){
var _d=this._thumbs[_c];
if(!_d){
return false;
}
var _e=this.isHorizontal?"offsetLeft":"offsetTop";
var _f=this.isHorizontal?"offsetWidth":"offsetHeight";
var _10=this.isHorizontal?"scrollLeft":"scrollTop";
var _11=_d[_e]-this.thumbsNode[_e];
return (_11>=this.thumbScroller[_10]&&_11+_d[_f]<=this.thumbScroller[_10]+this._scrollerSize);
},_next:function(){
var pos=this.isHorizontal?"offsetLeft":"offsetTop";
var _13=this.isHorizontal?"offsetWidth":"offsetHeight";
var _14=this.thumbsNode[pos];
var _15=this._thumbs[this._thumbIndex];
var _16=_15[pos]-_14;
var _17=-1,img;
for(var i=this._thumbIndex+1;i<this._thumbs.length;i++){
img=this._thumbs[i];
if(img[pos]-_14+img[_13]-_16>this._scrollerSize){
this._showThumbs(i);
return;
}
}
},_prev:function(){
if(this.thumbScroller[this.isHorizontal?"scrollLeft":"scrollTop"]==0){
return;
}
var pos=this.isHorizontal?"offsetLeft":"offsetTop";
var _1b=this.isHorizontal?"offsetWidth":"offsetHeight";
var _1c=this._thumbs[this._thumbIndex];
var _1d=_1c[pos]-this.thumbsNode[pos];
var _1e=-1,img;
for(var i=this._thumbIndex-1;i>-1;i--){
img=this._thumbs[i];
if(_1d-img[pos]>this._scrollerSize){
this._showThumbs(i+1);
return;
}
}
this._showThumbs(0);
},_checkLoad:function(img,_22){
dojo.publish(this.getShowTopicName(),[{index:_22}]);
this._updateNavControls();
this._loadingImages={};
this._thumbIndex=_22;
if(this.thumbsNode.offsetWidth-img.offsetLeft<(this._scrollerSize*2)){
this._loadNextPage();
}
},_showThumbs:function(_23){
_23=Math.min(Math.max(_23,0),this._maxPhotos);
if(_23>=this._maxPhotos){
return;
}
var img=this._thumbs[_23];
if(!img){
return;
}
var _25=img.offsetLeft-this.thumbsNode.offsetLeft;
var top=img.offsetTop-this.thumbsNode.offsetTop;
var _27=this.isHorizontal?_25:top;
if((_27>=this.thumbScroller[this._scrollAttr])&&(_27+img[this._sizeAttr]<=this.thumbScroller[this._scrollAttr]+this._scrollerSize)){
return;
}
if(this.isScrollable){
var _28=this.isHorizontal?{x:_25,y:0}:{x:0,y:top};
dojox.fx.smoothScroll({target:_28,win:this.thumbScroller,duration:300,easing:dojox.fx.easing.easeOut,onEnd:dojo.hitch(this,"_checkLoad",img,_23)}).play(10);
}else{
if(this.isHorizontal){
this.thumbScroller.scrollLeft=_25;
}else{
this.thumbScroller.scrollTop=top;
}
this._checkLoad(img,_23);
}
},markImageLoaded:function(_29){
var _2a=dojo.byId("loadingDiv_"+this.widgetid+"_"+_29);
if(_2a){
this._setThumbClass(_2a,"thumbLoaded");
}
this._loadedImages[_29]=true;
},_setThumbClass:function(_2b,_2c){
if(!this.autoLoad){
return;
}
dojo.addClass(_2b,_2c);
},_loadNextPage:function(){
if(this._loadInProgress){
return;
}
this._loadInProgress=true;
var _2d=this.request.start+(this._noImages?0:this.pageSize);
var pos=_2d;
while(pos<this._thumbs.length&&this._thumbs[pos]){
pos++;
}
var _2f=function(_30,_31){
if(_30&&_30.length){
var _32=0;
var _33=dojo.hitch(this,function(){
if(_32>=_30.length){
this._loadInProgress=false;
return;
}
var _34=_32++;
this._loadImage(_30[_34],pos+_34,_33);
});
_33();
this._updateNavControls();
}else{
this._loadInProgress=false;
}
};
var _35=function(){
this._loadInProgress=false;
console.debug("Error getting items");
};
this.request.onComplete=dojo.hitch(this,_2f);
this.request.onError=dojo.hitch(this,_35);
this.request.start=_2d;
this._noImages=false;
this.imageStore.fetch(this.request);
},_loadImage:function(_36,_37,_38){
var url=this.imageStore.getValue(_36,this.imageThumbAttr);
var img=document.createElement("img");
var _3b=document.createElement("div");
_3b.setAttribute("id","img_"+this.widgetid+"_"+_37);
_3b.appendChild(img);
img._index=_37;
img._data=_36;
this._thumbs[_37]=_3b;
var _3c;
if(this.useLoadNotifier){
_3c=document.createElement("div");
_3c.setAttribute("id","loadingDiv_"+this.widgetid+"_"+_37);
this._setThumbClass(_3c,this._loadedImages[_37]?"thumbLoaded":"thumbNotifier");
_3b.appendChild(_3c);
}
var _3d=dojo.marginBox(this.thumbsNode);
var _3e;
var _3f;
if(this.isHorizontal){
_3e=this.thumbWidth;
_3f="w";
}else{
_3e=this.thumbHeight;
_3f="h";
}
_3d=_3d[_3f];
var sl=this.thumbScroller.scrollLeft,st=this.thumbScroller.scrollTop;
dojo.style(this.thumbsNode,this._sizeProperty,(_3d+_3e+20)+"px");
this.thumbScroller.scrollLeft=sl;
this.thumbScroller.scrollTop=st;
this.thumbsNode.appendChild(_3b);
dojo.connect(img,"onload",this,function(){
var _42=dojo.marginBox(img)[_3f];
this._totalSize+=(Number(_42)+4);
dojo.style(this.thumbsNode,this._sizeProperty,this._totalSize+"px");
if(this.useLoadNotifier){
dojo.style(_3c,"width",(img.width-4)+"px");
}
_38();
return false;
});
dojo.connect(img,"onclick",this,function(evt){
dojo.publish(this.getClickTopicName(),[{index:evt.target._index,data:evt.target._data,url:img.getAttribute("src"),largeUrl:this.imageStore.getValue(_36,this.imageLargeAttr),title:this.imageStore.getValue(_36,this.titleAttr),link:this.imageStore.getValue(_36,this.linkAttr)}]);
return false;
});
dojo.addClass(img,"imageGalleryThumb");
img.setAttribute("src",url);
var _44=this.imageStore.getValue(_36,this.titleAttr);
if(_44){
img.setAttribute("title",_44);
}
this._updateNavControls();
},_updateNavControls:function(){
var _45=[];
var _46=function(_47,add){
var fn=add?"addClass":"removeClass";
dojo[fn](_47,"enabled");
dojo[fn](_47,"thumbClickable");
};
var pos=this.isHorizontal?"scrollLeft":"scrollTop";
var _4b=this.isHorizontal?"offsetWidth":"offsetHeight";
_46(this.navPrev,(this.thumbScroller[pos]>0));
var _4c=this._thumbs[this._thumbs.length-1];
var _4d=(this.thumbScroller[pos]+this._scrollerSize<this.thumbsNode[_4b]);
_46(this.navNext,_4d);
}});
}
if(!dojo._hasResource["dijit.Dialog"]){
dojo._hasResource["dijit.Dialog"]=true;
dojo.provide("dijit.Dialog");
dojo.require("dojo.dnd.TimedMoveable");
dojo.require("dojo.fx");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.form.Form");
dojo.requireLocalization("dijit","common",null,"zh,pt,da,tr,ru,de,sv,ja,he,fi,nb,el,ar,ROOT,pt-pt,cs,fr,es,ko,nl,zh-tw,pl,it,hu");
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 _1=dijit.getViewport();
var is=this.node.style,os=this.domNode.style;
os.top=_1.t+"px";
os.left=_1.l+"px";
is.width=_1.w+"px";
is.height=_1.h+"px";
var _4=dijit.getViewport();
if(_1.w!=_4.w){
is.width=_4.w+"px";
}
if(_1.h!=_4.h){
is.height=_4.h+"px";
}
},show:function(){
this.domNode.style.display="block";
this.layout();
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
this._resizeHandler=this.connect(window,"onresize","layout");
},hide:function(){
this.domNode.style.display="none";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
this.disconnect(this._resizeHandler);
},uninitialize:function(){
if(this.bgIframe){
this.bgIframe.destroy();
}
}});
dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_5){
},onCancel:function(){
},onExecute:function(){
},_onSubmit:function(){
this.onExecute();
this.execute(this.getValues());
},_getFocusItems:function(_6){
var _7=dijit.getFirstInTabbingOrder(_6);
this._firstFocusItem=_7?_7:_6;
_7=dijit.getLastInTabbingOrder(_6);
this._lastFocusItem=_7?_7:this._firstFocusItem;
if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){
dojo.attr(_6,"tabindex","0");
this._firstFocusItem=_6;
}
}});
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\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\">${title}</span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n",open:false,duration:400,refocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{title:"titleBar"}),postCreate:function(){
dojo.body().appendChild(this.domNode);
this.inherited(arguments);
var _8=dojo.i18n.getLocalization("dijit","common");
if(this.closeButtonNode){
this.closeButtonNode.setAttribute("title",_8.buttonCancel);
}
if(this.closeText){
this.closeText.setAttribute("title",_8.buttonCancel);
}
var s=this.domNode.style;
s.visibility="hidden";
s.position="absolute";
s.display="";
s.top="-9999px";
this.connect(this,"onExecute","hide");
this.connect(this,"onCancel","hide");
this._modalconnects=[];
},onLoad:function(){
this._position();
this.inherited(arguments);
},_setup:function(){
if(this.titleBar){
this._moveable=new dojo.dnd.TimedMoveable(this.domNode,{handle:this.titleBar,timeout:0});
}
this._underlay=new dijit.DialogUnderlay({id:this.id+"_underlay","class":dojo.map(this["class"].split(/\s/),function(s){
return s+"_underlay";
}).join(" ")});
var _b=this.domNode;
this._fadeIn=dojo.fx.combine([dojo.fadeIn({node:_b,duration:this.duration}),dojo.fadeIn({node:this._underlay.domNode,duration:this.duration,onBegin:dojo.hitch(this._underlay,"show")})]);
this._fadeOut=dojo.fx.combine([dojo.fadeOut({node:_b,duration:this.duration,onEnd:function(){
_b.style.visibility="hidden";
_b.style.top="-9999px";
}}),dojo.fadeOut({node:this._underlay.domNode,duration:this.duration,onEnd:dojo.hitch(this._underlay,"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();
}
},_position:function(){
if(dojo.hasClass(dojo.body(),"dojoMove")){
return;
}
var _c=dijit.getViewport();
var mb=dojo.marginBox(this.domNode);
var _e=this.domNode.style;
_e.left=Math.floor((_c.l+(_c.w-mb.w)/2))+"px";
_e.top=Math.floor((_c.t+(_c.h-mb.h)/2))+"px";
},_onKey:function(_f){
if(_f.keyCode){
var _10=_f.target;
if(_f.keyCode==dojo.keys.TAB){
this._getFocusItems(this.domNode);
}
var _11=(this._firstFocusItem==this._lastFocusItem);
if(_10==this._firstFocusItem&&_f.shiftKey&&_f.keyCode==dojo.keys.TAB){
if(!_11){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(_f);
}else{
if(_10==this._lastFocusItem&&_f.keyCode==dojo.keys.TAB&&!_f.shiftKey){
if(!_11){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(_f);
}else{
while(_10){
if(_10==this.domNode){
if(_f.keyCode==dojo.keys.ESCAPE){
this.hide();
}else{
return;
}
}
_10=_10.parentNode;
}
if(_f.keyCode!=dojo.keys.TAB){
dojo.stopEvent(_f);
}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(dojo.doc.documentElement,"onkeypress",this,"_onKey"));
dojo.style(this.domNode,"opacity",0);
this.domNode.style.visibility="";
this.open=true;
this._loadCheck();
this._position();
this._fadeIn.play();
this._savedFocus=dijit.getFocus(this);
this._getFocusItems(this.domNode);
setTimeout(dojo.hitch(this,function(){
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));
}
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){
var fo=this._savedFocus;
setTimeout(dojo.hitch(dijit,"focus",fo),25);
}
this.inherited(arguments);
}});
dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,_firstFocusItem:null,_lastFocusItem:null,templateString:null,templateString:"<div class=\"dijitTooltipDialog\" waiRole=\"presentation\">\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\n\t</div>\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presenation\"></div>\n</div>\n",postCreate:function(){
this.inherited(arguments);
this.connect(this.containerNode,"onkeypress","_onKey");
this.containerNode.title=this.title;
},orient:function(_13,_14,_15){
this.domNode.className="dijitTooltipDialog "+" dijitTooltipAB"+(_15.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_15.charAt(0)=="T"?"Below":"Above");
},onOpen:function(pos){
this._getFocusItems(this.containerNode);
this.orient(this.domNode,pos.aroundCorner,pos.corner);
this._loadCheck();
dijit.focus(this._firstFocusItem);
},_onKey:function(evt){
var _18=evt.target;
if(evt.keyCode==dojo.keys.TAB){
this._getFocusItems(this.containerNode);
}
var _19=(this._firstFocusItem==this._lastFocusItem);
if(evt.keyCode==dojo.keys.ESCAPE){
this.onCancel();
}else{
if(_18==this._firstFocusItem&&evt.shiftKey&&evt.keyCode==dojo.keys.TAB){
if(!_19){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(_18==this._lastFocusItem&&evt.keyCode==dojo.keys.TAB&&!evt.shiftKey){
if(!_19){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
if(evt.keyCode==dojo.keys.TAB){
evt.stopPropagation();
}
}
}
}
}});
}
if(!dojo._hasResource["dojox.fx"]){
dojo._hasResource["dojox.fx"]=true;
dojo.provide("dojox.fx");
dojo.require("dojox.fx._base");
}
if(!dojo._hasResource["dojox.image.Lightbox"]){
dojo._hasResource["dojox.image.Lightbox"]=true;
dojo.provide("dojox.image.Lightbox");
dojo.experimental("dojox.image.Lightbox");
dojo.require("dijit.Dialog");
dojo.require("dojox.fx._base");
dojo.declare("dojox.image.Lightbox",dijit._Widget,{group:"",title:"",href:"",duration:500,_allowPassthru:false,_attachedDialog:null,startup:function(){
this.inherited(arguments);
var _1=dijit.byId("dojoxLightboxDialog");
if(_1){
this._attachedDialog=_1;
}else{
this._attachedDialog=new dojox.image._LightboxDialog({id:"dojoxLightboxDialog"});
this._attachedDialog.startup();
}
if(!this.store){
this._addSelf();
this.connect(this.domNode,"onclick","_handleClick");
}
},_addSelf:function(){
this._attachedDialog.addImage({href:this.href,title:this.title},this.group||null);
},_handleClick:function(e){
if(!this._allowPassthru){
e.preventDefault();
}else{
return;
}
this.show();
},show:function(){
this._attachedDialog.show(this);
},disable:function(){
this._allowPassthru=true;
},enable:function(){
this._allowPassthru=false;
}});
dojo.declare("dojox.image._LightboxDialog",dijit.Dialog,{title:"",inGroup:null,imgUrl:"",errorMessage:"Image not found.",adjust:true,_groups:{XnoGroupX:[]},errorImg:dojo.moduleUrl("dojox.image","resources/images/warning.png"),_imageReady:false,_blankImg:dojo.moduleUrl("dojo","resources/blank.gif"),_clone:null,_wasStyled:null,_loadingAnim:null,_showImageAnim:null,_showNavAnim:null,_animConnects:[],templateString:"<div class=\"dojoxLightbox\" dojoAttachPoint=\"containerNode\">\n\t<div style=\"position:relative\">\n\t\t<div dojoAttachPoint=\"imageContainer\" class=\"dojoxLightboxContainer\">\n\t\t\t<img dojoAttachPoint=\"imgNode\" src=\"${imgUrl}\" class=\"dojoxLightboxImage\" alt=\"${title}\">\n\t\t\t<div class=\"dojoxLightboxFooter\" dojoAttachPoint=\"titleNode\">\n\t\t\t\t<div class=\"dijitInline LightboxClose\" dojoAttachPoint=\"closeNode\"></div>\n\t\t\t\t<div class=\"dijitInline LightboxNext\" dojoAttachPoint=\"nextNode\"></div>\t\n\t\t\t\t<div class=\"dijitInline LightboxPrev\" dojoAttachPoint=\"prevNode\"></div>\n\n\t\t\t\t<div class=\"dojoxLightboxText\"><span dojoAttachPoint=\"textNode\">${title}</span><span dojoAttachPoint=\"groupCount\" class=\"dojoxLightboxGroupText\"></span></div>\n\t\t\t</div>\n\t\t</div>\t\n\t\t\n\t</div>\n</div>\n",startup:function(){
this.inherited(arguments);
this._clone=dojo.clone(this.imgNode);
this.connect(document.documentElement,"onkeypress","_handleKey");
this.connect(window,"onresize","_position");
this.connect(this.nextNode,"onclick","_nextImage");
this.connect(this.prevNode,"onclick","_prevImage");
this.connect(this.closeNode,"onclick","hide");
this._makeAnims();
this._vp=dijit.getViewport();
},show:function(_3){
var _t=this;
if(!_t.open){
_t.inherited(arguments);
}
if(this._wasStyled){
dojo._destroyElement(_t.imgNode);
_t.imgNode=dojo.clone(_t._clone);
dojo.place(_t.imgNode,_t.imageContainer,"first");
_t._makeAnims();
_t._wasStyled=false;
}
dojo.style(_t.imgNode,"opacity","0");
dojo.style(_t.titleNode,"opacity","0");
_t._imageReady=false;
_t.imgNode.src=_3.href;
if((_3.group&&_3!=="XnoGroupX")||_t.inGroup){
if(!_t.inGroup){
_t.inGroup=_t._groups[(_3.group)];
dojo.forEach(_t.inGroup,function(g,i){
if(g.href==_3.href){
_t._positionIndex=i;
}
},_t);
}
if(!_t._positionIndex){
_t._positionIndex=0;
_t.imgNode.src=_t.inGroup[_t._positionIndex].href;
}
_t.groupCount.innerHTML=" ("+(_t._positionIndex+1)+" θη "+_t.inGroup.length+")";
_t.prevNode.style.visibility="visible";
_t.nextNode.style.visibility="visible";
}else{
_t.groupCount.innerHTML="";
_t.prevNode.style.visibility="hidden";
_t.nextNode.style.visibility="hidden";
}
_t.textNode.innerHTML=_3.title;
if(!_t._imageReady||_t.imgNode.complete===true){
_t._imgConnect=dojo.connect(_t.imgNode,"onload",_t,function(){
_t._imageReady=true;
_t.resizeTo({w:_t.imgNode.width,h:_t.imgNode.height,duration:_t.duration});
dojo.disconnect(_t._imgConnect);
if(_t._imgError){
dojo.disconnect(_t._imgError);
}
});
_t._imgError=dojo.connect(_t.imgNode,"onerror",_t,function(){
dojo.disconnect(_t._imgError);
_t.imgNode.src=_t.errorImg;
_t._imageReady=true;
_t.textNode.innerHTML=_t.errorMessage;
});
if(dojo.isIE){
_t.imgNode.src=_t.imgNode.src;
}
}else{
_t.resizeTo({w:_t.imgNode.width,h:_t.imgNode.height,duration:1});
}
},_nextImage:function(){
if(!this.inGroup){
return;
}
if(this._positionIndex+1<this.inGroup.length){
this._positionIndex++;
}else{
this._positionIndex=0;
}
this._loadImage();
},_prevImage:function(){
if(this.inGroup){
if(this._positionIndex==0){
this._positionIndex=this.inGroup.length-1;
}else{
this._positionIndex--;
}
this._loadImage();
}
},_loadImage:function(){
this._loadingAnim.play(1);
},_prepNodes:function(){
this._imageReady=false;
this.show({href:this.inGroup[this._positionIndex].href,title:this.inGroup[this._positionIndex].title});
},resizeTo:function(_7){
if(this.adjust&&(_7.h+80>this._vp.h||_7.w+50>this._vp.w)){
_7=this._scaleToFit(_7);
}
var _8=dojox.fx.sizeTo({node:this.containerNode,duration:_7.duration||this.duration,width:_7.w,height:_7.h+30+(dojo.isIE>1&&(document.childNodes[0].nodeValue==null||document.childNodes[0].nodeValue.indexOf("http://www.w3.org/TR/html4/loose.dtd")==-1)?22:0)});
this.connect(_8,"onEnd","_showImage");
_8.play(15);
},_showImage:function(){
this._showImageAnim.play(1);
},_showNav:function(){
this._showNavAnim.play(1);
},hide:function(){
dojo.fadeOut({node:this.titleNode,duration:200,onEnd:dojo.hitch(this,function(){
this.imgNode.src=this._blankImg;
})}).play(5);
this.inherited(arguments);
this.inGroup=null;
this._positionIndex=null;
},addImage:function(_9,_a){
var g=_a;
if(!_9.href){
return;
}
if(g){
if(!this._groups[g]){
this._groups[g]=[];
}
this._groups[g].push(_9);
}else{
this._groups["XnoGroupX"].push(_9);
}
},_handleKey:function(e){
if(!this.open){
return;
}
var dk=dojo.keys;
var _e=(e.charCode==dk.SPACE?dk.SPACE:e.keyCode);
switch(_e){
case dk.ESCAPE:
this.hide();
break;
case dk.DOWN_ARROW:
case dk.RIGHT_ARROW:
case 78:
this._nextImage();
break;
case dk.UP_ARROW:
case dk.LEFT_ARROW:
case 80:
this._prevImage();
break;
}
},_scaleToFit:function(_f){
var ns={};
if(this._vp.h>this._vp.w){
ns.w=this._vp.w-70;
ns.h=ns.w*(_f.h/_f.w);
}else{
ns.h=this._vp.h-80;
ns.w=ns.h*(_f.w/_f.h);
}
this._wasStyled=true;
var s=this.imgNode.style;
s.height=ns.h+"px";
s.width=ns.w+"px";
ns.duration=_f.duration;
return ns;
},_position:function(e){
this.inherited(arguments);
this._vp=dijit.getViewport();
},_makeAnims:function(){
dojo.forEach(this._animConnects,dojo.disconnect);
this._animConnects=[];
this._showImageAnim=dojo.fadeIn({node:this.imgNode,duration:this.duration});
this._animConnects.push(dojo.connect(this._showImageAnim,"onEnd",this,"_showNav"));
this._loadingAnim=dojo.fx.combine([dojo.fadeOut({node:this.imgNode,duration:175}),dojo.fadeOut({node:this.titleNode,duration:175})]);
this._animConnects.push(dojo.connect(this._loadingAnim,"onEnd",this,"_prepNodes"));
this._showNavAnim=dojo.fadeIn({node:this.titleNode,duration:225});
}});
}

