//Writes Alert Box Display to Screen with Content
function DisplayMcAfeeAlerts() {
	strcontent = "";
	strlogo = "";
	strbox = "";
	//flag = 0;
	strbox = strbox+'<table width="145" id="VirusAlerts" class="TableGreyBorder" cellpadding="0px" cellspacing="0px">';
	if(dspylogolnk == 1) {
		if (VALIDATE_MCAFEE_URL)
		{
			if (lnklogo.search(SEARCH_EXPRESSION) > 0)
				lnklogo=DefaultLinklogo;
		}

		strlogo = strlogo + '<a href="' + lnklogo + '" target="McAfee">';
		strlogo = strlogo + '<img src="' + ImageServerDomain + '/McAfeeLogo.gif" alt="McAfee logo" border="0"></a><br>';
		//flag = 0;
	}
	else {
		strlogo = strlogo + '<img src="' + ImageServerDomain + '/McAfeeLogo.gif" alt="McAfee logo" border="0"><br>';
		//flag = 0;
	}
	strbox = strbox+'<tr><td id="VirusAlertsLogo">'+strlogo+'</td></tr>';
	if(dsplycur == 1) {
		strcontent =""
		if ( MAX_CURRENT_THREATS_DISPLAY_COUNT > 0)
		{
			if (CurrentThreatsRecordCount > 0 )
				strcontent = CurrentThreatsLayouts();
			else
				strcontent = NO_CURRENT_THREATS_MESSAGE;
			strbox = strbox + strcontent;
		}			

	}
	if(dsplyrec == 1) {
		strcontent = "";
		if ( MAX_RECENT_THREATS_DISPLAY_COUNT > 0)
		{
			if (RecentThreatsRecordCount > 0 )
			strcontent = RecentThreatsLayouts();
			else
				strcontent = NO_RECENT_THREATS_MESSAGE;
			strbox = strbox + strcontent;
		}			
	}
	strbox = strbox+'</table>';
	document.write (strbox);
}

function CurrentThreatsLayouts()
{
	RecordDisplayCount = ArrayCT.length

	if (RecordDisplayCount > MAX_CURRENT_THREATS_DISPLAY_COUNT)
		RecordDisplayCount = MAX_CURRENT_THREATS_DISPLAY_COUNT
		strcontent = '<tr><td class="BodyContent TableGreyTopBorder"><div class="SmallBlueTab">'+CURRENT_THREATS+'</div>';
	for (i=0; i < RecordDisplayCount; i++) 
	{ 
    	strcontent = strcontent + '<div style="width:135px; padding: 0px 5px 3px 5px;">'
				+'<a href="'+ McAfeeDomain + ArrayCT[i][6] +'" target="McAfee">' + ArrayCT[i][1] + '</a><br>' +
				ArrayCT[i][3].substr(0,1).toUpperCase() +ArrayCT[i][3].substr(1,ArrayCT[i][3].length).toLowerCase() + 
				'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+  ArrayCT[i][5]+'</div>';
	}
	strcontent = strcontent +'</td></tr>';
	return  strcontent;
}
function RecentThreatsLayouts()
{
	RecordDisplayCount = ArrayRT.length
	
	if (RecordDisplayCount > MAX_RECENT_THREATS_DISPLAY_COUNT)
		RecordDisplayCount = MAX_RECENT_THREATS_DISPLAY_COUNT

	strcontent = '<tr><td class="BodyContent TableGreyTopBorder"><div class="SmallBlueTab">'+ RECENT_THREATS+'</div>'
	for (i=0; i < RecordDisplayCount; i++) 
	{ 
		strcontent = strcontent+'<div style="width:135px; overflow: hidden; padding: 0px 5px 3px 5px;">'
				+'<a href="' + McAfeeDomain + '/virusInfo/default.asp?id=description&virus_k='+ArrayRT[i][0] + '" target="McAfee">' +  
				ArrayRT[i][1] + '</a></div>';

	}
	strcontent = strcontent +	'<br><div class="MoreLink"><a href="' + COMPLETE_LIST_URL + '" target="McAfee">' + COMPLETE_LIST + ' &raquo;</a> </div>'
				+'</td></tr>';
	return  strcontent;
}






