PropImgs = new Array ("images/home-celeston.jpg","images/home-bioenvision.jpg","images/home-fisher.jpg","images/home-heinz.jpg","images/home-linpac.jpg");
PropCaps = new Array ("Client: Celeston","Client: Bioenvision","Client: Fisher Space Pens","Client: Heinz International","Client: Linpac");

var ImgNum = 0;
var CapNum = 0;

var ImgLength = PropImgs.length;

function changeImage(type,num) {

if (document.images) {

if (type == "prev") {
ImgNum = ImgNum - 1
CapNum = ImgNum + 1

if (ImgNum < 0) {
ImgNum = (ImgLength - 1);
CapNum = ImgNum + 1
}
}
else if (type == "next") {
ImgNum = ImgNum + 1
CapNum = ImgNum + 1

if (ImgNum >= ImgLength) {
ImgNum = 0;
CapNum = ImgNum + 1
}
}
else if (type == "disp") {
ImgNum = num;
CapNum = num + 1
}

document.images.propimg.src = '' + PropImgs[ImgNum] + '';


if (PropCaps[ImgNum] == '') {
document.images.propimg.alt = 'Photo ' + CapNum;
document.stage4.caption.value = 'Photo ' + CapNum;
}
else {
document.images.propimg.alt = PropCaps[ImgNum];
document.stage4.caption.value = PropCaps[ImgNum];
}
}

if (type == "disp") {
if(document.getElementById){
var imgElement=document.getElementById("imgTop");
if(imgElement.scrollIntoView){
imgElement.scrollIntoView(1);
}
} 
else {
window.scrollTo(0,0);
}
}
}