function showtt(tt) {
	document.getElementById(tt).style.display='';
}
function hidett(tt) {
	document.getElementById(tt).style.display='none';
}

function checkPrice(checked) {
	if (checked) {
		total++;
	} else {
		total--;
	}
	var cost = document.getElementById('priceper');
	document.getElementById('total').innerHTML = total;
	var newcost = price;
        if (total < 3) {
		newcost = price;
                cost.innerHTML = "$" + price + ".00";
        }
        if (total > 2 && total < 6) {
		newcost = price3;
                cost.innerHTML = "$" + price3 + ".00";
        }
        if (total > 5 && total < 11) {
		newcost = price5;
                cost.innerHTML = "$" + price5 + ".00";
        }
        if (total > 10 && total < 16) {
		newcost = price10;
                cost.innerHTML = "$" + price10 + ".00";
        }
        if (total > 15 && total < 21) {
		newcost = price15;
                cost.innerHTML = "$" + price15 + ".00";
        }
        if (total > 20 && total < 26) {
		newcost = price20;
                cost.innerHTML = "$" + price20 + ".00";
        }
        if (total > 25) {
		newcost = price25;
                cost.innerHTML = "$" + price25 + ".00";
        }
	document.getElementById('totalcost').innerHTML = "$" + (newcost * total) + ".00";

}

function changePrice(quant) {
	var cost = document.getElementById('cost');
	owned = owned * 1;
	quant = quant * 1;
	quant = quant + owned;
	if (quant < 3) {
		cost.innerHTML = license;
	}
	if (quant > 2 && quant < 6) {
		$cost.innerHTML = license3;
	}
	if (quant > 5 && quant < 11) {
		cost.innerHTML = license5;
	}
	if (quant > 10 && quant < 16) {
		cost.innerHTML = license10;
	}
	if (quant > 15 && quant < 21) {
		cost.innerHTML = license15;
	}
	if (quant > 20 && quant < 26) {
		cost.innerHTML = license20;
	}
	if (quant > 25) {
		cost.innerHTML = license25;
	}
}

function doBilling() {
	var form = document.forms.orderform;
	form.ccname.value = form.first.value + ' ' + form.last.value;
	form.ccadd1.value = form.address1.value;
	form.ccadd2.value = form.address2.value;
	form.cccity.value = form.city.value;
	form.cczip.value = form.zip.value;
	form.ccstate.value = form.state.value;
	form.cccountry.value = form.country.value;
}

function checkagree() {
	if (document.forms.orderform.agree.checked == 1) {
		document.forms.orderform.submit();
	} else {
		return alert("You must agree to the UBB License Agreement.");
	}
}

