home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC/CD Gamer UK 45
/
PCGAMER45.bin
/
netware
/
msie4pp
/
ie4_s3.cab
/
IE4_3.CAB
/
MSHTMENU.DLL
/
2110
/
FORCHAR.DLG
< prev
next >
Wrap
Text File
|
1997-04-04
|
41KB
|
1,256 lines
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN">
<HTML id=dlgFont STYLE="font-family: 'ms sans serif'; font-size: '8pt';
width: '45.1em'; height: '38.99em'">
<HEAD>
<TITLE id=dialogTitle>
Font
</TITLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript" defer>
//+-------------------------------------------------------------------------
//
// This section contains code to be moved into a GLOBAL MODULE outside
// of this particular dialog.
//
//--------------------------------------------------------------------------
//----------------------------------------------------------------------
//
// Synopsis: Turns on the document's expando property. When this
// property is on, it is possible to create new expando
// properties or assign to existing ones.
//
// Arguments: none
//
// Returns: Nothing
//
//----------------------------------------------------------------------
function expandoOn()
{
document.expando = true;
} // expandoOn
//----------------------------------------------------------------------
//
// Synopsis: Turns off the document's expando property. When this
// property is off, it is possible to read the value of
// existing expando properties, but not possible to create
// new ones or modify existing ones.
//
// EXPANDO SHOULD BE OFF EXCEPT WHEN CREATING/MODIFYING
// EXPANDO PROPERTIES. This will save hours debugging
// accidentally created expando properties.
//
// Arguments: none
//
// Returns: Nothing.
//
//----------------------------------------------------------------------
function expandoOff()
{
document.expando = false;
} // expandoOff
//+----------------------------------------------------------------------
//
// Synopsis: Sets the state of a checkbox based on a range and a
// command id. The command ID comes from the VALUE of
// the checkbox.
//
// Arguments: checkbox The checkbox we're partying on
// range The range we're querying the status of
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function getCheckStateCmd(checkbox, range)
{
checkbox.checked = (true == range.queryCommandState(checkbox.value));
} // getCheckStateCmd
//+----------------------------------------------------------------------
//
// Synopsis: Sets the state of a select box based on a range and a
// command id. The command ID comes from the ID of the
// select box. (It's prefixed by "cmd".) NOTE: The VALUEs
// of OPTIONs of the SELECT box must be set to the possible
// return values of the queryCommandValue method.
//
// Arguments: radio The select box we're partying on
// range The range we're querying the status of
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function getSelectStateCmd(select, range)
{
var index;
for (index = 0; index < select.options.length; index++)
{
if ((select.options[index].value) ==
(range.queryCommandValue(select.id.substring(3))))
{
select.selectedIndex = index;
break;
}
}
} // getSelectStateCmd
//-----------------------------------------------------------------------
//
// Synopsis: Takes an element and a range and sets the state of the
// element based on the state of the range.
// HOW IT WORKS: See comments in the code.
//
// Arguments: element The element we're setting
// range The range we're querying the status of.
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function getStateCmd(element, range)
{
//
// Checkboxes with a name of "setCmdId" are set based on the command
// id in their VALUE attribute.
//
if (("checkbox" == element.type) && ("setCmdID" == element.name))
{
getCheckStateCmd(element, range);
}
//
// SELECT boxes with the name "setCmdID" are set based on the command
// id in their ID property (minus the "cmd" prefix). See the notes in
// the getSelectStateCmd function for more info.
//
else if (("SELECT" == element.tagName) && ("setCmdID" == element.name))
{
getSelectStateCmd(element, range);
}
} // getStateCmd
//+----------------------------------------------------------------------
//
// Synopsis: Loops through all the elements in the dialog and sets the
// appropriate elements based on the type and properties of
// the element.
//
// Arguments: none
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function initDialogCmd()
{
var index;
for (index = 0; index < document.all["setCmdID"].length; index++)
{
getStateCmd(document.all["setCmdID"][index],
globalDoc.selection.createRange());
}
} // initDialogCmd
//+----------------------------------------------------------------------
//
// Synopsis: Sets the state of a range based on the state of a checkbox
// and a command id. The command id comes from the VALUE of
// the checkbox.
//
// Arguments: checkbox: The checkbox we're querying the status of.
// range: The range we're partying on.
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function setCheckStateCmd(checkbox, range)
{
if (checkbox.checked !=
(true == range.queryCommandState(checkbox.value)))
{
range.execCommand(checkbox.value, false);
}
} // setCheckStateCmd
//+---------------------------------------------------------------------
//
// Synopsis: Sets the state of a range based on the selection in a
// SELECT box and a command id. The command id comes from
// the ID of the SELECT box (minus the "cmd" prefix).
// NOTE: The VALUEs of the OPTIONs of the SELECT box must
// be set to the possible values for the execCommand
// method.
//
// Arguments: select The select box we're querying the value of.
// range The range we're partying on.
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function setSelectStateCmd(select, range)
{
range.execCommand(select.id.substring(3), false,
select.options[select.selectedIndex].value);
} // setSelectStateCmd
//------------------------------------------------------------------------
//
// Synopsis: Takes an element and a range and sets the state of the
// range based on the state of the element.
// HOW IT WORKS: See comments in the code.
//
// Arguments: element The element we're querying the status of.
// range The range we're partying on.
//
// Returns: nothing
//
//------------------------------------------------------------------------
function setStateCmd(element, range)
{
//
// Checkboxes with a name of "setCmdID" effect the range based on
// the command id in their VALUE attribute.
//
if (("checkbox" == element.type) && ("setCmdID" == element.name))
{
setCheckStateCmd(element, range);
}
//
// SELECT boxes with a name of "setCmdID" effect the range based on
// the command id in their ID property (minus the "cmd" prefix).
// See the notes in the setSelectStateCmd function for more info.
//
else if (("SELECT" == element.tagName) && ("setCmdID" == element.name))
{
setSelectStateCmd(element, range);
}
} // setStateCmd
//+----------------------------------------------------------------------
//
// Synopsis: Loops through all the elements in the dialog and sets the
// properties of the document based on the type and properties
// of the element.
//
// Arguments: none
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function closeDialogCmd()
{
var index;
for (index = 0; index < document.all["setCmdID"].length; index++)
{
setStateCmd(document.all["setCmdID"][index],
globalDoc.selection.createRange());
}
} // closeDialogCmd
//----------------------------------------------------------------------
//
// Synopsis: Sort a one dimensional array alphabetically.
//
// Arguments: arr The array to be sorted
//
// Returns: The sorted array.
//
//----------------------------------------------------------------------
function sortArray(arr)
{
var index1;
var index2;
var arrLength = 0;
var tempValue;
for (index1 in arr)
{
arrLength++
}
for (index1 = 1; index1 < arrLength; index1++)
{
tempValue = arr[index1]
for (index2 = index1 - 1;
index2 >= 0 && tempValue < arr[index2];
index2--)
{
arr[index2 + 1] = arr[index2];
}
arr[index2 + 1] = tempValue
}
return arr;
} // sortArray
//+--------------------------------------------------------------------
//
// Synopsis: Selects the text in the control
//
// Arguments: ctl The control we're selecting the text in
//
// Returns: nothing
//
//---------------------------------------------------------------------
function selectText(ctl)
{
// ctl.select();
} // selectText
//+------------------------------------------------------------------------
//
// This section contains variables that need to be LOCALIZED
//
//-------------------------------------------------------------------------
var L_NoHelp_Text = "No help topic available.";
//+-------------------------------------------------------------------------
//
// This section contains code LOCAL to this particular dialog.
//
//--------------------------------------------------------------------------
expandoOff();
// Constants
var cmdForeColor = 55;
var cmdFontSize = 19;
var cmdBold = "Bold";
var cmdItalic = "Italic";
var cmdFontName = 18;
// Global variables
var globalDoc = window.dialogArgs.document; // The document we're
// working on.
var gintCustomColor // If the font is a custom
// color, store it here.
var gstrFontNormal =""; // The font of the text when
// the dialog is selected.
var gboolUpdateText // Whether to update textboxes
var gboolUpdateColor // Whether to update the
// font color
var gboolUpdateSize // Whether to update the
// font size
//+-----------------------------------------------------------------------
//
// Synopsis: Fills the passed in select box with all the fonts installed
// on the system.
//
// Arguments: select The select box we're filling with the font names
//
// Returns: nothing
//
//------------------------------------------------------------------------
function fillFontSelect(select)
{
var index;
var range = globalDoc.selection.createRange();
var fontList = new Array();
var optFontName;
for (index = 0; index < window.dialogArgs.fonts.length; index++)
{
fontList[index] = window.dialogArgs.fonts.item(index);
}
fontList = sortArray(fontList);
for (index = 0; index < window.dialogArgs.fonts.length; index++)
{
optFontName = new Option();
optFontName.value = fontList[index];
optFontName.text = fontList[index];
select.options[index + 1] = optFontName;
}
} // fillFontSelect
//+-----------------------------------------------------------------------
//
// Synopsis: Looks at the currently selected text and set selFontStyle
// appropriately
//
// Arguments: none.
//
// Returns: nothing
//
//------------------------------------------------------------------------
function getFontStyle()
{
var range = globalDoc.selection.createRange();
with range
{
if (queryCommandState(cmdBold) && queryCommandState(cmdItalic))
{
selFontStyle.value = "Bold-Italic";
}
else if (queryCommandState(cmdBold))
{
selFontStyle.value = "Bold";
}
else if (queryCommandState(cmdItalic))
{
selFontStyle.value = "Italic";
}
else
{
selFontStyle.value = "Regular";
}
}
} // getFontStyle
//+-----------------------------------------------------------------------
//
// Synopsis: Sets the current selection to bold or italic based on the
// setting of selFontStyle.
//
// Arguments: range The range we're partying on.
//
// Returns: nothing
//
//------------------------------------------------------------------------
function setFontStyle(range)
{
with range
{
if ("Bold-Italic" == selFontStyle.value)
{
if (true != queryCommandState(cmdBold))
{
execCommand(cmdBold, false);
}
if (true != queryCommandState(cmdItalic))
{
execCommand(cmdItalic, false);
}
}
else if ("Bold" == selFontStyle.value)
{
if (true != queryCommandState(cmdBold))
{
execCommand(cmdBold, false);
}
if (true == queryCommandState(cmdItalic))
{
execCommand(cmdItalic, false);
}
}
else if ("Italic" == selFontStyle.value)
{
if (true == queryCommandState(cmdBold))
{
execCommand(cmdBold, false);
}
if (true != queryCommandState(cmdItalic))
{
execCommand(cmdItalic, false);
}
}
else
{
if (true == queryCommandState(cmdBold))
{
execCommand(cmdBold, false);
}
if (true == queryCommandState(cmdItalic))
{
execCommand(cmdItalic, false);
}
}
}
} // setFontStyle
//+----------------------------------------------------------------------
//
// Synopsis: Sets the state of selColor based on the color of the
// selected font.
//
// Arguments: none
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function getFontColor()
{
var range = globalDoc.selection.createRange();
var intColor = range.queryCommandValue(cmdForeColor);
if (-1 != intColor)
{
gboolUpdateColor = true;
selColor.value = intColor;
if (parseInt(selColor.value) != parseInt(intColor))
{
gintCustomColor = intColor;
selColor.value = "custom";
}
}
} // getFontColor
//+--------------------------------------------------------------------------
//
// Synopsis: Sets the color of the selected text based on the selection
// in selColor.
//
// Arguments: range The range we're partying on.
//
// Returns: nothing
//
//---------------------------------------------------------------------------
function setFontColor(range)
{
var intDefaultColor = 33554432;
if (gboolUpdateColor)
{
if ("custom" == selColor.value)
{
range.execCommand(cmdForeColor, false,
parseInt(gintCustomColor));
return;
}
else if ("default" == selColor.value)
{
range.execCommand(cmdForeColor, false, intDefaultColor);
return;
}
else
{
range.execCommand(cmdForeColor, false,
parseInt(selColor.value));
}
}
} // setFontColor
//+----------------------------------------------------------------------
//
// Synopsis: Sets selFontSize to the size of the selected text.
//
// Arguments: none
//
// returns: nothing
//
//-----------------------------------------------------------------------
function getFontSize()
{
var range = globalDoc.selection.createRange();
var arrSize = new Array();
//
// Set up arrSize
//
arrSize[-2] = "Smallest";
arrSize[-1] = "Smaller";
arrSize[0] = "Normal";
arrSize[1] = "Large";
arrSize[2] = "Larger";
arrSize[3] = "Largest";
arrSize[4] = "Huge";
if ((range.queryCommandValue(cmdFontSize) <= 4) &&
(range.queryCommandValue(cmdFontSize) >= -2))
{
selFontSize.value = arrSize[range.queryCommandValue(cmdFontSize)];
gboolUpdateSize = true;
}
} // getFontSize
//+----------------------------------------------------------------------
//
// Synopsis: Sets the size of the selected text to the current
// selection in selFontSize
//
// Arguments: Why can't we all just get along? (none)
//
// Returns: At the customer service desk. (nothing)
//
//-----------------------------------------------------------------------
function setFontSize(range)
{
var arrSize = new Array();
//
// Set up arrSize
//
arrSize["Smallest"] = -2;
arrSize["Smaller"] = -1;
arrSize["Normal"] = 0;
arrSize["Large"] = 1;
arrSize["Larger"] = 2;
arrSize["Largest"] = 3;
arrSize["Huge"] = 4;
if (gboolUpdateSize)
{
range.execCommand(cmdFontSize, false, arrSize[selFontSize.value]);
}
} // setFontSize()
//+----------------------------------------------------------------------
//
// Synopsis: Check to see if "Custom" is selected in selColor. If it
// is, launch the choose color dialog.
//
// Arguments: None
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function customColor()
{
if ("custom" == selColor.value)
{
gintCustomColor = window.dialogArgs.choosecolordlg(gintCustomColor);
}
} // customColor
//+----------------------------------------------------------------------
//
// Synopsis: Fills a text box with the value of the calling control
// (which should be a select box).
//
// Arguments: ctlSelect The select box we're getting the value from
// ctlText The text box we're filling
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function syncSelect(ctlSelect, ctlText)
{
if (gboolUpdateText)
{
ctlText.value = ctlSelect.options[ctlSelect.selectedIndex].text;
}
} // syncSelect
//+-----------------------------------------------------------------------
//
// Synopsis: Takes a string and an options collection and finds the
// index of the option whose VALUE best matches the string
//
// Arguments: strMatch The string we're looking for a match to
// optionsList The options collection we're looking for
// the match in
//
// Returns: an integer representing the index of option that best
// matches the string.
//
//------------------------------------------------------------------------
function findMatch (strMatch, optionsList)
{
var index;
var index2;
var bestChar = 0;
var bestMatch = 0;
for (index = 0; index < optionsList.length; index++)
{
for (index2 = bestChar; index2 < strMatch.length; index2++)
{
if (strMatch.substring(0, index2 + 1).toLowerCase() ==
optionsList.options[index].text.substring(0, index2 + 1)
.toLowerCase())
{
bestChar = index2 + 1;
bestMatch = index;
}
else
{
break;
}
}
}
return bestMatch;
} // findMatch
//+----------------------------------------------------------------------
//
// Synopsis: Loops through all the controls in the dialog and updates
// the sample appropriately.
//
// Arguments: none
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function updateSample()
{
var rngSample = document.rangeFromElement(elmSample);
var index;
//
// Let's take advantage of the the dialog exit routines to set
// font face, underline, superscipt, and subscript.
//
for (index = 0; index < document.all["setCmdID"].length; index++)
{
setStateCmd(document.all["setCmdID"][index], rngSample);
}
setFontStyle(rngSample);
setFontColor(rngSample);
setFontSize(rngSample);
} // updateSample
//+-----------------------------------------------------------------------
//
// Synopsis: Looks at the currently selected text and fills the dialog
// options appropriately
//
// Arguments: None
//
// Returns: Nothing
//
//------------------------------------------------------------------------
function loadBdy()
{
//
// bind event to controls
//
document.onhelp = new Function("callHelp()");
document.onkeypress = new Function("defaultActions()");
txtFontName.onblur = new Function("gboolUpdateText = true;" +
"syncSelect(cmd18, txtFontName)");
txtFontName.onfocus = new Function("gboolUpdateText = false;" +
"selectText(txtFontName)");
txtFontName.onchange = new Function("setSelectStateCmd(cmd18," +
"document.rangeFromElement(elmSample))");
txtFontName.onkeyup = new Function("synchText()");
txtFontStyle.onblur = new Function("gboolUpdateText = true;" +
"syncSelect(selFontStyle, txtFontStyle)");
txtFontStyle.onfocus = new Function("gboolUpdateText = false;" +
"selectText(txtFontStyle)");
txtFontStyle.onchange = new Function("setFontStyle" +
"(document.rangeFromElement(elmSample))");
txtFontStyle.onkeyup = new Function("synchText()");
txtFontSize.onblur = new Function("gboolUpdateText = true;" +
"syncSelect(selFontSize, txtFontSize)");
txtFontSize.onfocus = new Function("gboolUpdateText = false;" +
"selectText(txtFontSize)");
txtFontSize.onchange = new Function("gboolUpdateSize = true;" +
"setFontSize(document.rangeFromElement(elmSample))");
txtFontSize.onkeyup = new Function("synchText()");
//
// cmd18 is the font list
//
cmd18.onchange = new Function("syncSelect(cmd18, txtFontName);" +
"setSelectStateCmd(cmd18, document.rangeFromElement(elmSample))");
selFontStyle.onchange = new Function("syncSelect(selFontStyle," +
"txtFontStyle);" +
"setFontStyle(document.rangeFromElement(elmSample))");
selFontSize.onchange = new Function("gboolUpdateSize = true;" +
"syncSelect(selFontSize, txtFontSize);" +
"setFontSize(document.rangeFromElement(elmSample))");
chkUnderline.onclick = new Function("setCheckStateCmd(chkUnderline," +
"document.rangeFromElement(elmSample))");
chkStrike.onclick = new Function("setCheckStateCmd(chkStrike," +
"document.rangeFromElement(elmSample))");
chkSuperscript.onclick = new Function("setCheckStateCmd" +
"(chkSuperscript," +
"document.rangeFromElement(elmSample))");
chkSubscript.onclick = new Function("setCheckStateCmd(chkSuperscript," +
"document.rangeFromElement(elmSample))");
selColor.onchange = new Function("gboolUpdateColor = true;" +
"customColor();" +
"setFontColor(document.rangeFromElement(elmSample))");
btnOK.onclick = new Function("btnOKClick()");
btnClear.onclick = new Function("btnClearClick()");
btnCancel.onclick = new Function("btnCancelClick()");
fillFontSelect(cmd18);
initDialogCmd();
getFontColor();
getFontStyle();
getFontSize();
txtFontSize.focus();
txtFontStyle.focus();
txtFontName.focus();
updateSample();
//
// These global variables must be set here because binding
// the events set them to the wrong state.
//
gintCustomColor = 0;
gboolUpdateText = true;
gboolUpdateColor = false;
gboolUpdateSize = false;
} //loadBdy
//-----------------------------------------------------------------------
//
// Synopsis: Closes the dialog without doing anything.
//
// Arguments: none.
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function btnCancelClick()
{
window.close();
} // btnCancelClick
//+-----------------------------------------------------------------------
//
// Synopsis: Goes through all the controls on the dialog and sets them
// to their default values.
//
// Arguments: none.
//
// returns: nothing.
//
//------------------------------------------------------------------------
function btnClearClick()
{
//
// First, the style
//
selFontStyle.value = "Regular";
//
// Then the font and font size
//
cmd18.value = gstrFontNormal;
selFontSize.value = "Normal";
//
// Then the effects BUGBUG: this is not needed until the appropriate
// command ids are supported
//
chkUnderline.checked = false;
//chkSuperscript.checked = false;
//chkSubscript.checked = false;
//
// Then the color
//
selColor.value = "default";
//
// Now update everything
//
txtFontSize.focus();
txtFontStyle.focus();
txtFontName.focus();
updateSample();
//
// set focus back to clear button (just in case)
//
btnClear.focus();
} // btnClearClick
//+----------------------------------------------------------------------
//
// Synopsis: Closes the dialog after applying the user's selections
// to the document
//
// Arguments: none
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function btnOKClick()
{
var range = globalDoc.selection.createRange();
closeDialogCmd();
setFontColor(range);
setFontStyle(range);
setFontSize(range);
window.close();
} // btnOKClick
//+---------------------------------------------------------------------
//
// Synopsis: Looks for the ENTER and ESCAPE keypresses and runs
// the default action.
//
// Arguments: see OM spec
//
// Returns: nothing
//
//-----------------------------------------------------------------------
function defaultActions()
{
var htmlKeyReturn = 13;
var htmlKeyEscape = 27;
if (event.keyCode == htmlKeyReturn)
{
btnOK.focus();
btnOKClick();
}
else if (event.keyCode == htmlKeyEscape)
{
btnCancelClick();
}
} // defaultActions
//+---------------------------------------------------------------------
//
// Synopsis: Looks to see if current element is a text box. If it is,
// calls findMatch with the corresponding select box.
//
// Arguments: none
//
// Returns: nothing
//
//----------------------------------------------------------------------
function synchText()
{
var elmSource = window.event.srcElement;
var arrSelect = new Array();
//
// Set up select boxes with corresponding text boxes
//
arrSelect["txtFontName"] = cmd18;
arrSelect["txtFontStyle"] = selFontStyle;
arrSelect["txtFontSize"] = selFontSize;
if ("INPUT" == elmSource.tagName)
{
if ("text" == elmSource.type)
{
arrSelect[elmSource.id].selectedIndex
= findMatch(elmSource.value, arrSelect[elmSource.id].options);
}
}
} // synchText
//+-------------------------------------------------------------------------
//
// Synopsis: Opens the help file with the appropriate helpid
//
// Arguments: none
//
// Returns: nothing
//
//--------------------------------------------------------------------------
function callHelp()
{
// BUGBUG Once we get help for the editing dialogs, this function
// will have to change.
alert(L_NoHelp_Text);
} // callHelp
</SCRIPT>
<BODY onload="loadBdy()" style="font-family: 'ms sans serif'; font-size: '8pt';
background: buttonface;">
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '2em'; LEFT: '1em';
TOP: '1em'; WIDTH: '20em';">
<LABEL for=txtFontName tabIndex=-1><u>F</u>ont:</LABEL>
</DIV>
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '2em'; LEFT: '21.5em';
TOP: '1em'; WIDTH: '18.2em'">
<LABEL for=txtFontStyle tabIndex=-1>Font St<u>y</u>le:</LABEL>
</DIV>
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '2em'; LEFT: '33.5em';
TOP: '1em'; WIDTH: '9.9em'">
<LABEL for=txtFontSize tabIndex=-1><u>S</u>ize:</LABEL>
</DIV>
<INPUT type=text ID=txtFontName ACCESSKEY=f tabIndex=5
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '2.1em'; LEFT: '1em';
TOP: '2.4em'; WIDTH: '19.25em'">
<INPUT type=text ID=txtFontStyle ACCESSKEY=y tabIndex=10
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '2.1em'; LEFT: '21.5em';
TOP: '2.4em'; WIDTH: '11em'">
<INPUT type=text ID=txtFontSize ACCESSKEY=s tabIndex=15
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '2.1em'; LEFT: '33.5em';
TOP: '2.4em'; WIDTH: '10em'">
<!--
cmd18 is the font list
-->
<SELECT style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
LEFT: '1em'; TOP: '4.9em';
WIDTH: '19.25em'; HEIGHT: '11.1em'"
ID=cmd18 name=setCmdID ACCESSKEY=f tabIndex=17 size=7>
<OPTION value="">Default</OPTION>
</SELECT>
<SELECT ID=selFontStyle ACCESSKEY=y size=7 tabIndex=20
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '11.1em'; LEFT: '21.5em';
TOP: '4.9em'; WIDTH: '11em'">
<OPTION VALUE=Regular SELECTED> Regular </OPTION>
<OPTION VALUE=Italic> Italic </OPTION>
<OPTION VALUE=Bold> Bold </OPTION>
<OPTION VALUE=Bold-Italic> Bold Italic </OPTION>
</SELECT>
<SELECT ID=selFontSize ACCESSKEY=s size=7 tabIndex=30
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '11.1em'; LEFT: '33.5em';
TOP: '4.9em'; WIDTH: '10em'">
<OPTION VALUE=Smallest> Smallest </OPTION>
<OPTION VALUE=Smaller> Smaller </OPTION>
<OPTION VALUE=Normal SELECTED> Normal </OPTION>
<OPTION VALUE=Large> Large </OPTION>
<OPTION VALUE=Larger> Larger </OPTION>
<OPTION VALUE=Largest> Largest </OPTION>
<OPTION VALUE=Huge> Huge </OPTION>
</SELECT>
<table cellspacing borderColorDark=buttonhighlight
borderColorLight=buttonshadow border noshade="yes" cellpadding=10
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '15.3em'; LEFT: '1em';
TOP: '17.5em'; WIDTH: '15em'">
<tr>
<td>
<DIV style="color: buttonface;">a</DIV>
</td></tr>
</table>
<INPUT ID=chkUnderline ACCESSKEY=u type=checkbox tabIndex=35 value=Underline
name=setCmdID
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '20em'; left: '3em';
width: '1em'; height: '1em'">
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '20em'; left: '4.5em';
width: '6em'; height: '1em'">
<LABEL style="font-family: 'ms sans serif'; font-size: '8pt';" for=chkUnderline
tabIndex=-1><u>U</u>nderline
</LABEL>
</DIV>
<!--
BUGBUG
When the command IDs for strikethrough, superscript, and subscript get
implemented, change the names of the next three checkboxes from 0setCmdID to
setcmdID. And they will have to be reenabled.
-->
<INPUT ID=chkStrike ACCESSKEY=k value=StrikeThrough type=checkbox tabIndex=40
DISABLED name=0setCmdID
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '22em'; left: '3em';
width: '1em'; height: '1em'">
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '22em'; left: '4.5em';
width: '6em'; height: '1em'">
<LABEL style="font-family: 'ms sans serif'; font-size: '8pt';" for=chkStrike
tabIndex=-1>Stri<u>k</u>ethrough
</LABEL>
</DIV>
<INPUT ID=chkSuperscript ACCESSKEY=p type=checkbox tabIndex=45
value=Superscript DISABLED name=0setCmdID
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '24em'; left: '3em';
width: '1em'; height: '1em'">
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '24em'; left: '4.5em';
width: '6em'; height: '1em'">
<LABEL style="font-family: 'ms sans serif'; font-size: '8pt';" for=chkSuper
tabIndex=-1>Su<u>p</u>erscript
</LABEL>
</DIV>
<INPUT ID=chkSubscript ACCESSKEY=b type=checkbox tabIndex=50 value=Subscript
DISABLED name=0setCmdID
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '26em'; left: '3em';
width: '1em'; height: '1em'">
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '26em'; left: '4.5em';
width: '6em'; height: '1em'">
<LABEL style="font-family: 'ms sans serif'; font-size: '8pt';" for=chkSubscript
tabIndex=-1>Su<u>b</u>script
</LABEL>
</DIV>
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '28em'; left: '3em';
width: '6em'; height: '1em'">
<LABEL style="font-family: 'ms sans serif'; font-size: '8pt';" for=selColor
tabIndex=-1><u>C</u>olor:</LABEL>
</DIV>
<SELECT ID=selColor ACCESSKEY=c tabIndex=55
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
top: '29.5em'; left: '3em';
width: '11em'; height: '2.1em'">
<OPTION value=default> </OPTION>
<OPTION value=33554432> Black </OPTION>
<OPTION value=50331647> White </OPTION>
<OPTION value=33587200> Green </OPTION>
<OPTION value=33554560> Maroon </OPTION>
<OPTION value=33587328> Olive </OPTION>
<OPTION value=41943040> Navy </OPTION>
<OPTION value=41943168> Purple </OPTION>
<OPTION value=41975936> Gray </OPTION>
<OPTION value=33619967> Yellow </OPTION>
<OPTION value=33619712> Lime </OPTION>
<OPTION value=50331392> Aqua </OPTION>
<OPTION value=50266367> Fuchsia </OPTION>
<OPTION value=46186688> Silver </OPTION>
<OPTION value=33554687> Red </OPTION>
<OPTION value=50266112> Blue </OPTION>
<OPTION value=41975808> Teal </OPTION>
<OPTION value=custom> Custom </OPTION>
</SELECT>
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
background: buttonface;
COLOR: buttontext; HEIGHT: '1em'; LEFT: '2em'; TOP: '17em'; WIDTH: '3.5em';">
<LABEL tabIndex=-1>Effects</LABEL>
</DIV>
<table cellspacing borderColorDark=buttonhighlight
borderColorLight=buttonshadow border noshade="yes" border=1
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
HEIGHT: '15.3em'; LEFT: '17em';
TOP: '17.5em'; WIDTH: '26.5em'">
<tr>
<td style="font-family: 'ms sans serif'; font-size: '8pt'; position: relative;
width: '16em';
height: '10em'">
<CENTER id=elmSample><NOBR>__ AaBbYyGgLlJj __</NOBR></CENTER>
</td>
</tr>
</table>
<DIV style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
background: buttonface;
HEIGHT: '1em'; LEFT: '18em'; TOP: '17em'; WIDTH: '3.5em'">
<LABEL>Sample</LABEL>
</DIV>
<BUTTON id=btnOk tabIndex=60
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
LEFT: '21.5em'; TOP: '33.5em';
WIDTH: '6.8em'; HEIGHT: '2.1em'">
OK</BUTTON>
<BUTTON id=btnClear tabIndex=65 ACCESSKEY=a
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
LEFT: '29.1em'; TOP: '33.5em';
WIDTH: '6.8em'; HEIGHT: '2.1em'">
Clear <U>A</U>ll</BUTTON>
<BUTTON id=btnCancel tabIndex=70
style="font-family: 'ms sans serif'; font-size: '8pt'; position: absolute;
LEFT: '36.7em'; TOP: '33.5em';
WIDTH: '6.8em'; HEIGHT: '2.1em'">
Cancel</BUTTON>
</BODY>
</HTML>