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

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

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

dojo.provide("start.start");
if(!dojo._hasResource["start.io"]){
dojo._hasResource["start.io"]=true;
dojo.provide("start.io");
(function(){
var io=start.io;
var _2="";
io.token=function(t){
if(t===undefined){
return _2;
}else{
_2=t;
}
};
function _4(_5,_6,_7){
var _8;
_6=_6||{};
if(_7&&_7==="pyapp"){
_8="/p/";
}else{
_8="/b/";
}
if(_2){
_6.token=_2;
}
var _9;
if(_6.doXML){
_9="xml";
}else{
if(_6.doJS){
_9="javascript";
}else{
_9="json";
}
}
return {url:_8+_5,handleAs:_9,content:_6,preventCache:true,timeout:60000};
};
var _a=[];
function _b(_c,_d,_e,_f,_10){
_a.push({def:_c,how:_d,name:_e,args:_f,xhrArgs:_10,start:new Date()});
_c.addBoth(function(o){
var i=0;
var r=null;
for(;i<_a.length;i++){
if(_a[i].def===_c){
r=_a[i];
break;
}
}
if(i<_a.length){
_a.splice(i,1);
}
return o;
});
if(_a.length>2){
}
};
io.cancelInflight=function(){
dojo.forEach(_a,function(o){
o.def.cancel();
});
};
io.visitInflight=function(v){
dojo.forEach(_a,v);
};
io.inflight=function(){
return _a.length;
};
function _go(w,_18,_19,_1a,_1b){
var xa=_4(_19,_1a,_18);
if(_1b){
dojo._mixin(xa,_1b);
}
var d=dojo[w](xa);
return d;
};
io.get=dojo.partial(_go,"xhrGet","cgi");
io.pGet=dojo.partial(_go,"xhrGet","pyapp");
io.post=dojo.partial(_go,"xhrPost","cgi");
io.pPost=dojo.partial(_go,"xhrPost","pyapp");
})();
}
if(!dojo._hasResource["start.translate"]){
dojo._hasResource["start.translate"]=true;
dojo.provide("start.translate");
start.translate=(function(){
var _1e={};
var _1f={};
return {require:function(_20){
if(_20 in _1f){
return null;
}
var _21=dojo.config["langRev"]||"000";
var _22="startpage/"+_20.replace(".","/");
var def=start.io.get("translate",{path:_22,r:_21},{sync:true});
def.addCallback(this,function(obj){
if(obj.hdf&&dojo.isArray(obj.hdf)){
dojo.forEach(obj.hdf,function(n){
dojo.mixin(_1e,n);
});
_1f[_20]=true;
}
});
def.addErrback(function(err){
throw new Error("Error trying to load "+_20);
});
return def;
},set:function(key,val){
return dojo.setObject(key,val,_1e);
},get:function(key,map){
var v=dojo.getObject(key,false,_1e)||"";
if(dojo.isString(v)&&map){
return dojo.string.substitute(v,map);
}else{
return v;
}
},pluralize:function(key,val,map){
var k=key+(val===1?"Singular":"Plural");
return this.get(k,map);
},wrap:function(_30){
var f=function(key,map){
return start.translate.get(_30+"."+key,map);
};
f.pluralize=function(key,val,map){
return start.translate.pluralize(_30+"."+key,val,map);
};
return f;
}};
})();
}
if(!dojo._hasResource["dojo.date.stamp"]){
dojo._hasResource["dojo.date.stamp"]=true;
dojo.provide("dojo.date.stamp");
dojo.date.stamp.fromISOString=function(_37,_38){
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 _39=dojo.date.stamp._isoRegExp.exec(_37);
var _3a=null;
if(_39){
_39.shift();
if(_39[1]){
_39[1]--;
}
if(_39[6]){
_39[6]*=1000;
}
if(_38){
_38=new Date(_38);
dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_3b){
return _38["get"+_3b]();
}).forEach(function(_3c,_3d){
if(_39[_3d]===undefined){
_39[_3d]=_3c;
}
});
}
_3a=new Date(_39[0]||1970,_39[1]||0,_39[2]||1,_39[3]||0,_39[4]||0,_39[5]||0,_39[6]||0);
var _3e=0;
var _3f=_39[7]&&_39[7].charAt(0);
if(_3f!="Z"){
_3e=((_39[8]||0)*60)+(Number(_39[9])||0);
if(_3f!="-"){
_3e*=-1;
}
}
if(_3f){
_3e-=_3a.getTimezoneOffset();
}
if(_3e){
_3a.setTime(_3a.getTime()+_3e*60000);
}
}
return _3a;
};
dojo.date.stamp.toISOString=function(_40,_41){
var _=function(n){
return (n<10)?"0"+n:n;
};
_41=_41||{};
var _44=[];
var _45=_41.zulu?"getUTC":"get";
var _46="";
if(_41.selector!="time"){
var _47=_40[_45+"FullYear"]();
_46=["0000".substr((_47+"").length)+_47,_(_40[_45+"Month"]()+1),_(_40[_45+"Date"]())].join("-");
}
_44.push(_46);
if(_41.selector!="date"){
var _48=[_(_40[_45+"Hours"]()),_(_40[_45+"Minutes"]()),_(_40[_45+"Seconds"]())].join(":");
var _49=_40[_45+"Milliseconds"]();
if(_41.milliseconds){
_48+="."+(_49<100?"0":"")+_(_49);
}
if(_41.zulu){
_48+="Z";
}else{
if(_41.selector!="time"){
var _4a=_40.getTimezoneOffset();
var _4b=Math.abs(_4a);
_48+=(_4a>0?"-":"+")+_(Math.floor(_4b/60))+":"+_(_4b%60);
}
}
_44.push(_48);
}
return _44.join("T");
};
}
if(!dojo._hasResource["dojo.parser"]){
dojo._hasResource["dojo.parser"]=true;
dojo.provide("dojo.parser");
dojo.parser=new function(){
var d=dojo;
var _4d=d._scopeName+"Type";
var qry="["+_4d+"]";
var _4f=0,_50={};
var _51=function(_52,_53){
var nso=_53||_50;
if(dojo.isIE){
var cn=_52["__dojoNameCache"];
if(cn&&nso[cn]===_52){
return cn;
}
}
var _56;
do{
_56="__"+_4f++;
}while(_56 in nso);
nso[_56]=_52;
return _56;
};
function _57(_58){
if(d.isString(_58)){
return "string";
}
if(typeof _58=="number"){
return "number";
}
if(typeof _58=="boolean"){
return "boolean";
}
if(d.isFunction(_58)){
return "function";
}
if(d.isArray(_58)){
return "array";
}
if(_58 instanceof Date){
return "date";
}
if(_58 instanceof d._Url){
return "url";
}
return "object";
};
function _59(_5a,_5b){
switch(_5b){
case "string":
return _5a;
case "number":
return _5a.length?Number(_5a):NaN;
case "boolean":
return typeof _5a=="boolean"?_5a:!(_5a.toLowerCase()=="false");
case "function":
if(d.isFunction(_5a)){
_5a=_5a.toString();
_5a=d.trim(_5a.substring(_5a.indexOf("{")+1,_5a.length-1));
}
try{
if(_5a.search(/[^\w\.]+/i)!=-1){
_5a=_51(new Function(_5a),this);
}
return d.getObject(_5a,false);
}
catch(e){
return new Function();
}
case "array":
return _5a?_5a.split(/\s*,\s*/):[];
case "date":
switch(_5a){
case "":
return new Date("");
case "now":
return new Date();
default:
return d.date.stamp.fromISOString(_5a);
}
case "url":
return d.baseUrl+_5a;
default:
return d.fromJson(_5a);
}
};
var _5c={};
function _5d(_5e){
if(!_5c[_5e]){
var cls=d.getObject(_5e);
if(!d.isFunction(cls)){
throw new Error("Could not load class '"+_5e+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");
}
var _60=cls.prototype;
var _61={},_62={};
for(var _63 in _60){
if(_63.charAt(0)=="_"){
continue;
}
if(_63 in _62){
continue;
}
var _64=_60[_63];
_61[_63]=_57(_64);
}
_5c[_5e]={cls:cls,params:_61};
}
return _5c[_5e];
};
this._functionFromScript=function(_65){
var _66="";
var _67="";
var _68=_65.getAttribute("args");
if(_68){
d.forEach(_68.split(/\s*,\s*/),function(_69,idx){
_66+="var "+_69+" = arguments["+idx+"]; ";
});
}
var _6b=_65.getAttribute("with");
if(_6b&&_6b.length){
d.forEach(_6b.split(/\s*,\s*/),function(_6c){
_66+="with("+_6c+"){";
_67+="}";
});
}
return new Function(_66+_65.innerHTML+_67);
};
this.instantiate=function(_6d,_6e){
var _6f=[];
_6e=_6e||{};
d.forEach(_6d,function(_70){
if(!_70){
return;
}
var _71=_4d in _6e?_6e[_4d]:_70.getAttribute(_4d);
if(!_71||!_71.length){
return;
}
var _72=_5d(_71),_73=_72.cls,ps=_73._noScript||_73.prototype._noScript;
var _75={},_76=_70.attributes;
for(var _77 in _72.params){
var _78=_77 in _6e?{value:_6e[_77],specified:true}:_76.getNamedItem(_77);
if(!_78||(!_78.specified&&(!dojo.isIE||_77.toLowerCase()!="value"))){
continue;
}
var _79=_78.value;
switch(_77){
case "class":
_79="className" in _6e?_6e.className:_70.className;
break;
case "style":
_79="style" in _6e?_6e.style:(_70.style&&_70.style.cssText);
}
var _7a=_72.params[_77];
if(typeof _79=="string"){
_75[_77]=_59(_79,_7a);
}else{
_75[_77]=_79;
}
}
if(!ps){
var _7b=[],_7c=[];
d.query("> script[type^='dojo/']",_70).orphan().forEach(function(_7d){
var _7e=_7d.getAttribute("event"),_71=_7d.getAttribute("type"),nf=d.parser._functionFromScript(_7d);
if(_7e){
if(_71=="dojo/connect"){
_7b.push({event:_7e,func:nf});
}else{
_75[_7e]=nf;
}
}else{
_7c.push(nf);
}
});
}
var _80=_73["markupFactory"];
if(!_80&&_73["prototype"]){
_80=_73.prototype["markupFactory"];
}
var _81=_80?_80(_75,_70,_73):new _73(_75,_70);
_6f.push(_81);
var _82=_70.getAttribute("jsId");
if(_82){
d.setObject(_82,_81);
}
if(!ps){
d.forEach(_7b,function(_83){
d.connect(_81,_83.event,null,_83.func);
});
d.forEach(_7c,function(_84){
_84.call(_81);
});
}
});
d.forEach(_6f,function(_85){
if(_85&&_85.startup&&!_85._started&&(!_85.getParent||!_85.getParent())){
_85.startup();
}
});
return _6f;
};
this.parse=function(_86){
var _87=d.query(qry,_86);
var _88=this.instantiate(_87);
return _88;
};
}();
(function(){
var _89=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,_89);
}else{
dojo._loaders.unshift(_89);
}
})();
}
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 _8a=dojo.doc;
if(_8a.selection){
var s=_8a.selection;
if(s.type=="Text"){
return !s.createRange().htmlText.length;
}else{
return !s.createRange().length;
}
}else{
var _8c=dojo.global;
var _8d=_8c.getSelection();
if(dojo.isString(_8d)){
return !_8d;
}else{
return !_8d||_8d.isCollapsed||!_8d.toString();
}
}
},getBookmark:function(){
var _8e,_8f=dojo.doc.selection;
if(_8f){
var _90=_8f.createRange();
if(_8f.type.toUpperCase()=="CONTROL"){
if(_90.length){
_8e=[];
var i=0,len=_90.length;
while(i<len){
_8e.push(_90.item(i++));
}
}else{
_8e=null;
}
}else{
_8e=_90.getBookmark();
}
}else{
if(window.getSelection){
_8f=dojo.global.getSelection();
if(_8f){
_90=_8f.getRangeAt(0);
_8e=_90.cloneRange();
}
}else{
console.warn("No idea how to store the current selection for this browser!");
}
}
return _8e;
},moveToBookmark:function(_93){
var _94=dojo.doc;
if(_94.selection){
var _95;
if(dojo.isArray(_93)){
_95=_94.body.createControlRange();
dojo.forEach(_93,function(n){
_95.addElement(n);
});
}else{
_95=_94.selection.createRange();
_95.moveToBookmark(_93);
}
_95.select();
}else{
var _97=dojo.global.getSelection&&dojo.global.getSelection();
if(_97&&_97.removeAllRanges){
_97.removeAllRanges();
_97.addRange(_93);
}else{
console.warn("No idea how to restore selection for this browser!");
}
}
},getFocus:function(_98,_99){
return {node:_98&&dojo.isDescendant(dijit._curFocus,_98.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_99||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_99||dojo.global,dijit.getBookmark):null,openedForWindow:_99};
},focus:function(_9a){
if(!_9a){
return;
}
var _9b="node" in _9a?_9a.node:_9a,_9c=_9a.bookmark,_9d=_9a.openedForWindow;
if(_9b){
var _9e=(_9b.tagName.toLowerCase()=="iframe")?_9b.contentWindow:_9b;
if(_9e&&_9e.focus){
try{
_9e.focus();
}
catch(e){
}
}
dijit._onFocusNode(_9b);
}
if(_9c&&dojo.withGlobal(_9d||dojo.global,dijit.isCollapsed)){
if(_9d){
_9d.focus();
}
try{
dojo.withGlobal(_9d||dojo.global,dijit.moveToBookmark,null,[_9c]);
}
catch(e){
}
}
},_activeStack:[],registerIframe:function(_9f){
dijit.registerWin(_9f.contentWindow,_9f);
},registerWin:function(_a0,_a1){
dojo.connect(_a0.document,"onmousedown",function(evt){
dijit._justMouseDowned=true;
setTimeout(function(){
dijit._justMouseDowned=false;
},0);
dijit._onTouchNode(_a1||evt.target||evt.srcElement);
});
var doc=_a0.document;
if(doc){
if(dojo.isIE){
doc.attachEvent("onactivate",function(evt){
if(evt.srcElement.tagName.toLowerCase()!="#document"){
dijit._onFocusNode(_a1||evt.srcElement);
}
});
doc.attachEvent("ondeactivate",function(evt){
dijit._onBlurNode(_a1||evt.srcElement);
});
}else{
doc.addEventListener("focus",function(evt){
dijit._onFocusNode(_a1||evt.target);
},true);
doc.addEventListener("blur",function(evt){
dijit._onBlurNode(_a1||evt.target);
},true);
}
}
doc=null;
},_onBlurNode:function(_a8){
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(_a9){
if(dijit._clearActiveWidgetsTimer){
clearTimeout(dijit._clearActiveWidgetsTimer);
delete dijit._clearActiveWidgetsTimer;
}
var _aa=[];
try{
while(_a9){
if(_a9.dijitPopupParent){
_a9=dijit.byId(_a9.dijitPopupParent).domNode;
}else{
if(_a9.tagName&&_a9.tagName.toLowerCase()=="body"){
if(_a9===dojo.body()){
break;
}
_a9=dijit.getDocumentWindow(_a9.ownerDocument).frameElement;
}else{
var id=_a9.getAttribute&&_a9.getAttribute("widgetId");
if(id){
_aa.unshift(id);
}
_a9=_a9.parentNode;
}
}
}
}
catch(e){
}
dijit._setStack(_aa);
},_onFocusNode:function(_ac){
if(!_ac){
return;
}
if(_ac.nodeType==9){
return;
}
dijit._onTouchNode(_ac);
if(_ac==dijit._curFocus){
return;
}
if(dijit._curFocus){
dijit._prevFocus=dijit._curFocus;
}
dijit._curFocus=_ac;
dojo.publish("focusNode",[_ac]);
},_setStack:function(_ad){
var _ae=dijit._activeStack;
dijit._activeStack=_ad;
for(var _af=0;_af<Math.min(_ae.length,_ad.length);_af++){
if(_ae[_af]!=_ad[_af]){
break;
}
}
for(var i=_ae.length-1;i>=_af;i--){
var _b1=dijit.byId(_ae[i]);
if(_b1){
_b1._focused=false;
_b1._hasBeenBlurred=true;
if(_b1._onBlur){
_b1._onBlur();
}
if(_b1._setStateClass){
_b1._setStateClass();
}
dojo.publish("widgetBlur",[_b1]);
}
}
for(i=_af;i<_ad.length;i++){
_b1=dijit.byId(_ad[i]);
if(_b1){
_b1._focused=true;
if(_b1._onFocus){
_b1._onFocus();
}
if(_b1._setStateClass){
_b1._setStateClass();
}
dojo.publish("widgetFocus",[_b1]);
}
}
}});
dojo.addOnLoad(function(){
dijit.registerWin(window);
});
}
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(_b2){
if(this._hash[_b2.id]){
throw new Error("Tried to register widget with id=="+_b2.id+" but that id is already registered");
}
this._hash[_b2.id]=_b2;
},remove:function(id){
delete this._hash[id];
},forEach:function(_b4){
for(var id in this._hash){
_b4(this._hash[id]);
}
},filter:function(_b6){
var res=new dijit.WidgetSet();
this.forEach(function(_b8){
if(_b6(_b8)){
res.add(_b8);
}
});
return res;
},byId:function(id){
return this._hash[id];
},byClass:function(cls){
return this.filter(function(_bb){
return _bb.declaredClass==cls;
});
}});
dijit.registry=new dijit.WidgetSet();
dijit._widgetTypeCtr={};
dijit.getUniqueId=function(_bc){
var id;
do{
id=_bc+"_"+(_bc in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_bc]:dijit._widgetTypeCtr[_bc]=0);
}while(dijit.byId(id));
return id;
};
dijit.findWidgets=function(_be){
var _bf=[];
function _c0(_c1){
var _c2=dojo.isIE?_c1.children:_c1.childNodes,i=0,_c4;
while(_c4=_c2[i++]){
if(_c4.nodeType!=1){
continue;
}
var _c5=_c4.getAttribute("widgetId");
if(_c5){
var _c6=dijit.byId(_c5);
_bf.push(_c6);
}else{
_c0(_c4);
}
}
};
_c0(_be);
return _bf;
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
dojo.forEach(dijit.findWidgets(dojo.body()),function(_c7){
if(_c7.destroyRecursive){
_c7.destroyRecursive();
}else{
if(_c7.destroy){
_c7.destroy();
}
}
});
});
}
dijit.byId=function(id){
return (dojo.isString(id))?dijit.registry.byId(id):id;
};
dijit.byNode=function(_c9){
return dijit.registry.byId(_c9.getAttribute("widgetId"));
};
dijit.getEnclosingWidget=function(_ca){
while(_ca){
if(_ca.getAttribute&&_ca.getAttribute("widgetId")){
return dijit.registry.byId(_ca.getAttribute("widgetId"));
}
_ca=_ca.parentNode;
}
return null;
};
dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};
dijit._isElementShown=function(_cb){
var _cc=dojo.style(_cb);
return (_cc.visibility!="hidden")&&(_cc.visibility!="collapsed")&&(_cc.display!="none")&&(dojo.attr(_cb,"type")!="hidden");
};
dijit.isTabNavigable=function(_cd){
if(dojo.hasAttr(_cd,"disabled")){
return false;
}
var _ce=dojo.hasAttr(_cd,"tabindex");
var _cf=dojo.attr(_cd,"tabindex");
if(_ce&&_cf>=0){
return true;
}
var _d0=_cd.nodeName.toLowerCase();
if(((_d0=="a"&&dojo.hasAttr(_cd,"href"))||dijit._tabElements[_d0])&&(!_ce||_cf>=0)){
return true;
}
return false;
};
dijit._getTabNavigable=function(_d1){
var _d2,_d3,_d4,_d5,_d6,_d7;
var _d8=function(_d9){
dojo.query("> *",_d9).forEach(function(_da){
var _db=dijit._isElementShown(_da);
if(_db&&dijit.isTabNavigable(_da)){
var _dc=dojo.attr(_da,"tabindex");
if(!dojo.hasAttr(_da,"tabindex")||_dc==0){
if(!_d2){
_d2=_da;
}
_d3=_da;
}else{
if(_dc>0){
if(!_d4||_dc<_d5){
_d5=_dc;
_d4=_da;
}
if(!_d6||_dc>=_d7){
_d7=_dc;
_d6=_da;
}
}
}
}
if(_db&&_da.nodeName.toUpperCase()!="SELECT"){
_d8(_da);
}
});
};
if(dijit._isElementShown(_d1)){
_d8(_d1);
}
return {first:_d2,last:_d3,lowest:_d4,highest:_d6};
};
dijit.getFirstInTabbingOrder=function(_dd){
var _de=dijit._getTabNavigable(dojo.byId(_dd));
return _de.lowest?_de.lowest:_de.first;
};
dijit.getLastInTabbingOrder=function(_df){
var _e0=dijit._getTabNavigable(dojo.byId(_df));
return _e0.last?_e0.last:_e0.highest;
};
dijit.defaultDuration=dojo.config["defaultDuration"]||200;
}
if(!dojo._hasResource["dojo.AdapterRegistry"]){
dojo._hasResource["dojo.AdapterRegistry"]=true;
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_e1){
this.pairs=[];
this.returnWrappers=_e1||false;
};
dojo.extend(dojo.AdapterRegistry,{register:function(_e2,_e3,_e4,_e5,_e6){
this.pairs[((_e6)?"unshift":"push")]([_e2,_e3,_e4,_e5]);
},match:function(){
for(var i=0;i<this.pairs.length;i++){
var _e8=this.pairs[i];
if(_e8[1].apply(this,arguments)){
if((_e8[3])||(this.returnWrappers)){
return _e8[2];
}else{
return _e8[2].apply(this,arguments);
}
}
}
throw new Error("No match found");
},unregister:function(_e9){
for(var i=0;i<this.pairs.length;i++){
var _eb=this.pairs[i];
if(_eb[0]==_e9){
this.pairs.splice(i,1);
return true;
}
}
return false;
}});
}
if(!dojo._hasResource["dijit._base.place"]){
dojo._hasResource["dijit._base.place"]=true;
dojo.provide("dijit._base.place");
dijit.getViewport=function(){
var _ec=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;
var _ed=dojo._docScroll();
return {w:_ec.clientWidth,h:_ec.clientHeight,l:_ed.x,t:_ed.y};
};
dijit.placeOnScreen=function(_ee,pos,_f0,_f1){
var _f2=dojo.map(_f0,function(_f3){
var c={corner:_f3,pos:{x:pos.x,y:pos.y}};
if(_f1){
c.pos.x+=_f3.charAt(1)=="L"?_f1.x:-_f1.x;
c.pos.y+=_f3.charAt(0)=="T"?_f1.y:-_f1.y;
}
return c;
});
return dijit._place(_ee,_f2);
};
dijit._place=function(_f5,_f6,_f7){
var _f8=dijit.getViewport();
if(!_f5.parentNode||String(_f5.parentNode.tagName).toLowerCase()!="body"){
dojo.body().appendChild(_f5);
}
var _f9=null;
dojo.some(_f6,function(_fa){
var _fb=_fa.corner;
var pos=_fa.pos;
if(_f7){
_f7(_f5,_fa.aroundCorner,_fb);
}
var _fd=_f5.style;
var _fe=_fd.display;
var _ff=_fd.visibility;
_fd.visibility="hidden";
_fd.display="";
var mb=dojo.marginBox(_f5);
_fd.display=_fe;
_fd.visibility=_ff;
var _101=(_fb.charAt(1)=="L"?pos.x:Math.max(_f8.l,pos.x-mb.w)),_102=(_fb.charAt(0)=="T"?pos.y:Math.max(_f8.t,pos.y-mb.h)),endX=(_fb.charAt(1)=="L"?Math.min(_f8.l+_f8.w,_101+mb.w):pos.x),endY=(_fb.charAt(0)=="T"?Math.min(_f8.t+_f8.h,_102+mb.h):pos.y),_105=endX-_101,_106=endY-_102,_107=(mb.w-_105)+(mb.h-_106);
if(_f9==null||_107<_f9.overflow){
_f9={corner:_fb,aroundCorner:_fa.aroundCorner,x:_101,y:_102,w:_105,h:_106,overflow:_107};
}
return !_107;
});
_f5.style.left=_f9.x+"px";
_f5.style.top=_f9.y+"px";
if(_f9.overflow&&_f7){
_f7(_f5,_f9.aroundCorner,_f9.corner);
}
return _f9;
};
dijit.placeOnScreenAroundNode=function(node,_109,_10a,_10b){
_109=dojo.byId(_109);
var _10c=_109.style.display;
_109.style.display="";
var _10d=_109.offsetWidth;
var _10e=_109.offsetHeight;
var _10f=dojo.coords(_109,true);
_109.style.display=_10c;
return dijit._placeOnScreenAroundRect(node,_10f.x,_10f.y,_10d,_10e,_10a,_10b);
};
dijit.placeOnScreenAroundRectangle=function(node,_111,_112,_113){
return dijit._placeOnScreenAroundRect(node,_111.x,_111.y,_111.width,_111.height,_112,_113);
};
dijit._placeOnScreenAroundRect=function(node,x,y,_117,_118,_119,_11a){
var _11b=[];
for(var _11c in _119){
_11b.push({aroundCorner:_11c,corner:_119[_11c],pos:{x:x+(_11c.charAt(1)=="L"?0:_117),y:y+(_11c.charAt(0)=="T"?0:_118)}});
}
return dijit._place(node,_11b,_11a);
};
dijit.placementRegistry=new dojo.AdapterRegistry();
dijit.placementRegistry.register("node",function(n,x){
return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";
},dijit.placeOnScreenAroundNode);
dijit.placementRegistry.register("rect",function(n,x){
return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;
},dijit.placeOnScreenAroundRectangle);
dijit.placeOnScreenAroundElement=function(node,_122,_123,_124){
return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);
};
}
if(!dojo._hasResource["dijit._base.window"]){
dojo._hasResource["dijit._base.window"]=true;
dojo.provide("dijit._base.window");
dijit.getDocumentWindow=function(doc){
if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
var win=doc._parentWindow;
doc._parentWindow=null;
return win;
}
return doc._parentWindow||doc.parentWindow||doc.defaultView;
};
}
if(!dojo._hasResource["dijit._base.popup"]){
dojo._hasResource["dijit._base.popup"]=true;
dojo.provide("dijit._base.popup");
dijit.popup=new function(){
var _127=[],_128=1000,_129=1;
this.prepare=function(node){
var s=node.style;
s.visibility="hidden";
s.position="absolute";
s.top="-9999px";
if(s.display=="none"){
s.display="";
}
dojo.body().appendChild(node);
};
this.open=function(args){
var _12d=args.popup,_12e=args.orient||{"BL":"TL","TL":"BL"},_12f=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_129++);
var _131=dojo.create("div",{id:id,"class":"dijitPopup",style:{zIndex:_128+_127.length,visibility:"hidden"}},dojo.body());
dijit.setWaiRole(_131,"presentation");
_131.style.left=_131.style.top="0px";
if(args.parent){
_131.dijitPopupParent=args.parent.id;
}
var s=_12d.domNode.style;
s.display="";
s.visibility="";
s.position="";
s.top="0px";
_131.appendChild(_12d.domNode);
var _133=new dijit.BackgroundIframe(_131);
var best=_12f?dijit.placeOnScreenAroundElement(_131,_12f,_12e,_12d.orient?dojo.hitch(_12d,"orient"):null):dijit.placeOnScreen(_131,args,_12e=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);
_131.style.visibility="visible";
var _135=[];
var _136=function(){
for(var pi=_127.length-1;pi>0&&_127[pi].parent===_127[pi-1].widget;pi--){
}
return _127[pi];
};
_135.push(dojo.connect(_131,"onkeypress",this,function(evt){
if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){
dojo.stopEvent(evt);
args.onCancel();
}else{
if(evt.charOrCode===dojo.keys.TAB){
dojo.stopEvent(evt);
var _139=_136();
if(_139&&_139.onCancel){
_139.onCancel();
}
}
}
}));
if(_12d.onCancel){
_135.push(dojo.connect(_12d,"onCancel",null,args.onCancel));
}
_135.push(dojo.connect(_12d,_12d.onExecute?"onExecute":"onChange",null,function(){
var _13a=_136();
if(_13a&&_13a.onExecute){
_13a.onExecute();
}
}));
_127.push({wrapper:_131,iframe:_133,widget:_12d,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_135});
if(_12d.onOpen){
_12d.onOpen(best);
}
return best;
};
this.close=function(_13b){
while(dojo.some(_127,function(elem){
return elem.widget==_13b;
})){
var top=_127.pop(),_13e=top.wrapper,_13f=top.iframe,_140=top.widget,_141=top.onClose;
if(_140.onClose){
_140.onClose();
}
dojo.forEach(top.handlers,dojo.disconnect);
if(!_140||!_140.domNode){
return;
}
this.prepare(_140.domNode);
_13f.destroy();
dojo.destroy(_13e);
if(_141){
_141();
}
}
};
}();
dijit._frames=new function(){
var _142=[];
this.pop=function(){
var _143;
if(_142.length){
_143=_142.pop();
_143.style.display="";
}else{
if(dojo.isIE){
var burl=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";
var html="<iframe src='"+burl+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";
_143=dojo.doc.createElement(html);
}else{
_143=dojo.create("iframe");
_143.src="javascript:\"\"";
_143.className="dijitBackgroundIframe";
}
_143.tabIndex=-1;
dojo.body().appendChild(_143);
}
return _143;
};
this.push=function(_146){
_146.style.display="none";
if(dojo.isIE){
_146.style.removeExpression("width");
_146.style.removeExpression("height");
}
_142.push(_146);
};
}();
dijit.BackgroundIframe=function(node){
if(!node.id){
throw new Error("no id");
}
if(dojo.isIE<7||(dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){
var _148=dijit._frames.pop();
node.appendChild(_148);
if(dojo.isIE){
_148.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetWidth");
_148.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetHeight");
}
this.iframe=_148;
}
};
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){
try{
node=dojo.byId(node);
var doc=dojo.doc;
var body=dojo.body();
var html=body.parentNode;
if((!(dojo.isFF>=3||dojo.isIE||dojo.isWebKit)||node==body||node==html)&&(typeof node.scrollIntoView=="function")){
node.scrollIntoView(false);
return;
}
var ltr=dojo._isBodyLtr();
var _14e=dojo.isIE>=8&&!_14f;
var rtl=!ltr&&!_14e;
var _151=body;
var _14f=doc.compatMode=="BackCompat";
if(_14f){
html._offsetWidth=html._clientWidth=body._offsetWidth=body.clientWidth;
html._offsetHeight=html._clientHeight=body._offsetHeight=body.clientHeight;
}else{
if(dojo.isWebKit){
body._offsetWidth=body._clientWidth=html.clientWidth;
body._offsetHeight=body._clientHeight=html.clientHeight;
}else{
_151=html;
}
html._offsetHeight=html.clientHeight;
html._offsetWidth=html.clientWidth;
}
function _152(_153){
var ie=dojo.isIE;
return ((ie<=6||(ie>=7&&_14f))?false:(dojo.style(_153,"position").toLowerCase()=="fixed"));
};
function _155(_156){
var _157=_156.parentNode;
var _158=_156.offsetParent;
if(_158==null||_152(_156)){
_158=html;
_157=(_156==body)?html:null;
}
_156._offsetParent=_158;
_156._parent=_157;
var bp=dojo._getBorderExtents(_156);
_156._borderStart={H:(_14e&&!ltr)?(bp.w-bp.l):bp.l,V:bp.t};
_156._borderSize={H:bp.w,V:bp.h};
_156._scrolledAmount={H:_156.scrollLeft,V:_156.scrollTop};
_156._offsetSize={H:_156._offsetWidth||_156.offsetWidth,V:_156._offsetHeight||_156.offsetHeight};
_156._offsetStart={H:(_14e&&!ltr)?_158.clientWidth-_156.offsetLeft-_156._offsetSize.H:_156.offsetLeft,V:_156.offsetTop};
_156._clientSize={H:_156._clientWidth||_156.clientWidth,V:_156._clientHeight||_156.clientHeight};
if(_156!=body&&_156!=html&&_156!=node){
for(var dir in _156._offsetSize){
var _15b=_156._offsetSize[dir]-_156._clientSize[dir]-_156._borderSize[dir];
var _15c=_156._clientSize[dir]>0&&_15b>0;
if(_15c){
_156._offsetSize[dir]-=_15b;
if(dojo.isIE&&rtl&&dir=="H"){
_156._offsetStart[dir]+=_15b;
}
}
}
}
};
var _15d=node;
while(_15d!=null){
if(_152(_15d)){
node.scrollIntoView(false);
return;
}
_155(_15d);
_15d=_15d._parent;
}
if(dojo.isIE&&node._parent){
var _15e=node._offsetParent;
node._offsetStart.H+=_15e._borderStart.H;
node._offsetStart.V+=_15e._borderStart.V;
}
if(dojo.isIE>=7&&_151==html&&rtl&&body._offsetStart&&body._offsetStart.H==0){
var _15f=html.scrollWidth-html._offsetSize.H;
if(_15f>0){
body._offsetStart.H=-_15f;
}
}
if(dojo.isIE<=6&&!_14f){
html._offsetSize.H+=html._borderSize.H;
html._offsetSize.V+=html._borderSize.V;
}
if(rtl&&body._offsetStart&&_151==html&&html._scrolledAmount){
var ofs=body._offsetStart.H;
if(ofs<0){
html._scrolledAmount.H+=ofs;
body._offsetStart.H=0;
}
}
_15d=node;
while(_15d){
var _161=_15d._parent;
if(!_161){
break;
}
if(_161.tagName=="TD"){
var _162=_161._parent._parent._parent;
if(_161!=_15d._offsetParent&&_161._offsetParent!=_15d._offsetParent){
_161=_162;
}
}
var _163=_15d._offsetParent==_161;
for(var dir in _15d._offsetStart){
var _165=dir=="H"?"V":"H";
if(rtl&&dir=="H"&&(_161!=html)&&(_161!=body)&&(dojo.isIE||dojo.isWebKit)&&_161._clientSize.H>0&&_161.scrollWidth>_161._clientSize.H){
var _166=_161.scrollWidth-_161._clientSize.H;
if(_166>0){
_161._scrolledAmount.H-=_166;
}
}
if(_161._offsetParent.tagName=="TABLE"){
if(dojo.isIE){
_161._offsetStart[dir]-=_161._offsetParent._borderStart[dir];
_161._borderStart[dir]=_161._borderSize[dir]=0;
}else{
_161._offsetStart[dir]+=_161._offsetParent._borderStart[dir];
}
}
if(dojo.isIE){
_161._offsetStart[dir]+=_161._offsetParent._borderStart[dir];
}
var _167=_15d._offsetStart[dir]-_161._scrolledAmount[dir]-(_163?0:_161._offsetStart[dir])-_161._borderStart[dir];
var _168=_167+_15d._offsetSize[dir]-_161._offsetSize[dir]+_161._borderSize[dir];
var _169=(dir=="H")?"scrollLeft":"scrollTop";
var _16a=dir=="H"&&rtl;
var _16b=_16a?-_168:_167;
var _16c=_16a?-_167:_168;
var _16d=(_16b*_16c<=0)?0:Math[(_16b<0)?"max":"min"](_16b,_16c);
if(_16d!=0){
var _16e=_161[_169];
_161[_169]+=(_16a)?-_16d:_16d;
var _16f=_161[_169]-_16e;
}
if(_163){
_15d._offsetStart[dir]+=_161._offsetStart[dir];
}
_15d._offsetStart[dir]-=_161[_169];
}
_15d._parent=_161._parent;
_15d._offsetParent=_161._offsetParent;
}
_161=node;
var next;
while(_161&&_161.removeAttribute){
next=_161.parentNode;
_161.removeAttribute("_offsetParent");
_161.removeAttribute("_parent");
_161=next;
}
}
catch(error){
console.error("scrollIntoView: "+error);
node.scrollIntoView(false);
}
};
}
if(!dojo._hasResource["dijit._base.sniff"]){
dojo._hasResource["dijit._base.sniff"]=true;
dojo.provide("dijit._base.sniff");
(function(){
var d=dojo,html=d.doc.documentElement,ie=d.isIE,_174=d.isOpera,maj=Math.floor,ff=d.isFF,_177=d.boxModel.replace(/-/,""),_178={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_174,dj_opera8:maj(_174)==8,dj_opera9:maj(_174)==9,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};
_178["dj_"+_177]=true;
for(var p in _178){
if(_178[p]){
if(html.className){
html.className+=" "+p;
}else{
html.className=p;
}
}
}
dojo._loaders.unshift(function(){
if(!dojo._isBodyLtr()){
html.className+=" dijitRtl";
for(var p in _178){
if(_178[p]){
html.className+=" "+p+"-rtl";
}
}
}
});
})();
}
if(!dojo._hasResource["dijit._base.typematic"]){
dojo._hasResource["dijit._base.typematic"]=true;
dojo.provide("dijit._base.typematic");
dijit.typematic={_fireEventAndReload:function(){
this._timer=null;
this._callback(++this._count,this._node,this._evt);
this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));
this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);
},trigger:function(evt,_17c,node,_17e,obj,_180,_181){
if(obj!=this._obj){
this.stop();
this._initialDelay=_181||500;
this._subsequentDelay=_180||0.9;
this._obj=obj;
this._evt=evt;
this._node=node;
this._currentTimeout=-1;
this._count=-1;
this._callback=dojo.hitch(_17c,_17e);
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,_183,_184,_185,_186,_187){
if(_183.keyCode){
_183.charOrCode=_183.keyCode;
dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}else{
if(_183.charCode){
_183.charOrCode=String.fromCharCode(_183.charCode);
dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");
}
}
return [dojo.connect(node,"onkeypress",this,function(evt){
if(evt.charOrCode==_183.charOrCode&&(_183.ctrlKey===undefined||_183.ctrlKey==evt.ctrlKey)&&(_183.altKey===undefined||_183.altKey==evt.ctrlKey)&&(_183.shiftKey===undefined||_183.shiftKey==evt.ctrlKey)){
dojo.stopEvent(evt);
dijit.typematic.trigger(_183,_184,node,_185,_183,_186,_187);
}else{
if(dijit.typematic._obj==_183){
dijit.typematic.stop();
}
}
}),dojo.connect(node,"onkeyup",this,function(evt){
if(dijit.typematic._obj==_183){
dijit.typematic.stop();
}
})];
},addMouseListener:function(node,_18b,_18c,_18d,_18e){
var dc=dojo.connect;
return [dc(node,"mousedown",this,function(evt){
dojo.stopEvent(evt);
dijit.typematic.trigger(evt,_18b,node,_18c,node,_18d,_18e);
}),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,_18b,node,_18c,node,_18d,_18e);
setTimeout(dojo.hitch(this,dijit.typematic.stop),50);
}
})];
},addListener:function(_195,_196,_197,_198,_199,_19a,_19b){
return this.addKeyListener(_196,_197,_198,_199,_19a,_19b).concat(this.addMouseListener(_195,_198,_199,_19a,_19b));
}};
}
if(!dojo._hasResource["dijit._base.wai"]){
dojo._hasResource["dijit._base.wai"]=true;
dojo.provide("dijit._base.wai");
dijit.wai={onload:function(){
var div=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());
var cs=dojo.getComputedStyle(div);
if(cs){
var _19e=cs.backgroundImage;
var _19f=(cs.borderTopColor==cs.borderRightColor)||(_19e!=null&&(_19e=="none"||_19e=="url(invalid-url:)"));
dojo[_19f?"addClass":"removeClass"](dojo.body(),"dijit_a11y");
if(dojo.isIE){
div.outerHTML="";
}else{
dojo.body().removeChild(div);
}
}
}};
if(dojo.isIE||dojo.isMoz){
dojo._loaders.unshift(dijit.wai.onload);
}
dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(elem,role){
var _1a2=this.getWaiRole(elem);
return role?(_1a2.indexOf(role)>-1):(_1a2.length>0);
},getWaiRole:function(elem){
return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));
},setWaiRole:function(elem,role){
var _1a6=dojo.attr(elem,"role")||"";
if(dojo.isFF<3||!this._XhtmlRoles.test(_1a6)){
dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);
}else{
if((" "+_1a6+" ").indexOf(" "+role+" ")<0){
var _1a7=dojo.trim(_1a6.replace(this._XhtmlRoles,""));
var _1a8=dojo.trim(_1a6.replace(_1a7,""));
dojo.attr(elem,"role",_1a8+(_1a8?" ":"")+role);
}
}
},removeWaiRole:function(elem,role){
var _1ab=dojo.attr(elem,"role");
if(!_1ab){
return;
}
if(role){
var _1ac=dojo.isFF<3?"wairole:"+role:role;
var t=dojo.trim((" "+_1ab+" ").replace(" "+_1ac+" "," "));
dojo.attr(elem,"role",t);
}else{
elem.removeAttribute("role");
}
},hasWaiState:function(elem,_1af){
if(dojo.isFF<3){
return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_1af);
}
return elem.hasAttribute?elem.hasAttribute("aria-"+_1af):!!elem.getAttribute("aria-"+_1af);
},getWaiState:function(elem,_1b1){
if(dojo.isFF<3){
return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_1b1);
}
return elem.getAttribute("aria-"+_1b1)||"";
},setWaiState:function(elem,_1b3,_1b4){
if(dojo.isFF<3){
elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_1b3,_1b4);
}else{
elem.setAttribute("aria-"+_1b3,_1b4);
}
},removeWaiState:function(elem,_1b6){
if(dojo.isFF<3){
elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_1b6);
}else{
elem.removeAttribute("aria-"+_1b6);
}
}});
}
if(!dojo._hasResource["dijit._base"]){
dojo._hasResource["dijit._base"]=true;
dojo.provide("dijit._base");
}
if(!dojo._hasResource["dijit._Widget"]){
dojo._hasResource["dijit._Widget"]=true;
dojo.provide("dijit._Widget");
dojo.require("dijit._base");
dojo.connect(dojo,"connect",function(_1b7,_1b8){
if(_1b7&&dojo.isFunction(_1b7._onConnect)){
_1b7._onConnect(_1b8);
}
});
dijit._connectOnUseEventHandler=function(_1b9){
};
(function(){
var _1ba={};
var _1bb=function(dc){
if(!_1ba[dc]){
var r=[];
var _1be;
var _1bf=dojo.getObject(dc).prototype;
for(var _1c0 in _1bf){
if(dojo.isFunction(_1bf[_1c0])&&(_1be=_1c0.match(/^_set([a-zA-Z]*)Attr$/))&&_1be[1]){
r.push(_1be[1].charAt(0).toLowerCase()+_1be[1].substr(1));
}
}
_1ba[dc]=r;
}
return _1ba[dc]||[];
};
dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript:function(_1c1,_1c2){
this.create(_1c1,_1c2);
},create:function(_1c3,_1c4){
this.srcNodeRef=dojo.byId(_1c4);
this._connects=[];
this._deferredConnects=dojo.clone(this._deferredConnects);
for(var attr in this.attributeMap){
delete this._deferredConnects[attr];
}
for(attr in this._deferredConnects){
if(this[attr]!==dijit._connectOnUseEventHandler){
delete this._deferredConnects[attr];
}
}
if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){
this.id=this.srcNodeRef.id;
}
if(_1c3){
this.params=_1c3;
dojo.mixin(this,_1c3);
}
this.postMixInProperties();
if(!this.id){
this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));
}
dijit.registry.add(this);
this.buildRendering();
if(this.domNode){
this._applyAttributes();
var _1c6=this.srcNodeRef;
if(_1c6&&_1c6.parentNode){
_1c6.parentNode.replaceChild(this.domNode,_1c6);
}
for(attr in this.params){
this._onConnect(attr);
}
}
if(this.domNode){
this.domNode.setAttribute("widgetId",this.id);
}
this.postCreate();
if(this.srcNodeRef&&!this.srcNodeRef.parentNode){
delete this.srcNodeRef;
}
this._created=true;
},_applyAttributes:function(){
var _1c7=function(attr,_1c9){
if((_1c9.params&&attr in _1c9.params)||_1c9[attr]){
_1c9.attr(attr,_1c9[attr]);
}
};
for(var attr in this.attributeMap){
_1c7(attr,this);
}
dojo.forEach(_1bb(this.declaredClass),function(a){
if(!(a in this.attributeMap)){
_1c7(a,this);
}
},this);
},postMixInProperties:function(){
},buildRendering:function(){
this.domNode=this.srcNodeRef||dojo.create("div");
},postCreate:function(){
},startup:function(){
this._started=true;
},destroyRecursive:function(_1cc){
this.destroyDescendants(_1cc);
this.destroy(_1cc);
},destroy:function(_1cd){
this.uninitialize();
dojo.forEach(this._connects,function(_1ce){
dojo.forEach(_1ce,dojo.disconnect);
});
dojo.forEach(this._supportingWidgets||[],function(w){
if(w.destroy){
w.destroy();
}
});
this.destroyRendering(_1cd);
dijit.registry.remove(this.id);
},destroyRendering:function(_1d0){
if(this.bgIframe){
this.bgIframe.destroy(_1d0);
delete this.bgIframe;
}
if(this.domNode){
if(_1d0){
dojo.removeAttr(this.domNode,"widgetId");
}else{
dojo.destroy(this.domNode);
}
delete this.domNode;
}
if(this.srcNodeRef){
if(!_1d0){
dojo.destroy(this.srcNodeRef);
}
delete this.srcNodeRef;
}
},destroyDescendants:function(_1d1){
dojo.forEach(this.getChildren(),function(_1d2){
if(_1d2.destroyRecursive){
_1d2.destroyRecursive(_1d1);
}
});
},uninitialize:function(){
return false;
},onFocus:function(){
},onBlur:function(){
},_onFocus:function(e){
this.onFocus();
},_onBlur:function(){
this.onBlur();
},_onConnect:function(_1d4){
if(_1d4 in this._deferredConnects){
var _1d5=this[this._deferredConnects[_1d4]||"domNode"];
this.connect(_1d5,_1d4.toLowerCase(),_1d4);
delete this._deferredConnects[_1d4];
}
},_setClassAttr:function(_1d6){
var _1d7=this[this.attributeMap["class"]||"domNode"];
dojo.removeClass(_1d7,this["class"]);
this["class"]=_1d6;
dojo.addClass(_1d7,_1d6);
},_setStyleAttr:function(_1d8){
var _1d9=this[this.attributeMap["style"]||"domNode"];
if(dojo.isObject(_1d8)){
dojo.style(_1d9,_1d8);
}else{
if(_1d9.style.cssText){
_1d9.style.cssText+="; "+_1d8;
}else{
_1d9.style.cssText=_1d8;
}
}
this["style"]=_1d8;
},setAttribute:function(attr,_1db){
dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");
this.attr(attr,_1db);
},_attrToDom:function(attr,_1dd){
var _1de=this.attributeMap[attr];
dojo.forEach(dojo.isArray(_1de)?_1de:[_1de],function(_1df){
var _1e0=this[_1df.node||_1df||"domNode"];
var type=_1df.type||"attribute";
switch(type){
case "attribute":
if(dojo.isFunction(_1dd)){
_1dd=dojo.hitch(this,_1dd);
}
if(/^on[A-Z][a-zA-Z]*$/.test(attr)){
attr=attr.toLowerCase();
}
dojo.attr(_1e0,attr,_1dd);
break;
case "innerHTML":
_1e0.innerHTML=_1dd;
break;
case "class":
dojo.removeClass(_1e0,this[attr]);
dojo.addClass(_1e0,_1dd);
break;
}
},this);
this[attr]=_1dd;
},attr:function(name,_1e3){
var args=arguments.length;
if(args==1&&!dojo.isString(name)){
for(var x in name){
this.attr(x,name[x]);
}
return this;
}
var _1e6=this._getAttrNames(name);
if(args==2){
if(this[_1e6.s]){
return this[_1e6.s](_1e3)||this;
}else{
if(name in this.attributeMap){
this._attrToDom(name,_1e3);
}
this[name]=_1e3;
}
return this;
}else{
if(this[_1e6.g]){
return this[_1e6.g]();
}else{
return this[name];
}
}
},_attrPairNames:{},_getAttrNames:function(name){
var apn=this._attrPairNames;
if(apn[name]){
return apn[name];
}
var uc=name.charAt(0).toUpperCase()+name.substr(1);
return apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"};
},toString:function(){
return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";
},getDescendants:function(){
if(this.containerNode){
var list=dojo.query("[widgetId]",this.containerNode);
return list.map(dijit.byNode);
}else{
return [];
}
},getChildren:function(){
if(this.containerNode){
return dijit.findWidgets(this.containerNode);
}else{
return [];
}
},nodesWithKeyClick:["input","button"],connect:function(obj,_1ec,_1ed){
var d=dojo;
var dc=dojo.connect;
var _1f0=[];
if(_1ec=="ondijitclick"){
if(!this.nodesWithKeyClick[obj.nodeName]){
var m=d.hitch(this,_1ed);
_1f0.push(dc(obj,"onkeydown",this,function(e){
if(!d.isFF&&e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
return m(e);
}else{
if(e.keyCode==d.keys.SPACE){
d.stopEvent(e);
}
}
}),dc(obj,"onkeyup",this,function(e){
if(e.keyCode==d.keys.SPACE&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
return m(e);
}
}));
if(d.isFF){
_1f0.push(dc(obj,"onkeypress",this,function(e){
if(e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){
return m(e);
}
}));
}
}
_1ec="onclick";
}
_1f0.push(dc(obj,_1ec,this,_1ed));
this._connects.push(_1f0);
return _1f0;
},disconnect:function(_1f5){
for(var i=0;i<this._connects.length;i++){
if(this._connects[i]==_1f5){
dojo.forEach(_1f5,dojo.disconnect);
this._connects.splice(i,1);
return;
}
}
},isLeftToRight:function(){
return dojo._isBodyLtr();
},isFocusable:function(){
return this.focus&&(dojo.style(this.domNode,"display")!="none");
},placeAt:function(_1f7,_1f8){
if(_1f7["declaredClass"]&&_1f7["addChild"]){
_1f7.addChild(this,_1f8);
}else{
dojo.place(this.domNode,_1f7,_1f8);
}
return this;
}});
})();
}
if(!dojo._hasResource["dojo.string"]){
dojo._hasResource["dojo.string"]=true;
dojo.provide("dojo.string");
dojo.string.rep=function(str,num){
if(num<=0||!str){
return "";
}
var buf=[];
for(;;){
if(num&1){
buf.push(str);
}
if(!(num>>=1)){
break;
}
str+=str;
}
return buf.join("");
};
dojo.string.pad=function(text,size,ch,end){
if(!ch){
ch="0";
}
var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));
return end?out+pad:pad+out;
};
dojo.string.substitute=function(_202,map,_204,_205){
_205=_205||dojo.global;
_204=(!_204)?function(v){
return v;
}:dojo.hitch(_205,_204);
return _202.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_207,key,_209){
var _20a=dojo.getObject(key,false,map);
if(_209){
_20a=dojo.getObject(_209,false,_205).call(_205,_20a,key);
}
return _204(_20a,key).toString();
});
};
dojo.string.trim=String.prototype.trim?dojo.trim:function(str){
str=str.replace(/^\s+/,"");
for(var i=str.length-1;i>=0;i--){
if(/\S/.test(str.charAt(i))){
str=str.substring(0,i+1);
break;
}
}
return str;
};
}
if(!dojo._hasResource["dijit._Templated"]){
dojo._hasResource["dijit._Templated"]=true;
dojo.provide("dijit._Templated");
dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){
var _20e=this.declaredClass,_20f=this;
return dojo.string.substitute(tmpl,this,function(_210,key){
if(key.charAt(0)=="!"){
_210=dojo.getObject(key.substr(1),false,_20f);
}
if(typeof _210=="undefined"){
throw new Error(_20e+" template:"+key);
}
if(_210==null){
return "";
}
return key.charAt(0)=="!"?_210:_210.toString().replace(/"/g,"&quot;");
},this);
},buildRendering:function(){
var _212=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);
var node;
if(dojo.isString(_212)){
node=dojo._toDom(this._stringRepl(_212));
}else{
node=_212.cloneNode(true);
}
this.domNode=node;
this._attachTemplateNodes(node);
if(this.widgetsInTemplate){
var cw=(this._supportingWidgets=dojo.parser.parse(node));
this._attachTemplateNodes(cw,function(n,p){
return n[p];
});
}
this._fillContent(this.srcNodeRef);
},_fillContent:function(_217){
var dest=this.containerNode;
if(_217&&dest){
while(_217.hasChildNodes()){
dest.appendChild(_217.firstChild);
}
}
},_attachTemplateNodes:function(_219,_21a){
_21a=_21a||function(n,p){
return n.getAttribute(p);
};
var _21d=dojo.isArray(_219)?_219:(_219.all||_219.getElementsByTagName("*"));
var x=dojo.isArray(_219)?0:-1;
for(;x<_21d.length;x++){
var _21f=(x==-1)?_219:_21d[x];
if(this.widgetsInTemplate&&_21a(_21f,"dojoType")){
continue;
}
var _220=_21a(_21f,"dojoAttachPoint");
if(_220){
var _221,_222=_220.split(/\s*,\s*/);
while((_221=_222.shift())){
if(dojo.isArray(this[_221])){
this[_221].push(_21f);
}else{
this[_221]=_21f;
}
}
}
var _223=_21a(_21f,"dojoAttachEvent");
if(_223){
var _224,_225=_223.split(/\s*,\s*/);
var trim=dojo.trim;
while((_224=_225.shift())){
if(_224){
var _227=null;
if(_224.indexOf(":")!=-1){
var _228=_224.split(":");
_224=trim(_228[0]);
_227=trim(_228[1]);
}else{
_224=trim(_224);
}
if(!_227){
_227=_224;
}
this.connect(_21f,_224,_227);
}
}
}
var role=_21a(_21f,"waiRole");
if(role){
dijit.setWaiRole(_21f,role);
}
var _22a=_21a(_21f,"waiState");
if(_22a){
dojo.forEach(_22a.split(/\s*,\s*/),function(_22b){
if(_22b.indexOf("-")!=-1){
var pair=_22b.split("-");
dijit.setWaiState(_21f,pair[0],pair[1]);
}
});
}
}
}});
dijit._Templated._templateCache={};
dijit._Templated.getCachedTemplate=function(_22d,_22e,_22f){
var _230=dijit._Templated._templateCache;
var key=_22e||_22d;
var _232=_230[key];
if(_232){
if(!_232.ownerDocument||_232.ownerDocument==dojo.doc){
return _232;
}
dojo.destroy(_232);
}
if(!_22e){
_22e=dijit._Templated._sanitizeTemplateString(dojo.trim(dojo._getText(_22d)));
}
_22e=dojo.string.trim(_22e);
if(_22f||_22e.match(/\$\{([^\}]+)\}/g)){
return (_230[key]=_22e);
}else{
return (_230[key]=dojo._toDom(_22e));
}
};
dijit._Templated._sanitizeTemplateString=function(_233){
if(_233){
_233=_233.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _234=_233.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_234){
_233=_234[1];
}
}else{
_233="";
}
return _233;
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
var _235=dijit._Templated._templateCache;
for(var key in _235){
var _237=_235[key];
if(!isNaN(_237.nodeType)){
dojo.destroy(_237);
}
delete _235[key];
}
});
}
dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});
}
if(!dojo._hasResource["dijit._Container"]){
dojo._hasResource["dijit._Container"]=true;
dojo.provide("dijit._Container");
dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},addChild:function(_238,_239){
var _23a=this.containerNode;
if(_239&&typeof _239=="number"){
var _23b=this.getChildren();
if(_23b&&_23b.length>=_239){
_23a=_23b[_239-1].domNode;
_239="after";
}
}
dojo.place(_238.domNode,_23a,_239);
if(this._started&&!_238._started){
_238.startup();
}
},removeChild:function(_23c){
if(typeof _23c=="number"&&_23c>0){
_23c=this.getChildren()[_23c];
}
if(!_23c||!_23c.domNode){
return;
}
var node=_23c.domNode;
node.parentNode.removeChild(node);
},_nextElement:function(node){
do{
node=node.nextSibling;
}while(node&&node.nodeType!=1);
return node;
},_firstElement:function(node){
node=node.firstChild;
if(node&&node.nodeType!=1){
node=this._nextElement(node);
}
return node;
},getChildren:function(){
return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode);
},hasChildren:function(){
return !!this._firstElement(this.containerNode);
},destroyDescendants:function(_240){
dojo.forEach(this.getChildren(),function(_241){
_241.destroyRecursive(_240);
});
},_getSiblingOfChild:function(_242,dir){
var node=_242.domNode;
var _245=(dir>0?"nextSibling":"previousSibling");
do{
node=node[_245];
}while(node&&(node.nodeType!=1||!dijit.byNode(node)));
return node?dijit.byNode(node):null;
},getIndexOfChild:function(_246){
var _247=this.getChildren();
for(var i=0,c;c=_247[i];i++){
if(c==_246){
return i;
}
}
return -1;
}});
}
if(!dojo._hasResource["dijit._Contained"]){
dojo._hasResource["dijit._Contained"]=true;
dojo.provide("dijit._Contained");
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 _24c=dijit.byId(id);
return _24c.isContainer?_24c:null;
}
}
return null;
},_getSibling:function(_24d){
var node=this.domNode;
do{
node=node[_24d+"Sibling"];
}while(node&&node.nodeType!=1);
if(!node){
return null;
}
var id=node.getAttribute("widgetId");
return dijit.byId(id);
},getPreviousSibling:function(){
return this._getSibling("previous");
},getNextSibling:function(){
return this._getSibling("next");
},getIndexInParent:function(){
var p=this.getParent();
if(!p||!p.getIndexOfChild){
return -1;
}
return p.getIndexOfChild(this);
}});
}
if(!dojo._hasResource["dijit.layout._LayoutWidget"]){
dojo._hasResource["dijit.layout._LayoutWidget"]=true;
dojo.provide("dijit.layout._LayoutWidget");
dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){
dojo.addClass(this.domNode,"dijitContainer");
dojo.addClass(this.domNode,this.baseClass);
},startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_251){
_251.startup();
});
if(!this.getParent||!this.getParent()){
this.resize();
this._viewport=dijit.getViewport();
this.connect(dojo.global,"onresize",function(){
var _252=dijit.getViewport();
if(_252.w!=this._viewport.w||_252.h!=this._viewport.h){
this._viewport=_252;
this.resize();
}
});
}
this.inherited(arguments);
},resize:function(_253,_254){
var node=this.domNode;
if(_253){
dojo.marginBox(node,_253);
if(_253.t){
node.style.top=_253.t+"px";
}
if(_253.l){
node.style.left=_253.l+"px";
}
}
var mb=_254||{};
dojo.mixin(mb,_253||{});
if(!("h" in mb)||!("w" in mb)){
mb=dojo.mixin(dojo.marginBox(node),mb);
}
var cs=dojo.getComputedStyle(node);
var me=dojo._getMarginExtents(node,cs);
var be=dojo._getBorderExtents(node,cs);
var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});
var pe=dojo._getPadExtents(node,cs);
this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};
this.layout();
},layout:function(){
},_setupChild:function(_25c){
dojo.addClass(_25c.domNode,this.baseClass+"-child");
if(_25c.baseClass){
dojo.addClass(_25c.domNode,this.baseClass+"-"+_25c.baseClass);
}
},addChild:function(_25d,_25e){
this.inherited(arguments);
if(this._started){
this._setupChild(_25d);
}
},removeChild:function(_25f){
dojo.removeClass(_25f.domNode,this.baseClass+"-child");
if(_25f.baseClass){
dojo.removeClass(_25f.domNode,this.baseClass+"-"+_25f.baseClass);
}
this.inherited(arguments);
}});
dijit.layout.marginBox2contentBox=function(node,mb){
var cs=dojo.getComputedStyle(node);
var me=dojo._getMarginExtents(node,cs);
var pb=dojo._getPadBorderExtents(node,cs);
return {l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};
};
(function(){
var _265=function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
};
var size=function(_268,dim){
_268.resize?_268.resize(dim):dojo.marginBox(_268.domNode,dim);
dojo.mixin(_268,dojo.marginBox(_268.domNode));
dojo.mixin(_268,dim);
};
dijit.layout.layoutChildren=function(_26a,dim,_26c){
dim=dojo.mixin({},dim);
dojo.addClass(_26a,"dijitLayoutContainer");
_26c=dojo.filter(_26c,function(item){
return item.layoutAlign!="client";
}).concat(dojo.filter(_26c,function(item){
return item.layoutAlign=="client";
}));
dojo.forEach(_26c,function(_26f){
var elm=_26f.domNode,pos=_26f.layoutAlign;
var _272=elm.style;
_272.left=dim.l+"px";
_272.top=dim.t+"px";
_272.bottom=_272.right="auto";
dojo.addClass(elm,"dijitAlign"+_265(pos));
if(pos=="top"||pos=="bottom"){
size(_26f,{w:dim.w});
dim.h-=_26f.h;
if(pos=="top"){
dim.t+=_26f.h;
}else{
_272.top=dim.t+dim.h+"px";
}
}else{
if(pos=="left"||pos=="right"){
size(_26f,{h:dim.h});
dim.w-=_26f.w;
if(pos=="left"){
dim.l+=_26f.w;
}else{
_272.left=dim.l+dim.w+"px";
}
}else{
if(pos=="client"){
size(_26f,dim);
}
}
}
});
};
})();
}
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,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),postMixInProperties:function(){
this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";
this.inherited(arguments);
},_setDisabledAttr:function(_273){
this.disabled=_273;
dojo.attr(this.focusNode,"disabled",_273);
dijit.setWaiState(this.focusNode,"disabled",_273);
if(_273){
this._hovering=false;
this._active=false;
this.focusNode.removeAttribute("tabIndex");
}else{
this.focusNode.setAttribute("tabIndex",this.tabIndex);
}
this._setStateClass();
},setDisabled:function(_274){
dojo.deprecated("setDisabled("+_274+") is deprecated. Use attr('disabled',"+_274+") instead.","","2.0");
this.attr("disabled",_274);
},_onFocus:function(e){
if(this.scrollOnFocus){
dijit.scrollIntoView(this.domNode);
}
this.inherited(arguments);
},_onMouse:function(_276){
var _277=_276.currentTarget;
if(_277&&_277.getAttribute){
this.stateModifier=_277.getAttribute("stateModifier")||"";
}
if(!this.disabled){
switch(_276.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 _278=this.connect(dojo.body(),"onmouseup",function(){
if(this._mouseDown&&this.isFocusable()){
this.focus();
}
this._active=false;
this._mouseDown=false;
this._setStateClass();
this.disconnect(_278);
});
break;
}
this._setStateClass();
}
},isFocusable:function(){
return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");
},focus:function(){
dijit.focus(this.focusNode);
},_setStateClass:function(){
var _279=this.baseClass.split(" ");
function _27a(_27b){
_279=_279.concat(dojo.map(_279,function(c){
return c+_27b;
}),"dijit"+_27b);
};
if(this.checked){
_27a("Checked");
}
if(this.state){
_27a(this.state);
}
if(this.selected){
_27a("Selected");
}
if(this.disabled){
_27a("Disabled");
}else{
if(this.readOnly){
_27a("ReadOnly");
}else{
if(this._active){
_27a(this.stateModifier+"Active");
}else{
if(this._focused){
_27a("Focused");
}
if(this._hovering){
_27a(this.stateModifier+"Hover");
}
}
}
}
var tn=this.stateNode||this.domNode,_27e={};
dojo.forEach(tn.className.split(" "),function(c){
_27e[c]=true;
});
if("_stateClasses" in this){
dojo.forEach(this._stateClasses,function(c){
delete _27e[c];
});
}
dojo.forEach(_279,function(c){
_27e[c]=true;
});
var _282=[];
for(var c in _27e){
_282.push(c);
}
tn.className=_282.join(" ");
this._stateClasses=_279;
},compare:function(val1,val2){
if((typeof val1=="number")&&(typeof val2=="number")){
return (isNaN(val1)&&isNaN(val2))?0:(val1-val2);
}else{
if(val1>val2){
return 1;
}else{
if(val1<val2){
return -1;
}else{
return 0;
}
}
}
},onChange:function(_286){
},_onChangeActive:false,_handleOnChange:function(_287,_288){
this._lastValue=_287;
if(this._lastValueReported==undefined&&(_288===null||!this._onChangeActive)){
this._resetValue=this._lastValueReported=_287;
}
if((this.intermediateChanges||_288||_288===undefined)&&((typeof _287!=typeof this._lastValueReported)||this.compare(_287,this._lastValueReported)!=0)){
this._lastValueReported=_287;
if(this._onChangeActive){
this.onChange(_287);
}
}
},create:function(){
this.inherited(arguments);
this._onChangeActive=true;
this._setStateClass();
},destroy:function(){
if(this._layoutHackHandle){
clearTimeout(this._layoutHackHandle);
}
this.inherited(arguments);
},setValue:function(_289){
dojo.deprecated("dijit.form._FormWidget:setValue("+_289+") is deprecated.  Use attr('value',"+_289+") instead.","","2.0");
this.attr("value",_289);
},getValue:function(){
dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");
return this.attr("value");
},_layoutHack:function(){
if(dojo.isFF==2&&!this._layoutHackHandle){
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.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:""}),postCreate:function(){
if(dojo.isIE||dojo.isWebKit){
this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);
}
if(this._resetValue===undefined){
this._resetValue=this.value;
}
},_setValueAttr:function(_28c,_28d){
this.value=_28c;
this._handleOnChange(_28c,_28d);
},_getValueAttr:function(_28e){
return this._lastValue;
},undo:function(){
this._setValueAttr(this._lastValueReported,false);
},reset:function(){
this._hasBeenBlurred=false;
this._setValueAttr(this._resetValue,true);
},_onKeyDown:function(e){
if(e.keyCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey){
var te;
if(dojo.isIE){
e.preventDefault();
te=document.createEventObject();
te.keyCode=dojo.keys.ESCAPE;
te.shiftKey=e.shiftKey;
e.srcElement.fireEvent("onkeypress",te);
}else{
if(dojo.isWebKit){
te=document.createEvent("Events");
te.initEvent("keypress",true,true);
te.keyCode=dojo.keys.ESCAPE;
te.shiftKey=e.shiftKey;
e.target.dispatchEvent(te);
}
}
}
}});
}
if(!dojo._hasResource["dijit.dijit"]){
dojo._hasResource["dijit.dijit"]=true;
dojo.provide("dijit.dijit");
}
if(!dojo._hasResource["start.topics"]){
dojo._hasResource["start.topics"]=true;
dojo.provide("start.topics");
(function(){
start.topics={ADD_SHOW_SAVED:"app/add/show/saved",GRID_NODE_REMOVE:"app/grid/node/remove",GRID_CHANGE:"app/grid/change",GRID_UPDATEORDER:"app/grid/updateorder",CONDUIT_UPDATEORDER:"app/conduit/reorder",CONDUIT_REMOVE_ITEM:"app/conduit/remove/item",CONDUIT_ADD_ITEM:"app/conduit/add/item",CONDUIT_ADD_ITEMS:"app/conduit/add/items",CONDUIT_REMOVEWIDGET:"app/conduit/remove",CONDUIT_GETWIDGETDATA:"app/conduit/getdata",CONDUIT_RESIZEWIDGET:"app/conduit/resize",CONDUIT_COLLAPSEWIDGET:"app/conduit/collapse",CONDUIT_ADDWIDGET:"app/conduit/add",CONDUIT_UPDATEOBJIDS:"app/conduit/updateobjids",CONDUIT_SETUPWIZARD_COOKIE:"app/conduit/setupwizard/cookie",FLICKR_SAVESETTINGS:"app/flickr/add",WEATHER_SAVESETTINGS:"app/weather/add",NOTEBOOK_SAVESETTINGS:"app/notebook/add",VIDEO_NAVIGATION:"app/video/nav",START_ANIMATE_BEG:"app/start/animate/beg",START_ANIMATE_END:"app/start/animate/end",START_CHANGE_PAGE:"app/start/change/page",START_LOAD_COMPLETE:"app/start/load/complete",CONTENTPACK_LOAD_COMPLETE:"app/contentpack/load/complete",SEARCH_LOAD_COMPLETE:"app/search/load/complete",THEME_CHANGE:"app/theme/change",THEME_SHOWMENU:"app/theme/showmenu",ITEMS_ADD:"app/items/add",ITEMS_REM:"app/items/rem",ITEMS_CLOSE:"app/items/close",ITEMS_REMOTE_ADD:"app/items/remote/add",ITEMS_IS_FLICKR:"app/items/flickr",NEWS_ITEM_SELECT:"app/news/item/select",USER_LOGIN:"app/user/login",USER_LOGOUT:"app/user/logout",DISPLAY_RESIZE_FOR_IE6:"app/display/resize/ie6",FLEX_APP_LOADING_FINISHED:"flex/app/loading/finished",FLEX_APP_SET_DATA:"flex/app/set/data",SLIDE_DECLARE_OWNERSHIP:"/slide/declare/ownership",PREVIEW_POPUP_LOADED:"/preview/popup/loaded",PREVIEW_POPUP_MOUSE:"/preview/popup/mouse"};
})();
}
if(!dojo._hasResource["start.Item"]){
dojo._hasResource["start.Item"]=true;
dojo.provide("start.Item");
dojo.declare("start.Item",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"has_layout pack_item_con\" dojoattachpoint=\"itemCon\">\n  <input type=\"checkbox\" class=\"add_item_check\" dojoattachpoint=\"addItemCheck\" dojoattachevent=\"onclick:_onclick\"/> \n  <a href=\"#\" dojoattachpoint=\"anchor\" dojoattachevent=\"onclick:_onclick\" class=\"pack_item\"></a>\n</div>\n",postCreate:function(){
this.anchor.innerHTML=start.translate.get(this.data.name);
this.connect(this.anchor,"onmouseover","_openPopup");
this.connect(this.anchor,"onmouseout","_closePopup");
this.checked=false;
if(start.start.objMgr.exists(this.data.id)){
this.check();
}
if(start.start.objMgr.isFlickr(this.data.id)){
dojo.publish(start.topics.ITEMS_IS_FLICKR,[this]);
if(this.checked){
this.uncheck();
}
}
dojo.subscribe(start.topics.ITEMS_CLOSE,this,"_handle_close");
dojo.subscribe(start.topics.ITEMS_REMOTE_ADD,this,"_handle_remote_add");
},_openPopup:function(e){
dojo.style(e.target.parentNode,"backgroundColor","#67A9E3");
start.start.itemPreview.createPreview(e.target.parentNode);
},_closePopup:function(e){
console.debug("closepopup");
d=dojo.byId("itemPreview");
dojo.style(d,"display","none");
dojo.style(e.target.parentNode,"backgroundColor","inherit");
},_onclick:function(e){
if(e.target.nodeName!="INPUT"){
dojo.stopEvent(e);
}
if(this.checked){
this.rem();
}else{
this.add();
}
},add:function(){
this.check();
dojo.publish(start.topics.ITEMS_ADD,[{id:[this.data.id]}]);
},rem:function(){
this.uncheck();
dojo.publish(start.topics.ITEMS_REM,[{id:[this.data.id]}]);
},check:function(){
this.checked=true;
this.addItemCheck.checked=true;
},uncheck:function(){
this.checked=false;
this.addItemCheck.checked=false;
},_handle_remote_add:function(data){
if(start.start.objMgr.sameObject(data.id,this.data.id)){
this.check();
}
},_handle_close:function(data){
if(start.start.objMgr.sameObject(data.id,this.data.id)){
this.uncheck();
}
}});
}
if(!dojo._hasResource["start.Pack"]){
dojo._hasResource["start.Pack"]=true;
dojo.provide("start.Pack");
dojo.declare("start.Pack",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"pack\">\n  <h2 class=\"highlight pack_title\">\n    <span dojoattachpoint=\"name\" ></span>\n  </h2>\n  <div style=\"clear: both;\" />\n  <div dojoattachpoint=\"items\" class=\"pack_items_con\">\n  </div>\n</div>\n",postCreate:function(){
dojo.style(this.name,"backgroundPosition","0 "+(-20*this.index)+"px");
this.name.innerHTML=start.translate.get(this.data.name);
this.allSelected=false;
this.items_=[];
var t,d;
for(var i=0;i<this.data.items.length;i++){
d=dojo.doc.createElement("div");
this.items.appendChild(d);
t=new start.Item({data:this.data.items[i]},d);
t.startup();
this.items_.push({"item":t,"data":this.data.items[i]});
}
},_onclick:function(e){
dojo.stopEvent(e);
var ids=[];
for(var i=0;i<this.items_.length;i++){
ids.push(this.items_[i].data.id);
if(this.allSelected){
this.items_[i].item.uncheck();
}else{
this.items_[i].item.check();
}
}
if(this.allSelected){
dojo.removeClass(this.select_all,"pack_item_selected");
dojo.publish(start.topics.ITEMS_REM,[{siteIds:ids}]);
this.allSelected=false;
}else{
dojo.addClass(this.select_all,"pack_item_selected");
dojo.publish(start.topics.ITEMS_ADD,[{siteIds:ids,column:"columnl"}]);
this.allSelected=true;
}
}});
}
if(!dojo._hasResource["start.Utils"]){
dojo._hasResource["start.Utils"]=true;
dojo.provide("start.Utils");
var CACHEBUST_REPLACE=/\d{8,8}/;
start.Utils={clear_style:function(node){
if(dojo.isIE){
node.style.setAttribute("cssText","");
}else{
node.setAttribute("style","");
}
},getCacheBustingURL:function(){
var u=window.location.href;
var max=99999999,min=10000000;
var r=Math.floor(Math.random()*(max-min)+min);
u=u.split("#")[0];
if(u.search("cacheBust")!=-1){
u=u.replace(CACHEBUST_REPLACE,r);
}else{
if(u.search("\\?")!=-1){
u+="&cacheBust="+r;
}else{
u+="?cacheBust="+r;
}
}
return u;
},formatDate:function(_2a1,_2a2,_2a3){
var date=new Date(_2a2);
var now=_2a3?new Date(_2a3):new Date();
var _2a6=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
var _2a7=date.getMonth();
var year=date.getFullYear();
var _2a9=now.getTime()-date.getTime();
if(_2a9===0){
return "now";
}
if(_2a9<0){
return "just now";
}
var _2aa=[];
if(_2a9<(24*3600*1000)){
var _2ab=now.getHours()-date.getHours();
var _2ac=now.getMinutes()-date.getMinutes();
var _2ad=now.getSeconds()-date.getSeconds();
if(_2ab<0){
_2ab+=24;
}
if(_2ac<0){
_2ac+=60;
_2ab--;
}
if(_2ad<0){
_2ad+=60;
_2ac--;
}
if(_2ab>0){
_2aa.push(_2ab,"hr");
}
if(_2ac>0){
_2aa.push(_2ac,"min");
}
if(_2ab==0&&_2ac<10&&_2ad>0){
_2aa.push(_2ad,"sec");
}
_2aa.push("ago");
_2aa=_2aa.join(" ");
}else{
var _2ae;
if(_2a1){
_2ae="";
}else{
var _2ab=date.getHours()%12;
var _2ac=date.getMinutes();
var _2af=(_2ac<10)?"0":"";
var _2b0=(date.getHours()<12)?"AM":"PM";
if(_2ab==0){
_2ab=12;
}
_2ae=_2ab+":"+_2af+_2ac+" "+_2b0;
}
_2aa=_2a6[_2a7]+" "+date.getDate()+", "+year+" "+_2ae;
}
return _2aa;
}};
}
if(!dojo._hasResource["dojo.dnd.common"]){
dojo._hasResource["dojo.dnd.common"]=true;
dojo.provide("dojo.dnd.common");
dojo.dnd._isMac=navigator.appVersion.indexOf("Macintosh")>=0;
dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey";
dojo.dnd.getCopyKeyState=function(e){
return e[dojo.dnd._copyKey];
};
dojo.dnd._uniqueId=0;
dojo.dnd.getUniqueId=function(){
var id;
do{
id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);
}while(dojo.byId(id));
return id;
};
dojo.dnd._empty={};
dojo.dnd.isFormElement=function(e){
var t=e.target;
if(t.nodeType==3){
t=t.parentNode;
}
return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;
};
dojo.dnd._lmb=dojo.isIE?1:0;
dojo.dnd._isLmbPressed=dojo.isIE?function(e){
return e.button&1;
}:function(e){
return e.button===0;
};
}
if(!dojo._hasResource["dojo.dnd.autoscroll"]){
dojo._hasResource["dojo.dnd.autoscroll"]=true;
dojo.provide("dojo.dnd.autoscroll");
dojo.dnd.getViewport=function(){
var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();
if(dojo.isMozilla){
return {w:dd.clientWidth,h:w.innerHeight};
}else{
if(!dojo.isOpera&&w.innerWidth){
return {w:w.innerWidth,h:w.innerHeight};
}else{
if(!dojo.isOpera&&dd&&dd.clientWidth){
return {w:dd.clientWidth,h:dd.clientHeight};
}else{
if(b.clientWidth){
return {w:b.clientWidth,h:b.clientHeight};
}
}
}
}
return null;
};
dojo.dnd.V_TRIGGER_AUTOSCROLL=32;
dojo.dnd.H_TRIGGER_AUTOSCROLL=32;
dojo.dnd.V_AUTOSCROLL_VALUE=16;
dojo.dnd.H_AUTOSCROLL_VALUE=16;
dojo.dnd.autoScroll=function(e){
var v=dojo.dnd.getViewport(),dx=0,dy=0;
if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx=-dojo.dnd.H_AUTOSCROLL_VALUE;
}else{
if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){
dx=dojo.dnd.H_AUTOSCROLL_VALUE;
}
}
if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=-dojo.dnd.V_AUTOSCROLL_VALUE;
}else{
if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=dojo.dnd.V_AUTOSCROLL_VALUE;
}
}
window.scrollBy(dx,dy);
};
dojo.dnd._validNodes={"div":1,"p":1,"td":1};
dojo.dnd._validOverflow={"auto":1,"scroll":1};
dojo.dnd.autoScrollNodes=function(e){
for(var n=e.target;n;){
if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){
var s=dojo.getComputedStyle(n);
if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){
var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);
var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;
if(dojo.isWebKit||dojo.isOpera){
rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop;
}
if(rx>0&&rx<b.w){
if(rx<w){
dx=-w;
}else{
if(rx>b.w-w){
dx=w;
}
}
}
if(ry>0&&ry<b.h){
if(ry<h){
dy=-h;
}else{
if(ry>b.h-h){
dy=h;
}
}
}
var _2ca=n.scrollLeft,_2cb=n.scrollTop;
n.scrollLeft=n.scrollLeft+dx;
n.scrollTop=n.scrollTop+dy;
if(_2ca!=n.scrollLeft||_2cb!=n.scrollTop){
return;
}
}
}
try{
n=n.parentNode;
}
catch(x){
n=null;
}
}
dojo.dnd.autoScroll(e);
};
}
if(!dojo._hasResource["dojo.dnd.Mover"]){
dojo._hasResource["dojo.dnd.Mover"]=true;
dojo.provide("dojo.dnd.Mover");
dojo.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){
this.node=dojo.byId(node);
this.marginBox={l:e.pageX,t:e.pageY};
this.mouseButton=e.button;
var h=this.host=host,d=node.ownerDocument,_2d1=dojo.connect(d,"onmousemove",this,"onFirstMove");
this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_2d1];
if(h&&h.onMoveStart){
h.onMoveStart(this);
}
},onMouseMove:function(e){
dojo.dnd.autoScroll(e);
var m=this.marginBox;
this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});
dojo.stopEvent(e);
},onMouseUp:function(e){
if(dojo.isWebKit&&dojo.dnd._isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){
this.destroy();
}
dojo.stopEvent(e);
},onFirstMove:function(){
var s=this.node.style,l,t,h=this.host;
switch(s.position){
case "relative":
case "absolute":
l=Math.round(parseFloat(s.left));
t=Math.round(parseFloat(s.top));
break;
default:
s.position="absolute";
var m=dojo.marginBox(this.node);
var b=dojo.doc.body;
var bs=dojo.getComputedStyle(b);
var bm=dojo._getMarginBox(b,bs);
var bc=dojo._getContentBox(b,bs);
l=m.l-(bc.l-bm.l);
t=m.t-(bc.t-bm.t);
break;
}
this.marginBox.l=l-this.marginBox.l;
this.marginBox.t=t-this.marginBox.t;
if(h&&h.onFirstMove){
h.onFirstMove(this);
}
dojo.disconnect(this.events.pop());
},destroy:function(){
dojo.forEach(this.events,dojo.disconnect);
var h=this.host;
if(h&&h.onMoveStop){
h.onMoveStop(this);
}
this.events=this.node=this.host=null;
}});
}
if(!dojo._hasResource["dojo.dnd.Moveable"]){
dojo._hasResource["dojo.dnd.Moveable"]=true;
dojo.provide("dojo.dnd.Moveable");
dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(node,_2e0){
this.node=dojo.byId(node);
if(!_2e0){
_2e0={};
}
this.handle=_2e0.handle?dojo.byId(_2e0.handle):null;
if(!this.handle){
this.handle=this.node;
}
this.delay=_2e0.delay>0?_2e0.delay:0;
this.skip=_2e0.skip;
this.mover=_2e0.mover?_2e0.mover:dojo.dnd.Mover;
this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];
},markupFactory:function(_2e1,node){
return new dojo.dnd.Moveable(node,_2e1);
},destroy:function(){
dojo.forEach(this.events,dojo.disconnect);
this.events=this.node=this.handle=null;
},onMouseDown:function(e){
if(this.skip&&dojo.dnd.isFormElement(e)){
return;
}
if(this.delay){
this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));
this._lastX=e.pageX;
this._lastY=e.pageY;
}else{
this.onDragDetected(e);
}
dojo.stopEvent(e);
},onMouseMove:function(e){
if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){
this.onMouseUp(e);
this.onDragDetected(e);
}
dojo.stopEvent(e);
},onMouseUp:function(e){
for(var i=0;i<2;++i){
dojo.disconnect(this.events.pop());
}
dojo.stopEvent(e);
},onSelectStart:function(e){
if(!this.skip||!dojo.dnd.isFormElement(e)){
dojo.stopEvent(e);
}
},onDragDetected:function(e){
new this.mover(this.node,e,this);
},onMoveStart:function(_2e9){
dojo.publish("/dnd/move/start",[_2e9]);
dojo.addClass(dojo.body(),"dojoMove");
dojo.addClass(this.node,"dojoMoveItem");
},onMoveStop:function(_2ea){
dojo.publish("/dnd/move/stop",[_2ea]);
dojo.removeClass(dojo.body(),"dojoMove");
dojo.removeClass(this.node,"dojoMoveItem");
},onFirstMove:function(_2eb){
},onMove:function(_2ec,_2ed){
this.onMoving(_2ec,_2ed);
var s=_2ec.node.style;
s.left=_2ed.l+"px";
s.top=_2ed.t+"px";
this.onMoved(_2ec,_2ed);
},onMoving:function(_2ef,_2f0){
},onMoved:function(_2f1,_2f2){
}});
}
if(!dojo._hasResource["start.Moveable"]){
dojo._hasResource["start.Moveable"]=true;
dojo.provide("start.Moveable");
dojo.declare("start.Moveable",dojo.dnd.Moveable,{DIRECTION_BUFFER:5,PLACEMENT_BUFFER:0,MARGIN_OFFSET:15,isFromTab:false,constructor:function(node,_2f4){
this.grid=_2f4.grid;
this.orginalLoc={parentNode:null,nextSibling:null};
this.previousPos={t:null,l:null};
this._direction={v:this.grid.direction.DOWN,h:this.grid.direction.RIGHT};
this._distance={v:0,h:0};
this._dragConnection=null;
},onMouseDown:function(e){
if(e.which){
if(e.which!=1){
return;
}
}
if(e.button){
if(e.button!=1){
return;
}
}
this.inherited(arguments);
},onMoveStart:function(_2f6,_2f7){
if(this.moving){
this.onMoveStop();
return;
}
if(dojo.isIE>=6){
var br=this.node.getBoundingClientRect();
var t=br.top+dojo.doc.documentElement.scrollTop;
var l=br.left;
}else{
var t=this.node.offsetTop;
var l=this.node.offsetLeft;
}
var w=this.node.offsetWidth;
this.moveable_width=w;
this.previousPos.t=t;
this.previousPos.l=l;
this.orginalLoc.parentNode=this.node.parentNode;
this.orginalLoc.nextSibling=this.node.nextSibling;
dojo.style(this.node,"position","absolute");
dojo.style(this.node,"top",(t-this.MARGIN_OFFSET)+"px");
dojo.style(this.node,"left",(l-this.MARGIN_OFFSET)+"px");
dojo.style(this.node,"width",w+"px");
this.grid.placeholder.replaceInsert(this.node,this.node.offsetHeight);
this._dragConnection=dojo.connect(this.node.ownerDocument,"onmousemove",this,"_autoScrollY");
this._scrollConnection=dojo.connect(this.node.ownerDocument,"onscroll",this,"onScroll");
this.grid.removeNode(this.node);
dojo.body().appendChild(this.node);
start.Moveable.superclass.onMoveStart.call(this,_2f6);
this.bottom_bound=dojo.byId("footer").offsetTop;
this.right_bound=dojo.byId("doc").clientWidth-(this.moveable_width*0.35);
this.left_bound=0-(this.moveable_width*0.5);
this.moving=true;
if(dojo.query("#page_con .start_page").length<1){
start.start.controls.changePage("start");
this.isFromTab=true;
}
},onScroll:function(){
this.grid.update();
},onMove:function(_2fc,_2fd){
if(this.moving==false){
this._cleanup();
return;
}
if(this.isFromTab){
if(dojo.query("#page_con .start_page").length<1){
return;
}
this.isFromTab=false;
if(start.start.tabContext){
var n=start.start.tabContext.getEntryPoint();
this.grid.placeholder.place(n,"high",this.node.offsetHeight);
this._distance.v=0;
this._distance.h=0;
this.grid.update();
}
return;
}
if(dojo.isIE){
if(!window.event.button){
this.onMoveStop();
return;
}
}else{
if(this.bottom_bound<_2fd.t){
return;
}
if(_2fd.l<this.left_bound){
_2fd.l=this.previousPos.l;
}
if(this.right_bound<_2fd.l){
_2fd.l=this.previousPos.l;
}
}
this._getDirection(_2fd);
if(Math.abs(this._distance.v)>this.PLACEMENT_BUFFER||Math.abs(this._distance.h)>this.PLACEMENT_BUFFER){
var loc=this.grid.getLocation(_2fd.t,_2fd.l,parseInt(_2fc.host.node.style.width),this._direction.v,this._direction.r);
if(loc){
this.grid.placeholder.place(loc[0].node,loc[1],this.node.offsetHeight);
this._distance.v=0;
this._distance.h=0;
}else{
}
}
start.Moveable.superclass.onMove.call(this,_2fc,_2fd);
this.previousPos=_2fd;
},onMoveStop:function(_300){
if(this.moving==false){
this._cleanup();
return;
}
start.Moveable.superclass.onMoveStop.call(this,_300);
if(this.grid.placeholder.isPlaced()){
this.grid.placeholder.replace(this.node);
this.grid.update();
}else{
dojo.place(this.node,(this.orginalLoc.nextSibling?this.orginalLoc.nextSibling:this.orginalLoc.parentNode),(this.orginalLoc.nextSibling?"before":"last"));
}
this.grid.addNode(this.node);
this.grid.update();
start.Utils.clear_style(this.node);
dojo.publish(start.topics.GRID_UPDATEORDER);
this._cleanup();
},_getDirection:function(_301){
this._distance.v+=this.previousPos.t-_301.t;
if(Math.abs(this._distance.v)>=this.DIRECTION_BUFFER){
if(this._distance.v<0){
this._direction.v=this.grid.direction.DOWN;
}else{
this._direction.v=this.grid.direction.UP;
}
this._distance.v=0;
}
this._distance.h+=this.previousPos.l-_301.l;
if(Math.abs(this._distance.h)>=this.DIRECTION_BUFFER){
if(this._distance.h<0){
this._direction.h=this.grid.direction.RIGHT;
}else{
this._direction.h=this.grid.direction.LEFT;
}
this._distance.h=0;
}
},_cleanup:function(){
dojo.disconnect(this._dragConnection);
dojo.disconnect(this._scrollConnection);
this.orginalLoc.parentNode=null;
this.orginalLoc.nextSibling=null;
this.moving=false;
},_autoScrollY:function(e){
var v=dojo.dnd.getViewport(),dx=0,dy=0;
if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=-dojo.dnd.V_AUTOSCROLL_VALUE;
}else{
if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){
dy=dojo.dnd.V_AUTOSCROLL_VALUE;
}
}
window.scrollBy(dx,dy);
}});
}
if(!dojo._hasResource["start.widgets.ModalWidget"]){
dojo._hasResource["start.widgets.ModalWidget"]=true;
dojo.provide("start.widgets.ModalWidget");
dojo.declare("start.ModalWidget",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div dojoattachevent=\"onclick:_onclick\">\n</div>\n",postCreate:function(){
if(this.opaque){
dojo.addClass(this.domNode,"opaqueModal");
}else{
dojo.addClass(this.domNode,"transparentModal");
}
if(dojo.isIE==6){
dojo.style(this.domNode,"top",dojo.doc.documentElement.scrollTop+"px");
this.onscroll=dojo.connect(dojo.body(),"onscroll",this,"_onscroll_handler");
}
this.inherited("postCreate",arguments);
},_onscroll_handler:function(){
dojo.style(this.domNode,"top",dojo.doc.documentElement.scrollTop+"px");
},_onclick:function(){
if(dojo.isFunction(this.cleanup)){
this.cleanup();
}
this.destroy();
},destroy:function(){
dojo.disconnect(this.onscroll);
this.inherited("destroy",arguments);
}});
}
if(!dojo._hasResource["start.widgets.ImageViewer"]){
dojo._hasResource["start.widgets.ImageViewer"]=true;
dojo.provide("start.widgets.ImageViewer");
dojo.declare("start.ImageViewer",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div dojoattachevent=\"onclick:_onclick\">\n  <div>\n    <h1 dojoattachpoint=\"title\"></h1>\n    <img src=\"\" dojoattachpoint=\"image\" />\n  </div>\n</div>\n",IMG_OFFSET_MARGIN:100,postCreate:function(){
this.modalWin=new start.ModalWidget({opaque:true,cleanup:dojo.hitch(this,"destroy")});
dojo.body().appendChild(this.modalWin.domNode);
this.image.src=this.url;
dojo.addClass(this.domNode,"imageviewer");
dojo.addClass(this.domNode,"hiddenImg");
if(this.link&&this.link!=""){
var a=this.title.appendChild(dojo.doc.createElement("a"));
a.href=this.link;
a.innerHTML=this.imgTitle;
a.target="_blank";
}else{
this.title.innerHTML=this.imgTitle;
}
if(dojo.isIE&&this.image.complete){
this.connect(this.image,"onresize","placeImg");
}else{
this.connect(this.image,"onload","placeImg");
}
if(dojo.isIE==6){
dojo.style(this.domNode,"top",(100+dojo.doc.documentElement.scrollTop)+"px");
this.onscroll=dojo.connect(dojo.body(),"onscroll",this,"_onscroll_handler");
}
this.inherited("postCreate",arguments);
},_onscroll_handler:function(){
dojo.style(this.domNode,"top",(dojo.doc.documentElement.scrollTop+this.IMG_OFFSET_MARGIN)+"px");
},placeImg:function(){
var _307=dojo.doc.documentElement.offsetWidth;
var _308=this.image.offsetWidth;
var _309=Math.floor((_307-(_308+this.IMG_OFFSET_MARGIN))/2);
dojo.style(this.domNode,"marginLeft",_309+"px");
dojo.style(this.domNode,"marginRight",_309+"px");
if(dojo.isIE===6){
dojo.style(this.domNode,"width",(dojo.doc.documentElement.offsetWidth-(_309+_308)));
}
dojo.removeClass(this.domNode,"hiddenImg");
},_onclick:function(){
this.modalWin.destroy();
this.destroy();
},destroy:function(){
dojo.disconnect(this.onscroll);
this.inherited("destroy",arguments);
}});
}
if(!dojo._hasResource["start.Registry"]){
dojo._hasResource["start.Registry"]=true;
dojo.provide("start.Registry");
start.Registry={TYPEDEF:{DEFAULT:{id:0,name:"default"},SITE:{id:1,name:"site"},FLICKR:{id:2,name:"flickr"},WEATHER:{id:3,name:"weather"},NEWS:{id:4,name:"news"},WOTD:{id:5,name:"wotd"},VIDEO:{id:6,name:"video"},ADD:{id:7,name:"add"},NOTEBOOK:{id:8,name:"notebook"},FEEDGROUP:{id:9,name:"feedgroup"},ITUNES:{id:10,name:"itunes"},PHOTOBUCKET:{id:11,name:"photobucket"},HTML:{id:12,name:"html"},LINKS:{id:13,name:"links"},CUSTOM:{id:14,name:"custom"}}};
}
if(!dojo._hasResource["start.ObjMgr"]){
dojo._hasResource["start.ObjMgr"]=true;
dojo.provide("start.ObjMgr");
dojo.declare("start.ObjMgr",null,{constructor:function(){
var _30a=this.buildRegistry();
this.map={};
this.cookie_version=parseInt(dojo.body().getAttribute("cookie_version"));
this.WIDGET_INFO=_30a.widgetIdMap;
this.COOKIE_OBJECTS=_30a.types;
this.COOKIE_OBJECTS.VERSION=100;
this.COOKIE_OBJECTS.THEME=101;
this.WIDGET_INFO["100"]={id:100,name:"version"};
this.WIDGET_INFO["101"]={id:101,name:"theme"};
},clear:function(){
this.map={};
},parseObjId:function(_30b){
var _30c=_30b.split("-");
if(_30c.length!=2){
return null;
}
return {type:parseInt(_30c[0]),fields:_30c[1].split(";"),data:_30c[1]};
},getObjData:function(_30d){
var obj=this.parseObjId(_30d);
if(obj){
switch(obj.type){
case this.COOKIE_OBJECTS.DEFAULT:
case this.COOKIE_OBJECTS.SITE:
case this.COOKIE_OBJECTS.CUSTOM:
case this.COOKIE_OBJECTS.NEWS:
case this.COOKIE_OBJECTS.WOTD:
return {type:obj.type,siteid:parseInt(obj.fields[0]),numItems:obj.fields.length<=1?5:parseInt(obj.fields[1]),expanded:obj.fields.length<=2?1:parseInt(obj.fields[2])};
case this.COOKIE_OBJECTS.WEATHER:
if(obj.fields.length>0&&obj.fields[obj.fields.length-1]=="C"){
obj.fields.splice(obj.fields.length-1,1);
obj.celcius=1;
}else{
obj.celcius=0;
}
return {type:obj.type,sites:obj.fields,data:obj.data,celcius:obj.celcius};
case this.COOKIE_OBJECTS.VERSION:
return {type:obj.type,version:parseInt(obj.fields[0])};
case this.COOKIE_OBJECTS.THEME:
return {type:obj.type,theme:parseInt(obj.fields[0])};
default:
return {type:obj.type,key:obj.fields[0],value:decodeURIComponent(obj.fields[1]),data:obj.data};
}
}
return null;
},isWeather:function(_30f){
return this.parseObjId(_30f).type===this.COOKIE_OBJECTS.WEATHER;
},isFlickr:function(_310){
return this.parseObjId(_310).type===this.COOKIE_OBJECTS.FLICKR;
},isCookieVersion:function(_311){
var obj=this.parseObjId(_311);
if(obj===null){
return false;
}
return obj.type==this.COOKIE_OBJECTS.VERSION;
},invalidCookieVersion:function(_313){
var obj=this.parseObjId(_313).fields[0];
return this.cookie_version!=parseInt(obj);
},createVersionObj:function(){
return this.COOKIE_OBJECTS.VERSION.toString()+"-"+this.cookie_version;
},createThemeObj:function(_315){
return this.COOKIE_OBJECTS.THEME.toString()+"-"+_315;
},createWeatherObj:function(_316,_317){
var _318="";
dojo.forEach(_316,function(id){
_318+=id+";";
});
if(_318.length==0){
_318+=";";
}
return this.COOKIE_OBJECTS.WEATHER.toString()+"-"+_318.substr(0,_318.length-1)+(_317?";C":"");
},createFlickrObj:function(key,_31b){
return this.COOKIE_OBJECTS.FLICKR.toString()+"-"+key+";"+encodeURIComponent(_31b);
},createNotebookObj:function(key,_31d){
return this.COOKIE_OBJECTS.NOTEBOOK.toString()+"-"+key+";"+encodeURIComponent(_31d);
},createFeedObj:function(_31e,_31f,_320,_321){
_31f=_31f!==undefined?_31f:5;
_320=_320!==undefined?_320:1;
_321=_321!==undefined?_321:this.COOKIE_OBJECTS.SITE;
return _321+"-"+_31e+";"+_31f+";"+_320;
},_objidToId:function(_322){
var obj=this.parseObjId(_322);
if(obj){
switch(obj.type){
case this.COOKIE_OBJECTS.DEFAULT:
case this.COOKIE_OBJECTS.SITE:
case this.COOKIE_OBJECTS.CUSTOM:
case this.COOKIE_OBJECTS.FEEDGROUP:
case this.COOKIE_OBJECTS.WOTD:
case this.COOKIE_OBJECTS.NEWS:
case this.COOKIE_OBJECTS.VIDEO:
case this.COOKIE_OBJECTS.THEME:
case this.COOKIE_OBJECTS.LINKS:
return this.WIDGET_INFO[obj.type].name+"."+obj.fields[0];
default:
return this.WIDGET_INFO[obj.type].name;
}
}else{
return null;
}
},sameObject:function(_324,_325){
return this._objidToId(_324)==this._objidToId(_325);
},add:function(_326,_327){
var id=this._objidToId(_326);
if(!id){
throw ("Invalid objid");
}
this.map[id]=_327;
},rem:function(_329){
var id=this._objidToId(_329);
if(!id){
throw ("Invalid objid");
}
delete this.map[id];
},get:function(_32b){
var id=this._objidToId(_32b);
if(!id){
throw ("Invalid objid");
}
return this.map[id];
},exists:function(_32d){
var id=this._objidToId(_32d);
return this.get(_32d)!==undefined;
},handleItemAdd:function(_32f,_330,_331){
var obj=this.parseObjId(_32f);
switch(obj.type){
case this.COOKIE_OBJECTS.DEFAULT:
case this.COOKIE_OBJECTS.SITE:
case this.COOKIE_OBJECTS.CUSTOM:
case this.COOKIE_OBJECTS.NEWS:
case this.COOKIE_OBJECTS.WOTD:
this.handleResize(_32f,parseInt(obj.fields[1]),_330,_331);
break;
default:
_330(null,_32f);
break;
}
},isType:function(_333,type){
var obj=this.parseObjId(_333);
if(obj&&this.parseObjId(_333).type===this.COOKIE_OBJECTS[type.toUpperCase()]){
return true;
}
return false;
},clearObjidData:function(_336){
var obj=this.parseObjId(_336);
return obj.type+"-";
},handleResize:function(_338,_339,_33a,_33b){
var obj=this.parseObjId(_338);
var _33d=_338;
switch(obj.type){
case this.COOKIE_OBJECTS.DEFAULT:
case this.COOKIE_OBJECTS.SITE:
case this.COOKIE_OBJECTS.CUSTOM:
case this.COOKIE_OBJECTS.NEWS:
case this.COOKIE_OBJECTS.WOTD:
case this.COOKIE_OBJECTS.VIDEO:
var _33e={siteid:obj.fields[0],format:"json",summary:1,num:_339};
_33d=this.createFeedObj(obj.fields[0],_339,obj.fields[2],obj.type);
var _33f=_33a===undefined?undefined:function(data){
return _33a(data,_33d);
};
start.io.post("preview",_33e).addCallbacks(_33f,_33b);
break;
default:
break;
}
return _33d;
},buildRegistry:function(){
var _341={},w={};
var _343=start.Registry.TYPEDEF;
for(var t in _343){
_341[t]=_343[t].id;
w[_343[t].id]=_343[t];
}
return {types:_341,widgetIdMap:w};
}});
}
if(!dojo._hasResource["start.Widget"]){
dojo._hasResource["start.Widget"]=true;
dojo.provide("start.Widget");
dojo.declare("start.Widget",[dijit._Widget,dijit._Container],{MAX_DRAG_HEIGHT:500,postCreate:function(){
this.inherited(arguments);
var _345;
if(this.replacementGrid){
_345=this.replacementGrid;
}else{
_345=start.start.grid;
}
var p={handle:dojo.query("h2",this.domNode)[0],grid:_345,autoScroll:false};
var node=this.domNode;
this.moveable=new start.Moveable(node,p);
this.toggleView={};
this.active_item=null;
this.containerNode=this.content=dojo.query(".widgetContents",node)[0];
this.toggleView.node=dojo.query(".toggleView",node)[0];
this.toggleView.visible=true;
this.connect(this.toggleView.node,"onclick","_toggleView");
dojo.query(".close",node).forEach(function(n){
this.connect(n,"onclick","_destroy");
},this);
start.start.objMgr.add(this.domNode.getAttribute("objid"),this);
dojo.removeClass(node,"loadingWidget");
},deactivate_active_item:function(){
this.active_item=null;
},_toggleView:function(e){
e.preventDefault();
if(this.toggleView.visible){
dojo.addClass(e.target,"toggleOpen");
dojo.addClass(this.content,"hiddenWidgetContent");
this.toggleView.visible=false;
}else{
dojo.removeClass(e.target,"toggleOpen");
dojo.removeClass(this.content,"hiddenWidgetContent");
this.toggleView.visible=true;
}
},close:function(){
this._destroy(null);
},_destroy:function(e){
if(e){
e.preventDefault();
}
if(this.moveable){
this.moveable.destroy();
this.moveable=null;
}
dojo.publish(start.topics.ITEMS_CLOSE,[{id:this.domNode.getAttribute("objid")}]);
dojo.publish(start.topics.GRID_NODE_REMOVE,[this.domNode]);
dojo.publish(start.topics.CONDUIT_REMOVEWIDGET,[this.domNode]);
this.destroy();
}});
}
if(!dojo._hasResource["start.BaseItem"]){
dojo._hasResource["start.BaseItem"]=true;
dojo.provide("start.BaseItem");
dojo.declare("start.BaseItem",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<li class=\"item has_layout\" date=\"\"></li>\n",postCreate:function(){
this.domNode.setAttribute("date",this.data.dateCreated);
this.domNode.setAttribute("title",this.data.title);
this.domNode.setAttribute("url",this.data.url);
this.domNode.setAttribute("descr",this.data.desc.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));
}});
}
if(!dojo._hasResource["start.BaseWidget"]){
dojo._hasResource["start.BaseWidget"]=true;
dojo.provide("start.BaseWidget");
dojo.declare("start.BaseWidget",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"base_widget has_layout\">\n  <div class=\"handleCon has_layout\"> \n    <div class=\"ie6_is_a_catastrophe has_layout\">\n      <h2 class=\"one\">\n        <img class=\"widget_title_icon\" dojoattachpoint=\"site_icon\" src=\"/b/icon?siteid=0\">\n        <span class=\"widget_title_text\" dojoattachpoint=\"site_title\"></span>\n      </h2> \n      <div class=\"widgetControls has_layout\">\n        <a class=\"menu hidden\" href=\"#\"></a>\n        <a class=\"toggleView\" href=\"#\"></a>\n        <a class=\"close\" href=\"#\"></a>\n      </div> \n    </div> \n  </div>\n  <div class=\"widgetContents has_layout\"> \n    <ul dojoattachpoint=\"base_items\"> \n    </ul> \n  </div> \n  <div class=\"dragger hidden\">&nbsp;</div> \n</div>\n",postCreate:function(){
var obj=start.start.objMgr.parseObjId(this.objid);
switch(obj.type){
case start.start.objMgr.COOKIE_OBJECTS.NOTEBOOK:
this.site_title.innerHTML="Google Notebook";
return;
case start.start.objMgr.COOKIE_OBJECTS.ADD:
this.site_title.innerHTML="Add Content";
return;
case start.start.objMgr.COOKIE_OBJECTS.FLICKR:
this.site_icon.setAttribute("src","/c/images/start/flickricon.gif");
this.site_title.innerHTML="Flickr";
break;
case start.start.objMgr.COOKIE_OBJECTS.WEATHER:
this.site_icon.setAttribute("src","/c/images/start/weathericon.gif");
this.site_title.innerHTML="Weather";
break;
case start.start.objMgr.COOKIE_OBJECTS.NEWS:
this.site_icon.setAttribute("src","/c/images/start/ask_logo_16x16.png");
this.site_title.innerHTML=start.translate.get("AskNews.Title");
break;
case start.start.objMgr.COOKIE_OBJECTS.VIDEO:
this.site_icon.setAttribute("src","/c/images/start/vimeoicon.gif");
this.site_title.innerHTML=start.translate.get("Video.Title");
break;
case start.start.objMgr.COOKIE_OBJECTS.PHOTOBUCKET:
this.site_icon.setAttribute("src","/b/icon?siteid=0");
this.site_title.innerHTML="Photobucket";
break;
case start.start.objMgr.COOKIE_OBJECTS.DEFAULT:
case start.start.objMgr.COOKIE_OBJECTS.FEED:
case start.start.objMgr.COOKIE_OBJECTS.WOTD:
default:
if(this.data&&this.data.sites){
this.site_icon.setAttribute("src","/b/icon?siteid="+this.data.sites[0].siteId);
this.site_title.innerHTML=this.data.sites[0].name;
}else{
break;
}
break;
dojo.addClass(this.domNode,"has_layout");
}
var l_,i_;
if(this.data&&this.data.items){
for(var i=0;i<this.data.items.length;i++){
l_=dojo.doc.createElement("li");
this.base_items.appendChild(l_);
i_=new start.BaseItem({data:this.data.items[i]},l_);
i_.startup();
}
}
}});
}
if(!dojo._hasResource["start.Tab"]){
dojo._hasResource["start.Tab"]=true;
dojo.provide("start.Tab");
dojo.declare("start.Tab",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"hidden tab\">\n  <h1 dojoattachpoint=\"tabTitle\">No content type selected.</h1>\n  <p class=\"instructions\">\n    Drag any of the widgets below to place on your startpage or click <a href=\"#\" dojoattachevent=\"onclick:_goBack\">cancel</a> to go back to your start page.\n  </p>\n  <div class=\"columns\">\n    <div class=\"column\" dojoattachpoint=\"columnl\">\n      <div class=\"gridBottom gridItem\">&nbsp;</div>\n    </div>\n    <div class=\"column\" dojoattachpoint=\"columnm\">\n      <div class=\"gridBottom gridItem\">&nbsp;</div>\n    </div>\n    <div class=\"column\" dojoattachpoint=\"columnr\">\n      <div class=\"gridBottom gridItem\">&nbsp;</div>\n    </div>\n  </div> \n</div>\n",IDENTITIES:{NO_TAB_ACTIVE:"none",TAB:"tab",ALTTAB:"alttab"},postCreate:function(){
if(!start.start.tabContext){
start.start.tabContext={activeTab:this.IDENTITIES.NO_TAB_ACTIVE,getAvailableTab:this.createTabFinder(),getEntryPoint:(function(){
return dojo.query("#columns #columnl .gridItem")[0];
}),tabs:[]};
}
this.columns={left:{node:this.columnl,widgetCount:0},middle:{node:this.columnm,widgetCount:0},right:{node:this.columnr,widgetCount:0}};
this.context=start.start.tabContext;
dojo.subscribe(start.topics.START_CHANGE_PAGE,this,"_page_change");
this.configure();
this.context.tabs.push(this);
},setTitle:function(_34f){
this.tabTitle.innerHTML=_34f;
},addWidget:function(_350){
var _351=this.getNextColumn();
dojo.place(_350,dojo.query(".gridBottom",_351.node)[0],"before");
_351.widgetCount++;
},clear:function(){
this.tabTitle.innerHTML="";
var c=dojo.query(".column div",this.domNode);
for(var i=0;i<c.length;i++){
if(!dojo.hasClass(c[i],"gridBottom")){
c[i].parentNode.removeChild(c[i]);
}
}
return;
},getNextColumn:function(){
var min;
min=Math.min(this.columns.left.widgetCount,Math.min(this.columns.middle.widgetCount,this.columns.right.widgetCount));
switch(min){
case this.columns.left.widgetCount:
return this.columns.left;
case this.columns.middle.widgetCount:
return this.columns.middle;
case this.columns.right.widgetCount:
return this.columns.right;
default:
return this.columns.left;
}
},createTabFinder:function(){
return (function(){
var c=start.start.tabContext;
for(var i=0;i<c.tabs.length;i++){
if(!c.tabs[i].isActive()){
return c.tabs[i];
}
}
});
},identify:function(){
return this.identity;
},isActive:function(){
return (this.identity===this.context.activeTab);
},configure:function(){
dojo.addClass(this.domNode,"tab_page");
this.identity=this.IDENTITIES.TAB;
},_launchPage:function(e){
dojo.stopEvent(e);
},_goBack:function(e){
dojo.stopEvent(e);
start.start.controls.changePage("start");
},_page_change:function(_359){
if(_359.type===this.identity){
this.context.activeTab=this.identity;
return;
}
for(var i in this.IDENTITIES){
if(_359.type===this.IDENTITIES[i]){
return;
}
}
this.context.activeTab=this.IDENTITIES.NO_TAB_ACTIVE;
}});
dojo.declare("start.AltTab",[start.Tab],{configure:function(){
dojo.addClass(this.domNode,"alttab_page");
this.identity=this.IDENTITIES.ALTTAB;
}});
}
if(!dojo._hasResource["ask.dom"]){
dojo._hasResource["ask.dom"]=true;
dojo.provide("ask.dom");
dojo.mixin(ask,{ascend:function(node,_35c){
node=dojo.byId(node);
var b=dojo.body();
while(node.nodeType!==1||!_35c(node)){
node=node.parentNode;
if(node===b){
return null;
}
}
return node;
},destroyChildren:function(node){
var _35f=node.childNodes.length;
while(node.hasChildNodes()){
dojo._destroyElement(node.firstChild);
}
return _35f;
},nodesFromText:function(str){
var d=document.createElement("div");
d.innerHTML=str;
return d.childNodes;
},hasTag:function(node,tag){
return (node&&node.tagName&&(node.tagName.toLowerCase()==tag.toLowerCase()));
},isInputElement:function(el){
return dojo.some(["input","select","textarea","button","option","label"],function(n){
return ask.hasTag(el,n);
});
}});
}
if(!dojo._hasResource["start.HeaderSkin"]){
dojo._hasResource["start.HeaderSkin"]=true;
dojo.provide("start.HeaderSkin");
dojo.declare("start.HeaderSkin",[dijit._Widget],{DEFAULT_THEME_ID:0,postCreate:function(){
this.inherited(arguments);
var node=this.domNode;
var _367=dojo.byId("peelPromo");
this.connect(this.domNode,"onmousedown","_handledragstart");
if(_367){
this.connect(_367,"onclick","_handlepeelme");
}
dojo.subscribe(start.topics.THEME_CHANGE,this,"hidePromo");
},hidePromo:function(e){
var _369=dojo.byId("peelPromo");
if(_369){
_369.style.display=(e.id==this.DEFAULT_THEME_ID)?"block":"none";
}
},_handlepeelme:function(e){
dojo.publish(start.topics.THEME_SHOWMENU);
},_moving:function(e){
var pos;
if(dojo.isIE){
if(!window.event.button){
this._handledragend(e);
return;
}
}
dojo.stopEvent(e);
if(e.pageX||e.pageY){
pos={x:e.pageX,y:e.pageY};
}else{
pos={x:e.clientX+dojo.body().scrollLeft-dojo.body().clientLeft,y:e.clientY+dojo.body().scrollTop-dojo.body().clientTop};
}
if(this.reset){
this.reset=false;
this.old_pos=pos;
}
this.curr_image={x:this.last_image.x,y:this.last_image.y-(this.old_pos.y-pos.y)};
if(this.curr_image.y>0){
this.curr_image.y=0;
}
if(this.curr_image.y<this.min_y){
this.curr_image.y=this.min_y;
}
dojo.style(this.header,"backgroundPosition","50% "+this.curr_image.y+"px");
},_handledragstart:function(e){
if(ask.isInputElement(e.target)){
return;
}
dojo.stopEvent(e);
this.header=dojo.byId("header");
if(dojo.style(this.header,"backgroundImage")==="none"||!dojo.hasClass(this.header,"draggable")){
return;
}
this.last_image={x:parseInt(this.header.getAttribute("x-pos")),y:parseInt(this.header.getAttribute("y-pos")),width:parseInt(this.header.getAttribute("image-width")),height:parseInt(this.header.getAttribute("image-height"))};
this.curr_image=this.last_image;
this.min_y=this.header.offsetHeight-parseInt(this.last_image.height);
this.reset=true;
if(this.wm_connection){
dojo.disconnect(this.wm_connection);
}
if(this.dc_connection){
dojo.disconnect(this.dc_connection);
}
if(dojo.isIE){
this.wm_connection=dojo.connect(dojo.body(),"onmousemove",this,"_moving");
this.dc_connection=dojo.connect(dojo.body(),"onmouseup",this,"_handledragend");
}else{
this.wm_connection=dojo.connect(window,"onmousemove",this,"_moving");
this.dc_connection=dojo.connect(window,"onmouseup",this,"_handledragend");
}
},_handledragend:function(e){
this.header.setAttribute("x-pos",this.curr_image.x);
this.header.setAttribute("y-pos",this.curr_image.y);
dojo.cookie("BkgndY",this.curr_image.y,{expires:(365*5),path:"/"});
dojo.stopEvent(e);
dojo.disconnect(this.wm_connection);
dojo.disconnect(this.dc_connection);
this.wm_connection=null;
this.dc_connection=null;
}});
}
if(!dojo._hasResource["start.Index"]){
dojo._hasResource["start.Index"]=true;
dojo.provide("start.Index");
dojo.declare("start.Index",null,{NONE:-1,constructor:function(){
this._widget_map={};
},add:function(_36f,_370){
this._widget_map[_36f]=_370;
},rem:function(_371){
delete this._widget_map[i];
},set:function(_372){
var _373=this._widget_map[_372];
this._widget_map[_372]=_373;
},get:function(_374){
return this._widget_map[_374];
}});
}
if(!dojo._hasResource["dojo.fx.Toggler"]){
dojo._hasResource["dojo.fx.Toggler"]=true;
dojo.provide("dojo.fx.Toggler");
dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){
var _t=this;
dojo.mixin(_t,args);
_t.node=args.node;
_t._showArgs=dojo.mixin({},args);
_t._showArgs.node=_t.node;
_t._showArgs.duration=_t.showDuration;
_t.showAnim=_t.showFunc(_t._showArgs);
_t._hideArgs=dojo.mixin({},args);
_t._hideArgs.node=_t.node;
_t._hideArgs.duration=_t.hideDuration;
_t.hideAnim=_t.hideFunc(_t._hideArgs);
dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));
dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));
},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_377){
return this.showAnim.play(_377||0);
},hide:function(_378){
return this.hideAnim.play(_378||0);
}});
}
if(!dojo._hasResource["dojo.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");
(function(){
var d=dojo,_37a={_fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,args||[]);
}
return this;
}};
var _37d=function(_37e){
this._index=-1;
this._animations=_37e||[];
this._current=this._onAnimateCtx=this._onEndCtx=null;
this.duration=0;
d.forEach(this._animations,function(a){
this.duration+=a.duration;
if(a.delay){
this.duration+=a.delay;
}
},this);
};
d.extend(_37d,{_onAnimate:function(){
this._fire("onAnimate",arguments);
},_onEnd:function(){
d.disconnect(this._onAnimateCtx);
d.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;
if(this._index+1==this._animations.length){
this._fire("onEnd");
}else{
this._current=this._animations[++this._index];
this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");
this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");
this._current.play(0,true);
}
},play:function(_380,_381){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_381&&this._current.status()=="playing"){
return this;
}
var _382=d.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_383=d.connect(this._current,"onBegin",this,function(arg){
this._fire("onBegin",arguments);
}),_385=d.connect(this._current,"onPlay",this,function(arg){
this._fire("onPlay",arguments);
d.disconnect(_382);
d.disconnect(_383);
d.disconnect(_385);
});
if(this._onAnimateCtx){
d.disconnect(this._onAnimateCtx);
}
this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");
if(this._onEndCtx){
d.disconnect(this._onEndCtx);
}
this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");
this._current.play.apply(this._current,arguments);
return this;
},pause:function(){
if(this._current){
var e=d.connect(this._current,"onPause",this,function(arg){
this._fire("onPause",arguments);
d.disconnect(e);
});
this._current.pause();
}
return this;
},gotoPercent:function(_389,_38a){
this.pause();
var _38b=this.duration*_389;
this._current=null;
d.some(this._animations,function(a){
if(a.duration<=_38b){
this._current=a;
return true;
}
_38b-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_38b/this._current.duration,_38a);
}
return this;
},stop:function(_38d){
if(this._current){
if(_38d){
for(;this._index+1<this._animations.length;++this._index){
this._animations[this._index].stop(true);
}
this._current=this._animations[this._index];
}
var e=d.connect(this._current,"onStop",this,function(arg){
this._fire("onStop",arguments);
d.disconnect(e);
});
this._current.stop();
}
return this;
},status:function(){
return this._current?this._current.status():"stopped";
},destroy:function(){
if(this._onAnimateCtx){
d.disconnect(this._onAnimateCtx);
}
if(this._onEndCtx){
d.disconnect(this._onEndCtx);
}
}});
d.extend(_37d,_37a);
dojo.fx.chain=function(_390){
return new _37d(_390);
};
var _391=function(_392){
this._animations=_392||[];
this._connects=[];
this._finished=0;
this.duration=0;
d.forEach(_392,function(a){
var _394=a.duration;
if(a.delay){
_394+=a.delay;
}
if(this.duration<_394){
this.duration=_394;
}
this._connects.push(d.connect(a,"onEnd",this,"_onEnd"));
},this);
this._pseudoAnimation=new d._Animation({curve:[0,1],duration:this.duration});
var self=this;
d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){
self._connects.push(d.connect(self._pseudoAnimation,evt,function(){
self._fire(evt,arguments);
}));
});
};
d.extend(_391,{_doAction:function(_397,args){
d.forEach(this._animations,function(a){
a[_397].apply(a,args);
});
return this;
},_onEnd:function(){
if(++this._finished==this._animations.length){
this._fire("onEnd");
}
},_call:function(_39a,args){
var t=this._pseudoAnimation;
t[_39a].apply(t,args);
},play:function(_39d,_39e){
this._finished=0;
this._doAction("play",arguments);
this._call("play",arguments);
return this;
},pause:function(){
this._doAction("pause",arguments);
this._call("pause",arguments);
return this;
},gotoPercent:function(_39f,_3a0){
var ms=this.duration*_39f;
d.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_3a0);
});
this._call("gotoPercent",arguments);
return this;
},stop:function(_3a3){
this._doAction("stop",arguments);
this._call("stop",arguments);
return this;
},status:function(){
return this._pseudoAnimation.status();
},destroy:function(){
d.forEach(this._connects,dojo.disconnect);
}});
d.extend(_391,_37a);
dojo.fx.combine=function(_3a4){
return new _391(_3a4);
};
dojo.fx.wipeIn=function(args){
args.node=d.byId(args.node);
var node=args.node,s=node.style,o;
var anim=d.animateProperty(d.mixin({properties:{height:{start:function(){
o=s.overflow;
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s.height="1px";
s.display="";
s.visibility="";
return 1;
}else{
var _3aa=d.style(node,"height");
return Math.max(_3aa,1);
}
},end:function(){
return node.scrollHeight;
}}}},args));
d.connect(anim,"onEnd",function(){
s.height="auto";
s.overflow=o;
});
return anim;
};
dojo.fx.wipeOut=function(args){
var node=args.node=d.byId(args.node),s=node.style,o;
var anim=d.animateProperty(d.mixin({properties:{height:{end:1}}},args));
d.connect(anim,"beforeBegin",function(){
o=s.overflow;
s.overflow="hidden";
s.display="";
});
d.connect(anim,"onEnd",function(){
s.overflow=o;
s.height="auto";
s.display="none";
});
return anim;
};
dojo.fx.slideTo=function(args){
var node=args.node=d.byId(args.node),top=null,left=null;
var init=(function(n){
return function(){
var cs=d.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=d.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var anim=d.animateProperty(d.mixin({properties:{top:args.top||0,left:args.left||0}},args));
d.connect(anim,"beforeBegin",anim,init);
return anim;
};
})();
}
if(!dojo._hasResource["start.fx"]){
dojo._hasResource["start.fx"]=true;
dojo.provide("start.fx");
start.fx.fadingWipeOut=function(node,_3bb){
_3bb=_3bb||300;
var args={node:node,duration:_3bb};
return dojo.fx.combine([dojo.fx.wipeOut(args),dojo.fadeOut(args)]);
};
start.fx.fadingWipeIn=function(node,_3be){
_3be=_3be||300;
var args={node:node,duration:_3be};
return dojo.fx.combine([dojo.fx.wipeIn(args),dojo.fadeIn(args)]);
};
}
if(!dojo._hasResource["start.Notification"]){
dojo._hasResource["start.Notification"]=true;
dojo.provide("start.Notification");
dojo.declare("start.Notification",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"notification hidden has_layout\">\n  <p dojoattachpoint=\"notice_\"></p>&nbsp;\n  (<a href=\"#\" dojoattachevent=\"onclick:_onclick\">Close</a>)\n</div>\n<br style=\"clear:both;\"/>\n",notify:function(_3c0){
var a=start.fx.fadingWipeIn(this.domNode);
dojo.connect(a,"beforeBegin",this,this._show);
this.notice_.innerHTML=_3c0;
a.play();
},_onclick:function(e){
dojo.stopEvent(e);
var a=start.fx.fadingWipeOut(this.domNode);
dojo.connect(a,"onEnd",this,this._hide);
a.play();
},_hide:function(){
dojo.addClass(this.domNode,"hidden");
if(dojo.isIE){
this.domNode.style.setAttribute("cssText","");
}else{
this.domNode.setAttribute("style","");
}
start.start.refresh_columns();
},_show:function(){
dojo.removeClass(this.domNode,"hidden");
if(dojo.isIE){
this.domNode.style.setAttribute("cssText","");
}else{
this.domNode.setAttribute("style","");
}
}});
}
if(!dojo._hasResource["start.Placeholder"]){
dojo._hasResource["start.Placeholder"]=true;
dojo.provide("start.Placeholder");
dojo.declare("start.Placeholder",null,{constructor:function(){
this.placed=false;
this.loc={node:null,high:null};
this.node=dojo.doc.createElement("div");
dojo.addClass(this.node,"placeholder");
dojo.style(this.node,"display","none");
dojo.body().appendChild(this.node);
},place:function(_3c4,high,_3c6){
if(_3c4==this.loc.node&&high==this.loc.high){
return;
}
if(!dojo.hasClass(_3c4.parentNode,"column")){
return;
}
this._removeIfPlaced();
dojo.place(this.node,_3c4,(high?"before":"after"));
this.loc.node=_3c4;
this.loc.high=high;
this.placed=true;
dojo.style(this.node,"height",_3c6+"px");
dojo.style(this.node,"display","block");
},replaceInsert:function(node,_3c8){
this._removeIfPlaced();
node.parentNode.replaceChild(this.node,node);
this.placed=true;
dojo.style(this.node,"height",_3c8+"px");
dojo.style(this.node,"display","block");
},replace:function(node){
dojo.style(this.node,"display","none");
this.node.parentNode.replaceChild(node,this.node);
dojo.body().appendChild(this.node);
this._cleanup();
},isPlaced:function(){
return this.placed;
},remove:function(){
this._removeIfPlaced();
},_removeIfPlaced:function(){
if(this.placed){
dojo.style(this.node,"display","none");
this.node.parentNode.removeChild(this.node);
dojo.body().appendChild(this.node);
this._cleanup();
}
},_cleanup:function(){
this.placed=false;
this.loc.high=null;
this.loc.node=null;
}});
}
if(!dojo._hasResource["start.Pagegrid"]){
dojo._hasResource["start.Pagegrid"]=true;
dojo.provide("start.Pagegrid");
dojo.declare("start.Pagegrid",null,{direction:{UP:0,DOWN:1,LEFT:2,RIGHT:3},WIDTH_BUFFER:20,MIN_LEFT_COLUMN_WIDTH:50,LEFT_COLUMN_POS:20,constructor:function(){
this.grid=[];
this.placeholder=new start.Placeholder();
this.overNode=null;
dojo.subscribe(start.topics.GRID_CHANGE,this,"update");
dojo.subscribe(start.topics.GRID_NODE_REMOVE,this,"removeNode");
dojo.subscribe(start.topics.GRID_UPDATEORDER,this,"updateOrder");
},addNode:function(node){
this.grid.push({node:node,t:null,l:null,w:null,h:null});
},updateOrder:function(func){
var that=this;
setTimeout(function(){
var _3cd=that.calcOrder();
dojo.publish(start.topics.CONDUIT_UPDATEORDER,[_3cd,func]);
},0);
},calcOrder:function(){
var _3ce=[];
dojo.forEach(this.grid,function(node){
_3ce.push(node.node);
});
_3ce.sort(function(a,b){
return a.offsetTop-b.offsetTop;
});
return _3ce;
},removeNode:function(node){
var t=this.grid;
this.grid=[];
for(var i=0;i<t.length;i++){
if(t[i].node!=node){
this.addNode(t[i].node);
}
}
this.update();
},update:function(){
var _3d5=0;
dojo.forEach(this.grid,function(_3d6){
if(dojo.isIE>=6){
var br=_3d6.node.getBoundingClientRect();
_3d6.t=br.top+dojo.doc.documentElement.scrollTop;
_3d6.l=br.left;
}else{
_3d6.t=_3d6.node.offsetTop;
_3d6.l=_3d6.node.offsetLeft;
}
if(_3d5===0){
_3d5=_3d6.t;
}else{
if(_3d5>_3d6.t){
_3d5=_3d6.t;
}
}
_3d6.w=_3d6.node.offsetWidth;
_3d6.h=_3d6.node.offsetHeight;
});
},getLocation:function(t,l,w,_3db,_3dc){
var n=null;
if(this.overNode){
dojo.removeClass(this.overNode,"over");
}
this.overNode=null;
var _r;
var _b;
var _t;
var _l;
var _3e2={};
var lftR=[];
var high=false;
var _3e5=true;
if(l<this.MIN_LEFT_COLUMN_WIDTH){
l=this.LEFT_COLUMN_POS;
}
for(var i=0;i<this.grid.length;i++){
_l=(this.grid[i].l-Math.floor(w/2));
if(_l<0){
_l=0;
}
_t=this.grid[i].t;
_r=_l+this.grid[i].w-this.WIDTH_BUFFER;
_b=_t+this.grid[i].h;
if(!_3e2[_l]){
_3e2[_l]={};
_3e2[_l].tp=99999;
_3e2[_l].btm=0;
lftR.push(parseInt(_l));
}
if(_t<=_3e2[_l].tp){
_3e2[_l].tp=_t;
_3e2[_l].t=this.grid[i];
}
if(_b>=_3e2[_l].btm){
_3e2[_l].h=this.grid[i].h;
_3e2[_l].b=this.grid[i];
_3e2[_l].btm=_b;
}
if(Math.abs(l-_r)<200){
_3e5=false;
}
if((t>_t)&&(t<_b)&&(l>_l)&&(l<_r)){
if(_3db===this.direction.UP){
high=true;
}
n=[this.grid[i],high];
}
}
if(n&&dojo.hasClass(n[0].node,"gridBottom")){
n=null;
}
if(!n){
lftR.sort(function(a,b){
if(a>b){
return 1;
}
if(a<b){
return -1;
}
return 0;
});
if(l===0||l<lftR[0]||(l>lftR[0]&&l<lftR[1])){
l=lftR[0];
}else{
if(l>lftR[2]){
l=lftR[2];
}else{
l=lftR[1];
}
}
if(t>(_3e2[l].btm)){
n=[_3e2[l].b,true];
}else{
if(t<_3e2[l].tp){
n=[_3e2[l].t,true];
}
}
}
if(!n){
}
if(_3e5){
this.update();
}
return n;
}});
}
if(!dojo._hasResource["dojo.regexp"]){
dojo._hasResource["dojo.regexp"]=true;
dojo.provide("dojo.regexp");
dojo.regexp.escapeString=function(str,_3ea){
return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){
if(_3ea&&_3ea.indexOf(ch)!=-1){
return ch;
}
return "\\"+ch;
});
};
dojo.regexp.buildGroupRE=function(arr,re,_3ee){
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("|"),_3ee);
};
dojo.regexp.group=function(_3f1,_3f2){
return "("+(_3f2?"?:":"")+_3f1+")";
};
}
if(!dojo._hasResource["dojo.cookie"]){
dojo._hasResource["dojo.cookie"]=true;
dojo.provide("dojo.cookie");
dojo.cookie=function(name,_3f4,_3f5){
var c=document.cookie;
if(arguments.length==1){
var _3f7=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));
return _3f7?decodeURIComponent(_3f7[1]):undefined;
}else{
_3f5=_3f5||{};
var exp=_3f5.expires;
if(typeof exp=="number"){
var d=new Date();
d.setTime(d.getTime()+exp*24*60*60*1000);
exp=_3f5.expires=d;
}
if(exp&&exp.toUTCString){
_3f5.expires=exp.toUTCString();
}
_3f4=encodeURIComponent(_3f4);
var _3fa=name+"="+_3f4,_3fb;
for(_3fb in _3f5){
_3fa+="; "+_3fb;
var _3fc=_3f5[_3fb];
if(_3fc!==true){
_3fa+="="+_3fc;
}
}
document.cookie=_3fa;
}
};
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["dojox.fx._base"]){
dojo._hasResource["dojox.fx._base"]=true;
dojo.provide("dojox.fx._base");
dojo.mixin(dojox.fx,{anim:dojo.anim,animateProperty:dojo.animateProperty,fadeTo:dojo._fade,fadeIn:dojo.fadeIn,fadeOut:dojo.fadeOut,combine:dojo.fx.combine,chain:dojo.fx.chain,slideTo:dojo.fx.slideTo,wipeIn:dojo.fx.wipeIn,wipeOut:dojo.fx.wipeOut});
dojox.fx.sizeTo=function(args){
var node=args.node=dojo.byId(args.node);
var _3ff=args.method||"chain";
if(!args.duration){
args.duration=500;
}
if(_3ff=="chain"){
args.duration=Math.floor(args.duration/2);
}
var top,_401,left,_403,_404,_405=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
_404=parseInt(cs.width);
_405=parseInt(cs.height);
_403=left-Math.floor((args.width-_404)/2);
_401=top-Math.floor((args.height-_405)/2);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var _40b=dojo.animateProperty(dojo.mixin({properties:{height:{start:_405,end:args.height||0,unit:"px"},top:{start:top,end:_401}}},args));
var _40c=dojo.animateProperty(dojo.mixin({properties:{width:{start:_404,end:args.width||0,unit:"px"},left:{start:left,end:_403}}},args));
var anim=dojo.fx[(args.method=="combine"?"combine":"chain")]([_40b,_40c]);
dojo.connect(anim,"beforeBegin",anim,init);
return anim;
};
dojox.fx.slideBy=function(args){
var node=args.node=dojo.byId(args.node);
var top=null;
var left=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var _417=dojo.animateProperty(dojo.mixin({properties:{top:top+(args.top||0),left:left+(args.left||0)}},args));
dojo.connect(_417,"beforeBegin",_417,init);
return _417;
};
dojox.fx.crossFade=function(args){
if(dojo.isArray(args.nodes)){
var _419=args.nodes[0]=dojo.byId(args.nodes[0]);
var op1=dojo.style(_419,"opacity");
var _41b=args.nodes[1]=dojo.byId(args.nodes[1]);
var op2=dojo.style(_41b,"opacity");
var _41d=dojo.fx.combine([dojo[(op1==0?"fadeIn":"fadeOut")](dojo.mixin({node:_419},args)),dojo[(op1==0?"fadeOut":"fadeIn")](dojo.mixin({node:_41b},args))]);
return _41d;
}else{
return false;
}
};
dojox.fx.highlight=function(args){
var node=args.node=dojo.byId(args.node);
args.duration=args.duration||400;
var _420=args.color||"#ffff99";
var _421=dojo.style(node,"backgroundColor");
var _422=(_421=="transparent"||_421=="rgba(0, 0, 0, 0)")?_421:false;
var anim=dojo.animateProperty(dojo.mixin({properties:{backgroundColor:{start:_420,end:_421}}},args));
if(_422){
dojo.connect(anim,"onEnd",anim,function(){
node.style.backgroundColor=_422;
});
}
return anim;
};
dojox.fx.wipeTo=function(args){
args.node=dojo.byId(args.node);
var node=args.node,s=node.style;
var dir=(args.width?"width":"height");
var _428=args[dir];
var _429={};
_429[dir]={start:function(){
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s[dir]="1px";
s.display="";
s.visibility="";
return 1;
}else{
var now=dojo.style(node,dir);
return Math.max(now,1);
}
},end:_428,unit:"px"};
var anim=dojo.animateProperty(dojo.mixin({properties:_429},args));
return anim;
};
}
if(!dojo._hasResource["start.Base"]){
dojo._hasResource["start.Base"]=true;
dojo.provide("start.Base");
dojo.declare("start.Base",[dijit._Widget,dijit._Contained,dijit._Container],{startup:function(){
if(this._started){
return;
}
this._started=true;
},postMixInProperties:function(){
this.inherited(arguments);
this.loadStrings();
},strings:null,loadStrings:function(){
if(this.strings){
dojo.forEach(this.strings.items,this._translate,this);
}
},_translate:function(n){
var s=start.translate.get(this.strings.prefix+"."+n);
if(!s){
s=start.translate.get(n)||"";
n=n.substring(n.lastIndexOf(".")+1);
}
this[n]=s;
},_startChild:function(c){
if(c){
c.startup();
}
}});
}
if(!dojo._hasResource["dojo.fx.easing"]){
dojo._hasResource["dojo.fx.easing"]=true;
dojo.provide("dojo.fx.easing");
dojo.fx.easing={linear:function(n){
return n;
},quadIn:function(n){
return Math.pow(n,2);
},quadOut:function(n){
return n*(n-2)*-1;
},quadInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,2)/2;
}
return -1*((--n)*(n-2)-1)/2;
},cubicIn:function(n){
return Math.pow(n,3);
},cubicOut:function(n){
return Math.pow(n-1,3)+1;
},cubicInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,3)/2;
}
n-=2;
return (Math.pow(n,3)+2)/2;
},quartIn:function(n){
return Math.pow(n,4);
},quartOut:function(n){
return -1*(Math.pow(n-1,4)-1);
},quartInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,4)/2;
}
n-=2;
return -1/2*(Math.pow(n,4)-2);
},quintIn:function(n){
return Math.pow(n,5);
},quintOut:function(n){
return Math.pow(n-1,5)+1;
},quintInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,5)/2;
}
n-=2;
return (Math.pow(n,5)+2)/2;
},sineIn:function(n){
return -1*Math.cos(n*(Math.PI/2))+1;
},sineOut:function(n){
return Math.sin(n*(Math.PI/2));
},sineInOut:function(n){
return -1*(Math.cos(Math.PI*n)-1)/2;
},expoIn:function(n){
return (n==0)?0:Math.pow(2,10*(n-1));
},expoOut:function(n){
return (n==1)?1:(-1*Math.pow(2,-10*n)+1);
},expoInOut:function(n){
if(n==0){
return 0;
}
if(n==1){
return 1;
}
n=n*2;
if(n<1){
return Math.pow(2,10*(n-1))/2;
}
--n;
return (-1*Math.pow(2,-10*n)+2)/2;
},circIn:function(n){
return -1*(Math.sqrt(1-Math.pow(n,2))-1);
},circOut:function(n){
n=n-1;
return Math.sqrt(1-Math.pow(n,2));
},circInOut:function(n){
n=n*2;
if(n<1){
return -1/2*(Math.sqrt(1-Math.pow(n,2))-1);
}
n-=2;
return 1/2*(Math.sqrt(1-Math.pow(n,2))+1);
},backIn:function(n){
var s=1.70158;
return Math.pow(n,2)*((s+1)*n-s);
},backOut:function(n){
n=n-1;
var s=1.70158;
return Math.pow(n,2)*((s+1)*n+s)+1;
},backInOut:function(n){
var s=1.70158*1.525;
n=n*2;
if(n<1){
return (Math.pow(n,2)*((s+1)*n-s))/2;
}
n-=2;
return (Math.pow(n,2)*((s+1)*n+s)+2)/2;
},elasticIn:function(n){
if(n==0||n==1){
return n;
}
var p=0.3;
var s=p/4;
n=n-1;
return -1*Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p);
},elasticOut:function(n){
if(n==0||n==1){
return n;
}
var p=0.3;
var s=p/4;
return Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p)+1;
},elasticInOut:function(n){
if(n==0){
return 0;
}
n=n*2;
if(n==2){
return 1;
}
var p=0.3*1.5;
var s=p/4;
if(n<1){
n-=1;
return -0.5*(Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p));
}
n-=1;
return 0.5*(Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p))+1;
},bounceIn:function(n){
return (1-dojo.fx.easing.bounceOut(1-n));
},bounceOut:function(n){
var s=7.5625;
var p=2.75;
var l;
if(n<(1/p)){
l=s*Math.pow(n,2);
}else{
if(n<(2/p)){
n-=(1.5/p);
l=s*Math.pow(n,2)+0.75;
}else{
if(n<(2.5/p)){
n-=(2.25/p);
l=s*Math.pow(n,2)+0.9375;
}else{
n-=(2.625/p);
l=s*Math.pow(n,2)+0.984375;
}
}
}
return l;
},bounceInOut:function(n){
if(n<0.5){
return dojo.fx.easing.bounceIn(n*2)/2;
}
return (dojo.fx.easing.bounceOut(n*2-1)/2)+0.5;
}};
}
if(!dojo._hasResource["dojox.fx.easing"]){
dojo._hasResource["dojox.fx.easing"]=true;
dojo.provide("dojox.fx.easing");
dojo.deprecated("dojox.fx.easing","Upgraded to Core, use dojo.fx.easing instead","2.0");
dojox.fx.easing=dojo.fx.easing;
}
if(!dojo._hasResource["start.SearchBox"]){
dojo._hasResource["start.SearchBox"]=true;
dojo.provide("start.SearchBox");
dojo.declare("start.SearchBox",[start.Base],{DEFAULT_THEME_ID:0,postCreate:function(){
this.inherited(arguments);
var node=this.domNode;
this.origin=parseInt(dojo.body().getAttribute("origin"));
this.gcht=dojo.body().getAttribute("gcht");
if(this.origin==0){
this.origin=start.start.searchorigin;
}
this.qsrc=2435;
this.searchHistory=[];
for(var x=0;x<3;x++){
var sh=dojo.cookie("searchHistory"+x);
if(sh){
this.searchHistory.push(sh);
}
}
this.buildHistory();
this.searchType="n_web";
this.lastquery="";
dojo.query("form",node).forEach(function(n){
this.connect(n,"onsubmit","handleSubmit");
},this);
dojo.query("a",node).forEach(function(n){
this.connect(n,"onclick","handleClick");
},this);
dojo.query("div.navButton",node).forEach(function(n){
this.connect(n,"onclick","handleClick");
},this);
var _460=dojo.byId("asklogoCon");
if(_460){
this.connect(_460,"onclick","handleClick");
}
this.connect(dojo.byId("q"),"onkeyup","handleChange");
this.connect(dojo.byId("qbox"),"onclick","ssDisable");
this.connect(dojo.byId("askskinico"),"onclick",function(){
this.doSkinsButton();
});
dojo.subscribe(start.topics.THEME_SHOWMENU,this,"doSkinsButton");
if(window.branding.cobranded==1){
this.moveLogoArrow();
dojo.style("qconnvr","top","0px");
dojo.style("qconn","left","20px");
dojo.style("qconn","display","block");
dojo.addClass(dojo.byId("n_web").firstChild,"navSelected");
dojo.style("qconnvr","display","none");
}
},ssDisable:function(e){
var id=e.target.id;
if(id=="ssdisable"){
dojo.cookie("sp_ss","off",{domain:".ask.com"});
}
},_addNewSite:function(data){
if(dojo.exists("results",data)){
if(data.results.length>0&&data.results[0].rset&&data.results[0].rset.length>0){
var l_=data.results[0].rset[0];
var obj=start.start.objMgr.createFeedObj(l_.siteId);
if(!start.start.objMgr.exists(obj)){
dojo.publish(start.topics.CONDUIT_ADDWIDGET,[obj,dojo.hitch(this,"_handle_widget_add")]);
}else{
window.alert("You already have this widget");
}
}
}
},_handle_widget_add:function(data,_467){
var n=dojo.doc.createElement("div");
var t_=new start.BaseWidget({data:data,objid:_467},n);
t_.startup();
var n=dojo.doc.createElement("div");
n.appendChild(t_.domNode);
dojo.addClass(n,"sp_widget");
dojo.addClass(n,"gridItem");
n.setAttribute("objid",_467);
n.setAttribute("playentryid",(data&&data.widgets&&data.widgets[0])?data.widgets[0].playentryId:0);
var w=new start.Widget({},n);
w.startup();
var _46b=start.start.get_next_column();
dojo.place(w.domNode,dojo.query(".gridBottom",_46b)[0],"before");
start.start.grid.addNode(w.domNode);
start.start.grid.update();
dojo.publish(start.topics.GRID_UPDATEORDER);
},_addNewSiteFailure:function(e){
window.alert("A problem occurred communicating with the server.");
},querySavedSearch:function(q){
var _46e={format:"json",q:"http://www.bloglines.com/search?q="+q+"&ql=en&s=f&pop=l&news=m&format=rss",searchtype:"saved"};
start.io.post("search",_46e).addCallbacks(dojo.hitch(this,"_addNewSite"),dojo.hitch(this,"_addNewSiteFailure"));
},handleSearchHistory:function(e){
var a=e.target.id.split(".");
if(a.length==2&&a[0]=="searchHistory"){
dojo.stopEvent(e);
this.querySavedSearch(this.searchHistory[parseInt(a[1])]);
}else{
if(a.length==2&&a[0]=="histgo"){
dojo.stopEvent(e);
this.doSearch(this.searchHistory[parseInt(a[1])],true);
}
}
},addToHistory:function(q){
return;
var s=dojo.cookie("searchHistory1");
if(s){
dojo.cookie("searchHistory2",s,{expires:(365*5),path:"/"});
}
s=dojo.cookie("searchHistory0");
if(s){
dojo.cookie("searchHistory1",s,{expires:(365*5),path:"/"});
}
dojo.cookie("searchHistory0",q,{expires:(365*5),path:"/"});
},buildHistory:function(){
if(this.searchHistory.length>0){
var box=dojo.byId("searchHistory");
var txt="<ul>";
for(var x=0;x<this.searchHistory.length;x++){
txt+="<li> <a href=\"http://www.ask.com/web?q="+encodeURIComponent(this.searchHistory[x])+"\" id=\"histgo."+x+"\">"+this.searchHistory[x]+"</a><button class=\"askButton\" type=\"button\" id=\"searchHistory."+x+"\" >Add Widget</button></li>";
}
txt+="</ul>";
box.innerHTML=txt;
dojo.style(dojo.byId("histbox"),"display","block");
var that=this;
setTimeout(function(){
that.connect(box,"onclick","handleSearchHistory");
},0);
}
},_getQ:function(type,_478){
return "".concat("http://",langConf.domainName,"/",type,"?qsrc=",this.qsrc,"&l=dis&o=",this.origin,"&gcht=",this.gcht,"&q=",(_478?_478:""));
},_idToAttribute:function(id){
var _47a;
switch(window.branding.partner){
case "foxit":
_47a=this._getQ("web","site%3Awww.foxitsoftware.com+");
break;
case "photobucket":
_47a="http://photobucket.com/images/";
break;
default:
_47a=this._getQ("pictures");
break;
}
return ({"n_web":{index:0,advOption:1,url:this._getQ("web")},"n_img":{index:1,advOption:0,url:_47a},"n_new":{index:2,advOption:0,url:this._getQ("news")},"n_ans":{index:3,advOption:0,url:this._getQ("ans")},"n_blg":{index:4,advOption:0,url:this._getQ("blogsearch")}})[id];
},setSearchStyle:function(id){
var attr=this._idToAttribute(id);
if(attr){
var _47d=5+dojo.byId(id).offsetLeft+Math.ceil(dojo.byId(id).offsetWidth/2);
this.moveOptionArrow(_47d);
this.remNavSelect(id);
dojo.addClass(dojo.byId(id).firstChild,"navSelected");
}
},remNavSelect:function(id){
var attr=this._idToAttribute(id);
var _480=dojo.byId(this.searchType);
if(_480){
dojo.removeClass(_480.firstChild,"navSelected");
}
if(langConf.benderLang=="en"){
dojo.style("advlink","display",attr.advOption==1?"inline":"none");
dojo.style("qboxsep","display",attr.advOption==1?"inline":"none");
}
},handleSubmit:function(e){
dojo.stopEvent(e);
this.closeMoreButton();
this.doSearch(dojo.byId("q").value);
},doSearch:function(_482,_483){
var attr=this._idToAttribute(this.searchType);
if(_483===undefined){
this.addToHistory(_482);
}
window.location.href=attr.url+encodeURIComponent(_482);
},buildSuggestions:function(){
var _485=dojo.byId("q").value;
var data=this.suggData.toString().split(",");
var _487="<div id=\"sgbody\"><ul id=\"suggestlist\">";
if(data.length>0){
for(var i=1;i<data.length;i++){
_487+="<li><a href=\"#\" class=\"suglink\">"+data[i];
_487+="<span class=\"suggact\" style=\"display:none;\">";
_487+=data[i].split("<span class=\"suggest\">").join("").split("</span>").join("");
_487+="</span></a></li>";
}
_487+="</ul>";
_487+="<div id=\"disablediv2\"><a href=\"#\" id=\"ssdisable\">"+start.translate.get("Header.TurnOffSuggest")+"</a></div></div>";
}else{
_487+="<span>"+start.translate.get("Header.NoSuggestFound")+"</span>";
}
return _487;
},openSuggestions:function(){
var box=dojo.byId("sgpane");
if(box){
box.innerHTML=this.buildSuggestions();
return;
}
box=document.createElement("div");
box.id="sgpane";
box.innerHTML=this.buildSuggestions();
dojo.byId("qbox").appendChild(box);
setTimeout(dojo.hitch(this,"addSuggHandlers"),0);
this._showingSuggestions=true;
},closeSuggestions:function(){
var box=dojo.byId("sgpane");
if(box){
if(this.suggHandlers){
dojo.forEach(this.suggHandlers,dojo.disconnect);
this.suggHandlers=null;
}
dojo._destroyElement(box);
}
this._showingSuggestions=false;
},closeSkinsButton:function(){
var box=dojo.byId("skinsSearchBubble");
if(box){
if(this.skinsHandlers){
dojo.forEach(this.skinsHandlers,dojo.disconnect);
}
box.parentNode.removeChild(box);
}
},openSkinsButton:function(data){
var box=dojo.byId("skinsSearchBubble");
var x=0;
if(box){
this.closeSkinsButton();
}else{
if(data){
this.skinsData=data.hdf[0];
}
box=document.createElement("div");
box.id="skinsSearchBubble";
var _48f=this.skinsData.length;
this.skinPos=0;
this.skinTotal=Math.ceil(_48f/4);
var _490="<div id=\"skinDotContainer\" class=\"skinDot-"+(this.skinTotal)+"\">";
for(x=0;x<this.skinTotal;x++){
_490+="<div "+(x==0?"class=\"currskin\"":"")+"><a href=\"#\" id=\"skindot."+x+"\">&nbsp</a>/skindot</div>";
}
_490+="</div>";
var _491="<div class=\"bubbleBody\"><!--[if IE 6]><div class=\"bubbleBodyie6\"></div><![endif]-->".concat("<div id=\"skinleft\"><!--[if IE 6]><div id=\"skinleftie6\"></div><![endif]--></div>","<div id=\"skinright\" style=\"display: block; cursor: pointer;\"><!--[if IE 6]><div id=\"skinrightie6\"></div><![endif]--></div>",_490,"<div id=\"skinContainer\">","<div id=\"skinsBoat\">");
for(x=0;x<_48f;x++){
var item=this.skinsData[x];
_491+="<div><a href=\"#\" id=\"skin."+x+"\"><div style=\"background-position: -"+item.BackgroundOffset+"px 0px;\" />&nbsp;</div><span>"+start.translate.get(item.Name)+"</span></a></div>";
}
_491+="</div></div></div>";
box.innerHTML=_491.concat("<div class=\"bubbleClose\" id=\"skinsCloseButton\" title=\"Close\"><!--[if IE 6]><div class=\"bubbleCloseie6\"></div><![endif]--></div>","<div class=\"bubbleTL\"><!--[if IE 6]><div class=\"bubbleTLie6\"></div><![endif]--></div>","<div class=\"bubbleTR\"><!--[if IE 6]><div class=\"bubbleTRie6\"></div><![endif]--></div>","<div class=\"bubbleBR\"><!--[if IE 6]><div class=\"bubbleBRie6\"></div><![endif]--></div>","<div class=\"bubbleBL\"><!--[if IE 6]><div class=\"bubbleBLie6\"></div><![endif]--></div>");
dojo.byId("asksearchbox").appendChild(box);
setTimeout(dojo.hitch(this,"addSkinsHandlers"),0);
}
},closeMoreButton:function(){
var box=dojo.byId("moreSearchBubble");
if(box){
if(this.moreHandlers){
dojo.forEach(this.moreHandlers,dojo.disconnect);
}
box.parentNode.removeChild(box);
}
},toggleMoreButton:function(){
var box=dojo.byId("moreSearchBubble");
if(box){
this.closeMoreButton();
}else{
box=document.createElement("div");
box.id="moreSearchBubble";
var _495="<div class=\"bubbleBody\">".concat("<ul id=\"mnav\">","<li id=\"n_vid\" ><a class=\"hnav\" ref=\"http://www.ask.com/video","?qsrc=",this.qsrc,"&l=dis&o=",this.origin,"\">Video</a></li>","<li id=\"n_map\"><a class=\"hnav\" href=\"http://www.ask.com/maps","?qsrc=",this.qsrc,"&l=dis&o=",this.origin,"\">Maps and Directions</a></li>","<li id=\"n_shop\"><a class=\"hnav\" href=\"http://www.ask.com/shopping","?qsrc=",this.qsrc,"&l=dis&o=",this.origin,"\">Shopping</a></li>","</ul>","</div>");
box.innerHTML=_495.concat("<div class=\"bubbleClose\" id=\"moreCloseButton\" title=\"Close\"></div>","<div class=\"bubbleTL\"></div>","<div class=\"bubbleTR\"></div>","<div class=\"bubbleBR\"></div>","<div class=\"bubbleBL\"></div>","<div class=\"bubbleArrow\"></div>");
dojo.byId("asksearchbox").appendChild(box);
setTimeout(dojo.hitch(this,"addMoreHandlers"),0);
}
},_getCurrentSuggestion:function(){
var _496=dojo.query(".selected",dojo.byId("suggestlist"));
if(_496.length>0){
return _496[0];
}
return null;
},_pickNextSuggestion:function(){
var c=this._getCurrentSuggestion();
var _498=dojo.query("a",dojo.byId("suggestlist"));
if(_498.length==0){
return;
}
if(!c){
this._query=dojo.byId("q").value;
this._pickSuggestion(_498[0]);
return;
}
dojo.removeClass(c,"selected");
if(c==_498[_498.length-1]){
dojo.byId("q").value=this._query;
this._query=null;
return;
}
var next=_498[_498.indexOf(c)+1];
this._pickSuggestion(next);
},_pickPreviousSuggestion:function(){
var c=this._getCurrentSuggestion();
var _49b=dojo.query("a",dojo.byId("suggestlist"));
if(_49b.length==0){
return;
}
if(!c){
this._query=dojo.byId("q").value;
this._pickSuggestion(_49b[_49b.length-1]);
return;
}
dojo.removeClass(c,"selected");
dojo.removeClass(dojo.query(".suggest",c)[0],"selected");
if(c==_49b[0]){
dojo.byId("q").value=this._query;
this._query=null;
return;
}
var prev=_49b[_49b.indexOf(c)-1];
this._pickSuggestion(prev);
},_pickSuggestion:function(node){
dojo.byId("q").value=dojo.query(".suggact",node)[0].innerHTML;
dojo.addClass(node,"selected");
},addSkinsHandlers:function(){
this.skinsHandlers=[dojo.connect(dojo.byId("skinsSearchBubble"),"onclick",this,"eatClick"),dojo.connect(dojo.byId("skinleft"),"onclick",this,"handleSkinsNav"),dojo.connect(dojo.byId("skinright"),"onclick",this,"handleSkinsNav"),dojo.connect(dojo.byId("skinsCloseButton"),"onclick",this,"closeSkinsButton"),dojo.connect(dojo.byId("skinsBoat"),"onclick",this,"handleSkinsButton"),dojo.connect(dojo.body(),"onclick",this,"closeSkinsButton")];
dojo.query("a",dojo.byId("skinDotContainer")).forEach(function(n){
this.skinsHandlers.push(dojo.connect(n,"onclick",this,"handleSkinsNav"));
},this);
},eatClick:function(e){
dojo.stopEvent(e);
},handleSkinsNav:function(e){
var dir=1;
dojo.stopEvent(e);
var a=e.target.id.split(".");
if(a.length==2&&a[0]=="skindot"){
dir=parseInt(a[1])-this.skinPos;
}
if(e.target.id=="skinleft"||e.target.id=="skinleftie6"){
dir=-1;
}
var anim=dojo.animateProperty({node:dojo.byId("skinsBoat"),properties:{left:{start:-(this.skinPos*346),end:-((this.skinPos+dir)*346)}},duration:400});
anim.play();
this.skinPos+=dir;
dojo.query("div.currskin",dojo.byId("skinDotContainer")).forEach(function(n){
dojo.removeClass(n,"currskin");
},this);
dojo.addClass(dojo.byId("skindot."+this.skinPos).parentNode,"currskin");
dojo.style("skinleft","display",this.skinPos>0?"block":"none");
dojo.style("skinleft","cursor",this.skinPos>0?"pointer":"none");
dojo.style("skinright","display",this.skinPos<this.skinTotal-1?"block":"none");
dojo.style("skinright","cursor",this.skinPos<this.skinTotal-1?"pointer":"none");
},handleSkinsButton:function(e){
var id=e.target.parentNode.id;
if(id){
var a=id.split(".");
if(a[0]=="skin"){
var x=0;
var y;
var skin=this.skinsData[parseInt(a[1])];
var _4ab=dojo.byId("header");
if(skin.Background=="none"){
_4ab.style["backgroundImage"]="";
}else{
_4ab.style["backgroundImage"]="url("+skin.Background+")";
}
y=_4ab.offsetHeight-parseInt(skin.Height)+parseInt(skin.DefaultYPosFromBottom);
dojo.publish(start.topics.THEME_CHANGE,[{path:skin.Path,id:parseInt(a[1]),y:y}]);
dojo.style(_4ab,"backgroundPosition","50% "+y+"px");
_4ab.setAttribute("x-pos",x);
_4ab.setAttribute("y-pos",y);
_4ab.setAttribute("image-height",skin.Height);
_4ab.setAttribute("image-width",skin.Width);
dojo.addClass(_4ab,"draggable");
}
}
},addMoreHandlers:function(){
this.moreHandlers=[dojo.connect(dojo.byId("n_vid"),"onclick",this,"handleClick"),dojo.connect(dojo.byId("n_map"),"onclick",this,"handleClick"),dojo.connect(dojo.byId("n_shop"),"onclick",this,"handleClick"),dojo.connect(dojo.byId("moreCloseButton"),"onclick",this,"closeMoreButton"),dojo.connect(dojo.body(),"onclick",this,"closeMoreButton")];
},addSuggHandlers:function(){
var _4ac=dojo.query("a",dojo.byId("suggestlist")).map(function(n){
return dojo.connect(n,"onclick",this,"handleSuggClick");
},this);
_4ac.push(dojo.connect(dojo.body(),"onclick",this,"closeSuggestions"));
this.suggHandlers=_4ac;
},handleSuggClick:function(e){
var _4af=dojo.query(".suggact",e.target.parentNode)[0].innerHTML;
this.doSearch(_4af);
},handleChange:function(e){
var _4b1=dojo.byId("q").value;
this.stopSuggTimer();
if((e.keyCode==dojo.keys.UP_ARROW||e.keyCode==dojo.keys.DOWN_ARROW)&&this._showingSuggestions){
switch(e.keyCode){
case dojo.keys.DOWN_ARROW:
this._pickNextSuggestion();
break;
case dojo.keys.UP_ARROW:
this._pickPreviousSuggestion();
break;
}
}else{
if(dojo.cookie("sp_ss")!="off"){
if(_4b1.length>0&&_4b1!=this.lastquery){
this.startSuggTimer(_4b1);
}else{
if(_4b1.length==0){
this.closeSuggestions();
}
}
}
}
},stopSuggTimer:function(){
if(this.changeTimeout){
clearTimeout(this.changeTimeout);
this.changeTimeout=null;
this.lastquery=null;
}
this._cancelSuggXhr();
},startSuggTimer:function(_4b2){
this.lastquery=_4b2;
this.stopSuggTimer();
this.changeTimeout=setTimeout(dojo.hitch(this,"doSuggestions"),400);
},_setData:function(data){
this.suggData=data;
},doSuggestions:function(){
var _4b4=dojo.byId("q").value;
this._cancelSuggXhr();
this.currentquery=_4b4;
window._loadData=dojo.hitch(this,this._setData);
if(_4b4!=this.lastquery){
this.startSuggTimer(_4b4);
}else{
this._suggXhr=start.io.get("suggestions",{q:_4b4,sstype:"prefix",fn:"_loadData",doJS:true});
this._suggXhr.addCallbacks(dojo.hitch(this,"_success"),dojo.hitch(this,"_failure"));
this._suggXhr.addBoth(dojo.hitch(this,function(){
this._suggXhr=null;
}));
}
},_failure:function(e){
console.log("error: %o",e);
},_success:function(data){
this.openSuggestions();
},_cancelSuggXhr:function(){
if(this._suggXhr){
this._suggXhr.cancel();
}
this._suggXhr=null;
},doSkinsButton:function(){
if(this.skinsData){
this.openSkinsButton();
}else{
start.io.post("themepack").addCallbacks(dojo.hitch(this,"openSkinsButton"),dojo.hitch(this,"_failure"));
}
},handleClick:function(e){
var id=e.target.parentNode.id;
this.closeSuggestions();
var a=e.target.id.split(".");
if(a.length==2&&a[0]=="histgo"){
return;
}
if(e.target.id.substring(0,7)=="askskin"){
this.closeMoreButton();
dojo.stopEvent(e);
this.doSkinsButton();
}else{
if(e.target.id=="advlink"){
return;
}else{
if(e.target.id=="asklogoCon"){
this.remNavSelect("n_web");
this.searchType="n_web";
this.moveLogoArrow();
}else{
if(e.target.id=="viewLogo"){
this.closeSkinsButton();
}else{
dojo.stopEvent(e);
this.closeSkinsButton();
this.setSearchStyle(id);
this.searchType=id;
}
}
}
}
},moveLogoArrow:function(){
var anim=dojo.animateProperty({node:dojo.byId("qconn"),properties:{left:{end:0}},onEnd:function(){
dojo.style("qconn","display","none");
dojo.style("qconnvr","display","block");
var _4bb=dojo.animateProperty({node:dojo.byId("qconnvr"),properties:{top:{end:13}},duration:200});
_4bb.play();
},duration:dojo.style("qconn","left")>0?400:0});
anim.play();
},moveOptionArrow:function(_4bc){
var anim=dojo.animateProperty({node:dojo.byId("qconnvr"),properties:{top:{end:0}},onEnd:function(){
dojo.style("qconn","display","block");
dojo.style("qconnvr","display","none");
var _4be=dojo.animateProperty({node:dojo.byId("qconn"),properties:{left:{end:_4bc}},duration:400});
_4be.play();
},duration:dojo.style("qconnvr","top")>0?200:0});
anim.play();
}});
}
if(!dojo._hasResource["start.ServerConduit"]){
dojo._hasResource["start.ServerConduit"]=true;
dojo.provide("start.ServerConduit");
dojo.declare("start.SCBehavior",null,{subscribeAll:function(){
this.columnNames=["columnl","columnm","columnr"];
if(!this.subs){
this.subs=[];
}
for(funcname in this){
var _4bf=funcname+"ID";
if(this[_4bf]){
this.subs.push(dojo.subscribe(this[_4bf],this,funcname));
}
}
},unsubscribeAll:function(){
if(this.subs){
dojo.forEach(this.subs,dojo.unsubscribe);
}
},handleMove:function(){
throw ("Behavior not handled.");
},handleRemoveItemID:start.topics.CONDUIT_REMOVE_ITEM,handleRemoveItem:function(){
throw ("Behavior not handled.");
},handleAddItemsID:start.topics.CONDUIT_ADD_ITEMS,handleAddItems:function(){
throw ("Behavior not handled.");
},handleAddItemID:start.topics.CONDUIT_ADD_ITEM,handleAddItem:function(){
throw ("Behavior not handled.");
},handleRemoveID:start.topics.CONDUIT_REMOVEWIDGET,handleRemove:function(){
throw ("Behavior not handled.");
},handleCollapseID:start.topics.CONDUIT_COLLAPSEWIDGET,handleCollapse:function(node,_4c1){
throw ("Behavior not handled.");
},handleItemAddID:start.topics.CONDUIT_ADDWIDGET,handleItemAdd:function(data){
throw ("Behavior not handled.");
},handleResizeID:start.topics.CONDUIT_RESIZEWIDGET,handleResize:function(node,_4c4,_4c5,_4c6){
throw ("Behavior not handled.");
},handleNotebookSettingsID:start.topics.NOTEBOOK_SAVESETTINGS,handleNotebookSettings:function(node,key,_4c9){
throw ("Behavior not handled.");
},handleFlickrSettingsID:start.topics.FLICKR_SAVESETTINGS,handleFlickrSettings:function(node,key,_4cc){
throw ("Behavior not handled.");
},handleWeatherSettingsID:start.topics.WEATHER_SAVESETTINGS,handleWeatherSettings:function(){
throw ("Behavior not handled.");
},handleThemeChangeID:start.topics.THEME_CHANGE,handleThemeChange:function(){
throw ("Behavior not handled.");
}});
dojo.declare("start.SCBehaviorAnon",start.SCBehavior,{constructor:function(){
this.mgr=start.start.objMgr;
this.init_cookies();
},id:"anon",handleMove:function(_4cd,func){
for(var i=0;i<this.columnNames.length;i++){
dojo.cookie(this.columnNames[i],"",{expires:-1,path:"/"});
}
for(list in _4cd){
var _4d0="";
dojo.forEach(_4cd[list],function(item){
_4d0+=item.siteid+",";
});
dojo.cookie(list,_4d0.substr(0,_4d0.length-1),{expires:(365*5),path:"/"});
}
if(func){
func();
}
},clearAllCookies:function(){
dojo.cookie("columnl","",{expires:-1,path:"/"});
dojo.cookie("columnm","",{expires:-1,path:"/"});
dojo.cookie("columnr","",{expires:-1,path:"/"});
dojo.cookie("page","",{expires:-1,path:"/"});
dojo.cookie("swiz","",{expires:-1,path:"/"});
},init_cookies:function(){
var _4d2=dojo.cookie("page");
if(_4d2){
var _4d3=_4d2.split(",");
for(var x=0;x<_4d3.length;x++){
if(this.mgr.isCookieVersion(_4d3[x])&&this.mgr.invalidCookieVersion(_4d3[x])){
this.clearAllCookies();
if(dojo.cookie("columnl")||dojo.cookie("columnn")||dojo.cookie("columnr")){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
}
window.location.reload(true);
}
}
}else{
this.clearAllCookies();
}
if(start.start.themeid===0||start.start.themeid){
this.setPageCookie(start.start.themeid);
}
},setPageCookie:function(_4d5){
var _4d6=this.mgr.createVersionObj()+","+this.mgr.createThemeObj(_4d5);
dojo.cookie("page",_4d6,{expires:(365*5),path:"/"});
},handleWeatherSettings:function(node,_4d8,_4d9){
node.setAttribute("objid",this.mgr.createWeatherObj(_4d8,_4d9));
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},handleNotebookSettings:function(node,key,_4dc){
node.setAttribute("objid",this.mgr.createNotebookObj(key,_4dc));
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},handleFlickrSettings:function(node,key,_4df){
node.setAttribute("objid",this.mgr.createFlickrObj(key,_4df));
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},handleRemove:function(node){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},handleItemAdd:function(_4e1,_4e2,_4e3){
this.mgr.handleItemAdd(_4e1,_4e2,_4e3);
window.setTimeout(function(){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},0);
},handleResize:function(node,_4e5,_4e6,_4e7){
var _4e8=node.getAttribute("objid");
_4e8=this.mgr.handleResize(_4e8,_4e5,_4e6,_4e7);
node.setAttribute("objid",_4e8);
window.setTimeout(function(){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},0);
},handleThemeChange:function(data){
dojo.cookie("BkgndY",data.y,{expires:(365*5),path:"/"});
this.setPageCookie(data.id);
},handleRemoveItem:function(_4ea){
var _4eb={},name,_4ed,t,_4ef=[],_4f0=false;
if(this.mgr.isType(_4ea,"weather")){
_4ea=this.mgr.clearObjidData(_4ea);
}
for(var i=0;i<this.columnNames.length;i++){
_4ef=[];
name=this.columnNames[i];
_4eb[name]=unescape(dojo.cookie(name)).split(",");
_4ed=_4eb[name];
if(!_4f0){
t=0;
for(var j=0;j<_4ed.length;j++){
if(this.mgr.isType(_4ed[j],"weather")){
_4ed[j]=this.mgr.clearObjidData(_4ed[j]);
}
if(_4ed[j]==_4ea){
_4f0=true;
continue;
}else{
_4ef[t++]=_4ed[j];
}
}
if(_4f0){
_4eb[name]=_4ef;
}
}
}
if(_4f0){
this.handleMove(this.formatOrderlist(_4eb));
return true;
}
return false;
},handleAddItem:function(_4f3){
var _4f4={},_4f5,_4f6,_4f7;
var name;
var _4f9=0;
for(var i=0;i<this.columnNames.length;i++){
name=this.columnNames[i];
temp=unescape(dojo.cookie(name));
if(temp==="undefined"){
_4f4[name]=[];
}else{
_4f4[name]=temp.split(",");
}
_4f5=_4f4[name];
if(i==0){
_4f6=_4f5.length;
_4f7=_4f5;
}else{
if(_4f5.length<_4f6){
if(_4f9&&_4f9!=_4f5.length){
_4f6=_4f5.length;
_4f7=_4f5;
}
}
}
for(var j=0;j<_4f5.length;j++){
if(_4f5[j]==_4f3){
return false;
}
}
_4f9=_4f5.length;
}
_4f7.push(_4f3);
this.handleMove(this.formatOrderlist(_4f4));
return true;
},handleAddItems:function(_4fc){
this.handleMove(this.formatOrderlist(_4fc));
},formatOrderlist:function(_4fd){
var _4fe={};
var _4ff,name;
for(var i=0;i<this.columnNames.length;i++){
name=this.columnNames[i];
_4ff=_4fd[name];
_4fe[name]=[];
for(var j=0;j<_4ff.length;j++){
_4fe[name].push({siteid:_4ff[j]});
}
}
return _4fe;
}});
dojo.declare("start.SCBehaviorAuth",start.SCBehavior,{constructor:function(){
this.listid=start.start.playlistid;
this.mgr=start.start.objMgr;
start.io.token(dojo.cookie("BenderToken"));
},id:"auth",handleMove:function(_503,func){
var _505="";
var _506="";
var _507="";
dojo.forEach(_503.columnl,function(item){
_505+=item.playentryid.toString()+",";
});
dojo.forEach(_503.columnr,function(item){
_506+=item.playentryid.toString()+",";
});
dojo.forEach(_503.columnm,function(item){
_507+=item.playentryid.toString()+",";
});
var _50b={mode:"reorder",type:"start",keytype:"playentry",playlistid:this.listid,lorder:_505,rorder:_506,morder:_507};
start.io.post("glimpse",_50b).addCallbacks(dojo.hitch(this,"_success"),dojo.hitch(this,"_failure"));
},_success:function(){
},_failure:function(){
},handleResize:function(node,_50d,_50e,_50f){
var obj=this.mgr.parseObjId(objid);
var _511=node.getAttribute("subid");
switch(obj.type){
case this.mgr.COOKIE_OBJECTS.DEFAULT:
case this.mgr.COOKIE_OBJECTS.SITE:
case this.mgr.COOKIE_OBJECTS.CUSTOM:
case this.mgr.COOKIE_OBJECTS.NEWS:
case this.mgr.COOKIE_OBJECTS.WOTD:
var _512={playlistid:this.listid,type:"start",mode:"resize",subid:_511,size:_50d};
node.setAttribute("objid",this.mgr.createFeedObj(obj.fields[0],_50d,obj.fields[2],obj.type));
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
start.io.post("glimpse",_512).addCallbacks(_50e,_50f);
break;
default:
break;
}
},handleItemAdd:function(_513,_514,_515){
var obj=this.mgr.getObjData(_513);
switch(obj.type){
case this.mgr.COOKIE_OBJECTS.DEFAULT:
case this.mgr.COOKIE_OBJECTS.SITE:
case this.mgr.COOKIE_OBJECTS.CUSTOM:
var _517={mode:"add",type:"start",playlistid:this.listid,siteids:obj.siteid};
break;
case this.mgr.COOKIE_OBJECTS.WOTD:
var _517={mode:"add",type:"start",playlistid:this.listid,siteids:obj.siteid,widgettype:obj.type};
break;
case this.mgr.COOKIE_OBJECTS.NEWS:
var _517={mode:"add",type:"start",playlistid:this.listid,widgettype:obj.type};
break;
default:
var _517={mode:"add",type:"start",playlistid:this.listid,widgettype:obj.type,data:obj.data};
break;
}
var _518=_514===undefined?undefined:function(data){
return _514(data,_513);
};
start.io.post("glimpse",_517).addCallbacks(_518,_515);
window.setTimeout(function(){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},0);
},handleThemeChange:function(data){
dojo.cookie("BkgndY",data.y,{expires:(365*5),path:"/"});
var _51b={playlistids:this.listid,theme:data.id};
start.io.post("playlist-update",_51b).addCallbacks(dojo.hitch(this,"_success"),dojo.hitch(this,"_failure"));
},handleWeatherSettings:function(node,_51d,_51e){
var _51f={mode:"edit",type:"start",playlistid:this.listid,playentryid:node.getAttribute("playentryid"),data:_51d.join(";")+(_51e?";C":"")};
start.io.post("glimpse",_51f).addCallbacks(function(){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},dojo.hitch(this,"_failure"));
node.setAttribute("objid",this.mgr.createWeatherObj(_51d));
},handleNotebookSettings:function(node,key,_522){
var _523={mode:"edit",type:"start",playlistid:this.listid,playentryid:node.getAttribute("playentryid"),data:key+";"+_522};
start.io.post("glimpse",_523).addCallbacks(function(){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},dojo.hitch(this,"_failure"));
node.setAttribute("objid",this.mgr.createFlickrObj(key,_522));
},handleFlickrSettings:function(node,key,_526){
var _527={mode:"edit",type:"start",playlistid:this.listid,playentryid:node.getAttribute("playentryid"),data:key+";"+_526};
start.io.post("glimpse",_527).addCallbacks(function(){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},dojo.hitch(this,"_failure"));
node.setAttribute("objid",this.mgr.createFlickrObj(key,_526));
},handleRemove:function(node){
var _529={mode:"delete",type:"start",playlistid:this.listid,playentryid:node.getAttribute("playentryid")};
start.io.post("glimpse",_529).addCallbacks(function(){
dojo.publish(start.topics.CONDUIT_UPDATEOBJIDS);
},dojo.hitch(this,"_failure"));
}});
dojo.declare("start.ServerConduit",null,{constructor:function(){
this.mgr=start.start.objMgr;
this.columnNames=["columnl","columnm","columnr"];
this.behavior=start.start.loggedin?new start.SCBehaviorAuth():new start.SCBehaviorAnon();
dojo.subscribe(start.topics.CONDUIT_UPDATEORDER,this,"handleMove");
dojo.subscribe(start.topics.CONDUIT_GETWIDGETDATA,this,"handleGetData");
dojo.subscribe(start.topics.CONDUIT_UPDATEOBJIDS,this,"handleUpdateObjIDs");
dojo.subscribe(start.topics.CONDUIT_SETUPWIZARD_COOKIE,function(){
dojo.cookie("swiz","1",{expires:(365*5),path:"/"});
});
this.behavior.subscribeAll();
var that=this;
dojo.subscribe(start.topics.USER_LOGIN,function(){
that.behavior.unsubscribeAll();
that.behavior=new start.SCBehaviorAuth();
that.behavior.subscribeAll();
});
dojo.subscribe(start.topics.USER_LOGOUT,function(){
that.behavior.unsubscribeAll();
that.behavior=new start.SCBehaviorAnon();
that.behavior.subscribeAll();
});
},handleGetData:function(_52b,_52c){
var _52d=_52b.objid.split("-");
if(_52c!==undefined){
var _52e=_52b.callbackSuccess===undefined?undefined:function(data){
return _52b.callbackSuccess(data,_52b.objid);
};
}else{
var _52e=_52b.callbackSuccess;
}
if(parseInt(_52d[0])==1){
var _530=_52d[1].split(";");
var _531={siteid:_530[0],format:"json",summary:1,num:_530[1]};
start.io.post("preview",_531).addCallbacks(_52e,_52b.callbackFailure);
}else{
_52e({userSettings:1});
}
},handleUpdateObjIDs:function(){
var _532=start.start.grid.calcOrder();
var _533={};
start.start.objMgr.clear();
dojo.forEach(_532,function(node){
var _535=node.getAttribute("objid");
if(_535){
if(!node.parentNode){
return;
}
start.start.objMgr.add(_535,dijit.byId(node.id));
if(_533[node.parentNode.id]===undefined){
_533[node.parentNode.id]=[];
}
_533[node.parentNode.id].push({siteid:_535});
}
});
if(this.behavior.id="anon"){
this.behavior.handleMove(_533);
}
},getItems:function(){
var _536={},_537=[],_538={},_539,name;
for(var i=0;i<this.columnNames.length;i++){
name=this.columnNames[i];
_536[name]=unescape(dojo.cookie(name)).split(",");
_539=_536[name];
_537=_537.concat(_539);
for(var j=0;j<_539.length;j++){
if(this.mgr.isType(_539[j],"weather")){
_539[j]=this.mgr.clearObjidData(_539[j]);
}
_538[_539[j]]=true;
}
}
return {orderlist:_536,itemlist:_537,itemMap:_538};
},handleMove:function(_53d,func){
var _53f={};
start.start.objMgr.clear();
dojo.forEach(_53d,function(node){
var id=node.getAttribute("objid");
var _542=node.getAttribute("subid");
var _543=node.getAttribute("playentryid");
var _544=node.getAttribute("numitems");
var _545=node.getAttribute("expanded");
if(id){
if(!node.parentNode){
return;
}
start.start.objMgr.add(id,dijit.byId(node.id));
if(_53f[node.parentNode.id]===undefined){
_53f[node.parentNode.id]=[];
}
_53f[node.parentNode.id].push({siteid:id,subid:_542,playentryid:_543,numitems:_544,expanded:_545});
}
});
this.behavior.handleMove(_53f,func);
}});
}
if(!dojo._hasResource["start.wz"]){
dojo._hasResource["start.wz"]=true;
dojo.provide("start.wz");
(function(){
var wz=start.wz;
wz.config={host:"",path:"",division:"",site:"",channel:"",server:"",origin:"",scriptname:""};
var imp={page_start:44179,page_add:44169};
function _548(){
return Math.floor(Math.random()*1000000000).toString();
};
function _549(n){
return n.complete;
};
function _54b(){
var l=dojo.query("#start_wz_imgs img").filter(_549).forEach(dojo._destroyElement,dojo).length;
};
function _54d(_54e,_54f){
var cfg=wz.config;
var c={t:"a",ti:2,d:cfg.division,s:cfg.site,c:cfg.channel,sv:cfg.server,p:cfg.scriptname,ord:_548(),o:cfg.origin,ai:_54e};
if(_54f!=undefined){
c.t=_54f;
}
var hp=dojo.string.substitute("http://${host}/${path}?",wz.config);
hp+=dojo.objectToQuery(c);
return hp;
};
function _553(_554,_555){
var root=dojo.byId("start_wz_imgs");
if(!root){
$error("wz image holder not found??");
return;
}
var img=document.createElement("img");
img.setAttribute("height","1");
img.setAttribute("width","1");
img.setAttribute("src",_54d(_554,_555));
root.appendChild(img);
};
function show(_559,_55a){
_553(_559,_55a);
};
function _55b(_55c){
var map={"start":dojo.partial(show,imp.page_start),"add":dojo.partial(show,imp.page_add)};
var f=map[_55c.type];
if(dojo.isFunction(f)){
f();
}
};
dojo.subscribe(start.topics.START_CHANGE_PAGE,_55b);
var _55f=setInterval(_54b,1000*60*5);
})();
}
if(!dojo._hasResource["start.buttons"]){
dojo._hasResource["start.buttons"]=true;
dojo.provide("start.buttons");
dojo.declare("start.Button",[dijit._Widget,dijit._Contained,dijit._Container],{templateString:"<button class=\"askButton\" dojoattachevent=\"onclick:_onclick\" type=\"button\">Button Name</button>\n",name:"Default Button",postCreate:function(){
this.connect(this.domNode,"onclick","_onclick");
},_onclick:function(e){
dojo.stopEvent(e);
this.action(e);
},action:function(e){
console.log("Overwrite me.");
}});
dojo.declare("start.EditButton",[start.Button],{action:function(e){
start.start.controls.changePage("add");
dojo.addClass(dojo.byId("editButton"),"hidden");
dojo.removeClass(dojo.byId("returnButton"),"hidden");
}});
dojo.declare("start.ReturnButton",[start.Button],{action:function(e){
start.start.controls.changePage("start");
dojo.addClass(dojo.byId("returnButton"),"hidden");
dojo.removeClass(dojo.byId("editButton"),"hidden");
}});
}
if(!dojo._hasResource["start.widgets.Wizard"]){
dojo._hasResource["start.widgets.Wizard"]=true;
dojo.provide("start.widgets.Wizard");
dojo.declare("start.widgets.Wizard",[start.Base,dijit._Templated],{CUSTOM_WIDGET_TYPE:1,NUM_ITEMS:5,EXPANDED:1,templateString:"<div class=\"Wizard dijitDialog has_layout\">\n  <div class=\"wizardContents\">\n    <div class=\"wizardClose\">\n       <span dojoattachevent=\"onclick:_cleanUp\">${Close}</span>\n       <div class=\"wizardCloseIco\" dojoattachevent=\"onclick:_cleanUp\"></div>\n    </div>\n    <div class=\"wizardWelcome\">\n       <span>${Welcome}</span> ${WelcomeDesc}\n    </div>\n    <div dojoattachpoint=\"categories\" class=\"wizardCats\">\n    </div>\n    <div class=\"wizardControl\"> \n      <button dojoattachevent=\"onclick:_save\" class=\"askButton\">${Save}</button>\n      <button dojoattachevent=\"onclick:_cleanUp\" class=\"wizardCancel askButton\">${Cancel}</button>\n    </div>\n  </div>\n</div>\n",strings:{prefix:"SetupWiz",items:["Save","Close","Cancel","Welcome","WelcomeDesc"]},postCreate:function(){
this.selected=[];
var n,c;
for(var i=0;i<this.data.length;i++){
n=dojo.doc.createElement("div");
this.categories.appendChild(n);
c=new start.widgets.WizardItem({iconName:this.data[i]["icon"],catType:this.data[i]["name"],index:i},n);
c.startup();
this.connect(c.domNode,"onclick",dojo.hitch(this,"_handleClick"));
}
dojo.subscribe(start.topics.START_CHANGE_PAGE,this,"_handlePageChange");
},_handleClick:function(e){
dojo.stopEvent(e);
var w=dijit.getEnclosingWidget(e.target);
i=w.index;
if(this.selected[i]){
delete this.selected[i];
}else{
this.selected[i]=this.data[i];
}
w.toggleCheckbox();
},_save:function(e){
dojo.stopEvent(e);
var site,_56b=(this.selected.length>3)?1:0;
for(var i in this.selected){
for(var j=0;j<this.data[i]["items"].length;j++){
site=this.data[i]["items"][j];
if(start.start.objMgr.exists(site.id)){
continue;
}
if(site.priority>_56b){
dojo.publish(start.topics.CONDUIT_ADD_ITEM,[site.id]);
}
}
}
this._finishSave();
},_handlePageChange:function(args){
if(args.type!=="start"){
this._cleanUp();
}
},_cleanUp:function(){
this.destroy();
dojo.publish(start.topics.CONDUIT_SETUPWIZARD_COOKIE);
},_finishSave:function(){
this._cleanUp();
window.setTimeout(function(){
window.location.href=start.Utils.getCacheBustingURL();
},0);
}});
dojo.declare("start.widgets.WizardItem",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"WizardItem has_layout\">\n  <div class=\"WizardItemContent\">\n    <div class=\"itemCheck\"> </div>\n    <span dojoattachpoint=\"catName\"></span>\n  </div>\n</div>\n",postCreate:function(){
dojo.style(this.catName,"backgroundPosition","0 "+(-20*this.index)+"px");
this.catName.innerHTML=start.translate.get(this.catType);
this.checked=false;
},toggleCheckbox:function(){
if(this.checked){
this.checked=false;
dojo.removeClass(this.domNode,"WizardItem_selected");
}else{
this.checked=true;
dojo.addClass(this.domNode,"WizardItem_selected");
}
}});
}
if(!dojo._hasResource["start.LangSelect"]){
dojo._hasResource["start.LangSelect"]=true;
dojo.provide("start.LangSelect");
dojo.declare("start.LangSelect",[dijit._Widget],{postCreate:function(){
this.inherited(arguments);
var node=this.domNode;
this.connect(dojo.byId("langdropdown"),"onclick","handleClick");
this.connect(dojo.byId("langselect"),"onclick","handleClick");
},handleClick:function(e){
var id=e.target.id;
var pid=e.target.parentNode.id;
var a=e.target.id.split("_");
if(pid=="langdropdown"){
this.doLangButton();
}else{
if(a[0]=="langline"){
if(a[1]!=(dojo.cookie("BenderLang")||"en")){
dojo.cookie("BenderLang",a[1]);
window.location.reload();
}
}else{
this.closeLangButton();
}
}
},doLangButton:function(){
var box=dojo.byId("langSelectBubble");
if(box){
this.closeLangButton();
}else{
box=document.createElement("div");
box.id="langSelectBubble";
box.innerHTML=this.buildLangList();
dojo.byId("langdropdown").appendChild(box);
}
},closeLangButton:function(){
var box=dojo.byId("langSelectBubble");
if(box){
box.parentNode.removeChild(box);
}
},buildLangList:function(){
var _576="<ul id=\"suggestlist\">";
_576+="<li><div value=\"en\" id=\"langline_en\" class=\"langline\">English</div></li>";
_576+="<li><div value=\"fr\" id=\"langline_fr\" class=\"langline\">French</div></li>";
_576+="<li><div value=\"it\" id=\"langline_it\" class=\"langline\">Italian</div></li>";
_576+="<li><div value=\"de\" id=\"langline_de\" class=\"langline\">German</div></li>";
_576+="<li><div value=\"es\" id=\"langline_es\" class=\"langline\">Spanish</div></li>";
_576+="<li><div value=\"pt\" id=\"langline_pt\" class=\"langline\">Portuguese</div></li>";
_576+="<li><div value=\"pt-br\" id=\"langline_pt-br\" class=\"langline\">Brazilian</div></li>";
_576+="</ul>";
return _576;
}});
}
if(!dojo._hasResource["start.widgets.Slide"]){
dojo._hasResource["start.widgets.Slide"]=true;
dojo.provide("start.widgets.Slide");
dojo.declare("start.widgets.Slide",[start.Base],{MAX_SLIDES:5,postCreate:function(){
this.slideA=dojo.query(".slideA",this.domNode)[0];
this.slideB=dojo.query(".slideB",this.domNode)[0];
this.slideNav=dojo.query(".slideNav",this.domNode)[0];
this.next=dojo.query(".next",this.domNode)[0];
this.prev=dojo.query(".prev",this.domNode)[0];
this.slideInfo=dojo.query(".slideInfo",this.domNode)[0];
this.activeSlide=this.slideA;
this.currentSlide=1;
this.notLoaded=true;
this.ownerid=this.srcNodeRef.getAttribute("ownerid");
dojo.subscribe(start.topics.SLIDE_DECLARE_OWNERSHIP,dojo.hitch(this,"_setOwner"));
},_setOwner:function(_577,_578){
if(_578===this.ownerid){
this.delegate=_577;
if(!this.delegate.getNextContent){
throw "start.widgets.Slide delegate needs a getNextContent function.";
}
if(!this.delegate.getPrevContent){
throw "start.widgets.Slide delegate needs a getPrevContent function.";
}
if(!this.delegate.setSlider){
throw "start.widgets.Slide delegate needs a setSlider function.";
}
this.connect(this.next,"onclick","_next");
this.connect(this.prev,"onclick","_prev");
this.delegate.setSlider(this);
}
},_toggle:function(n){
var h=this.domNode.offsetHeight;
dojo.style(this.domNode,"height",h+"px");
this.activeSlide.innerHTML="";
dojo.addClass(this.activeSlide,"hidden");
if(this.activeSlide==this.slideA){
this.activeSlide=this.slideB;
}else{
this.activeSlide=this.slideA;
}
this.activeSlide.appendChild(n);
dojo.removeClass(this.activeSlide,"hidden");
dojo.style(this.domNode,"height","auto");
},exchangeCurrentSlide:function(node){
if(this.notLoaded){
dojo.removeClass(this.activeSlide,"loadingSlide");
this.notLoaded=false;
}
this.activeSlide.innerHTML="";
this.activeSlide.appendChild(node);
},reset:function(){
this._transitionInfo(this.MAX_SLIDES+1);
},_transitionInfo:function(num){
dojo.removeClass(this.slideInfo,"slide"+this.currentSlide);
this.currentSlide+=num;
if(this.currentSlide>this.MAX_SLIDES){
this.currentSlide=1;
}else{
if(this.currentSlide<1){
this.currentSlide=this.MAX_SLIDES;
}
}
dojo.addClass(this.slideInfo,"slide"+this.currentSlide);
},_prev:function(e){
dojo.stopEvent(e);
this._toggle(this.delegate.getPrevContent());
this._transitionInfo(-1);
},_next:function(e){
dojo.stopEvent(e);
this._toggle(this.delegate.getNextContent());
this._transitionInfo(1);
}});
}
if(!dojo._hasResource["start.widgets.Dragger"]){
dojo._hasResource["start.widgets.Dragger"]=true;
dojo.provide("start.widgets.Dragger");
dojo.declare("start.widgets.Dragger",[],{MAX_DRAG_HEIGHT:500,MIN_NUM_ITEMS:3,MAX_NUM_ITEMS:20,initDragger:function(_57f,_580,_581,_582){
this.dragger=dojo.query(".dragger",this.domNode)[0];
if(this.dragger){
dojo.removeClass(this.dragger,"hidden");
this.connect(this.dragger,"onmousedown","_handledragstart");
}
var o=this;
this.itemCount=_580;
this.itemHeight=_581;
this.contentNode=_57f;
this.widgetNode=_582;
},_moving:function(e){
dojo.stopEvent(e);
var pos;
if(e.pageX||e.pageY){
pos=e.pageY;
}else{
pos=e.clientY+dojo.body().scrollTop-dojo.body().clientTop;
}
if(this.dragPos===0){
this.dragPos=pos;
this.currHeight=this.contentNode.offsetHeight;
this.numItems_=this.itemCount;
}
var _586=this.dragPos;
var _587=pos;
var _588=_587-_586;
var _589=Math.floor(_588/this.itemHeight);
var _58a=_589*this.itemHeight;
var _58b=(this.currHeight+_58a);
if(_58b>this.MAX_DRAG_HEIGHT){
return;
}
if(_58b<(this.itemHeight+this.titleHeight)){
_58b=this.itemHeight+this.titleHeight;
}
dojo.style(this.contentNode,"height",_58b+"px");
this.numItems_=_589+this.itemCount;
if(this.numItems_<this.MIN_NUM_ITEMS){
this.numItems_=this.MIN_NUM_ITEMS;
}else{
if(this.numItems_>this.MAX_NUM_ITEMS){
this.numItems_=this.MAX_NUM_ITEMS;
}
}
},updateItemCount:function(num){
this.itemCount=num;
},_handledragstart:function(e){
if(ask.isInputElement(e.target)){
return;
}
dojo.stopEvent(e);
this.dragPos=0;
if(dojo.isIE){
this.wmConnection=dojo.connect(dojo.body(),"onmousemove",this,"_moving");
this.dcConnectiong=dojo.connect(dojo.body(),"onmouseup",this,"_handledragend");
}else{
this.wmConnection=dojo.connect(window,"onmousemove",this,"_moving");
this.dcConnectiong=dojo.connect(window,"onmouseup",this,"_handledragend");
}
},_handledragend:function(e){
dojo.stopEvent(e);
dojo.disconnect(this.wmConnection);
dojo.disconnect(this.dcConnectiong);
dojo.publish(start.topics.CONDUIT_RESIZEWIDGET,[this.widgetNode,this.numItems_,dojo.hitch(this,"_loadData"),dojo.hitch(this,"_loadError")]);
},_loadError:function(err){
dojo.style(this.contentNode,"height","auto");
},_loadData:function(data){
}});
}
if(!dojo._hasResource["start.widgets.Accordion"]){
dojo._hasResource["start.widgets.Accordion"]=true;
dojo.provide("start.widgets.Accordion");
dojo.declare("start.widgets.Accordion",[start.widgets.Dragger,dijit._Widget,dijit._Contained,dijit._Container],{ITEM_HEIGHT:"150",TITLE_HEIGHT:"25",postCreate:function(){
this.itemsCon=dojo.query(".itemsCon",this.domNode)[0];
var _591=this._initItems();
this.initDragger(this.domNode,_591,this.TITLE_HEIGHT,this.widgetNode);
},_initItems:function(){
this.items={};
var i=0;
dojo.query(".AccordionItem",this.domNode).forEach(function(n){
var t=dojo.query(".title",n)[0];
var c=dojo.query(".contentCon",n)[0];
this.connect(t,"onclick","_onclick");
t.setAttribute("index",i);
this.items[i]={"node":n,"index":i++,"title":t,"content":c};
},this);
this.activeItem=0;
var _596=this.domNode.getAttribute("objid");
dojo.query("[objid="+_596+"]").forEach(function(n){
if(dojo.hasClass(n,"sp_widget")){
this.widgetNode=n;
}
},this);
return i;
},_handledragstart:function(e){
if(this.activeItem!=0){
this._close(this.activeItem);
this._open(0);
}
this.inherited("_handledragstart",arguments);
},_onclick:function(e){
var _59a=e.target.getAttribute("index");
if(_59a!=this.activeItem){
dojo.stopEvent(e);
this._close(this.activeItem);
this._open(_59a);
}
},_open:function(_59b){
var o=this;
var _59d=this.items[_59b]["content"];
var _59e=this.items[_59b]["title"];
var node=this.items[_59b]["node"];
dojo.style(_59d,"height","0px");
dojo.removeClass(_59d,"hidden");
dojo.animateProperty({node:_59d,duration:100,properties:{height:{start:"1",end:o.ITEM_HEIGHT,unit:"px"}}}).play();
dojo.removeClass(_59e,"inactiveTitle");
dojo.addClass(_59e,"activeTitle");
dojo.removeClass(_59d,"inactiveItem");
dojo.addClass(_59d,"activeItem");
o.activeItem=_59b;
},_close:function(_5a0){
var o=this;
var _5a2=this.items[_5a0]["content"];
var _5a3=this.items[_5a0]["title"];
var node=this.items[_5a0]["node"];
dojo.removeClass(_5a3,"activeTitle");
dojo.addClass(_5a3,"inactiveTitle");
dojo.animateProperty({node:_5a2,duration:100,properties:{height:{start:o.ITEM_HEIGHT,end:"1",unit:"px"}},onEnd:function(){
dojo.addClass(_5a2,"hidden");
dojo.addClass(_5a2,"inactiveItem");
dojo.addClass(_5a2,"activeItem");
dojo.style(_5a2,"height","auto");
}}).play();
},_loadData:function(data){
var n,w;
this.itemsCon.innerHTML="";
for(var i=0;i<data.items.length;i++){
n=dojo.doc.createElement("div");
w=new start.widgets.TemplatedAccordionItem({data:data.items[i]},n);
w.startup();
if(!i){
w.openTemplated();
}
this.itemsCon.appendChild(w.domNode);
this.updateItemCount(this._initItems());
}
dojo.style(this.domNode,"height","auto");
}});
dojo.declare("start.widgets.TemplatedAccordionItem",[start.Base,dijit._Templated],{MAX_SLIDES:5,templateString:"<div class=\"AccordionItem\">\n  <a href=\"#\" target=\"_blank\" class=\"title inactiveTitle\" dojoattachpoint=\"title\" ></a>\n  <div class=\"hidden contentCon\" dojoattachpoint=\"contentCon\">\n    <div dojoattachpoint=\"moreInfoCon\">\n    </div>\n    <div class=\"content\" dojoattachpoint=\"content\"></div>\n  </div>\n</div>\n",postCreate:function(){
this.title.innerHTML=this.data.title;
if(this.data["desc"]){
this.content.innerHTML=this.data["desc"];
var url=this.data.url;
}else{
if(this.data["abstract"]){
var url=this.data.clickurl;
var _5aa=["<div class=\"moreInfo\">\n<span>",this.data["source"]," | </span><a href=\"http://news.ask.com/news?n2a=cea&n2cid=",this.data["cid"],"\" target=\"_blank\">All Articles &raquo;</a></div>"].join("");
this.moreInfoCon.innerHTML=_5aa;
this.content.innerHTML=this.data["abstract"];
}
}
if(this.active){
dojo.removeClass(this.title,"inactiveTitle");
dojo.addClass(this.title,"activeTitle");
dojo.addClass(this.contentCon,"activeItem");
}
this.title.setAttribute("href",url);
var a=dojo.doc.createElement("a");
a.setAttribute("target","_blank");
a.setAttribute("href",url);
a.innerHTML="More";
dojo.addClass(a,"more");
this.content.appendChild(a);
},openTemplated:function(){
dojo.removeClass(this.contentCon,"hidden");
},closeTemplated:function(){
dojo.addClass(this.contentCon,"hidden");
},_handleClick:function(e){
dojo.stopEvent(e);
this.acc.openTemplatedItem(this.index);
}});
dojo.declare("start.widgets.TemplatedAccordion",[start.widgets.Accordion,dijit._Templated],{templateString:"<div class=\"Accordion TemplatedAccordion\">\n  <div class=\"itemsCon\" dojoattachpoint=\"itemsCon\">\n  </div>\n  <div class=\"widgetFooter hidden\">\n    <div class=\"dragger\" >&nbsp;</div>\n  </div>\n</div>\n",postCreate:function(){
this.templatedItems={};
var n,w,_5af=true,o=this;
for(var i=0;i<this.data.length;i++){
if(i){
_5af=false;
}
n=dojo.doc.createElement("div");
this.itemsCon.appendChild(n);
w=new start.widgets.TemplatedAccordionItem({data:this.data[i],acc:o,index:i,active:_5af},n);
w.startup();
this.templatedItems[i]=w;
}
this.currentTemplatedItem=null;
this.openTemplatedItem(0);
this.inherited("postCreate",arguments);
},openTemplatedItem:function(i){
if(this.currentTemplatedItem!==null&&this.currentTemplatedItem!==i){
this.templatedItems[this.currentTemplatedItem].closeTemplated();
}
if(this.currentTemplatedItem!==i){
this.templatedItems[i].openTemplated();
this.currentTemplatedItem=i;
}
}});
}
if(!dojo._hasResource["start.widgets.LinksModule"]){
dojo._hasResource["start.widgets.LinksModule"]=true;
dojo.provide("start.widgets.LinksModule");
dojo.declare("start.widgets.LinksModule",[dijit._Widget,dijit._Contained,dijit._Container],{ITEM_HEIGHT:"150",TITLE_HEIGHT:"25",postCreate:function(){
dojo.subscribe(start.topics.START_LOAD_COMPLETE,this,"_buildLinks");
},_buildLinks:function(_5b3){
var obj=_5b3.start.objMgr.getObjData(this.domNode.getAttribute("objid"));
obj=_5b3.start.linksmoduledata[obj.data];
var _5b5=dojo.query(".linkCon",this.domNode)[0];
var _5b6=dojo.query(".widget_title_text",_5b5.parentNode.parentNode.parentNode);
_5b6[0].innerHTML=obj.header;
if(obj.style=="OneLine"){
dojo.addClass(_5b5,"linkCon1Line");
}else{
dojo.addClass(_5b5,"linkConStaked");
}
var _a=[];
for(var link in obj.links){
_a.push("".concat("<div class=\"linkItem",(_a.length==0)?" linkItemTop\"":"\"","> <a href=\"",obj.links[link].url,"\" target=\"_blank\" ?>",obj.links[link].title,"</a></div>"));
}
if(obj.logo){
_a.push("".concat("<div class=\"logo\"><img src=\"/c/images/start/",obj.logo,"\"/></div>"));
_5b5.innerHTML=_a.join("");
}
},_highlight:function(e){
dojo.removeClass(this.current,"linkItemSel");
dojo.addClass(e.target.parentNode,"linkItemSel");
this.current=e.target.parentNode;
}});
}
if(!dojo._hasResource["start.widgets.ImageWidget"]){
dojo._hasResource["start.widgets.ImageWidget"]=true;
dojo.provide("start.widgets.ImageWidget");
dojo.declare("start.widgets.ImageWidget",[dijit._Widget,dijit._Contained,dijit._Container],{postCreate:function(){
dojo.subscribe(start.topics.START_LOAD_COMPLETE,this,"postLoad");
this.multiImageView=dojo.query(".multiImageView",this.domNode)[0];
this.viewPanel=dojo.query(".viewPanel",this.domNode)[0];
this.optionsPanel=dojo.query(".optionsPanel",this.domNode)[0];
this.connect(this.multiImageView,"onclick","_selectMinImg");
this.image=dojo.query(".LargeImage img",this.domNode)[0];
this.connect(this.image,"onclick","_expand");
this.link=dojo.query(".link",this.domNode)[0];
this.imageName=dojo.query(".imageName",this.domNode)[0];
this.sizeAvailable=dojo.query(".sizeAvailable",this.domNode)[0];
this.prevButton=dojo.query(".prev",this.domNode)[0];
this.nextButton=dojo.query(".next",this.domNode)[0];
this.connect(this.prevButton,"onclick","_prev");
this.connect(this.nextButton,"onclick","_next");
this.largePhoto=dojo.query(".largePhoto",this.domNode)[0];
this.smallPhotos=dojo.query(".smallPhotos",this.domNode)[0];
this.connect(this.largePhoto,"onclick","_showLargePhoto");
this.connect(this.smallPhotos,"onclick","_showSmallPhotos");
this.largePhotoPanel=dojo.query(".largePhotoPanel",this.domNode)[0];
this.smallPhotosPanel=dojo.query(".smallPhotosPanel",this.domNode)[0];
this.objid=this.domNode.getAttribute("objid");
var _5ba=dojo.query("div[objid=\""+this.objid+"\"]");
for(var i=0;i<_5ba.length;i++){
if(dojo.hasClass(_5ba[i],"sp_widget")){
this.moduleContainer=_5ba[i];
}
}
this.menuButton=dojo.query(".menu",this.moduleContainer)[0];
dojo.removeClass(this.menuButton,"hidden");
this.connect(this.menuButton,"onclick","_toggleMenu");
this.viewPanelShowing=true;
this.optionsForm=dojo.query("form",this.optionsPanel)[0];
this.connect(this.optionsForm,"onsubmit","_editTags");
this.tagsInput=dojo.query("input[type=\"text\"]",this.optionsForm)[0];
},postLoad:function(){
this.tags=start.start.objMgr.getObjData(this.objid).data.split(";")[1];
this.tagsInput.value=this.tags;
this._loadImages();
},_loadImages:function(){
var p={};
this.images=null;
this.currentImage=0;
if(this.tags){
p["tags"]=this.tags;
this._dataPresets=this.tags;
}
start.io.pPost("images",p).addCallbacks(dojo.hitch(this,"_handleSuccess"),dojo.hitch(this,"_handleFailure"));
},_editTags:function(e){
dojo.stopEvent(e);
this.tags=this.tagsInput.value;
this._loadImages();
dojo.publish(start.topics.FLICKR_SAVESETTINGS,[this.moduleContainer,"tags",this.tags]);
this._toggleMenu(e);
},_toggleMenu:function(e){
dojo.stopEvent(e);
if(this.viewPanelShowing){
dojo.addClass(this.viewPanel,"hidden");
dojo.removeClass(this.optionsPanel,"hidden");
this.viewPanelShowing=false;
}else{
dojo.addClass(this.optionsPanel,"hidden");
dojo.removeClass(this.viewPanel,"hidden");
this.viewPanelShowing=true;
}
},_selectMinImg:function(e){
dojo.stopEvent(e);
if(dojo.hasClass(e.target,"mini_image")){
this._changeCurrentImage(parseInt(e.target.getAttribute("image_num")));
this._showLargePhoto(e);
}
},_expand:function(e){
dojo.stopEvent(e);
var data=this.images[this.currentImage];
if(data["Large"]){
_t=data["Large"];
}else{
if(data["Medium"]){
_t=data["Medium"];
}
}
dojo.body().appendChild(new start.ImageViewer({url:_t.source,imgTitle:data.title,link:_t.url}).domNode);
},_showLargePhoto:function(e){
dojo.stopEvent(e);
dojo.addClass(this.smallPhotosPanel,"hidden");
dojo.removeClass(this.largePhotoPanel,"hidden");
},_showSmallPhotos:function(e){
dojo.stopEvent(e);
dojo.addClass(this.largePhotoPanel,"hidden");
dojo.removeClass(this.smallPhotosPanel,"hidden");
},_prev:function(e){
dojo.stopEvent(e);
var i=this.currentImage;
if(--i<0){
i=this.images.length-1;
}
this._changeCurrentImage(i);
},_next:function(e){
dojo.stopEvent(e);
var i=this.currentImage;
if(++i==this.images.length){
i=0;
}
this._changeCurrentImage(i);
},_updateMultiView:function(){
var _a=[];
for(var i=0;i<this.images.length;i++){
_a.push("".concat(" <a class=\"min_image_link\" href=\"#\">","<img class=\"mini_image\" src=\"",this.images[i]["Square"].source,"\" image_num=\"",i,"\" />","</a>"));
}
this.multiImageView.innerHTML=_a.join("");
},_changeCurrentImage:function(_5ca){
var _t;
var data=this.images[_5ca];
this.currentImage=_5ca;
if(data["Small"]){
_t=data["Small"];
}else{
if(data["Thumbnail"]){
_t=data["Thumbnail"];
}else{
return;
}
}
this.image.setAttribute("src","");
this.image.setAttribute("src",_t["source"]);
dojo.style(this.image,"height",_t["height"]+"px");
dojo.style(this.image,"width",_t["width"]+"px");
dojo.removeClass(this.image,"hidden");
if(data["Original"]){
_t=data["Original"];
}else{
if(data["Large"]){
_t=data["Large"];
}else{
if(data["Medium"]){
_t=data["Medium"];
}
}
}
this.link.setAttribute("href",_t["url"]);
this.imageName.innerHTML=data["title"];
this.sizeAvailable.innerHTML="".concat(_t["label"]," (",_t["width"]," x ",_t["height"],")");
},_handleSuccess:function(data){
var _5ce=[],_t;
for(var i=0;i<data.length;i++){
_5ce[i]={};
_5ce[i]["title"]=data[i]["title"];
for(var j=0;j<data[i]["sizes"]["size"].length;j++){
_t=data[i]["sizes"]["size"][j];
_5ce[i][_t["label"]]=_t;
}
}
this.images=_5ce;
this._changeCurrentImage(0);
this._updateMultiView();
},_handleFailure:function(e){
console.log("error: %o",e);
}});
}
if(!dojo._hasResource["start.widgets.DictWidget"]){
dojo._hasResource["start.widgets.DictWidget"]=true;
dojo.provide("start.widgets.DictWidget");
dojo.declare("start.widgets.DictWidget",[start.Base],{postCreate:function(){
this.word=dojo.query(".currentWord",this.domNode)[0];
this.def=dojo.query(".definition",this.domNode)[0];
this.items={};
dojo.query(".item",this.domNode).forEach(dojo.hitch(this,function(n){
var _5d4=n.getAttribute("title");
this.items[_5d4]={date_:n.getAttribute("date"),title:_5d4,descr:n.getAttribute("descr"),url:n.getAttribute("url")};
}));
dojo.query(".wordTitle",this.domNode).forEach(dojo.hitch(this,function(n){
this.connect(n,"onclick","_handleClick");
}));
},_handleClick:function(e){
dojo.stopEvent(e);
var _5d7=e.target.innerHTML;
var item=this.items[_5d7];
this.word.setAttribute("href",item.url);
this.word.innerHTML=_5d7;
this.def.innerHTML=item.descr;
}});
}
if(!dojo._hasResource["dijit._KeyNavContainer"]){
dojo._hasResource["dijit._KeyNavContainer"]=true;
dojo.provide("dijit._KeyNavContainer");
dojo.declare("dijit._KeyNavContainer",[dijit._Container],{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_5d9,_5da){
var _5db=this._keyNavCodes={};
var prev=dojo.hitch(this,this.focusPrev);
var next=dojo.hitch(this,this.focusNext);
dojo.forEach(_5d9,function(code){
_5db[code]=prev;
});
dojo.forEach(_5da,function(code){
_5db[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(_5e0,_5e1){
dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);
this._startupChild(_5e0);
},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 _5e2=this._getNextFocusableChild(this.focusedChild,1);
if(_5e2.getFocalNodes){
this.focusChild(_5e2,_5e2.getFocalNodes()[0]);
}else{
this.focusChild(_5e2);
}
},focusPrev:function(){
if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){
this.focusedChild.focusPrev();
return;
}
var _5e3=this._getNextFocusableChild(this.focusedChild,-1);
if(_5e3.getFocalNodes){
var _5e4=_5e3.getFocalNodes();
this.focusChild(_5e3,_5e4[_5e4.length-1]);
}else{
this.focusChild(_5e3);
}
},focusChild:function(_5e5,node){
if(_5e5){
if(this.focusedChild&&_5e5!==this.focusedChild){
this._onChildBlur(this.focusedChild);
}
this.focusedChild=_5e5;
if(node&&_5e5.focusFocalNode){
_5e5.focusFocalNode(node);
}else{
_5e5.focus();
}
}
},_startupChild:function(_5e7){
if(_5e7.getFocalNodes){
dojo.forEach(_5e7.getFocalNodes(),function(node){
dojo.attr(node,"tabindex",-1);
this._connectNode(node);
},this);
}else{
var node=_5e7.focusNode||_5e7.domNode;
if(_5e7.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){
return;
}
this.focusFirstChild();
dojo.removeAttr(this.domNode,"tabIndex");
},_onBlur:function(evt){
if(this.tabIndex){
dojo.attr(this.domNode,"tabindex",this.tabIndex);
}
},_onContainerKeypress:function(evt){
if(evt.ctrlKey||evt.altKey){
return;
}
var func=this._keyNavCodes[evt.charOrCode];
if(func){
func();
dojo.stopEvent(evt);
}
},_onNodeFocus:function(evt){
var _5f0=dijit.getEnclosingWidget(evt.target);
if(_5f0&&_5f0.isFocusable()){
this.focusedChild=_5f0;
}
dojo.stopEvent(evt);
},_onNodeBlur:function(evt){
dojo.stopEvent(evt);
},_onChildBlur:function(_5f2){
},_getFirstFocusableChild:function(){
return this._getNextFocusableChild(null,1);
},_getNextFocusableChild:function(_5f3,dir){
if(_5f3){
_5f3=this._getSiblingOfChild(_5f3,dir);
}
var _5f5=this.getChildren();
for(var i=0;i<_5f5.length;i++){
if(!_5f3){
_5f3=_5f5[(dir>0)?0:(_5f5.length-1)];
}
if(_5f3.isFocusable()){
return _5f3;
}
_5f3=this._getSiblingOfChild(_5f3,dir);
}
return null;
}});
}
if(!dojo._hasResource["dijit.MenuItem"]){
dojo._hasResource["dijit.MenuItem"]=true;
dojo.provide("dijit.MenuItem");
dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\">\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),label:"",iconClass:"",accelKey:"",disabled:false,_fillContent:function(_5f7){
if(_5f7&&!("label" in this.params)){
this.attr("label",_5f7.innerHTML);
}
},postCreate:function(){
dojo.setSelectable(this.domNode,false);
dojo.attr(this.containerNode,"id",this.id+"_text");
dijit.setWaiState(this.domNode,"labelledby",this.id+"_text");
},_onHover:function(){
dojo.addClass(this.domNode,"dijitMenuItemHover");
this.getParent().onItemHover(this);
},_onUnhover:function(){
dojo.removeClass(this.domNode,"dijitMenuItemHover");
this.getParent().onItemUnhover(this);
},_onClick:function(evt){
this.getParent().onItemClick(this,evt);
dojo.stopEvent(evt);
},onClick:function(evt){
},focus:function(){
try{
dijit.focus(this.focusNode);
}
catch(e){
}
},_onFocus:function(){
this._setSelected(true);
},_setSelected:function(_5fa){
dojo.toggleClass(this.domNode,"dijitMenuItemSelected",_5fa);
},setLabel:function(_5fb){
dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");
this.attr("label",_5fb);
},setDisabled:function(_5fc){
dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use attr('disabled', bool) instead.","","2.0");
this.attr("disabled",_5fc);
},_setDisabledAttr:function(_5fd){
this.disabled=_5fd;
dojo[_5fd?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");
dijit.setWaiState(this.focusNode,"disabled",_5fd?"true":"false");
},_setAccelKeyAttr:function(_5fe){
this.accelKey=_5fe;
this.accelKeyNode.style.display=_5fe?"":"none";
this.accelKeyNode.innerHTML=_5fe;
dojo.attr(this.containerNode,"colSpan",_5fe?"1":"2");
}});
}
if(!dojo._hasResource["dijit.PopupMenuItem"]){
dojo._hasResource["dijit.PopupMenuItem"]=true;
dojo.provide("dijit.PopupMenuItem");
dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){
if(this.srcNodeRef){
var _5ff=dojo.query("*",this.srcNodeRef);
dijit.PopupMenuItem.superclass._fillContent.call(this,_5ff[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";
if(this.arrowWrapper){
dojo.style(this.arrowWrapper,"visibility","");
}
dijit.setWaiState(this.focusNode,"haspopup","true");
},destroyDescendants:function(){
if(this.popup){
this.popup.destroyRecursive();
delete this.popup;
}
this.inherited(arguments);
}});
}
if(!dojo._hasResource["dijit.CheckedMenuItem"]){
dojo._hasResource["dijit.CheckedMenuItem"]=true;
dojo.provide("dijit.CheckedMenuItem");
dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:"<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t</td>\n</tr>\n",checked:false,_setCheckedAttr:function(_601){
dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_601);
dijit.setWaiState(this.domNode,"checked",_601);
this.checked=_601;
},onChange:function(_602){
},_onClick:function(e){
if(!this.disabled){
this.attr("checked",!this.checked);
this.onChange(this.checked);
}
this.inherited(arguments);
}});
}
if(!dojo._hasResource["dijit.MenuSeparator"]){
dojo._hasResource["dijit.MenuSeparator"]=true;
dojo.provide("dijit.MenuSeparator");
dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:"<tr class=\"dijitMenuSeparator\">\n\t<td colspan=\"4\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n</tr>\n",postCreate:function(){
dojo.setSelectable(this.domNode,false);
},isFocusable:function(){
return false;
}});
}
if(!dojo._hasResource["dijit.Menu"]){
dojo._hasResource["dijit.Menu"]=true;
dojo.provide("dijit.Menu");
dojo.declare("dijit._MenuBase",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_604){
_604.startup();
});
this.startupKeyNavChildren();
this.inherited(arguments);
},onExecute:function(){
},onCancel:function(_605){
},_moveToPopup:function(evt){
if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){
this.focusedChild._onClick(evt);
}else{
var _607=this._getTopMenu();
if(_607&&_607._isMenuBar){
_607.focusNext();
}
}
},onItemHover:function(item){
if(this.isActive){
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){
item._setSelected(false);
dijit.popup.close(item.popup);
this._stopPopupTimer();
},onItemUnhover:function(item){
if(this.isActive){
this._stopPopupTimer();
}
},_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;
}
this.focusChild(item);
if(item.popup){
if(!this.is_open){
this._openPopup();
}
}else{
this.onExecute();
item.onClick(evt);
}
},_openPopup:function(){
this._stopPopupTimer();
var _60e=this.focusedChild;
var _60f=_60e.popup;
if(_60f.isShowingNow){
return;
}
_60f.parentMenu=this;
var self=this;
dijit.popup.open({parent:this,popup:_60f,around:_60e.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"}),onCancel:function(){
dijit.popup.close(_60f);
_60e.focus();
self.currentPopup=null;
},onExecute:dojo.hitch(this,"_onDescendantExecute")});
this.currentPopup=_60f;
if(_60f.focus){
setTimeout(dojo.hitch(_60f,"focus"),0);
}
},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;
}
},_onFocus:function(){
this.isActive=true;
dojo.addClass(this.domNode,"dijitMenuActive");
dojo.removeClass(this.domNode,"dijitMenuPassive");
this.inherited(arguments);
},_onBlur:function(){
this.isActive=false;
dojo.removeClass(this.domNode,"dijitMenuActive");
dojo.addClass(this.domNode,"dijitMenuPassive");
this.onClose();
this.inherited(arguments);
},_onDescendantExecute:function(){
this.onClose();
}});
dojo.declare("dijit.Menu",dijit._MenuBase,{constructor:function(){
this._bindings=[];
},templateString:"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,_contextMenuWithMouse:false,postCreate:function(){
if(this.contextMenuForWindow){
this.bindDomNode(dojo.body());
}else{
dojo.forEach(this.targetNodeIds,this.bindDomNode,this);
}
var k=dojo.keys,l=this.isLeftToRight();
this._openSubMenuKey=l?k.RIGHT_ARROW:k.LEFT_ARROW;
this._closeSubMenuKey=l?k.LEFT_ARROW:k.RIGHT_ARROW;
this.connectKeyNavHandlers([k.UP_ARROW],[k.DOWN_ARROW]);
},_onKeyPress:function(evt){
if(evt.ctrlKey||evt.altKey){
return;
}
switch(evt.charOrCode){
case this._openSubMenuKey:
this._moveToPopup(evt);
dojo.stopEvent(evt);
break;
case this._closeSubMenuKey:
if(this.parentMenu){
if(this.parentMenu._isMenuBar){
this.parentMenu.focusPrev();
}else{
this.onCancel(false);
}
}else{
dojo.stopEvent(evt);
}
break;
}
},_iframeContentWindow:function(_615){
var win=dijit.getDocumentWindow(dijit.Menu._iframeContentDocument(_615))||dijit.Menu._iframeContentDocument(_615)["__parent__"]||(_615.name&&dojo.doc.frames[_615.name])||null;
return win;
},_iframeContentDocument:function(_617){
var doc=_617.contentDocument||(_617.contentWindow&&_617.contentWindow.document)||(_617.name&&dojo.doc.frames[_617.name]&&dojo.doc.frames[_617.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(_61c){
var node=dojo.byId(_61c);
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 _626=dojo.coords(e.target,true);
x=_626.x+10;
y=_626.y+10;
}
var self=this;
var _628=dijit.getFocus(this);
function _629(){
dijit.focus(_628);
dijit.popup.close(self);
};
dijit.popup.open({popup:this,x:x,y:y,onExecute:_629,onCancel:_629,orient:this.isLeftToRight()?"L":"R"});
this.focus();
this._onBlur=function(){
this.inherited("_onBlur",arguments);
dijit.popup.close(this);
};
},uninitialize:function(){
dojo.forEach(this.targetNodeIds,this.unBindDomNode,this);
this.inherited(arguments);
}});
}
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:"<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class=\"dijitReset dijitRight dijitInline\"\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\" \n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" \n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span \n\t\t\t\t></span \n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\" \n\t\t\t\t\tid=\"${id}_label\"  \n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\n\t\t\t\t></span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n",attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),_onClick:function(e){
if(this.disabled||this.readOnly){
return false;
}
this._clicked();
return this.onClick(e);
},_onButtonClick:function(e){
if(e.type!="click"&&!(this.type=="submit"||this.type=="reset")){
dojo.stopEvent(e);
}
if(this._onClick(e)===false){
e.preventDefault();
}else{
if(this.type=="submit"&&!this.focusNode.form){
for(var node=this.domNode;node.parentNode;node=node.parentNode){
var _62d=dijit.byNode(node);
if(_62d&&typeof _62d._onSubmit=="function"){
_62d._onSubmit(e);
break;
}
}
}
}
},_setValueAttr:function(_62e){
var attr=this.attributeMap.value||"";
if(this[attr.node||attr||"domNode"].tagName=="BUTTON"){
if(_62e!=this.value){
console.debug("Cannot change the value attribute on a Button widget.");
}
}
},_fillContent:function(_630){
if(_630&&!("label" in this.params)){
this.attr("label",_630.innerHTML);
}
},postCreate:function(){
if(this.showLabel==false){
dojo.addClass(this.containerNode,"dijitDisplayNone");
}
dojo.setSelectable(this.focusNode,false);
this.inherited(arguments);
},onClick:function(e){
return true;
},_clicked:function(e){
},setLabel:function(_633){
dojo.deprecated("dijit.form.Button.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");
this.attr("label",_633);
},_setLabelAttr:function(_634){
this.containerNode.innerHTML=this.label=_634;
this._layoutHack();
if(this.showLabel==false&&!this.params.title){
this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");
}
}});
dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\n\t><span class='dijitReset dijitRight dijitInline'\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\" \n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\"\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode\" \n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" \n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"  \n\t\t\t\t\tdojoAttachPoint=\"containerNode,popupStateNode\" \n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n",_fillContent:function(){
if(this.srcNodeRef){
var _635=dojo.query("*",this.srcNodeRef);
dijit.form.DropDownButton.superclass._fillContent.call(this,_635[0]);
this.dropDownContainer=this.srcNodeRef;
}
},startup:function(){
if(this._started){
return;
}
if(!this.dropDown){
var _636=dojo.query("[widgetId]",this.dropDownContainer)[0];
this.dropDown=dijit.byNode(_636);
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 _639=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;
if(!_639||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.charOrCode==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 _63d=this.dropDown;
if(!_63d){
return;
}
if(!this._opened){
if(_63d.href&&!_63d.isLoaded){
var self=this;
var _63f=dojo.connect(_63d,"onLoad",function(){
dojo.disconnect(_63f);
self._openDropDown();
});
_63d.refresh();
return;
}else{
this._openDropDown();
}
}else{
this._closeDropDown();
}
},_openDropDown:function(){
var _640=this.dropDown;
var _641=_640.domNode.style.width;
var self=this;
dijit.popup.open({parent:this,popup:_640,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(){
_640.domNode.style.width=_641;
self.popupStateNode.removeAttribute("popupActive");
self._opened=false;
}});
if(this.domNode.offsetWidth>_640.domNode.offsetWidth){
var _643=null;
if(!this.isLeftToRight()){
_643=_640.domNode.parentNode;
var _644=_643.offsetLeft+_643.offsetWidth;
}
dojo.marginBox(_640.domNode,{w:this.domNode.offsetWidth});
if(_643){
_643.style.left=_644-this.domNode.offsetWidth+"px";
}
}
this.popupStateNode.setAttribute("popupActive","true");
this._opened=true;
if(_640.focus){
_640.focus();
}
},_closeDropDown:function(_645){
if(this._opened){
dijit.popup.close(this.dropDown);
if(_645){
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 class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\"\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\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\n\t\t></td\n\t\t><td class='dijitReset dijitRight 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}\" ${nameAttrSetting}\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.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"]}),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,attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){
this.attr("checked",!this.checked);
},_setCheckedAttr:function(_64d){
this.checked=_64d;
dojo.attr(this.focusNode||this.domNode,"checked",_64d);
dijit.setWaiState(this.focusNode||this.domNode,"pressed",_64d);
this._setStateClass();
this._handleOnChange(_64d,true);
},setChecked:function(_64e){
dojo.deprecated("setChecked("+_64e+") is deprecated. Use attr('checked',"+_64e+") instead.","","2.0");
this.attr("checked",_64e);
},reset:function(){
this._hasBeenBlurred=false;
this.attr("checked",this.params.checked||false);
}});
}
if(!dojo._hasResource["start.widgets.News"]){
dojo._hasResource["start.widgets.News"]=true;
dojo.provide("start.widgets.News");
dojo.declare("start.widgets.TabMenuItem",[start.Base,dijit._Templated],{templateString:"<div class=\"tabMenuItem\" tabMenuId=\"\"></div>\n",postCreate:function(){
if(this.active){
dojo.addClass(this.domNode,"activeTab");
}else{
dojo.addClass(this.domNode,"inactiveTab");
}
if(this.hide){
dojo.addClass(this.domNode,"hidden");
}
this.domNode.setAttribute("tabMenuId",this.tabMenuId);
this.domNode.innerHTML=this.displayName;
}});
dojo.declare("start.widgets.News",[start.Base,dijit._Templated],{templateString:"<div class=\"News has_layout\">\n  <div class=\"TabMenu\" dojoattachpoint=\"tabMenu\">\n    <div class=\"tabMenuTabs\" dojoattachpoint=\"tabMenuTabs\">\n      <div dojoattachpoint=\"menu_\" class=\"menu\"></div>\n      <br style=\"clear:both;height:1px;\"/>\n    </div>\n  </div>\n  <div class=\"Accordions\" dojoattachpoint=\"accordions\"></div>\n</div>\n",NEWS_TYPES:{POLITICS:0,NATIONAL:1,WORLD:2,BUSINESS:3,SPORTS:4,ENTERTAINMENT:5,TECH:6,HEALTH:7,TOPSTORIES:31},strings:{prefix:"AskNews",items:["TopStories","Sports","Entertainment","Prev","Next","ExploreAll"]},MAX_NUM_ARTICLES:5,constructor:function(){
this.NEWS_NAMES={};
this.NEWS_NAMES[this.NEWS_TYPES.POLITICS]="Politics";
this.NEWS_NAMES[this.NEWS_TYPES.NATIONAL]="National";
this.NEWS_NAMES[this.NEWS_TYPES.WORLD]="World";
this.NEWS_NAMES[this.NEWS_TYPES.BUSINESS]="Business";
this.NEWS_NAMES[this.NEWS_TYPES.SPORTS]="Sports";
this.NEWS_NAMES[this.NEWS_TYPES.ENTERTAINMENT]="Entertainment";
this.NEWS_NAMES[this.NEWS_TYPES.TECH]="Tech";
this.NEWS_NAMES[this.NEWS_TYPES.HEALTH]="Health";
this.NEWS_NAMES[this.NEWS_TYPES.TOPSTORIES]="TopStories";
this.visibleTabs=[this.NEWS_TYPES.TOPSTORIES,this.NEWS_TYPES.SPORTS,this.NEWS_TYPES.ENTERTAINMENT];
this.firstActiveTab=this.NEWS_TYPES.TOPSTORIES;
},postCreate:function(){
var o=this;
this.tabsMap={};
this.accMap={};
var d=dojo.doc.createElement("div");
this.more=new dijit.form.DropDownButton({label:"","class":"newsWidgetMoreButton","iconClass":"NewsMoreIcon"},d);
this.moreMenu=new dijit.Menu({"class":"newsWidgetMoreMenu","onclick":dojo.hitch(this,"_handleMenuClick")});
window.setTimeout(function(){
start.io.pPost("news",{}).addCallbacks(dojo.hitch(o,"_handleSuccess"),dojo.hitch(o,"_handleFailure"));
},0);
},_handleSuccess:function(data){
var n,w;
this.accordions_={};
for(var i in data){
i=parseInt(i);
n=dojo.doc.createElement("div");
this.accordions.appendChild(n);
w=new start.widgets.TemplatedAccordion({data:data[i]["items"]},n);
w.startup();
this.accMap[i]=w.domNode;
this.accordions_[i]=w;
if(i!=31){
dojo.addClass(w.domNode,"hidden");
}
n=dojo.doc.createElement("div");
dojo.place(n,this.menu_,"before");
var _655=false,_656=true;
for(var j=0;j<this.visibleTabs.length;j++){
if(i==this.visibleTabs[j]){
_656=false;
break;
}
}
if(i==this.firstActiveTab){
_655=true;
this.activeTabId=i;
}
w=new start.widgets.TabMenuItem({active:_655,hide:_656,tabMenuId:i,displayName:this.NEWS_NAMES[i]},n);
w.startup();
this.tabsMap[i]=w.domNode;
this.connect(w.domNode,"onclick","_handleTabClick");
var t_=new dijit.MenuItem({label:this.NEWS_NAMES[i],newsType:i,"class":"newsWidgetMoreItem"});
this.moreMenu.addChild(t_);
this.connect(t_.domNode,"onclick","_handleMenuClick");
}
this.more.dropDown=this.moreMenu;
this.more.startup();
this.menu_.appendChild(this.more.domNode);
},_handleTabClick:function(e){
dojo.stopEvent(e);
var id=e.target.getAttribute("tabMenuId");
this.changeTabs(id,false);
},changeTabs:function(id,hide){
var cur_=this.tabsMap[this.activeTabId];
var new_=this.tabsMap[id];
if(cur_==new_){
return;
}
var _65f=this.accMap[this.activeTabId];
var _660=this.accMap[id];
dojo.removeClass(cur_,"activeTab");
dojo.removeClass(new_,"inactiveTab");
dojo.addClass(cur_,"inactiveTab");
dojo.addClass(new_,"activeTab");
if(dojo.hasClass(new_,"hidden")&&hide){
dojo.addClass(cur_,"hidden");
dojo.removeClass(new_,"hidden");
}
dojo.addClass(_65f,"hidden");
dojo.removeClass(_660,"hidden");
this.activeTabId=id;
},_handleMenuClick:function(e){
dojo.stopEvent(e);
var w=dijit.getEnclosingWidget(e.target);
var id=w.newsType;
this.changeTabs(id,true);
},_handleFailure:function(e){
console.log("News failure: %o",e);
}});
}
if(!dojo._hasResource["start.widgets.VideoSection"]){
dojo._hasResource["start.widgets.VideoSection"]=true;
dojo.provide("start.widgets.VideoSection");
dojo.declare("start.widgets.VideoSection",[start.Base,dijit._Templated],{templateString:"<div class=\"has_layout\">\n    <div class=\"multi_video_view\" dojoattachpoint=\"multi_video_view\" dojoattachevent=\"onclick:_select_thumb\"> \n    </div>\n  <div class=\"nav\" dojoattachpoint=\"video_navbar\">\n    <a class=\"prev\" dojoattachevent=\"onclick:_prev\"></a>\n    <a class=\"next\" dojoattachevent=\"onclick:_next\"></a>\n  </div>\n    <div class=\"single_video_view hidden\" dojoattachpoint=\"single_video_view\">\n      <div class=\"video_con\" dojoattachpoint=\"video_con\">\n      \n      </div>\n      <div class=\"link_image\">\n        <a target=\"_blank\" href=\"\" title=\"Link to image\" dojoattachpoint=\"link\">${Link}</a>\n      </div>\n      <div class=\"author\" dojoattachpoint=\"author\">\n      </div>\n    </div>\n</div>\n",strings:{prefix:"Video",items:["Link"]},postCreate:function(){
this.num=4;
this.updateVideos();
if(this.visible){
dojo.addClass(this.domNode,"current");
}else{
dojo.addClass(this.domNode,"hidden");
}
},updateVideos:function(){
var _a=[];
for(var i=0;i<this.videos.length;i++){
if(i==0){
this.minItemId=this.videos[i].itemId;
this.maxItemId=this.videos[i].itemId;
}else{
this.minItemId=(this.minItemId>this.videos[i].itemId)?this.videos[i].itemId:this.minItemId;
this.maxItemId=(this.maxItemId<this.videos[i].itemId)?this.videos[i].itemId:this.maxItemId;
}
_a.push("".concat("<div class=\"video_thumb_con\">","<a class=\"video_thumb_link\" href=\"#\">","<img class=\"video_thumb\" src=\"",this.videos[i].pImage,"\" video_num=\"",i,"\" />","<div class=\"video_title\">",this.videos[i].pTitle,"</div>","</a>","</div>"));
}
this.multi_video_view.innerHTML=_a.join("");
},_select_thumb:function(e){
dojo.stopEvent(e);
if(dojo.hasClass(e.target,"video_thumb")){
this.curVideo=parseInt(e.target.getAttribute("video_num"));
this._update();
this._changeview(e);
}
},_update:function(){
this.video_con.innerHTML=this.videos[this.curVideo].pMedia;
this.link.innerHTML=this.videos[this.curVideo].pTitle;
this.link.setAttribute("href",this.videos[this.curVideo].pUrl);
if(this.videos[this.curVideo].pAuthor!=""){
this.author.innerHTML=start.translate.get("Video.By")+" "+this.videos[this.curVideo].pAuthor;
}
},selectMultiView:function(){
if(this.single_view_state){
this._changeview();
}
},_changeview:function(e){
if(e){
dojo.stopEvent(e);
}
if(this.single_view_state){
this.single_view_state=false;
dojo.addClass(this.single_video_view,"hidden");
dojo.removeClass(this.multi_video_view,"hidden");
dojo.removeClass(this.video_navbar,"hidden");
}else{
this.single_view_state=true;
dojo.removeClass(this.single_video_view,"hidden");
dojo.addClass(this.multi_video_view,"hidden");
dojo.addClass(this.video_navbar,"hidden");
dojo.removeClass(this.parent.tab,"current");
}
},setVisibility:function(flag){
if(flag){
dojo.addClass(this.domNode,"current");
dojo.removeClass(this.domNode,"hidden");
}else{
dojo.addClass(this.domNode,"hidden");
dojo.removeClass(this.domNode,"current");
}
},_prev:function(e){
dojo.stopEvent(e);
var _66b=this.maxItemId+4;
if(_66b>this.parent.topItemId){
_66b=5;
this.num=this.parent.topItemId;
}else{
_66b=_66b+1;
this.num=this.num-4;
}
this._changeVideo(_66b,e.target.parentNode);
},_next:function(e){
dojo.stopEvent(e);
if(this.minItemId>4){
var _66d=this.minItemId;
this.num=this.num+4;
}else{
var _66d="";
this.num=4;
}
this._changeVideo(_66d,e.target.parentNode);
},_changeVideo:function(_66e,_66f){
dojo.addClass(_66f,"nav_loading");
var _670={siteid:this.videos[0].siteId,format:"json",glimpse:1,summary:0,num:this.num,baton:_66e,sort:"desc"};
this.parent.getVideoCall(_670,"navcallsucess","navcallerror");
var _671=dojo.subscribe(start.topics.VIDEO_NAVIGATION,this,function(){
this.videos=this.parent.items;
this.updateVideos();
dojo.unsubscribe(_671);
dojo.removeClass(_66f,"nav_loading");
});
},_select_video:function(){
}});
}
if(!dojo._hasResource["start.widgets.VideoWidget"]){
dojo._hasResource["start.widgets.VideoWidget"]=true;
dojo.provide("start.widgets.VideoWidget");
dojo.declare("start.widgets.VideoWidget",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"ask_video_widget\">\n  <ul class=\"news_tabs\" dojoattachpoint=\"tabs\" class=\"item_view\">\n  </ul>\n  <br style=\"clear: both;\"/>\n</div>\n",postCreate:function(){
this.objid=this.srcNodeRef.getAttribute("objid");
this.items_t=[];
this.items=[];
this.sections_by_position=[];
dojo.subscribe(start.topics.START_LOAD_COMPLETE,this,"postLoad");
},postLoad:function(_672){
setTimeout(dojo.hitch(this,"getVideoData"),0);
},getVideoData:function(){
var obj=start.start.objMgr.getObjData(this.objid);
var obj=start.start.videodata[obj.data];
var _674=dojo.query(".widget_title_text",this.domNode.parentNode.parentNode.parentNode.parentNode);
_674[0].innerHTML=obj.header;
_674=dojo.query(".widget_title_icon",this.domNode.parentNode.parentNode.parentNode);
if(obj.icon){
_674[0].setAttribute("src","/c/images/start/"+obj.icon);
}
if(obj&&obj.sites.length>0){
var tab,a,sep;
for(var i=0;i<obj.titles.length;i++){
tab=this.tabs.appendChild(dojo.doc.createElement("li"));
if(i>0){
sep=tab.appendChild(dojo.doc.createElement("span"));
sep.innerHTML="|";
}
a=tab.appendChild(dojo.doc.createElement("a"));
a.setAttribute("href","#");
a.setAttribute("position",i);
a.id=this.domNode.id+"_tab_"+i;
a.innerHTML=obj.titles[i];
if(i==0){
dojo.addClass(a,"current");
this.tab=a.id;
}
this.connect(a,"onclick","navigate");
}
var _679={siteid:obj.sites.join(","),format:"json",glimpse:1,summary:0,num:4};
this.getVideoCall(_679,"renderVideo","renderError");
}else{
this.renderNoVideo();
}
},getVideoCall:function(_67a,_67b,_67c){
start.io.get("preview",_67a,{preventCache:false}).addCallbacks(dojo.hitch(this,_67b),dojo.hitch(this,_67c));
},navcallsucess:function(data){
this.items=[];
var _67e,o;
for(var j=0;j<data.items.length;j++){
if(data.sites[0].siteId==data.items[j].siteId){
this.items.push(data.items[j]);
}
}
this._parseVideos(data.sites[0].feedUrl);
dojo.publish(start.topics.VIDEO_NAVIGATION);
},navcallerror:function(data){
},renderVideo:function(data){
if(!data||!data.items||data.items.length==0){
this.renderNoVideo();
return;
}
var node,n;
for(var i=0;i<data.sites.length;i++){
this.items=[];
var _686,o;
for(var j=0;j<data.items.length;j++){
if(j==0){
this.topItemId=data.items[j].itemId;
}else{
this.topItemId=(this.topmaxItemId<data.items[j].itemId)?data.items[j].itemId:this.topItemId;
}
if(data.sites[i].siteId==data.items[j].siteId){
this.items.push(data.items[j]);
}
}
this._parseVideos(data.sites[i].feedUrl);
node=this.domNode.appendChild(dojo.doc.createElement("div"));
n=new start.widgets.VideoSection({videos:this.items,visible:(i==0),parent:this},node);
n.startup();
this.sections_by_position[i]=n;
if(i==0){
this.current=n;
}
}
dojo.style(this.domNode,"height","auto");
},renderNoVideo:function(){
},renderError:function(){
},navigate:function(e){
dojo.stopEvent(e);
var _68a=parseInt(e.target.getAttribute("position"));
var prev=this.current;
this.current=this.sections_by_position[_68a];
this.current.selectMultiView();
if(prev==this.current){
return;
}
this.current.setVisibility(true);
prev.setVisibility(false);
dojo.removeClass(this.tab,"current");
this.tab=e.target.id;
dojo.addClass(this.tab,"current");
},_parseVideos:function(_68c){
switch(this._parseUri(_68c).host){
case "vimeo.com":
case "www.vimeo.com":
for(var i=0;i<this.items.length;i++){
this.items[i].pTitle=this.items[i].title;
this.items[i].pMedia=this.items[i].media_top;
this.items[i].pUrl=this.items[i].url;
this.items[i].pAuthor=this.items[i].author;
this.items[i].pImage=(this.items[i].enclosureThumb!="")?this.items[i].enclosureThumb:"/c/images/start/vimeothumb.png";
}
break;
case "gdata.youtube.com":
for(var i=0;i<this.items.length;i++){
var _68e=document.createElement("div");
_68e.innerHTML=this.items[i].desc;
uDomNode=dojo.query("a",_68e);
for(var j=0;j<uDomNode.length;j++){
if(uDomNode[j].firstChild.nodeName=="IMG"){
this.items[i].pImage="/c/images/start/youtubethumb.jpg";
var vID=this._parseUri(uDomNode[j].href).queryKey.v;
if(uDomNode[j].firstChild.src.indexOf(vID)){
this.items[i].pImage=(uDomNode[j].firstChild.src!="")?uDomNode[j].firstChild.src:"/c/images/start/youtubethumb.jpg";
break;
}
}
}
this.items[i].pMedia="<div class=\"bl_flash_content\"><object height=\"100%\" width=\"100%\"></param><param value=\"http://www.youtube.com/v/"+vID+"\" name=\"movie\"/><param value=\"transparent\" name=\"wmode\"/><embed height=\"350\" width=\"100%\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" src=\"http://www.youtube.com/v/"+vID+"&amp;autoplay=1&amp;autoplay=1\"/></object></div>";
this.items[i].pTitle=this.items[i].title;
this.items[i].pUrl=this.items[i].url;
this.items[i].pAuthor=this.items[i].author;
}
break;
}
},_parseUri:function(str){
var m=(/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/).exec(str),uri={},i=14,key=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q={name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g};
while(i--){
uri[key[i]]=m[i]||"";
}
uri[q.name]={};
uri[key[12]].replace(q.parser,function($0,$1,$2){
if($1){
uri[q.name][$1]=$2;
}
});
return uri;
}});
}
if(!dojo._hasResource["start.widgets.FlexApp"]){
dojo._hasResource["start.widgets.FlexApp"]=true;
dojo.provide("start.widgets.FlexApp");
dojo.declare("start.widgets.FlexApp",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div>\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n  codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\"\n  width=\"100%\" height=\"400\" id=\"\" dojoattachpoint=\"flexObject\">\n    <embed dojoattachpoint=\"embed\" src=\"\" quality=high bgcolor=#FFFFFF width=\"100%\" height=\"400\"\n      name=\"notebook\" align=\"\" type=\"application/x-shockwave-flash\"\n      pluginpage=\"http://www.macromedia.com/go/getflashplayer\"></embed>\n</object>\n\n</div>\n",postCreate:function(){
var _69a="/c/flex/r00/";
dojo.subscribe(start.topics.FLEX_APP_LOADING_FINISHED,this,"_handleFlexAppFinishedLoading");
dojo.subscribe(start.topics.FLEX_APP_SET_DATA,this,"_handleFlexSetData");
if(this.embed){
this.embed.setAttribute("src",_69a+this.widgetName+".swf");
this.embed.setAttribute("name",this.widgetName);
this.flexObject.setAttribute("id",_69a+this.widgetName+".swf");
}else{
this.domNode.innerHTML="".concat("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ","codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" ","width=\"100%\" height=\"400\" id=\"",this.widgetName,".swf\"> ","<param dojoattachpoint=\"movie\" name=\"movie\" value=\"",_69a,this.widgetName,".swf","\">","<param name=\"quality\" value=\"high\">","<param name=\"bgcolor\" value=\"#FFFFFF\">","</object>");
}
var o=this;
window.setTimeout(function(){
if(dojo.isIE){
o.flexApp=window[o.widgetName];
}else{
o.flexApp=dojo.doc[o.widgetName];
}
},0);
},_handleFlexSetData:function(_69c,data){
if(_69c===this.widgetName){
dojo.publish(start.topics.NOTEBOOK_SAVESETTINGS,[this.domNode.parentNode.parentNode,"userid",data]);
}
},_handleFlexAppFinishedLoading:function(_69e){
if(_69e===this.widgetName&&this.data&&this.data.value&&this.data.value!=="undefined"){
var o=this;
window.setTimeout(function(){
if(o.flexApp.setData&&dojo.isFunction(o.flexApp.setData)){
o.flexApp.setData(o.data);
}
},1);
}
}});
}
if(!dojo._hasResource["start.WidgetItem"]){
dojo._hasResource["start.WidgetItem"]=true;
dojo.provide("start.WidgetItem");
dojo.declare("start.WidgetItem",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<li class=\"WidgetItem_ has_layout item\">\n  <div class=\"items_div_con has_layout\">\n    <a href=\"#\" dojoattachpoint=\"toggle\" dojoattachevent=\"onclick:_toggle\" class=\"toggleContentView has_layout\"></a>\n      <div class=\"itemTitle\">\n        <a dojoattachpoint=\"anchor\" href=\"\"></a>\n      </div>\n  </div>\n  <div dojoattachpoint=\"itemContent\" class=\"itemContent\">\n    <textarea dojoattachpoint=\"content_\" cols=\"20\" rows=\"20\"></textarea>\n  </div>\n</li>\n\n\n",postCreate:function(){
this.anchor.setAttribute("href",this.url);
this.anchor.setAttribute("target","_blank");
this.anchor.innerHTML=this.title;
this.domNode.setAttribute("date",this.date_);
this.content_.value=this.contents;
},toggleItem:function(){
this._toggle(null);
},_toggle:function(e){
if(e!==null){
dojo.stopEvent(e);
}
if(!dojo.hasClass(this.itemContent,"shown")){
this.itemContent.innerHTML=this.content_.value;
dojo.addClass(this.itemContent,"shown");
this.activateImages(this,this.itemContent);
}
if(dojo.hasClass(this.itemContent,"showItem")){
dojo.removeClass(this.itemContent,"showItem");
dojo.removeClass(this.toggle,"toggleMin");
if(e!==null){
this.parent_.deactivate_active_item();
}
}else{
this.parent_.activate_item(this);
dojo.addClass(this.itemContent,"showItem");
dojo.addClass(this.toggle,"toggleMin");
}
},activateImages:function(_6a1,_6a2){
var imgs=dojo.query("img",_6a2).map(function(node){
_6a1.connect(node,"onclick","_expandImg");
});
},_expandImg:function(e){
var n=e.target;
while(n&&n.tagName!="A"){
n=n.parentNode;
}
dojo.stopEvent(e);
dojo.body().appendChild(new start.widgets.ImageViewer({url:e.target.src,imgTitle:"Expanded Image",link:(n)?n.href:""}).domNode);
}});
}
if(!dojo._hasResource["start.widgets.FeedGroupSection"]){
dojo._hasResource["start.widgets.FeedGroupSection"]=true;
dojo.provide("start.widgets.FeedGroupSection");
dojo.declare("start.widgets.FeedGroupSection",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div>\n <ul dojoattachpoint=\"test_jagan\">  </ul>\n</div>\n",postCreate:function(){
this.updateItems();
this.active_item=null;
if(this.visible){
dojo.addClass(this.domNode,"current");
}else{
dojo.addClass(this.domNode,"hidden");
}
},setVisibility:function(flag){
if(flag){
dojo.addClass(this.domNode,"current");
dojo.removeClass(this.domNode,"hidden");
}else{
dojo.addClass(this.domNode,"hidden");
dojo.removeClass(this.domNode,"current");
}
},updateItems:function(){
for(var j=0;j<this.feeds.length;j++){
var item=this.feeds[j];
this._create_item_widget(item.dateUpdated,item.title,item.url,item.desc);
}
},_create_item_widget:function(_6aa,_6ab,url,_6ad){
var li=this.test_jagan.appendChild(dojo.doc.createElement("li"));
var o=this;
var item=new start.WidgetItem({date_:_6aa,title:_6ab,url:url,contents:_6ad,parent_:o},li);
item.startup();
},deactivate_active_item:function(){
this.active_item=null;
},activate_item:function(item){
if(this.active_item){
this.active_item.toggleItem();
this.active_item=null;
}
this.active_item=item;
}});
}
if(!dojo._hasResource["start.widgets.FeedGroupWidget"]){
dojo._hasResource["start.widgets.FeedGroupWidget"]=true;
dojo.provide("start.widgets.FeedGroupWidget");
dojo.declare("start.widgets.FeedGroupWidget",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"feed_group_widget\">\n  <ul class=\"news_tabs\" dojoattachpoint=\"tabs\" class=\"item_view\">  </ul>\n  <br style=\"clear: both;\"/>\n</div>\n\n",postCreate:function(){
this.objid=this.srcNodeRef.getAttribute("objid");
this.items=[];
this.sections_by_position=[];
dojo.subscribe(start.topics.START_LOAD_COMPLETE,this,"postLoad");
},postLoad:function(_6b2){
setTimeout(dojo.hitch(this,"getFeedGroupData"),0);
},getFeedGroupData:function(){
var obj=start.start.objMgr.getObjData(this.objid);
obj=start.start.feedgroupdata[obj.data];
var _6b4=dojo.query(".widget_title_text",this.domNode.parentNode.parentNode.parentNode);
_6b4[0].innerHTML=start.translate.get(obj.header);
_6b4=dojo.query(".widget_title_icon",this.domNode.parentNode.parentNode.parentNode);
if(obj.icon){
_6b4[0].setAttribute("src","/c/images/start/"+obj.icon);
}
if(obj&&obj.sites.length>0){
if(obj.sites.length>1){
for(var i=0;i<obj.titles.length;i++){
tab=this.tabs.appendChild(dojo.doc.createElement("li"));
if(i>0){
sep=tab.appendChild(dojo.doc.createElement("span"));
sep.innerHTML="|";
}
a=tab.appendChild(dojo.doc.createElement("a"));
a.setAttribute("href","#");
a.setAttribute("position",i);
a.id=this.domNode.id+"_tab_"+i;
a.innerHTML=start.translate.get(obj.titles[i]);
if(i==0){
dojo.addClass(a,"current");
this.tab=a.id;
}
this.connect(a,"onclick","navigate");
}
}else{
var br=dojo.query("br",this.domNode)[0];
this.domNode.removeChild(br);
}
var _6b7={siteid:obj.sites.join(","),format:"json",glimpse:1,summary:1,num:5};
start.io.get("preview",_6b7,{preventCache:false}).addCallbacks(dojo.hitch(this,"renderFeedGroup"));
}
},renderFeedGroup:function(data){
if(!data||!data.items||data.items.length==0){
return;
}
var node,n;
for(var i=0;i<data.sites.length;i++){
var _6bc=[];
var _6bd,o;
for(var j=0;j<data.items.length;j++){
if(data.sites[i].siteId==data.items[j].siteId){
_6bc.push(data.items[j]);
}
}
node=this.domNode.appendChild(dojo.doc.createElement("div"));
n=new start.widgets.TemplatedAccordion({data:_6bc},node);
n.startup();
this.sections_by_position[i]=n;
if(i==0){
this.current=n;
}else{
dojo.addClass(n.domNode,"hidden");
}
}
dojo.style(this.domNode,"height","auto");
},navigate:function(e){
dojo.stopEvent(e);
var _6c1=parseInt(e.target.getAttribute("position"));
var prev=this.current;
this.current=this.sections_by_position[_6c1];
if(prev==this.current){
return;
}
dojo.removeClass(this.current.domNode,"hidden");
dojo.addClass(prev.domNode,"hidden");
dojo.removeClass(this.tab,"current");
this.tab=e.target.id;
dojo.addClass(this.tab,"current");
}});
}
if(!dojo._hasResource["start.widgets.WeatherWidget"]){
dojo._hasResource["start.widgets.WeatherWidget"]=true;
dojo.provide("start.widgets.WeatherWidget");
dojo.declare("start.widgets.WeatherWidget",[start.Base,dijit._Templated],{WEATHER_ITEM_HEIGHT:75,templateString:"<div class=\"has_layout weather_widget\">\n  The weather widget is currently under construction.\n</div>\n",postCreate:function(){
}});
}
if(!dojo._hasResource["start.widgets.Itunes"]){
dojo._hasResource["start.widgets.Itunes"]=true;
dojo.provide("start.widgets.Itunes");
dojo.declare("start.widgets.Itunes",[start.Base],{postCreate:function(){
this.objid=this.srcNodeRef.getAttribute("objid");
var o=this;
this.justaddedLink=dojo.query(".justaddedLink",this.domNode)[0];
this.songsLink=dojo.query(".songsLink",this.domNode)[0];
this.albumsLink=dojo.query(".albumsLink",this.domNode)[0];
window.setTimeout(function(){
dojo.publish(start.topics.SLIDE_DECLARE_OWNERSHIP,[o,o.objid]);
},0);
this._views={"justadded":"ItunesNew","albums":"ItunesAlbums","songs":"ItunesSongs","featured":"ItunesFeatured"};
this._currentView="justadded";
this._currentItem=0;
this.previousChange=1;
},getPrevContent:function(){
return this._buildWidget(-1);
},getNextContent:function(){
return this._buildWidget(1);
},setSlider:function(_6c4){
this._slider=_6c4;
this.connect(this.justaddedLink,"onclick","selectNew");
this.connect(this.songsLink,"onclick","selectSongs");
this.connect(this.albumsLink,"onclick","selectAlbums");
start.io.pPost("itunes",{}).addCallbacks(dojo.hitch(this,"_handleSuccess"),dojo.hitch(this,"_handleFailure"));
},_nextItem:function(dir){
var t=this._data[this._currentView];
var l=t.length;
if(dir!==this.previousChange){
if(dir===1){
this._currentItem+=3;
if(this._currentItem>=l){
this._currentItem-=l;
}
}else{
if(dir===-1){
this._currentItem-=3;
if(this._currentItem<0){
this._currentItem=l+this._currentItem;
}
}
}
}
var d=t[this._currentItem];
var n=dir+this._currentItem;
if(n>=l){
this._currentItem=0;
}else{
if(n<0){
this._currentItem=l-1;
}else{
this._currentItem=n;
}
}
this.previousChange=dir;
return d;
},_buildWidget:function(dir){
var f,l,n=dojo.doc.createElement("div");
if(dir==1){
f=this._nextItem(dir);
l=this._nextItem(dir);
}else{
l=this._nextItem(dir);
f=this._nextItem(dir);
}
var w=new start.widgets[this._views[this._currentView]]({data:[f,l]},n);
w.startup();
return w.domNode;
},selectNew:function(e){
if(e){
dojo.stopEvent(e);
}
this._currentView="justadded";
this._resetSlider();
dojo.addClass(this.justaddedLink,"active");
},selectSongs:function(e){
if(e){
dojo.stopEvent(e);
}
this._currentView="songs";
this._resetSlider();
dojo.addClass(this.songsLink,"active");
},selectAlbums:function(e){
if(e){
dojo.stopEvent(e);
}
this._currentView="albums";
this._resetSlider();
dojo.addClass(this.albumsLink,"active");
},_resetSlider:function(){
this._currentItem=0;
dojo.query(".tabs a",this.domNode).map(function(n){
dojo.removeClass(n,"active");
});
this._slider.reset();
this._slider.exchangeCurrentSlide(this._buildWidget(1));
},_handleSuccess:function(data){
this._data=data;
this._slider.exchangeCurrentSlide(this._buildWidget(1));
},_handleFailure:function(args){
console.log("News failure: %o",data);
}});
dojo.declare("start.widgets.ItunesBase",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"ItunesInfo has_layout\">\n  <div class=\"ItunesItem item2 has_layout\">\n    <a href=\"#\" dojoattachpoint=\"imageAnchor2\"><img src=\"#\" dojoattachpoint=\"image2\"/></a>\n    <p><a class=\"mainInfo\" href=\"#\" dojoattachpoint=\"albumInfo2\"></a></p>\n    <p><a class=\"subInfo\" href=\"#\" dojoattachpoint=\"albumMoreInfo2\"></a></p>\n  </div>\n  <div class=\"ItunesItem item1 has_layout\">\n    <a href=\"#\" dojoattachpoint=\"imageAnchor1\"><img src=\"#\" dojoattachpoint=\"image1\"/></a>\n    <p><a class=\"mainInfo\" href=\"#\" dojoattachpoint=\"albumInfo1\"></a></p>\n    <p><a class=\"subInfo\" href=\"#\" dojoattachpoint=\"albumMoreInfo1\"></a></p>\n  </div>\n  <br style=\"clear:both;\"/>\n</div>\n",NUM_ALBUMS_PER_VIEW:2,TEXT_LEN:25,postCreate:function(){
if(!this.itunesType){
this.itunesType="general";
}
dojo.addClass(this.domNode,"albumView");
for(var i=0;i<this.NUM_ALBUMS_PER_VIEW;i++){
this["image"+(i+1)].src=this.data[i]["coverart"];
if(this.itunesType==="songs"){
this["albumInfo"+(i+1)].innerHTML=this.formatText(this.data[i]["song"]);
this["albumInfo"+(i+1)].href=this.data[i]["songlink"];
}else{
this["albumInfo"+(i+1)].innerHTML=this.formatText(this.data[i]["album"]);
this["albumInfo"+(i+1)].href=this.data[i]["albumlink"];
}
this["albumMoreInfo"+(i+1)].innerHTML=this.formatText(this.data[i]["artist"]);
this["albumMoreInfo"+(i+1)].href=this.data[i]["artistlink"];
this["imageAnchor"+(i+1)].href=this.data[i]["albumlink"];
}
},formatText:function(text){
if(text.length>this.TEXT_LEN){
var text=text.substr(0,this.TEXT_LEN);
if(text[this.TEXT_LEN-1]!==" "){
text+="...";
}
}
return text;
}});
dojo.declare("start.widgets.ItunesSongs",[start.widgets.ItunesBase],{postCreate:function(){
this.itunesType="songs";
this.inherited("postCreate",arguments);
}});
dojo.declare("start.widgets.ItunesAlbums",[start.widgets.ItunesBase],{});
dojo.declare("start.widgets.ItunesNew",[start.widgets.ItunesBase],{});
dojo.declare("start.widgets.ItunesFeatured",[start.widgets.ItunesBase],{});
}
if(!dojo._hasResource["start.widgets.Photobucket"]){
dojo._hasResource["start.widgets.Photobucket"]=true;
dojo.provide("start.widgets.Photobucket");
dojo.declare("start.widgets.Photobucket",[dijit._Widget,dijit._Contained,dijit._Container,dijit._Templated],{templateString:"<div class=\"Photobucket\">\n  <div class=\"albums\" dojoattachpoint=\"albums\">\n  </div>\n  <div class=\"nav\" dojoattachevent=\"onclick:_next\">\n    <a class=\"prev\" dojoattachevent=\"onclick:_prev\"></a>\n    <a class=\"next\"></a>\n  </div>\n  <div class=\"search\">\n    <form action=\"#\" dojoattachevent=\"onsubmit:_search\">\n      <input type=\"text\" class=\"textInput\" dojoattachpoint=\"searchInput\">\n      <input type=\"submit\" class=\"submitInput\" value=\"Search Images\" />\n    </form>\n  </div>\n</div>\n",NUM_IMAGES_PER_VIEW:12,postCreate:function(){
var p={};
start.io.pPost("photobucket",p).addCallbacks(dojo.hitch(this,"_handleSuccess"),dojo.hitch(this,"_handleFailure"));
this.data=null;
this.page=0;
this.num_images=0;
this.connections=[];
this.maxPages=0;
},_handleSuccess:function(data){
this.data=data;
this.page=1;
this.num_images=data.length;
this.maxPages=Math.floor((this.num_images-1)/this.NUM_IMAGES_PER_VIEW);
this._setView();
},_clearConnections:function(){
for(var i=0;i<this.connections.length;i++){
this.connections[i].disconnect();
}
},_setView:function(){
this._clearConnections();
this.albums.innerHTML="";
var n,a;
var max=this.page*this.NUM_IMAGES_PER_VIEW;
for(var i=((this.page-1)*this.NUM_IMAGES_PER_VIEW);i<max;i++){
a=dojo.doc.createElement("a");
n=dojo.doc.createElement("img");
this.albums.appendChild(a);
a.appendChild(n);
n.setAttribute("src",this.data[i]["thumb"]);
a.setAttribute("target","_blank");
a.setAttribute("href",this.data[i]["url"]);
dojo.addClass(a,"imageLink");
}
},_prev:function(e){
dojo.stopEvent(e);
if(--this.page<1){
this.page=this.maxPages;
}
this._setView();
},_next:function(e){
dojo.stopEvent(e);
if(++this.page>this.maxPages){
this.page=1;
}
this._setView();
},_search:function(e){
dojo.stopEvent(e);
window.location.href="http://photobucket.com/images/"+escape(this.searchInput.value)+"/";
},_handleFailure:function(data){
console.log({"error data:":data});
}});
}
if(!dojo._hasResource["dojo.io.iframe"]){
dojo._hasResource["dojo.io.iframe"]=true;
dojo.provide("dojo.io.iframe");
dojo.io.iframe={create:function(_6e2,_6e3,uri){
if(window[_6e2]){
return window[_6e2];
}
if(window.frames[_6e2]){
return window.frames[_6e2];
}
var _6e5=null;
var turi=uri;
if(!turi){
if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){
console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");
}
turi=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));
}
var _6e7=dojo.isIE?"<iframe name=\""+_6e2+"\" src=\""+turi+"\" onload=\""+_6e3+"\">":"iframe";
_6e5=dojo.doc.createElement(_6e7);
with(_6e5){
name=_6e2;
setAttribute("name",_6e2);
id=_6e2;
}
dojo.body().appendChild(_6e5);
window[_6e2]=_6e5;
with(_6e5.style){
if(!(dojo.isSafari<3)){
position="absolute";
}
left=top="1px";
height=width="1px";
visibility="hidden";
}
if(!dojo.isIE){
this.setSrc(_6e5,turi,true);
_6e5.onload=new Function(_6e3);
}
return _6e5;
},setSrc:function(_6e8,src,_6ea){
try{
if(!_6ea){
if(dojo.isWebKit){
_6e8.location=src;
}else{
frames[_6e8.name].location=src;
}
}else{
var idoc;
if(dojo.isIE||dojo.isWebKit>521){
idoc=_6e8.contentWindow.document;
}else{
if(dojo.isSafari){
idoc=_6e8.document;
}else{
idoc=_6e8.contentWindow;
}
}
if(!idoc){
_6e8.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
console.log("dojo.io.iframe.setSrc: ",e);
}
},doc:function(_6ec){
var doc=_6ec.contentDocument||(((_6ec.name)&&(_6ec.document)&&(document.getElementsByTagName("iframe")[_6ec.name].contentWindow)&&(document.getElementsByTagName("iframe")[_6ec.name].contentWindow.document)))||((_6ec.name)&&(document.frames[_6ec.name])&&(document.frames[_6ec.name].document))||null;
return doc;
},send:function(args){
if(!this["_frame"]){
this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();");
}
var dfd=dojo._ioSetArgs(args,function(dfd){
dfd.canceled=true;
dfd.ioArgs._callNext();
},function(dfd){
var _6f2=null;
try{
var _6f3=dfd.ioArgs;
var dii=dojo.io.iframe;
var ifd=dii.doc(dii._frame);
var _6f6=_6f3.handleAs;
_6f2=ifd;
if(_6f6!="html"){
if(_6f6=="xml"){
if(dojo.isIE){
dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();
var _6f7=(dii._frame.contentWindow.document).documentElement.innerText;
_6f7=_6f7.replace(/>\s+</g,"><");
_6f7=dojo.trim(_6f7);
var _6f8={responseText:_6f7};
_6f2=dojo._contentHandlers["xml"](_6f8);
}
}else{
_6f2=ifd.getElementsByTagName("textarea")[0].value;
if(_6f6=="json"){
_6f2=dojo.fromJson(_6f2);
}else{
if(_6f6=="javascript"){
_6f2=dojo.eval(_6f2);
}
}
}
}
}
catch(e){
_6f2=e;
}
finally{
_6f3._callNext();
}
return _6f2;
},function(_6f9,dfd){
dfd.ioArgs._hasError=true;
dfd.ioArgs._callNext();
return _6f9;
});
dfd.ioArgs._callNext=function(){
if(!this["_calledNext"]){
this._calledNext=true;
dojo.io.iframe._currentDfd=null;
dojo.io.iframe._fireNextRequest();
}
};
this._dfdQueue.push(dfd);
this._fireNextRequest();
dojo._ioWatch(dfd,function(dfd){
return !dfd.ioArgs["_hasError"];
},function(dfd){
return (!!dfd.ioArgs["_finished"]);
},function(dfd){
if(dfd.ioArgs._finished){
dfd.callback(dfd);
}else{
dfd.errback(new Error("Invalid dojo.io.iframe request state"));
}
});
return dfd;
},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){
try{
if((this._currentDfd)||(this._dfdQueue.length==0)){
return;
}
var dfd=this._currentDfd=this._dfdQueue.shift();
var _6ff=dfd.ioArgs;
var args=_6ff.args;
_6ff._contentToClean=[];
var fn=dojo.byId(args["form"]);
var _702=args["content"]||{};
if(fn){
if(_702){
var _703=function(name,_705){
var tn;
if(dojo.isIE){
tn=dojo.doc.createElement("<input type='hidden' name='"+name+"'>");
}else{
tn=dojo.doc.createElement("input");
tn.type="hidden";
tn.name=name;
}
tn.value=_705;
fn.appendChild(tn);
_6ff._contentToClean.push(name);
};
for(var x in _702){
var val=_702[x];
if(dojo.isArray(val)&&val.length>1){
var i;
for(i=0;i<val.length;i++){
_703(x,val[i]);
}
}else{
if(!fn[x]){
_703(x,val);
}else{
fn[x].value=val;
}
}
}
}
var _70a=fn.getAttributeNode("action");
var _70b=fn.getAttributeNode("method");
var _70c=fn.getAttributeNode("target");
if(args["url"]){
_6ff._originalAction=_70a?_70a.value:null;
if(_70a){
_70a.value=args.url;
}else{
fn.setAttribute("action",args.url);
}
}
if(!_70b||!_70b.value){
if(_70b){
_70b.value=(args["method"])?args["method"]:"post";
}else{
fn.setAttribute("method",(args["method"])?args["method"]:"post");
}
}
_6ff._originalTarget=_70c?_70c.value:null;
if(_70c){
_70c.value=this._iframeName;
}else{
fn.setAttribute("target",this._iframeName);
}
fn.target=this._iframeName;
fn.submit();
}else{
var _70d=args.url+(args.url.indexOf("?")>-1?"&":"?")+_6ff.query;
this.setSrc(this._frame,_70d,true);
}
}
catch(e){
dfd.errback(e);
}
},_iframeOnload:function(){
var dfd=this._currentDfd;
if(!dfd){
this._fireNextRequest();
return;
}
var _70f=dfd.ioArgs;
var args=_70f.args;
var _711=dojo.byId(args.form);
if(_711){
var _712=_70f._contentToClean;
for(var i=0;i<_712.length;i++){
var key=_712[i];
for(var j=0;j<_711.childNodes.length;j++){
var _716=_711.childNodes[j];
if(_716.name==key){
dojo.destroy(_716);
break;
}
}
}
if(_70f["_originalAction"]){
_711.setAttribute("action",_70f._originalAction);
}
if(_70f["_originalTarget"]){
_711.setAttribute("target",_70f._originalTarget);
_711.target=_70f._originalTarget;
}
}
_70f._finished=true;
}};
}
if(!dojo._hasResource["start.widgets.ItemPreview"]){
dojo._hasResource["start.widgets.ItemPreview"]=true;
dojo.provide("start.widgets.ItemPreview");
dojo.declare("start.widgets.PreviewPopup",[start.Base,dijit._Templated],{templateString:"<div dojoattachevent=\"onmouseout:_mouseOut,onmouseover:_mouseIn\">\n <div id=\"itemPreviewCon\">\n  <div id=\"pointarrow\"> </div>\n\n  <div id=\"itemPreview\" class=\"itemPreview\">\n\n    <div class=\"topBorder\">\n      <div class=\"tlCorner\"> </div>\n      <div class=\"topMiddle\"> </div>\n    </div>\n\n\n    <div id=\"popupDesc\"></div>\n    <div class=\"popupContent\" style=\"float:left\">\n      <div id=\"popupSpin\"> <div class=\"spinImage\"></div></div>\n      <div id=\"popupCon\">\n        <iframe dojoattachpoint=\"popupFrame\" width=\"356\" id=\"popupFrame\" src=\"\" FRAMEBORDER = \"0\" marginwidth=0 marginheight=0 scrolling=no onload=\"resizeFrame()\"></iframe>\n      </div>\n    </div>\n\n    <div class=\"bottomBorder\">\n      <div class=\"blCorner\"> </div>\n      <div class=\"bottomMiddle\"> </div>\n      <div class=\"brCorner\"></div>\n    </div>\n\n    <div class=\"righttop\"></div>\n    <div class=\"lefttop\"></div>\n    <div class=\"trCorner\"></div>\n  </div>\n </div>\n</div>\n",postCreate:function(){
dojo.subscribe(start.topics.PREVIEW_POPUP_LOADED,this._onLoad);
},_mouseOut:function(e){
dojo.publish(start.topics.PREVIEW_POPUP_MOUSE,[{evt:"out"}]);
},_mouseIn:function(e){
dojo.publish(start.topics.PREVIEW_POPUP_MOUSE,[{evt:"in"}]);
},_onLoad:function(arg){
pfNode=dojo.byId("popupFrame");
pNode=dojo.byId("itemPreviewCon");
cDetail=pfNode.contentWindow.getPreviewDetail();
frameHeight=cDetail.sHeight;
if(arg.count==2){
cHeight=dojo.style(pfNode,"height");
if(cHeight>frameHeight){
return;
}
}else{
psNode=dojo.byId("popupSpin");
pdNode=dojo.byId("popupDesc");
if(cDetail.error==1){
pdNode.innerHTML=cDetail.desc;
dojo.addClass(pNode,"errorPreview");
}else{
dojo.style(pfNode,"visibility","visible");
itemDesc=pdNode.innerHTML;
if(pdNode.getAttribute("override")==1){
itemDesc+="&nbsp;"+cDetail.desc;
}
if(itemDesc){
pdNode.innerHTML=(itemDesc.length>100)?itemDesc.substring(0,100)+"...":itemDesc;
}
}
dojo.style(psNode,"display","none");
}
dojo.style(pfNode,"height",frameHeight+"px");
if(!window.innerWidth){
if(!(document.documentElement.clientWidth==0)){
winH=document.documentElement.clientHeight;
}else{
winH=document.body.clientHeight;
}
}else{
winH=window.innerHeight;
}
sTop=document.documentElement.scrollTop;
totH=sTop+winH;
ipNode=dojo.byId("itemPreview");
oTop=parseInt(ipNode.offsetTop);
Height=parseInt(ipNode.offsetHeight);
divH=oTop+Height;
wentHidden=divH-totH;
if(wentHidden>0){
oldT=dojo.style(ipNode,"top");
newT=oldT-wentHidden;
newT=(newT<sTop)?sTop:newT;
dojo.style(ipNode,"top",newT+"px");
}
if(arg.count==1){
setTimeout("dojo.publish(start.topics.PREVIEW_POPUP_LOADED, [{count: 2}])",1000);
}
}});
dojo.declare("start.widgets.ItemPreview",null,{createPreview:function(_71a){
this.item=_71a.item;
this.widgetid=_71a.widgetid;
this.x=_71a.x;
this.y=_71a.y;
this._createPreviewBalloon();
this._setPreviewCoords();
dojo.style(dojo.byId("popupSpin"),"display","block");
prNode=dojo.byId("itemPreview");
prNode.setAttribute("widgetid",this.widgetid);
dojo.style(prNode,"left",this.x+"px");
dojo.style(prNode,"top",this.y+"px");
prNode=dojo.byId("pointarrow");
if(this.positioned=="left"){
dojo.removeClass(prNode,"arrowright");
dojo.addClass(prNode,"arrowleft");
}else{
dojo.removeClass(prNode,"arrowleft");
dojo.addClass(prNode,"arrowright");
}
dojo.style(prNode,"left",this.arrowX+"px");
dojo.style(prNode,"top",this.arrowY+"px");
prNode=dojo.byId("popupDesc");
prNode.innerHTML=_71a.desc;
prNode.setAttribute("override",(_71a.descOverride==0)?0:1);
prNode=dojo.byId("popupFrame");
if(_71a.url){
prNode.src=_71a.url;
}else{
this._getParams();
prNode.src="/b/preview?"+this.getString;
}
},_mouseEvtPreview:function(arg){
if(arg.evt=="in"){
this.closePreview=0;
clearTimeout(this.closeTimer);
}else{
if(arg.evt=="out"){
n=dojo.byId("itemPreviewCon");
sNode=dojo.byId("popupSpin");
this.closeTimer=setTimeout("dojo.style(n, \"display\",\"none\");dojo.removeClass(n, \"errorPreview\");dojo.style(sNode, \"display\", \"block\");",200);
this.closePreview=1;
}
}
},_getParams:function(){
widgetData=start.start.objMgr.getObjData(this.widgetid);
this.getString="";
for(var key in widgetData){
if(key=="sites"){
this.getString+="siteid="+encodeURIComponent(widgetData.sites.join(","))+"&";
}else{
this.getString+=key+"="+widgetData[key]+"&";
}
}
this.getString+="oid="+encodeURIComponent(this.widgetid)+"&";
this.getString+="summary=1";
},_createPreviewBalloon:function(){
n=dojo.byId("itemPreviewCon");
if(!n){
n=dojo.doc.createElement("div");
document.body.appendChild(n);
w=new start.widgets.PreviewPopup({},n);
dojo.subscribe(start.topics.PREVIEW_POPUP_MOUSE,this._mouseEvtPreview);
}
prNode=dojo.byId("popupFrame");
dojo.style(prNode,"height","0px");
dojo.style(n,"display","block");
},_setPreviewCoords:function(){
this.arrowX=this.x+1;
this.arrowY=this.y-62;
if(!window.innerWidth){
if(!(document.documentElement.clientWidth==0)){
winW=document.documentElement.clientWidth;
}else{
winW=document.body.clientWidth;
}
}else{
winW=window.innerWidth;
}
Xpos=this.x+55;
Ypos=this.y-125;
rightedge=Xpos+382;
leftedge=this.x-438;
this.x=Xpos;
this.positioned="right";
if(rightedge>winW){
this.arrowX-=59;
this.x=leftedge;
this.positioned="left";
}
this.y=Ypos;
},_ietruebody:function(){
return (document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
},_resizeFrame:function(){
var _71d=document.getElementById("ourFrame").document.body.scrollHeight;
document.getElementById("ourFrame").style.height=_71d+10+"px";
}});
}
if(!dojo._hasResource["start.include"]){
dojo._hasResource["start.include"]=true;
dojo.provide("start.include");
start.translate.require("index");
dojo.requireIf(dojo.isIE&&dojo.isIE<7,"start.ViewIE6");
}
if(!dojo._hasResource["start.start"]){
dojo._hasResource["start.start"]=true;
dojo.provide("start.start");
start.start={init:function(){
var as=start.start;
if(console&&!console.dir){
console.dir=function(){
};
}
if(console&&!console.debug){
console.debug=function(){
};
}
as.LOAD_WAIT=10000;
var _71f=parseInt(dojo.body().getAttribute("loggedin"));
as.cookie_version=parseInt(dojo.body().getAttribute("cookie_version"));
as.themeid=parseInt(dojo.body().getAttribute("theme_id"));
as.partner=dojo.body().getAttribute("partner");
as.loggedin=!isNaN(_71f)&&_71f!=0;
if(as.loggedin){
as.playlistid=parseInt(dojo.body().getAttribute("objid"));
}
as.objMgr=new start.ObjMgr();
if(pageConf.path!="preview"){
as.getData();
}
as.conduit=new start.ServerConduit();
as.grid=new start.Pagegrid();
as.itemPreview=new start.widgets.ItemPreview();
as.widgets=dojo.query(".sp_widget").map(function(node){
var w=new start.Widget({},node);
w.startup();
return w;
});
var _722=dojo.query(".gridItem");
dojo.query(".gridItem").forEach(as.grid.addNode,as.grid);
as.grid.update();
dojo.publish(start.topics.START_LOAD_COMPLETE,[{start:as}]);
dojo.subscribe(start.topics.THEME_CHANGE,as.handleChangeTheme);
dojo.subscribe(start.topics.START_ANIMATE_BEG,as.handleAnimBeg);
dojo.subscribe(start.topics.START_ANIMATE_END,as.handleAnimEnd);
dojo.publish(start.topics.GRID_UPDATEORDER);
as.refresh_columns();
dojo.query(".autofocus:last-of-type").forEach(function(n){
n.focus();
});
var loc=location.hash.split("#")[1];
console.log("end");
},handleAnimBeg:function(type){
dojo.addClass(dojo.byId("footer"),"hidden");
},handleAnimEnd:function(type){
if(type!=="hide"){
dojo.removeClass(dojo.byId("footer"),"hidden");
}
},get_next_column:function(){
var l_=dojo.query(".sp_widget",dojo.byId("columnl")).length;
var m_=dojo.query(".sp_widget",dojo.byId("columnm")).length;
var r_=dojo.query(".sp_widget",dojo.byId("columnr")).length;
if(l_<=m_&&l_<=r_){
return dojo.byId("columnl");
}else{
if(m_<=r_){
return dojo.byId("columnm");
}else{
return dojo.byId("columnr");
}
}
},refresh_columns:function(){
if(dojo.isIE){
dojo.style("columns","paddingBottom","1px");
dojo.style("columns","paddingBottom","");
}
return;
},all_loaded:false,handleChangeTheme:function(data){
var skin=dojo.query("link[skin=\"true\"]")[0];
if(dojo.isIE<7){
var _72c=dojo.query("link[skin=\"false\"]")[0];
}
var l=dojo.doc.createElement("link");
l.setAttribute("rel","stylesheet");
l.setAttribute("type","text/css");
l.setAttribute("media","screen, projection");
l.setAttribute("skin","true");
l.setAttribute("href","/c/themes/r22009/"+data.path+"/skin.glom.min.css");
skin.parentNode.appendChild(l);
if(dojo.isIE<7){
skin.parentNode.removeChild(_72c);
skin.parentNode.appendChild(_72c);
}
var l=dojo.doc.createElement("link");
if(dojo.isIE){
dojo.addClass(dojo.body(),"ie7_doesnt_redraw_everything");
dojo.removeClass(dojo.body(),"ie7_doesnt_redraw_everything");
}
},getData:function(){
if(dojo.cookie("swiz")!="1"){
start.io.get("contentpack?format=json",{},{sync:true}).addCallbacks(function(data){
start.start.contentdata=data;
start.start.createWizard();
},function(){
alert("The server is currently having problems. Please try later.");
});
}
},createWizard:function(){
var n=dojo.doc.createElement("div");
dojo.place(n,dojo.byId("page_con"),"first");
var w=new start.widgets.Wizard({data:start.start.contentdata["hdf"][0]},n);
w.startup();
},buildPath:function(path){
return "/"+start.start.partner+"/"+path;
},setFeedGroupData:function(data){
this.feedgroupdata=data;
},setLinksData:function(data){
this.linksmoduledata=data;
},setNewsData:function(data){
this.newsdata=data;
},setVideoData:function(data){
this.videodata=data;
},setSearchOrigin:function(_736){
this.searchorigin=_736;
}};
dojo.addOnLoad(dojo.hitch(start.start,"init"));
}
