// Functions for the Main Concert Ticket Page

function change_ticket(ticknum) {
	
	var ticketInfo = "";

	document.getElementById('ticket').src = "images/ticket-" + ticknum + ".gif";
	
	if (ticknum == "1") {
	
		ticketInfo = "";
		
		ticketInfo = "<p class='highlight'>General Ticket Layout</p><p>The following is the general layout of text for the ticket...<br> <br>";
		ticketInfo += "The left side has 4 lines with 11 characters per line. The Center has 8 lines with 24 characters per line. ";
		ticketInfo += "The right side has 4 lines with 13 characters per line. The section information is 7 characters, the seat ";
		ticketInfo += "number is 6 characters, and the row is 2 characters. The section, seat, and row print in 3 different places on the ticket.</p>";
	
		document.getElementById('ticketdesc').innerHTML = ticketInfo;
	
	} else if (ticknum == "2") {
	
		ticketInfo = "";

		ticketInfo = "<p class='highlight'>The Back of Every Ticket</p><p>Every ticket we produce has this image on the reversed side, thus lending ";
		ticketInfo += "an even more authentic look to the concert ticket.";

		document.getElementById('ticketdesc').innerHTML = ticketInfo;
		
	} else if (ticknum == "3") {
	
		ticketInfo = "";

		ticketInfo = "<p class='highlight'>Anniversaries</b></p><p>Gather all of your friends and family together to celebrate that special couple's anniversary using our unique Custom Concert Tickets.";
		ticketInfo += " You can add RSVP and special instructions if needed...";

		document.getElementById('ticketdesc').innerHTML = ticketInfo;		

	} else if (ticknum == "5") {
	
		ticketInfo = "";

		ticketInfo = "<p class='highlight'>Bachelor Party</p><p>Need a way to get all of the guys together for one last night of \"Freedom\" for the groom?<br /><br />";
		ticketInfo += "Why not distribute some concert tickets?<br /><br />";
		ticketInfo += "You can add the dates, times, and locations as well as ask for a small donation to help finance the event.";

		document.getElementById('ticketdesc').innerHTML = ticketInfo;

	} else if (ticknum == "11") {
	
		ticketInfo = "";

		ticketInfo = "<p class='highlight'>Business Promotions</p><p>What a unique way to promote your business with an attention grabber that will definately catch";
		ticketInfo += "your customer\'s eye...<br /><br />Running a special, launching a ";
		ticketInfo += "new website, having an open house, intoducing a new product?  <br /><br />Use our Custom Concert Tickets to invite your customers ";
		ticketInfo += "to participate in your special event.</p>";

		document.getElementById('ticketdesc').innerHTML = ticketInfo;

	} else if (ticknum == "2000") {
	
		ticketInfo = "";

		ticketInfo = "<p><b>Business Promotions</b><br /><br />Information";
		ticketInfo += "";
		ticketInfo += "";
		ticketInfo += "";

		document.getElementById('ticketdesc').innerHTML = ticketInfo;

	}	

}

function calc_cost() {
	var qty = document.getElementById('ticketQty').value;
	
	if (qty < 4 || qty==null || isNaN(qty)) {

	document.getElementById('ticketCost').innerHTML = "$0.00";
	
		if (isNaN(qty)) {
			document.getElementById('ticketCost').innerHTML = "$0.00";
			document.getElementById('ticketQty').value = "0";
		}
	
	} else {
	
	if (qty > 3 && qty < 49) { var price = qty * 1.10; }
	else if (qty > 48 && qty < 97) { var price = qty * 1.00; } 
	else if (qty > 96 && qty < 480) { var price = qty * .9; } 
	else if (qty > 479) { var price = qty * .75; } 
	
	var pcenv = 0;
	
	if (document.getElementById('pcenv').checked) {
		pcenv = qty * .5;
	}
	
	var rsvp = 0;
	
	if (document.getElementById('rsvp').checked) {
		rsvp = qty * .15;
	}
	
	
	var total = price + pcenv + rsvp;
	
	document.getElementById('ticketCost').innerHTML = "$" + total.toFixed(2);

	}

}