var imgpath = "images/";var commonDir = "images/";var scrollIndex = 0;function initScroll() {  if (scrollArray.length > 3) {	 checkArrows();    }}function scrollImages(direction) {  var numImgs = scrollArray.length;  var imgdir = "";  var txtdir = "";  var txtext = "-txt";  if (direction == "left") {    // These lines are for continuous scrolling;    //scrollIndex = (scrollIndex - 1) % numImgs;    //if (scrollIndex < 0) {    //  scrollIndex = numImgs + scrollIndex;    //}    // The next two lines are for scrolling that stops on each end    if (scrollIndex - 1 < 0) return;    scrollIndex = scrollIndex - 1;    var start = 2;    var incr = -1;  } else if (direction == "right") {    // This line is for continuous scrolling;    //scrollIndex = (scrollIndex + 1) % numImgs;    // The next two lines are for scrolling that stops on each end    if (scrollIndex + 3 >= numImgs) return;    scrollIndex = scrollIndex + 1;    var start = 0;    var incr = 1;  } else {    var start = 0;    var incr = 1;  }  for (var i = start; i < 3 && i >= 0; i += incr) {    var idx = (scrollIndex+i) % numImgs;    if (idx < 0) {      idx = numImgs + idx;    }    var imgname = scrollArray[idx];    var imgsrc  = 'sc'+(i+1);    document.images[imgsrc].src = imgpath+imgdir+imgname+".gif";}  checkArrows();  }function jumpImages(index) {  scrollIndex = index;  scrollImages('jump');}function hiliteBox() {  document.images['b'+scrollIndex].src = commonDir+"box-hi.gif";  for (var i = 0; i < scrollIndex; i++) {    var img = document.images['b'+i];    if (img.src.indexOf('-hi') != -1) img.src = commonDir+"box.gif";  }   for (var i = scrollIndex+1; i <= scrollArray.length-5; i++) {    var img = document.images['b'+i];    if (img.src.indexOf('-hi') != -1) img.src = commonDir+"box.gif";  }}function checkArrows() {  var arrowName = commonDir+"arrow_";  var arrowGrey = "_white";  var arrowExt = ".gif";  var leftGrey  = "";  var rightGrey = "";  var arrowToDisplay = "";  if (scrollIndex == 0) {    leftGrey = arrowGrey;  } else if (scrollIndex + 3 >= scrollArray.length) {    rightGrey = arrowGrey;  }  leftArrow  = arrowName+"top"+leftGrey+arrowExt;  rightArrow = arrowName+"bot"+rightGrey+arrowExt;  var leftImg  = document.arrowleft;  if (leftImg.src.indexOf(leftArrow) == -1) leftImg.src = leftArrow;  var rightImg = document.arrowright;  if (rightImg.src.indexOf(rightArrow) == -1) rightImg.src = rightArrow;}function gotoItem(offset) {  var idx = (scrollIndex + offset) % scrollArray.length; document.images['mainImg'].src = imgpath+scrollArray[idx]+"_lg"+".gif";  //var path = scrollArray[idx];  //gotoURL(path);}function gotoURL(path) {  var host = "http://" + window.location.host;  if (path != null && path != "") {    window.location.href = host+path;  }}