//Code to switch background images as a function of time (can be set up for more than 2 images)


//Specify 2 images to cycle between
bkg1= new Image(227,212);
bkg1.src= "General_files/order_graphic1.jpg"
bkg2= new Image(227,212);
bkg2.src= "General_files/order_graphic2.jpg"

var count = 1;
var team_id = 0;
team_id = document.getElementById('Team_news_bkg');

//image swap based on time
function bkg_update()
{
   // load the other bkg image each time the function runs
   if (count == 1)
   {
      document.images[team_id] = bkg1;
   }
   else
   {
      document.images[team_id] = bkg2;
   }

   if (count == 1)
   {
      count=2;
   }
   else
   {
      count=1;
   }    
   setTimeout("bkg_update()",2000); 
}