function tclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}
function trecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

function submitHousingAssocLookup(thisfield) {

	// alert("submitting field = " + thisfield.name);
	if ((thisfield.form.localauthority.value == -1) && (thisfield.form.county.value == -1))
		return;

	if (thisfield.name == 'county')
		thisfield.form.localauthority.value = -1;
	else
		thisfield.form.county.value = -1;

//	alert("thispage form name = " + thispage.form.name);
//	alert("thispage county value = " + thispage.form.county.value);

//	thispage.form.county.value = -1;
	thisfield.form.submit();
	
}

function submitSolicitorLookup(thisfield) {

	// alert("submitting field = " + thisfield.name);
	if ((thisfield.form.localauthority.value == -1) && (thisfield.form.county.value == -1) && (thisfield.form.region.value == -1) )
		return;

	if (thisfield.name == 'county')
		thisfield.form.localauthority.value = -1;
	else
		thisfield.form.county.value = -1;

//	alert("thispage form name = " + thispage.form.name);
//	alert("thispage county value = " + thispage.form.county.value);

//	thispage.form.county.value = -1;
	thisfield.form.submit();
	
}

