var number_of_images = 6;
var image_array = new Array(number_of_images);
var timeout_up_var;
var timeout_down_var; 
var display_pic = Get_Random_Number(number_of_images);
var DHTML = (document.getElementById || document.all || document.layers);
var texttop = 1;

image_array[0] = "images/chick1.gif";
image_array[1] = "images/flowers.gif";
image_array[2] = "images/main_nyc_dither2.gif";
image_array[3] = "images/flowers.gif";
image_array[4] = "images/chick1.gif";
image_array[5] = "images/main_nyc_dither2.gif";

function Get_Random_Number(range) {
  if (Math.random)
    return Math.round(Math.random() * (range-1));
  else {
    var now = new Date();
    return (now.getTime() / 1000) % range;
  }
}

//comments are for chumps.

function up(){
	var y = new getObj('inner_text');
	if (texttop < 1) {
	  move(3);
	  timeout_up_var=setTimeout("up()",20);
	}
	else cleardown();  
}

function down(){
    move(-3);
	timeout_down_var=setTimeout("down()",20)
}

function clearup(){
	if (window.timeout_up_var)
	clearInterval(timeout_up_var)
}

function cleardown(){
	if (window.timeout_down_var)
	clearInterval(timeout_down_var)
}

function move(amount)
{
	if (!DHTML) return;
	var x = new getObj('inner_text');
	texttop += amount;
	x.style.top = texttop;
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}
