/* Virus Bulletin Javascript Newsfeed */ /* Tom Kirkpatrick - tom.kirkpatrick@virusbtn.com */ /* The logic behind this infofeed is to minimise as far * * as I am able the amount of code that a webmaster * * needs to embed in order to include this on his or her * * page. Thus, the main subroutine is contained here, * * and is called from the requesting page with arguments * * rather than being included on the webmasters' sites */ /* It is, however, worth pointing out that a webmaster, * * if they were paying attention, could lift & rename * * the draw table function, and then just use prevtable * * to create their own version of this. */ // Data Starts Here. This part is auto-generated or // something. var newsitem = new Array(); // The values below change the structure of your table: // In all cases, 1=yes, 0=no // How wide would you like it to be? var width; // How thick would you like the border to be? var bwidth; // What Colour would you like the border to be? var bcolour; // What Colour would you like the background to be? var bground; // What Colour would you like the headlines to be? var hcolour; // What size would you like the headlines to be? var hsize; // What Colour would you like the text to be? var tcolour; // What size would you like the text to be? var tsize; // This is the bad-boy function itself function draw_table (width, bwidth, bcolour, bground, hcolour, hsize, tcolour, tsize) { // First lets make something to store this all in var output_html = ""; // create the style output_html += ""; output_html += "
"; for (count = 0; count < 5; count++) { if (newsitem[count]) { output_html += ""; output_html += "

"+newsitem[count][0]+"

"; output_html += "
"; output_html += "

"+newsitem[count][1]+"

"; } } output_html += "provided by Virus Bulletin
"; output_html += " add this infofeed to your site "; output_html += "
"; return output_html; } document.write(draw_table(width, bwidth, bcolour, bground, hcolour, hsize, tcolour, tsize));