function fnRandomColourName()
{
var iRandom;
var sReturn;
var aaColourNames = new Array
("blue", "green", "orange", "red", "lightgreen", "lightblue");
iRandom = Math.round(Math.random() * 5);
return aaColourNames[iRandom];
} // fnRandomColourName
//** DATE:
//** March 2002
//** DESCRIPTION:
//** Creates a grid of coloured cells using html
//** tables and the background colour ('bgcolor' attribute)
//** of the table cell tag ('
'). This is a decorative
//** function.
function fnHtmlColourGrid(iRows, iColumns, sText)
{
var iCenterRow; //-- The middle row where the text will go
var iStartTextColumn //-- The column where the 1st letter will go
var iCharacterCounter //--
var sReturn = "";
if (sText == null)
{ sText = ""; }
iCharacterCounter = 0;
iCenterRow = Math.round(iRows / 2);
sReturn = "";
for (var jj = 0; jj < iRows; jj++)
{
sReturn += "";
for (var ii = 0; ii < iColumns; ii++)
{
if (iCharacterCounter < sText.length)
{
sReturn +=
"| " + sText.charAt(iCharacterCounter) + " | ";
}
else
{
sReturn +=
" | ";
} /* if, else */
iCharacterCounter++;
} /* for ii */
sReturn += " ";
} /* for jj */
sReturn += " ";
return sReturn;
} // fnHtmlColourGrid()
|