﻿// ****************************************************************************

//
// $Id: vir_display.js, v. 1.0 2003/06/01 6:29 PM aselimovic Exp $
//

/***********************/
/* sbrown@symantec.com */
/* version 0.5-4       */
/***********************/


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

var symLmax = 6;
var symRmax = 3;
var symAmax = -2;

var symTshow = 1;
var symSshow = -1;

function qssDateFormat(dateStr) {
	return dateStr.substring(3, 5) + "." + dateStr.substring(0, 2) + ".20" + dateStr.substring(6, 8);
}

function symDisplay() {

	var p_style = 'style="font-family:Arial, Helvetica, sans-serif; font-size:70%; color:'+symFONTcolor+';"';
var b_style = 'style="font-family:Arial, Helvetica, sans-serif; font-size:75%; color:'+symFONTcolor+'; font-weight:bold;"';
var a_style = 'target="_blank" style="font-family:Arial, Helvetica, sans-serif; font-size:8pt;"';//; color:'+symLINKcolor+'

var r_common = 'font-family:Arial, Helvetica, sans-serif; font-size:70%; color:'+symBACKcolor+'; font-weight:bold;';

	r_style = new Array(6);

	r_style[1] = 'style="'+r_common+' background:#06C;"';
	r_style[2] = 'style="'+r_common+' background:#06C;"';
	r_style[3] = 'style="'+r_common+' background:#F93;"';
	r_style[4] = 'style="'+r_common+' background:#F60;"';
	r_style[5] = 'style="'+r_common+' background:#F00;"';

	/* header */
document.writeln('<div id=\"pnlVirDisplay\">');
document.writeln('<table id=\"tblVirDisplay\" bgcolor='+symBORDcolor+' width=230 border=0 cellpadding=0 cellspacing=0>');
	document.writeln(' <tr bgcolor='+symBACKcolor+'>');
document.writeln("<td colspan=\"3\"><img src=\"/App_Themes/StandardTheme/SecurityAlertsBox/-.gif\" alt=\"Aktuelni virusi i prijetnje\" width=\"230\" height=\"69\" /></td");
document.writeln("</tr>");
document.writeln("<tr>");
document.writeln("<td style=\"background: #DEDEDE\" width=\"1\"><img src=\"/App_Themes/StandardTheme/images/1px-trans.gif\" alt=\"\" /></td>");
document.writeln("<td width=\"228\">");


	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;

if (false) {
	document.writeln('   <table width=228 border=0 cellpadding=1 cellspacing=0>');
	document.writeln('    <tr>');
	document.writeln('     <td align=center>');
	document.writeln('      <p '+b_style+'>');
	document.writeln('      <a target="_blank" href="http://securityresponse.symantec.com/"><img src="'+full_url+'" width=130 height=48 border=0></a><br>Security Alerts</p>');
	document.writeln('     </td>');
	document.writeln('    </tr>');
	document.writeln('   </table>');
}

document.writeln("<div style=\"margin: 0 0 0 10px\">");
	document.writeln('   <table width=218 border=0 cellpadding=3 cellspacing=1>');

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

		document.writeln('    <tr>');
document.writeln('     <td colspan=3><p '+b_style+'>Najnovije prijetnje</p></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>');
			document.writeln('     <td align=center width=16><div '+r_style[symLrisks[i]]+'>&nbsp;'+symLrisks[i]+'&nbsp;</div></td>');
			document.writeln('     <td align=center nowrap><div '+p_style+'>'+qssDateFormat(symLdates[i])+'</div></td>');
document.writeln('     <td align=left><a '+a_style+' href="'+full_url+'">'+symLnames[i]+'</a></td>');
			document.writeln('    </tr>');

		}

		document.writeln('    <tr>');
		document.writeln('     <td></td>');
		document.writeln('     <td></td>');
document.writeln('     <td align=left><a '+a_style+' href="http://securityresponse.symantec.com/avcenter/vinfodb.html">Više...</a></td>');
		document.writeln('    </tr>');

	}

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

		document.writeln('    <tr>');
		document.writeln('     <td colspan=3><br><div '+b_style+'>Najveće prijetnje</div></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>');
			document.writeln('     <td align=center width=16><div '+r_style[symTrisks[i]]+'>&nbsp;'+symTrisks[i]+'&nbsp;</div></td>');
			document.writeln('     <td align=center nowrap><div '+p_style+'>'+qssDateFormat(symTdates[i])+'</div></td>');
document.writeln('     <td align=left><a '+a_style+' href="'+full_url+'">'+symTnames[i]+'</a></td>');
			document.writeln('    </tr>');

		}

	}

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

		document.writeln('    <tr>');
		document.writeln('     <td colspan=3><br><div '+b_style+'>Removal Tools</div></td>');
		document.writeln('    </tr>');
		for ( i=0; i<symRmax; i++ ) {

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

			document.writeln('    <tr>');
			document.writeln('     <td style="text-align: right" align=center valign=top width=16><div '+b_style+'>&#183;</div></td>');
document.writeln('     <td colspan=2 align=left><a '+a_style+' href="'+full_url+'">'+symRnames[i]+'</a></td>');
			document.writeln('    </tr>');

		}

		document.writeln('    <tr>');
		document.writeln('     <td></td>');
		document.writeln('     <td colspan=2 align=left><a '+a_style+' href="http://securityresponse.symantec.com/avcenter/tools.list.html">Više...</a></td>');
		document.writeln('    </tr>');

	}

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

		document.writeln('    <tr>');
		document.writeln('     <td colspan=3><br><p '+b_style+'>Security Advisories</p></td>');
		document.writeln('    </tr>');
		for ( i=0; i<symAmax; i++ ) {

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

			document.writeln('    <tr>');
			document.writeln('     <td align=center valign=top width=12><p '+b_style+'>&#183;</p></td>');
			document.writeln('     <td colspan=2 align=left><p><a '+a_style+' href="'+full_url+'">'+symAnames[i]+'</a></p></td>');
			document.writeln('    </tr>');

		}

		document.writeln('    <tr>');
		document.writeln('     <td></td>');
		document.writeln('     <td colspan=2 align=left><p><a '+a_style+' href="http://securityresponse.symantec.com/avcenter/security/Advisories.html">More...</a></p></td>');
		document.writeln('    </tr>');

	}

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

		document.writeln('    <tr>');
		document.writeln('     <td colspan=3><br><p '+b_style+'>Search Threat Database</p></td>');
		document.writeln('    </tr>');
		document.writeln('    <tr>');
		document.writeln('     <td colspan=3>');
		document.writeln('      <form style="margin-bottom:0;" action="http://search.symantec.com/custom/us/query.html" method="POST">');
		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:/avcenter/venc/data/ url:/avcenter/venc/dyn/ url:/avcenter/security/ url:/avcenter/sirc/">');
		document.writeln('      <p '+p_style+'>&nbsp;<input type=text name="qt" size=12>&nbsp;<input type=submit value="go"></p>');
		document.writeln('      </form>');
		document.writeln('     </td>');
		document.writeln('    </tr>');

	}

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

	document.writeln('  </td>');
document.writeln("<td style=\"background: #DEDEDE\" width=\"1\"><img src=\"/App_Themes/StandardTheme/images/1px-trans.gif\" alt=\"\" /></td>");
	document.writeln(' </tr>');
document.writeln("<tr>");
document.writeln("<td colspan=\"3\"><img src=\"/App_Themes/StandardTheme/SecurityAlertsBox/_.gif\" alt=\"\" /></td>");
document.writeln("</tr>");
	document.writeln('</table>');
document.writeln('</div>');

}