var selectedImg;
var channel;
var onChannel;
var page;

////////////////////////////////////////////////////////////////////////
// image rollover functions
////////////////////////////////////////////////////////////////////////

function preLoadImages(ary) {
   var imgAry = new Array();

   for(var i=0; i<ary.length; i++) {
      imgAry[i] = new Image;
      imgAry[i].src = "images/" + ary[i] + "_sel.jpg";
   }
}

///////////////////////////////////////////////////////
function mover(name) {

   if (document.images) {
      if (name != selectedImg) {document.images[name].src = "images/" + name + "_sel.jpg";}
           else { document.images[name].src="images/" + name + "_sel.jpg";}
   }
}

///////////////////////////////////////////////////////
function mout(name) {
   if (document.images) {

      if (name != selectedImg) document.images[name].src = "images/" + name + ".jpg";
           else if(name==selectedImg){ document.images[name].src="images/" + name + "_sel.jpg";}
   }
}


///////////////////////////////////////////////////////
function selectDefaultImage(name) {

   selectedImg=name;
   if (document.images) {
      document.images[name].src ="images/" + name + "_sel.jpg" ;
   }

}


///////////////////////////////////////////////////////
// Used for the maps in the products sections that cause an unrelated image to change
function swap_image(imgName, imgIn) {
   if (document.images) {
                var imgInSrc = "images/" + imgIn + "_sel.jpg";
                if (document.images[imgName].src != imgInSrc) {
                        document.images[imgName].src = imgInSrc;
                }
   }
}