// JavaScript Document
/*
 * date:	2007-06-22
 * info:	DETA development for feature boxes
 */

function displayFeature() {
	document.getElementById('top_feature_container1').style.display = 'block';
	document.getElementById('top_feature_container2').style.display = 'none';
	document.getElementById('top_feature_container3').style.display = 'none';
}

divs = ['top_feature_container1','top_feature_container2','top_feature_container3'];


function hideDivs() {
  for (var i=0; i<divs.length; i++)
    document.getElementById(divs[i]).style.display = 'none';

}

function toggleVisibility(obj){
	hideDivs();	
	var div = document.getElementById(obj);
	var isVisible = (( div.style.display == 'block' ) ? true : false );
	if( isVisible ){
		div.style.display = 'none'; 
	}else{
		div.style.display = 'block'; 
	}
	return true;
}

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = '/images/frontgraphic1.jpg';
theImages[1] = '/images/frontgraphic2.jpg';
theImages[2] = '/images/frontgraphic3.jpg';
theImages[3] = '/images/frontgraphic4.jpg';
theImages[4] = '/images/frontgraphic5.jpg';

theDivs = ['imageContainer1','imageContainer2','imageContainer3','imageContainer4','imageContainer5'];

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
	document.write('<div id="'+theDivs[whichImage]+'"><img src="'+theImages[whichImage]+'"></div>');
}

//  End -->