// 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     = '#EFEFEF'
var bgcolour_heading  = '#EFEFEF'
var text_colour       = '#000000'
var link_colour       = '#000099'
var font_size         = '1'
var font_face         = 'verdana, arial, helvetica, sans-serif'
var count             =  3   // number should be between 1 and 10
var first_column      = 'yes' // 'yes' or 'no'
var cellspacing       = 'yes' // 'yes' or 'no'
var target            = 'new' // '_self' or 'new'

// *****************************************************************
//  Be careful not to change anything below this line!


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 = 1;
}  

if (count > 0) {
  if (count > 10) {count = 10}
  htmltxt += '\n<table height="80" width="170" cellpadding="3" cellspacing="' 
  + cellspacing + '" border="0" bgcolor="#CCCCCC">';
  //if (count == 1) {
  //  htmltxt += '\n<tr><td colspan="' + colspan + '" bgcolor="'
  //  + bgcolour_heading + '">' + font_desc 
  //  + '<b>Latest virus alert</b></font></td></tr>';
  //} else { 
  //   htmltxt += '\n<tr><td colspan="' + colspan + '" bgcolor="'
  //  + bgcolour_heading + '">' + font_desc + '<b>Latest ' 
  //  + count + ' virus alerts</b></font></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 bgcolor="' + bgcolour_main + '">' 
        + font_desc + '<a href="' + tenalerts[i+2] + '" target="' 
        + target + '">'
        + '"><nobr>' + tenalerts[i+1]
        + '</nobr></a></td></tr>';
      } else {  
        htmltxt += '\n<tr><td bgcolor="' + bgcolour_main + '">' 
        + font_desc + '<nobr><p class="mvl">' + tenalerts[i+0] 
        + '</nobr></td><td bgcolor="' + bgcolour_main + '">' 
        + font_desc + '<a href="' + tenalerts[i+2] + '" target="' 
        + target + '">'
        + '<nobr>' + tenalerts[i+1]
        + '</nobr></a></td></tr>';
      }
    }  
  }
} else {
  document.write
  ("=== Sophos info feed error: Specify value of count > 0 ===");
}

// Please do not remove the code after this point. 

htmltxt += '\n<tr><td colspan="' + colspan + '" bgcolor="'
+ bgcolour_heading + '"><p class="mvl">' + font_desc 
+ 'Source: <a href="http://www.sophos.com" target="' 
+ target + '">'
+ 'Sophos</a></td></tr>';
//htmltxt += '\n<tr><td colspan="' + colspan + '" bgcolor="'
//+ bgcolour_heading + '">' + font_desc 
//+ '<a href="http://www.sophos.com/virusinfo/infofeed/" target="' 
//+ target + '"><font color="' + link_colour 
//+ '">Add this info to your website</font></a></td></tr>';
htmltxt += '\n</table>';
document.write(htmltxt);

