﻿function changeImage(anImage, newSource) {
   document.images[anImage].src = 'Images/' + newSource;
}

function hidediv(id) {
    //safe function to hide an element with a specified id
    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'none';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'none';
        }
        else { // IE 4
            document.all.id.style.display = 'none';
        }
    }
}

function showdiv(id) {
    //safe function to show an element with a specified id

    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'inline';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'inline';
        }
        else { // IE 4
            document.all.id.style.display = 'inline';
        }
    }
}

//For Scrolling Crock-Stars
scrollStep = 1

timerLeft = ""
timerRight = ""

function toLeft(id) {
    document.getElementById(id).scrollLeft = 0
}

function scrollDivLeft(id) {
    clearTimeout(timerRight)
    document.getElementById(id).scrollLeft += scrollStep
    timerRight = setTimeout("scrollDivLeft('" + id + "')", 1)
}

function scrollDivRight(id) {
    clearTimeout(timerLeft)
    document.getElementById(id).scrollLeft -= scrollStep
    timerLeft = setTimeout("scrollDivRight('" + id + "')", 1)
}

function toRight(id) {
    document.getElementById(id).scrollLeft = document.getElementById(id).scrollWidth
}

function stopMe() {
    clearTimeout(timerRight)
    clearTimeout(timerLeft)
}