var guit_frame = 0;	//keep track of what frame of the animation we're on
var guit_timeout_id = null;	//allows us to stop animation
//var pause_timeout_id = null;
//var newpage_timeout_id = null;
var start_animation_id = null;


var guit_images = new Array(24);
for (var i = 0; i < 24; i++)
{
	guit_images[i] = new Image( );	//create Image object
	guit_images[i].src = "/img/guit/new/" + i + ".gif";	//tell it what URL to load
	//alert( "loaded image #" + i );
}

if (document.images) {
  shirtOn = new Image( );
  shirtOn.src = "/img/links/each-roll2.gif";
  shirtOff = new Image( );
  shirtOff.src = "/img/links/each-roll1.gif";
  
  albumOn = new Image( );
  albumOn.src = "/img/links/album-roll2.gif";
  albumOff = new Image( );
  albumOff.src = "/img/links/album-roll1.gif";
  
  /*linkOn = new Image( );
  linkOn.src = "link_images/links_steam.gif";
  linkOff = new Image( );
  linkOff.src = "link_images/links.gif";*/
}

// Function to replace the off images with on images.
function activate(image_name) {
  if (document.images) {
    document[image_name].src = eval(image_name + "On.src");
    }
  }
// Function to replace the on images with off images.
function deactivate(image_name)
{
  if (document.images) {
    document[image_name].src = eval(image_name + "Off.src");
  }
}

function guit_animate( )
{
	//alert( "We are in the animation!" );
	document.guit_animation.src = guit_images[ guit_frame ].src;
	//alert( "explosion frame = #" + explosion_frame);
	guit_frame = ( guit_frame + 1 )%24;
	//if ( explosion_frame == 6) { logo_animate( ) }
	if ( guit_frame == 23 )
  {
		guit_frame == 0;
		guit_timeout_id = setTimeout( "guit_animate( )", 75 );
		//guit_animation.src = "guit/" + ( guit_frame - 1 ) + ".gif";
		//if ( guit_timeout_id ) clearTimeout( guit_timeout_id ); guit_timeout_id=null;
		//guit_timeout_id = setTimeout( "stop_guit_animation( )", 175 );
  }
	else guit_timeout_id = setTimeout( "guit_animate( )", 75 );	//display next frame later
}

//start_animation_id = setTimeout( "guit_animate( )", 0 ); //delay explosion animation here*/
