function preloader() 

{
     var i = 0;
     imageObj = new Image();

     imageObj.onLoad=fillIn();
     //when all images are loaded, run the script that does the heavy lifting.
     
     pImages = new Array();
     pImages[0]="images/01_img1.jpg"
     pImages[1]="images/01_img2.jpg"
     pImages[2]="images/01_img3.jpg"
     pImages[3]="images/01_img4.jpg"
     pImages[4]="images/01_img4.jpg"
     pImages[5]="images/01_img4.jpg"
     pImages[6]="images/01_img4.jpg"
     pImages[7]="images/01_img4.jpg"
     pImages[8]="images/01_img4.jpg"
     pImages[9]="images/01_img4.jpg"
     pImages[10]="images/01_img4.jpg"          

     for(i=0; i<=10; i++) 
     {
          imageObj.src=pImages[i];
     }
     
} 
      
//the images -- change per section   
    myContent = new Array(
[["best_of_wired_test.gif"],["01_img1.jpg"],["dummy_spon1.gif"]],
[["best_of_wired_test.gif"],["01_img2.jpg"],["dummy_spon2.gif"]],
[["best_of_wired_test.gif"],["01_img3.jpg"],["dummy_spon1.gif"]],
[["best_of_wired_test.gif"],["01_img4.jpg"],["dummy_spon2.gif"]],
[["best_of_wired_test.gif"],["01_img5.jpg"],["dummy_spon1.gif"]],
[["best_of_wired_test.gif"],["01_img6.jpg"],["dummy_spon2.gif"]],
[["best_of_wired_test.gif"],["01_img7.jpg"],["dummy_spon1.gif"]],
[["best_of_wired_test.gif"],["01_img8.jpg"],["dummy_spon2.gif"]],
[["best_of_wired_test.gif"],["01_img9.jpg"],["dummy_spon1.gif"]],
[["best_of_wired_test.gif"],["01_img10.jpg"],["dummy_spon3.gif"]]);

var myStart = 1;
//start at 1, not 0
var theTotal = myContent.length;
//set the number of images, thumbs, etc.
var timer;
//set a timer variable for the scroll function


//the hateful DART tag

//the heavy lifting script
function fillIn() {
		document.images[1].src = "images\/" + myContent[(myStart-1)][0];
        document.images[2].src = "images\/" + myContent[(myStart-1)][1];
        //document.images[3].src = "images\/" + myContent[(myStart-1)][2];
		document.getElementById("counter").childNodes[0].nodeValue = myStart + " of  " + theTotal;
        document.getElementById("ssDescription").innerHTML = document.getElementById("hold" + myStart).innerHTML;
}

//increments the slideshow -- placed on right arrow
function myIncrement() {
	if (myStart < theTotal) {
		myStart++;
		fillIn();
        //a rather crude method of setting the takeover page -- may need to be broken out onto individual pages.
            if (myStart == 5){
            document.getElementById("takeover").style.display = '';
                } else {       
            document.getElementById("takeover").style.display = 'none';
                }
		} else {
		myStart = 1;
		fillIn();
        document.getElementById("takeover").style.display = 'none';
		}

}

//complimentary decrement, on left arrow
function myDecrement() {
	if (myStart <= theTotal && myStart !== 1) {
		myStart--;
		fillIn();
		} else {
		myStart = theTotal;
		fillIn();
		}
}

//the function that allows clicks on the thumbnail to appear in the main page
function setToNum(x) {
		myStart = x;
        fillIn();
}

//This function is for the select navigation
function go()
{
	pulldown = document.forms[0].navig;
	destination = pulldown.options[pulldown.selectedIndex].value;
	if (destination) location.href = destination;
}

//the scrollers
function ScrollLeft()
{
  timer = setInterval("document.getElementById('slider').scrollLeft -= 2", 15);
}

function ScrollRight()
{
  timer = setInterval("document.getElementById('slider').scrollLeft += 2", 15);
}

function removestatus() {
window.status = '';
}