var imNum = Math.floor(Math.random()*8);
var imDir = "http://blogs.sun.com/davidgs/resources/mini/";
var prefix = "jihad";
var suffix = ".png";
var jihads = new Array();
jihads[0] = "Oracle";
jihads[1] = "Microsoft";
jihads[2] = "Iran";
jihads[3] = "Apple";
jihads[4] = "France";

function mouseOver()
{
document.b1.src = imDir +  prefix + Math.floor(Math.random()*8) + suffix;
}
function loadJihad()
{
var prefix = "jihad";
var suffix = ".png";
var jihads = new Array();
jihads[0] = "Oracle";
jihads[1] = "Microsoft";
jihads[2] = "Iran";
jihads[3] = "Apple";
jihads[4] = "France";
jihads[5] = "Britney Spears";
jihads[6] = "Paris Hilton";
jihads[7] = "The Future";

document.jihad.src = "http://blogs.sun.com/davidgs/resource/mini/jihad" + Math.floor(Math.random()*8) + ".png";
 var agintext=document.getElementById("agin");
    replaceText( agintext, "Against: " + jihads[Math.floor(Math.random()*8)]);
 }

function loadMeter()
{
var prefix = "jihad";
var suffix = ".png";
var jihads = new Array();
jihads[0] = "Oracle";
jihads[1] = "Microsoft";
jihads[2] = "Iran";
jihads[3] = "Apple";
jihads[4] = "France";
jihads[5] = "Britney Spears";
jihads[6] = "Paris Hilton";
jihads[7] = "The Future";

document.meter.src = "http://blogs.sun.com/davidgs/resource/mini/jihad" + Math.floor(Math.random()*8) + ".png";
 var metertext=document.getElementById("meterText");
    replaceText( metertext, "Against: " + jihads[Math.floor(Math.random()*8)]);
 }

function replaceText(el, text) {
  if (el != null) {
    clearText(el);
    var newNode = document.createTextNode(text);
    el.appendChild(newNode);
  }
}

function clearText(el) {
  if (el != null) {
    if (el.childNodes) {
      for (var i = 0; i < el.childNodes.length; i++) {
        var childNode = el.childNodes[i];
        el.removeChild(childNode);
      }
    }
  }
}