rox.default_toolbar=[{name:"lock",text:"Lock Page",states:{locked:{image:rox.cfg.files+"/images/icons/locked.png",sprite:"roxerEditorIconLock"},locked_p:{image:rox.cfg.files+"/images/icons/locked_p.png",sprite:"roxerEditorIconLockPressed"},unlocked:{image:rox.cfg.files+"/images/icons/unlocked.png",sprite:"roxerEditorIconUnLock"},unlocked_p:{image:rox.cfg.files+"/images/icons/unlocked_p.png",sprite:"roxerEditorIconUnLockPressed"}},onclick:function(){
toggleMode();
}},{name:"addtext",text:"Add Text",states:{on:{image:rox.cfg.files+"/images/icons/add_text.png",sprite:"roxerEditorIconText"},off:{image:rox.cfg.files+"/images/icons/add_text_d.png",sprite:"roxerEditorIconTextDisabled"},down:{image:rox.cfg.files+"/images/icons/add_text_p.png",sprite:"roxerEditorIconTextPressed"}},onclick:function(){
mw.fetchBox({bid:rox.cfg.editor.text_box_id});
}},{name:"addimage",text:"Add Image",states:{on:{image:rox.cfg.files+"/images/icons/add_image.png",sprite:"roxerEditorIconAddImage"},off:{image:rox.cfg.files+"/images/icons/add_image_d.png",sprite:"roxerEditorIconAddImageDisabled"},down:{image:rox.cfg.files+"/images/icons/add_image_p.png",sprite:"roxerEditorIconAddImagePressed"}},onclick:function(){
mw.toggleImageBrowser();
}},{name:"add",text:"Add Content",states:{on:{image:rox.cfg.files+"/images/icons/add.png",sprite:"roxerEditorIconAdd"},off:{image:rox.cfg.files+"/images/icons/add_d.png",sprite:"roxerEditorIconAddDisabled"},down:{image:rox.cfg.files+"/images/icons/add_p.png",sprite:"roxerEditorIconAddPressed"}},onclick:function(){
mw.toggleAdd();
}},{name:"del",text:"Delete",states:{on:{image:rox.cfg.files+"/images/icons/delete.png",sprite:"roxerEditorIconDelete"},off:{image:rox.cfg.files+"/images/icons/delete_d.png",sprite:"roxerEditorIconDeleteDisabled"},down:{image:rox.cfg.files+"/images/icons/delete_p.png",sprite:"roxerEditorIconDeletePressed"}},onclick:function(){
deleteSelected();
}},{name:"link",text:"Link",states:{on:{image:rox.cfg.files+"/images/icons/link2.png",sprite:"roxerEditorIconLink"},off:{image:rox.cfg.files+"/images/icons/link_d.png",sprite:"roxerEditorIconLinkDisabled"},down:{image:rox.cfg.files+"/images/icons/link_p.png",sprite:"roxerEditorIconLinkPressed"}},onclick:function(){
mw.toggleLinkWizard();
}},{name:"background",text:"Background",states:{on:{image:rox.cfg.files+"/images/icons/theme.png",sprite:"roxerEditorIconBackground"},off:{image:rox.cfg.files+"/images/icons/theme_d.png",sprite:"roxerEditorIconBackgroundDisabled"},down:{image:rox.cfg.files+"/images/icons/theme_p.png",sprite:"roxerEditorIconBackgroundPressed"}},onclick:function(){
mw.toggleBackgroundSelector();
}},{name:"undo",text:"Undo",states:{on:{image:rox.cfg.files+"/images/icons/undo.png",sprite:"roxerEditorIconUndo"},off:{image:rox.cfg.files+"/images/icons/undo_d.png",sprite:"roxerEditorIconUndoDisabled"},down:{image:rox.cfg.files+"/images/icons/undo_p.png",sprite:"roxerEditorIconUndoPressed"}},onclick:function(){
mw.undo();
}},{name:"copy",text:"Copy",states:{on:{image:rox.cfg.files+"/images/icons/copy.png",sprite:"roxerEditorIconCopy"},off:{image:rox.cfg.files+"/images/icons/copy_d.png",sprite:"roxerEditorIconCopyDisabled"},down:{image:rox.cfg.files+"/images/icons/copy_p.png",sprite:"roxerEditorIconCopyPressed"}},onclick:function(){
mw.clipboard=mw.copy();
}},{name:"paste",text:"Paste",states:{on:{image:rox.cfg.files+"/images/icons/paste.png",sprite:"roxerEditorIconPaste"},off:{image:rox.cfg.files+"/images/icons/paste_d.png",sprite:"roxerEditorIconPasteDisabled"},down:{image:rox.cfg.files+"/images/icons/paste_p.png",sprite:"roxerEditorIconPastePressed"}},onclick:function(){
mw.paste();
}},{name:"up",text:"Move Forward",states:{on:{image:rox.cfg.files+"/images/icons/up.png",sprite:"roxerEditorIconMoveForward"},off:{image:rox.cfg.files+"/images/icons/up_d.png",sprite:"roxerEditorIconMoveForwardDisabled"},down:{image:rox.cfg.files+"/images/icons/up_p.png",sprite:"roxerEditorIconMoveForwardPressed"}},onclick:function(){
moveItem("up");
}},{name:"down",text:"Move Back",states:{on:{image:rox.cfg.files+"/images/icons/down.png",sprite:"roxerEditorIconMoveBack"},off:{image:rox.cfg.files+"/images/icons/down_d.png",sprite:"roxerEditorIconMoveBackDisabled"},down:{image:rox.cfg.files+"/images/icons/down_p.png",sprite:"roxerEditorIconMoveBackPressed"}},onclick:function(){
moveItem("down");
}},{name:"wizard",text:"Wizard",states:{on:{image:rox.cfg.files+"/images/icons/wizard.png",sprite:"roxerEditorIconWizard"},off:{image:rox.cfg.files+"/images/icons/wizard_d.png",sprite:"roxerEditorIconWizardDisabled"},down:{image:rox.cfg.files+"/images/icons/wizard_p.png",sprite:"roxerEditorIconWizardPressed"}},onclick:function(){
mw.toggleWizard();
}},{name:"share",text:"Share this page",states:{on:{image:rox.cfg.files+"/images/icons/bullhorn.png",sprite:"roxerEditorIconShare"},off:{image:rox.cfg.files+"/images/icons/bullhorn_d.png",sprite:"roxerEditorIconShareDisabled"},down:{image:rox.cfg.files+"/images/icons/bullhorn_p.png",sprite:"roxerEditorIconSharePressed"}},onclick:function(){
if(!mw.share){
mw.share=new roxer.widget.share();
}
mw.share.toggle();
}}];
roxer.prototype.makeControls=function(_1){
var _2=[{name:"debug",text:"Debug",states:{on:rox.cfg.files+"/images/icons/debug.png",off:rox.cfg.files+"/images/icons/debug_d.png",down:rox.cfg.files+"/images/icons/debug_p.png"},onclick:function(){
mw.toggleDebugger();
}}];
if(!_1){
_1=[];
if(roxConfig.toolbar&&roxConfig.toolbar.items&&(roxConfig.toolbar.items.length>0)){
var _3=roxConfig.toolbar.items;
for(var i=0;i<_3.length;i++){
var _5=rox.default_toolbar[_3[i]];
_1.push(_5);
}
}
}
if(!(_1.length>0)){
return;
}
rox.cs=new rox.controlStrip();
if(services.response.visitor.role=="dev"){
var _6=_2.length;
for(var i=0;i<_6;i++){
_1.push(_2[i]);
}
}
rox.items=_1;
var b=rox.cs.addItem(_1[0]);
b.swap("off");
rox._expand_subscribe=dojo.subscribe("unlock",rox,"expandStrip");
rox.cs.wizard&&rox.cs.wizard.swap("on");
rox.cs.theme&&rox.cs.theme.swap("on");
};
roxer.prototype.expandStrip=function(){
var _8=rox.items.length;
for(var i=1;i<_8;i++){
var b=rox.cs.addItem(rox.items[i]);
b.swap("off");
}
rox.cs.wizard&&rox.cs.wizard.swap("on");
rox.cs.theme&&rox.cs.theme.swap("on");
rox.cs.add&&rox.cs.add.swap("on");
rox.cs.addtext&&rox.cs.addtext.swap("on");
rox.cs.addimage&&rox.cs.addimage.swap("on");
rox.cs.background&&rox.cs.background.swap("on");
if(mw.visitor_owner){
rox.cs.share&&rox.cs.share.swap("off");
}
if(services.response.visitor.role=="dev"){
rox.cs.debug&&rox.cs.debug.swap("on");
}
dojo.unsubscribe(rox._expand_subscribe);
mw.shields["controls"]&&mw.shields["controls"].refresh();
};
roxer.prototype.controlStrip=function(){
var _b=rox.addDiv({position:"fixed"},1);
if(rox.ie6){
this.tc=rox.addDiv("",1);
}else{
this.tc=rox.addDiv({position:"fixed"},1);
}
this.header_light=rox.addDiv((!rox.ie)?{position:"fixed"}:"",1);
this.header=rox.addDiv((!rox.ie)?{position:"fixed"}:"",1);
this.header2=rox.addDiv((!rox.ie)?{position:"fixed"}:"",1);
this.header_light.style.color="#FFFFFF";
this.header_light.style.zIndex="100000";
this.header2.style.zIndex="99000";
this.header.style.fontFamily="Lucida Grande,sans-serif";
this.header2.style.fontFamily="Lucida Grande,sans-serif";
this.header_light.style.fontFamily="Lucida Grande,sans-serif";
this.header2.style.color="#000000";
this.header.style.color="#CCCCCC";
this.htimer;
this.tc.show();
this.header.show();
this.header2.show();
this.header_light.show();
this.header.style.whiteSpace="nowrap";
this.header2.style.whiteSpace="nowrap";
this.header_light.style.whiteSpace="nowrap";
this.header2.style.padding="2px";
this.header.style.paddingLeft="0px";
this.header.style.paddingTop="1px";
this.header_light.style.padding="1px";
this.tc.appendChild(this.header);
this.tc.appendChild(this.header2);
this.tc.appendChild(this.header_light);
this.icount=0;
var _c=rox.roundedCorners(rox.cfg.glass_cfg);
document.body.appendChild(_c.table);
_c.setHeight(50);
_c.table.className="glass_controls";
_c.table.id="glass_controls";
this.tc.className="glass_buttons_titles";
_b.className="glass_buttons";
_b.id="glass_buttons";
this.cellspacing=0;
this.padding=0;
this.icon_size=32;
var _d=document.createElement("TABLE");
this.table=_d;
this.table.className="glass_buttons";
this.table.cellSpacing=this.cellspacing;
this.row=_d.insertRow(-1);
this.buttons=new Array();
this.addItem=function(i){
var _f=new CtrlButtonOBJ(this,i,32);
var _10=dojo.coords(this.table);
this.width=_10.w+15;
rox.cs.glass.setAttribute("width",this.width);
return _f;
};
this.hideHeader=function(){
dojo._setOpacity(this.header,0);
dojo._setOpacity(this.header2,0);
dojo._setOpacity(this.header_light,0);
};
_b.style.visibility="visible";
_c.table.style.visibility="visible";
_b.appendChild(_d);
dojo._setOpacity(_b,0);
if(!rox.ie){
dojo._setOpacity(_c.table,0);
var _11=dojo.fadeIn({node:_c.table,duration:750});
}
var ani=dojo.fadeIn({node:_b,duration:750});
if(!rox.ie){
_11.play();
}
ani.play();
this.cnt=_b;
this.glass=_c.table;
};
function CtrlButtonOBJ(_13,i,_15,_16){
for(var x in i){
this[x]=i[x];
}
this.img=document.createElement("DIV");
this.cell=_13.row.insertCell(-1);
this.state_image={};
if(_15=="bar"){
this.width="45px";
}else{
if(_13.icon_size){
this.width=_13.icon_size+"px";
}else{
this.width=_16+"px";
}
}
dojo.setSelectable(this.img,false);
this.cell.style.width=this.width;
this.cell.style.cursor="pointer";
this.cell.appendChild(this.img);
if(_15=="bar"){
var s=document.createElement("span");
s.className="rox_bar_text_on";
s.innerHTML=this.text;
dojo.setSelectable(s,false);
this.cell.appendChild(s);
this.text=s;
}
this.img=new ImgOBJ(this.img,this.states,_16);
_13.buttons.push(this);
_13[this.name]=this;
this.swap=function(s){
this.img.swap(s);
this.state=s;
if(_15=="bar"){
this.text.className="rox_bar_text_"+s;
}
};
var _1a=this;
_1a.index=_13.icount;
this.onmouseover&&(this.cell.onmouseover=this.onmouseover);
this.onclick&&(this.cell.onclick=function(e){
if(_1a.state=="off"){
return;
}
_1a.onclick();
(rox.ie)?event.cancelBubble=true:e.cancelBubble=true;
});
var _1c=function(){
this.fadeOutHeader=function(){
dojo.fadeOut({node:_13.header,duration:100}).play();
dojo.fadeOut({node:_13.header2,duration:100}).play();
dojo.fadeOut({node:_13.header_light,duration:100}).play();
};
clearTimeout(_13.htimer);
_13.htimer=setTimeout(this.fadeOutHeader,1000);
};
this.cell.onmouseover=function(){
if(_13.header){
var _1d=function(){
dojo.fadeIn({node:_13.header,duration:500,onEnd:_1c}).play();
dojo.fadeIn({node:_13.header2,duration:500,onEnd:_1c}).play();
dojo.fadeIn({node:_13.header_light,duration:500,onEnd:_1c}).play();
};
_13.header.style.left=_1a.index*35+"px";
_13.header2.style.left=_1a.index*35+"px";
_13.header_light.style.left=_1a.index*35+"px";
_13.header.innerHTML=_1a.text;
_13.header2.innerHTML=_1a.text;
_13.header_light.innerHTML=_1a.text;
_13.header.style.visibility="visible";
_13.header2.style.visibility="visible";
_13.header_light.style.visibility="visible";
dojo._setOpacity(_13.header,1);
dojo._setOpacity(_13.header2,1);
dojo._setOpacity(_13.header_light,1);
_1c();
}
};
this.states&&(this.cell.onmousedown=function(){
if(_1a.state=="off"){
return;
}
(_1a.state_image["down"])?_1a.swap(_1a.state_image["down"]):_1a.swap("down");
})&&(this.cell.onmouseup=function(){
if(_1a.state=="off"){
return;
}
(_1a.state_image["on"])?_1a.swap(_1a.state_image["on"]):_1a.swap("on");
});
_13.icount++;
}
function ImgOBJ(img,_1f,_20){
this.states={};
for(var i in _1f){
this.states[i]=_1f[i];
}
this.img=img;
_20=(_20)?_20:32;
img.style.border="0px";
img.style.width=_20+"px";
img.style.height=_20+"px";
if(this.states["down"]&&(!dojo.isObject(this.states["down"]))){
var _22=new Image(_20,_20);
_22.src=this.states["down"];
}
this.swap=function(s){
if(!this.states[s]){
return;
}
var _24;
var _25;
if(dojo.isObject(this.states[s])){
_24=this.states[s].image;
_25=this.states[s].sprite;
}else{
_24=this.states[s];
}
if(rox.ie6){
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_24+"',sizingMethod='noscale')";
}else{
if(_25){
this.img.className="roxerButtonIcon "+_25;
}else{
this.img.style.backgroundImage="url("+_24+")";
this.img.style.backgroundPosition="center center";
}
}
};
}
dojo.declare("roxer.widget.ImageSwap",null,{size:32,constructor:function(img,_27,_28){
this.states={};
this.img=img;
if(_28){
this.size=_28;
}
img.style.border="0px";
img.style.width=_28+"px";
img.style.height=_28+"px";
var _29=new Image(_28,_28);
_29.src=this.states["down"];
},swap:function(s){
if(!rox.ie){
this.img.src=this.states[s];
}else{
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.states[s]+"',sizingMethod='noscale')";
}
}});

