//Donald Firsching
//January 2008

//This is for the dropdown menu on the header

function startList() {
if (document.all&&document.getElementById) {
  navRoot = document.getElementById("nav");
  //var hell = navRoot.tagName;
  for (i=0; i<navRoot.childNodes.length; i++) {
    node = navRoot.childNodes[i];
    if (node.nodeName=="LI") {
      node.onmouseover=function() {
      this.className+=" over";
      }
      node.onmouseout=function() {
      this.className=this.className.replace(" over", "");
     }
   }
  }
 }
}

//################################################################

var array_size = 4;
var counter = 0;

 var image= new Array(array_size)
image[0]="necklace1";
image[1]="necklace2";
image[2]="necklace3";
image[3]="necklace4";
//image[4]="images/slideshow/hs_frt_mckvtt_cap.jpg";
//image[5]="images/slideshow/hs_frt_lncstr_700.jpg";
//image[6]="images/slideshow/hs_cnfdrt_rnn_grnds_700.jpg";
//image[7]="images/slideshow/hs_msm_pcfc_wr_700.jpg";
//image[8]="images/slideshow/hs_strr_fmly_700.jpg";
//image[9]="images/slideshow/hs_actn_700.jpg";


function nextImage(){
	if (counter < (array_size-1)){
	 counter++;
   	 //alert (image[counter]);
	 document.getElementById(image[counter]).style.visibility="visible";
 	 document.getElementById(image[counter-1]).style.zIndex = 1;
 	 document.getElementById(image[counter]).style.zIndex = 200;
         document.getElementById('next').src = "images/right_arrow.gif"
         document.getElementById('previous').src = "images/left_arrow.gif"
        }
        if (counter == array_size-1) {
             document.getElementById('next').src = "images/maja_23.gif";
             document.getElementById('previous').src = "images/left_arrow.gif";
        }
}

function lastImage(){
	if (counter > 0) {
	 counter--;
   	// alert (image[counter] + " " + image[counter-1]);
	 document.getElementById(image[counter]).style.visibility="visible";
	 document.getElementById(image[counter+1]).style.zIndex = 1;
 	 document.getElementById(image[counter]).style.zIndex = 200;
         document.getElementById('next').src = "images/right_arrow.gif"
         document.getElementById('previous').src = "images/left_arrow.gif"
        }
        if (counter == 0){
         document.getElementById('previous').src = "images/maja_22.gif"
         document.getElementById('next').src = "images/right_arrow.gif"
        }
}

