// JavaScript Document

function popUp(URL,winName,width,height) {
	var popUpWin = open(URL, winName, 'toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no,directories=no,copyhistory=no,height='+height+',width='+width);
}

function deleteRecord(p) {
	var doit = confirm('Deleting records is not undo-able\n\nDo you wish to continue?');
	if (doit) {
		location = p;
	}
}



/*Find a Dietitian */

function fadValidation(theForm){

	if(String(theForm.BUSINESS_NAME.value).replace(/\s+$/g, "") == ""){
		alert("Please enter your trading name")
		theForm.BUSINESS_NAME.focus()
		return false
	}
	if(String(theForm.LOCALITY.value).replace(/\s+$/g, "") == ""){
		alert("Please enter your suburb")
		theForm.LOCALITY.focus()
		return false
	}
	if(String(theForm.POSTCODE.value).replace(/\s+$/g, "") == ""){
		alert("Please enter your postcode")
		theForm.POSTCODE.focus()
		return false
	}
	if(!theForm.dec.checked){
		alert("Please accept the declaration")
		theForm.dec.focus()
		return false
	}	
	/*if(String(theForm.GP_DIVISION.value).replace(/\s+$/g, "") == ""){
		alert("Please select a Division of General Practise")
		theForm.GP_DIVISION.focus()
		return false
	}*/
return true
	
}

function giveFocus(notAdmin) {
	if (notAdmin == "true") {
		document.LOGIN.LOGIN_NAME.focus();
	}
}

function removezero(frmData) {
  frmData.DAY.value = frmData.DAY.value - 0;
  frmData.MONTH.value = frmData.MONTH.value - 0;
  frmData.YEAR.value = frmData.YEAR.value - 0;
  frmData.submit();
}



