// JavaScript Document
function goform(){
	document.contactDetails.submit();
}
function closeDialog(){
	$("#divId").dialog("close");
	return false;
}
function showDialog(){
   $("#divId").html('<iframe id="modalIframeId" width="500" height="500" marginWidth="0" marginHeight="0" frameBorder="1" id="addresslookup" name="addresslookup"/>').dialog("open");
   $("#modalIframeId").attr("src","pcode/blank.html");
   return false;
}


$(document).ready(function() {
   $("#divId").dialog({
           autoOpen: false,
           modal: true,
           height: 630,
           width: 540
       });
});

function findaddress(inputString)
{
	if (inputString != ''){
		// disable the button
		//toggleFormButton(true);
		// clear the form
		//clearform();
		// submit the form and data
	    document.S2SForm.inputString.value = inputString;
		document.S2SForm.submit();
	}
}
/*function toggleFormButton(status) {
	var theform = document.contactDetails;
	if (document.all || document.getElementById) {
		var tempobj = theform.searchbutton;
		if (status == true)
			tempobj.value = 'Searching...';
		else
			tempobj.value = 'Find Address';				
		tempobj.disabled = status;
	}
}
function clearform(){
	var theform = document.contactDetails;
	theform.organisation.value="";
	theform.address1.value="";
	theform.address2.value="";
	theform.address3.value="";
	theform.address4.value="";
	theform.town.value="";
	theform.county.value="";
	theform.postcode.value="";
}*/
