/* SUBMIT CONTACT FORM */
function submit_form()
{
	if(document.form_elert.onsubmit())
	{
	document.form_elert.submit();
	}
}
/* VALID EMAIL FOR FORM */
function validEmail(email) {
	invalidChars = ' !#$%^&*(){}[]+=~`?/:;,"'

	
	if (email == "") {
		return false;
	}
	for (i=0; i<invalidChars.length; i++) { //does it contain any invalid characters?
		badChar = invalidChars.charAt(i);
		if (email.indexOf(badChar,0) > -1) {
			return false;
		}
	}
	atPos = email.indexOf("@",1)  		//there must be one "@" symbol
		if (atPos == -1) {
		return false;
	}
	if (email.indexOf("@",atPos+1) != -1) { //and only one "@"
		return false;
	}
	periodPos = email.indexOf(".",atPos+1)  //and at least one "." after the "@"
		if (periodPos == -1) {
		return false;
	}
	if (email.charAt(atPos+1) == ".") {	//is there a "." right after the "@"
		return false;
	}
	if (periodPos+3 > email.length) {  	//must be at least 2 characters after the "."
		return false;
	}
	return true;
}
/* CONTACT FORM VALIDATION*/
function ValidateElert(form) {
 
	if (form.firstname.value == '') {
		alert("Please fill in your First Name.");
		form.firstname.focus();
		form.firstname.select();
		return false;
	}
	
	if (form.lastname.value == '') {
		alert("Please fill in your Last Name.");
		form.lastname.focus();
		form.lastname.select();
		return false;
	}
	
	if (!validEmail(form.emailaddress.value)) {
		alert("A valid E-mail Address is required.");
		form.emailaddress.focus();
		form.emailaddress.select();
		return false;
	}
	
	return true;	
}

/* CONTACT FORM VALIDATION*/
function ValidateContactUs(form) {
 
	if (form.first_name.value == '') {
		alert("Please fill in your First Name.");
		form.first_name.focus();
		form.first_name.select();
		return false;
	}
	
	if (form.last_name.value == '') {
		alert("Please fill in your Last Name.");
		form.last_name.focus();
		form.last_name.select();
		return false;
	}
	
	if (!validEmail(form.your_email.value)) {
		alert("A valid E-mail Address is required.");
		form.your_email.focus();
		form.your_email.select();
		return false;
	}
	
	return true;	
}



/* START PHOTO THUMBNAILS */
function TheatreThumb(intPhotoID, intPhotoBoxID)
{
	document.getElementById("theatre_image").innerHTML = "<div align='center' style='margin: 0px; padding-top: 130px; width: 501px;'><img src='images/ajax_loading.gif' /></div>";
	DWREngine._execute("function_ajax.cfm", null, 'readPhotoThumbNail', intPhotoID, getMainEventsResult);
}
function getMainEventsResult(result)
{
	document.getElementById("theatre_image").innerHTML = result;
	
}
/* END PHOTO THUMBNAILS */

function drawBorder(intPhotoID, intMaxCount) {
	for (x=1; x <= intMaxCount; x++) 
	{
		$("#photo" + x).addClass("thumb_no_focus").show("slow");
		$("#photo" + x).removeClass("thumb_focus").show("slow");
	}
	
	$("#photo" + intPhotoID).addClass("thumb_focus").show("slow");
	$("#photo" + intPhotoID).removeClass("thumb_no_focus").show("slow");

}


/* START SHOW GALLERY */

function myPhoto(intShow, intPhoto)
{
	// display the loading image
	document.getElementById("show_image").innerHTML = "<div align='center' style='margin: 0px; padding-top: 100px; width: 480px; height: 255px;'><img src='images/ajax_loading.gif' /></div>";
	DWREngine._execute("function_ajax.cfm", null, 'readPhotoFunction', intShow, intPhoto, getMyPhoto);
}
function getMyPhoto(result)
{
	//var intBlockID   = result.charAt(3);
	document.getElementById("show_image").innerHTML = result;
}
/* END SHOW GALLERY */

/* BEGIN SHOW MOVIE */

/* START SHOW GALLERY */
function reloadShow(intRowID)
{
	//alert(intRowID);
	// display the loading image
	document.getElementById("show_module_container").innerHTML = "<div align='center' style='margin: 0px; padding-top: 100px; width: 340px; height: 353px;'><img src='images/ajax_home_loading.gif' style='border: 0px;' /></div>";
	DWREngine._execute("function_ajax.cfm", null, 'readShowFunction', intRowID, getShowMods);
}
function getShowMods(result)
{
	//var intBlockID   = result.charAt(3);
	document.getElementById("show_module_container").innerHTML = result;
}



/* END SHOW GALLERY */

/* CALENDAR OPTIONS */
function reloadCalendar(intShow, intShowID)
{
	//alert(intRowID);
	// display the loading image
	document.getElementById("calendar_details").innerHTML = "";
	DWREngine._execute("function_ajax.cfm", null, 'readCalendarFunction', intShow, intShowID, getCalendarMods);
}
function getCalendarMods(result)
{
	//var intBlockID   = result.charAt(3);
	document.getElementById("calendar_details").innerHTML = result;
}


/* CALENDAR OPTIONS */
function refreshAmts(frmObj)
{
 frmObj.charge_full.value = getTotalAmount(frmObj); 
 frmObj.charge_deposit.value = getDepositAmount(frmObj);
}

function get_radio_value(radObj)
{
for (var i=0; i < radObj.length; i++)
   {
   if (radObj[i].checked)
      {
      var rad_val = radObj[i].value;
      }
   }
   
return rad_val   
}




function getTotalAmount(frmObj) {
	
	// when choosing First Night Package main floor is set.
	if (get_radio_value(frmObj.aday) == "First Night Package" ) {
		document.getElementById("i-subscribe_main").checked = true;			
	}
	
	var numSeats = frmObj.subscribe_num_of_seats.value
	var seatLoc  = get_radio_value(frmObj.seating)
	var choiceDay  = get_radio_value(frmObj.aday)
	var timeSat  = frmObj.sat_performance_time.value
	var timeSun  = frmObj.sun_performance_time.value
	var timeThurs  = "Evening"//frmObj.thurs_performance_time.value
	var msg = "" + numSeats + " seat(s) in the " + seatLoc + " for " + choiceDay
	
	
	
	
	
	if (choiceDay == "Thursday" && timeThurs != "0") {
			msg = msg + " " + timeThurs
	}
	if (choiceDay == "Saturday" && timeSat != "0") {
			msg = msg + " " + timeSat
	}
	if (choiceDay == "Sunday" && timeSun != "0") {
			msg = msg + " " + timeSun
	}
	
	frmObj.your_message.value = msg
	var perSeatPrem = 0
	var perSeatMez = 0
	var perSeatLoge = 0
	var perSeatBal = 0
	
	var perSeatPrem_1 = 0
	var perSeatMez_1 = 0
	var perSeatLoge_1 = 0
	var perSeatBal_1 = 0
	
	
	var ret = 0
	//alert(timeThurs);
    switch(choiceDay){
		case "First Night Package":
				perSeatMez = 300
				break;
    	case "Tuesday":
    	case "Wednesday": 
                perSeatPrem = 0
				perSeatMez = 515
				perSeatLoge = 465
				perSeatBal = 305	
    			break;

    	case "Thursday": 
	   		switch(timeThurs){
				case "Matinee":	
						perSeatPrem = 0
						perSeatMez = 394
						perSeatLoge = 309
						perSeatBal = 219
						break;
				case "Evening":	
						perSeatPrem = 532
						perSeatMez = 515
						perSeatLoge = 465
						perSeatBal = 305
						break;
		    	default: break;				
			} break;
    	case "Friday": 
				perSeatPrem = 552
				perSeatMez = 515
				perSeatLoge = 465
				perSeatBal = 305	
    			break;
    	case "Saturday": 
	   		switch(timeSat){
				case "Matinee":	
						perSeatPrem = 552
						perSeatMez = 515
						perSeatLoge = 465
						perSeatBal = 305
						break;
				case "Evening":	
						perSeatPrem = 552
						perSeatMez = 515
						perSeatLoge = 465
						perSeatBal = 305
						break;
		    	default: break;				
			} break;
    	case "Sunday":
	   		switch(timeSun){
				case "Matinee":
						perSeatPrem = 552
						perSeatMez = 515
						perSeatLoge = 465
						perSeatBal = 305
						break;
				case "Evening":	
						perSeatPrem = 532						
						perSeatMez = 515
						perSeatLoge = 465
						perSeatBal = 305
						break;
		    	default: break;
			} break;
    	default: break;
    }
       
	switch(seatLoc) {
		case "Main Floor": 
		case "Mezzanine": 
				ret = Math.abs(numSeats) * perSeatMez;
				break;
		case "Loge":  
				ret = Math.abs(numSeats) * perSeatLoge; 
				break;
		
		case "Premium Seating":  
				ret = Math.abs(numSeats) * perSeatPrem; 
				break;

		case "Balcony":  
				ret = Math.abs(numSeats) * perSeatBal; 
				break;
		default: 
				ret = 0; 
				break;
	}			
	
	return ret
}

function getDepositAmount(frmObj) {

	var numSeats = frmObj.subscribe_num_of_seats.value
	var depPerSeat  = 150

	ret = Math.abs(numSeats) * depPerSeat;

	return ret
}

/* GIFT CERTIFICATE */
function getGiftTotalAmount(frmObj) {

	var x = frmObj.dollar_amount.value
	ret = Math.abs(x) + 5
	if (ret == 5)
		ret = 0

	return ret
}
function GiftValidation(form) {
	if (form.billing_name.value == '') {
		alert("Billing Address Information: Please fill in your Name.");
		form.billing_name.focus();
		form.billing_name.select();
		return false;
	}
	
	if (form.billing_address.value == '') {
		alert("Billing Address Information: Please fill in your Address.");
		form.billing_address.focus();
		form.billing_address.select();
		return false;
	}
	
	if (form.billing_city.value == '') {
		alert("Billing Address Information: Please fill in your City.");
		form.billing_city.focus();
		form.billing_city.select();
		return false;
	}
	
	if (form.billing_state.value == '') {
		alert("Billing Address Information: Please fill in your State.");
		form.billing_state.focus();
		form.billing_state.select();
		return false;
	}
	
	if (form.billing_zip.value == '') {
		alert("Billing Address Information: Please fill in your Zip Code.");
		form.billing_zip.focus();
		form.billing_zip.select();
		return false;
	}
		
	if ((form.billing_phone.value==null)||(form.billing_phone.value=="")){
		alert("Billing Address Information: Please enter a valid Phone Number")
		form.billing_phone.focus();
		return false;
	}
	if (checkInternationalPhone(form.billing_phone.value)==false){
		alert("Billing Address Information: Please enter a valid Phone Number")
		form.billing_phone.value="";
		form.billing_phone.focus();
		return false;
	}
	if (!validEmail(form.billing_email.value)) {
		alert("Billing Address Information: A valid E-mail Address is required.");
		form.billing_email.focus();
		form.billing_email.select();
		return false;
	}
	
	if (form.credit_card_name.value == '') {
		alert("Credit Card Information: Please fill in your Name on the Credit Card.");
		form.credit_card_name.focus();
		form.credit_card_name.select();
		return false;
	}
	if (form.credit_card_number.value == '') {
		alert("Credit Card Information: Please fill in the Credit Card Number.");
		form.credit_card_number.focus();
		form.credit_card_number.select();
		return false;
	}

	var month_index = form.exp_date_month.value;
	var year_index = form.exp_date_year.value;
	if (!this.isExpiryDate(month_index,year_index))
	return false;
	
	var dollar_amount_index = form.dollar_amount.selectedIndex;
	if (dollar_amount_index == 0) {
		alert("Credit Card Information: Please select a Dollar Amount.");
		form.dollar_amount.focus();
		return false;
	}
	if (form.charge_amount.value == '') {
		alert("Credit Card Information: Please select a Dollar Amount.");
		form.dollar_amount.focus();
		return false;
	}
	return true;	
}

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

/* END GIFT CERTIFICATE INFORMATION */
/* VIP ORDER FORM */
function refreshSeating(frmObj) {	
	var x = frmObj.seating_date.selectedIndex;
	var showdate = frmObj.seating_date.options[x].value;
	var seating = 1;  //get_radio_value(frmObj.seating);	
	var numSeats = frmObj.number_of_tickets.value;
	var form_addhandling = $('#handling').val();
	var blah = 0;
	$.post("ajax/ajax_seating_cost.cfm", {
		dateofshow: showdate,
		seatinglocation: seating,
		numberoftickets: numSeats,
		addhandling: form_addhandling
	},
		function(data){
			$('#handling').attr('value','0'); // add total cost to field	
			$('#seating_total').attr('value',$.trim(data)); // add total cost to field			
			var totalvalue = parseFloat($('#seating_total').val()) + parseFloat($('#seating_total_1').val()); // total cost of fields
			$('#totalamount').attr('value',totalvalue.toFixed(2));
			//var blah = data;
			//ret = Math.abs(numSeats) * blah;
			//return ret
			addHandling();
		}
	);
}
function refreshSeating1(frmObj) {	
	var x = frmObj.seating_date_1.selectedIndex;
	var showdate = frmObj.seating_date_1.options[x].value;
	var seating = get_radio_value(frmObj.seating_1);	
	var numSeats = frmObj.number_of_tickets_1.value;
	var form_addhandling = $('#handling').val();
	var blah = 0;
	$.post("ajax/ajax_seating_cost.cfm", {
		dateofshow: showdate,
		seatinglocation: seating,
		numberoftickets: numSeats,
		addhandling: form_addhandling
	},
		function(data){
			$('#handling').attr('value','0'); // add total cost to field	
			$('#seating_total_1').attr('value',$.trim(data)); // add total cost to field			
			var totalvalue = parseInt($('#seating_total').val()) + parseInt($('#seating_total_1').val()) ; // total cost of fields
			$('#totalamount').attr('value',totalvalue.toFixed(2));
			addHandling();
			//$('#totalamount').attr('value',$.trim(data));
			//var blah = data;
			//ret = Math.abs(numSeats) * blah;
			//return ret
		}
	);
}

function addHandling() {
	var totalvalue = parseFloat($('#seating_total').val()) + parseFloat($('#seating_total_1').val());// + parseFloat('5'); // total cost of fields
	
	$('#totalamount').attr('value',totalvalue.toFixed(2));
}

function SubscribeValideVIP(form) {
	if (form.subscriber_number.value == '') {
		alert("Subscriber Information: Please fill in your Subscriber Number.");
		form.subscriber_number.focus();
		form.subscriber_number.select();
		return false;
	}
	if (form.subscriber_name.value == '') {
		alert("Subscriber Information: Please fill in your Name.");
		form.subscriber_name.focus();
		form.subscriber_name.select();
		return false;
	}
	if ((form.subscriber_phone.value==null)||(form.subscriber_phone.value=="")){
		alert("Subscriber Information: Please enter a valid Phone Number")
		form.subscriber_phone.focus();
		return false;
	}
	if (checkInternationalPhone(form.subscriber_phone.value)==false){
		alert("Subscriber Information: Please enter a valid Phone Number")
		form.subscriber_phone.value="";
		form.subscriber_phone.focus();
		return false;
	}
	/*
	if (form.number_of_tickets.value == 0) {
		alert("Choice of Day: Please fill in the Number of Tickets.");
		form.number_of_tickets.focus();
		form.number_of_tickets.select();
		return false;
	}
	*/
	if (form.credit_card_name.value == '') {
		alert("Credit Card Information: Please fill in your Name on the Credit Card.");
		form.credit_card_name.focus();
		form.credit_card_name.select();
		return false;
	}
	if (form.credit_card_number.value == '') {
		alert("Credit Card Information: Please fill in the Credit Card Number.");
		form.credit_card_number.focus();
		form.credit_card_number.select();
		return false;
	}
	var month_index = form.exp_date_month.value;
	var year_index = form.exp_date_year.value;
	if (!this.isExpiryDate(month_index,year_index))
	return false;
	
	
	
	
}
/* SUBSCRIBER ORDER FORM */
function SubscribeValidation(form) {
	/*
	myOption = -1;
	for (i=form.subscriber_type.length-1; i > -1; i--) 
	{
		if (form.subscriber_type[i].checked) 
		{
			myOption = i; i = -1;
		}
	}
	if (myOption == -1) 
	{
		alert("Subscriber Information: Please select a Subscription Option");
		return false;
	} 
	*/
	if (form.subscriber_name.value == '') {
		alert("Subscriber Information: Please fill in your Name.");
		form.subscriber_name.focus();
		form.subscriber_name.select();
		return false;
	}
	
	if (form.subscriber_address.value == '') {
		alert("Subscriber Information: Please fill in your Address.");
		form.subscriber_address.focus();
		form.subscriber_address.select();
		return false;
	}
	
	if (form.subscriber_city.value == '') {
		alert("Subscriber Information: Please fill in your City.");
		form.subscriber_city.focus();
		form.subscriber_city.select();
		return false;
	}
	
	if (form.subscriber_state.value == '') {
		alert("Subscriber Information: Please fill in your State.");
		form.subscriber_state.focus();
		form.subscriber_state.select();
		return false;
	}
	if (form.subscriber_zip.value == '') {
		alert("Subscriber Information: Please fill in your Zip Code.");
		form.subscriber_zip.focus();
		form.subscriber_zip.select();
		return false;
	}
		
	if ((form.subscriber_phone.value==null)||(form.subscriber_phone.value=="")){
		alert("Subscriber Information: Please enter a valid Phone Number")
		form.subscriber_phone.focus();
		return false;
	}
	if (checkInternationalPhone(form.subscriber_phone.value)==false){
		alert("Subscriber Information: Please enter a valid Phone Number")
		form.subscriber_phone.value="";
		form.subscriber_phone.focus();
		return false;
	}
	/*
	if (!validEmail(form.subscriber_email.value)) {
		alert("Subscriber Information: A valid E-mail Address is required.");
		form.subscriber_email.focus();
		form.subscriber_email.select();
		return false;
	}
	*/
	if (form.credit_card_name.value == '') {
		alert("Credit Card Information: Please fill in your Name on the Credit Card.");
		form.credit_card_name.focus();
		form.credit_card_name.select();
		return false;
	}
	if (form.credit_card_number.value == '') {
		alert("Credit Card Information: Please fill in the Credit Card Number.");
		form.credit_card_number.focus();
		form.credit_card_number.select();
		return false;
	}
	
	var month_index = form.exp_date_month.value;
	var year_index = form.exp_date_year.value;
	if (!this.isExpiryDate(month_index,year_index))
	return false;
	
	myDayOption = -1;
	for (i=form.aday.length-1; i > -1; i--) 
	{
		if (form.aday[i].checked) 
		{
			myDayOption = i; i = -1;
		}
	}
	if (myDayOption == -1) 
	{
		alert("Please indicate a Choice of Day");
		return false;
	} 
		
	var choiceDay  = get_radio_value(form.aday)
	var thurs_index = form.thurs_performance_time.selectedIndex;
	var sat_index = form.sat_performance_time.selectedIndex;
	var sun_index = form.sun_performance_time.selectedIndex;
		
	if (choiceDay == "Thursday" && thurs_index == 0) {
		alert("Please select the performance time for Thursday");
		return false;
	}
	if (choiceDay == "Saturday" && sat_index == 0) {
		alert("Please select the performance time for Saturday");
		return false;
	}
	if (choiceDay == "Sunday" && sun_index == 0) {
		alert("Please select the performance time for Sunday");
		return false;
	}
		
	if (form.alt_day.value == '') {
		alert("Please enter an alternate choice of day.");
		form.alt_day.focus();
		form.alt_day.select();
		return false;
	}	
	
	
	mySeatingOption = -1;
	for (i=form.seating.length-1; i > -1; i--) 
	{
		if (form.seating[i].checked) 
		{
			mySeatingOption = i; i = -1;
		}
	}
	if (mySeatingOption == -1) 
	{
		alert("Please select your seat location");
		return false;
	} 
	
	if (form.subscribe_num_of_seats.value == '') {
		alert("Please enter the Number of Seats that you wish to purchase.");
		form.subscribe_num_of_seats.focus();
		form.subscribe_num_of_seats.select();
		return false;
	}	
	var how_hear_index = form.how_hear.selectedIndex;
	if (how_hear_index == 0) {
		alert("Please select us now how you heard about us.");
		form.how_hear.focus();
		return false;
	}
		
	return true;
}

/* RENEWAL ORDER FORM */
function SubscribeRenewalValidation(form) {
	
	if (form.subscriber_number.value == '') {
		alert("Subscriber Information: Please fill in your Subscriber Number.");
		form.subscriber_number.focus();
		form.subscriber_number.select();
		return false;
	}
	
	if (form.subscriber_name.value == '') {
		alert("Subscriber Information: Please fill in your Name.");
		form.subscriber_name.focus();
		form.subscriber_name.select();
		return false;
	}
	if (form.subscriber_phone.value == '') {
		alert("Subscriber Information: Please fill in your Phone Number.");
		form.subscriber_phone.focus();
		form.subscriber_phone.select();
		return false;
	}
	if (form.credit_card_name.value == '') {
		alert("Credit Card Information: Please fill in your Name on the Credit Card.");
		form.credit_card_name.focus();
		form.credit_card_name.select();
		return false;
	}
	if (form.zip_code.value == '') {
		alert("Credit Card Information: Please fill in the Zip Code for this Credit Card.");
		form.zip_code.focus();
		form.zip_code.select();
		return false;
	}
	if (form.credit_card_number.value == '') {
		alert("Credit Card Information: Please fill in the Credit Card Number.");
		form.credit_card_number.focus();
		form.credit_card_number.select();
		return false;
	}
	return true;
}


/* PR CONTACT FORM */
function ValidatePRForm(form) {
 
	if (form.name.value == '') {
		alert("Please fill in your First Name.");
		form.name.focus();
		form.name.select();
		return false;
	}
	
	if (!validEmail(form.email.value)) {
		alert("A valid E-mail Address is required.");
		form.email.focus();
		form.email.select();
		return false;
	}
	
	return true;	
}

/* POP CALENDAR WINDOW */
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
  var winl = 1;
  var wint = 1;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=no';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}


var win= null;
function ShowWindow(mypage,myname){
  var winl = 1;
  var wint = 1;
  var settings  ='height=300,';
      settings +='width=300,';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars=yes,';
      settings +='resizable=no';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

var win= null;
function PurchaseWindow(mypage,myname){
  var winl = 1;
  var wint = 1;
  var settings  ='height=600,';
      settings +='width=800,';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars=yes,';
      settings +='resizable=no';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}


/* GROUP SALES */

function ValidateGroupSales(form) {
	if (form.contact_name.value == '') {
		alert("Please fill in your Contact Name.");
		form.contact_name.focus();
		form.contact_name.select();
		return false;
	}
	if (form.group_address.value == '') {
		alert("Please fill in your Address.");
		form.group_address.focus();
		form.group_address.select();
		return false;
	}
	if (form.contact_city.value == '') {
		alert("Please fill in your City.");
		form.contact_city.focus();
		form.contact_city.select();
		return false;
	}
	if (form.contact_state.value == '') {
		alert("Please fill in your State.");
		form.contact_state.focus();
		form.contact_state.select();
		return false;
	}
	if (form.contact_zip.value == '') {
		alert("Please fill in your Zip Code.");
		form.contact_zip.focus();
		form.contact_zip.select();
		return false;
	}
	if (form.contact_phone.value == '') {
		alert("Please fill in your Phone Number.");
		form.contact_phone.focus();
		form.contact_phone.select();
		return false;
	}
	
	if (!validEmail(form.contact_email.value)) {
		alert("A valid E-mail Address is required.");
		form.contact_email.focus();
		form.contact_email.select();
		return false;
	}
	if (form.show_name.value == '') {
		alert("Please fill in the Show Name.");
		form.show_name.focus();
		form.show_name.select();
		return false;
	}
	return true;	
}
