// JavaScript Document

function autotab(original,destination){
	if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
	destination.focus()
}

function hidePremature(){
	document.getElementById('DivPremature').style.display = 'none';
}
function showPremature(){
	document.getElementById('DivPremature').style.display = 'block';
}

function ParentInfo() { // if Parent clicked set field values to Parent values from hidden fields
	if (document.form1.Caller_Relationship1.checked) {
		document.form1.Caller_First_Name.value = document.form1.Parent_First_Name.value;
		document.form1.Caller_Last_Name.value = document.form1.Parent_Last_Name.value;
		document.form1.Caller_Address.value = document.form1.Parent_Address.value;
		document.form1.Caller_Address2.value = document.form1.Parent_Address2.value;
		document.form1.Caller_City.value = document.form1.Parent_City.value;
		document.form1.Caller_State.value = document.form1.Parent_State.value;
		document.form1.Caller_Zip.value = document.form1.Parent_Zip.value;
		document.form1.Caller_Email.value = document.form1.Parent_Email.value;
		document.form1.Caller_Phone_A.value = document.form1.Parent_Phone_A.value;
		document.form1.Caller_Phone_3.value = document.form1.Parent_Phone_3.value;
		document.form1.Caller_Phone_4.value = document.form1.Parent_Phone_4.value;
		document.form1.require_ok.value='n';
		document.getElementById('DivTitle').style.display = 'none';
		document.getElementById('DivFam').style.display = 'none';
		Y_Address();
		Y_Phone();
	}
}
 
function hideTitleOnly(){ // hides Professional Tilte when radial clicked
	document.getElementById('DivFam').style.display = 'block';
	document.getElementById('DivTitle').style.display = 'none';
	document.form1.require_ok.value='y';
}
function unHideAll(){ //shows Title and Organization
	document.getElementById('DivFam').style.display = 'block';
	document.getElementById('DivTitle').style.display = 'block';
	document.form1.require_ok.value='y';
}

function hideWhich(){
	document.getElementById('DivWhich').style.display = 'none';
}
function WhichPediatrician(){
	document.getElementById('DivWhich').style.display = 'block';
	if(document.all){
		document.getElementById('DivWhichText').innerText="Which physician or pediatrician told you about us?";
	}else{
		document.getElementById('DivWhichText').textContent="Which physician or pediatrician told you about us?";
	}
}
function WhichHospital(){
	document.getElementById('DivWhich').style.display = 'block';
	if(document.all){
		document.getElementById('DivWhichText').innerText="Which hospital told you about us?";
	}else{
		document.getElementById('DivWhichText').textContent="Which hospital told you about us?";
	}
}
function WhichWeb(){
	document.getElementById('DivWhich').style.display = 'block';
	if(document.all){
		document.getElementById('DivWhichText').innerText="Which web site told you about us?";
	}else{
		document.getElementById('DivWhichText').textContent="Which web site told you about us?";
	}
}
function WhichAd(){
	document.getElementById('DivWhich').style.display = 'block';
	if(document.all){
		document.getElementById('DivWhichText').innerText="Which advertisement told you about us?";
	}else{
		document.getElementById('DivWhichText').textContent="Which advertisement told you about us?";
	}
}
function WhichOther(){
	document.getElementById('DivWhich').style.display = 'block';
	if(document.all){
		document.getElementById('DivWhichText').innerText="How did you find out about us?";
	}else{
		document.getElementById('DivWhichText').textContent="How did you find out about us?";
	}
}