ribbonManager=Class.create();
ribbonManager.prototype={initialize:function(){
},init:function(){
$("edit_menu").observe("mousedown",this.popDialog.bind(this));
$("edit_menu").observe("contextmenu",function(e){
e.stop();
});
try{
$("showLabels").observe("mousedown",this.toggleLabels);
}
catch(e){
}
try{
$("showClipboard").observe("mousedown",this.toggleClipboard);
}
catch(e){
}
try{
$("showFont").observe("mousedown",this.toggleFont);
}
catch(e){
}
try{
$("showAlignment").observe("mousedown",this.toggleAlignment);
}
catch(e){
}
try{
$("showNumber").observe("mousedown",this.toggleNumber);
}
catch(e){
}
try{
$("showData").observe("mousedown",this.toggleData);
}
catch(e){
}
try{
$("showObjects").observe("mousedown",this.toggleObjects);
}
catch(e){
}
try{
$("ribbondialog").hide();
}
catch(e){
}
try{
$("ribbondialog").observe("contextmenu",function(e){
e.stop();
});
}
catch(e){
}
},falsefunc:function(){
return false;
},toggleLabels:function(){
var _3=toolkit.getExternalRule(".editLabel");
if($F("showLabels")=="1"){
toolkit.setExternalRule(_3,{display:"none"});
}else{
toolkit.setExternalRule(_3,{display:"block"});
}
},toggleClipboard:function(){
if($F("showClipboard")=="1"){
$("clipboardMenu").hide();
}else{
$("clipboardMenu").show();
}
},toggleFont:function(){
if($F("showFont")=="1"){
$("fontMenu").hide();
}else{
$("fontMenu").show();
}
},toggleAlignment:function(){
if($F("showAlignment")=="1"){
$("alignmentMenu").hide();
}else{
$("alignmentMenu").show();
}
},toggleNumber:function(){
if($F("showNumber")=="1"){
$("numberMenu").hide();
}else{
$("numberMenu").show();
}
},toggleData:function(){
if($F("showData")=="1"){
$("dataMenu").hide();
}else{
$("dataMenu").show();
}
},toggleObjects:function(){
if($F("showObjects")=="1"){
$("objectMenu").hide();
}else{
$("objectMenu").show();
}
},popDialog:function(_4){
if(_4==null){
_4=window.event;
}
_4=Event.extend(_4);
var _5=$("ribbondialog");
if(!_4.isLeftClick()){
_5.setStyle({top:_4.pointerY()+"px",left:_4.pointerX()+"px"});
try{
_5.show();
}
catch(e){
}
return false;
}else{
try{
_5.hide();
}
catch(e){
}
return true;
}
}};
