///////////////////////////////////////////////////////////////////////////// // (c) Copyright 2000 - 2001, i2 Technologies, Inc. (formerly Intellection)// // ALL RIGHTS RESERVED. // // // // This UNPUBLISHED PROPRIETARY software is subject to the full copyright // // notice in the COPYRIGHT file in this directory. // ///////////////////////////////////////////////////////////////////////////// i2uiPad.width=160; i2uiPad.delay1=200; // millisec before starting to repeat scrolling. i2uiPad.delay2=10; // millisec between each scrolling. i2uiPad.barBackground ="/scrollbar_background.jpg"; i2uiPad.cornerIcon ="/scrollbar_corner.gif"; i2uiPad.upUpIcon ="/scrollbar_up.gif"; i2uiPad.downUpIcon ="/scrollbar_up_active.gif"; i2uiPad.noUpIcon ="/scrollbar_up_disabled.gif"; i2uiPad.upDownIcon ="/scrollbar_down.gif"; i2uiPad.downDownIcon ="/scrollbar_down_active.gif"; i2uiPad.noDownIcon ="/scrollbar_down_disabled.gif"; i2uiPad.topVerticalStub ="/scrollbar_vert_slider_top.gif"; i2uiPad.middleVerticalStub ="/scrollbar_vert_slider_middle.gif"; i2uiPad.bottomVerticalStub ="/scrollbar_vert_slider_bottom.gif"; i2uiPad.upLeftIcon ="/scrollbar_left.gif"; i2uiPad.downLeftIcon ="/scrollbar_left_active.gif"; i2uiPad.noLeftIcon ="/scrollbar_left_disabled.gif"; i2uiPad.upRightIcon ="/scrollbar_right.gif"; i2uiPad.downRightIcon ="/scrollbar_right_active.gif"; i2uiPad.noRightIcon ="/scrollbar_right_disabled.gif"; i2uiPad.leftHorizontalStub ="/scrollbar_horz_slider_left.gif"; i2uiPad.middleHorizontalStub ="/scrollbar_horz_slider_middle.gif"; i2uiPad.rightHorizontalStub ="/scrollbar_horz_slider_right.gif"; i2uiPad.instances = new Array(); i2uiPad.count = 0; i2uiPad.lastHighlightedPadItem = null; i2uiPad.lastHighlightedPadItemName = null; /* creates a Netscape layer to behave as a scrollable, titled container */ function i2uiPad(obj,title,editaction) { i2uiPad.instances[i2uiPad.count] = this; var swidth,sheight; var visible='inherit'; var x=10, y=10; var titleHeight = i2uiPadTitleHeight; var titleHeight2 = titleHeight-2; this.intervalcount = 0; this.refreshid = 0; this.index = i2uiPad.count; this.Vcoef=0.000001; swidth=obj.clip.width; sheight=obj.clip.height; visible=obj.visibility; var titlecolor; if (i2uiPad.count > 0) { titlecolor = i2uiApplicationPadTitleBgcolor; } else { // first pad is special - never scrolls titlecolor = i2uiSolutionPadTitleBgcolor; this.hbar = 'never'; this.vbar = 'never'; } var titleWidth = swidth - 2; if (editaction != "") editaction = ''; var s= ""+ ''+ ''+ ' '+ ''+ ''+ ''+ ' '+ ""+ title+ ''+ ' '+ editaction+ ''+ ''+ ""+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ""+ ""+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ " "+ ''; s+= ''; document.write(s); var layer=document.layers.i2uipad; layer.left=x; layer.top=y; layer.visibility=visible; if (obj.constructor==Layer) { layer.pageX=obj.pageX; layer.pageY=obj.pageY; layer.clip.width=obj.clip.width; layer.clip.height=obj.clip.height+titleHeight; obj.moveBelow(layer.document.layers.title); obj.top += titleHeight; delete layer.document.layers.main; layer.document.layers.main=obj; } var main=layer.document.layers.main; main.i2uipad=this; this.layer=layer; layer.i2uipad=this; this.main=main; this.contentHeight = 0; main.contentWidth = i2uiPad.width - 2; main.vbarok = false; main.hbarok = false; var v=layer.document.layers.v; var vempty=v.document.layers.empty; vempty.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); vempty.onmousedown=i2uiPad.v_rectdown; vempty.onmousemove=i2uiPad.v_rectmove; vempty.onmouseup=i2uiPad.v_rectup; vempty.onmouseout=i2uiPad.v_rectup; var up=v.document.layers.up; up.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); up.document.images.up.layer=up; up.document.images.up.onmousedown=i2uiPad.v_updown; up.document.images.up.onmouseup=i2uiPad.v_upup; up.document.images.up.onmouseout=i2uiPad.v_upup; var down=v.document.layers.down; down.document.images.down.layer=down; down.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); down.document.images.down.onmousedown=i2uiPad.v_downdown; down.document.images.down.onmouseup=i2uiPad.v_downup; down.document.images.down.onmouseout=i2uiPad.v_downup; var h=layer.document.layers.h; var hempty=h.document.layers.empty; hempty.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); hempty.onmousedown=i2uiPad.h_rectdown; hempty.onmousemove=i2uiPad.h_rectmove; hempty.onmouseup=i2uiPad.h_rectup; var left=h.document.layers.left; left.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); left.document.images.left.layer=left; left.document.images.left.onmousedown=i2uiPad.h_leftdown; left.document.images.left.onmouseup=i2uiPad.h_leftup; left.document.images.left.onmouseout=i2uiPad.h_leftup; var right=h.document.layers.right; right.document.images.right.layer=right; right.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP); right.document.images.right.onmousedown=i2uiPad.h_rightdown; right.document.images.right.onmouseup=i2uiPad.h_rightup; right.document.images.right.onmouseout=i2uiPad.h_rightup; this.refresh(); i2uiPad.count++; return this; } i2uiPad.prototype.vincr=5; i2uiPad.prototype.hincr=5; i2uiPad.prototype.scrollTo=function (x,y) { this.Hupdate(x/this.Hcoef); this.Vupdate(y/this.Vcoef); } i2uiPad.prototype.scrollBy = function (x,y) { this.Hupdate((this.main.clip.left+x)/this.Hcoef); this.Vupdate((this.main.clip.top+y)/this.Vcoef); } i2uiPad.prototype.tile=function () { var i = 0; var availableHeight = window.innerHeight - 6; //i2uitrace(0,"======================================"); //i2uitrace(0,"avail pre="+availableHeight); // reduce availableHeight by height of each closed title and // compute neededHeight var neededHeight = 0; var openCount = 0; var scrollingCount = 0; for (i=0; i 0) availableHeight -= main2.contentHeight; else availableHeight -= main.clip.height; } else { openCount++; if (main2.contentHeight > 0) neededHeight += main2.contentHeight; else neededHeight += main.clip.height; //LPM if (main.contentWidth > i2uiPad.width - 2) neededHeight += 16; } } } //i2uitrace(1,"avail post="+availableHeight+" needed="+neededHeight+" opencount="+openCount); // compute best average height if (openCount > 0) { var avgHeight = Math.floor(availableHeight / openCount); //i2uitrace(1,"resize needed for "+openCount+" items avgheight="+avgHeight); var maxavg = avgHeight; var used = 0; var spread; for (var j=0; j<5; j++) { //i2uitrace(1,"LOOP #"+j+" avgHeight="+avgHeight); spread = 0; scrollingCount = 0; used = 0; for (var i=1; i 0) { var delta = used - availableHeight; spread = Math.floor(delta / openCount); avgHeight -= spread; //i2uitrace(1,"LOOP #"+j+" open new avg="+avgHeight+" [delta="+delta+" spread="+spread+"]"); } avgHeight = Math.min(avgHeight, maxavg); //i2uitrace(1,"LOOP #"+j+" fixed avg="+avgHeight); } //i2uitrace(1,"final avg="+avgHeight); // resize any open items for (i=1; i empty.clip.height-rect.clip.height) y = empty.clip.height - rect.clip.height; var offset=Math.max(0,Math.floor(y*this.Vcoef)); var sh=this.main.clip.height; if (offset < 2000) this.main.clip.top=offset; offset -= i2uiPadTitleHeight; if (offset < 2000) this.main.top=-offset; this.main.clip.height=sh; this.layer.document.layers.v.document.layers.empty.document.layers.rect.top=y; rect.top=y; this.pageYOffset=offset; } i2uiPad.v_updown=function () { if (this.layer.parentLayer.noscroll) return false; var that=this.layer; var rect=that.parentLayer.document.layers.empty.document.layers.rect; this.src=i2uiImageDirectory+i2uiPad.downUpIcon; clearTimeout(i2uiPad.timer1); clearInterval(i2uiPad.timer2); i2uiPad.upinterval(rect); i2uiPad.timer1=setTimeout(i2uiPad.uptimeout,i2uiPad.delay1,rect); that.captureEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } i2uiPad.uptimeout= function (rect) { i2uiPad.timer2=setInterval(i2uiPad.upinterval,i2uiPad.delay2,rect); } i2uiPad.upinterval = function (rect) { var thePad=rect.parentLayer.parentLayer.parentLayer.i2uipad; thePad.Vupdate(rect.top - thePad.vincr); } i2uiPad.v_upup= function () { if (this.layer.parentLayer.noscroll) return false; this.src=i2uiImageDirectory+i2uiPad.upUpIcon; clearTimeout(i2uiPad.timer1); clearInterval(i2uiPad.timer2); this.layer.releaseEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } i2uiPad.v_downdown=function () { if (this.layer.parentLayer.noscroll) return false; var that=this.layer; var rect=that.parentLayer.document.layers.empty.document.layers.rect; this.src=i2uiImageDirectory+i2uiPad.downDownIcon; clearTimeout(i2uiPad.timer1); clearInterval(i2uiPad.timer2); i2uiPad.downinterval(rect); i2uiPad.timer1=setTimeout(i2uiPad.downtimeout,i2uiPad.delay1,rect); that.captureEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } i2uiPad.downtimeout= function (rect) { i2uiPad.timer2=setInterval(i2uiPad.downinterval,i2uiPad.delay2,rect); } i2uiPad.downinterval= function (rect) { var thePad=rect.parentLayer.parentLayer.parentLayer.i2uipad; thePad.Vupdate(rect.top + thePad.vincr); } i2uiPad.v_downup= function () { if (this.layer.parentLayer.noscroll) return false; this.src=i2uiImageDirectory+i2uiPad.upDownIcon; clearTimeout(i2uiPad.timer1) clearTimeout(i2uiPad.timer2) this.layer.releaseEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } i2uiPad.h_rectdown= function (e) { var empty=this; empty.captureEvents(Event.MOUSEMOVE); var rect=empty.document.layers.rect; if (e.target==empty.document) { empty.parentLayer.parentLayer.i2uipad.Hupdate(e.layerX); } rect.curX=e.pageX-rect.left; return true; } i2uiPad.h_rectup= function () { this.releaseEvents(Event.MOUSEMOVE); return true; } i2uiPad.h_rectmove= function(e) { var empty=this; var rect=empty.document.layers.rect; var newpos=0; if (e.target==empty.document) { newpos=e.layerX; } else { newpos=e.pageX-rect.curX; } empty.parentLayer.parentLayer.i2uipad.Hupdate(newpos); return false; } i2uiPad.prototype.Hupdate=function (x) { var empty=this.layer.document.layers.h.document.layers.empty var rect=empty.document.layers.rect; if (x < 0) x=0; if (x > empty.clip.width - rect.clip.width) x=empty.clip.width-rect.clip.width; var offset=Math.round(x*this.Hcoef); var sh=this.main.clip.width; this.main.clip.left=offset; this.main.left=-offset; this.main.clip.width=sh; rect.left=x; this.pageXOffset=offset; } i2uiPad.h_leftdown=function () { if (this.layer.parentLayer.noscroll) return false; var that=this.layer; var rect=that.parentLayer.document.layers.empty.document.layers.rect; this.src=i2uiImageDirectory+i2uiPad.downLeftIcon; clearTimeout(i2uiPad.timer1); clearInterval(i2uiPad.timer2); i2uiPad.leftinterval(rect); i2uiPad.timer1=setTimeout(i2uiPad.lefttimeout,i2uiPad.delay1,rect); that.captureEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } i2uiPad.lefttimeout= function (rect) { i2uiPad.timer2=setInterval(i2uiPad.leftinterval,i2uiPad.delay2,rect); } i2uiPad.leftinterval = function (rect) { var thePad=rect.parentLayer.parentLayer.parentLayer.i2uipad; thePad.Hupdate(rect.left - thePad.hincr) } i2uiPad.h_leftup= function () { if (this.layer.parentLayer.noscroll) return false; this.src=i2uiImageDirectory+i2uiPad.upLeftIcon; clearTimeout(i2uiPad.timer1); clearInterval(i2uiPad.timer2); this.layer.releaseEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } i2uiPad.h_rightdown=function () { if (this.layer.parentLayer.noscroll) return false; var that=this.layer; var rect=that.parentLayer.document.layers.empty.document.layers.rect; this.src=i2uiImageDirectory+i2uiPad.downRightIcon; clearTimeout(i2uiPad.timer1); clearInterval(i2uiPad.timer2); i2uiPad.rightinterval(rect); i2uiPad.timer1=setTimeout(i2uiPad.righttimeout,i2uiPad.delay1,rect); that.captureEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } i2uiPad.righttimeout= function (rect) { i2uiPad.timer2=setInterval(i2uiPad.rightinterval,i2uiPad.delay2,rect); } i2uiPad.rightinterval= function (rect) { var thePad=rect.parentLayer.parentLayer.parentLayer.i2uipad; thePad.Hupdate(rect.left + thePad.hincr); } i2uiPad.h_rightup= function () { if (this.layer.parentLayer.noscroll) return false; this.src=i2uiImageDirectory+i2uiPad.upRightIcon; clearTimeout(i2uiPad.timer1) clearTimeout(i2uiPad.timer2) this.layer.releaseEvents(Event.MOUSEMOVE | Event.MOUSEOUT); return false; } /* Manage the state of the pad's scrollers padname - name of pad return - none Compatibility: IE5, NS6 */ function i2uiManagePadScroller(padname) { if (document.layers) return; //i2uitrace(1,"i2uiManagePadScroller entry pad="+padname); var scroller_obj = document.getElementById(padname+"_scroller"); i2uiComputeScrollHeight(padname+"_scroller",true); i2uiComputeScrollWidth(padname+"_scroller",true); //i2uitrace(1,"i2uiManagePadScroller pad "+padname+" scroll="+scroller_obj.scrollHeight+" offset="+scroller_obj.offsetHeight); if (scroller_obj != null) { if (scroller_obj.scrollHeight <= scroller_obj.offsetHeight && scroller_obj.scrollWidth <= scroller_obj.offsetWidth ) { scroller_obj.style.overflow="hidden"; } else { scroller_obj.style.overflow="auto"; } } //i2uitrace(1,"i2uiManagePadScroller exit"); } /* Tile all pads. return - none Compatibility: IE5, NS6, NS4 */ function i2uiTilePads() { //i2uitrace(1,"clear"); //i2uitrace(1,"i2uitilepads entry. #pads="+i2uiPad.count+" ============================"); if (document.layers) { if (i2uiPad.count > 0) { // tile each pad's items for (var i=1; i i2uiPad.width - 2) contentWidth += 16; //i2uitrace(1,"$$$$$$$$ #"+i+" pre layer.contentWidth="+layer.contentWidth); layer.contentWidth = Math.max(158, contentWidth); //i2uitrace(1,"$$$$$$$$ #"+i+" post layer.contentWidth="+layer.contentWidth); i2uiTilePadItems(i2uiPad.instances[i].main.id, 0, contentWidth); } // tile last pad with flag to indicate pads should be tiled var idx = i2uiPad.count - 1; //i2uiTilePadItems(i2uiPad.instances[idx].main.id, 1); // fixes problem where browser state still changing setTimeout("i2uiTilePadItems(i2uiPad.instances["+idx+"].main.id, 1)",150); } } else { var summedApplContentHeight = 0; var openCount = 0; var scrollingCount = 0; var obj; var scroller_obj; var content_obj; var avgHeight; var navareaTop = i2uiComputeTop('i2uinavarea'); // for Netscape 6 we need window height. body height is only content height if (navigator.appName == "Netscape") var navareaHeight = window.innerHeight - navareaTop - 3; else var navareaHeight = document.body.clientHeight - navareaTop - 3; var pad0height = 0; //i2uitrace(1,"clientHeight="+document.body.clientHeight); //i2uitrace(1,"offsetHeight="+document.body.offsetHeight); //i2uitrace(1,"offsetHeight="+window.innerHeight); //i2uitrace(1,"navarea top="+navareaTop+" height="+navareaHeight+" bodyheight="+document.body.offsetHeight+" or "+document.body.clientHeight+" or "+document.body.scrollHeight); // handle special case of single pad. needed for doclib pad type if (i2uiPad.count == 1) { if (navareaTop > 10) { navareaHeight -= 32; //i2uitrace(1,"fixed navareaHeight="+navareaHeight); } content_obj = document.getElementById(i2uiPad.instances[0]); if (content_obj != null) { i2uiComputeScrollHeight(i2uiPad.instances[0],true); scroller_obj = document.getElementById(i2uiPad.instances[0]+"_scroller"); i2uiComputeScrollHeight(i2uiPad.instances[0]+"_scroller",true); i2uiComputeScrollWidth(i2uiPad.instances[0]+"_scroller",true); if (content_obj.offsetHeight >= navareaHeight) scroller_obj.style.height = navareaHeight; else scroller_obj.style.height = null; } i2uiManagePadScroller(i2uiPad.instances[0]); return; } // handle height of first pad content_obj = document.getElementById(i2uiPad.instances[0]); if (content_obj != null) { i2uiComputeScrollHeight(i2uiPad.instances[0],true); pad0height = content_obj.offsetHeight; //i2uitrace(1,"pad #0 content height="+content_obj.offsetHeight+" width="+content_obj.offsetWidth); // if first pad is too wide, then adjust height to accomodate for scroller height if (content_obj.offsetWidth > i2uiPad.width) { i2uiManagePadScroller(i2uiPad.instances[0]); scroller_obj = document.getElementById(i2uiPad.instances[0]+"_scroller"); if (scroller_obj != null) { i2uiComputeScrollHeight(i2uiPad.instances[0]+"_scroller",true); //i2uitrace(1,"pad #0 contentHeight="+content_obj.offsetHeight+" contentHeight2="+content_obj.scrollHeight+" scrollerHeight="+scroller_obj.offsetHeight); if (content_obj.offsetHeight == scroller_obj.offsetHeight && content_obj.offsetHeight > 0) { var delta = 16; //LPM should compute if (navigator.appName == "Netscape") delta += 2; //i2uitrace(1,"increase pad #0 height by "+delta); // sorry bug in Netscape 6.0,6.01,6.1 causes container to continally grow in size i2uiComputeScrollHeight(i2uiPad.instances[0],true); scroller_obj.style.height = content_obj.scrollHeight + delta; } pad0height = scroller_obj.offsetHeight; } } //i2uitrace(1,"pad #0 height="+pad0height); } // handle non-framed case where navarea sits within shell directly if (navareaTop > 10) { navareaHeight -= 16; //i2uitrace(1,"fixed navareaHeight="+navareaHeight); } //i2uitrace(1,"---- tile "+i2uiPad.count+" pads"); // compute how much space pads and content are taking for (var i=1; i scroller_obj.scrollHeight) { scroller_obj.style.height = scroller_obj.scrollHeight; //i2uitrace(1,"fixed pad #"+i+" content.offset="+content_obj.offsetHeight+" .scroller="+content_obj.scrollHeight+" scroller.offset="+scroller_obj.offsetHeight+" .scroller="+scroller_obj.scrollHeight); } if (scroller_obj != null && scroller_obj.offsetHeight != content_obj.offsetHeight) { scrollingCount++; //i2uitrace(1,"pad #"+i+" is scrolling"); } //i2uitrace(1,"pad #"+i+" content height="+content_obj.offsetHeight+" scroller height="+scroller_obj.offsetHeight+" width="+content_obj.offsetWidth); summedApplContentHeight += content_obj.offsetHeight; // if wide text if (scroller_obj != null && content_obj.offsetHeight > 0 && scroller_obj.offsetWidth != scroller_obj.scrollWidth && scroller_obj.scrollWidth > i2uiPad.width) { var delta = 16; //LPM should be computed if (navigator.appName == "Netscape") delta += 2; //i2uitrace(1," increase summedApplContentHeight by "+delta+" scrollerHeight="+scroller_obj.offsetHeight); summedApplContentHeight += delta; if (content_obj.offsetHeight == scroller_obj.offsetHeight) { scroller_obj.style.height = content_obj.scrollHeight + delta; //i2uitrace(1,"redo pad #"+i+" content height="+content_obj.offsetHeight+" scroller height="+scroller_obj.offsetHeight+" width="+content_obj.offsetWidth); } } if (content_obj.offsetHeight > 0) openCount++; } } // will all fit without resizing? var titleHeight = document.getElementById("PAD_"+i2uiPad.instances[0]).offsetHeight - pad0height; var summedTitleHeight = i2uiPad.count * titleHeight; var availContentHeight = navareaHeight - pad0height - summedTitleHeight; //i2uitrace(1,"avail("+availContentHeight+")=navarea("+navareaHeight+") - pad0("+pad0height+") - titles("+summedTitleHeight+")"); //i2uitrace(1,"avail content height="+availContentHeight+" needed="+summedApplContentHeight); if (availContentHeight > summedApplContentHeight) { //i2uitrace(1,"everything fits. #scrollers="+scrollingCount); for (var i=1; i 0) { var delta = used - availContentHeight; spread = Math.floor(delta / openCount); avgHeight -= spread; //i2uitrace(1,"LOOP #"+j+" open new avg="+avgHeight+" [delta="+delta+" spread="+spread+"]"); } avgHeight = Math.min(avgHeight, maxavg); //i2uitrace(1,"LOOP #"+j+" fixed avg="+avgHeight); } //i2uitrace(1,"final avgHeight="+avgHeight); for (var i=1; ii2uiPad.width && height-16>layer.clip.height+2)|| (contentWidthlayer.clip.height+2); //i2uitrace(1,"************ pad="+padname+" vbar="+vbarok+" content="+layer.parentLayer.contentHeight+" clip="+layer.clip.height+" new="+height); layer.vbarok = vbarok; if (contentWidth > i2uiPad.width && !vbarok) height += 16; // resize pad to new height layer.resizeTo(layer.document.width, height); layer.parentLayer.contentHeight = height + 1; // optionally tile all pads if (tile == null || tile == 1) i2uiPad.instances[0].tile(); } } /* Position a pad item in tiled fashion. Uses recursion to position visible child items layer - owning layer top - top of pad depth - indication of depth within hierarchy of pad items return - bottom of pad Compatibility: NS4 */ function i2uiPositionPadItem(layer, top, depth, contentWidth) { var len = layer.document.layers.length; // fix leaf node representation to be bullet image if (len == 0) { var img=layer.document.images.toggler; if (img != null) { if (img.src.indexOf("_bullet") == -1) { img.src=i2uiImageDirectory+"/tree_bullet.gif"; } } } for (var i=0; i 2) i2uiPad.lastHighlightedPadItem.bgColor = i2uiApplicationPadContent1Bgcolor; else i2uiPad.lastHighlightedPadItem.bgColor = i2uiApplicationPadContent0Bgcolor; } layer.bgColor = i2uiApplicationPadHighlightedBgcolor; i2uiPad.lastHighlightedPadItem = layer; i2uiPad.lastHighlightedPadItemName = id; } } else { var obj = document.getElementById(id); if (obj != null) { obj = obj.parentNode; if (obj != null) { if (obj.tagName == 'TR') { // turn off previous if (i2uiPad.lastHighlightedPadItem != null) i2uiPad.lastHighlightedPadItem.id = null; // highlight myself obj.id = 'applicationHighlightedPadContent'; i2uiPad.lastHighlightedPadItem = obj; i2uiPad.lastHighlightedPadItemName = id; } } } } } /* Collapses an expanded pad name - the name of the container to collaspe return - none Compatibility: IE, NS6, NS4 */ function i2uiCollapsePad(name) { if (document.layers) { var layer = i2uiLocateLayer(document, name); if (layer != null) { layer.i2uipad.toggleContents(); } } else { var obj = document.getElementById(name); if (obj != null) { var parentobj = obj.parentElement; while (parentobj != null && parentobj.tagName != 'TABLE') { parentobj = parentobj.parentElement; } if (parentobj != null) { var imagelist = parentobj.getElementsByTagName("IMG"); if (imagelist.length > 0) { imagelist[0].src = i2uiImageDirectory+"/container_expand.gif"; i2uiToggleContent(obj,1,'i2uiTilePads()'); } } } } return; }