<!--

// preload rollover images

var preLoadImg = 0; 

function init(intNumImg){

	navImg = new Array ();

	for (i=0;i<intNumImg;i++) {

 		navImg[i] = new Image();

 		navImg[i].src="images/bt_img" + i + ".gif";

	}

	preLoadImg = 1;

}

// roll overs

function changeImage(imgId,imgNum) {

	if(preLoadImg){

		if (document.layers) {return document.images[imgId].src=navImg[imgNum].src}

		if (document.all) {return document.all[imgId].src=navImg[imgNum].src}

		if (document.getElementById && !document.all) {return document.getElementById(imgId).src=navImg[imgNum].src}

	}

}

// create pop up window

function newWindow(theURL,winName) {

  window.open(theURL,winName,'scrollbars=yes,width=330,height=300,resizable=yes,location=no,menubar=yes');

}





function openNewWindow(URLtoOpen, windowName, windowFeatures) {

	newWindow=window.open(URLtoOpen, windowName, windowFeatures); 

}





var state = 'none'; 

function showhide(layer_ref) { 



	if (state == 'block') { 

		state = 'none'; 

	} 	else { 

		state = 'block'; 

	} 

	if (document.all) { //IS IE 4 or 5 (or 6 beta) 



		eval( "document.all." + layer_ref + ".style.display = state"); 

		

	} 

	if (document.layers) { //IS NETSCAPE 4 or below 

		document.layers[layer_ref].display = state; 

	} 

	if (document.getElementById &&!document.all) { 

		hza = document.getElementById(layer_ref); 

		hza.style.display = state; 

				

	} 

	layer_ref="";

} 

		

function submitTransactionForm(formType) {

	var strMsg='';

	//alert("strMsg: " + strMsg);

	if (formType == "sponsor") {

		document.transactionForm.name.value = document.transactionForm.fullName.value;



		if (document.transactionForm.amt.value < 1) {

			strMsg = " - You have not chosen an amount for your donation\n"	}



	}



		

	if (formType == "donation") {

	

		document.transactionForm.name.value = (document.transactionForm.firstName.value + " " + document.transactionForm.familyName.value);

	

		if (document.transactionForm.otherAmount.value != '') {

			document.transactionForm.amt.value = document.transactionForm.otherAmount.value;

		}

		if (document.transactionForm.amt.value < 1) {

			strMsg = " - You have not chosen an amount for your donation\n"			}

	}



	if (document.transactionForm.name.value == '') {

		strMsg += " - You have not entered a firstname or surname \n"			}

	if (document.transactionForm.email.value == '') {

		strMsg += " - You have not entered an email address \n"			}



	if (strMsg == '') {

		document.transactionForm.submit();

	} else {

		alert("Please correct the following:\n\n" + strMsg);

	}

}



function submitSGEForm(courseType) {



	var strMsg='';



	if (courseType != "ssv") {

		document.transactionForm.name.value = (document.transactionForm.studentFirstName.value + " " + document.transactionForm.studentFamilyName.value);

	

		if (document.transactionForm.name.value == ' ') {

			strMsg += " - You have not entered a firstname or surname \n"			}

	}

	

	if (document.transactionForm.email.value == '') {

		strMsg += " - You have not entered an email address \n"			}



	if (strMsg == '') {

		document.transactionForm.submit();

	} else {

		alert("Please correct the following:\n\n" + strMsg);

	}

}

//-->
