﻿// JScript File
function menuSwap(daImage, daSrc){
  var objStr,obj;

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}

function imageSwap(daImage, index){

  // Check to make sure that images are supported in the DOM.
  if(document.images){
      var value = document.Color.CurrentColor.value;   
      document.C1.src = '../images/' + value + index + '.gif';
  }
}

function thumbnailSwap(daImage){

  // Check to make sure that images are supported in the DOM.
  if(document.images){  
      document.TN1.src = '../images/TN' + daImage + '1.gif';
      document.TN2.src = '../images/TN' + daImage + '2.gif';
      document.TN3.src = '../images/TN' + daImage + '3.gif';
      document.TN4.src = '../images/TN' + daImage + '4.gif';
      document.C1.src = '../images/' + daImage + '1.gif';
      document.Color.CurrentColor.value = daImage;
  }
}

function borderToggle (imageName) {
	var anImage = document.getElementById(imageName);
	alert(anImage.className);
	if (anImage.className=="ToggleOn") {
		anImage.className="ToggleOff";
	} else {
		anImage.className="ToggleOn";
	}
}

function displayMenu (category) {
	var whichcategory = document.getElementById(category);
	if (whichcategory.className=="show") {
		whichcategory.className="hide";
	} else {
		whichcategory.className="show";
	}
}

