// JavaScript Document
// copyright Aaron Hokanson | www.hokansonstudios.com | aaron@hokansonstudios.com
<!--

function setColor(color1, color2) { //sets the color and also gives the value to the hidden form fields which create the URL parameters for stove_pic.php
	document.getElementById('color').innerHTML = color1;
	document.buildastove.hiddenColor1.value = color1;
	document.buildastove.hiddenColor2.value = color2;
}

function setFinish(finish1, finish2) { // sets the finish and also gives the value to the hidden form fields which create the URL parameters for stove_pic.php
	document.getElementById('finish').innerHTML = finish1;
	document.buildastove.hiddenFinish1.value = finish1;
	document.buildastove.hiddenFinish2.value = finish2;
}

function setStyle(doorstyle1, doorstyle2) { // sets the door and leg style and also gives the value to the hidden form fields which create the URL parameters for stove_pic.php
	document.getElementById('currentdoorstyle').innerHTML = doorstyle1;
	document.buildastove.hiddenDoorStyle1.value = doorstyle1;
	document.buildastove.hiddenDoorStyle2.value = doorstyle2;
}

function setModel() { // sets the stove model and also gives the value to the hidden form fields which create the URL parameters for stove_pic.php
	if(document.buildastove.model.value  == "vistaclass") {
			document.buildastove.model2.value = "Vista Classic";
	}
	else if(document.buildastove.model.value  == "vistalegs") {
			document.buildastove.model2.value = "Vista (Legs)";
	}
	else if(document.buildastove.model.value  == "vistaped") {
			document.buildastove.model2.value = "Vista (Pedestal)";
	}
	else if(document.buildastove.model.value  == "spectrum") {
			document.buildastove.model2.value = "Spectrum";
	}
	else if(document.buildastove.model.value  == "spectrumclass") {
			document.buildastove.model2.value = "Spectrum Classic";
	}
	else if(document.buildastove.model.value  == "superlegs") {
			document.buildastove.model2.value = "Super 27 (Legs)";
	}
	else if(document.buildastove.model.value  == "superped") {
			document.buildastove.model2.value = "Super 27 (Pedestal)";
	}
	else if(document.buildastove.model.value  == "supersteplegs") {
			document.buildastove.model2.value = "Super Step Top (Legs)";
	}
	else if(document.buildastove.model.value  == "superstepped") {
			document.buildastove.model2.value = "Super Step Top (Pedestal)";
	}
	else if(document.buildastove.model.value  == "summitclass") {
			document.buildastove.model2.value = "Summit Classic";
	}
	else if(document.buildastove.model.value  == "summitlegs") {
			document.buildastove.model2.value = "Summit (Legs)";
	}
	else if(document.buildastove.model.value  == "summitped") {
			document.buildastove.model2.value = "Summit (Pedestal)";
	}
	else if(document.buildastove.model.value  == "fusion") {
			document.buildastove.model2.value = "Fusion Contemporary";
	}
}

function setColors() {  // hides all the colors except black when certain stoves are selected

	if((document.buildastove.model.value  == "vistalegs") || (document.buildastove.model.value  == "vistaped") || (document.buildastove.model.value  == "superped") || (document.buildastove.model.value  == "superlegs") || (document.buildastove.model.value  == "summitlegs") || (document.buildastove.model.value  == "summitped") || (document.buildastove.model.value  == "supersteplegs") || (document.buildastove.model.value  == "superstepped")) {
		document.getElementById('colorBlack').className = "visible";
		document.getElementById('colorBlackPearl').className = "hidden";
		document.getElementById('colorBlue').className = "hidden";
		document.getElementById('colorBrown').className = "hidden";
		document.getElementById('colorGreen').className = "hidden";
		document.getElementById('colorIvory').className = "hidden";
		document.getElementById('colorRed').className = "hidden";
		document.getElementById('colorMetallicBlack').className = "hidden";
		document.getElementById('colorStainlessSteel').className = "hidden";
		document.getElementById('colorCopper').className = "hidden";
		document.getElementById('colorTitanium').className = "hidden";
		setColor('Black', 'black');
	}
else { // shows all the colors when certain stoves are selected
		document.getElementById('colorBlack').className = "visible";
		document.getElementById('colorBlackPearl').className = "visible";
		document.getElementById('colorBlue').className = "visible";
		document.getElementById('colorBrown').className = "visible";
		document.getElementById('colorGreen').className = "visible";
		document.getElementById('colorIvory').className = "visible";
		document.getElementById('colorRed').className = "visible";
		document.getElementById('colorCopper').className = "visible";
		document.getElementById('colorTitanium').className = "visible";
	}
}


function showhideStyle () { // shows and hides the radiant door option when certain models are selected

	if ((document.buildastove.model.value  == "vistaclass") || (document.buildastove.model.value  == "vistalegs") || (document.buildastove.model.value  == "vistaped") || (document.buildastove.model.value  == "summitclass") || (document.buildastove.model.value  == "summitlegs") || (document.buildastove.model.value  == "summitped")) {
		document.getElementById('doorstyle').className = "hidden";
		document.buildastove.hiddenDoorStyle1.value = "Arched";
		document.buildastove.hiddenDoorStyle2.value = "arch";
		document.getElementById('currentdoorstyle').innerHTML = "Arched";
	}
	else {
		document.getElementById('doorstyle').className = "visible";
		}
}

function showhideFusion () { 
	
	if (document.buildastove.model.value  == "fusion") {  // changes stuff if Fusion is selected
			document.getElementById('stylediv').className = "hidden";
			document.getElementById('finishdiv').className = "hidden";
			document.getElementById('doorstyle').className = "hidden";
			document.getElementById('colorBlackPearl').className = "hidden";
			document.getElementById('colorBlack').className = "hidden";
			document.getElementById('colorBlue').className = "hidden";
			document.getElementById('colorBrown').className = "hidden";
			document.getElementById('colorGreen').className = "hidden";
			document.getElementById('colorIvory').className = "hidden";
			document.getElementById('colorRed').className = "hidden";
			document.getElementById('colorMetallicBlack').className = "visible";
			document.getElementById('colorStainlessSteel').className = "visible";
			document.getElementById('colorCopper').className = "hidden";
			document.getElementById('colorTitanium').className = "hidden";
			document.getElementById('buildbutton').className = "fusionbutton";
			setColor('Metallic Black', 'metblack');
			} else {
			document.getElementById('stylediv').className = "buildastove_wrapper";
			document.getElementById('finishdiv').className = "buildastove_wrapper";
			document.getElementById('colorMetallicBlack').className = "hidden";
			document.getElementById('colorStainlessSteel').className = "hidden";
			document.getElementById('buildbutton').className = "nonfusionbutton";
			document.getElementById('colorBlack').className = "visible";
			setColor('Black', 'black');
	}
}
-->