function changeBusinessName() {
	document.getElementById("textA").innerHTML = document.getElementById("business_name_form").value;
}

function updateLegend(leg) {
	document.getElementById("textB").innerHTML = leg;
}

function updateLegendSpecial(leg) {
	document.getElementById("textB").innerHTML = leg;
	document.getElementById("shadow").innerHTML = leg;
}

function updateFont(thing) {
	document.getElementById(thing).style.fontFamily = document.getElementById("font_form").value;
}

function changeBackgroundColor(color) {
	document.getElementById("picture_frame").style.backgroundColor=color;
}

function changeTextColor(color, middle, third) {
	document.getElementById("textA").style.color=color;
	document.getElementById("textB").style.color=middle;
	document.getElementById("textC").style.color=middle;
	if(document.getElementById("textD") != null) document.getElementById("textD").style.color=third;
}

function changePoints() 
{
	document.getElementById("pointOne").innerHTML = "&nbsp;" + document.getElementById("point_one_form").value;
	document.getElementById("pointTwo").innerHTML = "&nbsp;" + document.getElementById("point_two_form").value;
	document.getElementById("pointThree").innerHTML = "&nbsp;" + document.getElementById("point_three_form").value;
	document.getElementById("pointFour").innerHTML = "&nbsp;" + document.getElementById("point_four_form").value;
}

function updateColorsWeenie(background, textA, textB)
{
	document.getElementById("picture_frame").style.backgroundColor=background;
	document.getElementById("textA").style.color=textA;
	document.getElementById("textB").style.color=textB;
}

function updateColorsSpecial(background, textA, textB, textC, textD)
{
	document.getElementById("picture_frame").style.backgroundColor=background;
	document.getElementById("textA").style.color=textA;
	document.getElementById("textB").style.color=textB;
	document.getElementById("textC").style.color=textC;
	document.getElementById("textD").style.color=textD;
}

function updateSaleInfo() {
	document.getElementById("offer_length").innerHTML = document.getElementById("date_form").value + "&nbsp;";
	
	price = document.getElementById("price_form").value;
	stop = price.indexOf(".");
	
	document.getElementById("dollars").innerHTML = price.substring(0,stop);
	document.getElementById("cents").innerHTML = price.substring(stop,price.length);
}

function changeProduct() {
	pic = document.getElementById("product_picture");	
	val = document.getElementById("product_form").value;
	document.getElementById("textA").innerHTML = val;

	if(val.substring(0,10) == "AUTOMOTIVE") pic.src = "images/battery_auto.gif";
	else if( val.substring(0,6)=="MARINE") pic.src = "images/battery_marine.gif";
	else if( val.substring(0,9)=="GOLF CART") pic.src = "images/battery_golf.gif";
	else if( val.substring(0,10)=="MOTORCYCLE") pic.src = "images/battery_motorcycle.gif";
	else if( val.substring(0,10)=="COMMERCIAL") pic.src = "images/battery_commercial.gif";	
}

function updateWarranty() {
	document.getElementById("textD").innerHTML = 
		document.getElementById("warranty_length_form").value
		+ "<br>"
		+ document.getElementById("warranty_rate_form").value;
}
