//<script>
function init(){
	startList();
	objectSwap();
}
function objectSwap(){;}
function setOpacity(obj, value) {
	obj.style.opacity = value/10;
	obj.style.filter = 'alpha(opacity=' + value*10 + ')';
}
function $(str){return document.getElementById(str);}
startList = function() {
	if (document.getElementById) {
		if (navRoot = document.getElementById("thumbBox")) {
    		for (i=0; i<navRoot.childNodes.length; i++) {
    			node = navRoot.childNodes[i];
    			if (node.nodeName=="IMG") {
    				node.onmouseover=function() {this.className+="over";}
    				node.onmouseout=function() {this.className=this.className.replace("over", "");}
					if(byStyle){node.onclick=function() {fresh=false;selectMenu();document.getElementById("viewport").src="swatches/"+this.src.slice(-15,-8)+"/line.jpg";showLabel("data"+this.id);}}
 					else if(byLine){
						node.onmouseover=function() {fresh=false;this.className+="over";$("viewport").src='graphic/clear.gif';window.setTimeout("$('viewport').src='"+this.src.replace("thumbs","swatches")+"';showLabel('data"+this.id+"')",150);}
						node.onclick=function() {a=this.src.lastIndexOf("/");window.location="quality.asp?item="+this.src.substring(this.src.lastIndexOf("/",a-1)+1,a);}
					}
					else{node.onclick=function() {selectMenu();document.getElementById("viewport").src=this.src.replace("thumbs", "swatches");showLabel("data"+this.id);}}
   			}
    		}
    	}
	}
}
if (window.attachEvent) window.attachEvent("onload", init);
else window.onload=init;
function showLabel (id) {
	if (document.getElementById) {
    	if (navRoot = document.getElementById("swatchData")) {
       		for (i=0; i<navRoot.childNodes.length; i++) {
       			if (navRoot.childNodes[i].className=="labelShow"){navRoot.childNodes[i].className="label";}
       		}
    	}
	}
	document.getElementById(id).className="labelShow";
}

function show(obj){obj.parentNode.className="show";}
function hide(obj){obj.parentNode.className="hide";}
function showChild(obj){obj.parentNode.parentNode.className=obj.nextSibling.className='show';$('thumbBox').style.overflow='hidden';}
function showParent(obj){obj.parentNode.className='show';$('thumbBox').style.overflow='hidden';}
function hideChild(obj){obj.parentNode.parentNode.className=obj.nextSibling.className='hide';$('thumbBox').style.overflow='auto';}
function hideParent(obj){obj.parentNode.className='hide';$('thumbBox').style.overflow='auto';}

function selectMenu(obj) {
	var temp="";var menu;
	if(obj){temp=obj.parentNode.className;menu=obj.parentNode.parentNode;}
	else{menu=document.getElementById("selector");}
	for (i=0; i<menu.childNodes.length; i++){
		node=menu.childNodes[i];
		if (node.nodeName=="LI"){
		   node.className="hide";
		   for (j=0; j<node.childNodes.length; j++){
		   	   subNode=node.childNodes[j];
		   	   if (subNode.nodeName=="IMG")subNode.src=subNode.src.replace("up","");
		   }
		}
	}
	if(temp=="hide"){
		obj.parentNode.className="show";
		obj.src=obj.src.replace(".gif","up.gif");
	}
}