function roxer(){
this.version="0.02";
this.js_libs=new Array();
this.domain=document.domain.split(".")[document.domain.split(".").length-2]+"."+document.domain.split(".")[document.domain.split(".").length-1];
this.services_path="http://"+document.domain+"/my/services";
this.fresh_id=1;
this.props={height:"style",width:"style",position:"style",style:"style",margin:"style"};
this.objClasses={window:{className:"windowBackground"},winElement:{position:"relative",className:"winElement"},drag:""};
this.cfg={files:roxConfig.files,files2:"http://files2."+this.domain,css:{base:"/css/base.css?"+roxConfig.build,ff_base:"/css/ff_base.css?"+roxConfig.build},glass_cfg:{tlc:"topLeftCorner",te:"topEdge",trc:"topRightCorner",le:"leftEdge",cs:"contentSection",re:"rightEdge",blc:"bottomLeftCorner",be:"bottomEdge",brc:"bottomRightCorner"},frost_cfg:{tlc:"frost_topLeftCorner",te:"frost_topEdge",trc:"frost_topRightCorner",le:"frost_leftEdge",cs:"frost_contentSection",re:"frost_rightEdge",blc:"frost_bottomLeftCorner",be:"frost_bottomEdge",brc:"frost_bottomRightCorner"},style_map:{}};
this.owner=this.buildOwner(var_store("owner"));
this.n=navigator.userAgent.toLowerCase();
this.db=(document.compatMode&&document.compatMode.toLowerCase()!="backcompat")?document.documentElement:(document.body||null);
this.op=!!(window.opera&&document.getElementById);
this.op6=!!(this.op&&!(this.db&&this.db.innerHTML));
if(this.op&&!this.op6){
document.onmousedown=new Function("e","if (((e = e || window.event).target || e.srcElement).tagName == \"IMAGE\") return false;");
}
this.ie=!!(this.n.indexOf("msie")>=0&&document.all&&this.db&&!this.op);
this.ie7=(this.ie&&window.XMLHttpRequest);
this.ie6=(this.ie&&!window.XMLHttpRequest);
this.iemac=!!(this.ie&&this.n.indexOf("mac")>=0);
this.ie4=!!(this.ie&&!document.getElementById);
this.n4=!!(document.layers&&typeof document.classes!="undefined");
this.n6=!!(typeof window.getComputedStyle!="undefined"&&typeof document.createRange!="undefined");
this.w3c=!!(!this.op&&!this.ie&&!this.n6&&document.getElementById);
if(!window.daysToKeep){
this.daysToKeep=14;
}
this.today=new Date();
this.expiryDate=new Date(this.today.getTime()+(this.daysToKeep*86400000));
this.noEscape=false;
this.makeStatusIndicator();
return;
}
roxer.prototype.makeBoxes=function(){
rox._rawNodes=rox.makeBoxes.arguments;
};
roxer.prototype.cookiequery={clear:function(){
dojo.cookie("cookiequery",null,{expires:-1,path:"/"});
},set:function(_1){
if(!_1){
return;
}
var _2=[];
for(var _3 in _1){
_2.push(_3+"="+_1[_3]);
}
var _4=_2.join("&");
dojo.cookie("cookiequery",_4,{path:"/"});
}};
roxer.prototype.query={getParam:function(_5){
var _6=parent.window.location.search.substring(1);
var _7=_6.split("&");
for(var i=0;i<_7.length;i++){
var _9=_7[i].split("=");
if(_9[0]==_5){
return _9[1];
}
}
}};
roxer.prototype.containersLoaded=function(){
rox._containers_loaded=1;
if(rox._loadedBoxCount==rox.registeredBoxCount){
ws_dispatch("after_body");
}
};
roxer.prototype.loadBox=function(id){
if(rox._loadedBoxCount){
rox._loadedBoxCount++;
}else{
rox._loadedBoxCount=1;
}
if((rox._loadedBoxCount==rox.registeredBoxCount)&&(rox._containers_loaded)){
ws_dispatch("after_body");
}
};
roxer.prototype.jslib={_libs:{},_loaded:{},load:function(_b){
if(this._libs[_b]){
for(var i=0;i<this._libs[_b].length;i++){
var _d=this._libs[_b][i];
_d();
this._loaded[_b]=1;
}
this._libs[_b]=[];
}
},onload:function(_e,_f){
if(!this._libs[_e]){
this._libs[_e]=[];
}
this._libs[_e].push(_f);
},loaded:function(lib){
return this._loaded[lib];
}};
roxer.prototype.makeStatusIndicator=function(){
var _11={toggle:function(s){
if(!rox._statusindicatornode){
rox._statusindicatornode=dojo.byId("rxr_status_indicator");
rox._statusindicatornode.innerHTML="<span>Loading...</span>";
}
if(s){
rox._statusindicatornode.style.visibility="visible";
document.body.style.cursor="wait";
}else{
setTimeout("rox._statusindicatornode.style.visibility='hidden';document.body.style.cursor='auto';",500);
}
}};
this.statusIndicator=_11;
};
roxer.prototype.service=function(arg){
var s=arg.service;
var c=arg.callback;
var cfg=arg.cfg;
if(!arg.supress_status_indicator){
this.statusIndicator.toggle(1);
}
var _17=new Array();
if(arg.send_creds){
if(services.response.visitor){
cfg.E=services.response.visitor.cred.E;
cfg.D=services.response.visitor.cred.D;
cfg.TS=services.response.visitor.cred.TS;
}
}
for(var i in cfg){
_17.push(i+"="+escape(cfg[i]));
}
if(services.response.token){
_17.push("token="+services.response.token);
}
var q="";
if(_17){
q="&"+_17.join("&");
}
var _1a="http://"+document.domain+"/my/services";
var _1b="service="+s+q;
_1b=_1b.replace(/\+/g,"%2B");
var _1c={url:_1a,mimetype:"text/plain",handleAs:"text",postData:_1b,load:function(_1d,_1e){
var res;
if(_1d){
try{
eval("res="+_1d);
}
catch(e){
this.statusIndicator.toggle(0);
res={error:"There was a problem connecting to Roxer.  Please try again later."};
}
}
if(!arg.supress_status_indicator){
rox.statusIndicator.toggle(0);
}
c&&c(res);
}};
var r=dojo.rawXhrPost(_1c);
};
roxer.prototype.buildOwner=function(o){
o.pages={get:function(_22,cfg){
if(!cfg){
cfg={};
}
cfg.u=o.username;
cfg.action="show";
rox.service({service:"pages",cfg:cfg,callback:_22});
}};
o.files={get:function(_24,cfg){
if(!cfg){
cfg={};
}
cfg.u=o.username;
cfg.action="show";
rox.service({service:"files",cfg:cfg,callback:_24});
}};
o.boxes={get:function(_26,cfg){
if(!cfg){
cfg={};
}
cfg.u=o.username;
rox.service({service:"boxes",cfg:cfg,callback:_26});
}};
o.new_page_number={get:function(_28,cfg){
if(!cfg){
cfg={};
}
cfg.u=var_store("username");
rox.service({service:"new_page_number",cfg:cfg,callback:_28});
}};
o.settings={get:function(_2a,cfg){
if(!cfg){
cfg={};
}
cfg.u=o.username;
cfg.action="get";
rox.service({service:"settings",cfg:cfg,callback:_2a});
}};
o.comments={delete_comment:function(_2c,cfg){
if(!cfg){
cfg={};
}
cfg.action="delete_comment";
rox.service({service:"comments",cfg:cfg,callback:_2c});
},get:function(_2e,cfg){
if(!cfg){
cfg={};
}
cfg.action="get";
rox.service({service:"comments",cfg:cfg,callback:_2e});
},post:function(_30,cfg){
if(!cfg){
cfg={};
}
cfg.action="post";
rox.service({service:"comments",cfg:cfg,callback:_30});
}};
o.quota={get:function(cfg){
if(!cfg){
cfg={};
}
if(!services.response.owner.quota){
rox.service({service:"quota",supress_status_indicator:1,cfg:{action:"get"},callback:cfg.callback});
}
}};
return o;
};
roxer.prototype.loadCSS=function(css){
var _34=document.getElementById("css_base");
_34.href=(this.ie)?this.cfg.files+this.cfg.css.base:this.cfg.files+this.cfg.css.ff_base;
};
roxer.prototype.addDiv=function(_35,add){
var d=document.createElement("DIV");
var s=d.style;
s.position="absolute"||_35.position;
s.visibility="hidden";
if(_35&&_35.objClass){
var oc=rox.objClasses[_35.objClass];
for(var x in oc){
(x=="className"&&_35.className)?_35[x]=(_35.className+" "+oc[x]):_35[x]=oc[x];
}
}
for(var att in _35){
var p=_35[att];
if(rox.props[att]){
var pa=rox.props[att];
if(att=="style"){
for(var x in _35[att]){
d.style[x]=_35[att][x];
}
}else{
if(pa=="style"){
d.style[att]=_35[att];
}
}
}else{
d[att]=_35[att];
}
}
if(!d.id){
d.id=rox.newID();
}
add&&document.body.appendChild(d);
return d;
};
roxer.prototype.newWindow=function(str){
var w=window.open();
w.document.body.innerHTML="<xmp>"+str+"</xmp>";
};
roxer.prototype.serialize=function(o){
var _41=typeof (o);
if(_41=="undefined"){
return "undefined";
}else{
if((_41=="number")||(_41=="boolean")){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
if(_41=="string"){
return dojo._escapeString(o);
}
var me=arguments.callee;
var _43;
if(_41!="function"&&typeof (o.length)=="number"){
var res=[];
for(var i=0;i<o.length;i++){
var val=me(o[i]);
if(typeof (val)!="string"){
val="undefined";
}
res.push(val);
}
return "["+res.join(",")+"]";
}
if(_41=="function"){
return o.toString();
}
res=[];
for(var k in o){
var _48;
if(typeof (k)=="number"){
_48="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_48=k;
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_48+":"+val);
}
return "{"+res.join(",")+"}";
};
roxer.prototype.cloneObject=function(_49){
if(_49.length){
var _4a=[];
for(var i=0;i<_49.length;i++){
(typeof _49[i]=="object")?_4a[i]=new rox.cloneObject(_49[i]):_4a[i]=_49[i];
}
return _4a;
}else{
var _4a={};
for(var i in _49){
(typeof _49[i]=="object")?_4a[i]=new rox.cloneObject(_49[i]):_4a[i]=_49[i];
}
return _4a;
}
};
function hideElement(){
this.style.visibility="hidden";
}
function showElement(){
this.style.visibility="visible";
}
function writeElement(t){
this.innerHTML=t;
}
function bindElement(cfg){
var url=(typeof cfg=="object")?cfg.url:cfg;
this.c_src=url;
}
function fadeElement(s){
var t;
var f;
if(s){
t=0.5;
f=0;
}else{
t=0;
f=0.5;
}
new Effect.Opacity(this,{duration:0.01,transition:Effect.Transitions.linear,from:f,to:t});
}
try{
HTMLElement.prototype.hide=hideElement;
HTMLElement.prototype.show=showElement;
HTMLElement.prototype.write=writeElement;
HTMLElement.prototype.fade=fadeElement;
HTMLElement.prototype.bind=bindElement;
}
catch(e){
var newProps=new Object();
newProps.hide=hideElement;
newProps.show=showElement;
newProps.write=writeElement;
newProps.bind=bindElement;
orgCreate=document.createElement;
document.createElement=function(x){
var _53=orgCreate(x);
for(p in newProps){
_53[p]=newProps[p];
}
return _53;
};
}
roxer.prototype.useJS=function(lib){
if(!this.usingLib(lib)){
var _55=document.createElement("SCRIPT");
_55.src=lib;
document.getElementsByTagName("head")[0].appendChild(_55);
}
!this.usingLib(lib)&&alert("didnt load lib:"+lib);
};
roxer.prototype.roundedCorners=function(cfg){
var t=document.createElement("TABLE");
cfg.nub=null;
t.cellSpacing=0;
var _58=t.insertRow(-1);
var _59;
if(cfg.nub){
_59=t.insertRow(-1);
var _5a=_59.insertCell(-1);
var _5b=_59.insertCell(-1);
_5b.innerHTML="l";
_5b.style.backgroundColor="red";
_5b.style.width="100px";
var nub=_59.insertCell(-1);
nub.innerHTML="n";
nub.style.backgroundColor="#EEEEEE";
nub.style.width="50px";
var _5d=_59.insertCell(-1);
_5d.style.width="100px";
var _5e=_59.insertCell(-1);
_5e.innerHTML="r";
}
var tr=t.insertRow(-1);
var mr=t.insertRow(-1);
var br=t.insertRow(-1);
tr.insertCell(-1).className=cfg.tlc;
var _62=tr.insertCell(-1);
_62.className=cfg.te;
if(cfg.nub){
var _63=tr.insertCell(-1);
var _64=tr.insertCell(-1);
_64.className=cfg.te;
_63.innerHTML="nb";
}
tr.insertCell(-1).className=cfg.trc;
mr.insertCell(-1).className=cfg.le;
var c=mr.insertCell(-1);
if(cfg.nub){
c.setAttribute("colspan",3);
}
c.className=cfg.cs;
c.innerHTML="&nbsp;";
this.content=c;
mr.insertCell(-1).className=cfg.re;
br.insertCell(-1).className=cfg.blc;
var _66=br.insertCell(-1);
_66.className=cfg.be;
if(cfg.nub){
_66.setAttribute("colspan",3);
}
br.insertCell(-1).className=cfg.brc;
this.setHeight=function(h){
c.setAttribute("height",h-31);
};
this.setWidth=function(w){
t.setAttribute("width",w);
};
this.table=t;
this.node=c;
return this;
};
roxer.prototype.usingLib=function(lib){
for(var i=0;i<this.js_libs.length;i++){
if(this.js_libs[i]==lib){
return 1;
}
}
};
roxer.prototype.newID=function(){
var _6b=rox.fresh_id;
rox.fresh_id++;
return "wc_"+_6b;
};
roxer.prototype.registerLib=function(lib){
this.js_libs.push(lib);
};
roxer.prototype.strings=function(){
this.url=function(str){
var ret=new Object();
var _6f={"err0":"No url specified. The URL must be fully qualified (i.e. http://example/).","err1":"The URL must be fully qualified\n(http://example/)"};
var _70=/^(https?)(:\/\/)([a-zA-Z0-9\-\.]{2,256})(:([0-9]{0,5}))?([^?#]+)?(\?([^#]+))?/i;
if(!str){
ret.error=_6f["err0"];
}else{
url=str.toString();
if(url.match(_70)){
ret.scheme=RegExp.$1;
ret.host=RegExp.$3;
ret.port=RegExp.$5||"80";
ret.path=RegExp.$6;
ret.query=RegExp.$8;
}else{
ret.error=_6f["err1"];
}
}
return ret;
};
};
roxer.prototype.dump=function(obj){
var res="";
for(i in obj){
res+=i+"="+obj[i]+"\n";
}
return res;
};
function roxClearBorder(){
var _73=services.response.owner.boxes;
for(var i in _73){
var b=dojo.byId(i);
if(i&&!_73[i].js){
b.style.border="";
}
}
}
roxer.prototype.safeString=function(_76){
if(_76){
_76=_76.replace(/[^a-zA-Z0-9]/gi,"_");
_76=_76.replace(/_+/gi,"_");
_76=_76.replace(/_$/gi,"");
_76=_76.toLowerCase();
}
return _76;
};
roxer.prototype.loadError=function(box){
};
roxer.prototype.applyEDB=function(cfg){
var _79=cfg.override_config;
var _7a=_79.node;
var edb=cfg.edb;
var db=cfg.db;
var _7d={};
if(_79.cancel){
for(var b=0;b<_79.cancel.length;b++){
_7d[_79.cancel[b]]=1;
}
}
if(edb&&(edb.border>0)&&(!_7d["border"])){
_7a.style.border=edb.border+"px "+edb.style+" "+edb.border_color;
_7a.rox_border=edb.border;
}else{
_7a.style.border="";
}
if(edb&&edb.background&&!_7d["background"]){
_7a.style.background=edb.background;
}else{
if(db&&!db.background){
_7a.style.background="";
}
}
if(edb&&edb.opacity&&!_7d["opacity"]){
if(rox.ie){
_7a.style.filter="alpha(opacity="+edb.opacity+")";
}else{
if(document.getElementById){
_7a.style.MozOpacity=(edb.opacity/100);
}
}
}
};
function roxBox(cfg){
var _80=document.getElementById(cfg[4]);
box=this;
box.node=_80;
box.base=base_cfgs[cfg[0]];
_80.className="";
if(_80){
if(_80.orig_html){
_80.innerHTML=_80.orig_html;
}else{
_80.orig_html=_80.innerHTML;
}
}
_80.style.border="";
this.overrideStyle=function(_81){
rox.applyEDB({override_config:_81,edb:cfg[1].edb,db:box.db});
box.override_style=1;
};
for(x in cfg[1]){
this[x]=cfg[1][x];
}
if(box.base&&box.base.onpageload&&box.base.onpageload.suppress_js&&(!rox._page_loaded_once)){
}else{
if(typeof cfg[0]=="function"){
this.pub=cfg[0](this,cfg[2],cfg[3]);
}else{
if((cfg[0])&&typeof cfg[0]=="string"){
this.pub=box_functions[cfg[0]](this,cfg[2],cfg[3]);
}
}
}
if(!box.override_style){
rox.applyEDB({override_config:{node:_80},edb:cfg[1].edb,db:box.db});
}
if(box.override_style){
if(!this.pub){
this.pub={};
}
this.pub._override_style=box.override_style;
}
return this.pub;
}
function roxMakeDb(_82){
function makeObj(o,c){
if(o.rxrtype){
eval("c ="+unescape(o.func));
return c;
}
(typeof o=="object")?c=roxMakeDb(o):c=unescape(o);
return c;
}
if(_82.length){
var _85=[];
for(var i=0;i<_82.length;i++){
_85.push(makeObj(_82[i],_85));
}
return _85;
}else{
var _85={};
for(var i in _82){
_85[i]=makeObj(_82[i],_85);
}
return _85;
}
}
function roxPrep(){
var b=services.response.owner.boxes;
for(var i in b){
var r=b[i];
boxes_cfg[i]={};
bc=boxes_cfg[i];
var db=(r.db)?r.db:"";
var edb=(r.edb)?r.edb:"";
if(db){
bc.db=roxMakeDb(r.db);
bc.server_db=db;
}
if(edb){
bc.edb=roxMakeDb(r.edb);
bc.server_edb=edb;
}
for(var c in r){
if(c=="db"){
continue;
}
if(c=="edb"){
continue;
}
(typeof r[c]=="string")?bc[c]=unescape(r[c]):bc[c]=r[c];
}
}
}

