var _ThumbnailClicked;

function ShowPrices()
{
	var mainImage = document.getElementById("MainImage");		
	
	mainImage.src = "Images/Splash/spacer.gif";		

	var tdCell = document.getElementById("ThumbailDiv");

	var html = "<center><br><br><table cellspacing=0px>";
	
	html = html + "<tr bgcolor=#5BABFF>";	
	html = html + "<td width=75px>";	
	html = html + "<b>Size</b>";	
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "<b>Price</b>";
	html = html + "</td>";	
	html = html + "</tr>";
		
	html = html + "<tr>";	
	html = html + "<td>";	
	html = html + "11 x 23";	
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$49";
	html = html + "</td>";	
	html = html + "</tr>";
	
	html = html + "<tr bgcolor=#9EDBFF>";	
	html = html + "<td>";	
	html = html + "10.5 x 24";
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$49";
	html = html + "</td>";	
	html = html + "</tr>";
	
	html = html + "<tr>";	
	html = html + "<td>";	
	html = html + "14 x 24";	
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$79";
	html = html + "</td>";	
	html = html + "</tr>";
	
	html = html + "<tr bgcolor=#9EDBFF>";	
	html = html + "<td>";	
	html = html + "14 x 36";	
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$89";
	html = html + "</td>";	
	html = html + "</tr>";
	
	html = html + "<tr>";	
	html = html + "<td>";	
	html = html + "18 x 30";
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$89";
	html = html + "</td>";	
	html = html + "</tr>";
		
	html = html + "<tr bgcolor=#9EDBFF>";	
	html = html + "<td>";	
	html = html + "17 x 44";	
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$112";
	html = html + "</td>"	
	html = html + "</tr>"
	
	html = html + "<tr>";	
	html = html + "<td>";	
	html = html + "23 x 39";	
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$169";
	html = html + "</td>";	
	html = html + "</tr>";
	
	html = html + "<tr bgcolor=#9EDBFF>";	
	html = html + "<td>";	
	html = html + "32 x 48";
	html = html + "</td>";	
	html = html + "<td>";	
	html = html + "$259";
	html = html + "</td>";	
	html = html + "</tr>";

	html = html + "</table>";
	
	html = html + "<br>Sizes given in inches (width x height).<br>";
	html = html + "Prices do not include shipping.<br>";
	html = html + "Not all signs available in all sizes.<br>";
	html = html + "Some signs can be ordered made of wood or metal.";
	
	html = html + "</center>";

	tdCell.innerHTML = html;
}

function SetMainImageTDWidth(aWidth)
{
	var coldImage = document.getElementById("MainImageTD");		
	
	coldImage.width = aWidth;
}

function SetMainImageForCategory(aMainImage)
{
	SetMainImage(aMainImage);		
}

function SetMainImage(aMainImage)
{	
	_ThumbnailClicked = true;

	var mainImage = document.getElementById("MainImage");		
	
	mainImage.src = aMainImage;		

	var secondImage = document.getElementById("SecondImage");			
	secondImage.src = "Images/Splash/spacer.gif";		

	var thirdImage = document.getElementById("ThirdImage");			
	thirdImage.src = "Images/Splash/spacer.gif";		

	var fourthImage = document.getElementById("FourthImage");			
	fourthImage.src = "Images/Splash/spacer.gif";		
	
	var signNumberLabelSpan = document.getElementById("SignNumberLabelSpan");		
	
	var signNumberSpan = document.getElementById("SignNumberSpan");
	
	var slashIndex = aMainImage.lastIndexOf("/");		
		
	var signNumber = aMainImage.substring(slashIndex + 1);
	
	var dotIndex = signNumber.indexOf(".");
	
	signNumber = signNumber.substring(0, dotIndex);
	
	if (signNumber != 'spacer')
	{
		signNumberLabelSpan.innerHTML = "Sign Number";
	
		signNumberSpan.innerHTML = signNumber;
	}
	else
	{
		signNumberSpan.innerHTML = "";
		
		signNumberLabelSpan.innerHTML = "";
	}
	
}
	
function BuildOldWoodSignsImages(subDirectory, imageNames)
{
	var tdCell = document.getElementById("ThumbailDiv");
	
	var html = "<p>";
	
	for (index in imageNames)
	{		
		var image = imageNames[index];
						
		html = html + "<a href = \"javascript:SetMainImage('Images/SignStore/OldWoodSigns/" + subDirectory + "/" + image + ".jpg')\">";			
		html = html + "<img src = \"Images/SignStore/OldWoodSigns/" + subDirectory +"/" + image + ".jpg.thumb\" align=top>";
		html = html + "</a>"
	}

	if (!_ThumbnailClicked)				
	{
		html = html + "<br>Click on a thumbnail to see a larger image";
	}
								
	html = html + "</p>"
	
	tdCell.innerHTML = html;
}
	
function BuildVOSignsImages(subDirectory, imageNames)
{
	var tdCell = document.getElementById("ThumbailDiv");
	
	var html = "<p>";
	
	for (index in imageNames)
	{		
		var image = imageNames[index];
						
		html = html + "<a href = \"javascript:SetMainImage('Images/SignStore/ShapedSigns/" + subDirectory + "/" + image + ".jpg')\">";			
		html = html + "<img src = \"Images/SignStore/ShapedSigns/" + subDirectory +"/" + image + ".jpg.thumb\" align=top>";
		html = html + "</a>"
	}

	if (!_ThumbnailClicked)				
	{		
		html = html + "<br>Click on a thumbnail to see a larger image";
	}
						
	html = html + "</p>"
	
	tdCell.innerHTML = html;
}

function BuildRawVerticalImageList(subDirectory, imageNames)
{
	var tdCell = document.getElementById("ThumbailDiv");
	
	var html = "<p>";
	
	for (index in imageNames)
	{		
		var image = imageNames[index];
								
		html = html + "<img src = \"Images/SignStore/ShapedSigns/" + subDirectory +"/" + image + ".jpg\"><br><br>";		
	}	
						
	html = html + "</p>"
	
	tdCell.innerHTML = html;
}

function SelectCategory(category)
{
	var categorySpan = document.getElementById("CategorySpan");
			
	var html = "<b>" + category + "</b>";
			
	categorySpan.innerHTML = html;
}

function CabinLakeClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/CabinLake/381blue.jpg";
	
	SetCabinLakeThumbs();
	
	SetMainImageForCategory(mainImage);	
	
	SelectCategory("Cabin Lake");
}
function SetCabinLakeThumbs()
{	
	var subDirectory = "CabinLake";		
	
	var imageNames = new Array("301","305","306","310","356lake","381blue","rt12","rt13","432","435","437","440","441","442lake","527","22628","413");

	BuildOldWoodSignsImages(subDirectory, imageNames);	
}

function BoatingClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Boating/304.jpg";
	
	SetBoatingThumbs();
	
	SetMainImageForCategory(mainImage);	

	SelectCategory("Boating");
}
function SetBoatingThumbs()
{						
	var subDirectory = "Boating";
			
	var imageNames = new Array("304","309","311","337","380blue","385","396","406","455","22623");

	BuildOldWoodSignsImages(subDirectory, imageNames);
}

function HuntingClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Hunting/307.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetHuntingThumbs();
	
	SelectCategory("Hunting");
}
function SetHuntingThumbs()
{						
	var subDirectory = "Hunting";
	
	var imageNames = new Array("307","308","313","328","329","330","331","336","364","542","545","22650","22653","22654","22659","rt03","rt04","rt08","rt11","rt14","22602","22607","22615","22616","22617","327","333","388","511","544","22571","22572","22573","22574","22578","22601","22622","22628","22614");

	BuildOldWoodSignsImages(subDirectory, imageNames);						
}

function FishingClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Fishing/378.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetFishingThumbs();
	
	SelectCategory("Fishing");
}
function SetFishingThumbs()
{				
	var subDirectory = "Fishing";
									
	var imageNames = new Array("378","382","451","458","498","499","536","543","22652","22656","22702","rt01","rt02","rt10","22619","302","22575","22588","22605","22649","22661");

	BuildOldWoodSignsImages(subDirectory, imageNames);									
}	

function ProfessionsClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Professions/338.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetProfessionsThumbs();
	
	SelectCategory("Professions");
}
function SetProfessionsThumbs()
{					
	var subDirectory = "Professions";
	
	var imageNames = new Array("338","339","371","22634","463","471","22624","415","426","464","353","490","22625","22627f","22627m","22630","22633","22635","427","342");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);
}


function WinterClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/WinterSports/320.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetWinterThumbs();
	
	SelectCategory("Winter Sports");
}
function SetWinterThumbs()
{					
	var subDirectory = "WinterSports";
	
	var imageNames = new Array("320","323","324","326","343","348","352","354","366","367","403","404","478","479","480","481","485","22606","22655","22660","22662","22663","22664","rt07", "rt09","357","477","483","22648","347","22570","22587");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);
}

function AutomotiveClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Automotive/358.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetAutomotiveThumbs();
	
	SelectCategory("Automotive");
}
function SetAutomotiveThumbs()
{					
	var subDirectory = "Automotive";
		
	var imageNames = new Array("416","417","419","421","422","425","443","446","447","448","449","450","452","453","461","474","475","501","358","418","420","423","424","445");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);	
}


function HawaiianaClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Hawaiiana/497.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetHawaiianaThumbs();
	
	SelectCategory("Hawaiiana");
}
function SetHawaiianaThumbs()
{					
	var subDirectory = "Hawaiiana";
	
	var imageNames = new Array("350","351","368","369","374","375","376","467","497","500","522","523","524","525");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);					
}

function BeachesClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Beaches/356.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetBeachesThumbs();
	
	SelectCategory("Beaches");
}
function SetBeachesThumbs()
{					
	var subDirectory = "Beaches";
	
	var imageNames = new Array("356","379","381","381green","428","429","433","436","442","442ocean","459","468","469","470","476","482","486","488","516","517","518","519","520","521","rt16","526","456","430","460","489");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);						
}

function PubBilliardsClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/PubBilliards/303.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetPubBilliardsThumbs();
	
	SelectCategory("Pub and Billiards");
}
function SetPubBilliardsThumbs()
{
	var subDirectory = "PubBilliards";
		
	var imageNames = new Array("303","312","314","317","319","321","322","22608","334","365","383","399","407","409","22637","22639","22651","22658","rt05","411","496","22611","410","400","22604","22626","22632","412");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);
}

function CowboysClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Cowboys/373.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetCowboysThumbs();
	
	SelectCategory("Cowboys");
}
function SetCowboysThumbs()
{
	var subDirectory = "Cowboys";
		
	var imageNames = new Array("373","384","386","387","405","465","466","472","472_1","472_2","472_3","472_4","472_5","472_6","472_7","472_8","472_9","472_10","472_11","513","515");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);	
}

function GolfClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/Golf/315.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetGolfThumbs();
	
	SelectCategory("Golf");
}
function SetGolfThumbs()
{	
	var subDirectory = "Golf";
				
	var imageNames = new Array("315","316","335","22609","22620","22638","22700","rt06","22621");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);
}

function ThisnThatClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/OldWoodSigns/ThisnThat/355.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetThisnThatThumbs();
	
	SelectCategory("This 'n' That");
}
function SetThisnThatThumbs()
{				
	var subDirectory = "ThisnThat";
	
	var imageNames = new Array("355","397","398","431","438","491","492g","493","495","510","530","531","532","533","535","22612","22636","509","391","538");
	
	BuildOldWoodSignsImages(subDirectory, imageNames);
}


function VOHolidayClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/Holiday/MerryChristmas.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOHolidayThumbs();
	
	SelectCategory("Holiday");
}
function SetVOHolidayThumbs()
{					
	var subDirectory = "Holiday";
	
	var imageNames = new Array("Chanukah","ComfortJoy","Flag","HappyMardiGrasArched","MardiGrasYear","MerryChristmas","MerryChristmasRedArched","MerryChristmasWhiteArched");
	
	BuildVOSignsImages(subDirectory, imageNames);	
}

function VOArrowsClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/Arrows/ArrowBeach2.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOArrowsThumbs();
	
	SelectCategory("Arrows");
}
function SetVOArrowsThumbs()
{					
	var subDirectory = "Arrows";

	var imageNames = new Array("ArrowAirConditioned","ArrowBath","ArrowBeach1","ArrowBeach2","ArrowBeach3","ArrowBeach4","ArrowBeach","ArrowBoys","ArrowCabins","ArrowExit","ArrowFlowers","ArrowGirls","ArrowGulfView","ArrowHorses","ArrowLake2","ArrowLake","ArrowLodge","ArrowOceanView","ArrowPharmacy","ArrowPharmacy","ArrowShrimp","ArrowStarboard");
			
	BuildVOSignsImages(subDirectory, imageNames);		
}

function VOBeachOceanClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/BeachOcean/WildCatchMarlin.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOBeachOceanThumbs();
	
	SelectCategory("Beach and Ocean");
}
function SetVOBeachOceanThumbs()
{					
	var subDirectory = "BeachOcean";

	var imageNames = new Array("Beach2","BeachDayBlue","BeachDayPink","BikinisAndTrunksRack","BikinisRack","TowelRack","TurtlesNesting","FishCamp","OceanClams","OceanFreshFish","OceanOysters","Beach1","FreshLobster","LifeGuard","BeachVertical","LobsterVertical","Mermaid","OceanBlueFishRedFish","OceanClamBake","OceanVerticalFish","Surfboard1","Surfboard2","Surfboard3","Surfboard4","WelcomeRack","WildCatchMarlin","WildCatchShrimp","LakeScene");
			
	BuildVOSignsImages(subDirectory, imageNames);	
}

function VOHomeLodgeClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/HomeLodge/BikinisRack.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOHomeLodgeThumbs();
	
	SelectCategory("Home and Lodge");
}
function SetVOHomeLodgeThumbs()
{					
	var subDirectory = "HomeLodge";

	var imageNames = new Array("BikinisRack","BikinisAndTrunksRack","CoatsRack","HorseStuffRack","KeysRack","Poker","SkiDoubleBlackDiamond","TowelsRack","Trout","Bass","Cafe","Cottage","DoggiesGirlsBestFriend","PantryVertical");
			
	BuildVOSignsImages(subDirectory, imageNames);	
}

function VOMardiGrasClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/MardiGras/HappyMardiGras.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOMardiGrasThumbs();
	
	SelectCategory("Mardi Gras");
}
function SetVOMardiGrasThumbs()
{	
	var subDirectory = "MardiGras";

	var imageNames = new Array("HappyMardiGras","MardiGrasFleurdeLis1","MardiGrasFleurdeLis2","MardiGrasVilleNouvelle1","MardiGrasVilleNouvelle2","MardiGrasYear");
			
	BuildVOSignsImages(subDirectory, imageNames);		
}

function VOLongBoardsClick()
{	
	var mainImage ="Images/Splash/spacer.gif";
	
	SetMainImageForCategory(mainImage);
	
	SetVOLongBoardsThumbs();
	
	SelectCategory("Long Bead Boards");
}
function SetVOLongBoardsThumbs()
{						
	var subDirectory = "LongBeachBoards";

	var imageNames = new Array("LongBikinisWelcome","LongBonitaBeach","LongDownEast","LongFridayHarbor","LongOffIslandersWelcome","LongOffIslandersWelcome","LongOystersWithAView","LongWelcomeToBeach","LongWinnioesaukee");
			
	BuildRawVerticalImageList(subDirectory, imageNames);	
}

function VOArchedBoardsClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/ArchedBeadBoards/ArchedBeach.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOArchedBoardsThumbs();
	
	SelectCategory("Arched Bead Boards");
}
function SetVOArchedBoardsThumbs()
{					
	var subDirectory = "ArchedBeadBoards";

	var imageNames = new Array("ArchedBeach","ArchedBar","ArchedFish","ArchedGarden","ArchedGardenShed","ArchedLakeHouse","ArchedMen","ArchedPoker","ArchedSail","ArchedWelcome","ArchedWineCellar","ArchedWineCellarBlue");
			
	BuildVOSignsImages(subDirectory, imageNames);	
}

function VOKidStuffClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/KidStuff/KidStuffBobberHookFish.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOKidStuffThumbs();
	
	SelectCategory("KidStuff");
}
function SetVOKidStuffThumbs()
{				
	var subDirectory = "KidStuff";

	var imageNames = new Array("KidStuffBobberHookFish","KidStuffBobberHook","KidStuffBuckarette","KidStuffBunnies","KidStuffGirlsArrow","KidStuffGoodnight","KidStuffPinkRabbit");
			
	BuildVOSignsImages(subDirectory, imageNames);	
}

function VOFramedSignsClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/FramedSigns/FramedBeNiceBlue.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOFramedSignsThumbs();
	
	SelectCategory("Framed Signs");
}
function SetVOFramedSignsThumbs()
{		
	var subDirectory = "FramedSigns";

	var imageNames = new Array("FramedBeNiceBlue","FramedBeNiceRed","FramedBrown","FramedGreen","FramedClams","FramedCoffee","FramedCrab","FramedCrawfish","FramedGumbo","FramedLemonade","FramedLobster","FramedMartini","FramedOysters","FramedCocina");
			
	BuildVOSignsImages(subDirectory, imageNames);	
}

function VOMirrorsClick()
{	
	var mainImage = "Images/Splash/spacer.gif";//"Images/SignStore/ShapedSigns/Mirrors/MirrorWelcomeBeach.jpg";
	
	SetMainImageForCategory(mainImage);
	
	SetVOMirrorsThumbs();
	
	SelectCategory("Mirrors");
}
function SetVOMirrorsThumbs()
{					
	var subDirectory = "Mirrors";

	var imageNames = new Array("MirrorWelcomeBeach","MirrorWelcomeLake", "MirrorSanibelIsland");
			
	BuildVOSignsImages(subDirectory, imageNames);		
}