function setup() {
	
	// JC Ref 1415 For html popups
	var a;
	for (var i = 0; (a = document.links[i]); i++) {
		if (a.target && a.target.indexOf("_soopaPop") == 0) {
			a.onclick = soopaPop;
		}
	}
	
//  disableRadioGroup(document.myform.answer);void(0);
//  disableInput(document.myform.surname);void(0);
//  disableSelect(document.myform.year);void(0);
//  alert(document.referrer);
}

// Could have something defined in the library that you pass the value
// and a key word that identifies the checking neccersary for the value
// Also a global variable that accumulates the errors and then they can
// be presented at the end.
//
// Example: check(value, address)
//          - checks that it has a value
//          - checks that it is alphanumeric
//
// and then: if (global_error_list[].length > 0) {
//              print out array into alert box

function validate_form(form)
{
//  if (!form.answer.length) {
//    alert("You need to select an answer");
//		return();
//	}
//  if (isValidLength(form.surname.value, 1, 50)) {
//    alert("You need to enter a surname");
//		return();
//	}
//  if (isAlphabetic(form.surname.value, ignoreWhiteSpace)) {
//    alert("You need to select an answer");
//		return();
//	}
//	if (isAlphanumeric(form.address1.value, ignoreWhiteSpace)) { 
//    alert("You need to select an answer");
//		return();
//	}
  form.submit();
}

function soopaPop() {
	var a = this.target.split(":");
	var sFeatures = a[1];
	window.open(this.href, a.length > 2 ? a[2] : String((new Date()).getTime()), sFeatures);
	return false;
}

