4
Copyright DHTMLX LTD. http://www.dhtmlx.com
5
You allowed to use this component or parts of it under GPL terms
6
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
20
* @param: width - object width
21
* @param: height - object height
22
* @param: name - menu display name
23
* @param: vMode - if eq 1 => vertical menu bar
24
* @param: httpsdummy - dummy html page, which will be used for invisible iframes (necessary only for https mode)
30
function dhtmlXMenuBarObject(htmlObject,width,height,name,vMode,gfxPath,httpsdummy){
31
if (typeof(htmlObject)!="object")
32
this.parentObject=document.getElementById(htmlObject);
34
this.parentObject=htmlObject;
35
if (!this.parentObject) this.parentObject=document.body;
37
this.setGfxPathA=this.setGfxPath;
38
this.setGfxPath=function(){
39
this.setGfxPathA.apply(this,arguments);
41
dhtmlXMenuItemObject.prototype.dummyImg=function(){
42
return self.sysGfxPath+"blank.gif";
46
if ((_isIE)&&(this.parentObject==document.body))
48
var zdiv=document.createElement("DIV");
49
zdiv.style.position="absolute";
53
document.body.insertBefore(zdiv,document.body.firstChild);
54
this.parentObject=zdiv;
58
if (!vMode) this.flsmd=true;
64
this._httpsdummy=httpsdummy;
65
this.ieFix=(document.all?true:false);
67
var detect = navigator.userAgent.toLowerCase();
68
place = detect.indexOf('opera') + 1;
69
if (place) this.ieFix=false;
72
this.ieWinModeState=0;
76
this.setGfxPath(gfxPath);
83
this.tableCSS="menuTable";
84
this.titleCSS="menuName";
85
this.secTableCSS="secondMenuTable";
87
this.extraMode=convertStringToBoolean(vMode);
93
var lastOpenedPanel=0;
94
var lastSelectedItem=0;
96
this.items=new Array();
98
this.gitems=new Array();
101
this.subMenus=new Array();
102
this.subMenusCount=0;
108
this._createVPanel();
111
this.hiddenForm=document.createElement("FORM");
112
this.hiddenForm.style.display="none";
113
this.parentObject.appendChild(this.hiddenForm);
115
if (this._extendedInit) this._extendedInit();
116
this.xmlLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this);
117
this.setMenuMode("classic");
119
this.setBarSize(this.width,this.height);
124
dhtmlXMenuBarObject.prototype = new dhtmlXProtobarObject;
128
* @desc: set zIndex value for menu object
129
* @param: zIndex - (integer) new zIndex value
133
dhtmlXMenuBarObject.prototype.setZIndex=function(zIndex){
135
this.topNod.style.zIndex=this.zIndex;
136
if (this.topNod.ieFix) this.topNod.ieFix.style.zIndex=this.zIndex-1;
137
if ((_isIE)&&(this.parentObject)&&(this.parentObject.style.position=="absolute")) this.parentObject.style.zIndex=zIndex;
140
* @desc: set zIndex value for menu object
141
* @param: size - (integer) new icon size
145
dhtmlXMenuBarObject.prototype.setIconSize=function(size){
151
* @param: parentPanel - parent panel object
152
* @param: parentItem - parent menu item
153
* @param: mode - if eq 1 => horisontal menu bar
154
* @param: minWidth - minimal panel width
155
* @param: withoutImages - enable/disable images in menu items
159
function dhtmlXMenuBarPanelObject(parentPanel,parentItem,mode,minWidth,withoutImages){
160
this.extraMode=!convertStringToBoolean(mode);
161
this.parentPanel=parentPanel;
162
this.parentItem=parentItem;
163
this.parentObject=parentPanel.parentObject;
164
this.topMenu=parentPanel.topMenu;
171
this.items=new Array();
173
this.withoutImages=(withoutImages==1);
174
this.mixedImages=(withoutImages==2);
175
if (minWidth) this.width=minWidth;
177
if ((!this.topMenu.flsmd)||(this.topMenu!=this.parentPanel))
178
this.parentItem.setHasChild(true);
181
this._createVPanel=this.topMenu._createPanel;
183
this._createVPanel=this.topMenu._createVPanel;
187
this._createVPanel();
189
this.topNod.panel=this;
190
this.topNod.onmouseover=this.topMenu._onmouseoverZ;
191
this.topNod.onmouseout=this.topMenu._onmouseoutZ;
193
parentItem.subMenu=this;
194
this.topNod.style.position="absolute";
195
this.topMenu.subMenus[this.topMenu.subMenusCount]=this;
196
this.topMenu.subMenusCount++;
202
* @desc: fix z-index problem with select boxes in IE, enabled by default
203
* @param: mode - enable/disable
207
dhtmlXMenuBarObject.prototype.enableIESelectBoxFix=function(mode){
208
this.ieFix=convertStringToBoolean(mode);
211
* @desc: enable/disable tooltips
212
* @param: mode - enable/disable
216
dhtmlXMenuBarObject.prototype.enableTooltip=function(mode){
217
this._endtt=(!convertStringToBoolean(mode));
222
* @desc: fix z-index problem with select boxes in IE, enabled by default
223
* @param: mode - disable/enable smart positioning of sub menus
227
dhtmlXMenuBarObject.prototype.disableSmartPositioning=function(mode){
228
this._skipAPP=convertStringToBoolean(mode);
233
* @desc: fix z-index problem with select boxes in IE, enabled by default
234
* @param: mode - enable/disable
238
dhtmlXMenuBarObject.prototype.enableMenuHandle=function(mode){
239
if(convertStringToBoolean(mode)) this.dividerCell.style.display="";
240
else this.dividerCell.style.display="none";
243
* @desc: disable child menu image
244
* @param: mode - enable/disable
248
dhtmlXMenuBarObject.prototype.enableChildIcon=function(mode){
249
this.echsw=convertStringToBoolean(mode);
252
* @desc: disable child menu image
253
* @param: mode - enable/disable
257
dhtmlXMenuBarObject.prototype.setHrefMode=function(mode){
261
* @desc: disable child menu image
262
* @param: mode - enable/disable
266
dhtmlXMenuBarObject.prototype.enableDirectOnClick=function(mode){
267
this._dirClick=convertStringToBoolean(mode);
270
* @desc: disable child menu image switching
271
* @param: mode - enable/disable
275
dhtmlXMenuBarObject.prototype.enableChildIconSwitching=function(mode){
276
this.echsw2=convertStringToBoolean(mode);
279
* @desc: closed menu behaviour
280
* @param: mode - enable/disable
284
dhtmlXMenuBarObject.prototype.enableWindowOpenMode=function(mode){
285
this.ieWinMode=convertStringToBoolean(mode);
289
* @desc: return item index in collection by id
291
* @param: id - item id
294
dhtmlXMenuBarObject.prototype._getItemIndex=function(id){
295
for (var i=0; i<this.gitemsCount; i++)
297
if (this.gitems[i].id==id) return i;
302
* @desc: return item object by id
304
* @param: itemId - item id
307
dhtmlXMenuBarObject.prototype.getItem=function(itemId){
308
var z=this._getItemIndex(itemId);
309
if (z>=0) return this.gitems[z];
315
* @desc: show node in scrolling process
316
* @param: node - html button node
317
* @param: rest - scrolling direction
321
dhtmlXMenuBarObject.prototype._showScroll=function(node,order,rest,mode){
322
if (!node.items[order]) return;
325
if (rest==1) node.cAr[2]++;
328
if (rest==1) node.cAr[0]++;
331
if ((!node.items[order].CSSTag)||(node.items[order].hide))
333
node.items[order].topNod.parentNode.style.display=mode;
334
this._showScroll(node,order*1+rest*1,rest,mode);
338
node.items[order].topNod.parentNode.style.display=mode;
344
* @desc: set state of scroll buttons
345
* @param: node - html button node
346
* @param: rest - scrolling direction
350
dhtmlXMenuBarObject.prototype._fixScrollState=function(node,rest){
352
if (parseInt(node.topNod.offsetWidth)>parseInt(node.topNod.width))
353
node.topNod.width=node.topNod.offsetWidth;
358
this._showScroll(node,node.cAr[0],1,"none");
359
this._showScroll(node,node.cAr[2],1,"");
362
this._showScroll(node,node.cAr[0]-1,-1,"");
363
this._showScroll(node,node.cAr[2]-1,-1,"none");
365
z.scrollState+=rest*1;
368
if ((node.scrollState*1+node.maxItems*1)==(node.realItemsCount))
369
node.scrollDown.className="menuScrollerDisabled";
372
node.scrollDown.className="menuScrollerEnabled";
376
if (node.scrollState==0)
377
node.scrollUp.className="menuScrollerDisabled";
380
node.scrollUp.className="menuScrollerEnabled";
391
* @desc: start scrolling
395
dhtmlXMenuBarObject.prototype._scrollstart=function(){
396
if (this.timeoutops) clearTimeout(this.timeoutops);
397
z=this.parentNode.parentNode.parentNode.menu;
398
if (z.scrollDown==this)
403
if (z.topMenu._fixScrollState(z,rest)==2)
404
this.timeoutops=setTimeout(new z.topMenu._delayedTimerCall(this,"onmouseover",0,0),333);
407
* @desc: stop scrolling
411
dhtmlXMenuBarObject.prototype._scrollend=function(node){
412
if (this.timeoutops) window.clearTimeout(this.timeoutops);
415
* @desc: enable/disable scrolling
416
* @param: node - dhtml button node
420
dhtmlXMenuBarObject.prototype._scrollCheck=function(node){
422
for (var i=0; i<node.itemsCount; i++)
423
if ((node.items[i].CSSTag)&&(!node.items[i].hide)) z_count++;
425
node.realItemsCount=z_count;
426
node.cAr=new Array(0,0,0);
427
if ((node.realItemsCount>node.maxItems)&&(node.scrollDown)){
428
node.scrollDown.style.display="";
429
node.scrollUp.style.display="";
430
node.scrollDown.className='menuScrollerEnabled';
432
node.scrollUp.onmouseover=this._scrollstart;
433
node.scrollUp.onmouseout=this._scrollend;
434
node.scrollDown.onmouseover=this._scrollstart;
435
node.scrollDown.onmouseout=this._scrollend;
440
for (var i=0; i<node.itemsCount; i++)
442
if ((node.items[i].CSSTag)&&(!node.items[i].hide)) z_count++;
443
if (z_count>node.maxItems) {
444
node.items[i].topNod.parentNode.style.display="none";
445
if (node.cAr[2]==0) node.cAr[2]=i; }
447
node.items[i].topNod.parentNode.style.display="";
454
dhtmlXMenuBarObject.prototype._scrollClear=function(node){
455
for (var i=0; i<node.itemsCount; i++){
456
if ((node.items[i].CSSTag)&&(!node.items[i].hide))
457
node.items[i].topNod.parentNode.style.display="";
459
node.scrollDown.style.display="none";
461
node.scrollUp.style.display="none";
466
* @desc: return menu panel object
467
* @param: panelId - id of panel related menu item
471
dhtmlXMenuBarObject.prototype.getPanel=function(panelId){
472
var z=this._getGItemIndex(panelId);
473
if (z<0) return this;
474
else return this.gitems[z].subMenu;
478
* @desc: add item to menu
479
* @param: item - item object
480
* @param: panel - menu panel object
484
dhtmlXMenuBarObject.prototype.addItem=function(panel,item){
485
if (this==panel) this.addFirstLevel(panel,item);
486
else this.addSecondLevel(panel,item);
490
* @desc: add item to horisontal oriented menu
491
* @param: item - item object
492
* @param: panel - menu panel object
496
dhtmlXMenuBarObject.prototype._addItem=function(panel,item){
497
panel.items[panel.itemsCount]=item;
498
panel.firstCell.parentNode.insertBefore(item.getTopNode(),panel.firstCell);
499
item.getTopNode().style.marginBottom="20px";
501
item.parentPanel=panel;
502
if (this.defaultAction) item.setAction(this.defaultAction);
505
this.gitems[this.gitemsCount]=item;
510
* @desc: add item to vertical oriented menu
511
* @param: item - item object
512
* @param: panel - menu panel object
516
dhtmlXMenuBarObject.prototype.addItem_vertical=function(panel,item){
517
panel.items[panel.itemsCount]=item;
518
var tr=document.createElement("tr");
519
tr.style.verticalAlign="top";
520
tr.appendChild(item.getTopNode());
521
panel.firstCell.parentNode.insertBefore(tr,panel.firstCell);
523
item.parentPanel=panel;
524
if (this.defaultAction) item.setAction(this.defaultAction);
527
this.gitems[this.gitemsCount]=item;
532
* @desc: return item index from global collection by id
534
* @param: id - item id
537
dhtmlXMenuBarObject.prototype._getGItemIndex=function(id){
538
/* for (var i=0; i<=this.gitemsCount; i++)
540
if (this.gitems[i].id==id) return i;
544
return (this._getItemIndex(id));
550
* @param: id - item id
553
dhtmlXMenuBarObject.prototype.clearAll=function(id){
554
for (var i=0; i<this.gitemsCount; i++)
556
var x=this.gitems[i].getTopNode();
557
if (this.extraMode) x=x.parentNode;
558
x.parentNode.removeChild(x);
559
x=this.gitems[i].parentPanel;
560
if (x!=this.topMenu && x.topNod){
561
x.topNod.parentNode.removeChild(x.topNod);
567
this.items=new Array();
569
this.gitems=new Array();
571
this.subMenus=new Array();
572
this.subMenusCount=0;
573
this.realWinModeStart=this.ieWinModeState=this._lastOpenedPanel=this._lastSelectedItem=null;
578
* @param: id - item id
581
dhtmlXMenuBarObject.prototype.removeItem=function(id){
582
var z=this._getGItemIndex(id);
584
var panel=this.gitems[z].parentPanel;
585
if (this.gitems[z].removeItem) this.gitems[z].removeItem();
587
if (panel.firstCell.tagName=="TR")
588
var zw=this.gitems[z].getTopNode().parentNode
590
var zw=this.gitems[z].getTopNode().parentNode
591
zw.parentNode.removeChild(zw);
594
for (var i=0; i<panel.itemsCount; i++)
595
if (panel.items[i]==this.gitems[z]){
596
panel.items[i]=panel.items[i+1];
597
panel.items[i+1]=this.gitems[z];
599
panel.items[panel.itemsCount]=0;
602
for (var i=z; i<this.gitemsCount; i++){
603
this.gitems[i]=this.gitems[i+1];
605
this.gitems[this.gitemsCount]=0;
615
* @param: that - menu object
616
* @param: node - current xml node
617
* @param: level - menu level
618
* @param: parentNode - parent panel
619
* @param: aTempNode - parent item
620
* @param: mode - menu design mode
623
dhtmlXMenuBarObject.prototype._parseXMLTree=function(that,node,level,parentNode,aTempNode,mode){
625
node=that.xmlLoader.getXMLTopNode("menu");
628
aTempNode=that._awaitXML;
629
parentNode=aTempNode.parentPanel;
639
mode=node.getAttribute("mode");
640
if (mode) that.setMenuMode(mode);
642
var menuAlign=node.getAttribute("menuAlign");
643
if (menuAlign) that.setBarAlign(menuAlign);
645
that.maxItems=node.getAttribute("maxItems")||99;
646
var absolutePosition=node.getAttribute("absolutePosition");
647
var aleft=node.getAttribute("left");
648
var atop=node.getAttribute("top");
649
if (absolutePosition) that.topNod.style.top=parseInt(atop || 0 )+"px";
650
if (absolutePosition) that.topNod.style.left=parseInt(aleft || 0)+"px";
651
if (absolutePosition=="yes") that.topNod.style.position="absolute";
653
var name=node.getAttribute("name");
654
if(name) that.setTitleText(name);
656
var width=node.getAttribute("width");
657
var height=node.getAttribute("height");
658
that.setBarSize(width,height);
660
var imageTextButtonCssClass=node.getAttribute("imageTextButtonCssClass");
661
var globalTextCss=node.getAttribute("globalTextCss");
663
that.globalSecondCss=node.getAttribute("globalSecondCss");
664
that.globalCss=node.getAttribute("globalCss");
665
that.globalTextCss=node.getAttribute("globalTextCss");
666
if (node.getAttribute("withoutImages")) that.withoutImages=true;
667
if (node.getAttribute("mixedImages")) that.mixedImages=true;
668
that.type=node.getAttribute("type")||"a1";
677
var parentNode=new dhtmlXMenuBarPanelObject(parentNode,aTempNode,((mode!="classic")&&(mode!="popup")),node.getAttribute("panelWidth"),(node.getAttribute("withoutImages")?1:(node.getAttribute("mixedImages")?2:0)));
678
parentNode.maxItems=node.getAttribute("maxItems")||that.maxItems;
681
for(var i=0; i<node.childNodes.length; i++)
683
if (node.childNodes[i].nodeType==1)
685
var localItem=node.childNodes[i]
689
if ((!localItem.getAttribute("className"))&&(that.globalCss))
690
localItem.setAttribute("className",that.globalCss);
693
if (!localItem.getAttribute("className"))
695
if (that.globalSecondCss)
696
localItem.setAttribute("className",that.globalSecondCss);
698
localItem.setAttribute("className","menuButtonSecond");
703
if ((!localItem.getAttribute("textClassName"))&&(that.globalTextCss))
704
localItem.setAttribute("textClassName",that.globalTextCss);
707
var tempsrc=localItem.getAttribute("src");
708
if (parentNode.withoutImages){
709
localItem.setAttribute("src","");
710
localItem.setAttribute("src2", that.sysGfxPath+"blank.gif");
714
if ((parentNode.mixedImages)&&(tempsrc==null))
715
tempsrc=that.sysGfxPath+"blank.gif";
717
tempsrc=that.sysGfxPath+(tempsrc||"blank.gif");
719
localItem.setAttribute("src",tempsrc);
722
tempsrc=localItem.getAttribute("width");
724
localItem.setAttribute("width","100%");
727
if (that._endtt) localItem.setAttribute("tooltip","");
728
if (that._aimsize) localItem.setAttribute("imageSize",that._aimsize);
730
var z=eval("window.dhtmlX"+localItem.tagName+"Object");
732
var TempNode= new z(localItem,node.getAttribute("type")||that.type);
736
if (localItem.tagName=="divider")
737
if ((level)||(that.modeValue=="popup"))
738
that.addItem(parentNode,new dhtmlXMenuDividerYObject(localItem.getAttribute("id")));
740
that.addItem(parentNode,new dhtmlXMenuDividerXObject(localItem.getAttribute("id")));
744
that.addItem(parentNode,TempNode);
746
that.addItem(parentNode,TempNode);
748
if (localItem.getAttribute("disabled"))
751
if ((TempNode)&&(localItem.getAttribute("submenu"))){
752
TempNode.submenu=localItem.getAttribute("submenu");
753
TempNode.setHasChild(true);
756
if (that.checkXMLChild(localItem)) that._parseXMLTree(that,localItem,level+1,parentNode,TempNode,mode);
760
that._scrollCheck(parentNode);
763
if (that.topMenu.correctMenuPosition)
764
that.topMenu.correctMenuPosition(that.topMenu.topNod);
766
if (that.topMenu.waitCall)
767
that.topMenu.waitCall();
772
* @desc: check if node has non-text childs
776
dhtmlXMenuBarObject.prototype.checkXMLChild=function(node){
777
for (var i=0; i<node.childNodes.length; i++)
778
if (node.childNodes[i].nodeType==1) return true;
785
* @desc: horisontal menu panel
789
dhtmlXMenuBarObject.prototype._createPanel=function()
791
if(!this.width) this.width=1;
792
if(!this.height) this.height=1;
793
if (this.width.toString().indexOf("%")==-1) this.width=parseInt(this.width)+"px";
794
if (this.height.toString().indexOf("%")==-1) this.height=parseInt(this.height)+"px";
795
var div=document.createElement("div");
796
div.innerHTML='<table cellpadding="0" cellspacing="0" class="'+this.topMenu.tableCSS+'" width="'+this.width+'" height="'+this.height+'"><tbody>' +
798
'<td width="3px" style="display:none"><div class="menuHandle"> </div></td>'+
799
'<td class="'+this.topMenu.titleCSS+'" style="display:none">'+this.topMenu.tname+'</td>'+
801
'<td align="right" '+(_isOpera?'':'width="100%"')+' class="'+this.topMenu.titleCSS+'"> '+this.topMenu.tname+'</td>'+
802
/*'<td> </td>'*/'<td><td>'+
803
'</tr></tbody></table>';
804
var table=div.childNodes[0];
805
table.style.display="none";
806
table.setAttribute("UNSELECTABLE","on");
807
table.onselectstart=this.topMenu.badDummy;
809
this.dividerCell=table.childNodes[0].childNodes[0].childNodes[0];
810
this.dividerCell.menu=this;
811
this.preNameCell=this.dividerCell.nextSibling;
812
this.firstCell=this.preNameCell.nextSibling;
813
this.nameCell=this.firstCell.nextSibling;
814
this.crossCell=this.nameCell.nextSibling;
815
if (this.topMenu!=this){
816
this.dividerCell.style.display="none";
817
this.preNameCell.style.display="none";
818
this.nameCell.style.display="none";
819
this.crossCell.style.display="none";
820
table.className=this.topMenu.secTableCSS;
822
this.topNod.style.zIndex=this.topMenu.zIndex;
824
if (this.topMenu.ieFix)
826
var iframe=document.createElement("IFRAME");
827
if (this._httpsdummy || this.topMenu.sysGfxPath)
828
iframe.src=(this._httpsdummy||(this.topMenu.sysGfxPath+"/blank.html"));
830
iframe.style.zIndex=this.topMenu.zIndex-1; iframe.style.position="absolute";
831
iframe.style.display="none"; iframe.scrolling="no"; iframe.frameBorder=0;
832
this.parentObject.appendChild(iframe);
833
this._del_iframe=iframe;
835
this.topNod.ieFix=iframe;
837
this.parentObject.appendChild(table);
838
this._del_table=table;
843
* @desc: set menu css classes
845
* @param: table - css class for menu container
846
* @param: secTable - css class for child menu containers
847
* @param: title - css class for toolbar title
850
dhtmlXMenuBarObject.prototype.setMenuCSS=function(table,title,secTable){
853
this.secTableCSS=secTable;
854
this.topNod.className=this.tableCSS;
855
this.preNameCell.className=this.titleCSS;
856
this.nameCell.className=this.titleCSS;
861
dhtmlXMenuBarObject.prototype._adjustGFXPath=function(path){
863
this.topNod.rows[0].cells[0].childNodes[0].src=path+'btn_up1.gif';
864
this.topNod.rows[this.topNod.rows.length-3].cells[0].childNodes[0].src=path+'btn_up2.gif';
868
* @desc: vertical menu panel
872
dhtmlXMenuBarObject.prototype._createVPanel=function()
874
if(!this.width) this.width=120;
875
if(!this.height) this.height=20;
876
if (this.width.toString().indexOf("%")==-1) this.width=parseInt(this.width)+"px";
877
if (this.height.toString().indexOf("%")==-1) this.height=parseInt(this.height)+"px";
878
var div=document.createElement("div");
879
div.innerHTML='<table cellpadding="0" cellspacing="0" class="'+this.topMenu.tableCSS+'" width="'+this.width+'" ><tbody>' +
880
'<tr ><td class="menuScrollerDisabled" style="display:none"><img src="'+this.topMenu.sysGfxPath+'btn_up1.gif"/></td></tr>'+
881
'<tr><td class="'+this.topMenu.titleCSS+'" style="display:none">'+this.tname+'</td></tr>'+
882
'<tr><td></td></tr>'+
883
'<tr><td class="menuScrollerDisabled" style="display:none"><img src="'+this.topMenu.sysGfxPath+'btn_up2.gif"/></td></tr>'+
884
'<tr><td align="right" class="'+this.topMenu.titleCSS+'" style="display:none">'+this.tname+'</td></tr>'+
885
'<tr><td></td></tr>'+
888
var table=div.childNodes[0];
889
table.style.display='none';
891
table.onselectstart=this.topMenu.badDummy;
892
table.setAttribute("UNSELECTABLE","on");
894
this.dividerCell=table.childNodes[0].childNodes[0].childNodes[0];
895
// this.dividerCell.menu=this;
897
this.scrollUp=this.dividerCell;
898
this.scrollonmouseover="";
899
this.preNameCell=table.childNodes[0].childNodes[1].childNodes[0];
900
this.firstCell=table.childNodes[0].childNodes[2];
901
this.scrollDown=table.childNodes[0].childNodes[3].childNodes[0];
902
this.nameCell=table.childNodes[0].childNodes[4].childNodes[0];
903
this.crossCell=table.childNodes[0].childNodes[5].childNodes[0];
905
if (this.topMenu!=this) {
906
//this.dividerCell.parentNode.style.display="none";
907
this.preNameCell.parentNode.style.display="none";
908
this.nameCell.parentNode.style.display="none";
909
this.crossCell.parentNode.style.display="none";
910
table.className=this.topMenu.secTableCSS;
913
this.topNod.style.zIndex=this.topMenu.zIndex;
915
if (this.topMenu.ieFix)
917
var iframe=document.createElement("IFRAME");
918
iframe.style.zIndex=this.topMenu.zIndex-1; iframe.style.position="absolute";
919
iframe.src=(this._httpsdummy||(this.topMenu.sysGfxPath+"blank.gif"));
920
iframe.style.display="none"; iframe.scrolling="no"; iframe.frameBorder=0;
921
this.parentObject.appendChild(iframe);
922
this._del_iframe=iframe;
924
this.topNod.ieFix=iframe;
926
this.parentObject.appendChild(table);
927
this._del_table=table;
936
/*------------------------------------------------------------------------------
938
--------------------------------------------------------------------------------*/
940
* @desc: image button with text object
941
* @param: id - identificator
942
* @param: text - button text
943
* @param: width - object width
944
* @param: src - image href
945
* @param: className - css class for button (button use 3 css classes - [className],[className]Over,[className]Down)
946
* @param: disableImage - alter image for disable mode [optional]
947
* @param: href - hyperlink [optional]
948
* @param: target - hyperlink target [optional]
949
* @param: type - css mode [optional] ( check styling guide for more details )
950
* @param: type - image_size - size of image[optional]
954
function dhtmlXMenuItemObject(id,text,width,src,className,disableImage,href,target,type,image_size){
958
if (id.tagName=="MenuItem")
961
src=id.getAttribute("src");
962
src2=id.getAttribute("src2");
963
text=id.getAttribute("name");
964
className=id.getAttribute("className");
965
disableImage=id.getAttribute("disableImage");
966
width=id.getAttribute("width");
967
href=id.getAttribute("href");
968
if (_isKHTML && href) href=href.replace(/\&\#38;/g,"&");
969
target=id.getAttribute("target");
970
tooltip=id.getAttribute("tooltip");
971
if ((tooltip!=="")&&(!tooltip)) tooltip=text;
972
image_size=id.getAttribute("imageSize");
973
id=id.getAttribute("id");
976
else this.id=(new Date()).valueOf();
980
image_size=parseInt(image_size)||18;
991
this.className=className||"menuButton";
992
this.textClassName="defaultMenuText";
993
this.disableImage=disableImage;
995
td=document.createElement("td");
996
this.topNod=td; td.align="center";
998
if (width && width.toString().indexOf("%")==-1) {
999
width=parseInt(width)+"px";
1000
if (_isOpera) td.style.width=width;
1003
var menuhtml="<table align='left' cellpadding='0' cellspacing='0' border='0' style='"+(width?("width:"+width+";"):"")+" height:100%;'><tr><td width='"+(2+image_size)+"px' style=' "+(src?"":"display:none; ")+"'><img src='"+(src2?src2:this.dummyImg())+"' border='0' width='"+image_size+"px' height='"+image_size+"px'/></td>";
1004
if (this.text.length > 0) menuhtml += "<td width='100%' align='left' style=' "+(src?" padding-left:2px;":"")+" overflow:hidden;' ><table width='100%' height='100%' cellpadding='0' cellspacing='0'><tr><td title='"+tooltip+"' class='"+this.textClassName+"' nowrap='nowrap' >"+this.text+"</td><td width='12px'><img style='display:none' src='"+this.dummyImg()+"'/></td></tr></table></td>";
1005
else menuhtml += "<td width='100%' align='left' style=' "+(src?" padding-left:2px;":"")+" overflow:hidden; display: none' ><table width='100%' height='100%' cellpadding='0' cellspacing='0'><tr><td title='"+tooltip+"' class='"+this.textClassName+"' nowrap='nowrap' >"+this.text+"</td><td width='12px'><img style='display:none' src='"+this.dummyImg()+"'/></td></tr></table></td>";
1006
menuhtml+="</tr></table>";
1007
td.innerHTML = menuhtml;
1008
this.imageTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];
1009
this.childMenuTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];
1010
this.textTag=this.childMenuTag.parentNode.parentNode.childNodes[0];
1015
this.CSSImageTag=null;
1018
this.CSSTag=td.childNodes[0];
1019
this.CSSImageTag=null;
1022
this.CSSTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
1023
this.CSSImageTag=null;
1027
this.CSSImageTag=this.imageTag.parentNode;
1030
this.CSSTag=td.childNodes[0];
1031
this.CSSImageTag=this.imageTag.parentNode;
1034
this.CSSTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
1035
this.CSSImageTag=this.imageTag.parentNode;
1038
td.id="menuItem_"+this.id;
1039
this.CSSTag.className=this.className;
1045
dhtmlXMenuItemObject.prototype=new dhtmlXButtonPrototypeObject;
1047
dhtmlXMenuItemObject.prototype.dummyImg=function(){
1052
* @desc: enable object
1056
dhtmlXMenuItemObject.prototype.enable=function(){
1058
if (this.disableImage) this.imageTag.src=this.src;
1060
if (!this.className)
1061
this.topNod.className=this.objectNode.className;
1063
this.topNod.className=this.className;
1066
this.textTag.className=this.textClassName;
1069
// this.topNod.onclick=this._onclickX;
1070
this.topNod.onmouseover=this._onmouseoverX;
1071
this.topNod.onmouseout=this._onmouseoutX;
1072
this.topNod.onmousedown=this._onmousedownX;
1073
this.topNod.onmouseup=this._onclickX;
1077
* @desc: onmousedown handler
1081
dhtmlXMenuItemObject.prototype._onmousedownX=function(e) { if ((!this.objectNode.parentPanel.parentPanel)&&((this.objectNode.subMenu)||(this.objectNode.submenu))) this.objectNode._onclickX(e,this.objectNode); };
1084
* @desc: set childs sign
1085
* @param: newText - new text [ HTML allowed ]
1089
dhtmlXMenuItemObject.prototype.setHasChild = function(mode){
1090
if ((convertStringToBoolean(mode))&&(this.parentPanel.topMenu.echsw)) {
1091
this.childMenuTag.src=this.parentPanel.topMenu.sysGfxPath+'btn_rt1.gif';
1092
this.childMenuTag.style.display='';
1094
else this.childMenuTag.style.display='none';
1098
* @desc: set button text
1099
* @param: newText - new text [ HTML allowed ]
1103
dhtmlXMenuItemObject.prototype.setText = function(newText){
1104
this.textTag.innerHTML=newText;
1107
* @desc: inner onclick handler
1112
dhtmlXMenuItemObject.prototype._onclickX=function(e,that){
1114
e.cancelBubble=true;
1116
if (!that) that=this.objectNode;
1117
var thatM=that.parentPanel.topMenu;
1118
if (that.topNod.dstatus) return;
1120
thatM._flag_click=that;
1124
thatM.loadXMLFor(that.submenu,that.id,function(){
1125
a_that.submenu=null;
1126
if (a_top._flag_click==a_that)
1127
a_that._onclickX([],a_that);
1129
a_that.submenu=null;
1133
if ((thatM.ieWinMode)&&(!thatM.ieWinModeState)&&(that.subMenu))
1135
that.parentPanel.topMenu._onItemOver(that,that.subMenu);
1136
if (document.body.currentActiveMenu!=thatM)
1137
if (document.body.onmouseup) { document.body.onmouseup(); }
1139
if (thatM.realWinModeStart)
1142
that.parentPanel.topMenu.ieWinModeState=1;
1145
if (document.body.onmouseup!=thatM._onclickclose)
1147
thatM.olddoc=document.body.onmouseup;
1148
document.body.onmouseup=thatM._onclickclose;
1151
document.body.currentActiveMenu=that.parentPanel.topMenu;
1153
thatM.realWinModeStart=0;
1155
else thatM.realWinModeStart=1;
1159
if ((thatM.ieWinMode)&&(thatM.ieWinModeState)&&(that.subMenu)) {
1160
if ((!thatM.realWinModeStart)&&(that.parentPanel==thatM))
1162
thatM.realWinModeStart=1;
1166
thatM.realWinModeStart=0;
1169
thatM.realWinModeStart=0;
1170
thatM.ieWinModeState=0;
1172
thatM.dropTimers(that.parentPanel);
1173
thatM._closePanel(that.parentPanel);
1174
thatM.lastSelectedItem=0;
1175
thatM.probablyCloseMe=0;
1176
thatM.lastOpenedPanel="";
1178
if (that.parentPanel.topMenu.ieWinMode){
1179
if (that.parentPanel.topMenu.olddoc)
1180
document.body.onclick=that.parentPanel.topMenu.olddoc;
1182
document.body.onclick=null;
1185
if ((that.parentPanel.topMenu.ieWinMode)&&(!that.parentPanel.parentPanel)&&(that.subMenu))
1190
that.parentPanel.topMenu._unMarkItem(that,"down");
1191
if (that.parentPanel.topMenu._dirClick)
1192
that._onclickY(0,0);
1194
setTimeout( new that.parentPanel.topMenu._delayedTimerCall(that,"_onclickY",0,0),100);
1200
dhtmlXMenuBarObject.prototype._onclickclose=function(e){
1201
var that=this.currentActiveMenu;
1203
document.body.onmouseup=that.olddoc;
1205
document.body.onmouseup=null;
1206
that.realWinModeStart=0;
1207
that.lastOpenedPanel="";
1208
that.ieWinModeState=0;
1209
that.dropTimers(that);
1210
that._closePanel(that);
1211
that.lastSelectedItem=0;
1213
dhtmlXMenuBarObject.prototype.close=function(e){
1215
document.body.onmouseup=this.olddoc;
1217
document.body.onmouseup=null;
1218
that.realWinModeStart=0;
1219
that.lastOpenedPanel="";
1220
that.ieWinModeState=0;
1221
that.dropTimers(this);
1222
that._closePanel(this);
1223
that.lastSelectedItem=0;
1226
* @desc: inner onclick handler
1230
dhtmlXMenuItemObject.prototype._onclickY=function(){
1231
if ((!this.persAction)||(this.persAction()))
1232
if ((!this.action)||(this.action(this.id)))
1235
var form=this.parentPanel.topMenu.hiddenForm;
1236
form.action=this.href;
1237
form.target=this.target;
1238
form.method=(this.parentPanel.topMenu._hmode?this.parentPanel.topMenu._hmode:"GET");
1241
else document.location.href=this.href;
1248
* @desc: item mouse over handler
1253
dhtmlXMenuItemObject.prototype._onmouseoverY=function(e){
1254
var that=this.parentPanel.topMenu;
1255
if ((!that.ieWinMode)||(that.ieWinModeState))
1256
this.parentPanel.topMenu._onItemOver(this,this.subMenu);
1259
if ((that.lastSelectedItem)&&(that.lastSelectedItem!=this))
1260
this.parentPanel.topMenu._unMarkItem(that.lastSelectedItem);
1262
this.parentPanel.topMenu._markItem(this);
1268
* @desc: item mouse out handler
1273
dhtmlXMenuItemObject.prototype._onmouseoutY=function(e){
1274
this.parentPanel.topMenu._onItemOut(this,this.subMenu);
1278
* @desc: drop event timers
1279
* @param: panel - panel object
1283
dhtmlXMenuBarObject.prototype.dropTimers=function(panel){
1285
z=panel.topNod.timeoutop;
1286
if (z) clearTimeout(z);
1288
if (!panel.parentPanel) return;
1289
var z=panel.parentPanel.topNod.timeoutop;
1290
if (z) clearTimeout(z);
1292
var z=panel.parentItem.topNod.timeoutop;
1293
if (z) clearTimeout(z);
1299
* @desc: panel mouse over handler
1304
dhtmlXMenuBarObject.prototype._onmouseoverZ=function(e){
1305
if (!e) e=event; e.cancelBubble=true;
1306
that=this.panel.topMenu;
1307
if (this.timeoutop) clearTimeout(this.timeoutop);
1308
that.dropTimers(this.panel);
1309
that._onItemOver(0,this.panel);
1310
// this.timeoutop=setTimeout( new that._delayedTimerCall(this.panel.topMenu,"_onItemOver",0,this.panel),50);
1315
* @desc: panel mouse out handler
1320
dhtmlXMenuBarObject.prototype._onmouseoutZ=function(e){
1321
if (!e) e=event; e.cancelBubble=true;
1322
that=this.panel.topMenu;
1323
if (this.timeoutop) clearTimeout(this.timeoutop);
1325
if ((!that.ieWinMode))
1327
this.timeoutop=setTimeout( new that._delayedTimerCall(this.panel.topMenu,"_onItemOut",0,this.panel),200);
1329
// else that.dropTimers(this.panel);
1333
* @desc: timer routine
1334
* @param: object - called object
1335
* @param: functionName - called function name
1336
* @param: a - function parametr A
1337
* @param: b - function parametr B
1341
dhtmlXMenuBarObject.prototype._delayedTimerCall=function(object,functionName,a,b,time){
1342
this.callFunc=function(){
1345
object[functionName](ax,bx);
1347
return this.callFunc;
1352
* @desc: confirmed mouse out
1353
* @param: item - related menu item
1354
* @param: panel - related menu panel
1358
dhtmlXMenuBarObject.prototype._onItemOut=function(item,panel){
1360
if ((item)&&(!item.subMenu))
1361
this._unMarkItem(item);
1365
if ((panel.topMenu==panel)||((item)&&(this.ieWinModeState==1))) return;
1366
if (item) this._unMarkItem(item);
1367
this._closePanel(panel);
1371
* @desc: confirmed mouse over
1372
* @param: item - related menu item
1373
* @param: panel - related menu panel
1377
dhtmlXMenuBarObject.prototype._onItemOver=function(item,panel){
1379
if ((this.lastSelectedItem)&&(this.lastSelectedItem!=item))
1381
if ((!this.lastSelectedItem.subMenu)||(this.lastSelectedItem.subMenu!=item.parentPanel))
1382
this._unMarkItem(this.lastSelectedItem);
1385
this.lastSelectedItem=item;
1389
// if (item.topNod.className!=item.className+"down") item.topNod.className=item.className+"down";
1390
this._markItem(item,"down");
1394
//if (item.topNod.className!=item.className+"over") item.topNod.className=item.className+"over";
1395
this._markItem(item);
1397
var zp=item.parentPanel;
1398
if ((zp._lastSelectedItem)&&(zp._lastSelectedItem!=item))
1399
if (zp._lastSelectedItem.subMenu)
1400
this._closePanel(zp._lastSelectedItem.subMenu);
1403
item.parentPanel._lastSelectedItem=item;
1405
if (panel) this._openPanel(panel);
1407
this._flag_click=item;
1411
this.loadXMLFor(item.submenu,item.id,function(){
1412
a_that.submenu=null;
1413
if (a_top._flag_click==a_that)
1414
a_top._onItemOver(a_that,a_that.subMenu);
1416
a_that.submenu=null;
1423
* @desc: open menu panel
1424
* @param: panel - related menu panel
1428
dhtmlXMenuBarObject.prototype._openPanel=function(panel){
1430
if ((this.lastOpenedPanel)&&(this.lastOpenedPanel!=panel)&&(this.lastOpenedPanel.parentPanel!=panel)&&(this.lastOpenedPanel!=panel.parentPanel))
1432
this._closePanel(this.lastOpenedPanel);
1435
var z=panel.topNod.timeoutop;
1436
if (z) clearTimeout(z);
1437
if (panel.topNod.style.display=="") return;
1438
if (this.lastOpenedPanel!=panel)
1440
this.lastOpenedPanel=panel;
1441
switch(this.modeValue){
1443
if (panel.topMenu!=panel.parentPanel) {
1444
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
1445
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px"; }
1447
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)+"px";
1448
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetHeight*1-1+"px"; }
1451
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
1452
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px";
1455
if (panel.topMenu!=panel.parentPanel) {
1456
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+"px";
1457
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+panel.parentItem.topNod.offsetHeight*1-1+"px"; }
1459
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
1460
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px"; }
1463
panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetHeight*1-1+"px";
1464
panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)+"px";
1467
if (panel.topNod.parentNode.style.position=="absolute"){
1468
panel.topNod.style.top = parseInt(panel.topNod.style.top) -getAbsoluteTop( panel.topNod.parentNode)+"px";
1469
panel.topNod.style.left = parseInt(panel.topNod.style.left)-getAbsoluteLeft(panel.topNod.parentNode)+"px";
1472
panel.topNod.style.display="";
1473
if (panel.topNod.ieFix)
1475
panel.topNod.ieFix.style.top=panel.topNod.style.top;
1476
panel.topNod.ieFix.style.left=panel.topNod.style.left;
1477
panel.topNod.ieFix.style.width=panel.topNod.offsetWidth+"px";
1478
panel.topNod.ieFix.style.height=panel.topNod.offsetHeight+"px";
1479
panel.topNod.ieFix.style.display="";
1482
if (!this._skipAPP) this._fixPanelPosition(panel);
1485
dhtmlXMenuBarObject.prototype._fixPanelPosition=function(panel,mode){
1487
if (panel.parentPanel){
1488
var xs=document.body.offsetWidth-15+document.body.scrollLeft;
1489
var ys=document.body.offsetHeight-15+document.body.scrollTop;
1490
//now check is panel real visible
1491
if ((panel.topNod.offsetWidth+parseInt(panel.topNod.style.left))>xs)
1494
if (!panel.parentPanel.extraMode){
1496
var z=xs-panel.topNod.offsetWidth;
1498
panel.topNod.style.left=z+"px";
1499
if (panel.topNod.ieFix) panel.topNod.ieFix.style.left=z+"px";
1503
var z=parseInt(panel.topNod.style.left)-panel.topNod.offsetWidth-panel.parentItem.topNod.offsetWidth;
1505
var z2=parseInt(panel.topNod.style.top)+panel.parentItem.topNod.offsetHeight;
1506
panel.topNod.style.top=z2+"px";
1507
if (panel.topNod.ieFix) panel.topNod.ieFix.style.top=z2+"px";
1509
z=xs-panel.topNod.offsetWidth; if (z<0) z=0; }
1510
panel.topNod.style.left=z+"px";
1511
if (panel.topNod.ieFix) panel.topNod.ieFix.style.left=z+"px";
1515
if ((panel.topNod.offsetHeight+parseInt(panel.topNod.style.top))>ys)
1517
//y-overflow overflow
1520
if (panel.parentPanel.extraMode){
1522
var z=ys-panel.topNod.offsetHeight;
1524
panel.topNod.style.top=z+"px";
1525
if (panel.topNod.ieFix) panel.topNod.ieFix.style.top=z+"px";
1529
var z=parseInt(panel.topNod.style.top)-panel.topNod.offsetHeight-panel.parentItem.topNod.offsetHeight;
1531
var z2=parseInt(panel.topNod.style.left)+panel.parentItem.topNod.offsetWidth;
1532
panel.topNod.style.left=z2+"px";
1533
if (panel.topNod.ieFix) panel.topNod.ieFix.style.left=z2+"px";
1535
z=ys-panel.topNod.offsetHeight; if (z<0) z=0; }
1536
panel.topNod.style.top=z+"px";
1537
if (panel.topNod.ieFix) panel.topNod.ieFix.style.top=z+"px";
1544
if ((uf)&&(!mode)) this._fixPanelPosition(panel,1);
1547
* @desc: close menu panel
1548
* @param: panel - related menu panel
1552
dhtmlXMenuBarObject.prototype._closePanel=function(panel){
1554
// if ((this.lastOpenedPanel)&&(!this.lastOpenedPanel.parentPanel.parentPanel)&&(this.lastOpenedPanel!=panel))
1555
// this._closeBottomPanels(panel,1);
1557
if ((this.lastSelectedItem)&&(this.lastSelectedItem.parentPanel==panel)) this._unMarkItem(this.lastSelectedItem);
1558
this._closeBottomPanels(panel);
1559
this._closeTopPanels(panel);
1561
this.lastOpenedPanel="";
1564
dhtmlXMenuBarObject.prototype._closeTopPanels=function(panel){
1565
if ((this.lastSelectedItem)&&(this.lastSelectedItem.parentPanel==panel)) this._unMarkItem(this.lastSelectedItem);
1566
for (var i=0; i<panel.itemsCount; i++)
1568
var zi=panel.items[i];
1569
if ((zi.subMenu)&&(zi.subMenu.topNod.style.display!="none"))
1571
zi.subMenu.topNod.style.display="none";
1572
this._unMarkItem(zi.subMenu.parentItem);
1573
if (zi.subMenu.topNod.ieFix) zi.subMenu.topNod.ieFix.style.display="none"
1574
this._closeTopPanels(zi.subMenu);
1581
* @desc: close parent panels
1582
* @param: panel - related menu panel
1586
dhtmlXMenuBarObject.prototype._closeBottomPanels=function(panel,ieWinMode){
1587
if (panel.parentPanel)
1591
if ((!this.lastSelectedItem)||(this.lastSelectedItem.parentPanel!=panel.parentPanel))
1593
this._closeBottomPanels(panel.parentPanel);
1595
else this.lastOpenedPanel=panel;
1596
panel.topNod.style.display="none";
1597
this._unMarkItem(panel.parentItem);
1598
if (panel.topNod.ieFix) panel.topNod.ieFix.style.display="none"
1603
* @desc: mark node as unselected
1604
* @param: item - menu item object
1608
dhtmlXMenuBarObject.prototype._unMarkItem=function(item){
1609
item.CSSTag.className=item.className;
1610
if (item.CSSImageTag) item.CSSImageTag.className="";
1611
if ((item.childMenuTag.src!="")&&(this.topMenu.echsw)&&(this.topMenu.echsw2))
1612
item.childMenuTag.src=this.topMenu.sysGfxPath+"btn_rt1.gif";
1616
* @desc: mark node as selected
1617
* @param: item - menu item object
1618
* @param: over - css class sufix
1622
dhtmlXMenuBarObject.prototype._markItem=function(item,over){
1624
item.CSSTag.className=item.className+over;
1625
if (item.CSSImageTag) item.CSSImageTag.className=item.className+over+"img";
1627
if ((item.childMenuTag.src!="") &&(this.topMenu.echsw)&&(this.topMenu.echsw2))
1628
item.childMenuTag.src=this.topMenu.sysGfxPath+"btn_rt2.gif";
1633
* @desc: set menu design
1634
* @param: modeValue - name of design
1638
dhtmlXMenuBarObject.prototype.setMenuMode=function(modeValue){
1639
this.modeValue=modeValue;
1642
this.addFirstLevel=this._addItem;
1643
this.addSecondLevel=this.addItem_vertical;
1646
this.addFirstLevel=this._addItem;
1647
this.addSecondLevel=this._addItem;
1650
this.addFirstLevel=this.addItem_vertical;
1651
this.addSecondLevel=this.addItem_vertical;
1654
this.addFirstLevel=this.addItem_vertical;
1655
this.addSecondLevel=this._addItem;
1663
/*------------------------------------------------------------------------------
1665
--------------------------------------------------------------------------------*/
1667
* @desc: vertical divider object
1668
* @param: id - identificator
1672
function dhtmlXMenuDividerYObject(id){
1674
if (id) this.id=id; else this.id=0;
1675
td=document.createElement("td");
1676
this.topNod=td; td.align="center"; td.style.padding="2px 2px 1px 2px";
1677
td.innerHTML="<div class='menuDividerY'> </div>";
1678
if (!document.all) td.childNodes[0].style.height="0px";
1681
dhtmlXMenuDividerYObject.prototype = new dhtmlXButtonPrototypeObject;
1683
/*------------------------------------------------------------------------------
1684
End of vDivider object
1685
--------------------------------------------------------------------------------*/
1687
/*------------------------------------------------------------------------------
1689
--------------------------------------------------------------------------------*/
1691
* @desc: horisontal divider object
1692
* @param: id - identificator
1696
function dhtmlXMenuDividerXObject(id){
1698
if (id) this.id=id; else this.id=0;
1699
td=document.createElement("td");
1700
this.topNod=td; td.align="center"; td.style.paddingRight="2px"; td.style.paddingLeft="2px"; td.width="4px";
1701
td.innerHTML="<div class='menuDivider'></div >";
1702
if (!document.all) { td.childNodes[0].style.width="0px"; td.style.padding="0px 0px 0px 0px"; td.style.margin="0px 0px 0px 0px"; }
1705
dhtmlXMenuDividerXObject.prototype = new dhtmlXButtonPrototypeObject;
1706
/*------------------------------------------------------------------------------
1707
End of hDivider object
1708
--------------------------------------------------------------------------------*/
1709
//(c)dhtmlx ltd. www.dhtmlx.com