﻿function hilightDashboard(productnum)
{
   if (productnum == "1") {document.getElementById("product1").src = "images/hithumb_bench.jpg"}
   else if (productnum == "2") {document.getElementById("product2").src = "images/hithumb_boxes.jpg"}
   else if (productnum == "3") {document.getElementById("product3").src = "images/hithumb_art.jpg"}
   else if (productnum == "4") {document.getElementById("product4").src = "images/hithumb_journals.jpg"}
   else if (productnum == "5") {document.getElementById("product5").src = "images/hithumb_shawls.jpg"}
}

function lolightDashboard(productnum)
{
   if (productnum == "1") {document.getElementById("product1").src = "images/lothumb_bench.jpg"}
   else if (productnum == "2") {document.getElementById("product2").src = "images/lothumb_boxes.jpg"}
   else if (productnum == "3") {document.getElementById("product3").src = "images/lothumb_art.jpg"}
   else if (productnum == "4") {document.getElementById("product4").src = "images/lothumb_journals.jpg"}
   else if (productnum == "5") {document.getElementById("product5").src = "images/lothumb_shawls.jpg"}

}

function showOverlay(image)
{
   document.body.style.backgroundAttachment = "fixed";
   document.getElementById("container").style.position = "fixed";
   document.getElementById("overlay").style.visibility = "visible";
   document.getElementById("viewfinder").innerHTML = "<img src='" + image + "' />";
   OLopacity = 15;
   FIopacity = 5;
   overlayFade = window.setInterval("stepFade('overlay')",100);
   waitforoverlay = window.setTimeout("showImage()",1800);
   document.getElementById("closeoverlay").style.visibility = "visible";
}

function hideOverlay()
{
   document.body.style.backgroundAttachment = "scroll";
   document.getElementById("container").style.position = "static";
   document.getElementById("viewfinder").innerHTML = "";
   var featureImage = document.getElementById("viewfinder").style;
   FIopacity = 0;
   featureImage.opacity = FIopacity;
   featureImage.MozOpacity = FIopacity;
   featureImage.KhtmlOpacity = FIopacity;
   featureImage.filter = "(alpha(opacity=" + FIopacity + ")";
   featureImage.visibility = "hidden";

   var documentOverlay = document.getElementById("overlay").style;
   OLopacity = 10;
   documentOverlay.opacity = (OLopacity / 100);
   documentOverlay.MozOpacity = (OLopacity / 100);
   documentOverlay.KhtmlOpacity = (OLopacity / 100);
   documentOverlay.filter = "alpha(opacity=" + OLopacity + ")";
   documentOverlay.visibility = "hidden";

   document.getElementById("closeoverlay").style.visibility = "hidden";
}
		   
function showImage()
{
   document.getElementById("viewfinder").style.visibility = "visible";
   imageFade = window.setInterval("stepFade('image')",100);
}

function stepFade(whattofade)
{
   if (whattofade == "overlay")
   {
	var documentOverlay = document.getElementById("overlay").style;
	documentOverlay.opacity = (OLopacity / 100);
	documentOverlay.MozOpacity = (OLopacity / 100);
	documentOverlay.KhtmlOpacity = (OLopacity / 100);
	documentOverlay.filter = "alpha(opacity=" + OLopacity + ")";
	OLopacity = OLopacity + 5;
   }
   else if (whattofade == "image")
   {
	var featureImage = document.getElementById("viewfinder").style;
	featureImage.opacity = (FIopacity / 100);
	featureImage.MozOpacity = (FIopacity / 100);
	featureImage.KhtmlOpacity = (FIopacity / 100);
	featureImage.filter = "alpha(opacity=" + FIopacity + ")";
	FIopacity = FIopacity + 5;
   }

   if (OLopacity == 85)
   {
	clearInterval(overlayFade);
   }

   if (FIopacity == 105)
   {
	clearInterval(imageFade);
   }
}

function artSet()
{

   if (document.documentElement.clientHeight < 620)
   {
	document.getElementById("artlink").href = "art3a.html";
   }
   else
   {
	document.getElementById("artlink").href = "art4a.html";

   }
}