//
//  This routine builds the HTML code to place ad icons on the home page of FAP.
//  The values were calculated in julian.js, and this routine is called from
//  each "cell" on the home page of FAP.
//

function fCell(CellNo) {

//
//  These global values were already calculated in icons.js.
//
//
// rFrequency=1;      // How often we rotate, expressed in Days
// iIconMax;          // How many icons we're rotating
// rFullRotation;     // How many times icon @ #1 each year
// rRotations;        // Rotations to date this year
// rRotationsPct      // Percent of current rotation
// rFirstIcon;        // Position #0 Icon

//
//  Now, calculate which ad goes into this cell...
//
var iIdx = CellNo + rFirstIcon

if (iIdx > (iIconMax - 1)) {
	iIdx = iIdx - iIconMax
}

document.write('<A HREF=' + iIconArrLink[iIdx] + '>')
document.write('<IMG SRC=' + iIconArrImag[iIdx] + ' HEIGHT=110 WIDTH=110 BORDER=1 ALT=' + iIconArrMeta[iIdx] + '></A>')
}