// JavaScript Document

var bgcolour_main     = '#ffffff'
		var bgcolour_heading  = '#ffffff'
		var text_colour       = '#000000'
		var link_colour       = '#0066FF'
		var font_size         = '1'
		var font_face         = 'verdana, arial, sans-serif'
		var count             =  6   // number should be between 1 and 10
		var first_column      = 'yes' // 'yes' or 'no'
		var cellspacing       = 'no' // 'yes' or 'no'
		var target            = 'new' // '_self' or 'new'
		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 = 2;
		}  
		
		if (count > 0) {
		  if (count > 10) {count = 10}
		  htmltxt += '\n<table cellpadding="3" cellspacing="' + cellspacing + '" border="0">';
		  if (count == 1) 
		  {
			htmltxt += '\n<tr><td colspan="' + colspan + '">' + font_desc + '<b>Latest virus alert</b></font></td></tr>';
		  } else { 

		  }
		
		  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>' + '<a href="' + tenalerts[i+2] + '" target="' + target + '"><font color="'
				+ link_colour + '"><nobr>' + tenalerts[i+1]
				+ '</nobr></font></a></font></td></tr>';
			  } else {  
				htmltxt += '\n<tr><td>' 
				+ '<nobr>' + tenalerts[i+0] 
				+ '</nobr></font></td><td align=left>' 
				+ '<a href="' + tenalerts[i+2] + '" target="' 
				+ target + '"><font color="'
				+ link_colour + '"><nobr>' + tenalerts[i+1]
				+ '</nobr></font></a></font></td></tr>';
			  }
			}  
		  }
		} else {
		  document.write
		  ("=== Sophos info feed error: Specify value of count > 0 ===");
		}
		
		

		htmltxt += '\n</table>';
		
		document.write(htmltxt);