home *** CD-ROM | disk | FTP | other *** search
- function DoNothing()
- {
- // Stub
- }
-
- //*************************************
- //GET DYNAMIC BODY AND WATERMARK STYLES
- //*************************************
-
- function GetBodyAndWatermarkStyles()
- {
- var szBodyBgColor;
- var szWatermarkColor;
-
- // Set body and watermark depending on color depth
- if (screen.colorDepth <= 8) {
- szBodyBgColor = "background-color:window;\n";
- szWatermarkColor = "color:threedlightshadow;\n";
- }
- else {
- szBodyBgColor = "background-color:threedhighlight;\n";
- szWatermarkColor = "color:threedshadow;filter:alpha(opacity=15);\n";
- }
-
- var szStyle = "<style>\n";
- szStyle += "Body\n";
- szStyle += " {\n";
- szStyle += " font-family:Verdana;\n";
- szStyle += " font-weight:normal;\n";
- szStyle += " cursor:default;\n";
- szStyle += " " + szBodyBgColor;
- szStyle += " }\n\n";
-
- szStyle += ".tdWatermark\n";
- szStyle += " {\n";
- szStyle += " text-align:center;\n";
- szStyle += " cursor:default;\n";
- szStyle += " " + szWatermarkColor;
- szStyle += " }\n";
- szStyle += "</style>\n";
-
- return szStyle;
- }
-
- //******************************
- // BUILD TASKPAD BUTTON FUNCTION
- //******************************
-
- function BuildTaskpadButtons(iPageStyle)
- {
- var szNextButton;
-
- for (var i = 0; i <= giTotalButtons; i++) {
- szNextButton = GetNextButton (iPageStyle, i);
- divSymbolContainer.insertAdjacentHTML ("BeforeEnd", szNextButton);
- }
- }
-
- //**************************
- // GET NEXT BUTTON FUNCTIONS
- //**************************
-
- function GetNextButton(iPageStyle, theIndex)
- {
- // Calculate the column & row placement of the button
- // based on its index
- var theColumn = theIndex % giTotalColumns; // mod returns column
- var theRow = Math.floor (theIndex / giTotalColumns); // division returns row
-
- // Multiply row & column by offset base to determine relative placement
- // of button in percentage terms.
- switch (iPageStyle)
- {
- case CON_TASKPAD_STYLE_VERTICAL1:
- // Vertical layout with 2 listviews
- var iLeftLoc = theColumn * 52; // columns are 52% apart in this layout
- var iTopLoc = theRow * 25; // rows are 25% apart in this layout
- break;
-
- case CON_TASKPAD_STYLE_HORIZONTAL1:
- // Horizontal layout with 1 listview
- var iLeftLoc = theColumn * 25; // columns are 25% apart in this layout
- var iTopLoc = theRow * 52; // rows are 52% apart in this layout
- break;
-
- case CON_TASKPAD_STYLE_NOLISTVIEW:
- // Buttons-only layout (no listview)
- var iLeftLoc = theColumn * 25; // columns are 25% apart in this layout
- var iTopLoc = theRow * 25; // rows are 25% apart in this layout
- break;
- }
-
- // Get the HTML for the button
- var szFormattedBtn;
- szFormattedBtn = GetButtonHTML (gaiBtnObjectType[theIndex], theIndex, iLeftLoc, iTopLoc)
- return szFormattedBtn;
- }
-
- //*************************
- // GET BUTTON HTML FUNCTION
- //*************************
-
- // Bill (and Rano) was here
- function EndHREFIfNecessary (theIndex, bWantAnchor)
- {
- var szHREF = "";
- if (gaiBtnActionType[theIndex] == 1) {
- if (bWantAnchor == true)
- szHREF += "</A>";
- }
- return szHREF;
- }
- function StartHREFIfNecessary (theIndex, bWantAnchor)
- {
- var szHREF = "";
- if (gaiBtnActionType[theIndex] == 1) {
- // if it's a link, we CAN'T use script to redirect,
- // because this screws up MMC's history list!!!!!!! !
- if (bWantAnchor == true)
- szHREF += "<A HREF=\"";
- szHREF += gaszBtnActionURL[theIndex];
- if (bWantAnchor == true)
- szHREF += "\" STYLE=\"textdecoration\">";
- }
- return szHREF;
- }
- function GetButtonHTML(iBtnType, theIndex, iLeftLoc, iTopLoc)
- {
- // Build up the HTML for the button
- var szBtnHTML = "";
-
- switch (iBtnType)
- {
- case CON_TASK_DISPLAY_TYPE_SYMBOL: // EOT-based symbol | font
- szBtnHTML += "<DIV class=divSymbol id=divSymbol_" + theIndex + " style=\"LEFT: " + iLeftLoc + "%; TOP: " + iTopLoc + "%\">\n";
- szBtnHTML += "<TABLE id=tblSymbol_" + theIndex + " border=0 cellPadding=0 cellSpacing=0 frame=none rules=none width=100%>\n";
- szBtnHTML += "<TBODY>\n";
- szBtnHTML += "<TR>\n";
- szBtnHTML += "<TD align=middle class=tdSymbol id=tdSymbol_" + theIndex + " noWrap vAlign=top>";
- szBtnHTML += StartHREFIfNecessary (theIndex, true);
- szBtnHTML += "<SPAN class=clsSymbolBtn id=spanSymbol_" + theIndex + " ";
- szBtnHTML += "style=\"COLOR: \"threedhighlight\"; FONT-FAMILY: Webdings; FONT-SIZE: 68px; FONT-WEIGHT: normal\" TaskpadButton>";
- szBtnHTML += "test<!--Insert here-->";
- szBtnHTML += "</SPAN>";
- szBtnHTML += EndHREFIfNecessary (theIndex, true);
- szBtnHTML += "</TD></TR>\n";
- szBtnHTML += "<TR>\n";
- szBtnHTML += "<TD align=middle class=tdSymbol id=tdSymbol_" + theIndex + " vAlign=top width=100%>";
- szBtnHTML += "<A class=clsSymbolBtn href=\"";
- szBtnHTML += StartHREFIfNecessary (theIndex, false);
- szBtnHTML += "\" id=anchorCaption_" + theIndex + " ";
- szBtnHTML += "style=\"COLOR: \"threedhighlight\"; FONT-SIZE: 18px; TEXT-DECORATION: none\" TaskpadButton>";
- szBtnHTML += "<!--Insert here--></A></TD></TR></TBODY></TABLE></DIV><!--divSymbol_" + theIndex + "-->\n";
- break;
-
- case CON_TASK_DISPLAY_TYPE_VANILLA_GIF: // (GIF) index 0 is transparent
- case CON_TASK_DISPLAY_TYPE_CHOCOLATE_GIF: // (GIF) index 1 is transparent
- // First get the Hex value of the CSS threedhighlight constant
- var szMaskColor = SysColorX.HEXthreedshadow;
-
- szBtnHTML += "<DIV class=divSymbol id=divSymbol_" + theIndex + " style=\"LEFT: " + iLeftLoc + "%; TOP: " + iTopLoc + "%\">\n";
- szBtnHTML += "<TABLE id=tblSymbol_" + theIndex + " border=0 cellPadding=0 cellSpacing=0 frame=none rules=none width=100%>\n";
- szBtnHTML += "<TBODY>\n";
- szBtnHTML += "<TR>\n";
- szBtnHTML += "<TD align=middle class=tdSymbol id=tdSymbol_" + theIndex + " noWrap vAlign=top>";
- szBtnHTML += StartHREFIfNecessary (theIndex, true);
- szBtnHTML += "<IMG class=clsTaskBtn height=250 id=imgTaskBtn_" + theIndex + " src=\"\" ";
- szBtnHTML += "style=\"FILTER: mask(color=" + szMaskColor + "); HEIGHT: 66px; WIDTH: 66px\" width=250 TaskpadButton>";
- szBtnHTML += EndHREFIfNecessary (theIndex, true);
- szBtnHTML += "</TD></TR>\n";
- szBtnHTML += "<TR>\n";
- szBtnHTML += "<TD align=middle class=tdSymbol id=tdAnchor_" + theIndex + " vAlign=top width=100% TaskpadButton>";
- szBtnHTML += "<A class=clsSymbolBtn href=\"";
- szBtnHTML += StartHREFIfNecessary (theIndex, false);
- szBtnHTML += "\" id=anchorCaption_" + theIndex + " ";
- szBtnHTML += "style=\"FONT-SIZE: 18px\" TaskpadButton>";
- szBtnHTML += "<!--Insert Here--></A></TD></TR></TBODY></TABLE></DIV><!--divSymbol_" + theIndex + "-->\n";
-
- break;
-
- case CON_TASK_DISPLAY_TYPE_BITMAP: // non-transparent raster image
- szBtnHTML += "<DIV class=divSymbol id=divSymbol_" + theIndex + " style=\"LEFT: " + iLeftLoc + "%; TOP: " + iTopLoc + "%\">\n";
- szBtnHTML += "<TABLE id=tblSymbol_" + theIndex + " border=0 cellPadding=0 cellSpacing=0 frame=none rules=none width=100%>\n";
- szBtnHTML += "<TBODY>\n";
- szBtnHTML += "<TR>\n";
- szBtnHTML += "<TD align=middle class=tdSymbol id=tdSymbol_" + theIndex + " noWrap vAlign=top>";
- szBtnHTML += StartHREFIfNecessary (theIndex, true);
- szBtnHTML += "<IMG class=clsTaskBtn height=250 id=imgTaskBtn_" + theIndex + " src=\"\" ";
- szBtnHTML += "style=\"HEIGHT: 66px; WIDTH: 66px\" width=250 border=0 TaskpadButton>";
- szBtnHTML += EndHREFIfNecessary (theIndex, true);
- szBtnHTML += "</TD></TR>\n";
- szBtnHTML += "<TR>\n";
- szBtnHTML += "<TD align=middle class=tdSymbol id=tdSymbol_" + theIndex + " vAlign=top width=100%>";
- szBtnHTML += "<A class=clsSymbolBtn href=\"";
- szBtnHTML += StartHREFIfNecessary (theIndex, false);
- szBtnHTML += "\" id=anchorCaption_" + theIndex + " ";
- szBtnHTML += "style=\"FONT-SIZE: 18px\" TaskpadButton>";
- szBtnHTML += "<!--Insert Here--></A></TD></TR></TBODY></TABLE></DIV><!--divSymbol_" + theIndex + "-->\n";
-
- break;
- }
- return szBtnHTML;
- }
-
- //*********************************
- // COMMON BUTTON BUILDING FUNCTIONS
- //*********************************
-
- function InsertButtonBitmaps()
- {
- for (var i = 0; i <= giTotalButtons; i++) {
- switch (gaiBtnObjectType[i])
- {
- case CON_TASK_DISPLAY_TYPE_VANILLA_GIF: // (GIF) index 0 is transparent
- case CON_TASK_DISPLAY_TYPE_CHOCOLATE_GIF: // (GIF) index 1 is transparent
- case CON_TASK_DISPLAY_TYPE_BITMAP: // non-transparent raster image
- document.all("imgTaskBtn_" + i).src = gaszBtnOffBitmap[i];
- break;
- }
- }
- }
-
- function InsertFontFamilyAndString()
- {
- for (var i = 0; i <= giTotalButtons; i++) {
- if (typeof(gaszFontFamilyName[i]) == "string") {
- document.all("spanSymbol_" + i).style.fontFamily = gaszFontFamilyName[i];
- document.all("spanSymbol_" + i).innerHTML = gaszSymbolString[i];
- }
- }
- }
-
- function InsertCaptionText()
- {
- // Insert caption text for each taskpad button
- for (var i = 0; i <= giTotalButtons; i++) {
- document.all("anchorCaption_" + i).innerHTML = gaszBtnCaptions[i];
- }
- }
-
- function EnableGrayscaleFilter()
- {
- for (var i = 0; i <= giTotalButtons; i++) {
- // Grayscale filter only applies to raster-based images
- if (gaiBtnObjectType[i] == CON_TASK_DISPLAY_TYPE_BITMAP) {
- // Grayscale filter only applies if gaszBtnOverBitmap[i] is undefined
- if (typeof(gaszBtnOverBitmap[i]) == "undefined") {
- document.all("imgTaskBtn_" + i).style.filter = "gray";
- }
- }
- }
- }
-
- function InsertTaskpadText()
- {
- // Insert text for taskpad title, description, and watermark
-
- // Use insertAdjacentText("AfterBegin") for divTitle so that we
- // don't blow out the contained divAbout element
- divTitle.insertAdjacentText("AfterBegin", gszTaskpadTitle);
-
- // Use innerHTML for elements below to support formatting (e.g. <br>)
- divDescription.innerHTML = gszTaskpadDescription;
-
- // Use innerText for stand-alone elements
-
- // Watermark (e.g. Background) - uses inner HTML
-
- var objWatermark = MMCCtrl.GetBackground (szHash);
-
- // RETROFIT BELOW...
-
- if (objWatermark != null) {
- // Keep track of the watermark display object type
- giWatermarkObjectType = objWatermark.DisplayObjectType;
-
- switch (giWatermarkObjectType) {
-
- default:
- // optional alert ("skipping due to background.DisplayObjectType == " + objWatermark.DisplayObjectType);
- // skip
- break;
-
- case 1:
- // MMC_TASK_DISPLAY_TYPE_SYMBOL
- str = "";
- str += "<SPAN STYLE=\"position:absolute; top:5%; left:0; z-index:-20; font-size:300pt; font-family:";
- str += objWatermark.FontFamilyName;
- str += "; \">";
- str += objWatermark.SymbolString;
- str += "</SPAN>";
- tdWatermark.innerHTML = str;
- break;
-
- case 2:
- // MMC_TASK_DISPLAY_TYPE_VANILLA_GIF, index 0 is transparent
- tdWatermark.innerHTML = "<IMG SRC=\"" +
- objWatermark.MouseOffBitmap +
- "\" STYLE=\"position:absolute; filter:alpha(opacity=20); left:0%; top:75%; overflow:hidden;\">";
- break;
-
- case 3:
- // MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF, index 1 is transparent
- tdWatermark.innerHTML = "<IMG SRC=\"" +
- objWatermark.MouseOffBitmap +
- "\" STYLE=\"position:absolute; filter:alpha(opacity=20); left:0%; top:75%; overflow:hidden;\">";
- break;
-
- case 4:
- // MMC_TASK_DISPLAY_TYPE_BITMAP, non-transparent raster
- tdWatermark.innerHTML = "<IMG SRC=\"" +
- objWatermark.MouseOffBitmap +
- "\" STYLE=\"position:absolute; filter:alpha(opacity=20); left:0%; top:80%; overflow:hidden;\">";
- break;
- }
- }
- }
-
- function SetupListview()
- {
- if (gbShowLVTitle == true) {
- // if gbShowLVTitle is true, add strings to listview
- tdLVTitle.innerText = gszLVTitle;
-
- // Determine if author really wants to show the listview button
- if (gbHasLVButton == true) {
- anchorLVButton_0.innerText = gszLVBtnCaption;
- }
- // If not, hide it
- else {
- divLVButton_0.style.visibility = "hidden";
- }
- }
- else {
- // gbShowLVTitle is false, so nothing has been specified for a listview header or button;
- // hide these elements and let the listview occupy 100% of its parent"s height
- divLVTitle.style.visibility= "hidden";
- divLV.style.top = "0%";
- divLV.style.height = "100%";
- }
- }
-
- //***************************************
- // BUTTON HIGHLIGHT/UNHIGHLIGHT FUNCTIONS
- //***************************************
-
- function HighlightButton(szBtnIndex)
- {
- // Determine button type
- switch (gaiBtnObjectType[szBtnIndex])
- {
- case 1: // Symbol
- //document.all("spanSymbol_" + szBtnIndex).style.color = "highlight";
- document.all("spanSymbol_" + szBtnIndex).style.color = "threeddarkshadow";
- break;
-
- case 2: // GIF Vanilla
- case 3: // GIF Chocolate
- document.all("imgTaskBtn_" + szBtnIndex).filters.mask.color = SysColorX.RGBthreeddarkshadow;
- break;
-
- case 4: // Raster
- if (typeof(gaszBtnOverBitmap[szBtnIndex]) == "string") {
- // Use SRC swapping if an "OverBitmap" is specified
- document.all("imgTaskBtn_" + szBtnIndex).src = gaszBtnOverBitmap[szBtnIndex];
- }
- else {
- // Otherwise, toggle from grayscale to color for single bitmap
- document.all("imgTaskBtn_" + szBtnIndex).filters[0].enabled = 0;
- }
- break;
-
- default:
- alert ("Unrecognized image format for button index " + szBtnIndex);
- break;
- }
-
- document.all("anchorCaption_" + szBtnIndex).style.color = "threeddarkshadow";
- document.all("anchorCaption_" + szBtnIndex).style.textDecoration = "underline";
-
- // Keep track of tooltip index and display tooltip
- giTooltipIndex = szBtnIndex;
-
- // Show the tooltip after latency period specified by giTooltipLatency
- gTooltipTimer = window.setTimeout("TaskpadTooltipShow()", giTooltipLatency, "jscript");
- }
-
-
- function UnhighlightButton()
- {
- if (typeof(gszLastBtn) != "undefined") {
-
- // Determine button type
- switch (gaiBtnObjectType[gszLastBtn])
- {
- case 1: // Symbol
- document.all("spanSymbol_" + gszLastBtn).style.color = "threedshadow";
- break;
-
- case 2: // GIF Vanilla
- case 3: // GIF Chocolate
- document.all("imgTaskBtn_" + gszLastBtn).filters.mask.color = SysColorX.RGBthreedshadow;
- break;
-
- case 4: // Raster
- if (typeof(gaszBtnOverBitmap[gszLastBtn]) == "string") {
- // Use SRC swapping if an "OverBitmap" is specified
- document.all("imgTaskBtn_" + gszLastBtn).src = gaszBtnOffBitmap[gszLastBtn];
- }
- else {
- // Otherwise, toggle from color to grayscale for single bitmap
- document.all("imgTaskBtn_" + gszLastBtn).filters[0].enabled = 1;
- }
- break;
-
- default:
- alert("Unrecognized image format for index " + gszLastBtn);
- break;
- }
-
- document.all("anchorCaption_" + gszLastBtn).style.color = "threedshadow";
- document.all("anchorCaption_" + gszLastBtn).style.textDecoration = "none";
-
- TaskpadTooltipHide();
- }
- }
-
- function IsStillOverButton()
- {
- // Purpose: Determines if a mouseover or mouseout event
- // was fired over the same button (indicating that the pointer
- // is still over the button and that highlighting/unhighlighting
- // should be ignored.
- //
- // Returns true if and only if:
- // * both fromElement and toElement are not null;
- // * both elements contain a user-defined "TaskpadButton" attribute;
- // * both element IDs match.
-
- var fromX = window.event.fromElement;
- var toX = window.event.toElement;
-
- // Trap case where mouse pointer appeared over a button out of nowhere,
- // (e.g. as a result of switching focus from another app).
- if ((fromX != null) && (toX != null)) {
- // return true if moving within elements of a single button
- if ((fromX.getAttribute("TaskpadButton") != null) == (toX.getAttribute("TaskpadButton") != null)) {
- if (GetElementIndex(fromX.id) == GetElementIndex(toX.id)) {
- return true;
- }
- }
- }
- return false;
- }
-
- //*****************
- //TOOLTIP FUNCTIONS
- //*****************
-
- function LoadTooltipPointer()
- {
- divTooltipPointer.innerHTML = L_gszTooltipPointer_StaticText;
- }
-
- function TaskpadTooltipShow()
- {
- // Load in appropriate tooltip text from the module-level string array
- tdTooltip.innerHTML = gaszBtnTooltips[giTooltipIndex];
-
- // Position the tooltip vertically
- SetTooltipVertical();
-
- // Position the tooltip horizontally
- SetTooltipHorizontal();
-
- // Show the tooltip & pointer
- divTooltip.style.visibility = "visible";
- divTooltipPointer.style.visibility = "visible";
- }
-
- function SetTooltipVertical()
- {
- // Get offset and scroll values for containing div and symbol
- var divScrollTop = divSymbolContainer.scrollTop;
- var divOffsetHeight = divSymbolContainer.offsetHeight
- var elOffsetTop = document.all("divSymbol_" + gszLastBtn).offsetTop;
-
- // Calculate the relative position of the top of the
- // selected button within the divSymbolContainer
- var iBtnLoc = Math.floor(((elOffsetTop - divScrollTop) / divOffsetHeight) * 100);
-
- // If the button location is <= 52
- if (iBtnLoc <= 52) {
- // Position the tooltip below the button
- SetTooltipVerticalBelow();
- }
- else {
- // Otherwise, position the tooltip above the button
- SetTooltipVerticalAbove();
- }
- }
-
- function SetTooltipVerticalAbove()
- {
- var iYLoc = document.all("divSymbol_" + giTooltipIndex).offsetTop;
- iYLoc += divSymbolContainer.offsetTop;
- iYLoc -= tblTooltip.offsetHeight;
-
- // Subtract scrollTop to account for container div scrolling
- iYLoc -= divSymbolContainer.scrollTop;
-
- // Offset the tooltip by an additional fixed-constant size of the symbol fontSize
- switch (gaiBtnObjectType[giTooltipIndex])
- {
- // Offset the top by an additional fixed-constant size
- case 1: // Symbol
- iYLoc -= (GetPixelSize(document.all("spanSymbol_" + giTooltipIndex).style.fontSize) * L_ConstTooltipOffsetBottom_Number);
- break;
-
- case 2: // GIF Vanilla
- case 3: // GIF Chocolate
- case 4: // Raster
- iYLoc -= ((document.all("imgTaskBtn_" + giTooltipIndex).offsetHeight) * L_ConstTooltipOffsetBottom_Number);
- break;
-
- default:
- // Stub
- break;
- }
-
- // Position the tooltip vertically
- divTooltip.style.pixelTop = iYLoc;
-
- // Position the tooltip pointer vertically
- divTooltipPointer.style.pixelTop = iYLoc + tblTooltip.offsetHeight - (GetPixelSize(divTooltipPointer.style.fontSize) / L_ConstTooltipPointerOffsetBottom_Number);
- }
-
- function SetTooltipVerticalBelow()
- {
- var iYLoc = document.all("divSymbol_" + giTooltipIndex).offsetTop;
- iYLoc += document.all("tblSymbol_" + giTooltipIndex).offsetHeight;
- iYLoc += divSymbolContainer.offsetTop;
-
- // Subtract scrollTop to account for container div scrolling
- iYLoc -= divSymbolContainer.scrollTop;
-
- // Offset the tooltip by an additional fixed-constant size of the symbol fontSize
- switch (gaiBtnObjectType[giTooltipIndex])
- {
- // Offset the top by an additional fixed-constant size
- case 1: // Symbol
- iYLoc += (GetPixelSize(document.all("spanSymbol_" + giTooltipIndex).style.fontSize) * L_ConstTooltipOffsetBottom_Number);
- break;
-
- case 2: // GIF Vanilla
- case 3: // GIF Chocolate
- case 4: // Raster
- iYLoc += ((document.all("imgTaskBtn_" + giTooltipIndex).offsetHeight) * L_ConstTooltipOffsetBottom_Number);
- break;
-
- default:
- // Stub
- break;
- }
-
- // Position the tooltip vertically
- divTooltip.style.pixelTop = iYLoc;
-
- // Position the tooltip pointer vertically
- //divTooltipPointer.style.pixelTop = iYLoc - tblTooltip.offsetHeight - (GetPixelSize(divTooltipPointer.style.fontSize) / L_ConstTooltipPointerOffsetBottom_Number);
- divTooltipPointer.style.pixelTop = iYLoc - (GetPixelSize(divTooltipPointer.style.fontSize) / L_ConstTooltipPointerOffsetTop_Number);
- }
-
- function SetTooltipHorizontal()
- {
- var iSymbolLeft = document.all("divSymbol_" + giTooltipIndex).offsetLeft;
- var iSymbolWidth = document.all("divSymbol_" + giTooltipIndex).offsetWidth;
- var iTooltipWidth = document.all("divTooltip").offsetWidth;
-
- // Center the tooltip horizontally w/ respect to its symbol
- var iXLoc;
- if (iSymbolWidth >= iTooltipWidth) {
- // Symbol is wider than tooltip
- iXLoc = ( (iSymbolWidth - iTooltipWidth) / 2) + iSymbolLeft;
- }
- else {
- // Tooltip is wider than symbol
- iXLoc = ( (iTooltipWidth - iSymbolWidth) / 2) + iSymbolLeft;
- }
-
- iXLoc += divSymbolContainer.style.pixelLeft;
-
- // Position the tooltip horizontally
- divTooltip.style.left = iXLoc;
-
- // Position the tooltip pointer horizontally
- divTooltipPointer.style.pixelLeft = iXLoc + (iTooltipWidth / 2) - ( GetPixelSize(divTooltipPointer.style.fontSize) / 2 );
- }
-
- function TaskpadTooltipHide()
- {
- divTooltip.style.visibility = "hidden";
- divTooltipPointer.style.visibility = "hidden";
- window.clearTimeout(gTooltipTimer);
- //Empty the innerHTML, which causes the height to collapse
- tdTooltip.innerHTML = "";
- }
-
- //****************
- // RESIZE FUNCTION
- //****************
-
- function ResizeTaskpadElements(iTaskpadStyle)
- {
- var iSmallerDimension = GetSmallerDimension();
-
- // Bail out if iSmallerDimension < 1
- if (iSmallerDimension <= 0) {
- return;
- }
-
- // Title & description
- divTitle.style.fontSize = iSmallerDimension * L_ConstTitleText_Number;
- divDescription.style.fontSize = iSmallerDimension * L_ConstDescriptionText_Number;
-
- // Watermark
- // TODO: NEED TO IMPLEMENT FULL SUPPORT FOR WATERMARK IN ALL ITS FLAVORS
- switch (iTaskpadStyle)
- {
- case CON_TASKPAD_STYLE_VERTICAL1:
- tdWatermark.style.fontSize = iSmallerDimension * L_ConstWatermarkVerticalText_Number;
- break;
-
- case CON_TASKPAD_STYLE_HORIZONTAL1:
- tdWatermark.style.fontSize = iSmallerDimension * L_ConstWatermarkHorizontalText_Number;
- break;
-
- case CON_TASKPAD_STYLE_NOLISTVIEW:
- tdWatermark.style.fontSize = iSmallerDimension * L_ConstWatermarkNoListviewText_Number;
- break;
- }
-
- // Tooltips
- tblTooltip.style.fontSize = iSmallerDimension * L_ConstTooltipText_Number;
- divTooltipPointer.style.fontSize = iSmallerDimension * L_ConstTooltipPointerText_Number;
-
- // Listview elements
- if (iTaskpadStyle != CON_TASKPAD_STYLE_NOLISTVIEW) {
- tdLVButton_0.style.fontSize = iSmallerDimension * L_ConstLVButtonText_Number;
- tdLVTitle.style.fontSize = iSmallerDimension * L_ConstLVTitleText_Number;
- }
-
- // Apply multipliers to symbol text
- for (var i = 0; i <= giTotalButtons; i++) {
-
- // All buttons have an anchor caption
- document.all("anchorCaption_" + i).style.fontSize = iSmallerDimension * L_ConstSpanAnchorText_Number;
-
- // Determine button type (either symbol- or image-based)
- switch (gaiBtnObjectType[i])
- {
- case 1: // Symbol
- document.all("spanSymbol_" + i).style.fontSize = iSmallerDimension * L_ConstSpanSymbolText_Number;
- break;
-
- case 2: // GIF Vanilla
- case 3: // GIF Chocolate
- case 4: // Raster
- document.all("imgTaskBtn_" + i).style.width = iSmallerDimension * L_ConstTaskButtonBitmapSize_Number;
- document.all("imgTaskBtn_" + i).style.height = iSmallerDimension * L_ConstTaskButtonBitmapSize_Number;
- break;
-
- default:
- alert("Unrecognized image format for index " + i);
- }
- }
- }
-
- //******************
- // UTILITY FUNCTIONS
- //******************
-
- function SynchColorsToSystem(iType)
- {
- // TODO NOTE: Why are you doing this? Can"t most of these be set directly
- // from CSS style sheets? Investigate!
-
- // Use CSS system constants
- divTitle.style.color = "threeddarkshadow";
- divTitle.style.borderColor = "threeddarkshadow";
-
- divDescription.style.color = "threeddarkshadow";
-
- tblTooltip.style.backgroundColor = "infobackground";
- tblTooltip.style.color = "infotext";
- divTooltipPointer.style.color = "windowframe";
-
- // Special case the taskpad type
- switch (iType) {
- case CON_TASKPAD_STYLE_VERTICAL1:
- case CON_TASKPAD_STYLE_HORIZONTAL1:
- divLVContainerTop.style.backgroundColor = "buttonface";
- divLVButton_0.style.backgroundColor = "threedshadow";
- break;
-
- case CON_TASKPAD_STYLE_NOLISTVIEW:
- // Stub
- break;
- }
- }
-