﻿
// break out of frames
if(top.location != location) {
    top.location.href = document.location.href ;
}

//hide content when not needed
var ns6=document.getElementById&&!document.all?1:0
var head="display:''"
var folder=''

function enlarge(oject){
folder=ns6?oject.nextSibling.nextSibling.style:document.all[oject.sourceIndex+1].style
if (folder.display=="none")
folder.display="block"
else
folder.display="none"
}

function showPreview(color, image, samplename, targeturl, targetname)
{
	var string = "";
	if (document.layers)
	{
		if(samplename != null)
		{
			string = samplename + " Swatch";
		}
		
		if(targeturl != null)
		{
			string += ":<a href=" + targeturl + ">";
			if(targetname != null)
			{
				string += "<FONT color=#ff8000> view " + targetname + " >></FONT>";
			}
			string += "</a>";
		}
		document.layers("previewtext").innerHTML = string;
	}
	else if (document.all)
	{
		if(samplename != null)
		{
			string = samplename + " Swatch";
		}
		
		if(targeturl != null)
		{
			string += ":<a href=" + targeturl + ">";
			if(targetname != null)
			{
				string += "<FONT color=#ff8000> view " + targetname + " >></FONT>";
			}
			string += "</a>";
		}
		document.all("previewtext").innerHTML = string;
	}
	

	
//	document.layers("previewtext").innerText = samplename;
	if(document.getElementById('colorpreview').style.display != "none")
	{
		document.getElementById('colorpreview').style.display = "none";
		document.getElementById('sampleswatches').style.display = "block";
	}
	else
	{
		document.getElementById('colorpreview').style.display = "block";
   		document.getElementById('color').style.background = color;
		document.getElementById('color').style.backgroundImage = "url(" + image + ")";
		document.getElementById('sampleswatches').style.display = "none";
		document.getElementById('colorpreview').style.border = "solid 1px #f9f0f0";
	}
}

// Show / Hide content with DIV's

var active = 'HelpItem0' // Div to display first
function show(divname)
{
	if (document.getElementById)
	{
		var stylediv = document.getElementById(active).style;
		stylediv.display = stylediv.display? "":"none";

		stylediv = document.getElementById(divname).style;
		stylediv.display = stylediv.display? "":"block";
		active = divname;
	}
	else if (document.all)
	{
		var style2 = document.all[active].style;
		style2.display = style2.display? "":"none";
		
		var style2 = document.all[divname].style;
		style2.display = style2.display? "":"block";
		active = divname;
	}
	else if (document.layers)
	{
		var style2 = document.layers[active].style;
		style2.display = style2.display? "":"none";
		
		var style2 = document.layers[divname].style;
		style2.display = style2.display? "":"block";
		active = divname;
	}
}
