// JavaScript Document

/** 
  This function writes out the hero shot, in case there is no js, the noscript will
  write a html button
  
**/
    imageArray = new Array();
    imageArray[0] = "/webfiles/images/heros2/hero_01.jpg";
    imageArray[1] = "/webfiles/images/heros2/hero_02.jpg";
    imageArray[2] = "/webfiles/images/heros2/hero_03.jpg";
    imageArray[3] = "/webfiles/images/heros2/hero_04.jpg";
	imageArray[4] = "/webfiles/images/heros2/hero_07.jpg";
    imageArray[5] = "/webfiles/images/heros2/hero_12.jpg";
    imageArray[6] = "/webfiles/images/heros2/hero_18.jpg";
    imageArray[7] = "/webfiles/images/heros2/hero_19.jpg";
	

	
  window.onload = function()
  {
    
    
  
  try{

       var p = imageArray.length;  
       //get a random number and print the image
       var whichImage = Math.round(Math.random()*(p-1));
	   
       document.getElementById("header").style.backgroundImage = "url("+imageArray[whichImage]+")";
	}
	catch(e){
	  alert("Error in ImageWriter function" + e)
	}   
  }
