
/***********************/
/* sbrown@symantec.com */
/* version 0.5-8       */
/***********************/
/****************************************************/
/* Modified by Matthew Duhan    md@northwestern.edu */
/* 2004-06-25 for Northwestern University IT        */
/* version 0.5-8a                                   */
/****************************************************/


/* defaults */
var symBORDcolor = '888888';
var symBACKcolor = 'white';
var symFONTcolor = 'black';
var symLINKcolor = 'blue';

var symLmax = 5;  // # of latest threats
var symRmax = 3;  // # of removal tools
var symAmax = 2;  // # of security advisories

var symTshow = 1;  // Show Top Threats
var symSshow = 1;  // Show search box

var numColsA = 0;  // # of columns of line 1
var numColsB = 0;  // # of columns of line 2
var numCols = 0;   // # of columns of info
var totColsA = 1;  // # of total columns in line 1 (2n+1) where n is info
var totColsB = 1;  // # of total columns in line 2 (2n+1) where n is info
var totCols = 1;   // # of total columns in table (2n+1) where n is info


function symDisplay() {

if ( symLmax > 0 )  { numColsA = numColsA + 1; }
if ( symTshow > 0 ) { numColsA = numColsA + 1; }
if ( symRmax > 0 )  { numColsB = numColsB + 1; }
if ( symAmax > 0 )  { numColsB = numColsB + 1; }

if (numColsB > numColsA) {
	numCols = numColsB;
} else {
	numCols = numColsA;
}
if ( numColsA > 0 )  { totColsA = (2 * numColsA) - 1; }
if ( numColsB > 0 )  { totColsB = (2 * numColsB) - 1; }
if ( numCols > 0 )  { totCols = (2 * numCols) - 1; }

	/* header */
	document.writeln('<table width="520" border="0" cellpadding="0" cellspacing="0" id="virus">');
	document.writeln(' <tr>');
	document.writeln('  <td align="center" colspan="'+totCols+'" class="zcellitltblue">');

	var logo_url = 'symc_logo_white.gif';
	if ( symBACKcolor == 'white' ) logo_url = 'symc_logo_white.gif';
	if ( symBACKcolor == 'black' ) logo_url = 'symc_logo_black.gif';

//	var full_url = 'http://securityresponse.symantec.com/avcenter/graphics/jslogo/'+logo_url;
	var full_url = 'http://nuinfo-proto4.northwestern.edu/nuit/images/symc-logo.gif';

	document.writeln('<h2>Virus Security Alerts</h2>');
	document.writeln('<h3><a target="_blank" href="http://securityresponse.symantec.com/"><img src="'+full_url+'" width="80" height="30" border="0" alt="Symantec"></a></h3>');
//	document.writeln('<h3><a target="_blank" href="http://securityresponse.symantec.com/"><img src="'+full_url+'" width="130" height="48" border="0" alt="Symantec"></a></h3>');
	document.writeln('  </td>');
	document.writeln(' </tr>');

	document.writeln(' <tr align="left" valign="top">');

	/* latest threats */
	if ( symLmax > 0 ) {

		var colSpan = "";
		var clas = "l";
		var spacerTD = "";
		if ( symTshow == 0 ) {
			colSpan = ' colspan="'+totColsB+'"';
			clas = 'm';
		}
		if ( numColsA > 1 ) {
			spacerTD = '  <td width="20" class="dkborderr">&nbsp;</td>';
		}

		document.writeln('  <td'+colSpan+' class="dkborder'+clas+'"><table border="0" cellspacing="1" cellpadding="0">');

		document.writeln('   <tr align="left" valign="top">');
		document.writeln('    <td colspan="3"><h3>Latest Threats</h3></td>');
		document.writeln('   </tr>');
		for ( i=0; i<symLmax; i++ ) {

			var full_url = 'http://securityresponse.symantec.com/avcenter/venc/data/'+symLurls[i];

			document.writeln('    <tr align="center" valign="top">');
			document.writeln('     <td width="12"><p class="lv'+symLrisks[i]+'">'+symLrisks[i]+'</p></td>');
			document.writeln('     <td nowrap="nowrap"><p>'+symLdates[i]+'</p></td>');
			document.writeln('     <td align="left"><p><a target="_blank" href="'+full_url+'">'+symLnames[i]+'</a></p></td>');
			document.writeln('    </tr>');

		}

		document.writeln('    <tr align="left" valign="top">');
		document.writeln('     <td width="12"></td>');
		document.writeln('     <td></td>');
		document.writeln('     <td><p><a target="_blank" href="http://securityresponse.symantec.com/avcenter/vinfodb.html">More...</a></p></td>');
		document.writeln('    </tr>');
		
		document.writeln('  </table></td>');
		document.writeln(spacerTD);

	}

	/* top threats */
	if ( symTshow > 0 ) {

		var colSpan = "";
		var clas = "r";
		if ( symLmax == 0 ) {
			colSpan = ' colspan="'+totColsB+'"';
			clas = 'm';
		}

		document.writeln('  <td'+colSpan+' class="dkborder'+clas+'"><table border="0" cellspacing="1" cellpadding="0">');

		document.writeln('    <tr align="left" valign="top">');
		document.writeln('     <td colspan="3"><h3>Top Threats</h3></td>');
		document.writeln('    </tr>');
		for ( i=0; i<(symTurls.length-1); i++ ) {

			var full_url = 'http://securityresponse.symantec.com/avcenter/venc/data/'+symTurls[i];

			document.writeln('    <tr align="center" valign="top">');
			document.writeln('     <td width="12"><p class="lv'+symTrisks[i]+'">'+symTrisks[i]+'</p></td>');
			document.writeln('     <td nowrap="nowrap"><p>'+symTdates[i]+'</p></td>');
			document.writeln('     <td align="left"><p><a target="_blank" href="'+full_url+'">'+symTnames[i]+'</a></p></td>');
			document.writeln('    </tr>');

		}

		document.writeln('  </table></td>');

	}

	document.writeln('  </tr>');
	document.writeln(' <tr align="left" valign="top">');


	/* removal tools */
	if ( symRmax > 0 ) {

		var colSpan = "";
		var clas = "l";
		var spacerTD = "";
		if ( symAmax == 0 ) {
			colSpan = ' colspan="'+totColsA+'"';
			clas = 'm';
		}
		if ( numColsB > 1 ) {
			spacerTD = '  <td width="20" class="dkborderr">&nbsp;</td>';
		}

		document.writeln('  <td'+colSpan+' class="dkborder'+clas+'"><h3>Removal Tools</h3>');
		document.writeln('  <ul>');
		for ( i=0; i<symRmax; i++ ) {

			var full_url = 'http://securityresponse.symantec.com/avcenter/venc/data/'+symRurls[i];

			document.writeln('   <li><a target="_blank" href="'+full_url+'">'+symRnames[i]+'</a></li>');

		}

		document.writeln('  </ul>');

		document.writeln('  <p><a target="_blank" href="http://securityresponse.symantec.com/avcenter/tools.list.html">More...</a></p>');

		document.writeln('  </td>');
		document.writeln(spacerTD);

	}

	/* advisories */
	if ( symAmax > 0 ) {

		var colSpan = "";
		var clas = "r";
		if ( symRmax == 0 ) {
			colSpan = ' colspan="'+totColsA+'"';
			clas = 'm';
		}

		document.writeln('  <td'+colSpan+' class="dkborder'+clas+'"><h3>Security Advisories</h3>');
		document.writeln('  <ul>');
		for ( i=0; i<symAmax; i++ ) {

			var full_url = 'http://securityresponse.symantec.com/avcenter/security/Content/'+symAurls[i];

			document.writeln('   <li><a target="_blank" href="'+full_url+'">'+symAnames[i]+'</a></li>');

		}

		document.writeln('  </ul>');

		document.writeln('   <p><a target="_blank" href="http://securityresponse.symantec.com/avcenter/security/Advisories.html">More...</a></p></td>');

		document.writeln('  </td>');

	}

	document.writeln('  </tr>');

	/* search box */
	if ( symSshow > 0 ) {

		document.writeln(' <tr>');
		document.writeln('  <td align="center" colspan="'+totCols+'" class="dkborderm">');
//		document.writeln('   <h3>Search Threat Database</h3>');
		document.writeln('   <form action="http://search.symantec.com/custom/us/query.html" method="POST" target="_blank">');
		document.writeln('      <input type="hidden" name="lk" value="1">');
		document.writeln('      <input type="hidden" name="rf" value="0">');
		document.writeln('      <input type="hidden" name="qp" value="url:http://securityresponse.symantec.com/avcenter/venc/data url:/avcenter/venc/auto/index url:/avcenter/security/Content">');
		document.writeln('      <input type="text" name="qt" size="30">&nbsp;<input type="submit" value="Search Threat Database">');
		document.writeln('    </form>');
//		document.writeln('    <p><a target="_blank" href="http://securityresponse.symantec.com/avcenter/cgi-bin/syndicate.cgi">Use this feed on your site</a></p>');
		document.writeln('   </td>');
		document.writeln('  </tr>');

	}

	/* footer */
	document.writeln('</table>');

}
