function googleAnalytics(){
	document.write('<script type=\"text/javascript\">var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");document.write(unescape(\"%3Cscript src=\'\" + gaJsHost + \"google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E\"));</script>');
	document.write('<script type="text/javascript">try {var pageTracker = _gat._getTracker("UA-6038046-1"); pageTracker._trackPageview(); } catch(err) {}</script>');

}


function calculateCD(form) {
	var formobj = document.getElementById? document.getElementById("quantity"): document.all.formdiv;
	var squantity = new String(document.cdsale.txt_quantity.value);
	if (squantity == "" || squantity == "0"){
		window.alert("Please enter the Quantity of CDs you would like to purchase.");
	}
	else if (document.cdsale.country.options[document.cdsale.country.selectedIndex].value == "0"){
		window.alert("Please select where the CDs are to be delivered to.");
	}
	else {
		if (isNaN(parseInt(squantity))){window.alert("Please enter a Number for the quantity of CDs you require.");squantity = "0";}
		squantity=parseInt(squantity)
		document.cdsale.txt_quantity.value = squantity;
		formobj.innerHTML = "<b>" + squantity + "</b> copy(ies) of The Graduate Choir NZ :: My Spirit Sang All Day at <b>NZD$25</b> each";}
}

function verify(thisForm){
if (thisForm.formname.value == "enquiry"){

	if (thisForm.Enquiry.value == ""){
		window.alert("Please enter your comment or enquiry.");
		return false;}

	if (thisForm.Email1.value == ""){
		if(window.confirm("Are you sure you want to submit your comment without providing an email address?")){return true}
		else {return false}
	}
	else { 
		if (thisForm.Email1.value.indexOf("@") == -1){
			window.alert("Please enter a valid email address so that we can reply to your enquiry.");
			return false;}
		if (thisForm.Email1.value.indexOf(".") == -1) {
			window.alert("Please enter a valid email address so that we can reply to your enquiry.");
			return false;}
	}
}


else if (thisForm.formname.value == "audition"){
	if (thisForm.Name.value == ""){
		window.alert("Please enter your Name.");
		return false;}
	if (thisForm.VoicePart.value == "0"){
		window.alert("Please select which Voice Part you usually sing.  If you're not sure please comment on this at the bottom of the form.");
		return false;}
	if (thisForm.Email1.value == ""){
		window.alert("Please enter your email address so that we can respond to your enquiry.");
		return false;}
	if (thisForm.Email1.value.indexOf("@") == -1){
		window.alert("Please enter a valid email address so that we can respond to your enquiry.");
		return false;}
	if (thisForm.Email1.value.indexOf(".") == -1) {
		window.alert("Please enter a valid email address so that we can respond to your enquiry.");
		return false;}
}
	return true;}
function ibrowserInfo() {}
