home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Utility / 5-11_xp-2k_dd_ccc_wdm_enu_27345.exe / Data1.cab / _D042A2D95AED4783989D7BCE05D54170 < prev    next >
Text File  |  2003-09-15  |  3KB  |  70 lines

  1. // Copyright (c) 2000-2003 Quadralay Corporation.  All rights reserved.
  2. //
  3.  
  4. function  WWHPopupFormat_Translate(ParamText)
  5. {
  6.   return ParamText;
  7. }
  8.  
  9. function  WWHPopupFormat_Format(ParamWidth,
  10.                                 ParamTextID,
  11.                                 ParamText)
  12. {
  13.   var  FormattedText   = "";
  14.   var  BackgroundColor = WWHFrame.WWHHelp.mSettings.mPopup.mBackgroundColor;
  15.   var  BorderColor     = WWHFrame.WWHHelp.mSettings.mPopup.mBorderColor;
  16.   var  ImageDir        = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/images";
  17.   var  ReqSpacer1w2h   = "<img src=\"" + ImageDir + "/spc1w2h.gif\" width=1 height=2>";
  18.   var  ReqSpacer2w1h   = "<img src=\"" + ImageDir + "/spc2w1h.gif\" width=2 height=1>";
  19.   var  ReqSpacer1w7h   = "<img src=\"" + ImageDir + "/spc1w7h.gif\" width=1 height=7>";
  20.   var  ReqSpacer5w1h   = "<img src=\"" + ImageDir + "/spc5w1h.gif\" width=5 height=1>";
  21.   var  Spacer1w2h      = ReqSpacer1w2h;
  22.   var  Spacer2w1h      = ReqSpacer2w1h;
  23.   var  Spacer1w7h      = ReqSpacer1w7h;
  24.   var  Spacer5w1h      = ReqSpacer5w1h;
  25.  
  26.  
  27.   // Netscape 6.x (Mozilla) renders table cells with graphics
  28.   // incorrectly inside of <div> tags that are rewritten on the fly
  29.   //
  30.   if (WWHFrame.WWHBrowser.mBrowser == 4)  // Shorthand for Netscape 6.x (Mozilla)
  31.   {
  32.     Spacer1w2h = "";
  33.     Spacer2w1h = "";
  34.     Spacer1w7h = "";
  35.     Spacer5w1h = "";
  36.   }
  37.  
  38.   FormattedText += "<table width=\"" + ParamWidth + "\" border=0 cellspacing=0 cellpadding=0 bgcolor=\"" + BackgroundColor + "\">";
  39.   FormattedText += " <tr>";
  40.   FormattedText += "  <td height=2 colspan=5 bgcolor=\"" + BorderColor + "\">" + Spacer1w2h + "</td>";
  41.   FormattedText += " </tr>";
  42.  
  43.   FormattedText += " <tr>";
  44.   FormattedText += "  <td height=7 bgcolor=\"" + BorderColor + "\">" + Spacer2w1h + "</td>";
  45.   FormattedText += "  <td height=7 colspan=3>" + Spacer1w7h + "</td>";
  46.   FormattedText += "  <td height=7 bgcolor=\"" + BorderColor + "\">" + Spacer2w1h + "</td>";
  47.   FormattedText += " </tr>";
  48.  
  49.   FormattedText += " <tr>";
  50.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\">" + ReqSpacer2w1h + "</td>";
  51.   FormattedText += "  <td>" + ReqSpacer5w1h + "</td>";
  52.   FormattedText += "  <td width=\"100%\" id=\"" + ParamTextID + "\">" + ParamText + "</td>";
  53.   FormattedText += "  <td>" + ReqSpacer5w1h + "</td>";
  54.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\">" + ReqSpacer2w1h + "</td>";
  55.   FormattedText += " </tr>";
  56.  
  57.   FormattedText += " <tr>";
  58.   FormattedText += "  <td height=7 bgcolor=\"" + BorderColor + "\">" + Spacer2w1h + "</td>";
  59.   FormattedText += "  <td height=7 colspan=3>" + Spacer1w7h + "</td>";
  60.   FormattedText += "  <td height=7 bgcolor=\"" + BorderColor + "\">" + Spacer2w1h + "</td>";
  61.   FormattedText += " </tr>";
  62.  
  63.   FormattedText += " <tr>";
  64.   FormattedText += "  <td height=2 colspan=5 bgcolor=\"" + BorderColor + "\">" + Spacer1w2h + "</td>";
  65.   FormattedText += " </tr>";
  66.   FormattedText += "</table>";
  67.  
  68.   return FormattedText;
  69. }
  70.