<!--
{

top0 = new Image;
top0.src = "assets/images/home/hexImages/TopDefault.jpg";
top1 = new Image;
top1.src = "assets/images/home/hexImages/Top1.jpg";
top2 = new Image;
top2.src = "assets/images/home/hexImages/Top2.jpg";
top3 = new Image;
top3.src = "assets/images/home/hexImages/Top3.jpg";

bot0 = new Image;
bot0.src = "assets/images/home/hexImages/BotDefault.jpg";
bot1 = new Image;
bot1.src = "assets/images/home/hexImages/Bot1.jpg";
bot2 = new Image;
bot2.src = "assets/images/home/hexImages/Bot2.jpg";
bot3 = new Image;
bot3.src = "assets/images/home/hexImages/Bot3.jpg";

prod1 = new Image;
prod1.src = "assets/images/home/hexImages/commGlass.gif";
prod2 = new Image;
prod2.src = "assets/images/home/hexImages/doors.gif";
prod3 = new Image;
prod3.src = "assets/images/home/hexImages/windows.gif";

prod4 = new Image;
prod4.src = "assets/images/home/hexImages/autoGlass.gif";
prod5 = new Image;
prod5.src = "assets/images/home/hexImages/bathrooms.gif";
prod6 = new Image;
prod6.src = "assets/images/home/hexImages/sunrooms.gif";

}

function hiLite(imgDocID,imgObjName)
{{ document.images[imgDocID].src = eval(imgObjName + ".src") }}

function prodLite(imgDocID,imgObjName)
{{ document.images[imgDocID].src = eval(imgObjName + ".src") }}

var counterNum = 0;
var theTimer = 0;

function HexControl(mousePlace) {
	if (mousePlace == 10){
		stopCount();
		hiLite('HexTop','top1');
		hiLite('HexBot','bot0');
		prodLite('ProdName','prod1');
	}
	else if (mousePlace == 11) {
		counterNum = 1;
		theCounter()
	}
	else if (mousePlace == 20){
		stopCount();
		hiLite('HexTop','top2');
		hiLite('HexBot','bot0');
		prodLite('ProdName','prod2');
	}
	else if (mousePlace == 21) {
		counterNum = 2;
		theCounter()
	}
	else if (mousePlace == 30){
		stopCount();
		hiLite('HexTop','top3');
		hiLite('HexBot','bot0');
		prodLite('ProdName','prod3');
	}
	else if (mousePlace == 31) {
		counterNum = 3;
		theCounter()
	}
	else if (mousePlace == 40){
		stopCount();
		hiLite('HexTop','top0');
		hiLite('HexBot','bot1');
		prodLite('ProdName','prod4');
	}
	else if (mousePlace == 41) {
		counterNum = 6;
		theCounter()
	}
	else if (mousePlace == 50){
		stopCount();
		hiLite('HexTop','top0');
		hiLite('HexBot','bot2');
		prodLite('ProdName','prod5');
	}
	else if (mousePlace == 51) {
		counterNum = 5;
		theCounter()
	}
	else if (mousePlace == 60){
		stopCount();
		hiLite('HexTop','top0');
		hiLite('HexBot','bot3');
		prodLite('ProdName','prod6');
	}
	else if (mousePlace == 61) {
		counterNum = 4;
		theCounter()
	}
}

function theCounter() {
	if (theTimer) {
		clearTimeout(theTimer);
	}
	if (counterNum <= -1) {
		// PAUSED
	}
	else if (counterNum == 1) {
		hiLite('HexTop','top1');
		hiLite('HexBot','bot0');
		prodLite('ProdName','prod1');
		counterNum = counterNum = 2;
		theTimer = setTimeout("theCounter()", 1500)
	}
	else if (counterNum == 2) {
		hiLite('HexTop','top2');
		hiLite('HexBot','bot0');
		prodLite('ProdName','prod2');
		counterNum = counterNum = 3;
		theTimer = setTimeout("theCounter()", 1500)
	}
	else if (counterNum == 3) {
		hiLite('HexTop','top3');
		hiLite('HexBot','bot0');
		prodLite('ProdName','prod3');
		counterNum = counterNum = 4;
		theTimer = setTimeout("theCounter()", 1500)
	}
	else if (counterNum == 4) {
		hiLite('HexTop','top0');
		hiLite('HexBot','bot3');
		prodLite('ProdName','prod6');
		counterNum = counterNum = 5;
		theTimer = setTimeout("theCounter()", 1500)
	}
	else if (counterNum == 5) {
		hiLite('HexTop','top0');
		hiLite('HexBot','bot2');
		prodLite('ProdName','prod5');
		counterNum = counterNum = 6;
		theTimer = setTimeout("theCounter()", 1500)
	}
	else if (counterNum == 6) {
		hiLite('HexTop','top0');
		hiLite('HexBot','bot1');
		prodLite('ProdName','prod4');
		counterNum = 1;
		theTimer = setTimeout("theCounter()", 1500)
	}
	else {
		counterNum = counterNum + 1;
		theTimer = setTimeout("theCounter()", 500)
	}
}

function stopCount() {
	counterNum = -20;
	theCounter()
}

//-->
