function OnBodyLoad( nFontIndex, bArchive )
{
	if (true == bArchive)
		PopulateArchives();
	//SetPrintFont( nFontIndex );
	SetPrintFontByName( nFontIndex );
}

function drawMagazineTitle( nTopicID )
{
	document.write ("<table cellspacing=0 cellpadding=0 border=0 width=575 height=30 background='/common/images/bgPat.gif'>");
	document.write ('<tr>');
	document.write ('<td width="85%" style="font: 20px Verdana; Color: 333333; padding: 4px;">');
	document.write ('<div id="idPageTopic" style="font: 20px Tam_Aniezhai;"><strong><font color="#FF4646">');
	document.write (arrTopics[nTopicID] + "</font></strong> </div>");
	document.write ("</td>");
	document.write ('<td width="15%" align="right" valign="middle"> ');
	document.write ("<img src='/common/images/print.gif' alt='print' align='top' style='cursor: pointer;' title='Print this page' onClick='javascript: void (printDoc(" + "\"" + FONT_FAMILY[arrTopics[nTopicID+1]] + "\"))';>" + "&nbsp;&nbsp;");
	document.write ("</td></tr></table>")
}

function writeFeatureTopic( idx )
{
	var strval = "<a style='font: " + FONT_FAMILY[arrFeatureTopic[idx+1]+1] + "px " + FONT_FAMILY[arrFeatureTopic[idx+1]] + "' href='" + arrFeatureTopic[idx+2] + "'>" + arrFeatureTopic[idx] + "</a>";
	document.write(strval);
}

function writeColumnTopic( idx )
{
	var strval = "<a style='font: " + FONT_FAMILY[arrColumnTopic[idx+1]+1] + "px " + FONT_FAMILY[arrColumnTopic[idx+1]] + "' href='" + arrFeatureTopic[idx+2] + "'>" + arrColumnTopic[idx] + "</a>";
	document.write(strval);
}

function drawemptyline( nHeight )
{
	document.write ("<table width=100% border=0 cellspacing=0 cellpadding=0>");
	document.write ("<tr><td height='" + nHeight + "px' bgcolor=white></td></tr></table>");
}

function downloadIssue( strCHM )
{
}

function writePageTopic( nIdx )
{
	var nFontIdx = arrTopics[(nIdx-1)*2+1];
	var strFontName = FONT_FAMILY[nFontIdx];
	var strFontSize = FONT_FAMILY[nFontIdx+1];
	
	document.write ("<span style='color:#FF4646; font: " + strFontSize + "px " +  strFontName + ";'><b>" + arrTopics[(nIdx-1)*2] + "</b></span>");
}
