var count  =  10   // number should be between 1 and 10

function SophosLatest() {
	var t = "";
	var c = 0;
	if (count > 0) {
		if (count > 10) {count = 10}
		t += '\n<table class="wide pt10">';
		t += '\n<tr><td class="sophos1" colspan="2">Latest ' + count + ' virus alerts</td></tr>';
		for (var i=0; i<tenalerts.length; i+=3) {
			c++;
			if (c > count) {
				break;
			} else {
				t += '\n<tr><td class="sophos2">' + tenalerts[i+0] + '</td>' + 
					 '<td class="sophos2"><a href="' + tenalerts[i+2] + '" target="_blank">' + 
					 tenalerts[i+1] + '</a></td></tr>';
			}  
		}
	} else {
		return("Info feed error!"); 
	}
	return(t += '\n<tr>\n</table>');	
}

function SophosTopTen() {
	var t = "";
	var c = 0;
	if (count > 0) {
		if (count > 10) {count = 10}
		t += '\n<table class="wide pt10">';
		t += '\n<tr><td class="sophos1" colspan="2">Top ' + count + ' for ' + month +'</td></tr>';
		for (var i=0; i<topten.length; i+=3) {
			c++;
			if (c > count) {
				break;
			} else {
				t += '\n<tr><td class="sophos2">' + topten[i+0] + '</td>' + 
					 '<td class="sophos2"><a href="' + topten[i+2] + '" target="_blank">' + 
					 topten[i+1] + '</a></td></tr>';
			}  
		}
	} else {
		return("Info feed error!"); 
	}
	return(t += '\n<tr>\n</table>');	
}

function SophosHoaxes() {
	var t = "";
	var c = 0;
	if (count > 0) {
		if (count > 10) {count = 10}
		t += '\n<table class="wide pt10">';
		t += '\n<tr><td class="sophos1" colspan="2">Top ' + count + ' virus hoaxes</td></tr>';
		for (var i=0; i<hoax.length; i+=3) {
			c++;
			if (c > count) {
				break;
			} else {
				t += '\n<tr><td class="sophos2">' + hoax[i+0] + '</td>' + 
					 '<td class="sophos2"><a href="' + hoax[i+2] + '" target="_blank">' + 
					 hoax[i+1] + '</a></td></tr>';
			}  
		}
	} else {
		return("Info feed error!"); 
	}
	return(t += '\n<tr>\n</table>');	
}
