//Function to utilise Google's analytical goals.
//Forms affected are contact.asp, sample_order.asp and footer_inc.asp

function contactGoal(goalId) {
	switch(goalId) {
	//Visit to contact us page - out of service.
	case 1:
		goalTracker("/goal1.html");
	break 
	//submitted contact form
	case 2:
		goalTracker("/goal2.html");
	break 
	//order sample completion
	case 3:
		goalTracker("/goal3.html");
	break 
	//newsletter signup
	case 4:
		goalTracker("/goal4.html");
	break 
	}
}

/* 
The function that controls the mailto's goal tracking on the contact page. 
The goal1.html reference in the function above is deprecated 
*/
function emailTracking(email) {
	goalTracker("/goal1.html");

	//Just redirect's the user's window to a mailto.
	location.replace("mailto:" + email);
}

function goalTracker(goalUrl) {
	//URL just a way of counting goals reached.
	urchinTracker(goalUrl);
//	alert("thankyou " + goalUrl);
}

_uacct = "UA-31063-41";
urchinTracker();