/*
	Copyright (c) 2004-2008, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/

/*
	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.place"]){
dojo._hasResource["dijit._base.place"]=true;
dojo.provide("dijit._base.place");
dijit.getViewport=function(){
var _1=dojo.global;
var _2=dojo.doc;
var w=0,h=0;
var de=_2.documentElement;
var _6=de.clientWidth,_7=de.clientHeight;
if(dojo.isMozilla){
var _8,_9,_a,_b;
var _c=_2.body.clientWidth;
if(_c>_6){
_8=_6;
_a=_c;
}else{
_a=_6;
_8=_c;
}
var _d=_2.body.clientHeight;
if(_d>_7){
_9=_7;
_b=_d;
}else{
_b=_7;
_9=_d;
}
w=(_a>_1.innerWidth)?_8:_a;
h=(_b>_1.innerHeight)?_9:_b;
}else{
if(!dojo.isOpera&&_1.innerWidth){
w=_1.innerWidth;
h=_1.innerHeight;
}else{
if(dojo.isIE&&de&&_7){
w=_6;
h=_7;
}else{
if(dojo.body().clientWidth){
w=dojo.body().clientWidth;
h=dojo.body().clientHeight;
}
}
}
}
var _e=dojo._docScroll();
return {w:w,h:h,l:_e.x,t:_e.y};
};
dijit.placeOnScreen=function(_f,pos,_11,_12){
var _13=dojo.map(_11,function(_14){
return {corner:_14,pos:pos};
});
return dijit._place(_f,_13);
};
dijit._place=function(_15,_16,_17){
var _18=dijit.getViewport();
if(!_15.parentNode||String(_15.parentNode.tagName).toLowerCase()!="body"){
dojo.body().appendChild(_15);
}
var _19=null;
dojo.some(_16,function(_1a){
var _1b=_1a.corner;
var pos=_1a.pos;
if(_17){
_17(_15,_1a.aroundCorner,_1b);
}
var _1d=_15.style;
var _1e=_1d.display;
var _1f=_1d.visibility;
_1d.visibility="hidden";
_1d.display="";
var mb=dojo.marginBox(_15);
_1d.display=_1e;
_1d.visibility=_1f;
var _21=(_1b.charAt(1)=="L"?pos.x:Math.max(_18.l,pos.x-mb.w)),_22=(_1b.charAt(0)=="T"?pos.y:Math.max(_18.t,pos.y-mb.h)),_23=(_1b.charAt(1)=="L"?Math.min(_18.l+_18.w,_21+mb.w):pos.x),_24=(_1b.charAt(0)=="T"?Math.min(_18.t+_18.h,_22+mb.h):pos.y),_25=_23-_21,_26=_24-_22,_27=(mb.w-_25)+(mb.h-_26);
if(_19==null||_27<_19.overflow){
_19={corner:_1b,aroundCorner:_1a.aroundCorner,x:_21,y:_22,w:_25,h:_26,overflow:_27};
}
return !_27;
});
_15.style.left=_19.x+"px";
_15.style.top=_19.y+"px";
if(_19.overflow&&_17){
_17(_15,_19.aroundCorner,_19.corner);
}
return _19;
};
dijit.placeOnScreenAroundElement=function(_28,_29,_2a,_2b){
_29=dojo.byId(_29);
var _2c=_29.style.display;
_29.style.display="";
var _2d=_29.offsetWidth;
var _2e=_29.offsetHeight;
var _2f=dojo.coords(_29,true);
_29.style.display=_2c;
var _30=[];
for(var _31 in _2a){
_30.push({aroundCorner:_31,corner:_2a[_31],pos:{x:_2f.x+(_31.charAt(1)=="L"?0:_2d),y:_2f.y+(_31.charAt(0)=="T"?0:_2e)}});
}
return dijit._place(_28,_30,_2b);
};
}
if(!dojo._hasResource["dojox.flash._base"]){
dojo._hasResource["dojox.flash._base"]=true;
dojo.provide("dojox.flash._base");
dojox.flash=function(){
};
dojox.flash={ready:false,url:null,_visible:true,_loadedListeners:new Array(),_installingListeners:new Array(),setSwf:function(url,_33){
this.url=url;
if(typeof _33!="undefined"){
this._visible=_33;
}
this._initialize();
},addLoadedListener:function(_34){
this._loadedListeners.push(_34);
},addInstallingListener:function(_35){
this._installingListeners.push(_35);
},loaded:function(){
dojox.flash.ready=true;
if(dojox.flash._loadedListeners.length>0){
for(var i=0;i<dojox.flash._loadedListeners.length;i++){
dojox.flash._loadedListeners[i].call(null);
}
}
},installing:function(){
if(dojox.flash._installingListeners.length>0){
for(var i=0;i<dojox.flash._installingListeners.length;i++){
dojox.flash._installingListeners[i].call(null);
}
}
},_initialize:function(){
var _38=new dojox.flash.Install();
dojox.flash.installer=_38;
if(_38.needed()==true){
_38.install();
}else{
dojox.flash.obj=new dojox.flash.Embed(this._visible);
dojox.flash.obj.write();
dojox.flash.comm=new dojox.flash.Communicator();
}
}};
dojox.flash.Info=function(){
if(dojo.isIE){
document.write(["<script language=\"VBScript\" type=\"text/vbscript\">","Function VBGetSwfVer(i)","  on error resume next","  Dim swControl, swVersion","  swVersion = 0","  set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))","  if (IsObject(swControl)) then","    swVersion = swControl.GetVariable(\"$version\")","  end if","  VBGetSwfVer = swVersion","End Function","</script>"].join("\r\n"));
}
this._detectVersion();
};
dojox.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,installing:false,isVersionOrAbove:function(_39,_3a,_3b){
_3b=parseFloat("."+_3b);
if(this.versionMajor>=_39&&this.versionMinor>=_3a&&this.versionRevision>=_3b){
return true;
}else{
return false;
}
},_detectVersion:function(){
var _3c;
for(var _3d=25;_3d>0;_3d--){
if(dojo.isIE){
_3c=VBGetSwfVer(_3d);
}else{
_3c=this._JSFlashInfo(_3d);
}
if(_3c==-1){
this.capable=false;
return;
}else{
if(_3c!=0){
var _3e;
if(dojo.isIE){
var _3f=_3c.split(" ");
var _40=_3f[1];
_3e=_40.split(",");
}else{
_3e=_3c.split(".");
}
this.versionMajor=_3e[0];
this.versionMinor=_3e[1];
this.versionRevision=_3e[2];
var _41=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(_41);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_42){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _43=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _44=navigator.plugins["Shockwave Flash"+_43].description;
var _45=_44.split(" ");
var _46=_45[2].split(".");
var _47=_46[0];
var _48=_46[1];
if(_45[3]!=""){
var _49=_45[3].split("r");
}else{
var _49=_45[4].split("r");
}
var _4a=_49[1]>0?_49[1]:0;
var _4b=_47+"."+_48+"."+_4a;
return _4b;
}
}
return -1;
}};
dojox.flash.Embed=function(_4c){
this._visible=_4c;
};
dojox.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){
switch(window.location.protocol){
case "https:":
return "https";
break;
default:
return "http";
break;
}
},write:function(_4d){
var _4e="";
_4e+=("width: "+this.width+"px; ");
_4e+=("height: "+this.height+"px; ");
if(!this._visible){
_4e+="position: absolute; z-index: 10000; top: -1000px; left: -1000px; ";
}
var _4f;
var _50=dojox.flash.url;
var _51=_50;
var _52=_50;
var _53=dojo.baseUrl;
if(_4d){
var _54=escape(window.location);
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var _55=escape(document.title);
_51+="?MMredirectURL="+_54+"&MMplayerType=ActiveX"+"&MMdoctitle="+_55+"&baseUrl="+escape(_53);
_52+="?MMredirectURL="+_54+"&MMplayerType=PlugIn"+"&baseUrl="+escape(_53);
}else{
_51+="?cachebust="+new Date().getTime();
}
if(_52.indexOf("?")==-1){
_52+="?baseUrl="+escape(_53);
}else{
_52+="&baseUrl="+escape(_53);
}
_4f="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+"codebase=\""+this.protocol()+"://fpdownload.macromedia.com/pub/shockwave/cabs/flash/"+"swflash.cab#version=8,0,0,0\"\n "+"width=\""+this.width+"\"\n "+"height=\""+this.height+"\"\n "+"id=\""+this.id+"\"\n "+"name=\""+this.id+"\"\n "+"align=\"middle\">\n "+"<param name=\"allowScriptAccess\" value=\"sameDomain\"></param>\n "+"<param name=\"movie\" value=\""+_51+"\"></param>\n "+"<param name=\"quality\" value=\"high\"></param>\n "+"<param name=\"bgcolor\" value=\"#ffffff\"></param>\n "+"<embed src=\""+_52+"\" "+"quality=\"high\" "+"bgcolor=\"#ffffff\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"Embed"+"\" "+"name=\""+this.id+"\" "+"swLiveConnect=\"true\" "+"align=\"middle\" "+"allowScriptAccess=\"sameDomain\" "+"type=\"application/x-shockwave-flash\" "+"pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\" "+"></embed>\n"+"</object>\n";
dojo.connect(dojo,"loaded",dojo.hitch(this,function(){
var div=document.createElement("div");
div.setAttribute("id",this.id+"Container");
div.setAttribute("style",_4e);
div.innerHTML=_4f;
var _57=document.getElementsByTagName("body");
if(!_57||!_57.length){
throw new Error("No body tag for this page");
}
_57=_57[0];
_57.appendChild(div);
}));
},get:function(){
if(dojo.isIE||dojo.isSafari){
return document.getElementById(this.id);
}else{
return document[this.id+"Embed"];
}
},setVisible:function(_58){
var _59=dojo.byId(this.id+"Container");
if(_58==true){
_59.style.position="absolute";
_59.style.visibility="visible";
}else{
_59.style.position="absolute";
_59.style.x="-1000px";
_59.style.y="-1000px";
_59.style.visibility="hidden";
}
},center:function(){
var _5a=this.width;
var _5b=this.height;
var _5c=dijit.getViewport();
var x=_5c.l+(_5c.w-_5a)/2;
var y=_5c.t+(_5c.h-_5b)/2;
var _5f=dojo.byId(this.id+"Container");
_5f.style.top=y+"px";
_5f.style.left=x+"px";
}};
dojox.flash.Communicator=function(){
};
dojox.flash.Communicator.prototype={_addExternalInterfaceCallback:function(_60){
var _61=dojo.hitch(this,function(){
var _62=new Array(arguments.length);
for(var i=0;i<arguments.length;i++){
_62[i]=this._encodeData(arguments[i]);
}
var _64=this._execFlash(_60,_62);
_64=this._decodeData(_64);
return _64;
});
this[_60]=_61;
},_encodeData:function(_65){
if(!_65||typeof _65!="string"){
return _65;
}
var _66=/\&([^;]*)\;/g;
_65=_65.replace(_66,"&amp;$1;");
_65=_65.replace(/</g,"&lt;");
_65=_65.replace(/>/g,"&gt;");
_65=_65.replace("\\","&custom_backslash;");
_65=_65.replace(/\0/g,"\\0");
_65=_65.replace(/\"/g,"&quot;");
return _65;
},_decodeData:function(_67){
if(_67&&_67.length&&typeof _67!="string"){
_67=_67[0];
}
if(!_67||typeof _67!="string"){
return _67;
}
_67=_67.replace(/\&custom_lt\;/g,"<");
_67=_67.replace(/\&custom_gt\;/g,">");
_67=_67.replace(/\&custom_backslash\;/g,"\\");
_67=_67.replace(/\\0/g," ");
return _67;
},_execFlash:function(_68,_69){
var _6a=dojox.flash.obj.get();
_69=(_69)?_69:[];
for(var i=0;i<_69;i++){
if(typeof _69[i]=="string"){
_69[i]=this._encodeData(_69[i]);
}
}
var _6c=function(){
return eval(_6a.CallFunction("<invoke name=\""+_68+"\" returntype=\"javascript\">"+__flash__argumentsToXML(_69,0)+"</invoke>"));
};
var _6d=_6c.call(_69);
if(typeof _6d=="string"){
_6d=this._decodeData(_6d);
}
return _6d;
}};
dojox.flash.Install=function(){
};
dojox.flash.Install.prototype={needed:function(){
if(dojox.flash.info.capable==false){
return true;
}
if(!dojox.flash.info.isVersionOrAbove(8,0,0)){
return true;
}
return false;
},install:function(){
dojox.flash.info.installing=true;
dojox.flash.installing();
if(dojox.flash.info.capable==false){
var _6e=new dojox.flash.Embed(false);
_6e.write();
}else{
if(dojox.flash.info.isVersionOrAbove(6,0,65)){
var _6e=new dojox.flash.Embed(false);
_6e.write(true);
_6e.setVisible(true);
_6e.center();
}else{
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=+dojox.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}
}
},_onInstallStatus:function(msg){
if(msg=="Download.Complete"){
dojox.flash._initialize();
}else{
if(msg=="Download.Cancelled"){
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=dojox.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}else{
if(msg=="Download.Failed"){
alert("There was an error downloading the Flash Player update. "+"Please try again later, or visit macromedia.com to download "+"the latest version of the Flash plugin.");
}
}
}
}};
dojox.flash.info=new dojox.flash.Info();
}
if(!dojo._hasResource["dojo.io.script"]){
dojo._hasResource["dojo.io.script"]=true;
dojo.provide("dojo.io.script");
dojo.io.script={get:function(_70){
var dfd=this._makeScriptDeferred(_70);
var _72=dfd.ioArgs;
dojo._ioAddQueryToUrl(_72);
this.attach(_72.id,_72.url,_70.frameDoc);
dojo._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);
return dfd;
},attach:function(id,url,_75){
var doc=(_75||dojo.doc);
var _77=doc.createElement("script");
_77.type="text/javascript";
_77.src=url;
_77.id=id;
doc.getElementsByTagName("head")[0].appendChild(_77);
},remove:function(id){
dojo._destroyElement(dojo.byId(id));
if(this["jsonp_"+id]){
delete this["jsonp_"+id];
}
},_makeScriptDeferred:function(_79){
var dfd=dojo._ioSetArgs(_79,this._deferredCancel,this._deferredOk,this._deferredError);
var _7b=dfd.ioArgs;
_7b.id=dojo._scopeName+"IoScript"+(this._counter++);
_7b.canDelete=false;
if(_79.callbackParamName){
_7b.query=_7b.query||"";
if(_7b.query.length>0){
_7b.query+="&";
}
_7b.query+=_79.callbackParamName+"="+(_79.frameDoc?"parent.":"")+"dojo.io.script.jsonp_"+_7b.id+"._jsonpCallback";
_7b.canDelete=true;
dfd._jsonpCallback=this._jsonpCallback;
this["jsonp_"+_7b.id]=dfd;
}
return dfd;
},_deferredCancel:function(dfd){
dfd.canceled=true;
if(dfd.ioArgs.canDelete){
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
},_deferredOk:function(dfd){
if(dfd.ioArgs.canDelete){
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
if(dfd.ioArgs.json){
return dfd.ioArgs.json;
}else{
return dfd.ioArgs;
}
},_deferredError:function(_7e,dfd){
if(dfd.ioArgs.canDelete){
if(_7e.dojoType=="timeout"){
dojo.io.script.remove(dfd.ioArgs.id);
}else{
dojo.io.script._deadScripts.push(dfd.ioArgs.id);
}
}
console.debug("dojo.io.script error",_7e);
return _7e;
},_deadScripts:[],_counter:1,_validCheck:function(dfd){
var _81=dojo.io.script;
var _82=_81._deadScripts;
if(_82&&_82.length>0){
for(var i=0;i<_82.length;i++){
_81.remove(_82[i]);
}
dojo.io.script._deadScripts=[];
}
return true;
},_ioCheck:function(dfd){
if(dfd.ioArgs.json){
return true;
}
var _85=dfd.ioArgs.args.checkString;
if(_85&&eval("typeof("+_85+") != '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"));
}
},_jsonpCallback:function(_87){
this.ioArgs.json=_87;
}};
}
if(!dojo._hasResource["generic.flash._base"]){
dojo._hasResource["generic.flash._base"]=true;
dojo.provide("generic.flash._base");
generic.flash=function(){
};
generic.flash={ready:false,id:null,so:null,_loadedListeners:[],_installingListeners:[],_isSwfObject:false,_swfObjectArr:{},_swfObjectArgs:{},_noflashDefault:"<span id='noflash'><h1>Please Download Flash</h1><p><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player'/></a></p></span>",setSwfObject:function(id){
generic.flash.id=id;
generic.flash.so=swfobject;
generic.flash._initialize();
},embedSwfObject:function(_89){
console.log("embedSwfObject()");
generic.flash._isSwfObject=true;
generic.flash._swfObjectArgs=_89;
generic.flash.so=swfobject;
generic.flash._initialize();
},removeSwfObject:function(id){
var o=dojo.byId(id);
o.id="removeSWF::"+o.id;
if(dojo.isIE&&(o.readyState!==4)){
generic.flash._swfObjectArr[o.id]=setInterval(function(){
if(o.readyState===4){
clearInterval(generic.flash._swfObjectArr[o.id]);
generic.flash.remove(o.id);
}
},100);
}else{
generic.flash.remove(o.id);
}
},scriptHandler:function(_8c,_8d){
var err=_8c instanceof Error;
generic.flash.so=swfobject;
generic.flash._initialize();
},addLoadedListener:function(_8f){
this._loadedListeners.push(_8f);
},addInstallingListener:function(_90){
this._installingListeners.push(_90);
},loaded:function(){
console.log("dojox.flash.loaded called!!");
generic.flash.ready=true;
if(generic.flash._loadedListeners.length>0){
for(var i=0;i<generic.flash._loadedListeners.length;i++){
generic.flash._loadedListeners[i].call(null);
}
}
},installing:function(){
if(generic.flash._installingListeners.length>0){
for(var i=0;i<generic.flash._installingListeners.length;i++){
generic.flash._installingListeners[i].call(null);
}
}
},remove:function(id){
var o=dojo.byId(id);
if(o&&(o.nodeName==="EMBED"||o.nodeName==="OBJECT")){
if(dojo.isIE){
if(o.readyState==4){
generic.flash.removeIE(o.id);
}else{
window.attachEvent("onload",function(){
generic.flash.removeIE(o.id);
});
}
}else{
o.parentNode.removeChild(o);
}
}
},removeIE:function(id){
var o=dojo.byId(id);
if(o){
for(i in o){
if(typeof o[i]=="function"){
o[i]=null;
}
}
o.parentNode.removeChild(o);
}
},_initialize:function(){
console.log("g.f._init()");
var _97=new dojox.flash.Install();
generic.flash.installer=_97;
if(_97.needed()===true){
console.log("Installer needed!");
if(!dojo.byId("noflash")){
var oa=generic.flash._swfObjectArgs;
dojo.byId(oa.eid).innerHTML=generic.flash._noflashDefault;
}
var nf=dojo.byId("noflash");
dojo.style(nf,"display","block");
dojo.addClass(nf,"clickable");
dojo.connect(nf,"onclick",this,function(){
window.location="http://www.adobe.com/go/getflashplayer";
});
if(dojo.isIE){
console.log("IE lt 7");
}else{
console.log("Not IE, run install()");
_97.install();
}
}else{
dojox.flash.obj=new generic.flash.Embed(generic.flash._isSwfObject);
generic.flash.comm=dojox.flash.comm=new dojox.flash.Communicator();
}
}};
dojox.flash.loaded=generic.flash.loaded;
generic.flash.Embed=function(_9a){
console.log("generic.flash.Embed");
if(_9a){
var oa=generic.flash._swfObjectArgs;
this.id=oa.attributes.id;
generic.flash.so.addDomLoadEvent(function(){
var fo=generic.flash.so.createSWF(oa.attributes,oa.params,oa.eid);
});
}else{
this.id=generic.flash.id;
generic.flash.so.addDomLoadEvent(function(){
var fo=generic.flash.so.registerObject(this.id,"8.0.0","/flash/expressInstall.swf");
});
}
};
generic.flash.Embed.prototype={get:function(){
if(generic.flash._isSwfObject){
return document.getElementById(this.id);
}else{
if(dojo.isIE||dojo.isSafari){
return document.getElementById(this.id);
}else{
return document[this.id+"Embed"];
}
}
}};
generic.flash.info=new dojox.flash.Info();
dojo.provide("generic.flash.loader");
generic.flash.loader=new function(){
this.items={};
this.so=null;
this.addLoadItem=function(_9e,_9f,_a0){
item={id:_a0,attributes:_9e,params:_9f,obj:null};
this.items[_a0]=item;
};
this.loadItems=function(){
if(this.so===null){
if(typeof swfobject=="undefined"){
return;
}
this.so=swfobject;
}
var _a1=this;
for(var i in this.items){
if(this.items[i]){
var _a3=this.items[i];
console.log("loading: "+_a3.id);
_a1.so.createSWF(_a3.attributes,_a3.params,_a3.id);
}
}
};
};
dojo.addOnLoad(function(){
generic.flash.loader.loadItems();
});
}
if(!dojo._hasResource["generic.flash"]){
dojo._hasResource["generic.flash"]=true;
dojo.provide("generic.flash");
}
if(!dojo._hasResource["dojo.regexp"]){
dojo._hasResource["dojo.regexp"]=true;
dojo.provide("dojo.regexp");
dojo.regexp.escapeString=function(str,_a5){
return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){
if(_a5&&_a5.indexOf(ch)!=-1){
return ch;
}
return "\\"+ch;
});
};
dojo.regexp.buildGroupRE=function(arr,re,_a9){
if(!(arr instanceof Array)){
return re(arr);
}
var b=[];
for(var i=0;i<arr.length;i++){
b.push(re(arr[i]));
}
return dojo.regexp.group(b.join("|"),_a9);
};
dojo.regexp.group=function(_ac,_ad){
return "("+(_ad?"?:":"")+_ac+")";
};
}
if(!dojo._hasResource["dojo.cookie"]){
dojo._hasResource["dojo.cookie"]=true;
dojo.provide("dojo.cookie");
dojo.cookie=function(_ae,_af,_b0){
var c=document.cookie;
if(arguments.length==1){
var _b2=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(_ae)+"=([^;]*)"));
return _b2?decodeURIComponent(_b2[1]):undefined;
}else{
_b0=_b0||{};
var exp=_b0.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_b0.expires=d;
}
if(exp&&exp.toUTCString){
_b0.expires=exp.toUTCString();
}
_af=encodeURIComponent(_af);
var _b5=_ae+"="+_af;
for(propName in _b0){
_b5+="; "+propName;
var _b6=_b0[propName];
if(_b6!==true){
_b5+="="+_b6;
}
}
document.cookie=_b5;
}
};
dojo.cookie.isSupported=function(){
if(!("cookieEnabled" in navigator)){
this("__djCookieTest__","CookiesAllowed");
navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";
if(navigator.cookieEnabled){
this("__djCookieTest__","",{expires:-1});
}
}
return navigator.cookieEnabled;
};
}
if(!dojo._hasResource["generic.cookie"]){
dojo._hasResource["generic.cookie"]=true;
dojo.provide("generic.cookie");
dojo.mixin(dojo.cookie,{update:function(_b7,val,_b9){
_b9=_b9||{};
var exp=_b9.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_b9.expires=d;
}
if(exp&&exp.toUTCString){
_b9.expires=exp.toUTCString();
}
var _bc=_b7+"="+val;
for(var i in _b9){
var key=i;
var val=_b9[i];
_bc+="; "+key+"="+val;
}
document.cookie=_bc;
},serialize:function(_bf,to){
if(_bf){
if(to&&to!=="undefined"){
if(to=="perl"){
return this.toPerl(_bf);
}else{
return dojo.toJson(_bf);
}
}else{
try{
return dojo.toJson(_bf);
}
catch(e){
throw new Error("json serialize failed, trying perl.");
return this.toPerl(_bf);
}
}
}
},toPerl:function(_c1){
if(_c1){
var str="";
for(var i in _c1){
if(_c1[i]){
if(str!==""){
str+="&";
}
str+=i+"&"+_c1[i];
}
}
return str;
}
},deserialize:function(_c4,_c5){
if(_c4){
if(_c5&&_c5!=="undefined"){
if(_c5=="perl"){
return this.fromPerl(_c4);
}else{
return dojo.fromJson(_c4);
}
}else{
try{
return this.fromPerl(_c4);
}
catch(e){
throw new Error("deserialize fromPerl failed, trying fromJson");
return dojo.fromJson(_c4);
}
}
}
},fromPerl:function(_c6){
if(_c6){
var _c7={};
var _c8=_c6.split("&");
for(var i=0;i<_c8.length;i+=2){
var key=_c8[i];
var val=escape(_c8[i+1]);
if(key&&val&&typeof (val)!=="undefined"){
_c7[key]=val;
}
}
return _c7;
}
},fromJson:function(_cc){
if(_cc){
return dojo.fromJson(_cc);
}
},destroy:function(){
}});
}
if(!dojo._hasResource["dojo.rpc.RpcService"]){
dojo._hasResource["dojo.rpc.RpcService"]=true;
dojo.provide("dojo.rpc.RpcService");
dojo.declare("dojo.rpc.RpcService",null,{constructor:function(_cd){
if(_cd){
if((dojo.isString(_cd))||(_cd instanceof dojo._Url)){
if(_cd instanceof dojo._Url){
var url=_cd+"";
}else{
url=_cd;
}
var def=dojo.xhrGet({url:url,handleAs:"json-comment-optional",sync:true});
def.addCallback(this,"processSmd");
def.addErrback(function(){
throw new Error("Unable to load SMD from "+_cd);
});
}else{
if(_cd.smdStr){
this.processSmd(dojo.eval("("+_cd.smdStr+")"));
}else{
if(_cd.serviceUrl){
this.serviceUrl=_cd.serviceUrl;
}
this.timeout=_cd.timeout||3000;
if("strictArgChecks" in _cd){
this.strictArgChecks=_cd.strictArgChecks;
}
this.processSmd(_cd);
}
}
}
},strictArgChecks:true,serviceUrl:"",parseResults:function(obj){
return obj;
},errorCallback:function(_d1){
return function(_d2){
_d1.errback(new Error(_d2.message));
};
},resultCallback:function(_d3){
var tf=dojo.hitch(this,function(obj){
if(obj.error!=null){
var err;
if(typeof obj.error=="object"){
err=new Error(obj.error.message);
err.code=obj.error.code;
err.error=obj.error.error;
}else{
err=new Error(obj.error);
}
err.id=obj.id;
err.errorObject=obj;
_d3.errback(err);
}else{
_d3.callback(this.parseResults(obj));
}
});
return tf;
},generateMethod:function(_d7,_d8,url){
return dojo.hitch(this,function(){
var _da=new dojo.Deferred();
if((this.strictArgChecks)&&(_d8!=null)&&(arguments.length!=_d8.length)){
throw new Error("Invalid number of parameters for remote method.");
}else{
this.bind(_d7,dojo._toArray(arguments),_da,url);
}
return _da;
});
},processSmd:function(_db){
if(_db.methods){
dojo.forEach(_db.methods,function(m){
if(m&&m.name){
this[m.name]=this.generateMethod(m.name,m.parameters,m.url||m.serviceUrl||m.serviceURL);
if(!dojo.isFunction(this[m.name])){
throw new Error("RpcService: Failed to create"+m.name+"()");
}
}
},this);
}
this.serviceUrl=_db.serviceUrl||_db.serviceURL;
this.required=_db.required;
this.smd=_db;
}});
}
if(!dojo._hasResource["generic.jsonrpc"]){
dojo._hasResource["generic.jsonrpc"]=true;
dojo.provide("generic.jsonrpc");
dojo.declare("generic.jsonrpc",dojo.rpc.RpcService,{constructor:function(_dd){
var _de=["serviceUrl","contentType","handleAs","timeout"];
if(_dd&&_dd!="undefined"){
for(var i in _de){
if(_dd[i]){
this[i]=_dd[i];
}
}
}
this._cache={};
this._prevRequests={};
this._id=generic.jsonrpc.prototype._id++;
},_id:0,_reqId:0,_cache:null,_prevRequests:null,serviceUrl:"/jsonrpc.logic",contentType:"application/x-www-form-urlencoded",handleAs:"json-comment-optional",timeout:120*1000,bustCache:false,callRemote:function(_e0,_e1){
var _e2=new dojo.Deferred();
this.bind(_e0,_e1,_e2);
return _e2;
},bind:function(_e3,_e4,_e5,url){
var def=dojo.rawXhrPost({url:url||this.serviceUrl,postData:this.createRequest(_e3,_e4),contentType:this.contentType,timeout:this.timeout,handleAs:this.handleAs});
def.addCallbacks(this.resultCallback(_e5),this.errorCallback(_e5));
},createRequest:function(_e8,_e9){
var req=[{"method":_e8,"params":_e9,"id":++this._reqId}];
var d=dojo.toJson(req);
var _ec="JSONRPC="+encodeURIComponent(d);
console.log("JsonService: id: "+this._reqId+" JSON-RPC Request: "+_ec);
this._prevRequests[this._reqId]=_ec;
this._cache[_ec]="in progress";
return _ec;
},parseResults:function(obj){
var _ee=0;
var _ef=null;
if(dojo.isObject(obj)){
if(obj[1]){
if("tags" in obj[1]){
if(frames[0]){
if(frames["datacoremetrics"]){
CMframe=frames["datacoremetrics"];
CMframe.document.open();
for(var i=0;i<=obj[1].tags.length-1;i++){
CMframe.document.write(obj[1].tags[i]);
}
CMframe.document.close();
}else{
console.log("datacoremetrics Frame is misnamed");
}
}else{
console.log("datacoremetrics Frame is missing");
}
}
}
_ef=obj[0];
if("id" in obj[0]){
_ee=obj[0].id;
}
if("result" in obj[0]){
if(_ee!=0){
var _f1=this._prevRequests[_ee];
this._cache[_f1]=obj[0].result;
}
_ef.result=obj[0].result;
}
if("error" in obj[0]){
_ef.error=obj[0].error;
}
return _ef;
}
return obj;
}});
}
if(!dojo._hasResource["generic.back"]){
dojo._hasResource["generic.back"]=true;
dojo.provide("generic.back");
(function(){
var _f2=generic.back;
function getHash(){
var h=window.location.hash;
if(h.charAt(0)=="#"){
h=h.substring(1);
}
return dojo.isMozilla?h:decodeURIComponent(h);
};
function setHash(h){
if(!h){
h="";
}
window.location.hash=h;
_f5=history.length;
};
if(dojo.exists("tests.back-hash")){
_f2.getHash=getHash;
_f2.setHash=setHash;
}
var _f6=(typeof (window)!=="undefined")?window.location.href:"";
var _f7=(typeof (window)!=="undefined")?getHash():"";
var _f8=null;
var _f9=null;
var _fa=null;
var _fb=null;
var _fc=[];
var _fd=[];
var _fe=false;
var _ff=false;
var _f5;
function handleBackButton(){
var _100=_fd.pop();
if(!_100){
return;
}
var last=_fd[_fd.length-1];
if(!last&&_fd.length==0){
last=_f8;
}
if(last){
if(last.kwArgs["back"]){
last.kwArgs["back"]();
}else{
if(last.kwArgs["backButton"]){
last.kwArgs["backButton"]();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("back");
}
}
}
}
_fc.push(_100);
};
_f2.goBack=handleBackButton;
function handleForwardButton(){
var last=_fc.pop();
if(!last){
return;
}
if(last.kwArgs["forward"]){
last.kwArgs.forward();
}else{
if(last.kwArgs["forwardButton"]){
last.kwArgs.forwardButton();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("forward");
}
}
}
_fd.push(last);
};
_f2.goForward=handleForwardButton;
function createState(url,args,hash){
return {"url":url,"kwArgs":args,"urlHash":hash};
};
function getUrlQuery(url){
var _107=url.split("?");
if(_107.length<2){
return null;
}else{
return _107[1];
}
};
function loadIframeHistory(){
var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();
_fe=true;
if(_fb){
dojo.isSafari?_fb.location=url:window.frames[_fb.name].location=url;
}else{
}
return url;
};
function checkLocation(){
if(!_ff){
var hsl=_fd.length;
var hash=getHash();
if((hash===_f7||window.location.href==_f6)&&(hsl==1)){
handleBackButton();
return;
}
if(_fc.length>0){
if(_fc[_fc.length-1].urlHash===hash){
handleForwardButton();
return;
}
}
if((hsl>=2)&&(_fd[hsl-2])){
if(_fd[hsl-2].urlHash===hash){
handleBackButton();
return;
}
}
if(dojo.isSafari&&dojo.isSafari<3){
var _10b=history.length;
if(_10b>_f5){
handleForwardButton();
}else{
if(_10b<_f5){
handleBackButton();
}
}
_f5=_10b;
}
}
};
_f2.init=function(){
console.log("back.init() !!!!!");
if(dojo.byId("dj_history")){
return;
}
var src=dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html");
document.write("<iframe style=\"border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;\" name=\"dj_history\" id=\"dj_history\" src=\""+src+"\"></iframe>");
};
_f2.setInitialState=function(args){
_f8=createState(_f6,args,_f7);
};
_f2.addToHistory=function(args){
_fc=[];
var hash=null;
var url=null;
if(!_fb){
if(dojo.config["useXDomain"]&&!dojo.config["dojoIframeHistoryUrl"]){
console.debug("generic.back: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
_fb=window.frames["dj_history"];
}
if(!_fa){
_fa=document.createElement("a");
dojo.body().appendChild(_fa);
_fa.style.display="none";
}
if(args["changeUrl"]){
hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(_fd.length==0&&_f8.urlHash==hash){
_f8=createState(url,args,hash);
return;
}else{
if(_fd.length>0&&_fd[_fd.length-1].urlHash==hash){
_fd[_fd.length-1]=createState(url,args,hash);
return;
}
}
_ff=true;
setTimeout(function(){
setHash(hash);
_ff=false;
},1);
_fa.href=hash;
if(dojo.isIE){
url=loadIframeHistory();
var _111=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_113){
if(getHash()!=""){
setTimeout(function(){
setHash(hash);
},1);
}
_111.apply(this,[_113]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _114=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_116){
if(getHash()!=""){
setHash(hash);
}
if(_114){
_114.apply(this,[_116]);
}
};
if(args["forward"]){
args.forward=tfw;
}else{
if(args["forwardButton"]){
args.forwardButton=tfw;
}else{
if(args["handle"]){
args.handle=tfw;
}
}
}
}else{
if(!dojo.isIE){
if(!_f9){
_f9=setInterval(checkLocation,200);
}
}
}
}else{
url=loadIframeHistory();
}
_fd.push(createState(url,args,hash));
};
_f2.getStack=function(){
return _fd;
};
_f2._iframeLoaded=function(evt,_118){
var _119=getUrlQuery(_118.href);
if(_119==null){
if(_fd.length==1){
handleBackButton();
}
return;
}
if(_fe){
_fe=false;
return;
}
if(_fd.length>=2&&_119==getUrlQuery(_fd[_fd.length-2].url)){
handleBackButton();
}else{
if(_fc.length>0&&_119==getUrlQuery(_fc[_fc.length-1].url)){
handleForwardButton();
}
}
};
})();
}
if(!dojo._hasResource["generic.flash.State"]){
dojo._hasResource["generic.flash.State"]=true;
dojo.provide("generic.flash.State");
generic.flash.State=function(_11a){
this.changeUrl=_11a;
};
dojo.extend(generic.flash.State,{back:function(){
console.log("back: ",this.changeUrl);
var resp=generic.flash.Api.flashCall("state",this.changeUrl);
generic.flash.State.showHistory();
},forward:function(){
console.log("forward: ",this.changeUrl);
var resp=generic.flash.Api.flashCall("state",this.changeUrl);
generic.flash.State.showHistory();
}});
generic.flash.State.getFragment=function(){
var f=window.location.href.split("#")[1];
return f?f:"/";
};
generic.flash.State.showHistory=function(){
if(dojo.byId("history_stack")){
var _11e=dojo.back.getStack();
var out="<b>History Stack:</b><br/>";
for(var i=0;i<_11e.length;i++){
var bm=_11e[i].urlHash;
out+="<span>"+bm+"</span><br/>";
}
dojo.byId("history_stack").innerHTML=out;
}else{
console.log("History Stack: ",dojo.back.getStack());
}
};
dojo.back=generic.back;
dojo.addOnLoad(function(){
if(dojo.global.generic.flash.Api.enableHistory){
var _122=generic.flash.State.getFragment();
dojo.back.setInitialState(new generic.flash.State(_122));
generic.flash.addLoadedListener(dojo.hitch(this,function(){
var resp=dojo.global.generic.flash.Api.flashCall("state",_122);
console.log("Sent flash initFragment: ",resp);
}));
}
});
}
if(!dojo._hasResource["generic.flash.ApiMethods"]){
dojo._hasResource["generic.flash.ApiMethods"]=true;
dojo.provide("generic.flash.ApiMethods");
dojo.declare("generic.flash.ApiMethods",null,{response:null,message:function(mess){
alert("message: "+mess);
return this.response.createResponse(1,mess);
},state:function(){
var args=arguments[0][0];
if(dojo.exists(args.action,dojo.back)){
var resp;
if(args.fragment){
resp=dojo.back[args.action](new generic.flash.State(args.fragment));
}else{
if(args.action=="goBack"){
resp=window.history.go(-1);
}else{
if(args.action=="goForward"){
resp=window.history.go(1);
}
}
}
generic.flash.State.showHistory();
return this.response.createResponse(1,generic.flash.State.getFragment());
}else{
return this.response.createResponse(0,"Action "+args.action+" not allowed on history object.");
}
},cuePoint:function(){
var args=arguments[0];
dojo.publish("/flash/event/cuePoint",[args]);
var inc=dojo.toJson(args,true);
this.response.createResponse(1,args);
},cuePointProduct:function(args){
var _12a=args[0].actions[0];
this.cuePoint(_12a);
},alterCart:function(){
var args=arguments[0];
var _12c=args[0].actions[0];
var _12d="Cart.alterCart";
args[0].mostRecent=1;
var self=this;
self.cartAction=_12c.action;
self.actionPath=_12c.path;
var req=new generic.jsonrpc();
dojo.publish("/page/cart/preAlterCart",[]);
var def=req.callRemote(_12d,args);
def.addBoth(function(resp){
args.resp=resp;
dojo.publish("/page/cart/alterCart",[args]);
if(self.cartAction=="add"){
var _132=dojo.cookie("page_data");
if(_132&&_132!==null){
var _133=dojo.cookie.deserialize(_132);
var _134="cart.lpath";
_133[_134]=self.actionPath;
var nstr=dojo.cookie.serialize(_133,"perl");
try{
dojo.cookie.update("page_data",nstr,{path:"/"});
}
catch(e){
throw new Error("could not append to cookie 'page_data': "+e||e.message);
}
}
}
});
return this.response.createResponse(1,args);
},pageData:function(_136){
var args=_136[0];
var _138=false;
if(typeof args=="undefined"){
try{
if(_136["query"]&&_136["query"]=="palette"){
_138=true;
args=_136;
}
}
catch(e){
}
}
var _139;
var pd=parent.page_data;
if(args&&args.query){
var path=args.query.split(".");
var _13c=path.length;
var _13d=pd;
for(var i=0;i<_13c;i++){
var key=path.shift();
_13d=_13d[key];
}
_139=_13d;
}else{
_139=pd;
}
if(_138){
try{
if(page_data.palette.kit){
_139={palette:_139};
return _139;
}
}
catch(e){
}
}
return this.response.createResponse(1,_139);
},popup:function(_140){
var args=_140[0];
var _142=["height","width","top","left","resizable","scrollbars","status","toolbar","menubar","location"];
var _143={location:null,height:500,width:500,top:25,left:25,resizable:"yes",scrollbars:"yes",status:"no",toolbar:"no",menubar:"no",name:"flash pop"};
var _144="";
for(var i=0;i<_142.length;i++){
var val;
var attr=_142[i];
if(args[attr]&&args[attr]!="undefined"){
val=args[attr];
}else{
val=_143[attr];
}
_144+=attr+"="+val+",";
}
_144=_144.substring(0,_144.length-1);
var win=window.open(args.location,args.name,_144);
if(!win){
alert("Unable to open new window.  Please allow popups for this domain.");
}
return this.response.createResponse(1,args.location);
},notifyEvent:function(_149){
try{
eval(_149.func+"('"+_149.event+"')");
}
catch(e){
}
},setElementSize:function(_14a){
var args=_14a[0];
function setSize(id,w,h){
if(id=="guideBrowser_resize"){
return;
}
var node=dojo.byId(id);
if(node){
node.style.width=w;
node.style.height=h;
}
var _150=dojo.coords(node);
};
function getType(_151){
var type="default";
var v=_151.toString();
if(v.search(/[0-9]%/)>0){
type="percent";
}else{
if(v=="window"||v=="document"){
type=v;
}
}
return type;
};
function getValueStr(_154,axis){
var type=getType(_154);
var _157;
switch(type){
case "percent":
_157=_154;
break;
case "window":
var _158;
if(axis=="w"){
if(typeof window.innerWidth!="undefined"){
_158=document.documentElement.clientWidth;
}else{
}
}else{
if(typeof window.innerHeight!="undefined"){
_158=window.innerHeight;
}else{
_158=document.documentElement.clientHeight;
}
}
_157=_158+"px";
break;
case "document":
var _158;
if(axis=="w"){
_158=dojo.body().scrollWidth;
}else{
_158=dojo.body().scrollHeight;
}
_157=_158+"px";
break;
default:
_157=_154+"px";
}
return _157;
};
if(args.id=="productBrowser_resize"){
var vp=dijit.getViewport();
args.h=(vp.h>args.h)?vp.h:args.h;
}
var wval=getValueStr(args.w,"w");
var hval=getValueStr(args.h,"h");
setSize(args.id,wval,hval);
return this.response.createResponse(1,args);
},cmCreatePageviewTag:function(args){
var resp=dojo.global.cmCreatePageviewTag(args[0],args[1],args[2],args[3]);
return this.response.createResponse(1,"pageview tag created");
},cmCreateManualLinkClickTag:function(args){
dojo.global.cmCreateManualLinkClickTag(args[0],args[1],args[2]);
return this.response.createResponse(1,"link click tag created");
},cmCreatePageElementTag:function(args){
var resp=dojo.global.cmCreatePageElementTag(args[0],args[1],args[2],args[3],args[4]);
return this.response.createResponse(1,"Page Element tag created");
},cmCreateProductElementTag:function(args){
dojo.global.cmCreatePageElementTag(args[0],args[1],args[2],args[3],args[4]);
return this.response.createResponse(1,"Product Element tag created");
},cmCreateProductviewTag:function(args){
dojo.global.cmCreateProductviewTag(args[0],args[1],args[2]);
return this.response.createResponse(1,"productview tag created");
},cmCreateConversionEventTag:function(args){
dojo.global.cmCreateConversionEventTag(args[0],args[1],args[2],args[3]);
return this.response.createResponse(1,"conversion event tag created");
},__process:function(_164,args){
this.response=new generic.flash.ApiResponse({method:_164,req_args:args});
var resp=this[_164](args);
return resp;
}});
dojo.provide("generic.flash.ApiResponse");
dojo.declare("generic.flash.ApiResponse",null,{id:0,request:{},results:null,success:false,constructor:function(req){
this.request=req;
this.id=this.__genId();
},createResponse:function(_168,_169){
this.success=(_168)?true:false;
if(_169){
this.results=_169;
}else{
this.results=(this.success)?"Method call successful":"Method call failed";
}
var resp={id:this.id,success:this.success,request:this.request,results:this.results};
return resp;
},__genId:function(){
var d=new Date();
var uid=(d.getTime()).toString();
return uid;
}});
}
if(!dojo._hasResource["generic.flash.Api"]){
dojo._hasResource["generic.flash.Api"]=true;
dojo.provide("generic.flash.Api");
generic.flash.Api=new function(){
this.id=null;
this.initialized=false;
this.enableHistory=false;
this._flashReady=false;
this._pageReady=false;
this._initListeners=new Array();
this._isSwfObject=false;
this._swfObjectArgs=new Object();
this.registerSwf=function(id){
this.id=id;
this._initialize();
};
this.embedSwf=function(attr,_16f,eid,_171){
var rel=dojo.byId(eid);
if(!rel){
console.log("Element doesnt exist");
return;
}
this._isSwfObject=true;
this._flashReady=_171||this._flashReady;
this.id=eid;
this._swfObjectArgs={attributes:attr,params:_16f,eid:eid};
this._initialize();
};
this.removeSwf=function(){
var fid=this._swfObjectArgs.attributes.id;
generic.flash.removeSwfObject(fid);
};
this.isReady=function(){
return this._flashReady&&this._pageReady;
};
this.addOnInit=function(_174){
this._initListeners.push(_174);
};
this._initialize=function(){
generic.flash.addLoadedListener(dojo.hitch(this,function(){
this._flashReady=true;
if(this.isReady()){
this._loaded();
}
}));
if(this._isSwfObject){
generic.flash.embedSwfObject(this._swfObjectArgs);
}else{
generic.flash.setSwfObject(this.id);
}
dojo.connect(dojo,"loaded",this,function(){
this._pageReady=true;
if(this.isReady()){
this._loaded();
}
});
var self=this;
dojo.connect(window,"onunload",this,function(){
var fid=self._swfObjectArgs.attributes.id;
generic.flash.removeSwfObject(fid);
},true);
};
this._loaded=function(){
this.initialized=true;
if(this._initListeners.length>0){
for(var i=0;i<this._initListeners.length;i++){
this._initListeners[i].call(null);
}
}
};
};
generic.flash.ApiMethods=new generic.flash.ApiMethods();
generic.flash.Api.jsCall=function(_178,args){
console.log("flash calling js method: ",_178," with args: ",args);
if(dojo.exists(_178,generic.flash.ApiMethods)){
var resp=generic.flash.ApiMethods.__process(_178,args);
console.log("method exsited, response is:");
return resp;
}else{
console.log(_178+": No such method exists");
return {success:false,results:"No such method exists"};
}
};
generic.flash.Api.flashCall=function(_17b,args){
var db="js calling flash method: "+_17b;
console.log(db);
var _17e=generic.flash.comm.flashCall(_17b,args);
return _17e;
};
generic.flash.Api.enableHistory=false;
}
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 _17f=dojo.global;
var _180=dojo.doc;
if(_180.selection){
return !_180.selection.createRange().text;
}else{
var _181=_17f.getSelection();
if(dojo.isString(_181)){
return !_181;
}else{
return _181.isCollapsed||!_181.toString();
}
}
},getBookmark:function(){
var _182,_183=dojo.doc.selection;
if(_183){
var _184=_183.createRange();
if(_183.type.toUpperCase()=="CONTROL"){
if(_184.length){
_182=[];
var i=0,len=_184.length;
while(i<len){
_182.push(_184.item(i++));
}
}else{
_182=null;
}
}else{
_182=_184.getBookmark();
}
}else{
if(window.getSelection){
_183=dojo.global.getSelection();
if(_183){
_184=_183.getRangeAt(0);
_182=_184.cloneRange();
}
}else{
console.warn("No idea how to store the current selection for this browser!");
}
}
return _182;
},moveToBookmark:function(_187){
var _188=dojo.doc;
if(_188.selection){
var _189;
if(dojo.isArray(_187)){
_189=_188.body.createControlRange();
dojo.forEach(_187,"range.addElement(item)");
}else{
_189=_188.selection.createRange();
_189.moveToBookmark(_187);
}
_189.select();
}else{
var _18a=dojo.global.getSelection&&dojo.global.getSelection();
if(_18a&&_18a.removeAllRanges){
_18a.removeAllRanges();
_18a.addRange(_187);
}else{
console.warn("No idea how to restore selection for this browser!");
}
}
},getFocus:function(menu,_18c){
return {node:menu&&dojo.isDescendant(dijit._curFocus,menu.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_18c||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_18c||dojo.global,dijit.getBookmark):null,openedForWindow:_18c};
},focus:function(_18d){
if(!_18d){
return;
}
var node="node" in _18d?_18d.node:_18d,_18f=_18d.bookmark,_190=_18d.openedForWindow;
if(node){
var _191=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;
if(_191&&_191.focus){
try{
_191.focus();
}
catch(e){
}
}
dijit._onFocusNode(node);
}
if(_18f&&dojo.withGlobal(_190||dojo.global,dijit.isCollapsed)){
if(_190){
_190.focus();
}
try{
dojo.withGlobal(_190||dojo.global,dijit.moveToBookmark,null,[_18f]);
}
catch(e){
}
}
},_activeStack:[],registerWin:function(_192){
if(!_192){
_192=window;
}
dojo.connect(_192.document,"onmousedown",function(evt){
dijit._justMouseDowned=true;
setTimeout(function(){
dijit._justMouseDowned=false;
},0);
dijit._onTouchNode(evt.target||evt.srcElement);
});
var body=_192.document.body||_192.document.getElementsByTagName("body")[0];
if(body){
if(dojo.isIE){
body.attachEvent("onactivate",function(evt){
if(evt.srcElement.tagName.toLowerCase()!="body"){
dijit._onFocusNode(evt.srcElement);
}
});
body.attachEvent("ondeactivate",function(evt){
dijit._onBlurNode(evt.srcElement);
});
}else{
body.addEventListener("focus",function(evt){
dijit._onFocusNode(evt.target);
},true);
body.addEventListener("blur",function(evt){
dijit._onBlurNode(evt.target);
},true);
}
}
body=null;
},_onBlurNode:function(node){
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(node){
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
var _19b=[];
try{
while(node){
if(node.dijitPopupParent){
node=dijit.byId(node.dijitPopupParent).domNode;
}else{
if(node.tagName&&node.tagName.toLowerCase()=="body"){
if(node===dojo.body()){
break;
}
node=dijit.getDocumentWindow(node.ownerDocument).frameElement;
}else{
var id=node.getAttribute&&node.getAttribute("widgetId");
if(id){
_19b.unshift(id);
}
node=node.parentNode;
}
}
}
}
catch(e){
}
dijit._setStack(_19b);
},_onFocusNode:function(node){
if(node&&node.tagName&&node.tagName.toLowerCase()=="body"){
return;
}
dijit._onTouchNode(node);
if(node==dijit._curFocus){
return;
}
if(dijit._curFocus){
dijit._prevFocus=dijit._curFocus;
}
dijit._curFocus=node;
dojo.publish("focusNode",[node]);
},_setStack:function(_19e){
var _19f=dijit._activeStack;
dijit._activeStack=_19e;
for(var _1a0=0;_1a0<Math.min(_19f.length,_19e.length);_1a0++){
if(_19f[_1a0]!=_19e[_1a0]){
break;
}
}
for(var i=_19f.length-1;i>=_1a0;i--){
var _1a2=dijit.byId(_19f[i]);
if(_1a2){
_1a2._focused=false;
_1a2._hasBeenBlurred=true;
if(_1a2._onBlur){
_1a2._onBlur();
}
if(_1a2._setStateClass){
_1a2._setStateClass();
}
dojo.publish("widgetBlur",[_1a2]);
}
}
for(i=_1a0;i<_19e.length;i++){
_1a2=dijit.byId(_19e[i]);
if(_1a2){
_1a2._focused=true;
if(_1a2._onFocus){
_1a2._onFocus();
}
if(_1a2._setStateClass){
_1a2._setStateClass();
}
dojo.publish("widgetFocus",[_1a2]);
}
}
}});
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(_1a3){
if(this._hash[_1a3.id]){
throw new Error("Tried to register widget with id=="+_1a3.id+" but that id is already registered");
}
this._hash[_1a3.id]=_1a3;
},remove:function(id){
delete this._hash[id];
},forEach:function(func){
for(var id in this._hash){
func(this._hash[id]);
}
},filter:function(_1a7){
var res=new dijit.WidgetSet();
this.forEach(function(_1a9){
if(_1a7(_1a9)){
res.add(_1a9);
}
});
return res;
},byId:function(id){
return this._hash[id];
},byClass:function(cls){
return this.filter(function(_1ac){
return _1ac.declaredClass==cls;
});
}});
dijit.registry=new dijit.WidgetSet();
dijit._widgetTypeCtr={};
dijit.getUniqueId=function(_1ad){
var id;
do{
id=_1ad+"_"+(_1ad in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_1ad]:dijit._widgetTypeCtr[_1ad]=0);
}while(dijit.byId(id));
return id;
};
if(dojo.isIE){
dojo.addOnUnload(function(){
dijit.registry.forEach(function(_1af){
_1af.destroy();
});
});
}
dijit.byId=function(id){
return (dojo.isString(id))?dijit.registry.byId(id):id;
};
dijit.byNode=function(node){
return dijit.registry.byId(node.getAttribute("widgetId"));
};
dijit.getEnclosingWidget=function(node){
while(node){
if(node.getAttribute&&node.getAttribute("widgetId")){
return dijit.registry.byId(node.getAttribute("widgetId"));
}
node=node.parentNode;
}
return null;
};
dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};
dijit._isElementShown=function(elem){
var _1b4=dojo.style(elem);
return (_1b4.visibility!="hidden")&&(_1b4.visibility!="collapsed")&&(_1b4.display!="none");
};
dijit.isTabNavigable=function(elem){
if(dojo.hasAttr(elem,"disabled")){
return false;
}
var _1b6=dojo.hasAttr(elem,"tabindex");
var _1b7=dojo.attr(elem,"tabindex");
if(_1b6&&_1b7>=0){
return true;
}
var name=elem.nodeName.toLowerCase();
if(((name=="a"&&dojo.hasAttr(elem,"href"))||dijit._tabElements[name])&&(!_1b6||_1b7>=0)){
return true;
}
return false;
};
dijit._getTabNavigable=function(root){
var _1ba,last,_1bc,_1bd,_1be,_1bf;
var _1c0=function(_1c1){
dojo.query("> *",_1c1).forEach(function(_1c2){
var _1c3=dijit._isElementShown(_1c2);
if(_1c3&&dijit.isTabNavigable(_1c2)){
var _1c4=dojo.attr(_1c2,"tabindex");
if(!dojo.hasAttr(_1c2,"tabindex")||_1c4==0){
if(!_1ba){
_1ba=_1c2;
}
last=_1c2;
}else{
if(_1c4>0){
if(!_1bc||_1c4<_1bd){
_1bd=_1c4;
_1bc=_1c2;
}
if(!_1be||_1c4>=_1bf){
_1bf=_1c4;
_1be=_1c2;
}
}
}
}
if(_1c3){
_1c0(_1c2);
}
});
};
if(dijit._isElementShown(root)){
_1c0(root);
}
return {first:_1ba,last:last,lowest:_1bc,highest:_1be};
};
dijit.getFirstInTabbingOrder=function(root){
var _1c6=dijit._getTabNavigable(dojo.byId(root));
return _1c6.lowest?_1c6.lowest:_1c6.first;
};
dijit.getLastInTabbingOrder=function(root){
var _1c8=dijit._getTabNavigable(dojo.byId(root));
return _1c8.last?_1c8.last:_1c8.highest;
};
}
if(!dojo._hasResource["dijit._base.window"]){
dojo._hasResource["dijit._base.window"]=true;
dojo.provide("dijit._base.window");
dijit.getDocumentWindow=function(doc){
if(dojo.isSafari&&!doc._parentWindow){
var fix=function(win){
win.document._parentWindow=win;
for(var i=0;i<win.frames.length;i++){
fix(win.frames[i]);
}
};
fix(window.top);
}
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 _1ce=[],_1cf=1000,_1d0=1;
this.prepare=function(node){
dojo.body().appendChild(node);
var s=node.style;
if(s.display=="none"){
s.display="";
}
s.visibility="hidden";
s.position="absolute";
s.top="-9999px";
};
this.open=function(args){
var _1d4=args.popup,_1d5=args.orient||{"BL":"TL","TL":"BL"},_1d6=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_1d0++);
var _1d8=dojo.doc.createElement("div");
dijit.setWaiRole(_1d8,"presentation");
_1d8.id=id;
_1d8.className="dijitPopup";
_1d8.style.zIndex=_1cf+_1ce.length;
_1d8.style.visibility="hidden";
if(args.parent){
_1d8.dijitPopupParent=args.parent.id;
}
dojo.body().appendChild(_1d8);
var s=_1d4.domNode.style;
s.display="";
s.visibility="";
s.position="";
_1d8.appendChild(_1d4.domNode);
var _1da=new dijit.BackgroundIframe(_1d8);
var best=_1d6?dijit.placeOnScreenAroundElement(_1d8,_1d6,_1d5,_1d4.orient?dojo.hitch(_1d4,"orient"):null):dijit.placeOnScreen(_1d8,args,_1d5=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);
_1d8.style.visibility="visible";
var _1dc=[];
var _1dd=function(){
for(var pi=_1ce.length-1;pi>0&&_1ce[pi].parent===_1ce[pi-1].widget;pi--){
}
return _1ce[pi];
};
_1dc.push(dojo.connect(_1d8,"onkeypress",this,function(evt){
if(evt.keyCode==dojo.keys.ESCAPE&&args.onCancel){
dojo.stopEvent(evt);
args.onCancel();
}else{
if(evt.keyCode==dojo.keys.TAB){
dojo.stopEvent(evt);
var _1e0=_1dd();
if(_1e0&&_1e0.onCancel){
_1e0.onCancel();
}
}
}
}));
if(_1d4.onCancel){
_1dc.push(dojo.connect(_1d4,"onCancel",null,args.onCancel));
}
_1dc.push(dojo.connect(_1d4,_1d4.onExecute?"onExecute":"onChange",null,function(){
var _1e1=_1dd();
if(_1e1&&_1e1.onExecute){
_1e1.onExecute();
}
}));
_1ce.push({wrapper:_1d8,iframe:_1da,widget:_1d4,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_1dc});
if(_1d4.onOpen){
_1d4.onOpen(best);
}
return best;
};
this.close=function(_1e2){
while(dojo.some(_1ce,function(elem){
return elem.widget==_1e2;
})){
var top=_1ce.pop(),_1e5=top.wrapper,_1e6=top.iframe,_1e7=top.widget,_1e8=top.onClose;
if(_1e7.onClose){
_1e7.onClose();
}
dojo.forEach(top.handlers,dojo.disconnect);
if(!_1e7||!_1e7.domNode){
return;
}
this.prepare(_1e7.domNode);
_1e6.destroy();
dojo._destroyElement(_1e5);
if(_1e8){
_1e8();
}
}
};
}();
dijit._frames=new function(){
var _1e9=[];
this.pop=function(){
var _1ea;
if(_1e9.length){
_1ea=_1e9.pop();
_1ea.style.display="";
}else{
if(dojo.isIE){
var html="<iframe src='javascript:\"\"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
_1ea=dojo.doc.createElement(html);
}else{
_1ea=dojo.doc.createElement("iframe");
_1ea.src="javascript:\"\"";
_1ea.className="dijitBackgroundIframe";
}
_1ea.tabIndex=-1;
dojo.body().appendChild(_1ea);
}
return _1ea;
};
this.push=function(_1ec){
_1ec.style.display="";
if(dojo.isIE){
_1ec.style.removeExpression("width");
_1ec.style.removeExpression("height");
}
_1e9.push(_1ec);
};
}();
if(dojo.isIE&&dojo.isIE<7){
dojo.addOnLoad(function(){
var f=dijit._frames;
dojo.forEach([f.pop()],f.push);
});
}
dijit.BackgroundIframe=function(node){
if(!node.id){
throw new Error("no id");
}
if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){
var _1ef=dijit._frames.pop();
node.appendChild(_1ef);
if(dojo.isIE){
_1ef.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetWidth");
_1ef.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetHeight");
}
this.iframe=_1ef;
}
};
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(node){
var _1f1=node.parentNode;
var _1f2=_1f1.scrollTop+dojo.marginBox(_1f1).h;
var _1f3=node.offsetTop+dojo.marginBox(node).h;
if(_1f2<_1f3){
_1f1.scrollTop+=(_1f3-_1f2);
}else{
if(_1f1.scrollTop>node.offsetTop){
_1f1.scrollTop-=(_1f1.scrollTop-node.offsetTop);
}
}
};
}
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 _1f6=d.isOpera;
var maj=Math.floor;
var ff=d.isFF;
var _1f9={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_1f6,dj_opera8:maj(_1f6)==8,dj_opera9:maj(_1f6)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2};
for(var p in _1f9){
if(_1f9[p]){
var html=dojo.doc.documentElement;
if(html.className){
html.className+=" "+p;
}else{
html.className=p;
}
}
}
})();
}
if(!dojo._hasResource["dijit._base.bidi"]){
dojo._hasResource["dijit._base.bidi"]=true;
dojo.provide("dijit._base.bidi");
dojo.addOnLoad(function(){
if(!dojo._isBodyLtr()){
dojo.addClass(dojo.body(),"dijitRtl");
}
});
}
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,_1fd,node,_1ff,obj,_201,_202){
if(obj!=this._obj){
this.stop();
this._initialDelay=_202||500;
this._subsequentDelay=_201||0.9;
this._obj=obj;
this._evt=evt;
this._node=node;
this._currentTimeout=-1;
this._count=-1;
this._callback=dojo.hitch(_1fd,_1ff);
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(node,_204,_205,_206,_207,_208){
return [dojo.connect(node,"onkeypress",this,function(evt){
if(evt.keyCode==_204.keyCode&&(!_204.charCode||_204.charCode==evt.charCode)&&(_204.ctrlKey===undefined||_204.ctrlKey==evt.ctrlKey)&&(_204.altKey===undefined||_204.altKey==evt.ctrlKey)&&(_204.shiftKey===undefined||_204.shiftKey==evt.ctrlKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(_204,_205,node,_206,_204,_207,_208);
}else{
if(dijit.typematic._obj==_204){
dijit.typematic.stop();
}
}
}),dojo.connect(node,"onkeyup",this,function(evt){
if(dijit.typematic._obj==_204){
dijit.typematic.stop();
}
})];
},addMouseListener:function(node,_20c,_20d,_20e,_20f){
var dc=dojo.connect;
return [dc(node,"mousedown",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_20c,node,_20d,node,_20e,_20f);
}),dc(node,"mouseup",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(node,"mouseout",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.stop();
}),dc(node,"mousemove",this,function(evt){
dojo.stopEvent(evt);
}),dc(node,"dblclick",this,function(evt){
dojo.stopEvent(evt);
if(dojo.isIE){
dijit.typematic.trigger(evt,_20c,node,_20d,node,_20e,_20f);
setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
}
})];
},addListener:function(_216,_217,_218,_219,_21a,_21b,_21c){
return this.addKeyListener(_217,_218,_219,_21a,_21b,_21c).concat(this.addMouseListener(_216,_219,_21a,_21b,_21c));
}};
}
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.moduleUrl("dojo","resources/blank.gif")+"\");";
dojo.body().appendChild(div);
var cs=dojo.getComputedStyle(div);
if(cs){
var _21f=cs.backgroundImage;
var _220=(cs.borderTopColor==cs.borderRightColor)||(_21f!=null&&(_21f=="none"||_21f=="url(invalid-url:)"));
dojo[_220?"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,{hasWaiRole:function(elem){
return elem.hasAttribute?elem.hasAttribute("role"):!!elem.getAttribute("role");
},getWaiRole:function(elem){
var _223=elem.getAttribute("role");
if(_223){
var _224=_223.indexOf(":");
return _224==-1?_223:_223.substring(_224+1);
}else{
return "";
}
},setWaiRole:function(elem,role){
elem.setAttribute("role",(dojo.isFF&&dojo.isFF<3)?"wairole:"+role:role);
},removeWaiRole:function(elem){
elem.removeAttribute("role");
},hasWaiState:function(elem,_229){
if(dojo.isFF&&dojo.isFF<3){
return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_229);
}else{
return elem.hasAttribute?elem.hasAttribute("aria-"+_229):!!elem.getAttribute("aria-"+_229);
}
},getWaiState:function(elem,_22b){
if(dojo.isFF&&dojo.isFF<3){
return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_22b);
}else{
var _22c=elem.getAttribute("aria-"+_22b);
return _22c?_22c:"";
}
},setWaiState:function(elem,_22e,_22f){
if(dojo.isFF&&dojo.isFF<3){
elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_22e,_22f);
}else{
elem.setAttribute("aria-"+_22e,_22f);
}
},removeWaiState:function(elem,_231){
if(dojo.isFF&&dojo.isFF<3){
elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_231);
}else{
elem.removeAttribute("aria-"+_231);
}
}});
}
if(!dojo._hasResource["dijit._base"]){
dojo._hasResource["dijit._base"]=true;
dojo.provide("dijit._base");
if(dojo.isSafari){
dojo.connect(window,"load",function(){
window.resizeBy(1,0);
setTimeout(function(){
window.resizeBy(-1,0);
},10);
});
}
}
if(!dojo._hasResource["dijit._Widget"]){
dojo._hasResource["dijit._Widget"]=true;
dojo.provide("dijit._Widget");
dojo.require("dijit._base");
dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},postscript:function(_232,_233){
this.create(_232,_233);
},create:function(_234,_235){
this.srcNodeRef=dojo.byId(_235);
this._connects=[];
this._attaches=[];
if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
this.id=this.srcNodeRef.id;
}
if(_234){
this.params=_234;
dojo.mixin(this,_234);
}
this.postMixInProperties();
if(!this.id){
this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
}
dijit.registry.add(this);
this.buildRendering();
if(this.domNode){
for(var attr in this.attributeMap){
var _237=this[attr];
if(typeof _237!="object"&&((_237!==""&&_237!==false)||(_234&&_234[attr]))){
this.setAttribute(attr,_237);
}
}
}
if(this.domNode){
this.domNode.setAttribute("widgetId",this.id);
}
this.postCreate();
if(this.srcNodeRef&&!this.srcNodeRef.parentNode){
delete this.srcNodeRef;
}
},postMixInProperties:function(){
},buildRendering:function(){
this.domNode=this.srcNodeRef||dojo.doc.createElement("div");
},postCreate:function(){
},startup:function(){
this._started=true;
},destroyRecursive:function(_238){
this.destroyDescendants();
this.destroy();
},destroy:function(_239){
this.uninitialize();
dojo.forEach(this._connects,function(_23a){
dojo.forEach(_23a,dojo.disconnect);
});
dojo.forEach(this._supportingWidgets||[],function(w){
w.destroy();
});
this.destroyRendering(_239);
dijit.registry.remove(this.id);
},destroyRendering:function(_23c){
if(this.bgIframe){
this.bgIframe.destroy();
delete this.bgIframe;
}
if(this.domNode){
dojo._destroyElement(this.domNode);
delete this.domNode;
}
if(this.srcNodeRef){
dojo._destroyElement(this.srcNodeRef);
delete this.srcNodeRef;
}
},destroyDescendants:function(){
dojo.forEach(this.getDescendants(),function(_23d){
_23d.destroy();
});
},uninitialize:function(){
return false;
},onFocus:function(){
},onBlur:function(){
},_onFocus:function(e){
this.onFocus();
},_onBlur:function(){
this.onBlur();
},setAttribute:function(attr,_240){
var _241=this[this.attributeMap[attr]||"domNode"];
this[attr]=_240;
switch(attr){
case "class":
dojo.addClass(_241,_240);
break;
case "style":
if(_241.style.cssText){
_241.style.cssText+="; "+_240;
}else{
_241.style.cssText=_240;
}
break;
default:
if(/^on[A-Z]/.test(attr)){
attr=attr.toLowerCase();
}
if(typeof _240=="function"){
_240=dojo.hitch(this,_240);
}
dojo.attr(_241,attr,_240);
}
},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,_244,_245){
var _246=[];
if(_244=="ondijitclick"){
if(!this.nodesWithKeyClick[obj.nodeName]){
_246.push(dojo.connect(obj,"onkeydown",this,function(e){
if(e.keyCode==dojo.keys.ENTER){
return (dojo.isString(_245))?this[_245](e):_245.call(this,e);
}else{
if(e.keyCode==dojo.keys.SPACE){
dojo.stopEvent(e);
}
}
}));
_246.push(dojo.connect(obj,"onkeyup",this,function(e){
if(e.keyCode==dojo.keys.SPACE){
return dojo.isString(_245)?this[_245](e):_245.call(this,e);
}
}));
}
_244="onclick";
}
_246.push(dojo.connect(obj,_244,this,_245));
this._connects.push(_246);
return _246;
},disconnect:function(_249){
for(var i=0;i<this._connects.length;i++){
if(this._connects[i]==_249){
dojo.forEach(_249,dojo.disconnect);
this._connects.splice(i,1);
return;
}
}
},isLeftToRight:function(){
if(!("_ltr" in this)){
this._ltr=dojo.getComputedStyle(this.domNode).direction!="rtl";
}
return this._ltr;
},isFocusable:function(){
return this.focus&&(dojo.style(this.domNode,"display")!="none");
}});
}
if(!dojo._hasResource["dojo.string"]){
dojo._hasResource["dojo.string"]=true;
dojo.provide("dojo.string");
dojo.string.pad=function(text,size,ch,end){
var out=String(text);
if(!ch){
ch="0";
}
while(out.length<size){
if(end){
out+=ch;
}else{
out=ch+out;
}
}
return out;
};
dojo.string.substitute=function(_250,map,_252,_253){
return _250.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_254,key,_256){
var _257=dojo.getObject(key,false,map);
if(_256){
_257=dojo.getObject(_256,false,_253)(_257);
}
if(_252){
_257=_252(_257,key);
}
return _257.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(_25a,_25b){
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 _25c=dojo.date.stamp._isoRegExp.exec(_25a);
var _25d=null;
if(_25c){
_25c.shift();
if(_25c[1]){
_25c[1]--;
}
if(_25c[6]){
_25c[6]*=1000;
}
if(_25b){
_25b=new Date(_25b);
dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){
return _25b["get"+prop]();
}).forEach(function(_25f,_260){
if(_25c[_260]===undefined){
_25c[_260]=_25f;
}
});
}
_25d=new Date(_25c[0]||1970,_25c[1]||0,_25c[2]||1,_25c[3]||0,_25c[4]||0,_25c[5]||0,_25c[6]||0);
var _261=0;
var _262=_25c[7]&&_25c[7].charAt(0);
if(_262!="Z"){
_261=((_25c[8]||0)*60)+(Number(_25c[9])||0);
if(_262!="-"){
_261*=-1;
}
}
if(_262){
_261-=_25d.getTimezoneOffset();
}
if(_261){
_25d.setTime(_25d.getTime()+_261*60000);
}
}
return _25d;
};
dojo.date.stamp.toISOString=function(_263,_264){
var _=function(n){
return (n<10)?"0"+n:n;
};
_264=_264||{};
var _267=[];
var _268=_264.zulu?"getUTC":"get";
var date="";
if(_264.selector!="time"){
var year=_263[_268+"FullYear"]();
date=["0000".substr((year+"").length)+year,_(_263[_268+"Month"]()+1),_(_263[_268+"Date"]())].join("-");
}
_267.push(date);
if(_264.selector!="date"){
var time=[_(_263[_268+"Hours"]()),_(_263[_268+"Minutes"]()),_(_263[_268+"Seconds"]())].join(":");
var _26c=_263[_268+"Milliseconds"]();
if(_264.milliseconds){
time+="."+(_26c<100?"0":"")+_(_26c);
}
if(_264.zulu){
time+="Z";
}else{
if(_264.selector!="time"){
var _26d=_263.getTimezoneOffset();
var _26e=Math.abs(_26d);
time+=(_26d>0?"-":"+")+_(Math.floor(_26e/60))+":"+_(_26e%60);
}
}
_267.push(time);
}
return _267.join("T");
};
}
if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.parser=new function(){
var d=dojo;
var _270=d._scopeName+"Type";
var qry="["+_270+"]";
function val2type(_272){
if(d.isString(_272)){
return "string";
}
if(typeof _272=="number"){
return "number";
}
if(typeof _272=="boolean"){
return "boolean";
}
if(d.isFunction(_272)){
return "function";
}
if(d.isArray(_272)){
return "array";
}
if(_272 instanceof Date){
return "date";
}
if(_272 instanceof d._Url){
return "url";
}
return "object";
};
function str2obj(_273,type){
switch(type){
case "string":
return _273;
case "number":
return _273.length?Number(_273):NaN;
case "boolean":
return typeof _273=="boolean"?_273:!(_273.toLowerCase()=="false");
case "function":
if(d.isFunction(_273)){
_273=_273.toString();
_273=d.trim(_273.substring(_273.indexOf("{")+1,_273.length-1));
}
try{
if(_273.search(/[^\w\.]+/i)!=-1){
_273=d.parser._nameAnonFunc(new Function(_273),this);
}
return d.getObject(_273,false);
}
catch(e){
return new Function();
}
case "array":
return _273.split(/\s*,\s*/);
case "date":
switch(_273){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_273);
}
case "url":
return d.baseUrl+_273;
default:
return d.fromJson(_273);
}
};
var _275={};
function getClassInfo(_276){
if(!_275[_276]){
var cls=d.getObject(_276);
if(!d.isFunction(cls)){
throw new Error("Could not load class '"+_276+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var _278=cls.prototype;
var _279={};
for(var name in _278){
if(name.charAt(0)=="_"){
continue;
}
var _27b=_278[name];
_279[name]=val2type(_27b);
}
_275[_276]={cls:cls,params:_279};
}
return _275[_276];
};
this._functionFromScript=function(_27c){
var _27d="";
var _27e="";
var _27f=_27c.getAttribute("args");
if(_27f){
d.forEach(_27f.split(/\s*,\s*/),function(part,idx){
_27d+="var "+part+" = arguments["+idx+"]; ";
});
}
var _282=_27c.getAttribute("with");
if(_282&&_282.length){
d.forEach(_282.split(/\s*,\s*/),function(part){
_27d+="with("+part+"){";
_27e+="}";
});
}
return new Function(_27d+_27c.innerHTML+_27e);
};
this.instantiate=function(_284){
var _285=[];
d.forEach(_284,function(node){
if(!node){
return;
}
var type=node.getAttribute(_270);
if((!type)||(!type.length)){
return;
}
var _288=getClassInfo(type);
var _289=_288.cls;
var ps=_289._noScript||_289.prototype._noScript;
var _28b={};
var _28c=node.attributes;
for(var name in _288.params){
var item=_28c.getNamedItem(name);
if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){
continue;
}
var _28f=item.value;
switch(name){
case "class":
_28f=node.className;
break;
case "style":
_28f=node.style&&node.style.cssText;
}
var _290=_288.params[name];
_28b[name]=str2obj(_28f,_290);
}
if(!ps){
var _291=[],_292=[];
d.query("> script[type^='dojo/']",node).orphan().forEach(function(_293){
var _294=_293.getAttribute("event"),type=_293.getAttribute("type"),nf=d.parser._functionFromScript(_293);
if(_294){
if(type=="dojo/connect"){
_291.push({event:_294,func:nf});
}else{
_28b[_294]=nf;
}
}else{
_292.push(nf);
}
});
}
var _296=_289["markupFactory"];
if(!_296&&_289["prototype"]){
_296=_289.prototype["markupFactory"];
}
var _297=_296?_296(_28b,node,_289):new _289(_28b,node);
_285.push(_297);
var _298=node.getAttribute("jsId");
if(_298){
d.setObject(_298,_297);
}
if(!ps){
d.forEach(_291,function(_299){
d.connect(_297,_299.event,null,_299.func);
});
d.forEach(_292,function(func){
func.call(_297);
});
}
});
d.forEach(_285,function(_29b){
if(_29b&&_29b.startup&&!_29b._started&&(!_29b.getParent||!_29b.getParent())){
_29b.startup();
}
});
return _285;
};
this.parse=function(_29c){
var list=d.query(qry,_29c);
var _29e=this.instantiate(list);
return _29e;
};
}();
(function(){
var _29f=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,_29f);
}else{
dojo._loaders.unshift(_29f);
}
})();
dojo.parser._anonCtr=0;
dojo.parser._anon={};
dojo.parser._nameAnonFunc=function(_2a0,_2a1){
var jpn="$joinpoint";
var nso=(_2a1||dojo.parser._anon);
if(dojo.isIE){
var cn=_2a0["__dojoNameCache"];
if(cn&&nso[cn]===_2a0){
return _2a0["__dojoNameCache"];
}
}
var ret="__"+dojo.parser._anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.parser._anonCtr++;
}
nso[ret]=_2a0;
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,containerNode:null,_skipNodeCache:false,_stringRepl:function(tmpl){
var _2a7=this.declaredClass,_2a8=this;
return dojo.string.substitute(tmpl,this,function(_2a9,key){
if(key.charAt(0)=="!"){
_2a9=_2a8[key.substr(1)];
}
if(typeof _2a9=="undefined"){
throw new Error(_2a7+" template:"+key);
}
if(!_2a9){
return "";
}
return key.charAt(0)=="!"?_2a9:_2a9.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _2ab=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var node;
if(dojo.isString(_2ab)){
node=dijit._Templated._createNodesFromText(this._stringRepl(_2ab))[0];
}else{
node=_2ab.cloneNode(true);
}
this._attachTemplateNodes(node);
var _2ad=this.srcNodeRef;
if(_2ad&&_2ad.parentNode){
_2ad.parentNode.replaceChild(node,_2ad);
}
this.domNode=node;
if(this.widgetsInTemplate){
var cw=this._supportingWidgets=dojo.parser.parse(node);
this._attachTemplateNodes(cw,function(n,p){
return n[p];
});
}
this._fillContent(_2ad);
},_fillContent:function(_2b1){
var dest=this.containerNode;
if(_2b1&&dest){
while(_2b1.hasChildNodes()){
dest.appendChild(_2b1.firstChild);
}
}
},_attachTemplateNodes:function(_2b3,_2b4){
_2b4=_2b4||function(n,p){
return n.getAttribute(p);
};
var _2b7=dojo.isArray(_2b3)?_2b3:(_2b3.all||_2b3.getElementsByTagName("*"));
var x=dojo.isArray(_2b3)?0:-1;
for(;x<_2b7.length;x++){
var _2b9=(x==-1)?_2b3:_2b7[x];
if(this.widgetsInTemplate&&_2b4(_2b9,"dojoType")){
continue;
}
var _2ba=_2b4(_2b9,"dojoAttachPoint");
if(_2ba){
var _2bb,_2bc=_2ba.split(/\s*,\s*/);
while((_2bb=_2bc.shift())){
if(dojo.isArray(this[_2bb])){
this[_2bb].push(_2b9);
}else{
this[_2bb]=_2b9;
}
}
}
var _2bd=_2b4(_2b9,"dojoAttachEvent");
if(_2bd){
var _2be,_2bf=_2bd.split(/\s*,\s*/);
var trim=dojo.trim;
while((_2be=_2bf.shift())){
if(_2be){
var _2c1=null;
if(_2be.indexOf(":")!=-1){
var _2c2=_2be.split(":");
_2be=trim(_2c2[0]);
_2c1=trim(_2c2[1]);
}else{
_2be=trim(_2be);
}
if(!_2c1){
_2c1=_2be;
}
this.connect(_2b9,_2be,_2c1);
}
}
}
var role=_2b4(_2b9,"waiRole");
if(role){
dijit.setWaiRole(_2b9,role);
}
var _2c4=_2b4(_2b9,"waiState");
if(_2c4){
dojo.forEach(_2c4.split(/\s*,\s*/),function(_2c5){
if(_2c5.indexOf("-")!=-1){
var pair=_2c5.split("-");
dijit.setWaiState(_2b9,pair[0],pair[1]);
}
});
}
}
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_2c7,_2c8,_2c9){
var _2ca=dijit._Templated._templateCache;
var key=_2c8||_2c7;
var _2cc=_2ca[key];
if(_2cc){
return _2cc;
}
if(!_2c8){
_2c8=dijit._Templated._sanitizeTemplateString(dojo._getText(_2c7));
}
_2c8=dojo.string.trim(_2c8);
if(_2c9||_2c8.match(/\$\{([^\}]+)\}/g)){
return (_2ca[key]=_2c8);
}else{
return (_2ca[key]=dijit._Templated._createNodesFromText(_2c8)[0]);
}
};
dijit._Templated._sanitizeTemplateString=function(_2cd){
if(_2cd){
_2cd=_2cd.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _2ce=_2cd.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_2ce){
_2cd=_2ce[1];
}
}else{
_2cd="";
}
return _2cd;
};
if(dojo.isIE){
dojo.addOnUnload(function(){
var _2cf=dijit._Templated._templateCache;
for(var key in _2cf){
var _2d1=_2cf[key];
if(!isNaN(_2d1.nodeType)){
dojo._destroyElement(_2d1);
}
delete _2cf[key];
}
});
}
(function(){
var _2d2={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=dojo.doc.createElement("div");
tn.style.display="none";
dojo.body().appendChild(tn);
}
var _2d5="none";
var _2d6=text.replace(/^\s+/,"");
for(var type in _2d2){
var map=_2d2[type];
if(map.re.test(_2d6)){
_2d5=type;
text=map.pre+text+map.post;
break;
}
}
tn.innerHTML=text;
if(tn.normalize){
tn.normalize();
}
var tag={cell:"tr",row:"tbody",section:"table"}[_2d5];
var _2da=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;
var _2db=[];
while(_2da.firstChild){
_2db.push(_2da.removeChild(_2da.firstChild));
}
tn.innerHTML="";
return _2db;
};
})();
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
if(!dojo._hasResource["dijit.form._FormWidget"]){
dojo._hasResource["dijit.form._FormWidget"]=true;
dojo.provide("dijit.form._FormWidget");
dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,readOnly:false,intermediateChanges:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),setAttribute:function(attr,_2dd){
this.inherited(arguments);
switch(attr){
case "disabled":
var _2de=this[this.attributeMap["tabIndex"]||"domNode"];
if(_2dd){
this._hovering=false;
this._active=false;
_2de.removeAttribute("tabIndex");
}else{
_2de.setAttribute("tabIndex",this.tabIndex);
}
dijit.setWaiState(this[this.attributeMap["disabled"]||"domNode"],"disabled",_2dd);
this._setStateClass();
}
},setDisabled:function(_2df){
dojo.deprecated("setDisabled("+_2df+") is deprecated. Use setAttribute('disabled',"+_2df+") instead.","","2.0");
this.setAttribute("disabled",_2df);
},_onMouse:function(_2e0){
var _2e1=_2e0.currentTarget;
if(_2e1&&_2e1.getAttribute){
this.stateModifier=_2e1.getAttribute("stateModifier")||"";
}
if(!this.disabled){
switch(_2e0.type){
case "mouseenter":
case "mouseover":
this._hovering=true;
this._active=this._mouseDown;
break;
case "mouseout":
case "mouseleave":
this._hovering=false;
this._active=false;
break;
case "mousedown":
this._active=true;
this._mouseDown=true;
var _2e2=this.connect(dojo.body(),"onmouseup",function(){
this._active=false;
this._mouseDown=false;
this._setStateClass();
this.disconnect(_2e2);
});
if(this.isFocusable()){
this.focus();
}
break;
}
this._setStateClass();
}
},isFocusable:function(){
return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");
},focus:function(){
setTimeout(dojo.hitch(this,dijit.focus,this.focusNode),0);
},_setStateClass:function(){
if(!("staticClass" in this)){
this.staticClass=(this.stateNode||this.domNode).className;
}
var _2e3=[this.baseClass];
function multiply(_2e4){
_2e3=_2e3.concat(dojo.map(_2e3,function(c){
return c+_2e4;
}),"dijit"+_2e4);
};
if(this.checked){
multiply("Checked");
}
if(this.state){
multiply(this.state);
}
if(this.selected){
multiply("Selected");
}
if(this.disabled){
multiply("Disabled");
}else{
if(this.readOnly){
multiply("ReadOnly");
}else{
if(this._active){
multiply(this.stateModifier+"Active");
}else{
if(this._focused){
multiply("Focused");
}
if(this._hovering){
multiply(this.stateModifier+"Hover");
}
}
}
}
(this.stateNode||this.domNode).className=this.staticClass+" "+_2e3.join(" ");
},onChange:function(_2e6){
},_onChangeMonitor:"value",_onChangeActive:false,_handleOnChange:function(_2e7,_2e8){
this._lastValue=_2e7;
if(this._lastValueReported==undefined&&(_2e8===null||!this._onChangeActive)){
this._resetValue=this._lastValueReported=_2e7;
}
if((this.intermediateChanges||_2e8||_2e8===undefined)&&((_2e7&&_2e7.toString)?_2e7.toString():_2e7)!==((this._lastValueReported&&this._lastValueReported.toString)?this._lastValueReported.toString():this._lastValueReported)){
this._lastValueReported=_2e7;
if(this._onChangeActive){
this.onChange(_2e7);
}
}
},reset:function(){
this._hasBeenBlurred=false;
if(this.setValue&&!this._getValueDeprecated){
this.setValue(this._resetValue,true);
}else{
if(this._onChangeMonitor){
this.setAttribute(this._onChangeMonitor,(this._resetValue!==undefined&&this._resetValue!==null)?this._resetValue:"");
}
}
},create:function(){
this.inherited(arguments);
this._onChangeActive=true;
this._setStateClass();
},destroy:function(){
if(this._layoutHackHandle){
clearTimeout(this._layoutHackHandle);
}
this.inherited(arguments);
},setValue:function(_2e9){
dojo.deprecated("dijit.form._FormWidget:setValue("+_2e9+") is deprecated.  Use setAttribute('value',"+_2e9+") instead.","","2.0");
this.setAttribute("value",_2e9);
},_getValueDeprecated:true,getValue:function(){
dojo.deprecated("dijit.form._FormWidget:getValue() is deprecated.  Use widget.value instead.","","2.0");
return this.value;
},_layoutHack:function(){
if(dojo.isFF==2){
var node=this.domNode;
var old=node.style.opacity;
node.style.opacity="0.999";
this._layoutHackHandle=setTimeout(dojo.hitch(this,function(){
this._layoutHackHandle=null;
node.style.opacity=old;
}),0);
}
}});
dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{value:""}),postCreate:function(){
this.setValue(this.value,null);
},setValue:function(_2ec,_2ed){
this.value=_2ec;
this._handleOnChange(_2ec,_2ed);
},_getValueDeprecated:false,getValue:function(){
return this._lastValue;
},undo:function(){
this.setValue(this._lastValueReported,false);
},_valueChanged:function(){
var v=this.getValue();
var lv=this._lastValueReported;
return ((v!==null&&(v!==undefined)&&v.toString)?v.toString():"")!==((lv!==null&&(lv!==undefined)&&lv.toString)?lv.toString():"");
},_onKeyPress:function(e){
if(e.keyCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){
if(this._valueChanged()){
this.undo();
dojo.stopEvent(e);
return false;
}
}
return true;
}});
}
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 _2f3=dijit.byId(id);
return _2f3.isContainer?_2f3:null;
}
}
return null;
},_getSibling:function(_2f4){
var node=this.domNode;
do{
node=node[_2f4+"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");
}});
dojo.declare("dijit._Container",null,{isContainer:true,addChild:function(_2f7,_2f8){
if(_2f8===undefined){
_2f8="last";
}
var _2f9=this.containerNode||this.domNode;
if(_2f8&&typeof _2f8=="number"){
var _2fa=dojo.query("> [widgetid]",_2f9);
if(_2fa&&_2fa.length>=_2f8){
_2f9=_2fa[_2f8-1];
_2f8="after";
}
}
dojo.place(_2f7.domNode,_2f9,_2f8);
if(this._started&&!_2f7._started){
_2f7.startup();
}
},removeChild:function(_2fb){
var node=_2fb.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||this.domNode).map(dijit.byNode);
},hasChildren:function(){
var cn=this.containerNode||this.domNode;
return !!this._firstElement(cn);
},_getSiblingOfChild:function(_300,dir){
var node=_300.domNode;
var _303=(dir>0?"nextSibling":"previousSibling");
do{
node=node[_303];
}while(node&&(node.nodeType!=1||!dijit.byNode(node)));
return node?dijit.byNode(node):null;
}});
dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_304,_305){
var _306=this._keyNavCodes={};
var prev=dojo.hitch(this,this.focusPrev);
var next=dojo.hitch(this,this.focusNext);
dojo.forEach(_304,function(code){
_306[code]=prev;
});
dojo.forEach(_305,function(code){
_306[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(_30b,_30c){
dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);
this._startupChild(_30b);
},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 _30d=this._getNextFocusableChild(this.focusedChild,1);
if(_30d.getFocalNodes){
this.focusChild(_30d,_30d.getFocalNodes()[0]);
}else{
this.focusChild(_30d);
}
},focusPrev:function(){
if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){
this.focusedChild.focusPrev();
return;
}
var _30e=this._getNextFocusableChild(this.focusedChild,-1);
if(_30e.getFocalNodes){
var _30f=_30e.getFocalNodes();
this.focusChild(_30e,_30f[_30f.length-1]);
}else{
this.focusChild(_30e);
}
},focusChild:function(_310,node){
if(_310){
if(this.focusedChild&&_310!==this.focusedChild){
this._onChildBlur(this.focusedChild);
}
this.focusedChild=_310;
if(node&&_310.focusFocalNode){
_310.focusFocalNode(node);
}else{
_310.focus();
}
}
},_startupChild:function(_312){
if(_312.getFocalNodes){
dojo.forEach(_312.getFocalNodes(),function(node){
dojo.attr(node,"tabindex",-1);
this._connectNode(node);
},this);
}else{
var node=_312.focusNode||_312.domNode;
if(_312.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.keyCode];
if(func){
func();
dojo.stopEvent(evt);
}
},_onNodeFocus:function(evt){
dojo.attr(this.domNode,"tabindex",-1);
var _31a=dijit.getEnclosingWidget(evt.target);
if(_31a&&_31a.isFocusable()){
this.focusedChild=_31a;
}
dojo.stopEvent(evt);
},_onNodeBlur:function(evt){
if(this.tabIndex){
dojo.attr(this.domNode,"tabindex",this.tabIndex);
}
dojo.stopEvent(evt);
},_onChildBlur:function(_31c){
},_getFirstFocusableChild:function(){
return this._getNextFocusableChild(null,1);
},_getNextFocusableChild:function(_31d,dir){
if(_31d){
_31d=this._getSiblingOfChild(_31d,dir);
}
var _31f=this.getChildren();
for(var i=0;i<_31f.length;i++){
if(!_31d){
_31d=_31f[(dir>0)?0:(_31f.length-1)];
}
if(_31d.isFocusable()){
return _31d;
}
_31d=this._getSiblingOfChild(_31d,dir);
}
return null;
}});
}
if(!dojo._hasResource["dijit.form.Button"]){
dojo._hasResource["dijit.form.Button"]=true;
dojo.provide("dijit.form.Button");
dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:"<div class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\twaiRole=\"presentation\"\n\t><button class=\"dijitReset dijitStretch dijitButtonNode dijitButtonContents\" dojoAttachPoint=\"focusNode,titleNode\"\n\t\ttype=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t><span class=\"dijitReset dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" \n \t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span \n\t\t></span\n\t\t><div class=\"dijitReset dijitInline\"><center class=\"dijitReset dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</center></div\n\t></button\n></div>\n",_onChangeMonitor:"",_onClick:function(e){
if(this.disabled||this.readOnly){
dojo.stopEvent(e);
return false;
}
this._clicked();
return this.onClick(e);
},_onButtonClick:function(e){
if(this._onClick(e)===false){
dojo.stopEvent(e);
}else{
if(this.type=="submit"&&!this.focusNode.form){
for(var node=this.domNode;node.parentNode;node=node.parentNode){
var _324=dijit.byNode(node);
if(_324&&typeof _324._onSubmit=="function"){
_324._onSubmit(e);
break;
}
}
}
}
},postCreate:function(){
if(this.showLabel==false){
var _325="";
this.label=this.containerNode.innerHTML;
_325=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
this.titleNode.title=_325;
dojo.addClass(this.containerNode,"dijitDisplayNone");
}
dojo.setSelectable(this.focusNode,false);
this.inherited(arguments);
},onClick:function(e){
return true;
},_clicked:function(e){
},setLabel:function(_328){
this.containerNode.innerHTML=this.label=_328;
this._layoutHack();
if(this.showLabel==false){
this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
}
}});
dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<div class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\twaiRole=\"presentation\"\n\t><div class='dijitReset dijitRight' waiRole=\"presentation\"\n\t><button class=\"dijitReset dijitStretch dijitButtonNode dijitButtonContents\" type=\"${type}\"\n\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t><div class=\"dijitReset dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t><div class=\"dijitReset dijitInline dijitButtonText\"  dojoAttachPoint=\"containerNode,popupStateNode\" waiRole=\"presentation\"\n\t\t\tid=\"${id}_label\">${label}</div\n\t\t><div class=\"dijitReset dijitInline dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t><div class=\"dijitReset dijitInline dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t></button\n></div></div>\n",_fillContent:function(){
if(this.srcNodeRef){
var _329=dojo.query("*",this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this,_329[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
if(!this.dropDown){
var _32a=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.dropDown=dijit.byNode(_32a);
delete this.dropDownContainer;
}
dijit.popup.prepare(this.dropDown.domNode);
this.inherited(arguments);
},destroyDescendants:function(){
if(this.dropDown){
this.dropDown.destroyRecursive();
delete this.dropDown;
}
this.inherited(arguments);
},_onArrowClick:function(e){
if(this.disabled||this.readOnly){
return;
}
this._toggleDropDown();
},_onDropDownClick:function(e){
var _32d=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;
if(!_32d||e.detail!=0||this._seenKeydown){
this._onArrowClick(e);
}
this._seenKeydown=false;
},_onDropDownKeydown:function(e){
this._seenKeydown=true;
},_onDropDownBlur:function(e){
this._seenKeydown=false;
},_onKey:function(e){
if(this.disabled||this.readOnly){
return;
}
if(e.keyCode==dojo.keys.DOWN_ARROW){
if(!this.dropDown||this.dropDown.domNode.style.visibility=="hidden"){
dojo.stopEvent(e);
this._toggleDropDown();
}
}
},_onBlur:function(){
this._closeDropDown();
this.inherited(arguments);
},_toggleDropDown:function(){
if(this.disabled||this.readOnly){
return;
}
dijit.focus(this.popupStateNode);
var _331=this.dropDown;
if(!_331){
return;
}
if(!this._opened){
if(_331.href&&!_331.isLoaded){
var self=this;
var _333=dojo.connect(_331,"onLoad",function(){
dojo.disconnect(_333);
self._openDropDown();
});
_331._loadCheck(true);
return;
}else{
this._openDropDown();
}
}else{
this._closeDropDown();
}
},_openDropDown:function(){
var _334=this.dropDown;
var _335=_334.domNode.style.width;
var self=this;
dijit.popup.open({parent:this,popup:_334,around:this.domNode,orient:this.isLeftToRight()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:function(){
self._closeDropDown(true);
},onCancel:function(){
self._closeDropDown(true);
},onClose:function(){
_334.domNode.style.width=_335;
self.popupStateNode.removeAttribute("popupActive");
this._opened=false;
}});
if(this.domNode.offsetWidth>_334.domNode.offsetWidth){
var _337=null;
if(!this.isLeftToRight()){
_337=_334.domNode.parentNode;
var _338=_337.offsetLeft+_337.offsetWidth;
}
dojo.marginBox(_334.domNode,{w:this.domNode.offsetWidth});
if(_337){
_337.style.left=_338-this.domNode.offsetWidth+"px";
}
}
this.popupStateNode.setAttribute("popupActive","true");
this._opened=true;
if(_334.focus){
_334.focus();
}
},_closeDropDown:function(_339){
if(this._opened){
dijit.popup.close(this.dropDown);
if(_339){
this.focus();
}
this._opened=false;
}
}});
dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td\tclass=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\"\n\t\t\ttabIndex=\"${tabIndex}\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"  dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\">${label}</div\n\t\t></td\n\t\t><td class='dijitReset dijitStretch dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey,onmouseenter:_onMouse,onmouseleave:_onMouse\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{id:"",name:""}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){
this.inherited(arguments);
this._focalNodes=[this.titleNode,this.popupStateNode];
dojo.forEach(this._focalNodes,dojo.hitch(this,function(node){
if(dojo.isIE){
this.connect(node,"onactivate",this._onNodeFocus);
this.connect(node,"ondeactivate",this._onNodeBlur);
}else{
this.connect(node,"onfocus",this._onNodeFocus);
this.connect(node,"onblur",this._onNodeBlur);
}
}));
},focusFocalNode:function(node){
this._focusedNode=node;
dijit.focus(node);
},hasNextFocalNode:function(){
return this._focusedNode!==this.getFocalNodes()[1];
},focusNext:function(){
this._focusedNode=this.getFocalNodes()[this._focusedNode?1:0];
dijit.focus(this._focusedNode);
},hasPrevFocalNode:function(){
return this._focusedNode!==this.getFocalNodes()[0];
},focusPrev:function(){
this._focusedNode=this.getFocalNodes()[this._focusedNode?0:1];
dijit.focus(this._focusedNode);
},getFocalNodes:function(){
return this._focalNodes;
},_onNodeFocus:function(evt){
this._focusedNode=evt.currentTarget;
var fnc=this._focusedNode==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";
dojo.addClass(this._focusedNode,fnc);
},_onNodeBlur:function(evt){
var fnc=evt.currentTarget==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";
dojo.removeClass(evt.currentTarget,fnc);
},_onBlur:function(){
this.inherited(arguments);
this._focusedNode=null;
}});
dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,_onChangeMonitor:"checked",attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){
this.setAttribute("checked",!this.checked);
},setAttribute:function(attr,_342){
this.inherited(arguments);
switch(attr){
case "checked":
dijit.setWaiState(this.focusNode||this.domNode,"pressed",this.checked);
this._setStateClass();
this._handleOnChange(this.checked,true);
}
},setChecked:function(_343){
dojo.deprecated("setChecked("+_343+") is deprecated. Use setAttribute('checked',"+_343+") instead.","","2.0");
this.setAttribute("checked",_343);
},postCreate:function(){
this.inherited(arguments);
this.setAttribute("checked",this.checked);
}});
}
if(!dojo._hasResource["dijit.Menu"]){
dojo._hasResource["dijit.Menu"]=true;
dojo.provide("dijit.Menu");
dojo.declare("dijit.Menu",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{constructor:function(){
this._bindings=[];
},templateString:"<table class=\"dijit dijitMenu dijitReset dijitMenuTable\" waiRole=\"menu\" dojoAttachEvent=\"onkeypress:_onKeyPress\">"+"<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>"+"</table>",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,parentMenu:null,popupDelay:500,_contextMenuWithMouse:false,postCreate:function(){
if(this.contextMenuForWindow){
this.bindDomNode(dojo.body());
}else{
dojo.forEach(this.targetNodeIds,this.bindDomNode,this);
}
this.connectKeyNavHandlers([dojo.keys.UP_ARROW],[dojo.keys.DOWN_ARROW]);
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_344){
_344.startup();
});
this.startupKeyNavChildren();
this.inherited(arguments);
},onExecute:function(){
},onCancel:function(_345){
},_moveToPopup:function(evt){
if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){
this.focusedChild._onClick(evt);
}
},_onKeyPress:function(evt){
if(evt.ctrlKey||evt.altKey){
return;
}
switch(evt.keyCode){
case dojo.keys.RIGHT_ARROW:
this._moveToPopup(evt);
dojo.stopEvent(evt);
break;
case dojo.keys.LEFT_ARROW:
if(this.parentMenu){
this.onCancel(false);
}else{
dojo.stopEvent(evt);
}
break;
}
},onItemHover:function(item){
this.focusChild(item);
if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){
this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);
}
},_onChildBlur:function(item){
dijit.popup.close(item.popup);
item._blur();
this._stopPopupTimer();
},onItemUnhover:function(item){
},_stopPopupTimer:function(){
if(this.hover_timer){
clearTimeout(this.hover_timer);
this.hover_timer=null;
}
},_getTopMenu:function(){
for(var top=this;top.parentMenu;top=top.parentMenu){
}
return top;
},onItemClick:function(item,evt){
if(item.disabled){
return false;
}
if(item.popup){
if(!this.is_open){
this._openPopup();
}
}else{
this.onExecute();
item.onClick(evt);
}
},_iframeContentWindow:function(_34e){
var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_34e))||dijit.Menu._iframeContentDocument(_34e)["__parent__"]||(_34e.name&&dojo.doc.frames[_34e.name])||null;
return win;
},_iframeContentDocument:function(_350){
var doc=_350.contentDocument||(_350.contentWindow&&_350.contentWindow.document)||(_350.name&&dojo.doc.frames[_350.name]&&dojo.doc.frames[_350.name].document)||null;
return doc;
},bindDomNode:function(node){
node=dojo.byId(node);
var win=dijit.getDocumentWindow(node.ownerDocument);
if(node.tagName.toLowerCase()=="iframe"){
win=this._iframeContentWindow(node);
node=dojo.withGlobal(win,dojo.body);
}
var cn=(node==dojo.body()?dojo.doc:node);
node[this.id]=this._bindings.push([dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,"_openMyself"),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")]);
},unBindDomNode:function(_355){
var node=dojo.byId(_355);
if(node){
var bid=node[this.id]-1,b=this._bindings[bid];
dojo.forEach(b,dojo.disconnect);
delete this._bindings[bid];
}
},_contextKey:function(e){
this._contextMenuWithMouse=false;
if(e.keyCode==dojo.keys.F10){
dojo.stopEvent(e);
if(e.shiftKey&&e.type=="keydown"){
var _e={target:e.target,pageX:e.pageX,pageY:e.pageY};
_e.preventDefault=_e.stopPropagation=function(){
};
window.setTimeout(dojo.hitch(this,function(){
this._openMyself(_e);
}),1);
}
}
},_contextMouse:function(e){
this._contextMenuWithMouse=true;
},_openMyself:function(e){
if(this.leftClickToOpen&&e.button>0){
return;
}
dojo.stopEvent(e);
var x,y;
if(dojo.isSafari||this._contextMenuWithMouse){
x=e.pageX;
y=e.pageY;
}else{
var _35f=dojo.coords(e.target,true);
x=_35f.x+10;
y=_35f.y+10;
}
var self=this;
var _361=dijit.getFocus(this);
function closeAndRestoreFocus(){
dijit.focus(_361);
dijit.popup.close(self);
};
dijit.popup.open({popup:this,x:x,y:y,onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus,orient:this.isLeftToRight()?"L":"R"});
this.focus();
this._onBlur=function(){
this.inherited("_onBlur",arguments);
dijit.popup.close(this);
};
},onOpen:function(e){
this.isShowingNow=true;
},onClose:function(){
this._stopPopupTimer();
this.parentMenu=null;
this.isShowingNow=false;
this.currentPopup=null;
if(this.focusedChild){
this._onChildBlur(this.focusedChild);
this.focusedChild=null;
}
},_openPopup:function(){
this._stopPopupTimer();
var _363=this.focusedChild;
var _364=_363.popup;
if(_364.isShowingNow){
return;
}
_364.parentMenu=this;
var self=this;
dijit.popup.open({parent:this,popup:_364,around:_363.arrowCell,orient:this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"},onCancel:function(){
dijit.popup.close(_364);
_363.focus();
self.currentPopup=null;
}});
this.currentPopup=_364;
if(_364.focus){
_364.focus();
}
},uninitialize:function(){
dojo.forEach(this.targetNodeIds,this.unBindDomNode,this);
this.inherited(arguments);
}});
dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitReset dijitMenuItem\" "+"dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">"+"<td class=\"dijitReset\"><div class=\"dijitMenuItemIcon ${iconClass}\" dojoAttachPoint=\"iconNode\"></div></td>"+"<td tabIndex=\"-1\" class=\"dijitReset dijitMenuItemLabel\" dojoAttachPoint=\"containerNode,focusNode\" waiRole=\"menuitem\"></td>"+"<td class=\"dijitReset\" dojoAttachPoint=\"arrowCell\">"+"<div class=\"dijitMenuExpand\" dojoAttachPoint=\"expand\" style=\"display:none\">"+"<span class=\"dijitInline dijitArrowNode dijitMenuExpandInner\">+</span>"+"</div>"+"</td>"+"</tr>",label:"",iconClass:"",disabled:false,postCreate:function(){
dojo.setSelectable(this.domNode,false);
this.setDisabled(this.disabled);
if(this.label){
this.setLabel(this.label);
}
},_onHover:function(){
this.getParent().onItemHover(this);
},_onUnhover:function(){
this.getParent().onItemUnhover(this);
},_onClick:function(evt){
this.getParent().onItemClick(this,evt);
dojo.stopEvent(evt);
},onClick:function(evt){
},focus:function(){
dojo.addClass(this.domNode,"dijitMenuItemHover");
try{
dijit.focus(this.containerNode);
}
catch(e){
}
},_blur:function(){
dojo.removeClass(this.domNode,"dijitMenuItemHover");
},setLabel:function(_368){
this.containerNode.innerHTML=this.label=_368;
},setDisabled:function(_369){
this.disabled=_369;
dojo[_369?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");
dijit.setWaiState(this.containerNode,"disabled",_369?"true":"false");
}});
dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){
if(this.srcNodeRef){
var _36a=dojo.query("*",this.srcNodeRef);
dijit.PopupMenuItem.superclass._fillContent.call(this,_36a[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
this.inherited(arguments);
if(!this.popup){
var node=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.popup=dijit.byNode(node);
}
dojo.body().appendChild(this.popup.domNode);
this.popup.domNode.style.display="none";
dojo.addClass(this.expand,"dijitMenuExpandEnabled");
dojo.style(this.expand,"display","");
dijit.setWaiState(this.containerNode,"haspopup","true");
},destroyDescendants:function(){
if(this.popup){
this.popup.destroyRecursive();
delete this.popup;
}
this.inherited(arguments);
}});
dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"dijitMenuSeparatorTop\"></div>"+"<div class=\"dijitMenuSeparatorBottom\"></div>"+"</td></tr>",postCreate:function(){
dojo.setSelectable(this.domNode,false);
},isFocusable:function(){
return false;
}});
}
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(_36c,_36d){
var rxp="^";
var c=null;
for(var i=0;i<_36c.length;i++){
c=_36c.charAt(i);
switch(c){
case "\\":
rxp+=c;
i++;
rxp+=_36c.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(_36d){
return new RegExp(rxp,"i");
}else{
return new RegExp(rxp);
}
};
}
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(_374,_375){
var _376=[];
function createSortFunction(attr,dir){
return function(_379,_37a){
var a=_375.getValue(_379,attr);
var b=_375.getValue(_37a,attr);
var _37d=null;
if(_375.comparatorMap){
if(typeof attr!=="string"){
attr=_375.getIdentity(attr);
}
_37d=_375.comparatorMap[attr]||dojo.data.util.sorter.basicComparator;
}
_37d=_37d||dojo.data.util.sorter.basicComparator;
return dir*_37d(a,b);
};
};
for(var i=0;i<_374.length;i++){
sortAttribute=_374[i];
if(sortAttribute.attribute){
var _37f=(sortAttribute.descending)?-1:1;
_376.push(createSortFunction(sortAttribute.attribute,_37f));
}
}
return function(rowA,rowB){
var i=0;
while(i<_376.length){
var ret=_376[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(_384){
_384=_384||{};
if(!_384.store){
_384.store=this;
}
var self=this;
var _386=function(_387,_388){
if(_388.onError){
var _389=_388.scope||dojo.global;
_388.onError.call(_389,_387,_388);
}
};
var _38a=function(_38b,_38c){
var _38d=_38c.abort||null;
var _38e=false;
var _38f=_38c.start?_38c.start:0;
var _390=_38c.count?(_38f+_38c.count):_38b.length;
_38c.abort=function(){
_38e=true;
if(_38d){
_38d.call(_38c);
}
};
var _391=_38c.scope||dojo.global;
if(!_38c.store){
_38c.store=self;
}
if(_38c.onBegin){
_38c.onBegin.call(_391,_38b.length,_38c);
}
if(_38c.sort){
_38b.sort(dojo.data.util.sorter.createSortFunction(_38c.sort,self));
}
if(_38c.onItem){
for(var i=_38f;(i<_38b.length)&&(i<_390);++i){
var item=_38b[i];
if(!_38e){
_38c.onItem.call(_391,item,_38c);
}
}
}
if(_38c.onComplete&&!_38e){
var _394=null;
if(!_38c.onItem){
_394=_38b.slice(_38f,_390);
}
_38c.onComplete.call(_391,_394,_38c);
}
};
this._fetchItems(_384,_38a,_386);
return _384;
};
}
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(_395){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._jsonFileUrl=_395.url;
this._jsonData=_395.data;
this._datatypeMap=_395.typeMap||{};
if(!this._datatypeMap["Date"]){
this._datatypeMap["Date"]={type:Date,deserialize:function(_396){
return dojo.date.stamp.fromISOString(_396);
}};
}
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(item){
if(!this.isItem(item)){
throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
}
},_assertIsAttribute:function(_398){
if(typeof _398!=="string"){
throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
}
},getValue:function(item,_39a,_39b){
var _39c=this.getValues(item,_39a);
return (_39c.length>0)?_39c[0]:_39b;
},getValues:function(item,_39e){
this._assertIsItem(item);
this._assertIsAttribute(_39e);
return item[_39e]||[];
},getAttributes:function(item){
this._assertIsItem(item);
var _3a0=[];
for(var key in item){
if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){
_3a0.push(key);
}
}
return _3a0;
},hasAttribute:function(item,_3a3){
return this.getValues(item,_3a3).length>0;
},containsValue:function(item,_3a5,_3a6){
var _3a7=undefined;
if(typeof _3a6==="string"){
_3a7=dojo.data.util.filter.patternToRegExp(_3a6,false);
}
return this._containsValue(item,_3a5,_3a6,_3a7);
},_containsValue:function(item,_3a9,_3aa,_3ab){
return dojo.some(this.getValues(item,_3a9),function(_3ac){
if(_3ac!==null&&!dojo.isObject(_3ac)&&_3ab){
if(_3ac.toString().match(_3ab)){
return true;
}
}else{
if(_3aa===_3ac){
return true;
}
}
});
},isItem:function(_3ad){
if(_3ad&&_3ad[this._storeRefPropName]===this){
if(this._arrayOfAllItems[_3ad[this._itemNumPropName]]===_3ad){
return true;
}
}
return false;
},isItemLoaded:function(_3ae){
return this.isItem(_3ae);
},loadItem:function(_3af){
this._assertIsItem(_3af.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(_3b2,_3b3,_3b4){
var self=this;
var _3b6=function(_3b7,_3b8){
var _3b9=[];
if(_3b7.query){
var _3ba=_3b7.queryOptions?_3b7.queryOptions.ignoreCase:false;
var _3bb={};
for(var key in _3b7.query){
var _3bd=_3b7.query[key];
if(typeof _3bd==="string"){
_3bb[key]=dojo.data.util.filter.patternToRegExp(_3bd,_3ba);
}
}
for(var i=0;i<_3b8.length;++i){
var _3bf=true;
var _3c0=_3b8[i];
if(_3c0===null){
_3bf=false;
}else{
for(var key in _3b7.query){
var _3bd=_3b7.query[key];
if(!self._containsValue(_3c0,key,_3bd,_3bb[key])){
_3bf=false;
}
}
}
if(_3bf){
_3b9.push(_3c0);
}
}
_3b3(_3b9,_3b7);
}else{
for(var i=0;i<_3b8.length;++i){
var item=_3b8[i];
if(item!==null){
_3b9.push(item);
}
}
_3b3(_3b9,_3b7);
}
};
if(this._loadFinished){
_3b6(_3b2,this._getItemsArray(_3b2.queryOptions));
}else{
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_3b2,filter:_3b6});
}else{
this._loadInProgress=true;
var _3c2={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _3c3=dojo.xhrGet(_3c2);
_3c3.addCallback(function(data){
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
_3b6(_3b2,self._getItemsArray(_3b2.queryOptions));
self._handleQueuedFetches();
}
catch(e){
self._loadFinished=true;
self._loadInProgress=false;
_3b4(e,_3b2);
}
});
_3c3.addErrback(function(_3c5){
self._loadInProgress=false;
_3b4(_3c5,_3b2);
});
}
}else{
if(this._jsonData){
try{
this._loadFinished=true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData=null;
_3b6(_3b2,this._getItemsArray(_3b2.queryOptions));
}
catch(e){
_3b4(e,_3b2);
}
}else{
_3b4(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_3b2);
}
}
}
},_handleQueuedFetches:function(){
if(this._queuedFetches.length>0){
for(var i=0;i<this._queuedFetches.length;i++){
var _3c7=this._queuedFetches[i];
var _3c8=_3c7.args;
var _3c9=_3c7.filter;
if(_3c9){
_3c9(_3c8,this._getItemsArray(_3c8.queryOptions));
}else{
this.fetchItemByIdentity(_3c8);
}
}
this._queuedFetches=[];
}
},_getItemsArray:function(_3ca){
if(_3ca&&_3ca.deep){
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close:function(_3cb){
},_getItemsFromLoadedData:function(_3cc){
function valueIsAnItem(_3cd){
var _3ce=((_3cd!=null)&&(typeof _3cd=="object")&&(!dojo.isArray(_3cd))&&(!dojo.isFunction(_3cd))&&(_3cd.constructor==Object)&&(typeof _3cd._reference=="undefined")&&(typeof _3cd._type=="undefined")&&(typeof _3cd._value=="undefined"));
return _3ce;
};
var self=this;
function addItemAndSubItemsToArrayOfAllItems(_3d0){
self._arrayOfAllItems.push(_3d0);
for(var _3d1 in _3d0){
var _3d2=_3d0[_3d1];
if(_3d2){
if(dojo.isArray(_3d2)){
var _3d3=_3d2;
for(var k=0;k<_3d3.length;++k){
var _3d5=_3d3[k];
if(valueIsAnItem(_3d5)){
addItemAndSubItemsToArrayOfAllItems(_3d5);
}
}
}else{
if(valueIsAnItem(_3d2)){
addItemAndSubItemsToArrayOfAllItems(_3d2);
}
}
}
}
};
this._labelAttr=_3cc.label;
var i;
var item;
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=_3cc.items;
for(i=0;i<this._arrayOfTopLevelItems.length;++i){
item=this._arrayOfTopLevelItems[i];
addItemAndSubItemsToArrayOfAllItems(item);
item[this._rootItemPropName]=true;
}
var _3d8={};
var key;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
for(key in item){
if(key!==this._rootItemPropName){
var _3da=item[key];
if(_3da!==null){
if(!dojo.isArray(_3da)){
item[key]=[_3da];
}
}else{
item[key]=[null];
}
}
_3d8[key]=key;
}
}
while(_3d8[this._storeRefPropName]){
this._storeRefPropName+="_";
}
while(_3d8[this._itemNumPropName]){
this._itemNumPropName+="_";
}
while(_3d8[this._reverseRefMap]){
this._reverseRefMap+="_";
}
var _3db;
var _3dc=_3cc.identifier;
if(_3dc){
this._itemsByIdentity={};
this._features["dojo.data.api.Identity"]=_3dc;
for(i=0;i<this._arrayOfAllItems.length;++i){
item=this._arrayOfAllItems[i];
_3db=item[_3dc];
var _3dd=_3db[0];
if(!this._itemsByIdentity[_3dd]){
this._itemsByIdentity[_3dd]=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: ["+_3dc+"].  Value collided: ["+_3dd+"]");
}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: ["+_3dc+"].  Value collided: ["+_3dd+"]");
}
}
}
}
}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){
_3db=item[key];
for(var j=0;j<_3db.length;++j){
_3da=_3db[j];
if(_3da!==null&&typeof _3da=="object"){
if(_3da._type&&_3da._value){
var type=_3da._type;
var _3e0=this._datatypeMap[type];
if(!_3e0){
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");
}else{
if(dojo.isFunction(_3e0)){
_3db[j]=new _3e0(_3da._value);
}else{
if(dojo.isFunction(_3e0.deserialize)){
_3db[j]=_3e0.deserialize(_3da._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(_3da._reference){
var _3e1=_3da._reference;
if(!dojo.isObject(_3e1)){
_3db[j]=this._itemsByIdentity[_3e1];
}else{
for(var k=0;k<this._arrayOfAllItems.length;++k){
var _3e3=this._arrayOfAllItems[k];
var _3e4=true;
for(var _3e5 in _3e1){
if(_3e3[_3e5]!=_3e1[_3e5]){
_3e4=false;
}
}
if(_3e4){
_3db[j]=_3e3;
}
}
}
if(this.referenceIntegrity){
var _3e6=_3db[j];
if(this.isItem(_3e6)){
this._addReferenceToMap(_3e6,item,key);
}
}
}else{
if(this.isItem(_3da)){
if(this.referenceIntegrity){
this._addReferenceToMap(_3da,item,key);
}
}
}
}
}
}
}
},_addReferenceToMap:function(_3e7,_3e8,_3e9){
},getIdentity:function(item){
var _3eb=this._features["dojo.data.api.Identity"];
if(_3eb===Number){
return item[this._itemNumPropName];
}else{
var _3ec=item[_3eb];
if(_3ec){
return _3ec[0];
}
}
return null;
},fetchItemByIdentity:function(_3ed){
if(!this._loadFinished){
var self=this;
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_3ed});
}else{
this._loadInProgress=true;
var _3ef={url:self._jsonFileUrl,handleAs:"json-comment-optional"};
var _3f0=dojo.xhrGet(_3ef);
_3f0.addCallback(function(data){
var _3f2=_3ed.scope?_3ed.scope:dojo.global;
try{
self._getItemsFromLoadedData(data);
self._loadFinished=true;
self._loadInProgress=false;
var item=self._getItemByIdentity(_3ed.identity);
if(_3ed.onItem){
_3ed.onItem.call(_3f2,item);
}
self._handleQueuedFetches();
}
catch(error){
self._loadInProgress=false;
if(_3ed.onError){
_3ed.onError.call(_3f2,error);
}
}
});
_3f0.addErrback(function(_3f4){
self._loadInProgress=false;
if(_3ed.onError){
var _3f5=_3ed.scope?_3ed.scope:dojo.global;
_3ed.onError.call(_3f5,_3f4);
}
});
}
}else{
if(this._jsonData){
self._getItemsFromLoadedData(self._jsonData);
self._jsonData=null;
self._loadFinished=true;
var item=self._getItemByIdentity(_3ed.identity);
if(_3ed.onItem){
var _3f7=_3ed.scope?_3ed.scope:dojo.global;
_3ed.onItem.call(_3f7,item);
}
}
}
}else{
var item=this._getItemByIdentity(_3ed.identity);
if(_3ed.onItem){
var _3f7=_3ed.scope?_3ed.scope:dojo.global;
_3ed.onItem.call(_3f7,item);
}
}
},_getItemByIdentity:function(_3f8){
var item=null;
if(this._itemsByIdentity){
item=this._itemsByIdentity[_3f8];
}else{
item=this._arrayOfAllItems[_3f8];
}
if(item===undefined){
item=null;
}
return item;
},getIdentityAttributes:function(item){
var _3fb=this._features["dojo.data.api.Identity"];
if(_3fb===Number){
return null;
}else{
return [_3fb];
}
},_forceLoad:function(){
var self=this;
if(this._jsonFileUrl){
var _3fd={url:self._jsonFileUrl,handleAs:"json-comment-optional",sync:true};
var _3fe=dojo.xhrGet(_3fd);
_3fe.addCallback(function(data){
try{
if(self._loadInProgress!==true&&!self._loadFinished){
self._getItemsFromLoadedData(data);
self._loadFinished=true;
}
}
catch(e){
console.log(e);
throw e;
}
});
_3fe.addErrback(function(_400){
throw _400;
});
}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.data.ItemFileWriteStore"]){
dojo._hasResource["dojo.data.ItemFileWriteStore"]=true;
dojo.provide("dojo.data.ItemFileWriteStore");
dojo.declare("dojo.data.ItemFileWriteStore",dojo.data.ItemFileReadStore,{constructor:function(_401){
this._features["dojo.data.api.Write"]=true;
this._features["dojo.data.api.Notification"]=true;
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
if(!this._datatypeMap["Date"].serialize){
this._datatypeMap["Date"].serialize=function(obj){
return dojo.date.stamp.toISOString(obj,{zulu:true});
};
}
if(_401&&(_401.referenceIntegrity===false)){
this.referenceIntegrity=false;
}
this._saveInProgress=false;
},referenceIntegrity:true,_assert:function(_403){
if(!_403){
throw new Error("assertion failed in ItemFileWriteStore");
}
},_getIdentifierAttribute:function(){
var _404=this.getFeatures()["dojo.data.api.Identity"];
return _404;
},newItem:function(_405,_406){
this._assert(!this._saveInProgress);
if(!this._loadFinished){
this._forceLoad();
}
if(typeof _405!="object"&&typeof _405!="undefined"){
throw new Error("newItem() was passed something other than an object");
}
var _407=null;
var _408=this._getIdentifierAttribute();
if(_408===Number){
_407=this._arrayOfAllItems.length;
}else{
_407=_405[_408];
if(typeof _407==="undefined"){
throw new Error("newItem() was not passed an identity for the new item");
}
if(dojo.isArray(_407)){
throw new Error("newItem() was not passed an single-valued identity");
}
}
if(this._itemsByIdentity){
this._assert(typeof this._itemsByIdentity[_407]==="undefined");
}
this._assert(typeof this._pending._newItems[_407]==="undefined");
this._assert(typeof this._pending._deletedItems[_407]==="undefined");
var _409={};
_409[this._storeRefPropName]=this;
_409[this._itemNumPropName]=this._arrayOfAllItems.length;
if(this._itemsByIdentity){
this._itemsByIdentity[_407]=_409;
_409[_408]=[_407];
}
this._arrayOfAllItems.push(_409);
var _40a=null;
if(_406&&_406.parent&&_406.attribute){
_40a={item:_406.parent,attribute:_406.attribute,oldValue:undefined};
var _40b=this.getValues(_406.parent,_406.attribute);
if(_40b&&_40b.length>0){
var _40c=_40b.slice(0,_40b.length);
if(_40b.length===1){
_40a.oldValue=_40b[0];
}else{
_40a.oldValue=_40b.slice(0,_40b.length);
}
_40c.push(_409);
this._setValueOrValues(_406.parent,_406.attribute,_40c,false);
_40a.newValue=this.getValues(_406.parent,_406.attribute);
}else{
this._setValueOrValues(_406.parent,_406.attribute,_409,false);
_40a.newValue=_409;
}
}else{
_409[this._rootItemPropName]=true;
this._arrayOfTopLevelItems.push(_409);
}
this._pending._newItems[_407]=_409;
for(var key in _405){
if(key===this._storeRefPropName||key===this._itemNumPropName){
throw new Error("encountered bug in ItemFileWriteStore.newItem");
}
var _40e=_405[key];
if(!dojo.isArray(_40e)){
_40e=[_40e];
}
_409[key]=_40e;
if(this.referenceIntegrity){
for(var i=0;i<_40e.length;i++){
var val=_40e[i];
if(this.isItem(val)){
this._addReferenceToMap(val,_409,key);
}
}
}
}
this.onNew(_409,_40a);
return _409;
},_removeArrayElement:function(_411,_412){
var _413=dojo.indexOf(_411,_412);
if(_413!=-1){
_411.splice(_413,1);
return true;
}
return false;
},deleteItem:function(item){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
var _415=item[this._itemNumPropName];
var _416=this.getIdentity(item);
if(this.referenceIntegrity){
var _417=this.getAttributes(item);
if(item[this._reverseRefMap]){
item["backup_"+this._reverseRefMap]=dojo.clone(item[this._reverseRefMap]);
}
dojo.forEach(_417,function(_418){
dojo.forEach(this.getValues(item,_418),function(_419){
if(this.isItem(_419)){
if(!item["backupRefs_"+this._reverseRefMap]){
item["backupRefs_"+this._reverseRefMap]=[];
}
item["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(_419),attr:_418});
this._removeReferenceFromMap(_419,item,_418);
}
},this);
},this);
var _41a=item[this._reverseRefMap];
if(_41a){
for(var _41b in _41a){
var _41c=null;
if(this._itemsByIdentity){
_41c=this._itemsByIdentity[_41b];
}else{
_41c=this._arrayOfAllItems[_41b];
}
if(_41c){
for(var _41d in _41a[_41b]){
var _41e=this.getValues(_41c,_41d)||[];
var _41f=dojo.filter(_41e,function(_420){
return !(this.isItem(_420)&&this.getIdentity(_420)==_416);
},this);
this._removeReferenceFromMap(item,_41c,_41d);
if(_41f.length<_41e.length){
this.setValues(_41c,_41d,_41f);
}
}
}
}
}
}
this._arrayOfAllItems[_415]=null;
item[this._storeRefPropName]=null;
if(this._itemsByIdentity){
delete this._itemsByIdentity[_416];
}
this._pending._deletedItems[_416]=item;
if(item[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,item);
}
this.onDelete(item);
return true;
},setValue:function(item,_422,_423){
return this._setValueOrValues(item,_422,_423,true);
},setValues:function(item,_425,_426){
return this._setValueOrValues(item,_425,_426,true);
},unsetAttribute:function(item,_428){
return this._setValueOrValues(item,_428,[],true);
},_setValueOrValues:function(item,_42a,_42b,_42c){
this._assert(!this._saveInProgress);
this._assertIsItem(item);
this._assert(dojo.isString(_42a));
this._assert(typeof _42b!=="undefined");
var _42d=this._getIdentifierAttribute();
if(_42a==_42d){
throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
}
var _42e=this._getValueOrValues(item,_42a);
var _42f=this.getIdentity(item);
if(!this._pending._modifiedItems[_42f]){
var _430={};
for(var key in item){
if((key===this._storeRefPropName)||(key===this._itemNumPropName)||(key===this._rootItemPropName)){
_430[key]=item[key];
}else{
if(key===this._reverseRefMap){
_430[key]=dojo.clone(item[key]);
}else{
_430[key]=item[key].slice(0,item[key].length);
}
}
}
this._pending._modifiedItems[_42f]=_430;
}
var _432=false;
if(dojo.isArray(_42b)&&_42b.length===0){
_432=delete item[_42a];
_42b=undefined;
if(this.referenceIntegrity&&_42e){
var _433=_42e;
if(!dojo.isArray(_433)){
_433=[_433];
}
for(var i=0;i<_433.length;i++){
var _435=_433[i];
if(this.isItem(_435)){
this._removeReferenceFromMap(_435,item,_42a);
}
}
}
}else{
var _436;
if(dojo.isArray(_42b)){
var _437=_42b;
_436=_42b.slice(0,_42b.length);
}else{
_436=[_42b];
}
if(this.referenceIntegrity){
if(_42e){
var _433=_42e;
if(!dojo.isArray(_433)){
_433=[_433];
}
var map={};
dojo.forEach(_433,function(_439){
if(this.isItem(_439)){
var id=this.getIdentity(_439);
map[id.toString()]=true;
}
},this);
dojo.forEach(_436,function(_43b){
if(this.isItem(_43b)){
var id=this.getIdentity(_43b);
if(map[id.toString()]){
delete map[id.toString()];
}else{
this._addReferenceToMap(_43b,item,_42a);
}
}
},this);
for(var rId in map){
var _43e;
if(this._itemsByIdentity){
_43e=this._itemsByIdentity[rId];
}else{
_43e=this._arrayOfAllItems[rId];
}
this._removeReferenceFromMap(_43e,item,_42a);
}
}else{
for(var i=0;i<_436.length;i++){
var _435=_436[i];
if(this.isItem(_435)){
this._addReferenceToMap(_435,item,_42a);
}
}
}
}
item[_42a]=_436;
_432=true;
}
if(_42c){
this.onSet(item,_42a,_42e,_42b);
}
return _432;
},_addReferenceToMap:function(_43f,_440,_441){
var _442=this.getIdentity(_440);
var _443=_43f[this._reverseRefMap];
if(!_443){
_443=_43f[this._reverseRefMap]={};
}
var _444=_443[_442];
if(!_444){
_444=_443[_442]={};
}
_444[_441]=true;
},_removeReferenceFromMap:function(_445,_446,_447){
var _448=this.getIdentity(_446);
var _449=_445[this._reverseRefMap];
var _44a;
if(_449){
for(_44a in _449){
if(_44a==_448){
delete _449[_44a][_447];
if(this._isEmpty(_449[_44a])){
delete _449[_44a];
}
}
}
if(this._isEmpty(_449)){
delete _445[this._reverseRefMap];
}
}
},_dumpReferenceMap:function(){
var i;
for(i=0;i<this._arrayOfAllItems.length;i++){
var item=this._arrayOfAllItems[i];
if(item&&item[this._reverseRefMap]){
console.log("Item: ["+this.getIdentity(item)+"] is referenced by: "+dojo.toJson(item[this._reverseRefMap]));
}
}
},_getValueOrValues:function(item,_44e){
var _44f=undefined;
if(this.hasAttribute(item,_44e)){
var _450=this.getValues(item,_44e);
if(_450.length==1){
_44f=_450[0];
}else{
_44f=_450;
}
}
return _44f;
},_flatten:function(_451){
if(this.isItem(_451)){
var item=_451;
var _453=this.getIdentity(item);
var _454={_reference:_453};
return _454;
}else{
if(typeof _451==="object"){
for(var type in this._datatypeMap){
var _456=this._datatypeMap[type];
if(dojo.isObject(_456)&&!dojo.isFunction(_456)){
if(_451 instanceof _456.type){
if(!_456.serialize){
throw new Error("ItemFileWriteStore:  No serializer defined for type mapping: ["+type+"]");
}
return {_type:type,_value:_456.serialize(_451)};
}
}else{
if(_451 instanceof _456){
return {_type:type,_value:_451.toString()};
}
}
}
}
return _451;
}
},_getNewFileContentString:function(){
var _457={};
var _458=this._getIdentifierAttribute();
if(_458!==Number){
_457.identifier=_458;
}
if(this._labelAttr){
_457.label=this._labelAttr;
}
_457.items=[];
for(var i=0;i<this._arrayOfAllItems.length;++i){
var item=this._arrayOfAllItems[i];
if(item!==null){
var _45b={};
for(var key in item){
if(key!==this._storeRefPropName&&key!==this._itemNumPropName){
var _45d=key;
var _45e=this.getValues(item,_45d);
if(_45e.length==1){
_45b[_45d]=this._flatten(_45e[0]);
}else{
var _45f=[];
for(var j=0;j<_45e.length;++j){
_45f.push(this._flatten(_45e[j]));
_45b[_45d]=_45f;
}
}
}
}
_457.items.push(_45b);
}
}
var _461=true;
return dojo.toJson(_457,_461);
},_isEmpty:function(_462){
var _463=true;
if(dojo.isObject(_462)){
var i;
for(i in _462){
_463=false;
break;
}
}else{
if(dojo.isArray(_462)){
if(_462.length>0){
_463=false;
}
}
}
return _463;
},save:function(_465){
this._assert(!this._saveInProgress);
this._saveInProgress=true;
var self=this;
var _467=function(){
self._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
self._saveInProgress=false;
if(_465&&_465.onComplete){
var _468=_465.scope||dojo.global;
_465.onComplete.call(_468);
}
};
var _469=function(){
self._saveInProgress=false;
if(_465&&_465.onError){
var _46a=_465.scope||dojo.global;
_465.onError.call(_46a);
}
};
if(this._saveEverything){
var _46b=this._getNewFileContentString();
this._saveEverything(_467,_469,_46b);
}
if(this._saveCustom){
this._saveCustom(_467,_469);
}
if(!this._saveEverything&&!this._saveCustom){
_467();
}
},revert:function(){
this._assert(!this._saveInProgress);
var _46c;
for(_46c in this._pending._newItems){
var _46d=this._pending._newItems[_46c];
_46d[this._storeRefPropName]=null;
this._arrayOfAllItems[_46d[this._itemNumPropName]]=null;
if(_46d[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,_46d);
}
if(this._itemsByIdentity){
delete this._itemsByIdentity[_46c];
}
}
for(_46c in this._pending._modifiedItems){
var _46e=this._pending._modifiedItems[_46c];
var _46f=null;
if(this._itemsByIdentity){
_46f=this._itemsByIdentity[_46c];
}else{
_46f=this._arrayOfAllItems[_46c];
}
_46e[this._storeRefPropName]=this;
_46f[this._storeRefPropName]=null;
var _470=_46f[this._itemNumPropName];
this._arrayOfAllItems[_470]=_46e;
if(_46f[this._rootItemPropName]){
var i;
for(i=0;i<this._arrayOfTopLevelItems.length;i++){
var _472=this._arrayOfTopLevelItems[i];
if(this.getIdentity(_472)==_46c){
this._arrayOfTopLevelItems[i]=_46e;
break;
}
}
}
if(this._itemsByIdentity){
this._itemsByIdentity[_46c]=_46e;
}
}
var _473;
for(_46c in this._pending._deletedItems){
_473=this._pending._deletedItems[_46c];
_473[this._storeRefPropName]=this;
var _474=_473[this._itemNumPropName];
if(_473["backup_"+this._reverseRefMap]){
_473[this._reverseRefMap]=_473["backup_"+this._reverseRefMap];
delete _473["backup_"+this._reverseRefMap];
}
this._arrayOfAllItems[_474]=_473;
if(this._itemsByIdentity){
this._itemsByIdentity[_46c]=_473;
}
if(_473[this._rootItemPropName]){
this._arrayOfTopLevelItems.push(_473);
}
}
for(_46c in this._pending._deletedItems){
_473=this._pending._deletedItems[_46c];
if(_473["backupRefs_"+this._reverseRefMap]){
dojo.forEach(_473["backupRefs_"+this._reverseRefMap],function(_475){
var _476;
if(this._itemsByIdentity){
_476=this._itemsByIdentity[_475.id];
}else{
_476=this._arrayOfAllItems[_475.id];
}
this._addReferenceToMap(_476,_473,_475.attr);
},this);
delete _473["backupRefs_"+this._reverseRefMap];
}
}
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
return true;
},isDirty:function(item){
if(item){
var _478=this.getIdentity(item);
return new Boolean(this._pending._newItems[_478]||this._pending._modifiedItems[_478]||this._pending._deletedItems[_478]);
}else{
if(!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems)){
return true;
}
return false;
}
},onSet:function(item,_47a,_47b,_47c){
},onNew:function(_47d,_47e){
},onDelete:function(_47f){
}});
}
if(!dojo._hasResource["dojox.form.DropDownSelect"]){
dojo._hasResource["dojox.form.DropDownSelect"]=true;
dojo.provide("dojox.form.DropDownSelect");
dojo.declare("dojox.form.DropDownSelect",dijit.form.DropDownButton,{baseClass:"dojoxDropDownSelect",options:null,emptyLabel:"",_isPopulated:false,_addMenuItem:function(_480){
var menu=this.dropDown;
if(!_480.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _482=dojo.hitch(this,"setAttribute","value",_480);
var mi=new dijit.MenuItem({id:this.id+"_item_"+_480.value,label:_480.label,onClick:_482});
menu.addChild(mi);
}
},_resetButtonState:function(){
var len=this.options.length;
var _485=this.dropDown;
dojo.forEach(_485.getChildren(),function(_486){
_486.destroyRecursive();
});
this._isPopulated=false;
this.setAttribute("readOnly",(len===1));
this.setAttribute("disabled",(len===0));
this.setAttribute("value",this.value);
},_updateSelectedState:function(){
var val=this.value;
if(val){
var _488=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_489){
dojo[_489.id===_488?"addClass":"removeClass"](_489.domNode,this.baseClass+"SelectedOption");
},this);
}
},addOption:function(_48a,_48b){
this.options.push(_48a.value?_48a:{value:_48a,label:_48b});
},removeOption:function(_48c){
this.options=dojo.filter(this.options,function(node,idx){
return !((typeof _48c==="number"&&idx===_48c)||(typeof _48c==="string"&&node.value===_48c)||(_48c.value&&node.value===_48c.value));
});
},setOptionLabel:function(_48f,_490){
dojo.forEach(this.options,function(node){
if(node.value===_48f){
node.label=_490;
}
});
},destroy:function(){
if(this._labelHackHandle){
clearTimeout(this._labelHackHandle);
}
this.inherited(arguments);
},setLabel:function(_492){
_492="<div class=\" "+this.baseClass+"Label\">"+_492+"</div>";
if(this._labelHackHandle){
clearTimeout(this._labelHackHandle);
}
if(dojo.isFF===2){
this._labelHackHandle=setTimeout(dojo.hitch(this,function(){
this._labelHackHandle=null;
dijit.form.DropDownButton.prototype.setLabel.call(this,_492);
}),0);
}else{
this.inherited(arguments);
}
},setAttribute:function(attr,_494){
if(attr==="value"){
if(typeof _494==="string"){
_494=dojo.filter(this.options,function(node){
return node.value===_494;
})[0];
}
if(!_494){
_494=this.options[0]||{value:"",label:""};
}
this.value=_494.value;
if(this._started){
this.setLabel(_494.label||this.emptyLabel||"&nbsp;");
}
this._handleOnChange(_494.value);
_494=this.value;
}else{
this.inherited(arguments);
}
},_fillContent:function(){
var opts=this.options;
if(!opts){
opts=this.options=this.srcNodeRef?dojo.query(">",this.srcNodeRef).map(function(node){
if(node.getAttribute("type")==="separator"){
return {value:"",label:""};
}
return {value:node.getAttribute("value"),label:String(node.innerHTML)};
},this):[];
}
if(opts.length&&!this.value){
var si=this.srcNodeRef.selectedIndex;
this.value=opts[si!=-1?si:0].value;
}
this.dropDown=new dijit.Menu();
},postCreate:function(){
this.inherited(arguments);
var fx=function(){
dojo[this._opened?"addClass":"removeClass"](this.focusNode,this.baseClass+"ButtonOpened");
};
this.connect(this,"_openDropDown",fx);
this.connect(this,"_closeDropDown",fx);
this.connect(this,"onChange","_updateSelectedState");
this.connect(this,"addOption","_resetButtonState");
this.connect(this,"removeOption","_resetButtonState");
this.connect(this,"setOptionLabel","_resetButtonState");
},startup:function(){
this.inherited(arguments);
if(dojo.isFF===2){
setTimeout(dojo.hitch(this,this._resetButtonState),0);
}else{
this._resetButtonState();
}
},_populate:function(_49a){
var _49b=this.dropDown;
dojo.forEach(this.options,this._addMenuItem,this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
this._isPopulated=true;
if(_49a){
_49a.call(this);
}
},_toggleDropDown:function(){
var _49c=this.dropDown;
if(_49c&&!_49c.isShowingNow&&!this._isPopulated){
this._populate(dojox.form.DropDownSelect.superclass._toggleDropDown);
}else{
this.inherited(arguments);
}
}});
}
if(!dojo._hasResource["generic.form.DropDownSelect"]){
dojo._hasResource["generic.form.DropDownSelect"]=true;
dojo.provide("generic.form.DropDownSelect");
dojo.declare("generic.form.DropDownSelect",dojox.form.DropDownSelect,{baseClass:"select_dropdown",width:"140",maxHeightIE:300,handlers:[],templateString:null,templateString:"<div id=\"${id}_container\" dojoAttachEvent=\"onclick:_onDropDownClick,onmousedown:_onMouseDown,onkeydown:_onDropDownKeydown,onkeypress:_onKey\" waiRole=\"presentation\">\n    <div class=\"nopadding\" waiRole=\"presentation\">\n        <div class=\"select_button\" type=\"${type}\" dojoAttachPoint=\"focusNode,titleNode\" dojoAttachEvent=\"onblur:_onDropDownBlur\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\" tabIndex=0>\n            <div id=\"${id}_select_container\">\n                <div class=\"field_left\"></div>\n                <div class=\"field_mid\" dojoAttachPoint=\"containerNode,popupStateNode\" waiRole=\"presentation\" id=\"${id}_label\">\n                    <div class=\"select_dropdownLabel\">${label}</div>\n                </div>\n                <div class=\"select_right\"></div>\n            </div>\n        </div>\n    </div>\n    ${hiddenFieldString}\n</div>\n",templatePathMenu:dojo.moduleUrl("site","form/templates/Menu.html"),templatePathMenuItem:dojo.moduleUrl("site","form/templates/MenuItem.html"),anchors:null,_menuItems:[],indices:{},_selectedIdx:-1,useHiddenField:false,hiddenFieldId:"",hiddenFieldString:"",constructor:function(args){
if(args.width){
this.width=args.width;
}
this.useHiddenField=args.useHiddenField;
this.id=args.id;
this.name=(args.name?args.name:args.id);
},postMixInProperties:function(){
if(this.useHiddenField){
this.initHiddenField();
}
},initHiddenField:function(){
this.hiddenFieldId=this.id;
this.hiddenFieldString="<input value='' name='"+this.name+"' type='hidden' id='"+this.hiddenFieldId+"' />";
this.id=this.id+".display";
},postCreate:function(){
this.inherited(arguments);
this._setLabelWidth();
if(this.useHiddenField){
this.passValueToHidden();
}
},startup:function(){
this.inherited(arguments);
var _49e=dojo.byId(this.dropDown.id);
_49e.style.width=this.width+"px";
},onChange:function(){
this.inherited(arguments);
if(this.value&&this.value.length>0){
this._selectedIdx=this.indices[this.value];
}
if(this.useHiddenField){
this.passValueToHidden();
}
this.onChangeCallback();
},onChangeCallback:function(){
},_setLabelWidth:function(){
var node=dojo.byId(this.id+"_container");
node.style.width=(parseInt(this.width,10)+1)+"px";
var _4a0=this.width;
var _4a1=dojo.byId(this.id+"_select_container");
var _4a2=_4a1.childNodes.length;
for(var i=0;i<_4a2;i++){
var node=_4a1.childNodes[i];
if(dojo.hasClass(node,"field_left")||dojo.hasClass(node,"select_right")){
_4a0-=node.offsetWidth;
}
}
dojo.byId(this.id+"_label").style.width=_4a0+"px";
},passValueToHidden:function(){
var _4a4=dojo.byId(this.hiddenFieldId);
if(_4a4&&this.value&&(this.value!=="")){
_4a4.value=this.value;
}
},passValueFromHidden:function(){
var _4a5=dojo.byId(this.hiddenFieldId);
if(_4a5){
if(_4a5.value!==""&&_4a5.value!==null){
this.setAttribute("value",_4a5.value);
}
}
},_fillContent:function(){
var opts=this.options;
var _4a7={};
var _4a8={};
var idx=0;
var val="";
var _4ab="";
var akey="";
if(!opts){
opts=this.options=this.srcNodeRef?dojo.query(">",this.srcNodeRef).map(function(node){
val=node.getAttribute("value");
_4ab=String(node.innerHTML);
if(node.getAttribute("type")==="separator"||val.length==0||_4ab.length==0){
val="";
if(_4ab.length>0&&idx==0){
this.emptyLabel=_4ab;
}
}else{
akey=_4ab.substring(0,1).toLowerCase();
if(typeof (_4a7[akey])==="undefined"){
_4a7[akey]=idx;
}
_4a8[val]=idx;
}
idx++;
return {value:val,label:_4ab};
},this):[];
}
this.anchors=_4a7;
this.indices=_4a8;
if(opts.length&&!this.value){
var si=this.srcNodeRef.selectedIndex;
this.value=opts[si!=-1?si:0].value;
this._selectedIdx=si;
}
var _4af=dojo.hitch(this,"_onMenuKey");
this.dropDown=new dijit.Menu({id:this.id+"_menu",templateString:null,templatePath:this.templatePathMenu,_onKeyPress:_4af});
this.dropDown.menuOnClose=this.dropDown.onClose;
var _4b0=dojo.hitch(this,"_onMenuClose");
this.dropDown.onClose=function(e){
this.menuOnClose(e);
_4b0(e);
};
},updateIndices:function(){
var opts=this.options;
var _4b3={};
var _4b4={};
var akey="";
dojo.forEach(opts,function(opt,idx){
akey=opt.label.substring(0,1).toLowerCase();
if(typeof (_4b3[akey])==="undefined"){
_4b3[akey]=idx;
}
_4b4[val]=idx;
});
this.anchors=_4b3;
this.indices=_4b4;
},_resetButtonState:function(){
var len=this.options.length;
var _4b9=this.dropDown;
dojo.forEach(_4b9.getChildren(),function(_4ba){
_4ba.destroyRecursive();
});
this._isPopulated=false;
this.setAttribute("readOnly",(len===0));
this.setAttribute("disabled",(len===0));
this.setAttribute("value",this.value);
},_updateSelectedState:function(){
var val=this._selectedIdx;
if(val>=0){
var _4bc=this.id+"_item_"+val;
dojo.forEach(this.dropDown.getChildren(),function(_4bd){
dojo[_4bd.id===_4bc?"addClass":"removeClass"](_4bd.domNode,this.baseClass+"SelectedOption");
},this);
}
},_populate:function(_4be){
var _4bf=this.dropDown;
dojo.forEach(this.options,function(_4c0,idx){
this._addMenuItem(_4c0,idx);
},this);
this._updateSelectedState();
dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");
if(dojo.isIE==6){
var _4c2=dojo.byId(this.dropDown.id+"_container");
var _4c3=dojo.coords(_4c2);
if(_4c3.h>this.maxHeightIE){
_4c2.style.height=this.maxHeightIE+"px";
}
}
this._isPopulated=true;
if(_4be){
_4be.call(this);
}
},_addMenuItem:function(_4c4,idx){
var menu=this.dropDown;
if(!_4c4.value){
menu.addChild(new dijit.MenuSeparator());
}else{
var _4c7=dojo.hitch(this,"setAttribute","value",_4c4);
var _4c8=dojo.hitch(this,"_onMenuItemKey",idx);
var mi=new dijit.MenuItem({id:this.id+"_item_"+idx,label:_4c4.label,onClick:_4c7,templateString:null,templatePath:this.templatePathMenuItem,_onKeyPress:_4c8});
menu.addChild(mi);
this._menuItems[idx]=mi.id;
}
},_onDropDownClick:function(e){
var _4cb=true;
if(dojo.isIE>=7&&e.type!=="mousedown"){
_4cb=false;
}
if(_4cb){
this.inherited(arguments);
}
},_onMouseDown:function(e){
this._onMouse(e);
if(dojo.isIE>=7){
this._onDropDownClick(e);
}
},_onKey:function(e){
this.inherited(arguments);
this._getAnchor(e);
},_onMenuKey:function(e){
var _4cf=this._getAnchor(e);
if(_4cf>=0){
var item=dijit.byId(this._menuItems[_4cf]);
this.dropDown.focusChild(item);
}
},_onMenuItemKey:function(idx,e){
if(!e||typeof (e)==="undefined"){
return;
}
var _4d3;
switch(e.keyCode){
case dojo.keys.DOWN_ARROW:
_4d3=this._getNextFocusableIdx(idx,1);
this.setSelected(_4d3);
break;
case dojo.keys.UP_ARROW:
_4d3=this._getNextFocusableIdx(idx,-1);
this.setSelected(_4d3);
break;
}
},_getNextFocusableIdx:function(idx,_4d5,_4d6){
var _4d7;
var _4d8=idx+_4d5;
var _4d9=(this.options.length-1);
var _4da=10;
var _4d6=(_4d6?_4d6:0);
if(_4d6>=_4da){
return 0;
}
_4d6++;
if(_4d8>_4d9&&_4d5==1){
_4d8=0;
}else{
if(_4d8<0&&_4d5==-1){
_4d8=_4d9;
}
}
if(this.options[_4d8].value){
_4d7=_4d8;
}else{
_4d7=this._getNextFocusableIdx(_4d8,_4d5,_4d6);
}
return _4d7;
},_getAnchor:function(e){
var _4dc=this.anchors[e.keyChar];
if(_4dc>=0&&this.options[_4dc]){
if(this._started){
this.setSelected(_4dc);
}
return _4dc;
}else{
return -1;
}
},_onDropDownBlur:function(e){
this.inherited(arguments);
this.saveSelected();
},_onMenuClose:function(e){
this.saveSelected();
dojo.removeClass(this.domNode,this.baseClass+"Focused");
},setSelected:function(idx){
if(this.options[idx]){
this._selectedIdx=idx;
this.setLabel(this.options[idx].label);
}
},saveSelected:function(){
if(this._selectedIdx>=0&&this.options[this._selectedIdx]){
this.setAttribute("value",this.options[this._selectedIdx].value);
}
},reset:function(){
this._selectedIdx=0;
this.setAttribute("value",this.options[0].value);
if(this.useHiddenField&&this.value===""){
var _4e0=dojo.byId(this.hiddenFieldId);
_4e0.value="";
}
}});
}
if(!dojo._hasResource["generic.img"]){
dojo._hasResource["generic.img"]=true;
dojo.provide("generic.img");
dojo.declare("generic.img",null,{constructor:function(_4e1,_4e2){
this.node=_4e1;
this.preloaded={};
var src=this.node.src;
var bits=src.match(/^(.*)_(on|off|sel|dis)\.(.*?)$/);
if(bits==null){
return false;
}
this.srcBase=bits[1];
this.srcExt=bits[3];
this.states=(_4e2?_4e2:["off","on"]);
this.preload();
},preload:function(){
if(!this.states){
return;
}
for(var i=0;i<this.states.length;i++){
var _4e6=this.states[i];
var _4e7=(_4e6!==""?"_":"");
var _4e8=this.srcBase+_4e7+_4e6+"."+this.srcExt;
var pl=new Image();
pl.src=_4e8;
this.preloaded[_4e6]=pl;
}
},changeSrc:function(_4ea){
var p=this.preloaded[_4ea];
if(!this.srcBase){
return;
}
if(p){
this.node.src=p.src;
}else{
this.node.src=this.srcBase+"_"+_4ea+"."+this.srcExt;
}
}});
dojo.provide("generic.rollover");
dojo.declare("generic.rollover",null,{constructor:function(_4ec,_4ed){
var _4ee=(_4ed==null?_4ec:_4ee);
this.img=new generic.img(_4ec,["off","on"]);
this.handlers=[dojo.connect(_4ee,"onmouseover",this,"onMouseOver"),dojo.connect(_4ee,"onmouseout",this,"onMouseOut")];
},onMouseOver:function(e){
if(!dojo.hasClass(e.currentTarget,"disable_rollover")){
this.img.changeSrc("on");
}
},onMouseOut:function(e){
if(!dojo.hasClass(e.currentTarget,"disable_rollover")){
this.img.changeSrc("off");
}
}});
}
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],{isLayoutContainer:true,postCreate:function(){
dojo.addClass(this.domNode,"dijitContainer");
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_4f1){
_4f1.startup();
});
if(!this.getParent||!this.getParent()){
this.resize();
this.connect(window,"onresize",function(){
this.resize();
});
}
this.inherited(arguments);
},resize:function(args){
var node=this.domNode;
if(args){
dojo.marginBox(node,args);
if(args.t){
node.style.top=args.t+"px";
}
if(args.l){
node.style.left=args.l+"px";
}
}
var mb=dojo.mixin(dojo.marginBox(node),args||{});
this._contentBox=dijit.layout.marginBox2contentBox(node,mb);
this.layout();
},layout:function(){
}});
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 _4fa=function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
};
var size=function(_4fd,dim){
_4fd.resize?_4fd.resize(dim):dojo.marginBox(_4fd.domNode,dim);
dojo.mixin(_4fd,dojo.marginBox(_4fd.domNode));
dojo.mixin(_4fd,dim);
};
dijit.layout.layoutChildren=function(_4ff,dim,_501){
dim=dojo.mixin({},dim);
dojo.addClass(_4ff,"dijitLayoutContainer");
_501=dojo.filter(_501,function(item){
return item.layoutAlign!="client";
}).concat(dojo.filter(_501,function(item){
return item.layoutAlign=="client";
}));
dojo.forEach(_501,function(_504){
var elm=_504.domNode,pos=_504.layoutAlign;
var _507=elm.style;
_507.left=dim.l+"px";
_507.top=dim.t+"px";
_507.bottom=_507.right="auto";
dojo.addClass(elm,"dijitAlign"+_4fa(pos));
if(pos=="top"||pos=="bottom"){
size(_504,{w:dim.w});
dim.h-=_504.h;
if(pos=="top"){
dim.t+=_504.h;
}else{
_507.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
size(_504,{h:dim.h});
dim.w-=_504.w;
if(pos=="left"){
dim.l+=_504.w;
}else{
_507.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
size(_504,dim);
}
}
}
});
};
})();
}
if(!dojo._hasResource["dojo.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_508,_509,_50a){
_50a=dojo.i18n.normalizeLocale(_50a);
var _50b=_50a.split("-");
var _50c=[_508,"nls",_509].join(".");
var _50d=dojo._loadedModules[_50c];
if(_50d){
var _50e;
for(var i=_50b.length;i>0;i--){
var loc=_50b.slice(0,i).join("_");
if(_50d[loc]){
_50e=_50d[loc];
break;
}
}
if(!_50e){
_50e=_50d.ROOT;
}
if(_50e){
var _511=function(){
};
_511.prototype=_50e;
return new _511();
}
}
throw new Error("Bundle not found: "+_509+" in "+_508+" , locale="+_50a);
};
dojo.i18n.normalizeLocale=function(_512){
var _513=_512?_512.toLowerCase():dojo.locale;
if(_513=="root"){
_513="ROOT";
}
return _513;
};
dojo.i18n._requireLocalization=function(_514,_515,_516,_517){
var _518=dojo.i18n.normalizeLocale(_516);
var _519=[_514,"nls",_515].join(".");
var _51a="";
if(_517){
var _51b=_517.split(",");
for(var i=0;i<_51b.length;i++){
if(_518.indexOf(_51b[i])==0){
if(_51b[i].length>_51a.length){
_51a=_51b[i];
}
}
}
if(!_51a){
_51a="ROOT";
}
}
var _51d=_517?_51a:_518;
var _51e=dojo._loadedModules[_519];
var _51f=null;
if(_51e){
if(dojo.config.localizationComplete&&_51e._built){
return;
}
var _520=_51d.replace(/-/g,"_");
var _521=_519+"."+_520;
_51f=dojo._loadedModules[_521];
}
if(!_51f){
_51e=dojo["provide"](_519);
var syms=dojo._getModuleSymbols(_514);
var _523=syms.concat("nls").join("/");
var _524;
dojo.i18n._searchLocalePath(_51d,_517,function(loc){
var _526=loc.replace(/-/g,"_");
var _527=_519+"."+_526;
var _528=false;
if(!dojo._loadedModules[_527]){
dojo["provide"](_527);
var _529=[_523];
if(loc!="ROOT"){
_529.push(loc);
}
_529.push(_515);
var _52a=_529.join("/")+".js";
_528=dojo._loadPath(_52a,null,function(hash){
var _52c=function(){
};
_52c.prototype=_524;
_51e[_526]=new _52c();
for(var j in hash){
_51e[_526][j]=hash[j];
}
});
}else{
_528=true;
}
if(_528&&_51e[_526]){
_524=_51e[_526];
}else{
_51e[_526]=_524;
}
if(_517){
return true;
}
});
}
if(_517&&_518!=_51a){
_51e[_518.replace(/-/g,"_")]=_51e[_51a.replace(/-/g,"_")];
}
};
(function(){
var _52e=dojo.config.extraLocale;
if(_52e){
if(!_52e instanceof Array){
_52e=[_52e];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_532,_533){
req(m,b,_532,_533);
if(_532){
return;
}
for(var i=0;i<_52e.length;i++){
req(m,b,_52e[i],_533);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_535,down,_537){
_535=dojo.i18n.normalizeLocale(_535);
var _538=_535.split("-");
var _539=[];
for(var i=_538.length;i>0;i--){
_539.push(_538.slice(0,i).join("-"));
}
_539.push(false);
if(down){
_539.reverse();
}
for(var j=_539.length-1;j>=0;j--){
var loc=_539[j]||"ROOT";
var stop=_537(loc);
if(stop){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_53e,_53f){
function preload(_540){
_540=dojo.i18n.normalizeLocale(_540);
dojo.i18n._searchLocalePath(_540,true,function(loc){
for(var i=0;i<_53f.length;i++){
if(_53f[i]==loc){
dojo["require"](_53e+"_"+loc);
return true;
}
}
return false;
});
};
preload();
var _543=dojo.config.extraLocale||[];
for(var i=0;i<_543.length;i++){
preload(_543[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,"class":"dijitContentPane",doLayout:"auto",postCreate:function(){
this.domNode.title="";
if(!this.containerNode){
this.containerNode=this.domNode;
}
if(this.preload){
this._loadCheck();
}
var _545=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_545);
this.errorMessage=dojo.string.substitute(this.errorMessage,_545);
var _546=dijit.getWaiRole(this.domNode);
if(!_546){
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 _547=dojo.query(">",this.containerNode||this.domNode),_548=_547.filter("[widgetId]");
if(_547.length==1&&_548.length==1){
this.isContainer=true;
this._singleChild=dijit.byNode(_548[0]);
}else{
delete this.isContainer;
delete this._singleChild;
}
},refresh:function(){
return this._prepareLoad(true);
},setHref:function(href){
this.href=href;
return this._prepareLoad();
},setContent:function(data){
if(!this._isDownloaded){
this.href="";
this._onUnloadHandler();
}
this._setContent(data||"");
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(size){
dojo.marginBox(this.domNode,size);
var node=this.containerNode||this.domNode,mb=dojo.mixin(dojo.marginBox(node),size||{});
this._contentBox=dijit.layout.marginBox2contentBox(node,mb);
if(this._singleChild&&this._singleChild.resize){
this._singleChild.resize(this._contentBox);
}
},_prepareLoad:function(_54e){
this.cancel();
this.isLoaded=false;
this._loadCheck(_54e);
},_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(_550){
var _551=this._isShown();
if(this.href&&(_550||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_551&&!this._xhrDfd)||(!this.isLoaded&&_551&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._onUnloadHandler();
this._setContent(this.onDownloadStart.call(this));
var self=this;
var _553={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_553,this.ioArgs);
}
var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_553);
hand.addCallback(function(html){
try{
self.onDownloadEnd.call(self);
self._isDownloaded=true;
self.setContent.call(self,html);
}
catch(err){
self._onError.call(self,"Content",err);
}
delete self._xhrDfd;
return html;
});
hand.addErrback(function(err){
if(!hand.cancelled){
self._onError.call(self,"Download",err);
}
delete self._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(cont){
this.destroyDescendants();
try{
var node=this.containerNode||this.domNode;
while(node.firstChild){
dojo._destroyElement(node.firstChild);
}
if(typeof cont=="string"){
if(this.extractContent){
match=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(match){
cont=match[1];
}
}
node.innerHTML=cont;
}else{
if(cont.nodeType){
node.appendChild(cont);
}else{
dojo.forEach(cont,function(n){
node.appendChild(n.cloneNode(true));
});
}
}
}
catch(e){
var _55a=this.onContentError(e);
try{
node.innerHTML=_55a;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
}
},_onError:function(type,err,_55d){
var _55e=this["on"+type+"Error"].call(this,err);
if(_55d){
console.error(_55d,err);
}else{
if(_55e){
this._setContent.call(this,_55e);
}
}
},_createSubWidgets:function(){
var _55f=this.containerNode||this.domNode;
try{
dojo.parser.parse(_55f,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(_562){
},onDownloadError:function(_563){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
if(!dojo._hasResource["dojox.layout.ContentPane"]){
dojo._hasResource["dojox.layout.ContentPane"]=true;
dojo.provide("dojox.layout.ContentPane");
(function(){
if(dojo.isIE){
var _564=/(AlphaImageLoader\([^)]*?src=(['"]))(?![a-z]+:|\/)([^\r\n;}]+?)(\2[^)]*\)\s*[;}]?)/g;
}
var _565=/(?:(?:@import\s*(['"])(?![a-z]+:|\/)([^\r\n;{]+?)\1)|url\(\s*(['"]?)(?![a-z]+:|\/)([^\r\n;]+?)\3\s*\))([a-z, \s]*[;}]?)/g;
function adjustCssPaths(_566,_567){
if(!_567||!_566){
return;
}
if(_564){
_567=_567.replace(_564,function(_568,pre,_56a,url,post){
return pre+(new dojo._Url(_566,"./"+url).toString())+post;
});
}
return _567.replace(_565,function(_56d,_56e,_56f,_570,_571,_572){
if(_56f){
return "@import \""+(new dojo._Url(_566,"./"+_56f).toString())+"\""+_572;
}else{
return "url("+(new dojo._Url(_566,"./"+_571).toString())+")"+_572;
}
});
};
var _573=/(<[a-z][a-z0-9]*\s[^>]*)(?:(href|src)=(['"]?)([^>]*?)\3|style=(['"]?)([^>]*?)\5)([^>]*>)/gi;
function adjustHtmlPaths(_574,cont){
var url=_574||"./";
return cont.replace(_573,function(tag,_578,name,_57a,_57b,_57c,_57d,end){
return _578+(name?(name+"="+_57a+(new dojo._Url(url,_57b).toString())+_57a):("style="+_57c+adjustCssPaths(url,_57d)+_57c))+end;
});
};
function secureForInnerHtml(cont){
return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
function snarfStyles(_580,cont,_582){
_582.attributes=[];
return cont.replace(/(?:<style([^>]*)>([\s\S]*?)<\/style>|<link\s+(?=[^>]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,function(_583,_584,_585,_586,_587,href){
var i,attr=(_584||_586||"").replace(/^\s*([\s\S]*?)\s*$/i,"$1");
if(_585){
i=_582.push(_580?adjustCssPaths(_580,_585):_585);
}else{
i=_582.push("@import \""+href+"\";");
attr=attr.replace(/\s*(?:rel|href)=(['"])?[^\s]*\1\s*/gi,"");
}
if(attr){
attr=attr.split(/\s+/);
var _58b={},tmp;
for(var j=0,e=attr.length;j<e;j++){
tmp=attr[j].split("=");
_58b[tmp[0]]=tmp[1].replace(/^\s*['"]?([\s\S]*?)['"]?\s*$/,"$1");
}
_582.attributes[i-1]=_58b;
}
return "";
});
};
function snarfScripts(cont,_590){
_590.code="";
function download(src){
if(_590.downloadRemote){
dojo.xhrGet({url:src,sync:true,load:function(code){
_590.code+=code+";";
},error:_590.errBack});
}
};
return cont.replace(/<script\s*(?![^>]*type=['"]?dojo)(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi,function(_593,_594,src,code){
if(src){
download(src);
}else{
_590.code+=code;
}
return "";
});
};
function evalInGlobal(code,_598){
_598=_598||dojo.doc.body;
var n=_598.ownerDocument.createElement("script");
n.type="text/javascript";
_598.appendChild(n);
n.text=code;
};
dojo.declare("dojox.layout.ContentPane",dijit.layout.ContentPane,{adjustPaths:false,cleanContent:false,renderStyles:false,executeScripts:true,scriptHasHooks:false,constructor:function(){
this.ioArgs={};
this.ioMethod=dojo.xhrGet;
this.onLoadDeferred=new dojo.Deferred();
this.onUnloadDeferred=new dojo.Deferred();
},postCreate:function(){
this._setUpDeferreds();
dijit.layout.ContentPane.prototype.postCreate.apply(this,arguments);
},onExecError:function(e){
},setContent:function(data){
if(!this._isDownloaded){
var _59c=this._setUpDeferreds();
}
dijit.layout.ContentPane.prototype.setContent.apply(this,arguments);
return _59c;
},cancel:function(){
if(this._xhrDfd&&this._xhrDfd.fired==-1){
this.onUnloadDeferred=null;
}
dijit.layout.ContentPane.prototype.cancel.apply(this,arguments);
},_setUpDeferreds:function(){
var _t=this,_59e=function(){
_t.cancel();
};
var _59f=(_t.onLoadDeferred=new dojo.Deferred());
var _5a0=(_t._nextUnloadDeferred=new dojo.Deferred());
return {cancel:_59e,addOnLoad:function(func){
_59f.addCallback(func);
},addOnUnload:function(func){
_5a0.addCallback(func);
}};
},_onLoadHandler:function(){
dijit.layout.ContentPane.prototype._onLoadHandler.apply(this,arguments);
if(this.onLoadDeferred){
this.onLoadDeferred.callback(true);
}
},_onUnloadHandler:function(){
this.isLoaded=false;
this.cancel();
if(this.onUnloadDeferred){
this.onUnloadDeferred.callback(true);
}
dijit.layout.ContentPane.prototype._onUnloadHandler.apply(this,arguments);
if(this._nextUnloadDeferred){
this.onUnloadDeferred=this._nextUnloadDeferred;
}
},_onError:function(type,err){
dijit.layout.ContentPane.prototype._onError.apply(this,arguments);
if(this.onLoadDeferred){
this.onLoadDeferred.errback(err);
}
},_prepareLoad:function(_5a5){
var _5a6=this._setUpDeferreds();
dijit.layout.ContentPane.prototype._prepareLoad.apply(this,arguments);
return _5a6;
},_setContent:function(cont){
var _5a8=[];
if(dojo.isString(cont)){
if(this.adjustPaths&&this.href){
cont=adjustHtmlPaths(this.href,cont);
}
if(this.cleanContent){
cont=secureForInnerHtml(cont);
}
if(this.renderStyles||this.cleanContent){
cont=snarfStyles(this.href,cont,_5a8);
}
if(this.executeScripts){
var _t=this,code,_5ab={downloadRemote:true,errBack:function(e){
_t._onError.call(_t,"Exec","Error downloading remote script in \""+_t.id+"\"",e);
}};
cont=snarfScripts(cont,_5ab);
code=_5ab.code;
}
var node=(this.containerNode||this.domNode),pre=post="",walk=0;
switch(node.nodeName.toLowerCase()){
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);
cont=n.childNodes;
}
}
dijit.layout.ContentPane.prototype._setContent.call(this,cont);
if(this._styleNodes&&this._styleNodes.length){
while(this._styleNodes.length){
dojo._destroyElement(this._styleNodes.pop());
}
}
if(this.renderStyles&&_5a8&&_5a8.length){
this._renderStyles(_5a8);
}
if(this.executeScripts&&code){
if(this.cleanContent){
code=code.replace(/(<!--|(?:\/\/)?-->|<!\[CDATA\[|\]\]>)/g,"");
}
if(this.scriptHasHooks){
code=code.replace(/_container_(?!\s*=[^=])/g,dijit._scopeName+".byId('"+this.id+"')");
}
try{
evalInGlobal(code,(this.containerNode||this.domNode));
}
catch(e){
this._onError("Exec","Error eval script in "+this.id+", "+e.message,e);
}
}
},_renderStyles:function(_5b1){
this._styleNodes=[];
var st,att,_5b4,doc=this.domNode.ownerDocument;
var head=doc.getElementsByTagName("head")[0];
for(var i=0,e=_5b1.length;i<e;i++){
_5b4=_5b1[i];
att=_5b1.attributes[i];
st=doc.createElement("style");
st.setAttribute("type","text/css");
for(var x in att){
st.setAttribute(x,att[x]);
}
this._styleNodes.push(st);
head.appendChild(st);
if(st.styleSheet){
st.styleSheet.cssText=_5b4;
}else{
st.appendChild(doc.createTextNode(_5b4));
}
}
}});
})();
}
if(!dojo._hasResource["generic.layout.FixedPane"]){
dojo._hasResource["generic.layout.FixedPane"]=true;
dojo.provide("generic.layout.FixedPane");
dojo.declare("generic.layout.FixedPane",[dojox.layout.ContentPane,dijit._Templated],{parentNode:null,locusNode:null,position:null,closable:true,modal:true,modalMaskNode:null,_modalMask:null,fadeDuration:0,preloadMode:false,_showAnim:null,_hideAnim:null,_allFPs:[],_startZ:100,adjustPaths:false,extractContent:false,executeScripts:false,templateString:null,postCreate:function(){
this.inherited(arguments);
if(!this.srcNodeRef||this.srcNodeRef==null){
if(this.parentNode||this.parentNode!=null){
this.parentNode.appendChild(this.domNode);
}else{
dojo.body().appendChild(this.domNode);
}
}
if(!this.closable){
this.closeNode.style.display="none";
}
this._allFPs.push(this);
this.handlers=[dojo.connect(this,"onLoad",this,"_onLoad")];
},startup:function(){
if(this._started){
return;
}
this.inherited(arguments);
this._started=true;
this.absPosition=this.getPosition();
var s=this.domNode.style;
s.position="absolute";
s.top="-5000px";
s.left=this.absPosition.left;
if(s.display=="none"){
s.display="";
}
if(this.modal){
this.setModalMask();
var self=this;
dojo.connect(this._modalMask.domNode,"onclick",function(e){
self.close();
});
}else{
this.connect(this.domNode,"onmousedown","bringToTop");
}
if(!this.preloadMode){
s.top=this.absPosition.top;
dojo.publish("/page/status/overlayOpened",["open"]);
}
},_onLoad:function(){
},close:function(){
if(!this.closable){
return;
}
this.hide();
if(this.modal){
this._modalMask.hide();
}
dojo.publish("/page/status/overlayClosed",["close"]);
},hide:function(_5bd){
var s=this.domNode.style;
s.top="-5000px";
},show:function(_5bf){
var s=this.domNode.style;
s.top=this.absPosition.top;
if(this.modal){
this._modalMask.show();
}
dojo.publish("/page/status/overlayOpened",["open"]);
},getPosition:function(){
var pos={top:0,left:0};
if(this.position!=null){
pos=this.position;
}
if(this.locusNode){
var _5c2=dojo.coords(this.locusNode);
pos.top+=_5c2.y;
pos.left+=_5c2.x;
if(this.parentNode||this.parentNode!=null){
var _5c3=dojo.coords(this.parentNode);
pos.top-=_5c3.y;
pos.left-=_5c3.x;
}
}
var t=pos.top+"px";
var l=pos.left+"px";
return {top:t,left:l};
},setModalMask:function(){
if(!this.modalMaskNode){
return;
}
this._modalMask=new generic.layout._modalMask({domNode:this.modalMaskNode,paneParent:this.parentNode});
var s=this.domNode.style;
var nz=s.zIndex;
var _5c8=(this._startZ*10);
if(nz<_5c8||!nz||nz===""){
s.zIndex=_5c8;
}
this.modalMaskNode.style.zIndex=(s.zIndex-1);
this._modalMask.startup(this.preloadMode);
},bringToTop:function(){
var _5c9=dojo.filter(this._allFPs,function(i){
return i!==this;
},this);
_5c9.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_5c9.push(this);
dojo.forEach(_5c9,function(w,x){
w.domNode.style.zIndex=this._startZ+(x*2);
dojo.removeClass(w.domNode,"fixedPaneFocused");
},this);
dojo.addClass(this.domNode,"fixedPaneFocused");
},destroy:function(){
this._allFPs.splice(dojo.indexOf(this._allFPs,this),1);
this.inherited(arguments);
}});
dojo.declare("generic.layout._modalMask",null,{domNode:null,constructor:function(args){
this.domNode=args.domNode;
if(dojo.isIE&&(args.paneParent||args.paneParent!=null)){
this.paneParent=args.paneParent;
}
},getPageSize:function(){
var _5d0,_5d1;
if(window.innerHeight&&window.scrollMaxY){
_5d0=document.body.scrollWidth;
_5d1=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_5d0=document.body.scrollWidth;
_5d1=document.body.scrollHeight;
}else{
_5d0=document.body.offsetWidth;
_5d1=document.body.offsetHeight;
}
}
var _5d2,_5d3;
if(self.innerHeight){
_5d2=self.innerWidth;
_5d3=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_5d2=document.documentElement.clientWidth;
_5d3=document.documentElement.clientHeight;
}else{
if(document.body){
_5d2=document.body.clientWidth;
_5d3=document.body.clientHeight;
}
}
}
if(_5d1<_5d3){
pageHeight=_5d3;
}else{
pageHeight=_5d1;
}
if(_5d0<_5d2){
pageWidth=_5d2;
}else{
pageWidth=_5d0;
}
arrayPageSize=new Array(pageWidth,pageHeight,_5d2,_5d3);
return arrayPageSize;
},getPageScroll:function(){
var _5d4;
if(self.pageYOffset){
_5d4=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
_5d4=document.documentElement.scrollTop;
}else{
if(document.body){
_5d4=document.body.scrollTop;
}
}
}
arrayPageScroll=new Array("",_5d4);
return arrayPageScroll;
},startup:function(_5d5){
var s=this.domNode.style;
var _5d7=this.getPageSize();
if(dojo.isIE&&(this.paneParent||this.paneParent!=null)&&!this.domNode_IE){
this.domNode_IE=dojo.clone(this.domNode);
this.domNode.style.zIndex=0;
this.paneParent.style.zIndex=2;
this.paneParent.appendChild(this.domNode_IE);
var s_ie=this.domNode_IE.style;
s_ie.height=(_5d7[1]+"px");
if(!_5d5){
s_ie.display="block";
}
}
s.height=(_5d7[1]+"px");
if(!_5d5){
s.display="block";
}
},show:function(){
this.domNode.style.display="block";
if(this.domNode_IE){
this.domNode_IE.style.display="block";
}
},hide:function(){
this.domNode.style.display="none";
if(this.domNode_IE){
this.domNode_IE.style.display="none";
}
}});
}
if(!dojo._hasResource["generic.layout.IFramePane"]){
dojo._hasResource["generic.layout.IFramePane"]=true;
dojo.provide("generic.layout.IFramePane");
dojo.declare("generic.layout.IFramePane",generic.layout.FixedPane,{isLoaded:false,templateString:"<div id=\"${id}\">\n    <div dojoAttachPoint=\"canvas\">\n        <div dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\">\n        </div>\n    </div>\n</div>\n",iframeHref:"",constructor:function(){
this.modal=true;
this.modalMaskNode=dojo.byId("modal_mask");
},startup:function(){
this.inherited(arguments);
var _5d9="<iframe id=\""+this.id+"_iframe\" name=\""+this.id+"_iframe\" allowTransparency=\"true\" src=\""+this.iframeHref+"\" frameborder=0></iframe>";
this.setContent(_5d9);
},postCreate:function(){
this.inherited(arguments);
},hide:function(_5da){
var _5db=frames[this.id+"_iframe"];
if(this.reloadIFrame){
_5db.location.href=this.iframeHref;
}
this.inherited(arguments);
}});
dojo.provide("generic.layout.iFramePaneLink");
dojo.declare("generic.layout.iFramePaneLink",[dijit._Widget,dijit._Templated],{widgetsInTemplate:false,parentNode:null,linkId:"",iframeHref:"",position:{},size:{},displayText:"",popupClass:"popup",_enabled:true,templateString:"",templateString:"<a dojoAttachPoint=\"linkNode\" dojoAttachEvent=\"onclick:_onClick\" class=\"clickable\">${displayText}</a>\n",constructor:function(args){
if(args){
dojo.mixin(this,args);
}
this._init();
},_onClick:function(e){
if(!this._enabled){
return;
}
var _5de=this.iFramePane.id+"_iframe";
var self=this;
if(!this.iFramePane._started){
this.iFramePane.startup();
var h=(dojo.isIE==0?((self.size.height-45)+"px"):"100%");
dojo.style(_5de,{width:"100%",height:h});
dojo.addClass(dojo.byId(_5de),this.popupClass);
dojo.publish("/page/status/iFramePaneSize",[self.size]);
}else{
this.iFramePane.show();
}
},_init:function(){
if(this.size.width===undefined){
this.size.width=dijit.getViewport().w-100;
}
if(this.size.height===undefined){
this.size.height=dijit.getViewport().h-100;
}
if(this.position.left===undefined){
this.position.left=dijit.getViewport().w/2-(this.size.width/2);
if(this.position.left<0){
this.position.left=0;
}
}
if(this.position.top===undefined){
this.position.top=dijit.getViewport().h/2-(this.size.height/2);
if(this.position.top<0){
this.position.top=0;
}
}
if(this.parentNode===undefined){
this.parentNode=dojo.query("body")[0];
}
if(this.reloadIFrame===undefined){
this.reloadIFrame=false;
}
var self=this;
this.iFramePane=new generic.layout.IFramePaneStyled({id:self.id+"_pane",position:self.position,iframeHref:self.iframeHref,parentNode:self.parentNode,reloadIFrame:self.reloadIFrame,locusNode:self.parentNode});
},destroyRecursive:function(){
this.iFramePane.destroyRecursive();
this.inherited(arguments);
}});
dojo.provide("generic.layout.IFramePaneStyled");
dojo.declare("generic.layout.IFramePaneStyled",generic.layout.IFramePane,{templateString:"",postMixInProperties:function(){
this.inherited(arguments);
this.hideStyle={position:"absolute",top:"-9999px"};
},paneSizeHandler:function(size){
this.domNode.style.width=size.width+"px";
this.domNode.style.height=size.height+"px";
if(dojo.isIE>6||dojo.isIE==0){
this.domNode.style.position="fixed";
}
},postCreate:function(){
this.inherited(arguments);
dojo.style(this.domNode,this.hideStyle);
dojo.subscribe("/page/status/iFramePaneSize",this,"paneSizeHandler");
},_onCloseClick:function(e){
this.close();
}});
}
if(!dojo._hasResource["generic.menu"]){
dojo._hasResource["generic.menu"]=true;
dojo.provide("generic.menu");
dojo.declare("generic.menu",null,{targetId:"",menuId:"",timer:null,timerDuration:300,constructor:function(args){
this.menuId=args.menu;
var _5e5=dojo.byId(args.target);
var menu=dojo.byId(this.menuId);
if(menu&&_5e5){
this.handlers=[dojo.connect(_5e5,"onmouseover",this,"show"),dojo.connect(_5e5,"onmouseout",this,"startHide"),dojo.connect(menu,"onmouseover",this,"keepMenu"),dojo.connect(menu,"onmouseout",this,"startHide")];
}
},show:function(e){
this.keepMenu(e);
var menu=dojo.byId(this.menuId);
dojo.removeClass(menu,"hidden");
},startHide:function(e){
this.timer=setTimeout(dojo.hitch(this,this.hide),this.timerDuration);
dojo.stopEvent(e);
},keepMenu:function(e){
clearTimeout(this.timer);
dojo.stopEvent(e);
},hide:function(){
var menu=dojo.byId(this.menuId);
dojo.addClass(menu,"hidden");
}});
dojo.declare("generic.menuItem",null,{domNode:null,rolloverClass:"",constructor:function(args){
this.domNode=args.domNode;
this.rolloverClass=args.rolloverClass;
if(this.domNode){
this.handlers=[dojo.connect(this.domNode,"onmouseover",this,"_onMouseOver"),dojo.connect(this.domNode,"onmouseout",this,"_onMouseOut")];
}
},_onMouseOver:function(e){
dojo.addClass(this.domNode,this.rolloverClass);
},_onMouseOut:function(e){
dojo.removeClass(this.domNode,this.rolloverClass);
}});
}
if(!dojo._hasResource["generic.progress"]){
dojo._hasResource["generic.progress"]=true;
dojo.provide("generic.progress");
dojo.declare("generic.progress",null,{progressNode:null,containerNode:null,constructor:function(args){
this.containerNode=dojo.byId(args.containerId);
this.progressNode=dojo.byId(args.progressId);
if(args.matchDimensions){
this._setDimensions();
}
},start:function(){
if(!this.progressNode||!this.containerNode){
return;
}
this.containerNode.style.display="none";
this.progressNode.style.display="block";
},clear:function(){
if(!this.progressNode||!this.containerNode){
return;
}
this.containerNode.style.display="block";
this.progressNode.style.display="none";
},onComplete:function(){
this.clear();
},onException:function(){
this.clear();
},onFailure:function(){
this.clear();
},onTimeout:function(){
this.clear();
},_setDimensions:function(){
var _5f0=dojo.coords(this.containerNode);
this.progressNode.style.width=_5f0.w+"px";
this.progressNode.style.height=_5f0.h+"px";
}});
dojo.declare("generic.progressOverlay",generic.progress,{offset:{w:0,h:0},constructor:function(args){
this.containerNode=dojo.byId(args.containerId);
this.progressNode=dojo.byId(args.progressId);
if(args.offset){
this.offset=args.offset;
}
var _5f2=dojo.coords(this.containerNode);
this.progressNode.style.width=(_5f2.w+this.offset.w)+"px";
this.progressNode.style.height=(_5f2.h+this.offset.h)+"px";
},start:function(){
if(!this.progressNode){
return;
}
this.progressNode.style.display="block";
},clear:function(){
if(!this.progressNode){
return;
}
this.progressNode.style.display="none";
}});
}
if(!dojo._hasResource["site.cardSet"]){
dojo._hasResource["site.cardSet"]=true;
dojo.provide("site.cardSet");
dojo.declare("site.cardSet",null,{name:"",productMax:1,containerId:"",activeCard:null,_allCards:[],handlers:[],btnPrevId:null,btnNextId:null,counterCurrentId:null,counterTotalId:null,_previousIsEnabled:true,_nextIsEnabled:true,constructor:function(args){
this.name=args.name;
this.containerId=args.container;
this.btnPrevId=args.buttonPrevious;
this.btnNextId=args.buttonNext;
this.counterCurrentId=args.counterCurrent;
this.counterTotalId=args.counterTotal;
this.productMax=args.productMax;
this._allCards=args.cards;
},startup:function(){
this._getCard(0);
this._initClickThru();
},_getCard:function(_5f4){
var card=this._allCards[_5f4];
var _5f6=null;
var self=this;
if(!card.isLoaded){
if(this.activeCard!=null){
this.hideCard(this.activeCard);
}
dojo.xhrGet({url:card.uri,handleAs:"text",timeout:10000,load:function(_5f8,_5f9){
self.onCardLoad(_5f4,_5f8,_5f9);
},error:function(_5fa,_5fb){
console.error("HTTP status code: ",_5fb.xhr.status);
return _5fa;
}});
}else{
this.showCard(_5f4);
}
},onCardLoad:function(_5fc,_5fd,_5fe){
var card=this._allCards[_5fc];
var _600=dojo.doc.createElement("div");
_600.innerHTML=_5fd;
dojo.byId(this.containerId).appendChild(_600);
this._allCards[_5fc]._card=new site.card({id:card.id,parentSet:this.name,products:card.products,productMax:this.productMax});
this._allCards[_5fc]._nodeId=this.name+"-"+this._allCards[_5fc].id;
this._initRollovers(this._allCards[_5fc]._nodeId);
this._allCards[_5fc].isLoaded=true;
this.showCard(_5fc);
},_initRollovers:function(_601){
dojo.query("img.rollover",_601).forEach(function(img){
var _603=new generic.rollover(img);
});
},_initClickThru:function(){
var _604=dojo.byId(this.btnNextId);
var _605=dojo.byId(this.btnPrevId);
if(_605&&_604){
this.imgNext=new generic.img(_604,["dis","on"]);
this.imgPrev=new generic.img(_605,["dis","on"]);
this.handlers=[dojo.connect(_605,"onclick",this,"onClickPrevious"),dojo.connect(_604,"onclick",this,"onClickNext")];
}
dojo.byId(this.counterTotalId).innerHTML=this._allCards.length;
this._setButtonStates();
this._updateCounter();
},onClickPrevious:function(){
this._getCard(this._getPrevCardNum(this.activeCard));
},onClickNext:function(){
this._getCard(this._getNextCardNum(this.activeCard));
},_getNextCardNum:function(_606){
if(_606<(this._allCards.length-1)){
return _606+1;
}else{
return 0;
}
},_getPrevCardNum:function(_607){
if(_607>0){
return _607-1;
}else{
return this._allCards.length-1;
}
},showCard:function(_608){
if(this.activeCard!=null){
this.hideCard(this.activeCard);
}
var node=dojo.byId(this._allCards[_608]._nodeId);
node.style.display="inline";
this.activeCard=_608;
this._setButtonStates();
this._updateCounter();
},hideCard:function(_60a){
var node=dojo.byId(this._allCards[_60a]._nodeId);
node.style.display="none";
},_updateCounter:function(){
dojo.byId(this.counterCurrentId).innerHTML=(this.activeCard+1);
},_setButtonStates:function(){
this._enableButton(this.btnPrevId,this.imgPrev);
this._enableButton(this.btnNextId,this.imgNext);
},_enableButton:function(_60c,img){
var btn=dojo.byId(_60c);
dojo.addClass(btn,"clickable");
img.changeSrc("on");
},_disableButton:function(_60f,img){
var btn=dojo.byId(_60f);
dojo.removeClass(btn,"clickable");
img.changeSrc("dis");
}});
dojo.declare("site.card",null,{id:"",parentSet:"",productMax:null,constructor:function(args){
this.id=args.id;
this.parentSet=args.parentSet;
this.productMax=args.productMax;
this.initProducts(args.products);
},initProducts:function(_613){
var cId=this.id;
var pset=this.parentSet;
var max=(_613.length<this.productMax?_613.length:this.productMax);
for(var i=0;i<max;i++){
var prod=_613[i];
var _619=new site.cardProduct({prodData:prod,containerId:pset+"_"+cId+"_sku-"+prod.sku_id,btnCart:pset+"_"+cId+"_buy-"+prod.sku_id,cartConfirm:pset+"_cart_confirm-"+cId+"_sku-"+prod.sku_id,progress:pset+"_"+cId+"_cart_progress-"+prod.sku_id});
}
}});
dojo.declare("site.cardProduct",null,{prodData:"",prodContainerId:"",handlers:[],_addToCartIsEnabled:true,cartConfirm:"",constructor:function(args){
this.prodData=args.prodData;
this.prodContainerId=args.containerId;
this.cartConfirm=args.cartConfirm;
var _61b=dojo.byId(args.btnCart);
if(_61b){
this.handlers.push(dojo.connect(_61b,"onclick",this,"addToCart"));
}
this.progress=new generic.progress({containerId:args.btnCart,progressId:args.progress});
},addToCart:function(){
if(this._addToCartIsEnabled){
var self=this;
var cart=global.cartHandler;
var skus=[];
this.progress.start();
this._addToCartIsEnabled=false;
skus[0]=this.prodData.path;
var _61f=function(){
cart.showConfirm(self.cartConfirm,self.prodContainerId);
self.progress.clear();
self._addToCartIsEnabled=true;
};
var _620=function(err){
self.progress.clear();
self._addToCartIsEnabled=true;
};
cart.add(skus,_61f,_620);
}
},_fixHeight:function(){
var _622=dojo.byId(this.containerId).parentNode;
var h=_622.offsetHeight;
_622.style.height=h+"px";
var diff=(_622.offsetHeight-h);
_622.style.height=(h-diff)+"px";
}});
}
if(!dojo._hasResource["site.cart"]){
dojo._hasResource["site.cart"]=true;
dojo.provide("site.cart");
dojo.declare("site.cart",null,{constructor:function(){
},callRemote:function(_625,args,_627,_628){
var self=this;
var _62a=new generic.jsonrpc();
var d=_62a.callRemote(_625,args);
d.addCallback(function(_62c){
_627(_62c);
});
d.addErrback(function(err){
_628(err);
self.errHandler(err,_62a);
});
},add:function(skus,_62f,_630){
this.alter({action:"add",skus:skus,callback:_62f,errback:_630});
},remove:function(skus,_632,_633,type){
this.alter({action:"remove",skus:skus,callback:_632,errback:_633,type:type});
},qty:function(skus,qtys,_637,_638){
this.alter({action:"qty",skus:skus,qtys:qtys,callback:_637,errback:_638});
},alter:function(args){
var self=this;
var _63b=(args.type?args.type:"sku");
var _63c=[];
if(_63b==="sku"){
dojo.forEach(args.skus,function(_63d,ix){
_63c[ix]={action:args.action,cart:"checkout",type:"sku",path:_63d};
if(args.action==="qty"&&args.qtys){
_63c[ix].qty=args.qtys[_63d];
}
});
}else{
var _63f;
if(_63b==="giftcard"){
_63f="giftcard_id";
}
dojo.forEach(args.skus,function(item,idx){
_63c[idx]={action:args.action,cart:"checkout",type:_63b};
_63c[idx][_63f]=item;
});
}
var _642=[{"actions":_63c}];
var _643=function(_644){
args.callback();
self.updateStatus();
};
var _645=args.errback;
this.callRemote("Cart.alterCart",_642,_643,_645);
},getContents:function(args){
var self=this;
},getCount:function(_648){
var _649=dojo.cookie("page_data");
var _64a=0;
var str=num="";
try{
str=_649.split("cart.order.tqty")[1];
num=str.split("&")[1];
if(parseInt(num)){
_64a=num;
}
}
catch(err){
}
this.itemCount=_64a;
_648(_64a);
var _64c=function(){
};
console.log("cookie = "+_649+" itemCount = "+this.itemCount);
},errHandler:function(err,_64e){
console.log("err = "+err);
},showConfirm:function(_64f,_650){
this.replaceContent(_64f,_650);
var self=this;
var _652=function(){
clearTimeout(_653);
self.replaceContent(_650,_64f);
};
var _653=setTimeout(_652,4000);
},replaceContent:function(_654,_655){
var _656=dojo.byId(_654);
var _657=dojo.byId(_655);
_657.style.display="none";
_656.style.display="block";
},showError:function(err,_659){
var _65a=dojo.byId(_659);
_65a.innerHTML="Error: "+err;
},disableButton:function(btn){
var node=dojo.byId(btn);
dojo.removeClass(node,"clickable");
},enableButton:function(btn){
var node=dojo.byId(btn);
dojo.addClass(node,"clickable");
},updateStatus:function(){
cartStatus.update();
}});
cartStatus={globalCountId:"",popupContentId:"",globalCartLinkId:"",cssClassHasItems:"",cssClassNoItems:"",popupUri:"",popupItemsId:"",popupCountId:"",scroller:null,isLoaded:false,isLoading:false,count:0,cartHasChanged:false,init:function(args){
this.globalCountId=args.globalCount;
this.globalCartLinkId=args.globalCartLink;
this.cssClassHasItems=args.cssClassHasItems;
this.cssClassNoItems=args.cssClassNoItems;
this.update();
this.popupItemsIdIsVisible=false;
this._initPopup(args.popup);
},update:function(){
this.cartHasChanged=true;
var self=this;
var cart=global.cartHandler;
var _662=function(_663){
self.count=_663;
self.displayCount(self.globalCountId);
self.updateCountDisplayCssClass(self.globalCartLinkId);
};
cart.getCount(_662);
},_initPopup:function(args){
this.menu=new generic.menu({target:args.target,menu:args.container});
this.popupCountId=args.count;
var _665=dojo.byId(args.target);
if(_665){
this.handlers=[dojo.connect(_665,"onmouseover",this,"_getPopupContent")];
}
},_getPopupContent:function(){
var cart=global.cartHandler;
if((this.cartHasChanged||!this.isLoaded)&&!this.isLoading){
this.displayCount(this.popupCountId,true);
}
},onPopupLoad:function(_667,_668){
this.cartHasChanged=false;
this.isLoading=false;
var node=dojo.byId(this.popupContentId);
node.innerHTML=_667;
this.isLoaded=true;
this.displayCount(this.popupCountId,true);
if(this.count>0){
if(!this.popupItemsIdIsVisible){
dojo.byId(this.popupItemsId).style.visibility="visible";
this.popupItemsIdIsVisible=true;
}
this._initScrolling();
}
},_initScrolling:function(){
this.popupScroll=new site.jumpScroll({name:this.scroller.name,axis:this.scroller.axis,itemClass:this.scroller.itemClass,viewItems:this.scroller.viewItems,imgStates:this.scroller.imgStates});
},displayCount:function(id,_66b){
var _66c="";
if(_66b){
_66c=" item";
if(this.count!=1){
_66c=_66c+"s";
}
}
var node=dojo.byId(id);
if(node){
node.innerHTML=(this.count+_66c);
}
},updateCountDisplayCssClass:function(id){
var node=dojo.byId(id);
if(node){
if(this.count>0){
node.className=this.cssClassHasItems;
}else{
node.className=this.cssClassNoItems;
}
}
}};
}
if(!dojo._hasResource["site.checkoutItemHandler"]){
dojo._hasResource["site.checkoutItemHandler"]=true;
dojo.provide("site.checkoutItemHandler");
dojo.declare("site.checkoutItemHandler",null,{handlers:[],itemType:"sku",selectQtyId:"",skuPath:"",message:"",onAlterCallback:null,_removeIsEnabled:true,_updateQtyIsEnabled:true,constructor:function(args){
this.selectQtyId=args.selectQty;
this.skuPath=args.skuPath;
this.itemType=(args.itemType?args.itemType:this.itemType);
this.onAlterCallback=args.onAlterCallback;
this.message=args.message;
var _671=dojo.byId(args.buttonRemove);
var _672=dojo.byId(this.selectQtyId);
var _673=dojo.byId(args.statusIndicator);
if(_671){
this.handlers.push([dojo.connect(_671,"onclick",this,"_remove")]);
this.removeProgress=new generic.progress({containerId:args.buttonRemove,progressId:args.removeProgressIndicator});
}
if(_672){
var _674=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_674){
var self=this;
_674.onChange=function(){
self._updateQty();
};
}else{
this.handlers.push([dojo.connect(_672,"onchange",this,"_updateQty")]);
}
this.qtyProgress=new generic.progress({containerId:args.selectQtyContainer,progressId:args.qtyProgressIndicator});
}
if(_673&&this.message.length>1){
_673.innerHTML=this.message;
_673.style.display="block";
}
},_remove:function(){
if(this._removeIsEnabled){
console.log("removing sku "+this.skuPath);
var self=this;
var cart=global.cartHandler;
var skus=[];
this.removeProgress.start();
this._remov2eIsEnabled=false;
skus[0]=this.skuPath;
var _679=function(){
self.onAlterCallback("remove");
};
var _67a=function(err){
self.removeProgress.clear();
self._removeIsEnabled=true;
};
cart.remove(skus,_679,_67a,self.itemType);
}
},_updateQty:function(){
if(this._updateQtyIsEnabled){
var self=this;
var cart=global.cartHandler;
var skus=[];
var qtys={};
this.qtyProgress.start();
this._updateQtyIsEnabled=false;
skus[0]=this.skuPath;
var qty=this._getQty();
qtys[this.skuPath]=qty;
var _681=function(){
self.onAlterCallback("qty");
};
var _682=function(err){
self.qtyProgress.clear();
self._updateQtyIsEnabled=true;
};
cart.qty(skus,qtys,_681,_682);
}
},_getQty:function(){
var qty="";
var _685=(typeof (dijit.byId)==="function"?dijit.byId(this.selectQtyId):null);
if(_685){
qty=_685.value;
}else{
qty=_685.value;
}
return qty;
}});
}
if(!dojo._hasResource["site.globalnav"]){
dojo._hasResource["site.globalnav"]=true;
dojo.provide("site.globalnav");
dojo.declare("site.globalnav",null,{section:null,subSection:null,handlers:[],constructor:function(args){
this.section=args.section;
this.subSection=args.subSection;
},startup:function(){
if(this.section){
this.setSectionState();
}
if(this.subSection){
this.setSubSectionState();
}
},setSectionState:function(){
var _687=dojo.byId("gnav_"+this.section);
var _688=dojo.byId("subnav_"+this.section);
if(_687){
dojo.removeClass(_687,"rollover");
var img=new generic.img(_687,["sel"]);
img.changeSrc("sel");
}
if(_688){
var _68a=dojo.byId("gnav_circle_container");
dojo.addClass(_68a,"gnav_"+this.section);
var _68b=dojo.byId("subnav");
dojo.removeClass(_68b,"hidden");
dojo.removeClass(_688,"hidden");
this.handlers.push(dojo.connect(_68a,"onclick",this,"goToSection"));
}
},setSubSectionState:function(){
var _68c=dojo.byId("subnav_"+this.subSection);
if(!_68c){
return;
}
dojo.removeClass(_68c,"rollover");
var img=new generic.img(_68c,["sel"]);
img.changeSrc("sel");
},goToSection:function(){
location.href="/"+this.section+"/index.tmpl";
}});
}
if(!dojo._hasResource["dijit.layout.StackContainer"]){
dojo._hasResource["dijit.layout.StackContainer"]=true;
dojo.provide("dijit.layout.StackContainer");
dojo.declare("dijit.layout.StackContainer",dijit.layout._LayoutWidget,{doLayout:true,_started:false,postCreate:function(){
dijit.setWaiRole((this.containerNode||this.domNode),"tabpanel");
this.connect(this.domNode,"onkeypress",this._onKeyPress);
},startup:function(){
if(this._started){
return;
}
var _68e=this.getChildren();
dojo.forEach(_68e,this._setupChild,this);
dojo.some(_68e,function(_68f){
if(_68f.selected){
this.selectedChildWidget=_68f;
}
return _68f.selected;
},this);
var _690=this.selectedChildWidget;
if(!_690&&_68e[0]){
_690=this.selectedChildWidget=_68e[0];
_690.selected=true;
}
if(_690){
this._showChild(_690);
}
dojo.publish(this.id+"-startup",[{children:_68e,selected:_690}]);
this.inherited(arguments);
},_setupChild:function(page){
page.domNode.style.display="none";
page.domNode.style.position="relative";
return page;
},addChild:function(_692,_693){
dijit._Container.prototype.addChild.apply(this,arguments);
_692=this._setupChild(_692);
if(this._started){
this.layout();
dojo.publish(this.id+"-addChild",[_692,_693]);
if(!this.selectedChildWidget){
this.selectChild(_692);
}
}
},removeChild:function(page){
dijit._Container.prototype.removeChild.apply(this,arguments);
if(this._beingDestroyed){
return;
}
if(this._started){
dojo.publish(this.id+"-removeChild",[page]);
this.layout();
}
if(this.selectedChildWidget===page){
this.selectedChildWidget=undefined;
if(this._started){
var _695=this.getChildren();
if(_695.length){
this.selectChild(_695[0]);
}
}
}
},selectChild:function(page){
page=dijit.byId(page);
if(this.selectedChildWidget!=page){
this._transition(page,this.selectedChildWidget);
this.selectedChildWidget=page;
dojo.publish(this.id+"-selectChild",[page]);
}
},_transition:function(_697,_698){
if(_698){
this._hideChild(_698);
}
this._showChild(_697);
if(this.doLayout&&_697.resize){
_697.resize(this._containerContentBox||this._contentBox);
}
},_adjacent:function(_699){
var _69a=this.getChildren();
var _69b=dojo.indexOf(_69a,this.selectedChildWidget);
_69b+=_699?1:_69a.length-1;
return _69a[_69b%_69a.length];
},forward:function(){
this.selectChild(this._adjacent(true));
},back:function(){
this.selectChild(this._adjacent(false));
},_onKeyPress:function(e){
dojo.publish(this.id+"-containerKeyPress",[{e:e,page:this}]);
},layout:function(){
if(this.doLayout&&this.selectedChildWidget&&this.selectedChildWidget.resize){
this.selectedChildWidget.resize(this._contentBox);
}
},_showChild:function(page){
var _69e=this.getChildren();
page.isFirstChild=(page==_69e[0]);
page.isLastChild=(page==_69e[_69e.length-1]);
page.selected=true;
page.domNode.style.display="";
if(page._loadCheck){
page._loadCheck();
}
if(page.onShow){
page.onShow();
}
},_hideChild:function(page){
page.selected=false;
page.domNode.style.display="none";
if(page.onHide){
page.onHide();
}
},closeChild:function(page){
var _6a1=page.onClose(this,page);
if(_6a1){
this.removeChild(page);
page.destroyRecursive();
}
},destroy:function(){
this._beingDestroyed=true;
this.inherited(arguments);
}});
dojo.declare("dijit.layout.StackController",[dijit._Widget,dijit._Templated,dijit._Container],{templateString:"<span wairole='tablist' dojoAttachEvent='onkeypress' class='dijitStackController'></span>",containerId:"",buttonWidget:"dijit.layout._StackButton",postCreate:function(){
dijit.setWaiRole(this.domNode,"tablist");
this.pane2button={};
this.pane2menu={};
this._subscriptions=[dojo.subscribe(this.containerId+"-startup",this,"onStartup"),dojo.subscribe(this.containerId+"-addChild",this,"onAddChild"),dojo.subscribe(this.containerId+"-removeChild",this,"onRemoveChild"),dojo.subscribe(this.containerId+"-selectChild",this,"onSelectChild"),dojo.subscribe(this.containerId+"-containerKeyPress",this,"onContainerKeyPress")];
},onStartup:function(info){
dojo.forEach(info.children,this.onAddChild,this);
this.onSelectChild(info.selected);
},destroy:function(){
for(var pane in this.pane2button){
this.onRemoveChild(pane);
}
dojo.forEach(this._subscriptions,dojo.unsubscribe);
this.inherited(arguments);
},onAddChild:function(page,_6a5){
var _6a6=dojo.doc.createElement("span");
this.domNode.appendChild(_6a6);
var cls=dojo.getObject(this.buttonWidget);
var _6a8=new cls({label:page.title,closeButton:page.closable},_6a6);
this.addChild(_6a8,_6a5);
this.pane2button[page]=_6a8;
page.controlButton=_6a8;
dojo.connect(_6a8,"onClick",dojo.hitch(this,"onButtonClick",page));
if(page.closable){
dojo.connect(_6a8,"onClickCloseButton",dojo.hitch(this,"onCloseButtonClick",page));
var _6a9=dojo.i18n.getLocalization("dijit","common");
var _6aa=new dijit.Menu({targetNodeIds:[_6a8.id],id:_6a8.id+"_Menu"});
var _6ab=new dijit.MenuItem({label:_6a9.itemClose});
dojo.connect(_6ab,"onClick",dojo.hitch(this,"onCloseButtonClick",page));
_6aa.addChild(_6ab);
this.pane2menu[page]=_6aa;
}
if(!this._currentChild){
_6a8.focusNode.setAttribute("tabIndex","0");
this._currentChild=page;
}
if(!this.isLeftToRight()&&dojo.isIE&&this._rectifyRtlTabList){
this._rectifyRtlTabList();
}
},onRemoveChild:function(page){
if(this._currentChild===page){
this._currentChild=null;
}
var _6ad=this.pane2button[page];
var menu=this.pane2menu[page];
if(menu){
menu.destroy();
}
if(_6ad){
_6ad.destroy();
}
this.pane2button[page]=null;
},onSelectChild:function(page){
if(!page){
return;
}
if(this._currentChild){
var _6b0=this.pane2button[this._currentChild];
_6b0.setAttribute("checked",false);
_6b0.focusNode.setAttribute("tabIndex","-1");
}
var _6b1=this.pane2button[page];
_6b1.setAttribute("checked",true);
this._currentChild=page;
_6b1.focusNode.setAttribute("tabIndex","0");
var _6b2=dijit.byId(this.containerId);
dijit.setWaiState(_6b2.containerNode||_6b2.domNode,"labelledby",_6b1.id);
},onButtonClick:function(page){
var _6b4=dijit.byId(this.containerId);
_6b4.selectChild(page);
},onCloseButtonClick:function(page){
var _6b6=dijit.byId(this.containerId);
_6b6.closeChild(page);
var b=this.pane2button[this._currentChild];
if(b){
dijit.focus(b.focusNode||b.domNode);
}
},adjacent:function(_6b8){
if(!this.isLeftToRight()&&(!this.tabPosition||/top|bottom/.test(this.tabPosition))){
_6b8=!_6b8;
}
var _6b9=this.getChildren();
var _6ba=dojo.indexOf(_6b9,this.pane2button[this._currentChild]);
var _6bb=_6b8?1:_6b9.length-1;
return _6b9[(_6ba+_6bb)%_6b9.length];
},onkeypress:function(e){
if(this.disabled||e.altKey){
return;
}
var _6bd=null;
if(e.ctrlKey||!e._djpage){
var k=dojo.keys;
switch(e.keyCode){
case k.LEFT_ARROW:
case k.UP_ARROW:
if(!e._djpage){
_6bd=false;
}
break;
case k.PAGE_UP:
if(e.ctrlKey){
_6bd=false;
}
break;
case k.RIGHT_ARROW:
case k.DOWN_ARROW:
if(!e._djpage){
_6bd=true;
}
break;
case k.PAGE_DOWN:
if(e.ctrlKey){
_6bd=true;
}
break;
case k.DELETE:
if(this._currentChild.closable){
this.onCloseButtonClick(this._currentChild);
}
dojo.stopEvent(e);
break;
default:
if(e.ctrlKey){
if(e.keyCode==k.TAB){
this.adjacent(!e.shiftKey).onClick();
dojo.stopEvent(e);
}else{
if(e.keyChar=="w"){
if(this._currentChild.closable){
this.onCloseButtonClick(this._currentChild);
}
dojo.stopEvent(e);
}
}
}
}
if(_6bd!==null){
this.adjacent(_6bd).onClick();
dojo.stopEvent(e);
}
}
},onContainerKeyPress:function(info){
info.e._djpage=info.page;
this.onkeypress(info.e);
}});
dojo.declare("dijit.layout._StackButton",dijit.form.ToggleButton,{tabIndex:"-1",postCreate:function(evt){
dijit.setWaiRole((this.focusNode||this.domNode),"tab");
this.inherited(arguments);
},onClick:function(evt){
dijit.focus(this.focusNode);
},onClickCloseButton:function(evt){
evt.stopPropagation();
}});
dojo.extend(dijit._Widget,{title:"",selected:false,closable:false,onClose:function(){
return true;
}});
}
if(!dojo._hasResource["site.layout.MediaBoxContainer"]){
dojo._hasResource["site.layout.MediaBoxContainer"]=true;
dojo.provide("site.layout.MediaBoxContainer");
dojo.declare("site.layout.MediaBoxContainer",[dijit.layout.StackContainer,dijit._Templated],{doLayout:false,tabPosition:"top",templateString:"",templateString:"<div id=\"video_container\">\n\t<div id=\"video_frame\">\n\t\t<div id=\"video_tabs\" dojoAttachPoint=\"tablistNode\"></div>\n\t\t<div id=\"video_box\" dojoAttachPoint=\"containerNode\"></div>\n\t</div>\n\t<div id=\"bg_fish\" dojoAttachPoint=\"footerNode\">\n\t\t<img width=\"100%\" src=\"${footerImage}\" alt=\"\" />\n\t</div>\n</div>\n",footerImage:"/images/common/blank.gif",_controllerWidget:"site.layout.MediaBoxController",constructor:function(){
this.footerImage=dojo.getObject("page_data.catalog.spp.product.image_footer_decoration")||this.footerImage;
},postCreate:function(){
this.inherited("postCreate",arguments);
var _6c3=dojo.getObject(this._controllerWidget);
this.tablist=new _6c3({id:"video_tabs",doLayout:this.doLayout,containerId:this.id},this.tablistNode);
},startup:function(){
if(this._started){
return;
}
this.tablist.startup();
this.inherited(arguments);
},layout:function(){
if(!this.doLayout){
return;
}
var _6c4=[{domNode:this.tablist.domNode,layoutAlign:"top"},{domNode:this.containerNode,layoutAlign:"client"}];
dijit.layout.layoutChildren(this.domNode,this._contentBox,_6c4);
this._containerContentBox=dijit.layout.marginBox2contentBox(this.containerNode,_6c4[1]);
if(this.selectedChildWidget){
this._showChild(this.selectedChildWidget);
if(this.doLayout&&this.selectedChildWidget.resize){
this.selectedChildWidget.resize(this._containerContentBox);
}
}
},destroy:function(){
if(this.tablist){
this.tablist.destroy();
}
}});
dojo.declare("site.layout.MediaBoxController",dijit.layout.StackController,{templateString:"<div dojoAttachEvent='onkeypress:onkeypress'></div>",tabPosition:"top",doLayout:false,buttonWidget:"site.layout._MediaBoxTab",postMixinProperties:function(){
this.inherited(arguments);
},onButtonClick:function(page){
this.inherited(arguments);
},onSelectChild:function(page){
this.inherited(arguments);
}});
dojo.declare("site.layout._MediaBoxTab",dijit.layout._StackButton,{baseClass:"",templateString:"",templateString:"<div id=\"${label}\" class=\"mediabox_tab\" dojoAttachEvent=\"onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse\">\n\t<div dojoAttachPoint=\"containerNode,focusNode\"></div>\n</div>\n",postCreate:function(){
this.inherited(arguments);
dojo.setSelectable(this.containerNode,false);
}});
dojo.extend(dijit._Widget,{footerImage:""});
}
if(!dojo._hasResource["site.layout.MediaBoxSlideShow"]){
dojo._hasResource["site.layout.MediaBoxSlideShow"]=true;
dojo.provide("site.layout.MediaBoxSlideShow");
dojo.declare("site.layout.MediaBoxSlideShow",[dijit._Widget,dijit._Templated],{imageWidth:350,imageHeight:245,img_base:"",theme:"light_theme",counterTemplate:"<span class=\"counterText\">( ${current} of ${total} )</span>",hasNav:true,images:[],pageSize:25,slideInterval:0,loop:false,autoLoad:true,autoStart:false,imageStore:null,imageUrlAttr:"src",imageLinkAttr:"link",imageTitleAttr:"name",templateString:"",templateString:"<div dojoAttachPoint=\"containerNode\" class=\"mediabox_slideshow ${theme}\">\n\t<div dojoAttachPoint=\"leftNode\" class=\"ss_side_container left\" dojoAttachEvent=\"onclick: _handleClick\">\n\t\t<span dojoAttachPoint=\"navPrev\" class=\"ss_nav prev\"></span>\n\t</div>\n\n\t<div dojoAttachPoint=\"centerNode\" class=\"ss_center_container\">\n\t\t<div dojoAttachPoint=\"imageWrapper\" class=\"ss_current_img\"></div>\n\t\t<div dojoAttachPoint=\"counterNode\" class=\"ss_counter\">\n\t\t\t( <span dojoAttachPoint=\"cntCurrent\">0</span> of <span dojoAttachPoint=\"cntTotal\">0</span> )\n\t\t</div>\n\t</div>\n\n\t<div dojoAttachPoint=\"rightNode\" class=\"ss_side_container right\" dojoAttachEvent=\"onclick: _handleClick\">\n\t\t<span dojoAttachPoint=\"navNext\" class=\"ss_nav next\"></span>\n\t</div>\n\n\t<div dojoAttachPoint=\"hiddenNode\" class=\"ss_hidden\"></div>\n</div>\n",extrasDir:"/product/images/product/extras/",_loadingImage:null,_currentImage:null,_tmpImagePath:"/images/products/mb_temp_img.jpg",_imageCounter:0,_request:null,postCreate:function(){
this.inherited(arguments);
var self=this;
var img=dojo.doc.createElement("img");
img.setAttribute("width",this.imageWidth);
img.setAttribute("height",this.imageHeight);
img.setAttribute("src",this._tmpImagePath);
img.setAttribute("alt","loading ...");
this.imageWrapper.appendChild(img);
this._loadingImage=this._currentImage=img;
this._loadImage(0,function(){
self.showImage(0);
});
},setDataStore:function(data,_6ca,keys){
this.reset();
var self=this;
var _6cd=new dojo.data.ItemFileReadStore({data:data});
this._request={query:{},start:_6ca.start||0,count:_6ca.count||self.pageSize,onBegin:function(_6ce,req){
self.maxImages=_6ce;
}};
if(_6ca.query){
dojo.mixin(this._request.query,_6ca.query);
}
if(keys){
dojo.forEach(["imageUrlAttr","imageTitleAttr","imageLinkAttr"],function(attr){
if(keys[attr]){
this[attr]=keys[attr];
}
},this);
}
var _6d1=function(_6d2){
self.showImage(0);
self._request.onComplete=null;
if(self.autoStart){
self.toggleSlideShow();
}
};
this.imageStore=_6cd;
this._request.onComplete=_6d1;
this._request.start=0;
this.imageStore.fetch(this._request);
},reset:function(){
while(this.imageWrapper.firstChild){
this.imageWrapper.removeChild(this.imageWrapper.firstChild);
}
this.imageWrapper.appendChild(this._loadingImage);
while(this.hiddenNode.firstChild){
this.hiddenNode.removeChild(this.hiddenNode.firstChild);
}
dojo.forEach(this.images,function(img){
if(img&&img.parentNode){
img.parentNode.removeChild(img);
}
});
this.images=[];
this.isInitialized=false;
this._imageCounter=0;
},toggleSlideShow:function(){
},getShowTopic:function(){
return (this.widgetId||this.id)+"/imageShow";
},getLoadTopic:function(){
return (this.widgetId||this.id)+"/imageLoad";
},showNext:function(_6d4,_6d5){
if(this.imageIndex+1>this.maxImages){
if(this.loop||_6d5){
this.imageIndex=-1;
}else{
return false;
}
}
var self=this;
this.showImage(this.imageIndex+1,function(){
});
return true;
},showImage:function(_6d7,_6d8){
var self=this;
var _6da=this.imageWrapper.getElementsByTagName("div");
this.imageIndex=_6d7;
var _6db=function(){
if(self.images[_6d7]){
while(self.imageWrapper.firstChild){
self.imageWrapper.removeChild(self.imageWrapper.firstChild);
}
self.images[_6d7].style.opacity=0;
self.imageWrapper.appendChild(self.images[_6d7]);
self._currentImage=self.images[_6d7]._img;
var _6dc=function(a,b,c){
var img=self.images[_6d7].firstChild;
if(img.tagName.toLowerCase()!="img"){
img=img.firstChild;
}
var _6e1=img.getAttribute("title");
self._navConf();
dojo.publish(self.getShowTopic(),[{index:_6d7,title:_6e1,url:img.getAttribute("src")}]);
if(_6d8){
_6d8(a,b,c);
}
self._setCounter();
};
dojo.fadeIn({node:self.images[_6d7],duration:200,onEnd:_6dc}).play();
}else{
self._loadImage(_6d7,function(){
dojo.publish(self.getLoadTopic(),[_6d7]);
self.showImage(_6d7,_6d8);
});
}
};
if(_6da&&_6da.length>0){
dojo.fadeOut({node:_6da[0],duration:200,onEnd:function(){
self.hiddenNode.appendChild(_6da[0]);
_6db();
}}).play();
}else{
_6db();
}
},_loadNext:function(){
if(!this.autoload){
return;
}
while(this.images.length>=this._imageCounter&&this.images[this._imageCounter]){
this._imageCounter++;
}
this._loadImage(this._imageCounter);
},_loadImage:function(_6e2,_6e3){
if(this.images[_6e2]||!this._request){
return;
}
var _6e4=_6e2-(_6e2%this.pageSize);
this._request.start=_6e4;
this._request.onComplete=function(_6e5){
var diff=_6e2-_6e4;
if(_6e5&&_6e5.length>diff){
_6e7(_6e5[diff]);
}else{
console.log("Empty set of items returned");
}
};
var self=this;
var _6e7=function(item){
var file=self.imageStore.getValue(item,self.imageUrlAttr);
var link=self.imageStore.getValue(item,self.imageLinkAttr);
var _6ec=self.imageStore.getValue(item,self.imageTitleAttr);
if(file.lastIndexOf(".gif")==-1&&file.lastIndexOf(".jpg")==-1){
file=file+".gif";
}
file=file.replace(/\s+/g,"");
var url=self.img_base+file;
console.log("img url: "+url);
var img=dojo.doc.createElement("img");
var div=dojo.doc.createElement("div");
div._img=img;
if(!link||this._noLink){
div.appendChild(img);
}else{
var a=dojo.doc.createElement("a");
dojo.attr(a,{href:link});
div.appendChild(a);
a.appendChild(img);
}
div.setAttribute("id",self.id+"_imagediv"+_6e2);
dojo.connect(img,"onload",function(){
div.setAttribute("width",self.imageWidth);
div.setAttribute("height",self.imageHeight);
dojo.publish(self.getLoadTopic(),[_6e2]);
self._loadNext();
if(_6e3){
_6e3();
}
});
self.hiddenNode.appendChild(div);
self.images[_6e2]=div;
img.setAttribute("src",url);
if(_6ec){
img.setAttribute("title",_6ec);
}
};
this.imageStore.fetch(this._request);
},_navConf:function(){
if(!this.loop){
var _6f1=(this.imageIndex<1)?"addClass":"removeClass";
var _6f2=(this.imageIndex+1>=this.maxImages)?"addClass":"removeClass";
dojo[_6f1](this.navPrev,"ss_nav_hidden");
dojo[_6f2](this.navNext,"ss_nav_hidden");
}
},_setCounter:function(){
if(this.maxImages>1){
this.counterNode.innerHTML=dojo.string.substitute(this.counterTemplate,{current:1+this.imageIndex,total:this.maxImages});
}else{
this.counterNode.innerHTML="";
}
},_prev:function(){
if(this.imageIndex<1){
return;
}
this.showImage(this.imageIndex-1);
},_next:function(){
this.showNext();
},_handleClick:function(e){
switch(e.target){
case this.navPrev:
this._prev();
break;
case this.navNext:
this._next();
break;
}
}});
}
if(!dojo._hasResource["site.layout.RecipeCardSet"]){
dojo._hasResource["site.layout.RecipeCardSet"]=true;
dojo.provide("site.layout.RecipeCardSet");
dojo.declare("site.layout.RecipeCardSet",site.cardSet,{constructor:function(args){
this.name="recipe";
this.btnId="btn_open_recipe";
this.popupProgress=new generic.progress({containerId:this.btnId,progressId:"recipe_open_progress"});
},onCardLoad:function(_6f5,_6f6,_6f7){
var card=this._allCards[_6f5];
newNode=dojo.doc.createElement("div");
newNode.innerHTML=_6f6;
dojo.byId(this.containerId).appendChild(newNode);
var _6f9=this._allCards[_6f5].products;
this._allCards[_6f5]._card=new site.layout.RecipeCard({id:card.id,parentSet:this.name,cardNum:_6f5,popupUrl:card.popup_uri,products:_6f9,productMax:this.productMax,popupProgress:this.popupProgress});
this._allCards[_6f5]._nodeId="recipe_card-"+this._allCards[_6f5].id;
this._allCards[_6f5].isLoaded=true;
this.showCard(_6f5);
if(_6f5==0){
this._initButton();
}
},_initButton:function(){
var _6fa=dojo.byId(this.btnId);
if(_6fa){
this.handlers=[dojo.connect(_6fa,"onclick",this,"_openPopup")];
}
},_openPopup:function(){
this._allCards[this.activeCard]._card.openPopup();
}});
dojo.declare("site.layout.RecipeCard",null,{id:"",parentSet:"",popup:{},products:[],productMax:null,popupProgress:null,constructor:function(args){
this.id=args.id;
this.parentSet=args.parentSet;
this.popupUrl=args.popupUrl;
this.products=args.products;
this.productMax=args.productMax;
this.popupProgress=args.popupProgress;
},getPopup:function(_6fc){
this.popup=new site.layout.RecipePopup({cardId:this.id,parentSet:this.parentSet,popupUrl:this.popupUrl,products:this.products,preloadMode:_6fc,productMax:this.productMax,popupProgress:this.popupProgress});
},openPopup:function(){
if(!this.popup.isLoaded){
this.getPopup(false);
}else{
this.popup.show();
}
}});
dojo.declare("site.layout.RecipePopup",generic.layout.FixedPane,{isLoaded:false,templateString:"<div class=\"recipe_popup_container\">\n    <div class=\"recipe_popup\"><div class=\"recipe_frame\">\n            <div class=\"btn_recipe_close\" dojoAttachPoint=\"closeNode\" dojoAttachEvent=\"onclick: close\"><img src=\"/images/common/btn_x.png\" alt=\"\" /></div>\n            <div class=\"recipe_content\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\">\n \n \t\t\t</div>  \n    </div></div>\n</div>\n",products:[],_rCPs:[],parentSet:"",productMax:null,_addToCartAllIsEnabled:true,btnBuyAllId:"",popupProgress:null,constructor:function(){
this.position={top:150,left:40};
this.modal=true;
this.parentNode=dojo.byId("main_container");
this.modalMaskNode=dojo.byId("modal_mask");
this.loadingMessage="<div class=\"recipe_loading_msg\">LOADING...</div>";
},postCreate:function(){
this.inherited(arguments);
this.href=this.popupUrl;
this.btnBuyAllId=this.parentSet+"_buyall_"+this.cardId;
this.popupProgress.start();
this.startup();
},show:function(){
this.inherited("show",arguments);
},_onLoad:function(){
this.inherited(arguments);
this.isLoaded=true;
this.popupProgress.clear();
var _6fd=dojo.byId(this.btnBuyAllId);
if(_6fd){
this.handlers.push(dojo.connect(_6fd,"onclick",this,"_addToCartAll"));
}
this._rCPs=this._initProducts();
this._initUtilityButtons();
},_initProducts:function(){
var ps=[];
var cId=this.cardId;
var pset=this.parentSet;
var max=(this.products.length<this.productMax?this.products.length:this.productMax);
for(var i=0;i<max;i++){
var prod=this.products[i];
ps[i]=new site.cardProduct({prodData:prod,cardId:cId,containerId:pset+"_"+cId+"_sku-"+prod.sku_id,btnCart:pset+"_"+cId+"_buy-"+prod.sku_id,cartConfirm:pset+"_cart_confirm-"+cId+"_sku-"+prod.sku_id,progress:pset+"_"+cId+"_cart_progress-"+prod.sku_id});
}
dojo.query("img.rollover").forEach(function(img){
var _705=new generic.rollover(img);
});
return ps;
},_initUtilityButtons:function(){
var _706=new generic.popup({activator:"btn_print-"+this.cardId,url:"/print/look_detail_print.tmpl?CATEGORY_ID="+this.cardId,height:600,width:640,name:"PrintProduct"});
var _707=new generic.popup({activator:"btn_send_to_friend-"+this.cardId,url:"/email/email_form.tmpl?CATEGORY_ID="+this.cardId,height:400,width:375,name:"PrintProduct"});
},_addToCartAll:function(e){
if(this._addToCartAllIsEnabled){
var skus=[];
var cart=global.cartHandler;
var _70b="recipe_popup_cartall_confirm-"+this.cardId;
var _70c="recipe_prod_all-"+this.cardId;
var _70d="recipe_cartall_progress-"+this.cardId;
var _70e=new generic.progress({containerId:_70c,progressId:_70d});
_70e.start();
this._addToCartAllIsEnabled=false;
cart.disableButton(this.btnBuyAllId);
dojo.forEach(this.products,function(prod,ix){
skus[ix]=prod.path;
});
var _711=function(){
dojo.byId(_70d).style.display="none";
cart.showConfirm(_70b,_70c);
};
var _712=function(err){
_70e.clear();
cart.enableButton(this.btnBuyAllId);
self._addToCartAllIsEnabled=true;
};
cart.add(skus,_711,_712);
}
}});
}
if(!dojo._hasResource["site.textTab"]){
dojo._hasResource["site.textTab"]=true;
dojo.provide("site.textTab");
dojo.declare("site.textTab",null,{tabs:[],panes:[],activeTabClass:null,_handlers:[],activeTabId:null,constructor:function(args){
this.tabs=args.tabs;
this.panes=args.panes;
this.activeTabClass=args.activeTabClass;
var _715=this;
dojo.forEach(this.tabs,function(tab,ix){
if(dojo.hasClass(tab,_715.activeTabClass)){
_715.activeTabId=tab.id;
dojo.style(tab,{"cursor":"default"});
}else{
dojo.style(tab,{"cursor":"pointer"});
}
_715._handlers[ix]=dojo.connect(tab,"onclick",_715,"changeTab");
});
},changeTab:function(e){
var _719=e.target.id;
if(_719!=this.activeTabId){
var _71a=_719+"_pane";
var _71b=this.activeTabId;
var _71c=this.activeTabClass;
dojo.forEach(this.tabs,function(tab){
if(tab.id==_71b){
dojo.removeClass(tab,_71c);
dojo.style(tab,{"cursor":"pointer"});
}else{
if(tab.id==_719){
dojo.addClass(tab,_71c);
dojo.style(tab,{"cursor":"default"});
}
}
});
dojo.forEach(this.panes,function(pane){
if(pane.id==_71b+"_pane"){
dojo.addClass(pane,"hidden");
}else{
if(pane.id==_71a){
dojo.removeClass(pane,"hidden");
}
}
});
this.activeTabId=_719;
}
}});
}
dojo.i18n._preloadLocalizations("site.nls.bumble_layer",["xx","ROOT","en","en-us"]);
