source: branches/1.2/workflow/js/jscode/doiMenuDOM.js @ 1349

Revision 1349, 68.5 KB checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1/**
2* Bismillaahirrohmaanirrohiim
3* Dhtml MenuBar DOM
4*
5* @package doiMenu
6* @version 1.5.3
7* @author  Donna Iwan Setiawan
8* @Copyright (C) 2003 - 2004 Donna Iwan Setiawan
9* @ All rights reserved
10* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
11*/
12var _mmObj ='',_aId;
13var _browser=new TBrowser();var _arRegisterMenu=new Array();var _arRegisterMenuIndex=-1;var _arTriggerMenu=new Array();var _arRegisterPopID=new Array();var _arRegisterPopIndex=new Array();var _arRegisterTriggerPopID=new Array();var _arRegisterTriggerPopIndex=new Array();var _arMMClick=new Array();function Initialize()
14{
15var byk=_arRegisterMenuIndex;for(var i=0;i<=byk;i++)
16_arRegisterMenu[i].Init();}
17function InitResize()
18{
19var byk=_arRegisterMenuIndex;for(var i=0;i<=byk;i++)
20_arRegisterMenu[i].Resize();
21}
22function TBrowser()
23{
24this._name='';this._version='';this._os='';}
25var detect=navigator.userAgent.toLowerCase();var total,thestring;if(checkIt('konqueror'))
26{
27_browser._name="Konqueror";_browser._os="Linux";}
28else if(checkIt('safari')) _browser._name="Safari";else if(checkIt('omniweb')) _browser._name="OmniWeb";else if(checkIt('opera')) _browser._name="Opera";else if(checkIt('webtv')) _browser._name="WebTV";else if(checkIt('icab')) _browser._name="iCab";else if(checkIt('msie')) _browser._name="IE";else if(!checkIt('compatible'))
29{
30_browser._name="Netscape";_browser._version=detect.charAt(8);}
31else _browser._name="none";if(_browser._version=='') _browser._version=detect.charAt(place+thestring.length);if(_browser._os=='')
32{
33if(checkIt('linux')) _browser._os="Linux";else if(checkIt('x11')) _browser._os="Unix";else if(checkIt('mac')) _browser._os="Mac";else if(checkIt('win')) _browser._os="Windows";else _browser._os="none";}
34function checkIt(string)
35{
36place=detect.indexOf(string)+1;thestring=string;return place;}
37function TMainMenu(name,direction)
38{
39_arRegisterMenuIndex++;_arRegisterMenu[_arRegisterMenuIndex]=this;_arRegisterPopID[_arRegisterMenuIndex]=new Array();_arRegisterPopIndex[_arRegisterMenuIndex]=-1;_arRegisterTriggerPopID[_arRegisterMenuIndex]=new Array();_arRegisterTriggerPopIndex[_arRegisterMenuIndex]=-1;_arMMClick[_arRegisterMenuIndex]=true;this._popOnClick=false;this._expandIcon=new TExpandIcon();this._expandIcon._create=false;this._registerMenuIndex=_arRegisterMenuIndex;this._uniqueID=0;this._name=name;this._id='_'+name+'ID';this._index=_arRegisterMenuIndex;
40this._correction=new TCorrection();this._parent=null;this._width='auto';this._direction=direction;if(this._direction=='horizontal')
41{
42this._expandIcon._symbol='&#9660;';}
43else
44{
45this._expandIcon._symbol='&#9658;';}
46this._position='relative';this._top=0;this._left=0;this._cellSpacing=0;this._itemHeight='auto';this._itemWidth='auto';this._background=new TBackground();this._background._color='buttonface';this._pop=new TPopParameter();this._pop._mmName=this._name;this._pop._index=this._index;this._shadow=new TShadow();this._font=new TFont();this._font._family='tahoma,verdana,sans-serif,arial';this._font._size='8pt';this._itemIndex=-1;this._items=new Array();this._itemText=new TText();this._itemText._color='black';this._itemBack=new TBackground();this._itemTextHL=new TText();this._itemTextHL._color='white';
47this._itemBackHL=new TBackground();this._itemBackHL._color='#B6BDD2';this._border=new TBorder();this._itemBorder=new TBorder();this._itemBorderHL=new TBorder();this._itemBorderHL._top='1px navy solid';this._itemBorderHL._right='1px navy solid';this._itemBorderHL._bottom='1px navy solid';this._itemBorderHL._left='1px navy solid';this._itemTextClick=new TText();this._itemTextClick._color='white';this._itemBackClick=new TBackground();this._itemBackClick._color='#B6BDD2';this._itemBorderClick=new TBorder();this._itemBorderClick._top='1px navy solid';this._itemBorderClick._right='1px navy solid';this._itemBorderClick._bottom='1px navy solid';this._itemBorderClick._left='1px navy solid';this._hideObject=new THiddenObject();this._pop._header=new TPopHeader();this._header=new TPopHeader();this._header._font._size='6pt';this._type='';this._initialTop=0;this._initialLeft=0;this._headerClickState=false;this._headerText='Click Here';this.SetHeaderText=SetMMHeaderText;this.Add=AddItem;this.Build=BuildMenu;this.BuildStyle=BuildStyle;this.Draw=DrawMenu;this.Init=InitMenu;this.SetExpandIcon=SetExpandIcon;this.SetParent=SetParent;this.SetType=SetMenuType;this.SetPopOnClick=SetPopOnClick;this.SetWidth=SetWidth;this.SetBorder=SetBorder;this.SetBorderTop=SetBorderTop;this.SetBorderRight=SetBorderRight;this.SetBorderBottom=SetBorderBottom;this.SetBorderLeft=SetBorderLeft;this.SetItemDimension=SetItemDimension;this.SetItemBorder=SetItemBorder;this.SetItemBorderTop=SetItemBorderTop;this.SetItemBorderRight=SetItemBorderRight;this.SetItemBorderBottom=SetItemBorderBottom;this.SetItemBorderLeft=SetItemBorderLeft;this.SetItemBorderHL=SetItemBorderHL;this.SetItemBorderTopHL=SetItemBorderTopHL;this.SetItemBorderRightHL=SetItemBorderRightHL;this.SetItemBorderBottomHL=SetItemBorderBottomHL;this.SetItemBorderLeftHL=SetItemBorderLeftHL;this.SetItemBorderClick=SetItemBorderClick;this.SetItemBorderTopClick=SetItemBorderTopClick;this.SetItemBorderRightClick=SetItemBorderRightClick;this.SetItemBorderBottomClick=SetItemBorderBottomClick;this.SetItemBorderLeftClick=SetItemBorderLeftClick;this.SetShadow=SetShadow;this.SetFont=SetFont;this.SetBackground=SetBackground;this.SetDirection=SetDirection;this.SetPosition=SetPosition;this.SetCorrection=SetCorrection;this.SetCellSpacing=SetCellSpacing;this.SetItemText=SetItemText;this.SetItemTextHL=SetItemTextHL;this.SetItemTextClick=SetItemTextClick;this.SetItemBackground=SetItemBackground;this.SetItemBackgroundHL=SetItemBackgroundHL;this.SetItemBackgroundClick=SetItemBackgroundClick;this.Resize=ResizeMenu;}
48function ResizeMenu()
49{
50if(this._shadow._create)
51{
52if(document.all)
53{
54var elm=document.all(this._id);var shadowElm=document.all('sh_'+this._id);}
55else if(document.getElementById)
56{
57var elm=document.getElementById(this._id);var shadowElm=document.getElementById('sh_'+this._id);}
58var posY=findPosY(elm);var posX=findPosX(elm);if(_browser._name=='IE')
59{
60shadowElm.style.width=elm.offsetWidth+10;shadowElm.childNodes[0].style.width=elm.offsetWidth;shadowElm.style.top=posY;shadowElm.style.left=posX;}
61else
62{
63shadowElm.style.width=elm.offsetWidth;shadowElm.style.top=posY+this._shadow._distance;shadowElm.style.left=posX+this._shadow._distance;}
64}
65}
66function SetDirection(dDirection)
67{
68dDirection=dDirection.toLowerCase();switch(dDirection)
69{
70case 'vertical':
71this._direction='vertical';break;default:
72this._direction='horizontal';}
73}
74function SetMMHeaderText(dText)
75{
76this._headerText=dText;}
77function SetMenuType(dType)
78{
79dType=dType.toLowerCase();switch(dType)
80{
81case 'float':
82this._type='float';break;case 'free':
83this._type='free';break;default :
84this._type='';}
85}
86function TPopHeader()
87{
88this._background=new TBackground();this._background._color='black';this._itemText=new TText();this._itemText._weight='bold';this._itemText._color='white';this._font=new TFont();this._font._family='tahoma,verdana,sans-serif,arial';this._font._size='8pt';this.SetBackground=SetBackground;this.SetFont=SetFont;this.SetText=SetItemText;}
89function THiddenObject()
90{
91this._itemIndex=-1;this._items=new Array();this._isHide=false;this._isShow=true;this.Add=AddItem;this.Hide=HideObject;this.Show=ShowObject;this.Clear=ClearObject;}
92function ClearObject()
93{
94if(this._itemIndex >-1)
95{
96var iMax=this._itemIndex+1;for(var i=0;i<iMax;i++)
97{
98delete this._items[i];}
99this._isHide=false;this._itemIndex=-1;}
100}
101function HideObject()
102{
103if(this._itemIndex >-1)
104{
105var iMax=this._itemIndex+1;for(var i=0;i<iMax;i++)
106{
107if(document.all)
108document.all(this._items[i]).style.visibility="hidden";else if(document.getElementById){
109document.getElementById(this._items[i]).style.visibility="hidden";
110document.getElementById(this._items[i]).style.display="none";
111}
112}
113this._isHide=true;}
114}
115function ShowObject()
116{
117if(this._isHide)
118{
119var iMax=this._itemIndex+1;for(var i=0;i<iMax;i++)
120{
121if(document.all)
122document.all(this._items[i]).style.visibility="visible";else if(document.getElementById){
123document.getElementById(this._items[i]).style.visibility="visible";
124document.getElementById(this._items[i]).style.display="";
125}
126}
127}
128}
129function SetPopOnClick(dBool)
130{
131if(dBool)
132{
133this._popOnClick=true;_arMMClick[this._registerMenuIndex]=false;}else
134{
135this._popOnClick=false;_arMMClick[this._registerMenuIndex]=true;}
136}
137function TPopMenu(label,icon,clickType,clickParam,status)
138{
139this._id='';this._parent=null;this._parentPop=null;this._label=label;this._top=0;this._left=0;this._status=status;this._tmpIcon=icon;this._icon="";this._itemIndex=-1;this._items=new Array();switch(clickType)
140{
141case 'function':
142this._eClick=clickParam;break;case 'f':
143this._eClick="onPopItemMOut(event,this,'',_mmObj);"+clickParam; break;case 'address':
144this._eClick="_openURL('"+clickParam+"')";break;case 'a':
145this._eClick="onPopItemMOut(event,this,'',_mmObj);"+"_openURL('"+clickParam+"')";break;default:
146this._eClick='';}
147this._type='';
148this.Add=AddItem;this.Draw=DrawPopMenu;this.Init=InitPopMenu;this.SetType=SetPopType;this.SetParent=SetParent;}
149function SetPopType(dType)
150{
151dType=dType.toLowerCase();switch(dType)
152{
153case 'header':
154this._type='h';break;case 'h':
155this._type='h';break;default:
156this._type='';}
157}
158function TPopParameter()
159{
160this._index=-1;this._mmName='';this._padding='1px 1px 1px 1px';this._separator=new TSeparator();this._expandIcon=new TExpandIcon();this._correction=new TCorrection();this._font=new TFont();this._font._family='tahoma,verdana,sans-serif,arial';this._font._size='8pt';this._alpha=100;this._itemWidth=200;
161this._itemHeight='auto';this._itemBorder=new TBorder();this._itemBorder._top='0px none solid';this._itemBorder._right='0px none solid';this._itemBorder._bottom='0px none solid';this._itemBorder._left='0px none solid';this._itemPadding='1px 1px 1px 1px'    ;this._itemText=new TText();this._itemBack=new TBackground();this._itemBorderHL=new TBorder();this._itemBorderHL._top='1px navy solid';this._itemBorderHL._right='1px navy solid';this._itemBorderHL._bottom='1px navy solid';this._itemBorderHL._left='1px navy solid';this._itemPaddingHL='0px 0px 0px 0px';this._itemTextHL=new TText();this._itemTextHL._color='white';this._itemBackHL=new TBackground();this._itemBackHL._color='#B6BDD2';this._background=new TBackground();this._background._color='whitesmoke';this._border=new TBorder();this._border._top='1px black solid';this._border._right='1px black solid';this._border._bottom='1px black solid';this._border._left='1px black solid';this._shadow=new TShadow();this._header=new TPopHeader();this._timeOut=750;
162this.SetAlpha=SetAlpha;this.SetBorder=SetBorder;this.SetPadding=SetPadding;this.SetPaddings=SetPaddings;this.SetBorderTop=SetBorderTop;this.SetBorderRight=SetBorderRight;this.SetBorderBottom=SetBorderBottom;this.SetBorderLeft=SetBorderLeft;this.SetItemDimension=SetItemDimension;this.SetItemBorder=SetItemBorder;this.SetItemPadding=SetItemPadding;this.SetItemPaddingHL=SetItemPaddingHL;this.SetItemPaddings=SetItemPaddings;this.SetItemPaddingsHL=SetItemPaddingsHL;this.SetItemBorderTop=SetItemBorderTop;this.SetItemBorderRight=SetItemBorderRight;this.SetItemBorderBottom=SetItemBorderBottom;this.SetItemBorderLeft=SetItemBorderLeft;this.SetItemBorderHL=SetItemBorderHL;this.SetItemBorderTopHL=SetItemBorderTopHL;this.SetItemBorderRightHL=SetItemBorderRightHL;this.SetItemBorderBottomHL=SetItemBorderBottomHL;this.SetItemBorderLeftHL=SetItemBorderLeftHL;this.SetShadow=SetShadow;this.SetFont=SetFont;this.SetBackground=SetBackground;this.SetCorrection=SetCorrection;this.SetExpandIcon=SetExpandIcon;this.SetSeparator=SetSeparator;this.SetDelay=SetDelay;this.SetItemText=SetItemText;this.SetItemTextHL=SetItemTextHL;this.SetItemBackground=SetItemBackground;this.SetItemBackgroundHL=SetItemBackgroundHL;}
163function SetAlpha(dAlpha)
164{
165dAlpha=parseInt(dAlpha);this._alpha=dAlpha;}
166function TCorrection()
167{
168this._top=0;this._left=0;}
169function TText()
170{
171this._color='black';this._align='left';this._decoration='none';this._whiteSpace='normal';this._weight='normal';}
172function TShadow()
173{
174this._create=false;this._color='black';this._distance=3;
175}
176function TSeparator()
177{
178this._align='center';
179this._width=200;this._margin="0px 0px 0px 0px";this._border=new TBorder();
180this._border._top='1px black solid';this._border._bottom='1px white solid';}
181function TFont()
182{
183this._family='arial,times,sans-serif';this._size='8pt';}
184function TBackground()
185{
186this._image='none';
187this._repeat='no-repeat';this._color='';this._position='top left';}
188function TExpandIcon()
189{
190this._create=true;this._symbol='&#9658;';this._font=new TFont();this._font._size='6pt';}
191function TBorder()
192{
193this._top='1px gray solid';this._right='1px gray solid';this._bottom='1px gray solid';this._left='1px gray solid';}
194
195function BuildMenu(id)
196{
197var result=this.BuildStyle();
198var level=-1;this.SetParent(this);result+=this.Draw(level++);level++;for(var i=0;i<=this._itemIndex;i++)
199{
200        result+=this._items[i].Draw(level);result+=BuildPopUpMenu(this._items[i],level);}
201        if(is_ie)
202                document.getElementById(id).innerHTML ="&nbsp;";
203        document.getElementById(id).innerHTML += result;
204
205}
206function InitMenu()
207{
208if(document.all)
209var el_menu=document.all(this._id);else if(document.getElementById)
210var el_menu=document.getElementById(this._id);this._position=this._position.toLowerCase();if(this._position=='absolute')
211{
212el_menu.style.top=this._top;el_menu.style.left=this._left;}else
213{
214this._top=findPosY(el_menu);this._left=findPosX(el_menu);}
215el_menu.style.zIndex=100;if((this._type=='free') && (this._position=='absolute'))
216{
217if(document.all)
218var fr_el=document.all('fr_'+this._id);else if(document.getElementById)
219var fr_el=document.getElementById('fr_'+this._id);fr_el.style.top=this._top+'px';fr_el.style.left=this._left+'px';fr_el.style.width=el_menu.offsetWidth;fr_el.style.height=el_menu.offsetHeight;fr_el.style.zIndex=100;}
220if(this._shadow._create)
221{
222if(document.all)
223var sh_el=document.all('sh_'+this._id);else if(document.getElementById)
224var sh_el=document.getElementById('sh_'+this._id);if(_browser._name=='IE')
225{
226sh_el.style.top=this._top+'px';sh_el.style.left=this._left+'px';sh_el.style.width=el_menu.offsetWidth+10+'px';sh_el.style.height=el_menu.offsetHeight+10+'px';sh_el.childNodes[0].style.width=el_menu.offsetWidth+'px';sh_el.childNodes[0].style.height=el_menu.offsetHeight+'px';sh_el.childNodes[0].style.backgroundColor=this._shadow._color;sh_el.style.visibility='visible';}
227else
228{
229if(_browser._name=='Konqueror' && this._position=='relative')
230sh_el.style.visibility='hidden';else
231{
232sh_el.style.top=this._top+this._shadow._distance+'px';sh_el.style.left=this._left+this._shadow._distance+'px';sh_el.style.width=el_menu.offsetWidth+'px';sh_el.style.height=el_menu.offsetHeight+'px';sh_el.style.backgroundColor=this._shadow._color;sh_el.style.visibility='visible';}
233}
234sh_el.style.zIndex=0;}
235for(var i=0;i<=this._itemIndex;i++)
236{
237if(document.all)
238var el_menuitem=document.all('pr_'+this._items[i]._id);else if(document.getElementById)
239var el_menuitem=document.getElementById('pr_'+this._items[i]._id);if(this._items[i]._itemIndex >-1)
240{
241if(document.all)
242var el_pop=document.all(this._items[i]._id);else if(document.getElementById)
243var el_pop=document.getElementById(this._items[i]._id);el_pop.style.zIndex=102;if(this._items[i]._parent._pop._shadow._create)
244{
245if(document.all)
246var sh_el_pop=document.all('sh_'+this._items[i]._id);else if(document.getElementById)
247var sh_el_pop=document.getElementById('sh_'+this._items[i]._id);if(_browser._name=='IE')
248{
249sh_el_pop.style.width=el_pop.offsetWidth+10+'px';sh_el_pop.style.height=el_pop.offsetHeight+10+'px';sh_el_pop.childNodes[0].style.width=el_pop.offsetWidth+'px';sh_el_pop.childNodes[0].style.height=el_pop.offsetHeight+'px';sh_el_pop.childNodes[0].style.backgroundColor=this._items[i]._parent._pop._shadow._color;}
250else
251{
252sh_el_pop.style.width=el_pop.offsetWidth+'px';sh_el_pop.style.height=el_pop.offsetHeight+'px';sh_el_pop.style.backgroundColor=this._items[i]._parent._pop._shadow._color;}
253sh_el_pop.style.zIndex=101;}
254this._items[i].Init(102);}
255}
256el_menu.style.visibility="visible";
257el_menu.style.display="";
258if((this._type=='float') && (this._position=='absolute'))
259{
260this._initialTop=this._top;this._initialLeft=this._left;_floatingMMEffect(this);}
261}
262function SetParent(parent)
263{
264for(var i=0;i<=this._itemIndex;i++)
265{
266this._items[i]._parent=parent;this._items[i]._parentPop=this;this._items[i]._id='_'+parent._name+'-'+parent._uniqueID+"ID";var iIcon=parseInt(this._items[i]._tmpIcon);if((iIcon > 0))
267{
268this._items[i]._icon='<td nowrap style="cursor:pointer;cursor:hand;padding-left:'+iIcon+'px;">';}
269else
270{
271switch(this._items[i]._tmpIcon)
272{
273case "":
274this._items[i]._icon='<td nowrap style="padding-left:24px;">';break;case '0':
275this._items[i]._icon='<td nowrap>';break;default:
276this._items[i]._icon='<td style="cursor:pointer;cursor:hand" nowrap class="TIcon'+this._items[i]._parent._index+'"><img class="TIcon'+this._items[i]._parent._index+'" src="'+this._items[i]._tmpIcon+'" /></td><td style="cursor:pointer;cursor:hand" nowrap>';}
277}
278parent._uniqueID++;this._items[i].SetParent(parent);}
279}
280function DrawMenu(level)
281{
282var result="";if(this._shadow._create)
283{
284if(_browser._name=='IE')
285result+='<div style="position:absolute;display:none;filter: blur( direction=135, strength='+this._shadow._distance+', add=1);" id="sh_'+this._id+'" align="left"><div></div></div>';else
286result+='<div style="position:absolute;display:none;" id="sh_'+this._id+'"></div>';}
287if((this._type=='free') && (this._position=='absolute'))
288{
289result+='<table class="TMenu'+this._index+'" id="fr_'+this._id+'"';result+=' cellspacing="'+this._cellSpacing+'" style="cursor:pointer;cursor:hand;position:absolute;display:none;">';result+='<tr><td nowrap class="TMMHeader'+this._index+'"';result+=' onclick="onMMHeaderClick(event,'+this._name+')"';result+='>'+this._headerText+'</td></tr>';result+='<tr><td nowrap> </td></tr>';result+='</table>';}
290result+='<table class="TMenu'+this._index+'" id="'+this._id+'"';result+=' cellspacing="'+this._cellSpacing+'">';if(this._direction=='horizontal')
291{
292if(this._itemIndex >-1)
293{
294if((this._type=='free') && (this._position=='absolute'))
295{
296var colSpan=this._itemIndex+1;result+='<tr><td nowrap  colspan="'+colSpan+'" class="TMMHeader'+this._index+'"';result+=' onclick="onMMHeaderClick(event,'+this._name+')">'+this._headerText+'</td></tr>';}
297}
298result+='<tr>';}
299else
300{
301if((this._type=='free') && (this._position=='absolute'))
302{
303result+='<td nowrap  class="TMMHeader'+this._index+'"';result+=' onclick="onMMHeaderClick(event,'+this._name+')">'+this._headerText+'</td>';}
304}
305if(this._itemIndex >-1)
306{
307var isExpandIcon=false;for(var i=0;i<=this._itemIndex;i++)
308{
309var result1='';var expandHTML='';result1+='<td nowrap class="TMenuItem'+this._index+'" id="pr_'+this._items[i]._id+'"';if(this._items[i]._itemIndex >-1)
310{
311result1+=' onclick="onMainMOver(event,this,\''+this._items[i]._id+'\','+level+','+this._name+',\''+escape(this._items[i]._status)+'\',true)" onmouseover="onMainMOver(event,this,\''+this._items[i]._id+'\','+level+','+this._name+',\''+escape(this._items[i]._status)+'\')"';if(this._popOnClick)
312result1+='onclick="onMainClick(event,this,\''+this._items[i]._id+'\','+this._name+')"';result1+=' onmouseout="onMainMOut(event,this,\''+this._items[i]._id+'\','+this._name+')"';if(this._items[i]._parent._expandIcon._create)
313{
314//expandHTML='<td nowrap  class="TMMExpand'+this._items[i]._parent._index+'">'+this._items[i]._parent._expandIcon._symbol+'</td>';isExpandIcon=true;
315}
316}
317else
318{
319result1+=' onmouseover="onMainMOver(event,this,\'\','+level+','+this._name+',\''+escape(this._items[i]._status)+'\')"';result1+=' onmouseout="onMainMOut(event,this,\'\','+this._name+')"';result1+=' onclick="onMainMOut(event,this,\'\','+this._name+');'+this._items[i]._eClick+'"';}
320var iIcon=parseInt(this._items[i]._tmpIcon);if((iIcon > 0))
321{
322this._items[i]._icon='<td nowrap  style="padding-left:'+iIcon+'px;">';}
323else
324{
325switch(this._items[i]._tmpIcon)
326{
327case "":
328if(isExpandIcon && expandHTML=='')
329this._items[i]._icon='<td nowrap  style="padding-left:30px;padding-right:16px">';else
330this._items[i]._icon='<td nowrap  style="padding-left:30px">';break;case '0':
331if(isExpandIcon && expandHTML=='')
332this._items[i]._icon='<td nowrap   style="padding-right:16px">';else
333this._items[i]._icon='<td nowrap >';break;default:
334if(isExpandIcon && expandHTML=='')
335this._items[i]._icon='<td nowrap  class="TIcon'+this._items[i]._parent._index+'"><img class="TIcon'+this._items[i]._parent._index+'" src="'+this._items[i]._tmpIcon+'"  /></td><td nowrap   style="padding-right:16px">';else
336this._items[i]._icon='<td nowrap  class="TIcon'+this._items[i]._parent._index+'"><img class="TIcon'+this._items[i]._parent._index+'" src="'+this._items[i]._tmpIcon+'"  /></td><td nowrap >';}
337}
338result1+='><table class="TMenuItemChild'+this._index+'"><tr>'+this._items[i]._icon+this._items[i]._label+'</td>';result1+=expandHTML+'</tr></table></td>';if(this._direction=='horizontal')
339result+=result1;else
340result+='<tr>'+result1+'</tr>';}
341}
342else
343{
344var result1='';result1+='';if(this._direction=='horizontal')
345result+=result1;else
346result+='<tr>'+result1+'</tr>';}
347if(this._direction=='horizontal')
348result+='</tr>';result+='</table>';return result;}
349function DrawPopMenu(level)
350{
351var result="";if(this._itemIndex >-1)
352{
353if(this._parent._pop._shadow._create)
354{
355if(_browser._name=='IE')
356result+='<div style="position:absolute;visibility:hidden;filter: blur( direction=135, strength='+this._parent._pop._shadow._distance+', add=1);" id="sh_'+this._id+'" align="left"><div  onmouseout="hideAll('+this._parent._name+')"></div></div>';else
357result+='<div style="position:absolute;visibility:hidden;" id="sh_'+this._id+'" align="left"></div>';}
358if(is_ie)
359{
360        var lineHeight = this._items.length*26;
361        var lineWidth = this._itemWidth * 1.074;
362        if(lineHeight > 200)
363                lineHeight = 200;
364        sizeMenu="display:none;height:"+lineHeight+"px;overflow-x:hidden;overflow-y:auto;width:" + lineWidth + "px;";
365}
366else
367        sizeMenu="display:none;max-height:50%;overflow:auto;width:" + this._itemWidth +"px;";
368
369result+='<div class="TPopUp'+this._parent._index+'" id="'+this._id+'" style='+sizeMenu+'"background:#FFFFFF;filter:alpha(opacity='+this._parent._pop._alpha+');">';for(var i=0;i<=this._itemIndex;i++)
370{
371if(this._items[i]._label !='-')
372{
373if(this._items[i]._itemIndex >-1)
374{
375result+='<div style="border-right:1px solid #FFFFFF;width:91%" class="TPopUpItem'+this._items[i]._parent._index+'" id="di_'+this._items[i]._id+'">';
376result+='<table border=0 class="TPopUpItem'+this._items[i]._parent._index+'" cellspacing="0" cellpadding="2"';
377result+=' onmouseover="onPopItemMOver(event,this,\''+this._items[i]._id+'\','+level+','+this._items[i]._parent._name+',\''+this._items[i]._status+'\')"';
378result+=' onmouseout="onPopItemMOut(event,this,\''+this._items[i]._id+'\','+this._items[i]._parent._name+')"';
379result+=' id="pr_'+this._items[i]._id+'"><tr>'+this._items[i]._icon+this._items[i]._label+'</td>';
380if(this._items[i]._parent._pop._expandIcon._create)
381        result+='<td nowrap  class="TExpand'+this._items[i]._parent._index+'">'+this._items[i]._parent._pop._expandIcon._symbol;
382
383result+='</tr></table>';result+='</div>';
384}
385else
386{
387if(this._items[i]._type=='h')
388{
389result+='<div class="TPopUpHeader'+this._items[i]._parent._index+'">';result+='<table class="TPopUpHeader'+this._items[i]._parent._index+'" cellspacing="0" cellpadding="2"';result+=' onmouseover="onStaticPopItemMOver(event,'+this._items[i]._parent._name+',\''+this._items[i]._status+'\')"';result+=' onmouseout="onStaticPopItemMOut(event,'+this._items[i]._parent._name+',\''+this._items[i]._status+'\')"';result+='><tr><td nowrap >'+this._items[i]._label;result+='</td></tr></table></div>';
390}else
391{
392result+='<div style="border-right:1px solid #FFFFFF;width:91%" class="TPopUpItem'+this._items[i]._parent._index+'">';
393result+='<table border=0 class="TPopUpItem'+this._items[i]._parent._index+'" cellspacing="0" cellpadding="0" ';
394result+=' onmouseover="onPopItemMOver(event,this,\'\','+level+','+this._items[i]._parent._name+',\''+this._items[i]._status+'\')"';
395result+=' onmouseout="onPopItemMOut(event,this,\'\','+this._items[i]._parent._name+')"';
396result+=' onclick="hideAll('+this._items[i]._parent._name+');'+this._items[i]._eClick+'"';result+='><tr>'+this._items[i]._icon+this._items[i]._label+'</td>';
397//result+='<td nowrap  class="TExpand'+this._items[i]._parent._index+'">';
398result+='</tr></table>';result+='</div>';}
399}
400}
401else
402{
403if(_browser._name=='IE')
404result+='<div style="margin-right:-2px;padding:4px 0px 4px 0px;background-color:'+this._parent._pop._itemBack._color+';" ';else
405result+='<div style="margin-right:0px;padding:4px 0px 4px 0px;background-color:'+this._parent._pop._itemBack._color+';" ';
406result+=' onmouseover="onStaticPopItemMOver(event,'+this._parent._name+',\'\')"';result+=' onmouseout="onStaticPopItemMOut(event,'+this._parent._name+',\'\')"';
407result+=' ><div class="TSeparator'+this._parent._index+'" ';result+='></div></div>';}
408}
409result+='</div>';}
410return result;}
411function AddItem(popMenu)
412{
413this._itemIndex++;this._items[this._itemIndex]=popMenu;}
414function InitPopMenu(zIndex)
415{
416if(this._itemIndex >-1)
417{
418for(var i=0;i<=this._itemIndex;i++)
419{
420if(this._items[i]._itemIndex >-1)
421{
422if(document.all)
423{
424var pr_el=document.all('pr_'+this._items[i]._id);var el=document.all(this._items[i]._id);}
425else if(document.getElementById)
426{
427var pr_el=document.getElementById('pr_'+this._items[i]._id);var el=document.getElementById(this._items[i]._id);}
428zIndex++;el.style.zIndex=zIndex+1;if(this._items[i]._parent._pop._shadow._create)
429{
430if(document.all)
431var sh_el=document.all('sh_'+this._items[i]._id);else if(document.getElementById)
432var sh_el=document.getElementById('sh_'+this._items[i]._id);if(_browser._name=='IE')
433{
434sh_el.style.width=el.offsetWidth+10+'px';sh_el.style.height=el.offsetHeight+10+'px';sh_el.childNodes[0].style.width=el.offsetWidth+'px';sh_el.childNodes[0].style.height=el.offsetHeight+'px';sh_el.childNodes[0].style.backgroundColor=this._items[i]._parent._pop._shadow._color;}
435else
436{
437sh_el.style.width=el.offsetWidth ;sh_el.style.height=el.offsetHeight;sh_el.style.backgroundColor=this._items[i]._parent._pop._shadow._color;}
438sh_el.style.zIndex=zIndex;}
439this._items[i].Init(zIndex+1);}
440}
441}
442}
443function BuildPopUpMenu(popMenu,level)
444{
445var result="";level++;for(var i=0;i<=popMenu._itemIndex;i++)
446{
447result+=popMenu._items[i].Draw(level);result+=BuildPopUpMenu(popMenu._items[i],level);}
448return result;}
449function BuildStyle()
450{
451var result='';var tyH;var tyW;result+='<style type="text/css">';result+='table.TMenu'+this._index+'{';result+='cursor:pointer;cursor:hand';result+=';visibility:hidden';result+=';position:'+this._position;tyW=typeof(this._width);if(tyW=='string')
452{
453this._width=this._width.toLowerCase();if(this._width !='auto' || this._width !='')
454result+=';width:'+this._width+'px';}
455else
456result+=';width:'+this._width+'px';
457result+=';border-top:'+this._border._top;result+=';border-right:'+this._border._right;result+=';border-bottom:'+this._border._bottom;result+=';border-left:'+this._border._left;result+=';background-color:'+this._background._color;result+=';background-image:'+this._background._image;result+=';background-position:'+this._background._position;result+=';background-repeat:'+this._background._repeat;result+=';}';result+='table.TMenuItemChild'+this._index+'{';result+='width:100%';result+=';font-family:'+this._font._family;result+=';font-size:'+this._font._size;result+=';cursor:pointer;cursor:hand;font-weight:'+this._itemText._weight;result+=';text-align:'+this._itemText._align;result+=';color:'+this._itemText._color;result+=';text-decoration:'+this._itemText._decoration;result+=';white-space:'+this._itemText._whiteSpace;result+=';}';
458result+='td.TMenuItem'+this._index+'{';result+='padding: 0px 0px 0px 0px';tyH=typeof(this._itemHeight);tyW=typeof(this._itemWidth);if(tyH=='string')
459{
460if(this._itemHeight.toLowerCase() !='auto' || this._itemHeight !='')
461result+=';height:'+this._itemHeight+'px';}
462else
463result+=';height:'+this._itemHeight+'px';if(tyW=='string')
464{
465if(this._itemWidth.toLowerCase() !='auto' || this._itemWidth !='')
466result+=';width:'+this._itemWidth+'px';
467}
468else;
469//result+=';width:'+this._itemWidth+'px';
470result+=';border-top:'+this._itemBorder._top;result+=';border-right:'+this._itemBorder._right;result+=';border-bottom:'+this._itemBorder._bottom;result+=';border-left:'+this._itemBorder._left;result+=';background-color:'+this._itemBack._color;result+=';background-repeat:'+this._itemBack._repeat;result+=';background-image:'+this._itemBack._image;result+=';background-position:'+this._itemBack._position;result+=';}';result+='td.TMMExpand'+this._index+'{';result+='width:10px';result+=';text-align:right';result+=';padding-right:2px';result+=';font-family:'+this._expandIcon._font._family;result+=';font-size:'+this._expandIcon._font._size;result+=';font-weight:normal';result+=';text-decoration:none !important';result+=';white-space:nowrap !important';result+=';}';result+='td.TMMHeader'+this._index+'{';result+='height:1px';result+=';cursor:pointer;cursor:hand;background-color:'+this._header._background._color;result+=';background-image:'+this._header._background._image;result+=';background-position:'+this._header._background._position;result+=';background-repeat:'+this._header._background._repeat;result+=';text-align:'+this._header._itemText._align;result+=';text-decoration:'+this._header._itemText._decoration;result+=';white-space:'+this._header._itemText._whiteSpace;result+=';font-weight:'+this._header._itemText._weight;result+=';font-family:'+this._header._font._family;result+=';font-size:'+this._header._font._size;result+=';color:'+this._header._itemText._color;result+=';}';result+='div.TPopUp'+this._index+'{';result+='position:absolute';result+=';padding:'+this._pop._padding;result+=';display:none';result+=';width:'+this._pop._itemWidth+'px';result+=';border-top:'+this._pop._border._top;result+=';border-right:'+this._pop._border._right;result+=';border-bottom:'+this._pop._border._bottom;result+=';border-left:'+this._pop._border._left;result+=';background-color:'+this._pop._background._color;result+=';background-image:'+this._pop._background._image;result+=';background-position:'+this._pop._background._position;result+=';background-repeat:'+this._pop._background._repeat;result+=';display:block';result+=';}';result+='table.TPopUpHeader'+this._index+'{';result+='width:100%';result+=';cursor:default';result+=';height:'+this._pop._itemHeight+'px';result+=';text-align:'+this._pop._header._itemText._align;result+=';text-decoration:'+this._pop._header._itemText._decoration;result+=';white-space:'+this._pop._header._itemText._whiteSpace;result+=';font-weight:'+this._pop._header._itemText._weight;result+=';font-family:'+this._pop._header._font._family;result+=';font-size:'+this._pop._header._font._size;result+=';color:'+this._pop._header._itemText._color;result+=';}';result+='div.TPopUpHeader'+this._index+'{';result+=';background-color:'+this._pop._header._background._color;result+=';background-image:'+this._pop._header._background._image;result+=';background-position:'+this._pop._header._background._position;result+=';background-repeat:'+this._pop._header._background._repeat;if(_browser._name=='IE')
471result+=';margin-right:-2px';result+=';}';result+='table.TPopUpItem'+this._index+'{';result+='width:100%';result+=';height:'+this._pop._itemHeight+'px';result+=';cursor:default';result+=';font-family:'+this._pop._font._family;result+=';font-size:'+this._pop._font._size;result+=';color:'+this._pop._itemText._color;result+=';text-align:'+this._pop._itemText._align;result+=';text-decoration:'+this._pop._itemText._decoration;result+=';white-space:'+this._pop._itemText._whiteSpace;result+=';font-weight:'+this._pop._itemText._weight;result+=';}';result+='div.TPopUpItem'+this._index+'{';result+='cursor:pointer;cursor:hand';result+=';background-color:'+this._pop._itemBack._color;result+=';background-image:'+this._pop._itemBack._image;result+=';background-position:'+this._pop._itemBack._position;result+=';background-repeat:'+this._pop._itemBack._repeat;result+=';border-top:'+this._pop._itemBorder._top;result+=';border-right:'+this._pop._itemBorder._right;result+=';border-bottom:'+this._pop._itemBorder._bottom;result+=';border-left:'+this._pop._itemBorder._left;result+=';padding:'+this._pop._itemPadding;result+=';}';result+='div.TPopUpItem'+this._index+'_1{';result+='cursor:default';result+=';background-color :'+this._pop._itemBackHL._color;result+=';background-image:'+this._pop._itemBackHL._image;result+=';background-position:'+this._pop._itemBackHL._position;result+=';background-repeat:'+this._pop._itemBackHL._repeat;result+=';border-top:'+this._pop._itemBorderHL._top;result+=';border-right:'+this._pop._itemBorderHL._right;result+=';border-bottom:'+this._pop._itemBorderHL._bottom;result+=';border-left:'+this._pop._itemBorderHL._left;result+=';padding:'+this._pop._itemPaddingHL;result+=';}';this._pop._separator._width=((this._pop._itemWidth-this._pop._separator._width) < 0)?this._pop._itemWidth:this._pop._separator._width;var _div=Math.floor((this._pop._itemWidth-this._pop._separator._width)/2);switch(this._pop._separator._align)
472{
473case 'left':
474this._pop._separator._margin='0px '+(_div*2)+'px 0px 0px';break;case 'right':
475this._pop._separator._margin='0px 0px 0px '+(_div*2)+'px';break;default:
476this._pop._separator._margin='0px '+_div+'px 0px '+_div+'px';}
477result+='div.TSeparator'+this._index+'{';result+='margin:'+this._pop._separator._margin;result+=';border-top:'+this._pop._separator._border._top;result+=';border-bottom:'+this._pop._separator._border._bottom;result+=';}';result+='td.TExpand'+this._index+'{';result+='width:10px';result+=';text-align:right';result+=';padding-right:2px';result+=';font-family:'+this._pop._expandIcon._font._family;result+=';font-size:'+this._pop._expandIcon._font._size;result+=';font-weight:normal';result+=';text-decoration:none !important';result+=';white-space:nowrap !important';result+=';}';result+='td.TIcon'+this._index+'{';result+='width:24px';result+=';text-align:left';result+=';text-decoration:normal';result+=';white-space:nowrap';result+=';font-weight:normal';result+=';}';result+='img.TIcon'+this._index+'{';result+='vertical-align:middle';result+=';}';result+='</style>';return result;}
478function SetCorrection(dLeft,dTop)
479{
480dLeft=parseInt(dLeft);if(!dLeft)
481this._correction._left=0;else
482this._correction._left=dLeft;dTop=parseInt(dTop);if(!dTop)
483this._correction._top=0;else
484this._correction._top=dTop;}
485function SetPosition(dPosition,dLeft,dTop)
486{
487switch(dPosition)
488{
489case 'absolute':
490this._position=dPosition;break;default:
491this._position='relative';}
492dLeft=parseInt(dLeft);if(!dLeft)
493this._left=0;else
494this._left=dLeft;dTop=parseInt(dTop);if(!dTop)
495this._top=0;else
496this._top=dTop;}
497function SetCellSpacing(dSpace)
498{
499dSpace=parseInt(dSpace);if(!dSpace)
500this._cellSpacing=0;else
501this._cellSpacing=dSpace;}
502function SetWidth(dWidth)
503{
504dWidth=parseInt(dWidth);if(!dWidth)
505this._width='auto';else
506this._width=dWidth;}
507function SetItemDimension(dWidth,dHeight)
508{
509dWidth=parseInt(dWidth);dHeight=parseInt(dHeight);if(!dWidth)
510this._itemWidth='auto';else
511this._itemWidth=dWidth;if(!dHeight)
512this._itemHeight='auto';else
513this._itemHeight=dHeight;}
514function SetBackground(dColor,dImage,dRepeat,dPos)
515{
516(dColor=='')?this._background._color='transparent':this._background._color=dColor;(dImage=='')?this._background._image='none':this._background._image="url('"+dImage+"')";(dRepeat=='')?this._background._repeat='no-repeat':this._background._repeat=dRepeat;(dPos=='')?this._background._position='top left':this._background._position=dPos;}
517function SetItemBackground(dColor,dImage,dRepeat,dPos)
518{
519(dColor=='')?this._itemBack._color='transparent':this._itemBack._color=dColor;(dImage=='')?this._itemBack._image='none':this._itemBack._image="url('"+dImage+"')";(dRepeat=='')?this._itemBack._repeat='no-repeat':this._itemBack._repeat=dRepeat;(dPos=='')?this._itemBack._position='top left':this._itemBack._position=dPos;}
520function SetItemBackgroundHL(dColor,dImage,dRepeat,dPos)
521{
522(dColor=='')?this._itemBackHL._color='transparent':this._itemBackHL._color=dColor;(dImage=='')?this._itemBackHL._image='none':this._itemBackHL._image="url('"+dImage+"')";(dRepeat=='')?this._itemBackHL._repeat='no-repeat':this._itemBackHL._repeat=dRepeat;(dPos=='')?this._itemBackHL._position='top left':this._itemBackHL._position=dPos;}
523function SetItemBackgroundClick(dColor,dImage,dRepeat,dPos)
524{
525(dColor=='')?this._itemBackClick._color='transparent':this._itemBackClick._color=dColor;(dImage=='')?this._itemBackClick._image='none':this._itemBackClick._image="url('"+dImage+"')";(dRepeat=='')?this._itemBackClick._repeat='no-repeat':this._itemBackClick._repeat=dRepeat;(dPos=='')?this._itemBackClick._position='top left':this._itemBackClick._position=dPos;}
526function SetShadow(dCreate,dColor,dDistance)
527{
528if(dCreate)
529{
530this._shadow._create=dCreate;this._shadow._color=dColor;this._shadow._distance=dDistance;}
531}
532function SetFont(dFamily,dSize)
533{
534this._font._family=dFamily;this._font._size=dSize;}
535function SetBorder(dSize,dColor,dType)
536{
537var dBorder=dSize+'px '+dColor+' '+dType;this._border._top=dBorder;this._border._right=dBorder;this._border._bottom=dBorder;this._border._left=dBorder;}
538function SetItemBorder(dSize,dColor,dType)
539{
540dSize=parseInt(dSize);if(!dSize)
541dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorder._top=dBorder;this._itemBorder._right=dBorder;this._itemBorder._bottom=dBorder;this._itemBorder._left=dBorder;}
542function SetItemBorderHL(dSize,dColor,dType)
543{
544dSize=parseInt(dSize);if(!dSize)
545dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderHL._top=dBorder;this._itemBorderHL._right=dBorder;this._itemBorderHL._bottom=dBorder;this._itemBorderHL._left=dBorder;}
546function SetItemBorderClick(dSize,dColor,dType)
547{
548dSize=parseInt(dSize);if(!dSize)
549dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderClick._top=dBorder;this._itemBorderClick._right=dBorder;this._itemBorderClick._bottom=dBorder;this._itemBorderClick._left=dBorder;}
550function SetBorderTop(dSize,dColor,dType)
551{
552dSize=parseInt(dSize);if(!dSize)
553dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._border._top=dBorder;}
554function SetItemBorderTop(dSize,dColor,dType)
555{
556dSize=parseInt(dSize);if(!dSize)
557dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorder._top=dBorder;}
558function SetItemBorderTopHL(dSize,dColor,dType)
559{
560dSize=parseInt(dSize);if(!dSize)
561dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderHL._top=dBorder;}
562function SetItemBorderTopClick(dSize,dColor,dType)
563{
564dSize=parseInt(dSize);if(!dSize)
565dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderClick._top=dBorder;}
566function SetBorderRight(dSize,dColor,dType)
567{
568dSize=parseInt(dSize);if(!dSize)
569dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._border._right=dBorder;}
570function SetItemBorderRight(dSize,dColor,dType)
571{
572dSize=parseInt(dSize);if(!dSize)
573dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorder._right=dBorder;}
574function SetItemBorderRightHL(dSize,dColor,dType)
575{
576dSize=parseInt(dSize);if(!dSize)
577dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderHL._right=dBorder;}
578function SetItemBorderRightClick(dSize,dColor,dType)
579{
580dSize=parseInt(dSize);if(!dSize)
581dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderClick._right=dBorder;}
582function SetBorderBottom(dSize,dColor,dType)
583{
584dSize=parseInt(dSize);if(!dSize)
585dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._border._bottom=dBorder;}
586function SetItemBorderBottom(dSize,dColor,dType)
587{
588dSize=parseInt(dSize);if(!dSize)
589dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorder._bottom=dBorder;}
590function SetItemBorderBottomHL(dSize,dColor,dType)
591{
592dSize=parseInt(dSize);if(!dSize)
593dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderHL._bottom=dBorder;}
594function SetItemBorderBottomClick(dSize,dColor,dType)
595{
596dSize=parseInt(dSize);if(!dSize)
597dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderClick._bottom=dBorder;}
598function SetBorderLeft(dSize,dColor,dType)
599{
600dSize=parseInt(dSize);if(!dSize)
601dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._border._left=dBorder;}
602function SetItemBorderLeft(dSize,dColor,dType)
603{
604dSize=parseInt(dSize);if(!dSize)
605dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorder._left=dBorder;}
606function SetItemBorderLeftHL(dSize,dColor,dType)
607{
608dSize=parseInt(dSize);if(!dSize)
609dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderHL._left=dBorder;}
610function SetItemBorderLeftClick(dSize,dColor,dType)
611{
612dSize=parseInt(dSize);if(!dSize)
613dSize=0;var dBorder=dSize+'px '+dColor+' '+dType;this._itemBorderClick._left=dBorder;}
614function SetItemText(dColor,dAlign,dWeight,dDecoration,dWSpace)
615{
616this._itemText._color=dColor;(dAlign=='')?this._itemText._align='left':this._itemText._align=dAlign;(dWeight=='')?this._itemText._weight='normal':this._itemText._weight=dWeight;(dDecoration=='')?this._itemText._decoration='none':this._itemText._decoration=dDecoration;(dWSpace=='')?this._itemText._whiteSpace='normal':this._itemText._whiteSpace=dWSpace;}
617function SetItemTextHL(dColor,dAlign,dWeight,dDecoration,dWSpace)
618{
619this._itemTextHL._color=dColor;(dAlign=='')?this._itemTextHL._align='left':this._itemTextHL._align=dAlign;(dWeight=='')?this._itemTextHL._weight='normal':this._itemTextHL._weight=dWeight;(dDecoration=='')?this._itemTextHL._decoration='none':this._itemTextHL._decoration=dDecoration;(dWSpace=='')?this._itemTextHL._whiteSpace='normal':this._itemTextHL._whiteSpace=dWSpace;}
620function SetItemTextClick(dColor,dAlign,dWeight,dDecoration,dWSpace)
621{
622this._itemTextClick._color=dColor;(dAlign=='')?this._itemTextClick._align='left':this._itemTextClick._align=dAlign;(dWeight=='')?this._itemTextClick._weight='normal':this._itemTextClick._weight=dWeight;(dDecoration=='')?this._itemTextClick._decoration='none':this._itemTextClick._decoration=dDecoration;(dWSpace=='')?this._itemTextClick._whiteSpace='normal':this._itemTextClick._whiteSpace=dWSpace;}
623function SetPaddings(dSize)
624{
625dSize=parseInt(dSize);if(!dSize)
626dSize=0;var dPad=dSize+'px '+dSize+'px '+dSize+'px '+dSize+'px';this._padding=dPad;}
627function SetItemPaddingsHL(dSize)
628{
629dSize=parseInt(dSize);if(!dSize)
630dSize=0;var dPad=dSize+'px '+dSize+'px '+dSize+'px '+dSize+'px';this._itemPaddingHL=dPad;}
631function SetItemPaddings(dSize)
632{
633dSize=parseInt(dSize);if(!dSize)
634dSize=0;var dPad=dSize+'px '+dSize+'px '+dSize+'px '+dSize+'px';this._itemPadding=dPad;}
635function SetPadding(dTop,dRight,dBottom,dLeft)
636{
637dTop=parseInt(dTop);dRight=parseInt(dRight);dBottom=parseInt(dBottom);dLeft=parseInt(dLeft);if(!dTop) dTop=0;if(!dRight) dRight=0;if(!dBottom) dBottom=0;if(!dLeft) dLeft=0;var dPad=dTop+'px '+dRight+'px '+dBottom+'px '+dLeft+'px';this._padding=dPad;}
638function SetItemPaddingHL(dTop,dRight,dBottom,dLeft)
639{
640dTop=parseInt(dTop);dRight=parseInt(dRight);dBottom=parseInt(dBottom);dLeft=parseInt(dLeft);if(!dTop) dTop=0;if(!dRight) dRight=0;if(!dBottom) dBottom=0;if(!dLeft) dLeft=0;var dPad=dTop+'px '+dRight+'px '+dBottom+'px '+dLeft+'px';this._itemPaddingHL=dPad;}
641function SetItemPadding(dTop,dRight,dBottom,dLeft)
642{
643dTop=parseInt(dTop);dRight=parseInt(dRight);dBottom=parseInt(dBottom);dLeft=parseInt(dLeft);if(!dTop) dTop=0;if(!dRight) dRight=0;if(!dBottom) dBottom=0;if(!dLeft) dLeft=0;var dPad=dTop+'px '+dRight+'px '+dBottom+'px '+dLeft+'px';this._itemPadding=dPad;}
644function SetSeparator(dWidth,dAlign,dColor1,dColor2)
645{
646dWidth=parseInt(dWidth);if(!dWidth)
647dWidth='auto';this._separator._width=dWidth;this._separator._align=dAlign;this._separator._border._top='1px '+dColor1+' solid';(dColor2=='')?this._separator._border._bottom='0px none solid':this._separator._border._bottom='1px '+dColor2+' solid';}
648function SetExpandIcon(dCreate,dSymbol,dSize)
649{
650if(dCreate)
651{
652this._expandIcon._create=true;switch(dSymbol)
653{
654case '' :
655break;default:
656this._expandIcon._symbol=dSymbol;}
657dSize=parseInt(dSize);if(!dSize)
658dSize=6;this._expandIcon._font._size=dSize+'pt';}
659else
660this._expandIcon._create=false;}
661function SetDelay(dTimeOut)
662{
663dTimeOut=parseInt(dTimeOut);if(!dTimeOut)
664dTimeOut=0;this._timeOut=dTimeOut;}
665function findPosX(obj)
666{
667if(_browser._name=="Konqueror")
668var curleft=0;else
669var curleft=0;if(obj.offsetParent)
670{
671while (obj.offsetParent)
672{
673curleft+=obj.offsetLeft;obj=obj.offsetParent;}
674}
675else if(obj.x)
676curleft+=obj.x;return curleft;}
677function findPosY(obj)
678{
679if(_browser._name=="Konqueror")
680var curtop=0;else
681var curtop=0;if(obj.offsetParent)
682{
683while (obj.offsetParent)
684{
685curtop+=obj.offsetTop;obj=obj.offsetParent;}
686}
687else if(obj.y)
688curtop+=obj.y;return curtop;}
689function findTriggerPopID(elmID,mmObj)
690{
691var result=-1;for(var i=0;i<=_arRegisterTriggerPopIndex[mmObj._index];i++)
692{
693if(_arRegisterTriggerPopID[mmObj._index][i]==elmID)
694{
695result=i;break;}
696}
697return result;}
698function saveTriggerPopID(elmID,mmObj)
699{
700_arRegisterTriggerPopIndex[mmObj._index]++;var j=_arRegisterTriggerPopIndex[mmObj._index];_arRegisterTriggerPopID[mmObj._index][j]=elmID;
701if(document.all)
702var el=document.all(elmID);
703else if(document.getElementById)
704var el=document.getElementById(elmID);
705if(el.className && el.className.indexOf("TMenuItem") !=-1)
706{
707el.style.backgroundColor=mmObj._itemBackClick._color;el.style.backgroundImage=mmObj._itemBackClick._image;el.style.backgroundRepeat=mmObj._itemBackClick._repeat;el.style.backgroundPosition=mmObj._itemBackClick._position;el.childNodes[0].style.color=mmObj._itemTextClick._color;el.childNodes[0].style.textAlign=mmObj._itemTextClick._align;el.childNodes[0].style.textDecoration=mmObj._itemTextClick._decoration;el.childNodes[0].style.whiteSpace=mmObj._itemTextClick._whiteSpace;el.childNodes[0].style.fontWeight=mmObj._itemTextClick._weight;
708el.style.borderTop=mmObj._itemBorderClick._top;el.style.borderRight=mmObj._itemBorderClick._right;el.style.borderBottom=mmObj._itemBorderClick._bottom;el.style.borderLeft=mmObj._itemBorderClick._left;
709}
710else
711{
712el.className="TPopUpItem"+mmObj._index+"_1";}
713}
714function removeTriggerPopID(elmID,mmObj)
715{
716var index=findTriggerPopID(elmID,mmObj);
717if(index >-1)
718{
719for(var i=_arRegisterTriggerPopIndex[mmObj._index];i>=index;i--)
720{
721var ID=_arRegisterTriggerPopID[mmObj._index][i];if(document.all)
722var el=document.all(ID);else if(document.getElementById)
723var el=document.getElementById(ID);if(el.className.indexOf("TMenuItem") !=-1)
724{
725el.style.backgroundColor=mmObj._itemBack._color;el.style.backgroundImage=mmObj._itemBack._image;el.style.backgroundRepeat=mmObj._itemBack._repeat;el.style.backgroundPosition=mmObj._itemBack._position;
726el.childNodes[0].style.color=mmObj._itemText._color;el.childNodes[0].style.textAlign=mmObj._itemText._align;el.childNodes[0].style.textDecoration=mmObj._itemText._decoration;el.childNodes[0].style.whiteSpace=mmObj._itemText._whiteSpace;el.childNodes[0].style.fontWeight=mmObj._itemText._weight;el.style.borderTop=mmObj._itemBorder._top;el.style.borderRight=mmObj._itemBorder._right;el.style.borderBottom=mmObj._itemBorder._bottom;el.style.borderLeft=mmObj._itemBorder._left;}
727else
728{
729var IDLen=ID.length;var tableID='pr_'+ID.substr(3,IDLen);if(document.all)
730var elTable=document.all(tableID);else if(document.getElementById)
731var elTable=document.getElementById(tableID);el.className="TPopUpItem"+mmObj._index;elTable.style.color=mmObj._pop._itemText._color;elTable.style.textAlign=mmObj._pop._itemText._align;elTable.style.textDecoration=mmObj._pop._itemText._decoration;elTable.style.whiteSpace=mmObj._pop._itemText._whiteSpace;elTable.style.fontWeight=mmObj._pop._itemText._weight;}
732_arRegisterTriggerPopID[mmObj._index][i]=null;}
733_arRegisterTriggerPopIndex[mmObj._index]=index-1;}
734}
735function removeTriggerPopIDByIndex(index,mmObj)
736{
737if(_arRegisterTriggerPopIndex[mmObj._index] >-1 && index >-1)
738{
739for(var i=_arRegisterTriggerPopIndex[mmObj._index];i>=index;i--)
740{
741var ID=_arRegisterTriggerPopID[mmObj._index][i];if(document.all)
742var el=document.all(ID);else if(document.getElementById)
743var el=document.getElementById(ID);if(el.className.indexOf("TMenuItem") !=-1)
744{
745el.style.backgroundColor=mmObj._itemBack._color;el.style.backgroundImage=mmObj._itemBack._image;el.style.backgroundRepeat=mmObj._itemBack._repeat;el.style.backgroundPosition=mmObj._itemBack._position;
746el.childNodes[0].style.color=mmObj._itemText._color;el.childNodes[0].style.textAlign=mmObj._itemText._align;el.childNodes[0].style.textDecoration=mmObj._itemText._decoration;el.childNodes[0].style.whiteSpace=mmObj._itemText._whiteSpace;el.childNodes[0].style.fontWeight=mmObj._itemText._weight;
747el.style.borderTop=mmObj._itemBorder._top;el.style.borderRight=mmObj._itemBorder._right;el.style.borderBottom=mmObj._itemBorder._bottom;el.style.borderLeft=mmObj._itemBorder._left;}
748else
749{
750var IDLen=ID.length;var tableID='pr_'+ID.substr(3,IDLen);if(document.all)
751var elTable=document.all(tableID);else if(document.getElementById)
752var elTable=document.getElementById(tableID);
753el.className="TPopUpItem"+mmObj._index;elTable.style.color=mmObj._pop._itemText._color;elTable.style.textAlign=mmObj._pop._itemText._align;elTable.style.textDecoration=mmObj._pop._itemText._decoration;elTable.style.whiteSpace=mmObj._pop._itemText._whiteSpace;elTable.style.fontWeight=mmObj._pop._itemText._weight;
754}
755_arRegisterTriggerPopID[mmObj._index][i]=null;}
756_arRegisterTriggerPopIndex[mmObj._index]=index-1;}
757}
758function removeAllTriggerPopID(mmObj)
759{
760if(_arRegisterTriggerPopIndex[mmObj._index] >-1)
761{
762for(var i=_arRegisterTriggerPopIndex[mmObj._index];i>=0;i--)
763{
764var ID=_arRegisterTriggerPopID[mmObj._index][i];if(document.all)
765var el=document.getElementById(ID);else if(document.getElementById)
766var el=document.getElementById(ID);
767if(el && el.className.indexOf("TMenuItem") !=-1)
768{
769if(_arMMClick[mmObj._index])
770{
771el.style.backgroundColor=mmObj._itemBack._color;el.style.backgroundImage=mmObj._itemBack._image;el.style.backgroundRepeat=mmObj._itemBack._repeat;el.style.backgroundPosition=mmObj._itemBack._position;
772el.childNodes[0].style.color=mmObj._itemText._color;el.childNodes[0].style.textAlign=mmObj._itemText._align;el.childNodes[0].style.textDecoration=mmObj._itemText._decoration;el.childNodes[0].style.whiteSpace=mmObj._itemText._whiteSpace;el.childNodes[0].style.fontWeight=mmObj._itemText._weight;
773el.style.borderTop=mmObj._itemBorder._top;el.style.borderRight=mmObj._itemBorder._right;el.style.borderBottom=mmObj._itemBorder._bottom;el.style.borderLeft=mmObj._itemBorder._left;}
774}
775else
776{
777var IDLen=ID.length;var tableID='pr_'+ID.substr(3,IDLen);if(document.all)
778var elTable=document.all(tableID);else if(document.getElementById)
779var elTable=document.getElementById(tableID);
780if(el)
781        el.className="TPopUpItem"+mmObj._index;
782if(elTable)
783{
784        elTable.style.color=mmObj._pop._itemText._color;
785        elTable.style.textAlign=mmObj._pop._itemText._align;elTable.style.textDecoration=mmObj._pop._itemText._decoration;
786        elTable.style.whiteSpace=mmObj._pop._itemText._whiteSpace;elTable.style.fontWeight=mmObj._pop._itemText._weight;
787}
788}
789_arRegisterTriggerPopID[mmObj._index][i]=null;}
790_arRegisterTriggerPopIndex[mmObj._index]=-1;}
791}
792function findRegisteredPopUpMenuID(elmID,mmObj)
793{
794var result=-1;for(var i=0;i<=_arRegisterPopIndex[mmObj._index];i++)
795{
796if(_arRegisterPopID[mmObj._index][i]==elmID)
797{
798result=i;break;}
799}
800return result;}
801function showPopUpMenu(parentElmID,elmID,mmObj,menuType)
802{
803 mmObj = _mmObj;
804_arRegisterPopIndex[mmObj._index]++;var j=_arRegisterPopIndex[mmObj._index];_arRegisterPopID[mmObj._index][j]=elmID;var leftPos=0;var parentLeftPos=0;var topPos=0;var parentTopPos=0;if(document.all)
805{var elm=document.getElementById(elmID);var parentElm=document.getElementById(parentElmID);}else if(document.getElementById)
806{
807var parentElm=document.getElementById(parentElmID);var elm=document.getElementById(elmID);}
808parentLeftPos=findPosX(parentElm);parentTopPos=findPosY(parentElm);var screenPosY=0;var screenPosX=0;if(window.innerHeight)
809{
810screenPosY=window.pageYOffset;
811screenPosX=window.pageXOffset;
812}
813else if(document.documentElement && document.documentElement.scrollTop)
814{
815screenPosY=document.documentElement.scrollTop;
816screenPosX=document.documentElement.scrollLeft;
817}
818else if(document.body)
819{
820screenPosY=document.body.scrollTop;
821screenPosX=document.body.scrollLeft;
822}
823if(menuType=='mm')
824{
825if(mmObj._direction=='horizontal')
826{
827if((parentLeftPos-elm.offsetWidth-mmObj._correction._left) < 0)
828{
829if(parentLeftPos < screenPosX)
830{
831leftPos=parentLeftPos+parentElm.offsetWidth+mmObj._correction._left-1;}
832else
833leftPos=parentLeftPos+mmObj._correction._left-1;}
834else
835{
836if(parentLeftPos-screenPosX+elm.offsetWidth+mmObj._correction._left > document.body.clientWidth)
837{
838if(parentLeftPos+parentElm.offsetWidth-screenPosX > document.body.clientWidth)
839leftPos=parentLeftPos-elm.offsetWidth-mmObj._correction._left;else
840leftPos=parentLeftPos+parentElm.offsetWidth-elm.offsetWidth-mmObj._correction._left-1;}
841else
842{
843if(parentLeftPos < screenPosX)
844{
845leftPos=parentLeftPos+parentElm.offsetWidth+mmObj._correction._left-1;}
846else
847leftPos=parentLeftPos+mmObj._correction._left-1;}
848}
849if((parentTopPos-screenPosY-elm.offsetHeight-mmObj._correction._top) <0)
850topPos=parentTopPos+parentElm.offsetHeight+1+mmObj._correction._top;else
851{
852if(parentTopPos+parentElm.offsetHeight+elm.offsetHeight-screenPosY+mmObj._correction._top < document.body.clientHeight)
853topPos=parentTopPos+parentElm.offsetHeight+1+mmObj._correction._top;else
854topPos=parentTopPos-elm.offsetHeight-mmObj._correction._top;}
855}
856else
857{
858if(parentLeftPos-screenPosX-elm.offsetWidth-mmObj._correction._left<0)
859leftPos=parentLeftPos+parentElm.offsetWidth+mmObj._correction._left+1;else
860{
861if((parentLeftPos-screenPosX+parentElm.offsetWidth+elm.offsetWidth+mmObj._correction._left) < document.body.clientWidth)
862leftPos=parentLeftPos+parentElm.offsetWidth+mmObj._correction._left+1;else
863leftPos=parentLeftPos-elm.offsetWidth-mmObj._correction._left-1;}
864if(parentTopPos-screenPosY-elm.offsetHeight-mmObj._correction._top < 0)
865{
866if(parentTopPos < screenPosY)
867topPos=parentTopPos+parentElm.offsetHeight+mmObj._correction._top-1;else
868topPos=parentTopPos+mmObj._correction._top-1;
869}
870else
871{
872if(parentTopPos-screenPosY+elm.offsetHeight+mmObj._correction._top < document.body.clientHeight)
873{
874topPos=parentTopPos+mmObj._correction._top-1;}
875else
876{
877if(parentTopPos-screenPosY+parentElm.offsetHeight < document.body.clientHeight)
878topPos=parentTopPos+parentElm.offsetHeight-elm.offsetHeight-mmObj._correction._top+1;else
879topPos=parentTopPos-elm.offsetHeight-mmObj._correction._top+1;}
880}
881}
882if(elm.style){
883
884        elm.style.left=leftPos+'px';
885        elm.style.top = topPos+'px';
886}
887if(mmObj._pop._shadow._create)
888{
889if(document.all)
890var shadowElm=document.all('sh_'+elmID);else if(document.getElementById)
891var shadowElm=document.getElementById('sh_'+elmID);if(_browser._name=='IE')
892{
893shadowElm.style.left=leftPos+'px';shadowElm.style.top=topPos+'px';}
894else
895{
896shadowElm.style.left=leftPos+mmObj._pop._shadow._distance+'px';shadowElm.style.top=topPos+mmObj._pop._shadow._distance+'px';}
897shadowElm.style.visibility='visible';}
898}
899else
900{
901topPos=parentTopPos;leftPos=parentLeftPos+parentElm.offsetWidth;if(topPos-elm.offsetHeight < 0)
902topPos=topPos+mmObj._pop._correction._top;else
903{
904if(topPos-screenPosY+elm.offsetHeight < document.body.clientHeight)
905topPos=topPos+mmObj._pop._correction._top-2;else
906topPos=topPos-elm.offsetHeight+parentElm.offsetHeight+mmObj._pop._correction._top+2;}
907if((leftPos-((elm.offsetWidth+mmObj._pop._correction._left+1) * 2)) < 0)
908leftPos=leftPos+mmObj._pop._correction._left-3;else
909{
910if((leftPos-screenPosX+elm.offsetWidth+mmObj._pop._correction._left) > document.body.clientWidth)
911leftPos=leftPos-parentElm.offsetWidth-elm.offsetWidth-mmObj._pop._correction._left+5;else
912leftPos=leftPos+mmObj._pop._correction._left-3;}
913elm.style.top=topPos+'px';elm.style.left=leftPos+'px';if(mmObj._pop._shadow._create)
914{
915if(document.all)
916var shadowElm=document.all('sh_'+elmID);else if(document.getElementById)
917var shadowElm=document.getElementById('sh_'+elmID);if(_browser._name=='IE')
918{
919shadowElm.style.left=leftPos+'px';shadowElm.style.top=topPos+'px';}
920else
921{
922shadowElm.style.left=leftPos+mmObj._pop._shadow._distance+'px';shadowElm.style.top=topPos+mmObj._pop._shadow._distance+'px';}
923shadowElm.style.visibility='visible';}
924}
925
926if(elm.style){
927        elm.style.visibility="visible";
928        elm.style.display="";
929}
930}
931function hidePopUpMenu(elmID,mmObj)
932{
933var index=findRegisteredPopUpMenuID(elmID,mmObj);if(index >-1)
934{
935for(var i=_arRegisterPopIndex[mmObj._index];i>=index;i--)
936{
937var ID=_arRegisterPopID[mmObj._index][i];if(document.all)
938document.all(ID).style.visibility="hidden";else if(document.getElementById){
939document.getElementById(ID).style.visibility="hidden";
940document.getElementById(ID).style.display="none";
941}
942if(mmObj._pop._shadow._create)
943{
944if(document.all)
945document.all('sh_'+ID).style.visibility="hidden";else if(document.getElementById)
946document.getElementById('sh_'+ID).style.visibility="hidden";}
947}
948_arRegisterPopIndex[mmObj._index]=index-1;
949}
950}
951function hidePopUpMenuByIndex(index,mmObj)
952{
953if(_arRegisterPopIndex[mmObj._index] >=index)
954{
955for(var i=_arRegisterPopIndex[mmObj._index];i>=index;i--)
956{
957var ID=_arRegisterPopID[mmObj._index][i];if(document.all)
958document.all(ID).style.visibility="hidden";else if(document.getElementById){
959document.getElementById(ID).style.visibility="hidden";
960document.getElementById(ID).style.display="none";
961}
962if(mmObj._pop._shadow._create)
963{
964if(document.all)
965document.all('sh_'+ID).style.visibility="hidden";else if(document.getElementById)
966document.getElementById('sh_'+ID).style.visibility="hidden";}
967}
968_arRegisterPopIndex[mmObj._index]=index-1;}
969}
970function hideAllPopUpMenu(mmObj)
971{
972var index=_arRegisterPopIndex[mmObj._index];if(index >-1)
973{
974for(i=index;i>=0;i--)
975{
976var ID=_arRegisterPopID[mmObj._index][i];
977if(document.all && document.all(ID).style)
978document.all(ID).style.visibility="hidden";
979else if(document.getElementById){
980        if (document.getElementById(ID)){
981                document.getElementById(ID).style.visibility="hidden";
982                document.getElementById(ID).style.display="none";
983        }
984}
985if(mmObj._pop._shadow._create){
986        if (document.getElementById('sh_'+ID))
987                document.getElementById('sh_'+ID).style.visibility="hidden";
988}
989}
990}
991_arRegisterPopIndex[mmObj._index]=-1;}
992function triggerHideAll(mmObj)
993{
994_arTriggerMenu[mmObj._index]=window.setTimeout('hideAll('+mmObj._name+')',mmObj._pop._timeOut);}
995function clearTriggerHideAll(mmObj)
996{
997window.clearTimeout(_arTriggerMenu[mmObj._index]);}
998function hideAll(mmObj)
999{
1000hideAllPopUpMenu(mmObj);removeAllTriggerPopID(mmObj);if(mmObj._popOnClick)
1001_arMMClick[mmObj._index]=false;else
1002_arMMClick[mmObj._index]=true;window.status='';mmObj._hideObject.Show();}
1003function onMainClick(event,elm,popID,mmObj)
1004{
1005if(!_arMMClick[mmObj._index])
1006{
1007_arMMClick[mmObj._index]=true;if(popID !='')
1008{
1009showPopUpMenu(elm.id,popID,mmObj,'mm');saveTriggerPopID(elm.id,mmObj);}
1010}
1011else
1012{
1013_arMMClick[mmObj._index]=false;hideAllPopUpMenu(mmObj);removeAllTriggerPopID(mmObj);elm.style.backgroundColor=mmObj._itemBackHL._color;elm.style.backgroundImage=mmObj._itemBackHL._image;elm.style.backgroundRepeat=mmObj._itemBackHL._repeat;elm.style.backgroundPosition=mmObj._itemBackHL._position;
1014elm.childNodes[0].style.color=mmObj._itemTextHL._color;elm.childNodes[0].style.textAlign=mmObj._itemTextHL._align;elm.childNodes[0].style.textDecoration=mmObj._itemTextHL._decoration;elm.childNodes[0].style.whiteSpace=mmObj._itemTextHL._whiteSpace;elm.childNodes[0].style.fontWeight=mmObj._itemTextHL._weight;
1015elm.style.borderTop=mmObj._itemBorderHL._top;elm.style.borderRight=mmObj._itemBorderHL._right;elm.style.borderBottom=mmObj._itemBorderHL._bottom;elm.style.borderLeft=mmObj._itemBorderHL._left;}
1016mmObj._hideObject.Hide();onBubble(event);}
1017function onMainMOver(event,elm,popID,level,mmObj,status,onclicked)
1018{
1019hideAllPopUpMenu(_mmObj);removeAllTriggerPopID(_mmObj);window.status=unescape(status);clearTriggerHideAll(mmObj);
1020if(_arRegisterTriggerPopID[mmObj._index][0] !=elm.id)
1021{
1022if(_arRegisterTriggerPopID[mmObj._index][0] !=null)
1023{
1024removeAllTriggerPopID(mmObj);}
1025if(_arMMClick[mmObj._index])
1026{
1027hideAllPopUpMenu(mmObj);removeAllTriggerPopID(mmObj);
1028if(popID !='')
1029{
1030_mmObj = mmObj;
1031if(onclicked){
1032        if(_aId){
1033                clearTimeout(_aId);
1034                _aId = null;
1035        }
1036        showPopUpMenu(elm.id,popID,'','mm');
1037}
1038else
1039        _aId = window.setTimeout("showPopUpMenu('"+elm.id+"','"+popID+"','','mm');",500);
1040
1041saveTriggerPopID(elm.id,mmObj);
1042}
1043else
1044        _popId = '';
1045if(mmObj._popOnClick)
1046{
1047elm.style.backgroundColor=mmObj._itemBackClick._color;elm.style.backgroundImage=mmObj._itemBackClick._image;elm.style.backgroundRepeat=mmObj._itemBackClick._repeat;elm.style.backgroundPosition=mmObj._itemBackClick._position;
1048elm.childNodes[0].style.color=mmObj._itemTextClick._color;elm.childNodes[0].style.textAlign=mmObj._itemTextClick._align;elm.childNodes[0].style.textDecoration=mmObj._itemTextClick._decoration;elm.childNodes[0].style.whiteSpace=mmObj._itemTextClick._whiteSpace;elm.childNodes[0].style.fontWeight=mmObj._itemTextClick._weight;
1049elm.style.borderTop=mmObj._itemBorderClick._top;elm.style.borderRight=mmObj._itemBorderClick._right;elm.style.borderBottom=mmObj._itemBorderClick._bottom;elm.style.borderLeft=mmObj._itemBorderClick._left;
1050}else
1051{
1052elm.style.backgroundColor=mmObj._itemBackHL._color;elm.style.backgroundImage=mmObj._itemBackHL._image;elm.style.backgroundRepeat=mmObj._itemBackHL._repeat;elm.style.backgroundPosition=mmObj._itemBackHL._position;
1053elm.childNodes[0].style.color=mmObj._itemTextHL._color;elm.childNodes[0].style.textAlign=mmObj._itemTextHL._align;elm.childNodes[0].style.textDecoration=mmObj._itemTextHL._decoration;elm.childNodes[0].style.whiteSpace=mmObj._itemTextHL._whiteSpace;elm.childNodes[0].style.fontWeight=mmObj._itemTextHL._weight;
1054elm.style.borderTop=mmObj._itemBorderHL._top;elm.style.borderRight=mmObj._itemBorderHL._right;elm.style.borderBottom=mmObj._itemBorderHL._bottom;elm.style.borderLeft=mmObj._itemBorderHL._left;
1055mmObj._hideObject.Hide();}
1056}
1057else
1058{
1059elm.style.backgroundColor=mmObj._itemBackHL._color;elm.style.backgroundImage=mmObj._itemBackHL._image;elm.style.backgroundRepeat=mmObj._itemBackHL._repeat;elm.style.backgroundPosition=mmObj._itemBackHL._position;
1060elm.childNodes[0].style.color=mmObj._itemTextHL._color;elm.childNodes[0].style.textAlign=mmObj._itemTextHL._align;elm.childNodes[0].style.textDecoration=mmObj._itemTextHL._decoration;elm.childNodes[0].style.whiteSpace=mmObj._itemTextHL._whiteSpace;elm.childNodes[0].style.fontWeight=mmObj._itemTextHL._weight;elm.style.borderTop=mmObj._itemBorderHL._top;elm.style.borderRight=mmObj._itemBorderHL._right;elm.style.borderBottom=mmObj._itemBorderHL._bottom;elm.style.borderLeft=mmObj._itemBorderHL._left;
1061}
1062}
1063onBubble(event);}
1064function onBubble(event)
1065{
1066if(!event)
1067var event=window.event;event.cancelBubble=true;if(event.stopPropagation)
1068event.stopPropagation();}
1069function onMainMOut(event,elm,popID,mmObj)
1070{
1071if(_aId) clearTimeout(_aId);
1072if(!_arMMClick[mmObj._index] || popID=='')
1073{
1074elm.style.backgroundColor=mmObj._itemBack._color;elm.style.backgroundImage=mmObj._itemBack._image;elm.style.backgroundRepeat=mmObj._itemBack._repeat;elm.style.backgroundPosition=mmObj._itemBack._position;
1075elm.childNodes[0].style.color=mmObj._itemText._color;elm.childNodes[0].style.textAlign=mmObj._itemText._align;elm.childNodes[0].style.textDecoration=mmObj._itemText._decoration;elm.childNodes[0].style.whiteSpace=mmObj._itemText._whiteSpace;elm.childNodes[0].style.fontWeight=mmObj._itemText._weight;elm.style.borderTop=mmObj._itemBorder._top;elm.style.borderRight=mmObj._itemBorder._right;elm.style.borderBottom=mmObj._itemBorder._bottom;elm.style.borderLeft=mmObj._itemBorder._left;}
1076triggerHideAll(mmObj);
1077onBubble(event);
1078}
1079function onStaticPopItemMOver(event,mmObj,status)
1080{
1081window.status=status;clearTriggerHideAll(mmObj);onBubble(event);}
1082function onStaticPopItemMOut(event,mmObj)
1083{
1084triggerHideAll(mmObj);onBubble(event);}
1085function onPopItemMOver(event,elm,popID,level,mmObj,status)
1086{
1087
1088var index=-1;window.status=status;clearTriggerHideAll(mmObj);
1089elm.parentNode.className='TPopUpItem'+mmObj._index+'_1';elm.style.color=mmObj._pop._itemTextHL._color;elm.style.textAlign=mmObj._pop._itemTextHL._align;elm.style.textDecoration=mmObj._pop._itemTextHL._decoration;elm.style.whiteSpace=mmObj._pop._itemTextHL._whiteSpace;elm.style.fontWeight=mmObj._pop._itemTextHL._weight;
1090if(popID !='')
1091{
1092index=findRegisteredPopUpMenuID(popID,mmObj);if(index==-1)
1093{
1094hidePopUpMenuByIndex(level,mmObj);removeTriggerPopIDByIndex(level,mmObj);
1095showPopUpMenu(elm.id,popID,mmObj,'pm');saveTriggerPopID('di_'+popID,mmObj);}
1096}
1097else
1098{
1099hidePopUpMenuByIndex(level,mmObj);removeTriggerPopIDByIndex(level,mmObj);}
1100onBubble(event);}
1101function onPopItemMOut(event,elm,popID,mmObj)
1102{
1103if(popID=='' && mmObj._pop)
1104{
1105
1106elm.parentNode.className='TPopUpItem'+mmObj._index;
1107elm.style.color=mmObj._pop._itemText._color;
1108elm.style.textAlign=mmObj._pop._itemText._align;
1109elm.style.textDecoration=mmObj._pop._itemText._decoration;
1110elm.style.whiteSpace=mmObj._pop._itemText._whiteSpace;
1111elm.style.fontWeight=mmObj._pop._itemText._weight;
1112}
1113else if(!mmObj._pop)
1114         return;
1115//triggerHideAll(mmObj);
1116onBubble(event);}
1117window.onload=Initialize;window.onresize=InitResize;if(_browser._name=='Netscape' && _browser._version==4)
1118window.captureEvents(event.RESIZE);
1119var _mmHeaderMoveObj;var _mmHeaderMoveObjCorrectionX=0;var _mmHeaderMoveObjCorrectionY=0;function onMMHeaderMove(event)
1120{
1121if(!event)
1122event=window.event;var xPos=(event.clientX) ? event.clientX : event.pageX;
1123var yPos=(event.clientY) ? event.clientY : event.pageY;
1124xPos=parseInt(xPos);if(!xPos) xPos=0;yPos=parseInt(yPos);if(!yPos) yPos=0;if(document.all)
1125var frElm=document.all('fr_'+_mmHeaderMoveObj._id);else if(document.getElementById)
1126var frElm=document.getElementById('fr_'+_mmHeaderMoveObj._id);xPos=xPos-_mmHeaderMoveObjCorrectionX;yPos=yPos-_mmHeaderMoveObjCorrectionY;if(_mmHeaderMoveObj._shadow._create)
1127{
1128if(document.all)
1129var shElm=document.all('sh_'+_mmHeaderMoveObj._id);else if(document.getElementById)
1130var shElm=document.getElementById('sh_'+_mmHeaderMoveObj._id);if(_browser._name=='IE')
1131{
1132shElm.style.left=xPos;shElm.style.top=yPos;}
1133else
1134{
1135shElm.style.left=xPos+_mmHeaderMoveObj._shadow._distance;shElm.style.top=yPos+_mmHeaderMoveObj._shadow._distance;}
1136}
1137frElm.style.left=xPos;frElm.style.top=yPos;}
1138function onMMDocumentClick(event)
1139{
1140onMMHeaderClick(event,_mmHeaderMoveObj);}
1141function onMMHeaderClick(event,mmObj)
1142{
1143if(!event)
1144event=window.event;if((_browser._name=='IE') || (_browser._name=='Konqueror'))
1145{
1146var xPos=event.clientX;var yPos=event.clientY;}
1147else
1148{
1149var xPos=event.pageX;var yPos=event.pageY;}
1150if(document.all)
1151{
1152var elm=document.all(mmObj._id);var frElm=document.all('fr_'+mmObj._id);}
1153else if(document.getElementById)
1154{
1155var elm=document.getElementById(mmObj._id);var frElm=document.getElementById('fr_'+mmObj._id);}
1156if(mmObj._headerClickState)
1157{
1158mmObj._headerClickState=false;document.onmousemove=null;_mmHeaderMoveObj=null;if(_browser._name=='Netscape' && _browser._version==4)
1159window.releaseEvents(event.MOUSEMOVE);elm.style.top=frElm.style.top;elm.style.left=frElm.style.left;mmObj._left=xPos-_mmHeaderMoveObjCorrectionX;mmObj._top=yPos-_mmHeaderMoveObjCorrectionY;frElm.style.visibility='hidden';elm.style.visibility='visible';frElm.style.display='none';elm.style.display='';}
1160else
1161{
1162_mmHeaderMoveObjCorrectionX=xPos-mmObj._left;_mmHeaderMoveObjCorrectionY=yPos-mmObj._top;elm.style.visibility='hidden';frElm.style.visibility='visible';elm.style.display='none';frElm.style.display='';mmObj._headerClickState=true;_mmHeaderMoveObj=mmObj;document.onmousemove=onMMHeaderMove;if(_browser._name=='Netscape' && _browser._version==4)
1163window.captureEvents(event.MOUSEMOVE);
1164clearTriggerHideAll(mmObj);
1165hideAll(mmObj);}
1166onBubble(event);}
1167function _floatingMMEffect(mmObj)
1168{
1169var posX=0;var posY=0;if(window.innerHeight)
1170{
1171posY=window.pageYOffset;
1172posX=window.pageXOffset;
1173}
1174else if(document.documentElement && document.documentElement.scrollTop)
1175{
1176posX=document.documentElement.scrollLeft;
1177posY=document.documentElement.scrollTop;
1178}
1179else if(document.body)
1180{
1181posX=document.body.scrollLeft;
1182posY=document.body.scrollTop;
1183}
1184if(document.all)
1185{
1186var elm=document.all(mmObj._id);var shadowElm=document.all('sh_'+mmObj._id);}
1187else if(document.getElementById)
1188{
1189var elm=document.getElementById(mmObj._id);var shadowElm=document.getElementById('sh_'+mmObj._id);}
1190if(posY < mmObj._initialTop)
1191posY=mmObj._initialTop;else posY+=mmObj._initialTop;if(posY==mmObj._top)
1192{
1193elm.style.top=posY;if(mmObj._shadow._create)
1194{
1195if(_browser._name=='IE')
1196shadowElm.style.top=posY;else
1197shadowElm.style.top=posY+mmObj._shadow._distance;}
1198}
1199mmObj._top=posY;if(posX < mmObj._initialLeft)
1200posX=mmObj._initialLeft;else posX+=mmObj._initialLeft;if(posX==mmObj._left)
1201{
1202elm.style.left=posX;if(mmObj._shadow._create)
1203{
1204if(_browser._name=='IE')
1205shadowElm.style.left=posX;else
1206shadowElm.style.left=posX+mmObj._shadow._distance;}
1207}
1208mmObj._left=posX;temp=setTimeout('_floatingMMEffect('+mmObj._name+')',500);}
1209function _openURL(address)
1210{
1211self.location=address;}
1212function OutputAllMenuPosition(mmObj)
1213{
1214var result='';var dTop=0;var dLeft=0;for(var i=0;i<=mmObj._itemIndex;i++)
1215{
1216if(document.all)
1217{
1218var elm=document.all('pr_'+mmObj._items[i]._id);}else if(document.getElementById)
1219{
1220var elm=document.getElementById('pr_'+mmObj._items[i]._id);}
1221dTop=findPosY(elm);dLeft=findPosX(elm);result+='pr_'+mmObj._items[i]._id+' : top='+dTop+',left='+dLeft+'<br>';result+=OutputAllPopMenuPosition('--',mmObj._items[i])
1222}
1223return result;}
1224function OutputAllPopMenuPosition(prefix,pmObj)
1225{
1226var result='';var dTop=0;var dLeft=0;prefix=prefix+'--';for(var i=0;i<=pmObj._itemIndex;i++)
1227{
1228if((pmObj._items[i]._label=='-') || (pmObj._items[i]._type=='h') || (pmObj._items[i]._itemIndex==-1))
1229{
1230dTop=0;dLeft=0;}
1231else
1232{
1233dTop=0;dLeft=0;if(document.all)
1234{
1235var elm=document.all('di_'+pmObj._items[i]._id);}else if(document.getElementById)
1236{
1237var elm=document.getElementById('di_'+pmObj._items[i]._id);}
1238dTop=findPosY(elm);dLeft=findPosX(elm);}
1239result+=prefix+' label : '+pmObj._items[i]._label+' : top='+dTop+',left='+dLeft+'<br>';result+=OutputAllPopMenuPosition(prefix,pmObj._items[i]);}
1240return result;}
Note: See TracBrowser for help on using the repository browser.