
  if (document.images) {
  
    var tmpurl = String(window.location);
    
    var imagePreStr;    
    
    var galIndex = tmpurl.indexOf('gallery');
        
    if(galIndex > 0) {
    	imagePreStr = "../";
    }	
    else {
    
    	imagePreStr = "";
    }
    
    var storedown = new Image();
    storedown.src = imagePreStr + "images/menu-rollovers/store.gif";
    var storeup = new Image();
    storeup.src = imagePreStr + "images/menu-rollovers/store_.gif"; 

    var gallerydown = new Image();
    gallerydown.src = imagePreStr + "images/menu-rollovers/gallery.gif";
    var galleryup = new Image();
    galleryup.src = imagePreStr + "images/menu-rollovers/gallery_.gif"; 
    
    var accountdown = new Image();
    accountdown.src = imagePreStr + "images/menu-rollovers/account.gif";
    var accountup = new Image();
    accountup.src = imagePreStr + "images/menu-rollovers/account_.gif"; 
    
    var orderdown = new Image();
    orderdown.src = imagePreStr + "images/menu-rollovers/order.gif";
    var orderup = new Image();
    orderup.src = imagePreStr + "images/menu-rollovers/order_.gif";  
    
    var contactdown = new Image();
    contactdown.src = imagePreStr + "images/menu-rollovers/contact.gif";
    var contactup = new Image();
    contactup.src = imagePreStr + "images/menu-rollovers/contact_.gif";
    
                
  }
  
  
  function newWindow(theurl,thewidth,theheight) {
  
    var photoPageUrl;
    photoPageUrl = "/viewimage.asp?File=[" + theurl + "]";
    
    newWin = window.open(photoPageUrl,'newWindow','width=' + thewidth + ',height=' + theheight + ',toolbar=no,location=no,scrollbars=yes,resizable=yes');
      
  }
  
  
  function act(imgName) {
    if (document.images)
      document.images[imgName].src = eval(imgName + "up.src");
  }


  function inact(imgName) {
    if (document.images)
      document.images[imgName].src = eval(imgName + "down.src");
  }


  function actMenuItem(imgName,defImg) {
    if(defImg != imgName)
    {
	  act(imgName);

    }
  }


  function inactMenuItem(imgName,defImg) {
    if(defImg != imgName)
    {
	  inact(imgName);
    }
  }

  
function toggleLayer(whichLayer)
{

	if (document.getElementById(whichLayer))
	{

		// this is the way the standards work

		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";

	}
	else if (document.all)
	{
		// this is the way old msie versions work

		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";

	}
	else if (document.layers)
	{

		// this is the way nn4 works
	
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";

	}
	else
	{
	
		//alert("NO LAYER: " + whichLayer);
		
	}

}
  
function swapImage(imageDiv,linkId,imageUrl,imageFilename) {	
	
	// get main image obj
	var mainImage = document.getElementById(imageDiv);
	
	// get link obj
	var linkObj = document.getElementById(linkId);
		
	// set image
	mainImage.src = imageUrl;
	
	imageFilename = String(imageFilename);
	
	var tmpLink = "javascript:newWindow('" + imageFilename.replace("*","'") + ");";
	
	// set new link	
	linkObj.href= tmpLink;


}
   
      
    startList = function() {
    if (document.all&&document.getElementById) {
    navRoot = document.getElementById("nav");
    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", "");
       }
       }
      }
     }
    }
    
window.onload=startList;

