home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2003 October / cmycha200310.iso / NHL2004 / NHL2004Demo.exe / fe / nhl / js / dhtml_library.js < prev    next >
Text File  |  2003-08-20  |  34KB  |  1,140 lines

  1. //Copyright (c) 2002 Electronic Arts Inc. All rights reserved.
  2.  
  3. var aImgs         = new Array();
  4. /*  BUTTON EVENT HANDLERS   */
  5. function doMouseEnter( oEl)
  6. {
  7.     oEl.children(0).src = aImgs[ oEl.id + "_hov" ];
  8.     if(oEl.children.length > 1 && oEl.children(1).id.toString().match(/caption/))
  9.     {
  10.         oEl.children(1).style.color = oEl.hovTextColor;
  11.     }
  12. }
  13.  
  14. function doMouseLeave( oEl )
  15. {
  16.     oEl.children(0).src = aImgs[ oEl.id + "_nml" ];
  17.     if(oEl.children.length > 1 && oEl.children(1).id.toString().match(/caption/))
  18.     {
  19.         oEl.children(1).style.color = oEl.nmlTextColor;
  20.     }
  21. }
  22.  
  23. function doMouseDown( oEl )
  24. {
  25.     oEl.children(0).src = aImgs[ oEl.id + "_dwn" ];
  26.     event.cancelBubble  = true;
  27.     event.returnValue   = false;
  28.     if(oEl.children.length > 1 && oEl.children(1).id.toString().match(/caption/))
  29.     {
  30.         oEl.children(1).style.color = oEl.dwnTextColor;
  31.     }
  32. }
  33.  
  34. function doMouseUp( oEl )
  35. {
  36.     oEl.children(0).src = aImgs[ oEl.id + "_hov" ];
  37.  
  38.     if(oEl.children.length > 1 && oEl.children(1).id.toString().match(/caption/))
  39.     {
  40.         oEl.children(1).style.color = oEl.hovTextColor;
  41.     }
  42.     event.cancelBubble  = true;
  43.     event.returnValue   = false;
  44. }
  45.  
  46. /*   END BUTTON EVENT HANDLERS   */
  47.  
  48. /*     TABS */
  49. function doTabMouseLeave( oEl )
  50. {
  51.     var selectedId      = document.body.getAttribute( "selected" );
  52.     if (oEl.id != selectedId)
  53.     {
  54.         oEl.children(0).src = aImgs[ oEl.id + "_nml" ];
  55.         if(oEl.children.length > 1 && oEl.children(1).id.toString().match(/caption/))
  56.         {
  57.             oEl.children(1).style.color = oEl.nmlTextColor;
  58.         }
  59.     }
  60.     else
  61.     {
  62.         oEl.children(0).src = aImgs[ oEl.id + "_dwn" ];
  63.         if(oEl.children.length > 1 && oEl.children(1).id.toString().match(/caption/))
  64.         {
  65.             oEl.children(1).style.color = oEl.nmlTextColor;
  66.         }
  67.     }
  68.  
  69.     if (event != null)
  70.     {
  71.         event.cancelBubble  = true;
  72.         event.returnValue   = false;
  73.     }
  74. }
  75. /*    END TABS */
  76.  
  77. /*  BUTTON CONSTRUCTOR  */
  78. function initButton( oEl )
  79. {
  80.     var strImgSrc = oEl.children(0).src.toString();
  81.             aImgs[  oEl.id + "_nml" ] = strImgSrc;
  82.             aImgs[  oEl.id + "_hov" ] = aImgs[  oEl.id + "_nml" ].toString().replace( /nml/ , "hov" );
  83.             aImgs[  oEl.id + "_dwn" ] = aImgs[  oEl.id + "_nml" ].toString().replace( /nml/ , "dwn" );
  84. }
  85.  
  86. /*  TOGGLE CONSTRUCTOR  */
  87. function initToggle( oEl )
  88. {
  89.     var strImgSrc = oEl.src.toString();
  90.             aImgs[  oEl.id + "_nml" ] = strImgSrc;
  91.             aImgs[  oEl.id + "_dwn" ] = aImgs[  oEl.id + "_nml" ].toString().replace( "00.gif" , "01.gif" );
  92. }
  93.  
  94. /* END TOGGLE CONSTRUCTOR */
  95.  
  96. /*  TOGGLE HANDLERS  */
  97. function doSwap( oImg )
  98. {
  99.     if(oImg.src.match(/00.gif/))
  100.     {
  101.         oImg.src         = aImgs[ oImg.id + "_dwn" ];
  102.         if(oImg.id.match(/off/))
  103.         {
  104.             oImg.selected     = 0;
  105.             var oEl;
  106.             var strImgId = oImg.id;
  107.             strImgId = strImgId.replace(/off/ , "on" );
  108.             oEl = document.all[ strImgId ];
  109.             oEl.src = aImgs[ strImgId + "_nml" ];
  110.             oEl.selected = 1;
  111.         }
  112.         else
  113.         {
  114.             oImg.selected     = 1;
  115.             var strImgId = oImg.id.replace(/on/ , "off" );
  116.             oEl = document.all[ strImgId ];
  117.             oEl.src = aImgs[ strImgId + "_nml" ];
  118.             oEl.selected = 0;
  119.         }
  120.     }
  121. }
  122.  
  123. /*  END TOGGLE HANDLER  */
  124.  
  125. /*  BODY EVENT HANDLERS  */
  126. function doBodySelectStart()
  127. {
  128.     event.cancelBubble  = true;
  129.     event.returnValue   = false;
  130. }
  131.  
  132. /*  END BODY EVENT HANDLERS  */
  133.  
  134.  
  135. function setInputText( oTag , sText )
  136. {
  137.     oTag.value = nhlMsg( sText );
  138. }
  139.  
  140.  
  141.  
  142. /* Cycler Class */
  143. function Cycler( htmlObj, sIdentifier, nWidth  )//htmlObj = html element , sIdentifier = unique identifier
  144. {
  145.     this.oHtmlObj            = htmlObj;
  146.     this.oHtmlObj.Cycler    = this;
  147.     this.btnPressed            = false;
  148.     this.btnTimerID            = 0;
  149.     this.btnDownCounter        = 0;
  150.     this.sLeftBtn            = "btnLeft" + sIdentifier;
  151.     this.sRightBtn            = "btnRight" + sIdentifier;
  152.     this.sText                = "text" + sIdentifier;
  153.     this.nWidth                = nWidth;
  154.     this.aItems                = new Array();
  155.     this.aValues            = new Array();
  156.     this.nCurIndex            = 0;
  157.     this.bSimpleArray        = true;
  158.     this.index                = 0;
  159.     this.value                = 0;
  160.     this.text                = "";
  161.  
  162.     var strHTML ="<img id=\"" + this.sLeftBtn + "\" style=\"position:absolute;top:0px;left:0px;cursor:hand;\" src=\"../images/cycler/cycle_left_nml.gif\" />";
  163.     strHTML     +="<img id=\"" + this.sRightBtn + "\" style=\"position:absolute;top:0px;left:14px;;cursor:hand;\" src=\"../images/cycler/cycle_right_nml.gif\" />";
  164.     strHTML     +="<img style=\"position:absolute;top:0px;left:29px;width:3px;height:20px;\" src=\"../images/cycler/pull_down0_nml.gif\" />";
  165.     strHTML     +="<img style=\"position:absolute;top:0px;left:32px;width:" + nWidth + "px;height:20px;\" src=\"../images/cycler/pull_down1_nml.gif\" />";
  166.     strHTML     +="<img style=\"position:absolute;top:0px;left:" +(32 + nWidth) +"px;width:4px;height:20px;\" src=\"../images/cycler/pull_down3_nml.gif\" />";
  167.     strHTML     +="<span id=\"" + this.sText + "\" style=\"position:absolute;top:0px;left:32px;font-family:Verdana;font-size:7pt;font-weight:bold;color:black;font-style:normal;padding-top:3px;cursor:default;word-wrap:normal;height:16px;width:" + nWidth + "px;overflow:hidden;\">";
  168.     strHTML     +="</span>";
  169.  
  170.     this.doInit( strHTML );
  171. }
  172.  
  173. Cycler.prototype.doCyclerLeftClick = function ()
  174. {
  175.     var nPreviousIndex = this.nCurIndex - 1;
  176.     ( nPreviousIndex >= 0 ) ? this.nCurIndex = nPreviousIndex : this.nCurIndex = this.aItems.length - 1;
  177.     this.setText( this.aItems[this.nCurIndex]);
  178.     this.setCurrentValue();
  179.  
  180. }
  181. Cycler.prototype.setCurrentValue = function()
  182. {
  183.     this.index = this.nCurIndex;
  184.     this.value = this.nCurIndex;
  185.     this.text  = this.aItems[this.nCurIndex];
  186.     if(!this.bSimpleArray)
  187.         this.value = this.aValues[this.nCurIndex];
  188. }
  189.  
  190. Cycler.prototype.doCyclerRightClick = function ()
  191. {
  192.     var nNextIndex = this.nCurIndex + 1;
  193.     ( nNextIndex < this.aItems.length ) ? this.nCurIndex = nNextIndex : this.nCurIndex = 0;
  194.     this.setText( this.aItems[this.nCurIndex]);
  195.     this.setCurrentValue();
  196.     //this.doStuff( this.oHtmlObj );
  197. }
  198.  
  199. Cycler.prototype.doInit = function( sHTML )
  200. {
  201.     this.oHtmlObj.insertAdjacentHTML( "afterbegin" , sHTML );
  202.     this.initButton( this.oHtmlObj.children(0));
  203.     this.initButton( this.oHtmlObj.children(1));
  204.     //this.setSelectionIndex(0);
  205.  
  206.     with(this.oHtmlObj.children(0))
  207.     {
  208.         onmouseup         = this.doCyclerMouseUp;
  209.         onmousedown     = this.doCyclerMouseDown;
  210.         onmouseenter     = this.doCyclerMouseEnter;
  211.         onmouseleave     = this.doCyclerMouseLeave;
  212.         ondblclick         = this.doCyclerDblClick;
  213.     }
  214.     with(this.oHtmlObj.children(1))
  215.     {
  216.         onmouseup         = this.doCyclerMouseUp;
  217.         onmousedown     = this.doCyclerMouseDown;
  218.         onmouseenter     = this.doCyclerMouseEnter;
  219.         onmouseleave     = this.doCyclerMouseLeave;
  220.         ondblclick         = this.doCyclerDblClick;
  221.  
  222.     }
  223. }
  224.  
  225. Cycler.prototype.doCyclerMouseEnter = function( )
  226. {
  227.     this.src                 = aImgs[ this.id + "_hov" ];
  228.     var isLeftBtn             = (this.id.match(/Left/)!=null) ? 1 : 0;
  229.     (isLeftBtn) ? this.parentElement.children(1).src = aImgs[  this.parentElement.children(1).id + "_nml" ] : this.parentElement.children(0).src = aImgs[  this.parentElement.children(0).id + "_nml" ];
  230.     event.cancelBubble        = true;
  231.     event.returnValue        = false;
  232.     //test.innerHTML            += "ENTER<BR>"
  233. }
  234.  
  235. Cycler.prototype.initButton = function( oEl )
  236. {
  237.     var strImgSrc = oEl.src.toString();
  238.             aImgs[  oEl.id + "_nml" ] = strImgSrc;
  239.             aImgs[  oEl.id + "_hov" ] = aImgs[  oEl.id + "_nml" ].toString().replace( /nml/ , "hov" );
  240.             aImgs[  oEl.id + "_dwn" ] = aImgs[  oEl.id + "_nml" ].toString().replace( /nml/ , "dwn" );
  241. }
  242.  
  243. Cycler.prototype.doCyclerMouseLeave = function( )
  244. {
  245.     this.src                     = aImgs[ this.id + "_nml" ];
  246.     this.parentElement.Cycler.btnPressed     = false;
  247.     event.cancelBubble                        = true;
  248.     event.returnValue                        = false;
  249.     //test.innerHTML                            += "LEAVE<BR>";
  250. }
  251.  
  252. Cycler.prototype.doCyclerMouseDown = function( )
  253. {
  254.     oCycler = this.parentElement.Cycler;
  255.     this.src                 = aImgs[ this.id + "_dwn" ];
  256.     oCycler.btnPressed         = true;
  257.     oCycler.btnDownCounter     = 0;
  258.     var isLeftBtn             = (this.id.match(/Left/)!=null) ? 1 : 0;
  259.     (isLeftBtn) ? this.parentElement.children(1).src = aImgs[  this.parentElement.children(1).id + "_nml" ] : this.parentElement.children(0).src = aImgs[  this.parentElement.children(0).id + "_nml" ];//forcing nml state for other arrow
  260.     window.clearInterval(oCycler.btnTimerID);    //failsafe
  261.     oCycler.btnTimerID         = window.setInterval( "setIncrementValue(" + this.parentElement.id + "," + isLeftBtn +")" , 10 );
  262.     event.cancelBubble        = true;
  263.     event.returnValue        = false;
  264.     //test.innerHTML                            += "DOWN<BR>";
  265. }
  266.  
  267. Cycler.prototype.doCyclerDblClick = function( )
  268. {
  269.     oCycler = this.parentElement.Cycler;
  270.     this.src                 = aImgs[ this.id + "_dwn" ];
  271.     oCycler.btnPressed         = true;
  272.     oCycler.btnDownCounter     = 0;
  273.     var isLeftBtn                                 = (this.id.match(/Left/)!=null) ? 1 : 0;
  274.     window.clearInterval(oCycler.btnTimerID);
  275.     (isLeftBtn) ? oCycler.doCyclerLeftClick(): oCycler.doCyclerRightClick();
  276.     oCycler.doStuff( oCycler.oHtmlObj );
  277.     event.cancelBubble                            = true;
  278.     event.returnValue                            = false;
  279.     //test.innerHTML                            += "DOUBLE<BR>";
  280. }
  281.  
  282. Cycler.prototype.doCyclerMouseUp = function(  )
  283. {
  284.     oCycler = this.parentElement.Cycler;
  285.     this.src                                 = aImgs[ this.id + "_hov" ];
  286.     oCycler.btnPressed     = false;
  287.     oCycler.doStuff( oCycler.oHtmlObj );
  288.     event.cancelBubble                        = true;
  289.     event.returnValue                        = false;
  290.     //test.innerHTML                            += "UP<BR>";
  291. }
  292.  
  293. Cycler.prototype.setOptionByValue = function( uValue )
  294. {
  295.     if(this.bSimpleArray)
  296.         return;
  297.  
  298.     for(var nIndex = 0 ; nIndex < this.aValues.length ; nIndex ++ )
  299.     {
  300.         if(this.aValues[nIndex].toString() == uValue)
  301.         {
  302.             this.setSelectionIndex(nIndex);
  303.             break;
  304.         }
  305.     }
  306. }
  307.  
  308. Cycler.prototype.setSelectionIndex = function( nIndex )
  309. {
  310.     if(nIndex < this.aItems.length || nIndex >= 0 )
  311.     {
  312.         this.nCurIndex = nIndex;
  313.         this.setCurrentValue();
  314.         this.setText( this.aItems[nIndex]);
  315.     }
  316.  
  317. }
  318. Cycler.prototype.setText = function( sText )
  319. {
  320.     this.oHtmlObj.children(5).innerText = sText;
  321. }
  322.  
  323. Cycler.prototype.deleteOptionAtIndex = function( nIndex )
  324. {
  325.     if(this.nCurIndex == nIndex )
  326.     {
  327.         this.setSelectionIndex(nIndex -1 );
  328.     }
  329.     this.aItems.splice(nIndex, 1 );
  330.     this.oHtmlObj.setAttribute("length", this.aItems.length);
  331.  
  332.     if(!this.bSimpleArray)
  333.         this.aValues.splice(nIndex, 1 );
  334. }
  335.  
  336. Cycler.prototype.deleteOptionByValue = function( uValue )//unknown type
  337. {
  338.     if(this.bSimpleArray)
  339.         return;
  340.  
  341.     for(nIndex = 0 ; nIndex < this.aValues.length ; nIndex ++ )
  342.     {
  343.         if(this.aValues[nIndex].toString() == uValue)
  344.         {
  345.             if(this.nCurIndex == nIndex )
  346.                 this.setSelectionIndex(nIndex -1 );
  347.             this.aValues.splice(nIndex, 1 );
  348.             this.aItems.splice(nIndex, 1 );
  349.             this.oHtmlObj.setAttribute("length", this.aItems.length);
  350.             break;
  351.         }
  352.     }
  353. }
  354.  
  355. Cycler.prototype.setOptions = function( aItems , bSimpleArray)
  356. {
  357.     this.bSimpleArray     = bSimpleArray;
  358.     this.aItems            = new Array();
  359.     this.aValues         = new Array();
  360.     if(bSimpleArray)
  361.     {
  362.         this.aItems         = aItems;
  363.     }
  364.     else
  365.     {
  366.         for( var nIndex = 0 ; nIndex < aItems.length ; nIndex+=2 )
  367.         {
  368.             this.aValues.push(aItems[ nIndex ]);
  369.         }
  370.         for( var nIndex = 1 ; nIndex < aItems.length ; nIndex+=2 )
  371.         {
  372.             this.aItems.push(aItems[nIndex]);
  373.         }
  374.     }
  375.     this.oHtmlObj.setAttribute("length", this.aItems.length);
  376.     this.setSelectionIndex(0);
  377. }
  378.  
  379. function setIncrementValue( oObj , bLeft )
  380. {
  381.     oCycler = oObj.Cycler;
  382.     oCycler.btnDownCounter++;
  383.     if ((oCycler.btnPressed) && (oCycler.btnDownCounter > 20))
  384.     {
  385.         (bLeft) ? oCycler.doCyclerLeftClick(): oCycler.doCyclerRightClick();
  386.     }
  387.     else if (!oCycler.btnPressed)
  388.     {
  389.         window.clearInterval(oCycler.btnTimerID);
  390.         oCycler.btnDownCounter     = 0;
  391.         oCycler.btnTimerID        = 0;
  392.         (bLeft) ? oCycler.doCyclerLeftClick():oCycler.doCyclerRightClick();
  393.     }
  394. }
  395. Cycler.prototype.doStuff = function(  )
  396. {
  397.  
  398. }
  399. /* End Cycler Class */
  400.  
  401.  
  402. /* Drag and Drop Manager Class */
  403.  
  404. /*
  405.  constructor : DDManager( drag icon , invalid player/team id);
  406.  
  407.  -simply override startDrag and endDrag
  408.  -use currentDragElement and currentDropElement. note dropElement may be null if outside a target element
  409.  
  410.  example:
  411.  DDManager.prototype.startDrag = function()
  412.  {
  413.      _DDManager.document.body.oDDManager;
  414.     var myDragElement = _DDManager.currentDragElement;
  415.     var myDragElement = _DDManager.currentDropElement;
  416.  }
  417.  
  418. */
  419.  
  420.  
  421. function DDManager( oDragEl , nInvalidId)
  422. {
  423.     this.dragElements             = new Array();
  424.     this.dropElements             = new Array();
  425.     this.srcElement                = null;
  426.     this.dragStart                 = false;
  427.     this.isDown                 = false;
  428.     this.nInvalidId             = nInvalidId;
  429.     this.nId                      = this.nInvalidId;
  430.     this.currentDropElement     = null;
  431.     this.currentDragElement     = null;
  432.     this.isDragElGrid            = false;
  433.     this.isDropElGrid            = false;
  434.     this.draggableElement         = oDragEl;
  435.     this.nPlayerIDColumn        = 0;
  436.     this.nGridHiddenLayer        = 1;
  437.     this.nDelay                    = 200;
  438.     document.body.onmousedown     = this.doMouseDown;
  439.     document.body.onmouseup     = this.doMouseUp;
  440.     document.body.onmousemove     = this.doMouseMove;
  441.     //document.body.onmouseleave     = this.doMouseLeave;
  442.     document.body.oDDManager     = this;
  443.     this.browser = new BrowserDetectLite();
  444. }
  445.  
  446. DDManager.prototype.doMouseLeave = function()
  447. {
  448.     _DDManager = document.body.oDDManager;
  449.     if(_DDManager.dragStart)
  450.     {
  451.         _DDManager.draggableElement.style.visibility = 'hidden';
  452.         _DDManager.draggableElement.releaseCapture();
  453.         document.body.style.cursor = 'default';
  454.         _DDManager.dragStart = false;
  455.         _DDManager.isDown = false;
  456.         _DDManager.currentDropElement = null;
  457.         _DDManager.doDragEnd();
  458.     }
  459. }
  460.  
  461. DDManager.prototype.doMouseUp = function()
  462. {
  463.     _DDManager = document.body.oDDManager;
  464.     _DDManager.isDown = false;
  465.  
  466.     if(!_DDManager.dragStart)
  467.         return;
  468.     _DDManager.draggableElement.releaseCapture();
  469.     _DDManager.dragStart = false;
  470.     _DDManager.draggableElement.style.visibility = 'hidden';
  471.  
  472.     document.body.style.cursor = 'default';
  473.  
  474.     _DDManager.doDragEnd();
  475. }
  476.  
  477. DDManager.prototype.doMouseDown = function()
  478. {
  479.     _DDManager = document.body.oDDManager;
  480.     _DDManager.isDragElGrid = false;
  481.     _DDManager.isDropElGrid = false;
  482.     _DDManager.currentDropElement = null;
  483.     if(event != null) //IE6
  484.     {
  485.         _DDManager.srcElement = event.srcElement;
  486.     }
  487.     if(_DDManager.dragElements[_DDManager.srcElement.id] == undefined || _DDManager.dragElements[_DDManager.srcElement.id] == false)
  488.         return;
  489.     _DDManager.isDown = true;
  490.     _DDManager.setDragElement( _DDManager.srcElement );
  491.     if(_DDManager.currentDragElement != null)
  492.         (event) ? window.setTimeout("document.body.oDDManager.doDragStart( " + event.y +" ," + event.x +"  )" , _DDManager.nDelay) : window.setTimeout("document.body.oDDManager.doDragStart( )" , _DDManager.nDelay);
  493.  
  494. }
  495.  
  496. DDManager.prototype.setSrcElement = function( oEl )
  497. {
  498.     _DDManager = document.body.oDDManager;
  499.     _DDManager.srcElement = oEl;
  500. }
  501.  
  502. DDManager.prototype.doMouseMove = function()
  503. {
  504.     _DDManager = document.body.oDDManager;
  505.  
  506.     if(!_DDManager.dragStart)
  507.         return;
  508.     _DDManager.currentDropElement = null;
  509.     if(_DDManager.dropElements[event.srcElement.id] || _DDManager.dragElements[event.srcElement.id])
  510.     {
  511.         if(_DDManager.browser.versionMinor != 5.5 )//IE 6. release capture
  512.         {
  513.             _DDManager.draggableElement.releaseCapture();
  514.         }
  515.         else if(event.srcElement.tagName != 'OBJECT')//IE5.5 and drop target isnt grid
  516.         {
  517.             _DDManager.draggableElement.releaseCapture();
  518.         }
  519.     }
  520.     else
  521.     {
  522.         _DDManager.draggableElement.setCapture(true);
  523.     }
  524.  
  525.     if(_DDManager.dropElements[ event.srcElement.id] && _DDManager.currentDropElement == null)//entering on top of a drop element
  526.     {
  527.         _DDManager.currentDropElement = event.srcElement;
  528.     }
  529.  
  530.     if(!_DDManager.dropElements[ event.srcElement.id] && _DDManager.currentDropElement != null)//leaving a drop element
  531.     {
  532.         _DDManager.currentDropElement = event.srcElement;
  533.         _DDManager.draggableElement.setCapture(true);
  534.         _DDManager.currentDropElement = null;
  535.     }
  536.     _DDManager.draggableElement.style.pixelTop     = event.clientY + 5;
  537.     _DDManager.draggableElement.style.pixelLeft     = event.clientX + 5;
  538.     if(_DDManager.draggableElement.style.visibility == 'hidden')
  539.         _DDManager.draggableElement.style.visibility    = 'visible';
  540. }
  541.  
  542. DDManager.prototype.doDragStart = function( nY , nX )
  543. {
  544.     _DDManager = document.body.oDDManager;
  545.     if(!_DDManager.isDown)    //mouse still down?
  546.     {
  547.         return;
  548.     }
  549.  
  550.     _DDManager.getPlayerId();
  551.     _DDManager.currentDragElement.fireEvent("onmouseout");//forcing onmouse out on drag element before setCapture()
  552.     _DDManager.draggableElement.setCapture(true);
  553.     _DDManager.dragStart                             = true;
  554.  
  555.     (_DDManager.currentDragElement.tagName == 'OBJECT')?_DDManager.isDragElGrid = true : _DDManager.isDragElGrid = false;
  556.  
  557.     document.body.style.cursor                         = 'hand';
  558.     if(_DDManager.browser.versionMinor != 5.5)
  559.     {
  560.         _DDManager.draggableElement.style.pixelTop         = nY + 5;
  561.         _DDManager.draggableElement.style.pixelLeft     = nX + 5;
  562.         _DDManager.draggableElement.style.visibility    = 'visible';
  563.     }
  564.  
  565.     _DDManager.startDrag();
  566.  
  567.     window.external.GameInterface.AudioInterface.PlayDragDropClickSFX();
  568. };
  569.  
  570. DDManager.prototype.startDrag   = function()//override if necessary
  571. {
  572.     _DDManager = document.body.oDDManager;
  573.  
  574.     createDraggableElement( this.nId );
  575.     if(_DDManager.currentDragElement.tagName != 'OBJECT')
  576.         _DDManager.currentDragElement.children(1).style.visibility = 'hidden';
  577. };
  578.  
  579.  
  580. DDManager.prototype.doDragEnd   = function()
  581. {
  582.     _DDManager = document.body.oDDManager;
  583.     oCurrentDropElement = _DDManager.getCurrentDropElement();
  584.     if(oCurrentDropElement != null)
  585.     {
  586.         (oCurrentDropElement.tagName == 'OBJECT')?_DDManager.isDropElGrid = true : _DDManager.isDropElGrid = false;
  587.     }
  588.     _DDManager.endDrag();
  589.  
  590.     window.external.GameInterface.AudioInterface.PlayDragDropReleaseSFX();
  591. };
  592.  
  593. DDManager.prototype.endDrag   = function( )//override if necessary
  594. {
  595.     _DDManager = document.body.oDDManager;
  596.     oCurrentDropElement = _DDManager.getCurrentDropElement();
  597.     if(oCurrentDropElement == null)// no drop element, return
  598.     {
  599.         if(!_DDManager.isDragElGrid && _DDManager.nId != _DDManager.nInvalidId)//no drop element,but drag element was slot so show it again
  600.         {
  601.             oCurrentDropElement.children(1).style.visibility = 'inherit';
  602.         }
  603.         return;
  604.     }
  605.  
  606.     if(_DDManager.isDragElGrid && !_DDManager.isDropElGrid)//add free agents, grid to slot
  607.     {
  608.         AddAgentToTalk(_DDManager.nId);
  609.     }
  610.     else if(!_DDManager.isDragElGrid && _DDManager.isDropElGrid)//remove free agents, slot to grid
  611.     {
  612.         RemoveAgentFromTalk(_DDManager.nId);
  613.     }
  614.     else if(!_DDManager.isDragElGrid && !_DDManager.isDropElGrid) //slot to slot
  615.     {
  616.         //nothing yet
  617.         refreshForecasts();
  618.     }
  619. };
  620.  
  621. DDManager.prototype.addDragElement = function( oEl )
  622. {
  623.     _DDManager = document.body.oDDManager;
  624.     //append new element to array
  625.     if(oEl.id !="")
  626.         this.dragElements[ oEl.id ] = true;
  627.     if(oEl.children.length != 0 )
  628.     {
  629.         for(nIndex = 0 ; nIndex < oEl.children.length ; nIndex ++ )
  630.         {
  631.             this.addDragElement(oEl.children(nIndex));
  632.         }
  633.     }
  634. };
  635.  
  636. DDManager.prototype.removeDragElement = function( oEl )
  637. {
  638.     //check for existence
  639.     _DDManager = document.body.oDDManager;
  640.     var re = new RegExp(oEl.id);
  641.     for(key in _DDManager.dragElements)
  642.     {
  643.         if(key.toString().match(re))
  644.         {
  645.             _DDManager.dragElements[key] = false;
  646.         }
  647.     }
  648. };
  649.  
  650. DDManager.prototype.addDropElement = function( oEl )
  651. {
  652.     //append new element to array
  653.     if(oEl.id !="")
  654.         this.dropElements[ oEl.id ] = true;
  655.     if(oEl.children.length != 0 )
  656.     {
  657.         for(nIndex = 0 ; nIndex < oEl.children.length ; nIndex ++ )
  658.         {
  659.             this.addDropElement(oEl.children(nIndex));
  660.         }
  661.     }
  662. };
  663.  
  664.  
  665. DDManager.prototype.removeDropElement = function( oEl )
  666. {
  667.     //check for existence
  668.     _DDManager = document.body.oDDManager;
  669.     var re = new RegExp(oEl.id);
  670.     for(key in _DDManager.dropElements)
  671.     {
  672.         if(key.toString().match(re))
  673.         {
  674.             _DDManager.dropElements[key] = false;
  675.         }
  676.     }
  677. };
  678.  
  679. DDManager.prototype.listDropElements = function()
  680. {
  681.     _DDManager = document.body.oDDManager;
  682.     var nIndex = 0;
  683.     for(key in _DDManager.dropElements)
  684.     {
  685.         nIndex++;
  686.     }
  687.     return nIndex;
  688. };
  689.  
  690. DDManager.prototype.listDragElements = function()
  691. {
  692.     _DDManager = document.body.oDDManager;
  693.     var nIndex = 0;
  694.     for(key in _DDManager.dragElements)
  695.     {
  696.         nIndex++;
  697.     }
  698.     return nIndex;
  699. };
  700.  
  701. /* End Drag and Drop Manager Class */
  702. DDManager.prototype.getPlayerId = function( )
  703. {
  704.     _DDManager = document.body.oDDManager;
  705.     if(_DDManager.currentDragElement.tagName == 'OBJECT')
  706.     {
  707.         _DDManager.getPlayerIdFromGrid();
  708.     }
  709.     else
  710.     {
  711.         _DDManager.getPlayerIdFromSlot( _DDManager.currentDragElement );
  712.     }
  713. };
  714.  
  715. DDManager.prototype.getPlayerIdFromGrid = function()//override if necessary
  716. {
  717.     _DDManager = document.body.oDDManager;
  718.     if(aSelectedPlayer[0] == -1 || aSelectedPlayer[0] == _DDManager.nInvalidId)
  719.     {
  720.         _DDManager.nId = _DDManager.nInvalidId;
  721.         return;
  722.     }
  723.     var oGrid = aSelectedPlayer[1];
  724.     _DDManager.nId = oGrid.GetCellDataFromLayer( aSelectedPlayer[0] ,this.nPlayerIDColumn , this.nGridHiddenLayer );
  725.     //alert(_DDManager.nId + "=" +aSelectedPlayer[0] +"." + this.nPlayerIDColumn + "." + this.nGridHiddenLayer);
  726.     aSelectedPlayer[0] = -1;
  727. };
  728.  
  729. DDManager.prototype.setDragElement = function( oDragEl )
  730. {
  731.     if(oDragEl == null)
  732.     {
  733.         return;
  734.     }
  735.     if(oDragEl.tagName =='OBJECT')
  736.     {
  737.         this.currentDragElement = oDragEl;
  738.         return;
  739.     }
  740.  
  741.     if(oDragEl.getAttribute("playerId") == null && oDragEl.getAttribute("teamId") == null && oDragEl.getAttribute("rosterId") == null)
  742.     {
  743.         this.setDragElement( oDragEl.parentElement );
  744.     }
  745.     else
  746.     {
  747.         this.currentDragElement = oDragEl;
  748.     }
  749. }
  750.  
  751. DDManager.prototype.setDropElement = function( oDropEl )
  752. {
  753.     if(oDropEl == null)
  754.     {
  755.         return;
  756.     }
  757.     if(oDropEl.tagName =='OBJECT')
  758.     {
  759.         this.currentDropElement = oDropEl;
  760.         return;
  761.     }
  762.  
  763.     if(oDropEl.getAttribute("playerId") == null && oDropEl.getAttribute("teamId") == null && oDropEl.getAttribute("rosterId") == null)
  764.     {
  765.         this.setDropElement( oDropEl.parentElement );
  766.     }
  767.     else
  768.     {
  769.         this.currentDropElement = oDropEl;
  770.     }
  771. }
  772.  
  773. DDManager.prototype.getCurrentDropElement = function()
  774. {
  775.     if(this.currentDropElement == null)
  776.         return this.currentDropElement;
  777.  
  778.     this.setDropElement(this.currentDropElement);
  779.     return this.currentDropElement;
  780. }
  781.  
  782. DDManager.prototype.getCurrentDragElement = function()
  783. {
  784.     return this.currentDragElement;
  785. }
  786.  
  787. DDManager.prototype.getDropElement = function( oDropEl )
  788. {
  789.     _DDManager = document.body.oDDManager;
  790.     if(oDropEl.tagName =='OBJECT')
  791.     {
  792.         _DDManager.currentDropElement = oDropEl;
  793.         return;
  794.     }
  795.  
  796.     if(oDropEl.getAttribute("playerId") == null && oDropEl.getAttribute("teamId") == null && oDropEl.getAttribute("rosterId") == null)
  797.     {
  798.         _DDManager.getDropElement( oDropEl.parentElement );
  799.     }
  800.     else
  801.     {
  802.         _DDManager.currentDropElement = oDropEl;
  803.  
  804.     }
  805. }
  806.  
  807. DDManager.prototype.getPlayerIdFromSlot = function( oDragEl )//override if necessary
  808. {
  809.     if(oDragEl == null)
  810.     {
  811.         this.nId = null;
  812.         return;
  813.     }
  814.  
  815.     if(oDragEl.playerId == undefined && oDragEl.teamId == undefined && oDragEl.rosterId == undefined)
  816.     {
  817.         this.getPlayerIdFromSlot( oDragEl.parentElement );
  818.     }
  819.     else
  820.     {
  821.         if(oDragEl.playerId != undefined)
  822.         {
  823.             this.nId = oDragEl.playerId;
  824.         }
  825.         else if(oDragEl.teamId != undefined)
  826.         {
  827.             this.nId = oDragEl.teamId;
  828.         }
  829.         else
  830.         {
  831.             this.nId = oDragEl.rosterId;
  832.         }
  833.  
  834.     }
  835. };
  836.  
  837. DDManager.prototype.getCurrentId = function ()
  838. {
  839.     return this.nId;
  840. };
  841.  
  842. DDManager.prototype.setDelay = function ( nDelay )
  843. {
  844.     this.nDelay = nDelay;
  845. };
  846. //init Slider
  847.  
  848. function initGridScrollBar( oSlider , oGrid )
  849. {
  850.     if(oSlider.orient =='vertical' && oGrid.NumRows != -1)
  851.     {
  852.  
  853.         if(oGrid.NumElements <= oGrid.NumRows)//disable slider
  854.         {
  855.             oSlider.style.visibility = 'hidden';
  856.         }
  857.         else//set max_value and thumbsize
  858.         {
  859.             oSlider.max_value = oGrid.NumElements - oGrid.NumRows;
  860.             oSlider.page_value = oGrid.NumRows;
  861.             setVertThumbSize( oSlider , oGrid);
  862.             oSlider.style.visibility = 'visible';
  863.             oGrid.PageStartRow = 0;
  864.         }
  865.     }
  866.     else
  867.     {
  868.         nGridWidth = oGrid.GetTotalColWidth( );
  869.         nGridVisWidth = getGridWidth( oGrid );
  870.         if(oGrid.NumRows == -1 || nGridWidth <= nGridVisWidth  )//disable slider
  871.         {
  872.             oSlider.style.visibility = 'hidden';
  873.         }
  874.         else//set max_value and thumbsize
  875.         {
  876.             oSlider.max_value = oGrid.NumColumns - (oGrid.NumColumns - oGrid.ScrollAnchorColumn);
  877.             oSlider.page_value = oGrid.NumColumns - oGrid.ScrollAnchorColumn;
  878.             setHorThumbSize( oSlider , oGrid );
  879.             oSlider.style.visibility = 'visible';
  880.             oGrid.CurrentColumn = 0;
  881.         }
  882.     }
  883. }
  884. // set thumb size
  885.  
  886. function setVertThumbSize( oSlider, oGrid )
  887. {
  888.     nRowHeight = 18;
  889.     nGridHeight = oGrid.NumRows * nRowHeight;
  890.     nThumbSizeRatio = (nGridHeight + (oSlider.max_value * nRowHeight))/oSlider.track_size;
  891.     oSlider.thumb_size = oSlider.track_size / nThumbSizeRatio;
  892.     //alert(oSlider.max_value);
  893. }
  894.  
  895. function setHorThumbSize( oSlider , oGrid)
  896. {
  897.     nRowHeight = 18;
  898.     var nGridWidth = oGrid.GetTotalColWidth( );
  899.     var nGridVisWidth = getGridWidth( oGrid );
  900.     if(isNaN(nGridWidth))
  901.         alert('grid height not set');
  902.     nThumbSizeRatio = (nGridWidth + nGridVisWidth)/oSlider.track_size;
  903.     oSlider.thumb_size = oSlider.track_size / nThumbSizeRatio;
  904. }
  905.  
  906. function getGridWidth( oGrid )
  907. {
  908.     var nGridWidth = NaN;
  909.     if(!isNaN(oGrid.style.pixelWidth))
  910.     {
  911.         nGridWidth = parseInt(oGrid.style.pixelWidth);
  912.     }
  913.     else if(!isNaN(oGrid.width))
  914.     {
  915.         nGridWidth = parseInt(oGrid.width);
  916.     }
  917.     return nGridWidth;
  918. }
  919. function BrowserDetectLite() {
  920.     var ua = navigator.userAgent.toLowerCase();
  921.  
  922.     // browser name
  923.     this.isGecko     = (ua.indexOf('gecko') != -1);
  924.     this.isMozilla   = (this.isGecko && ua.indexOf("gecko/") + 14 == ua.length);
  925.     this.isNS        = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
  926.     this.isIE        = ( (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1) );
  927.     this.isOpera     = (ua.indexOf("opera") != -1);
  928.     this.isKonqueror = (ua.indexOf("konqueror") != -1);
  929.     this.isIcab      = (ua.indexOf("icab") != -1);
  930.     this.isAol       = (ua.indexOf("aol") != -1);
  931.     this.isWebtv     = (ua.indexOf("webtv") != -1);
  932.  
  933.     // spoofing and compatible browsers
  934.     this.isIECompatible = ( (ua.indexOf("msie") != -1) && !this.isIE);
  935.     this.isNSCompatible = ( (ua.indexOf("mozilla") != -1) && !this.isNS && !this.isMozilla);
  936.  
  937.     // browser version
  938.     this.versionMinor = parseFloat(navigator.appVersion);
  939.  
  940.     // correct version number for NS6+
  941.     if (this.isNS && this.isGecko) {
  942.         this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
  943.     }
  944.  
  945.     // correct version number for IE4+
  946.     else if (this.isIE && this.versionMinor >= 4) {
  947.         this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
  948.     }
  949.  
  950.     // correct version number for Opera
  951.     else if (this.isOpera) {
  952.         if (ua.indexOf('opera/') != -1) {
  953.             this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );
  954.         }
  955.         else {
  956.             this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );
  957.         }
  958.     }
  959.  
  960.     // correct version number for Konqueror
  961.     else if (this.isKonqueror) {
  962.         this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
  963.     }
  964.  
  965.     // correct version number for iCab
  966.     else if (this.isIcab) {
  967.         if (ua.indexOf('icab/') != -1) {
  968.             this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );
  969.         }
  970.         else {
  971.             this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );
  972.         }
  973.     }
  974.  
  975.     // correct version number for WebTV
  976.     else if (this.isWebtv) {
  977.         this.versionMinor = parseFloat( ua.substring( ua.indexOf('webtv/') + 6 ) );
  978.     }
  979.  
  980.     this.versionMajor = parseInt(this.versionMinor);
  981.     this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
  982.  
  983.     // platform
  984.     this.isWin   = (ua.indexOf('win') != -1);
  985.     this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1) );
  986.     this.isMac   = (ua.indexOf('mac') != -1);
  987.     this.isUnix  = (ua.indexOf('unix') != -1 || ua.indexOf('linux') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
  988.  
  989.     // specific browser shortcuts
  990.     this.isNS4x = (this.isNS && this.versionMajor == 4);
  991.     this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
  992.     this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
  993.     this.isNS4up = (this.isNS && this.versionMinor >= 4);
  994.     this.isNS6x = (this.isNS && this.versionMajor == 6);
  995.     this.isNS6up = (this.isNS && this.versionMajor >= 6);
  996.  
  997.     this.isIE4x = (this.isIE && this.versionMajor == 4);
  998.     this.isIE4up = (this.isIE && this.versionMajor >= 4);
  999.     this.isIE5x = (this.isIE && this.versionMajor == 5);
  1000.     this.isIE55 = (this.isIE && this.versionMinor == 5.5);
  1001.     this.isIE5up = (this.isIE && this.versionMajor >= 5);
  1002.     this.isIE6x = (this.isIE && this.versionMajor == 6);
  1003.     this.isIE6up = (this.isIE && this.versionMajor >= 6);
  1004.  
  1005.     this.isIE4xMac = (this.isIE4x && this.isMac);
  1006. }
  1007.  
  1008. function xFadeTransition (oImage, sNewImage)
  1009. {
  1010.     oImage.style.filter = "progid:DXImageTransform.Microsoft.Fade(duration=.15);";
  1011.     oImage.filters[0].Apply();
  1012.     oImage.src=sNewImage;
  1013.     oImage.filters[0].Play();
  1014. }
  1015.  
  1016. function pixelateTransition (oImage, sNewImage)
  1017. {
  1018.     oImage.style.filter = "progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=50, Duration=.3, Enabled=false)";
  1019.     oImage.filters[0].enabled = true;
  1020.     oImage.filters[0].Apply();
  1021.     oImage.src = sNewImage;
  1022.     oImage.filters[0].Play();
  1023. }
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031. var imageFolder = "../images2/widgets/";
  1032.  
  1033. function writeButton(divId, label, bGreenBtn, bSmallSize)
  1034. {
  1035.     var s = "";
  1036.  
  1037.     if (bGreenBtn)
  1038.     {
  1039.         s = "<table border=0 cellpadding=0 cellspacing=0 style='cursor:hand' onmouseover='doGreenBtnMouseOver(\"" + divId + "\")' onmouseout='doGreenBtnMouseOut(\"" + divId + "\")'><tr>";
  1040.         s += "<td><img id='" + divId + "left' src='" + imageFolder + "lg_button_l_green.gif' /></td>";
  1041.         s += "<td id='" + divId + "middle' background='" + imageFolder + "lg_button_m_green.gif' width=100 align=center><span id='" + divId + "text' class='btnText'>" + label + "</span></td>";
  1042.         s += "<td><img id='" + divId + "right' src='" + imageFolder + "lg_button_r_green.gif' /></td>";
  1043.         s += "</tr></table>";
  1044.     }
  1045.     else
  1046.     {
  1047.         if (bSmallSize)
  1048.         {
  1049.             s = "<table border=0 cellpadding=0 cellspacing=0 style='cursor:hand' onmouseover='doBtnMouseOver(\"" + divId + "\", true)' onmouseout='doBtnMouseOut(\"" + divId + "\", true)'><tr>";
  1050.             s += "<td><img id='" + divId + "left' src='" + imageFolder + "med_button_l.gif' /></td>";
  1051.             s += "<td id='" + divId + "middle' background='" + imageFolder + "med_button_m.gif' width=200 align=center><span id='" + divId + "text' class='btnText'>" + label + "</span></td>";
  1052.             s += "<td><img id='" + divId + "right' src='" + imageFolder + "med_button_r.gif' /></td>";
  1053.             s += "</tr></table>";
  1054.         }
  1055.         else
  1056.         {
  1057.             s = "<table border=0 cellpadding=0 cellspacing=0 style='cursor:hand' onmouseover='doBtnMouseOver(\"" + divId + "\")' onmouseout='doBtnMouseOut(\"" + divId + "\")'><tr>";
  1058.             s += "<td><img id='" + divId + "left' src='" + imageFolder + "lg_button_l.gif' /></td>";
  1059.             s += "<td id='" + divId + "middle' background='" + imageFolder + "lg_button_m.gif' width=100 align=center><span id='" + divId + "text' class='btnText'>" + label + "</span></td>";
  1060.             s += "<td><img id='" + divId + "right' src='" + imageFolder + "lg_button_r.gif' /></td>";
  1061.             s += "</tr></table>";
  1062.         }
  1063.     }
  1064.  
  1065.     var divBtn = document.getElementById(divId);
  1066.     divBtn.innerHTML = s;
  1067. }
  1068.  
  1069. function doBtnMouseOver(divId, bSmallSize)
  1070. {
  1071.     var oLeft             = document.getElementById(divId + "left");
  1072.     var oMiddle            = document.getElementById(divId + "middle");
  1073.     var oRight            = document.getElementById(divId + "right");
  1074.     var oText            = document.getElementById(divId + "text");
  1075.  
  1076.     if (bSmallSize)
  1077.     {
  1078.         oLeft.src            = imageFolder + "med_button_l01.gif";
  1079.         oMiddle.background    = imageFolder + "med_button_m01.gif";
  1080.         oRight.src            = imageFolder + "med_button_r01.gif";
  1081.     }
  1082.     else
  1083.     {
  1084.         oLeft.src            = imageFolder + "lg_button_l01.gif";
  1085.         oMiddle.background    = imageFolder + "lg_button_m01.gif";
  1086.         oRight.src            = imageFolder + "lg_button_r01.gif";
  1087.     }
  1088.  
  1089.     oText.className        = "btnTextGold";
  1090. }
  1091.  
  1092.  
  1093. function doBtnMouseOut(divId, bSmallSize)
  1094. {
  1095.     var oLeft             = document.getElementById(divId + "left");
  1096.     var oMiddle            = document.getElementById(divId + "middle");
  1097.     var oRight            = document.getElementById(divId + "right");
  1098.     var oText            = document.getElementById(divId + "text");
  1099.  
  1100.     if (bSmallSize)
  1101.     {
  1102.         oLeft.src            = imageFolder + "med_button_l.gif";
  1103.         oMiddle.background    = imageFolder + "med_button_m.gif";
  1104.         oRight.src            = imageFolder + "med_button_r.gif";
  1105.     }
  1106.     else
  1107.     {
  1108.         oLeft.src            = imageFolder + "lg_button_l.gif";
  1109.         oMiddle.background    = imageFolder + "lg_button_m.gif";
  1110.         oRight.src            = imageFolder + "lg_button_r.gif";
  1111.     }
  1112.  
  1113.     oText.className        = "btnText";
  1114. }
  1115.  
  1116. function doGreenBtnMouseOver(divId)
  1117. {
  1118.     var oLeft             = document.getElementById(divId + "left");
  1119.     var oMiddle            = document.getElementById(divId + "middle");
  1120.     var oRight            = document.getElementById(divId + "right");
  1121.     var oText            = document.getElementById(divId + "text");
  1122.  
  1123.     oLeft.src            = imageFolder + "lg_button_l_green01.gif";
  1124.     oMiddle.background    = imageFolder + "lg_button_m_green01.gif";
  1125.     oRight.src            = imageFolder + "lg_button_r_green01.gif";
  1126.     oText.className        = "btnTextGold";
  1127. }
  1128.  
  1129. function doGreenBtnMouseOut(divId)
  1130. {
  1131.     var oLeft             = document.getElementById(divId + "left");
  1132.     var oMiddle            = document.getElementById(divId + "middle");
  1133.     var oRight            = document.getElementById(divId + "right");
  1134.     var oText            = document.getElementById(divId + "text");
  1135.  
  1136.     oLeft.src            = imageFolder + "lg_button_l_green.gif";
  1137.     oMiddle.background    = imageFolder + "lg_button_m_green.gif";
  1138.     oRight.src            = imageFolder + "lg_button_r_green.gif";
  1139.     oText.className        = "btnText";
  1140. }