function findaddress(pcode, radius, limit_results){
	if (pcode != ''){
	    // clear the message if any
		showMessage('&nbsp;');
		// disable the button
		toggleFormButton(true);
		// submit the form and data
	    document.PostCoderForm.postcode.value = pcode;
	    document.PostCoderForm.radius.value = radius;
	    document.PostCoderForm.limit_results.value = limit_results;
		document.PostCoderForm.submit();
	}
}
function showMessage(str){
	if(document.getElementById){
		document.getElementById('message').innerHTML = str;
	}
	else if (document.all){
    		document.all['message'].innerHTML = str;
	}
}

function toggleFormButton(status) {
	var theform = document.NearestForm;
	if (status == true)
			theform.searchbutton.value = 'Searching...';
		else
			theform.searchbutton.value = 'Find my Nearest';
}
function clearMapFrame() {
	map_result.document.body.innerHTML = "";
}

