function showPic(whichpic) {
	  //Check to see if the color text box is on the screen
	  if (!document.getElementById("TXTidOption6")) return false;
	  
	  var lgImage
	  var theTextBox
	  var ColorName
	  
	  lgImage = document.getElementById("lgFabric");
	  theTextBox = document.getElementById("TXTidOption6");
	  ColorName = whichpic.getAttribute("alt")
	  
	  lgImage.src = whichpic.src
	  theTextBox.value = ColorName
	  
}

/* ------------------ CUSTOM ON PAGE LOAD ---------------------------------- */
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function addUnLoadEvent(func) {
	var oldonunload = window.onunload;
	if (typeof window.onunload != 'function') {
	  window.onunload = func;
	} else {
	  window.onunload = function() {
	    oldonunload();
	    func();
	  }
	}
}

function setValue(TheValue) {
		//Check to see if the color text box is on the screen
		if (!document.getElementById("TXTidOption6")) return false;
		var TheTextBox
		TheTextBox = document.getElementById("TXTidOption6")
		TheTextBox.value = TheValue
}
