

// Want to customise the look and feel of the virus information
// on your site? Simply change the following values to your own
// preferences.
//
// Changing the value of 'count' will change the number of rows
// displayed.
// Changing the value of 'target' to 'new' will display the link in
// a new window.

// *****************************************************************
var bgcolour_main     = '#ffffff'
var bgcolour_heading  = '#ffffff'
var text_colour       = '#000000'
var link_colour       = '#000099'
var font_size         = '1'
var font_face         = 'verdana, arial, helvetica, sans-serif'
var count             =  10   // number should be between 1 and 10
var first_column      = 'yes' // 'yes' or 'no'
var cellspacing       = 'no' // 'yes' or 'no'
var target            = '_blank' // '_blank' or '_blank'

// *****************************************************************
//  Be careful not to change anything below this line!


/**
 * Sophos info feed: latest virus alerts
 * Ten Alerts
 */
function tenAlerts() {

  var htmltxt = "";
	var font_desc = '<font face="' + font_face + '" size="'
	+ font_size + '" color="' + text_colour + '">';
	var tmp_count = 0;
	
	if (first_column == "no") {
	colspan = 1;
	} else {
	colspan = 3;
	}
	
	if (cellspacing == "no") {
	cellspacing = 0;
	} else {
	cellspacing = 0;
	}
	
	if (count > 0) {
	if (count > 10) {count = 10}
	htmltxt += '\n<table width="100%" cellpadding="0" cellspacing="'
	+ cellspacing + '" border="0" bgcolor="#ffffff" >';
	if (count == 1) {
	htmltxt += '\n<tr><td colspan="' + colspan + '" bgcolor="'
	+ bgcolour_heading + '" style="padding:5px 0px 0px 10px"></td></tr>';
	} else {
	htmltxt += '\n<tr><td colspan="' + colspan + '" bgcolor="'
	+ bgcolour_heading + '" style="padding:5px 0px 0px 10px"></td></tr>';
	}
	
	
	
	for (var i=0; i<tenalerts.length; i+=3) {
	tmp_count++;
	if (tmp_count > count) {
	break;
	} else {
	if (first_column == "no") {
	 htmltxt += '\n<tr><td width="20" height="17" align="right" style="padding:1px 5px 0px 0px"><img src="/common/images/icon_arrow_g.gif" align="absmiddle"></td><td class="vinfo" bgcolor="' + bgcolour_main + '" style="padding:1px 0px 0px 0px"><a href="' + tenalerts[i+2] + '" target="'
	 + target + '">' + tenalerts[i+1]
	 + '</a></td><td class="vinfo" align=right>[' + tenalerts[i+0]
	 + ']</td></tr>';
	} else {
	 htmltxt += '\n<tr><td width="20" height="17" align="right" style="padding:1px 5px 0px 0px"><img src="/common/images/icon_arrow_g.gif" align="absmiddle"></td><td class="vinfo" style="padding:1px 0px 0px 0px"><a href="' + tenalerts[i+2] + '" target="'
	 + target + '">' + tenalerts[i+1]
	 + '</a></td><td class="vinfo" align=right>[' + tenalerts[i+0]
	 + ']</td></tr>';
	}
	}
	}
	} else {
	document.write
	("=== Sophos info feed error: Specify value of count > 0 ===");
	}
	
	htmltxt += '\n</table>';
	
	document.write(htmltxt);
}



/**
 * Sophos info feed: top viruses last month
 * Top Ten
 */
function topTen() {

  var htmltxt = "";
	var font_desc = '<font face="' + font_face + '" size="'
	   + font_size + '" color="' + text_colour + '">';
	var tmp_count = 0;
	
	if (first_column == "no") {
	   colspan = 1;
	} else {
	   colspan = 2;
	}
	
	if (cellspacing == "no") {
	   cellspacing = 0;
	} else {
	   cellspacing = 0;
	}
	
	
	if (count > 0) {
	   if (count > 10) {count = 10}
	   htmltxt += '\n<table width="100%" cellpadding="0" cellspacing="'
	   + cellspacing + '" border="0" bgcolor="#ffffff">';
	   if (count == 1) {
	     htmltxt += '\n<tr><td height=2 colspan="' + colspan + '"></td></tr>';
	   } else {
	     htmltxt += '\n<tr><td height=2 colspan="' + colspan + '"></td></tr>';
	   }
	
	   for (var i=0; i<topten.length; i+=3) {
	     tmp_count++;
	     if (tmp_count > count) {
	       break;
	     } else {
	       if (first_column == "no") {
	         htmltxt += '\n<tr><td class="vinfo" width="25" height="17" align="right" style="padding:1px 5px 0px 0px"><a href="' + topten[i+2] + '" target="'
	         + target + '">' + topten[i+1]
	         + '</a></td></tr>';
	       } else {
	         htmltxt += '\n<tr><td class="vinfo" width="25" height="17" align="right" style="padding:1px 5px 0px 0px">'
	         + topten[i+0]
	         + '.</td><td height=10 class="vinfo"><a href="' + topten[i+2] + '" target="'
	         + target + '">' + topten[i+1]
	         + '</a></td></tr>';
	       }
	     }
	   }
	} else {
	   document.write
	   ("=== Sophos info feed error: Specify value of count > 0 ===");
	}
	
	htmltxt += '\n</table>';
	
	document.write(htmltxt);
}




