function toggleOtherTitle(type)
{
	if (type=="original")
	{
		var whichLayer = "divOOtherTitle";
		var title = (document.contactDetails.o_title.value);
	}
	else
	{
		var whichLayer = "divOtherTitle"
		var title = (document.contactDetails.title.value);
	}
	
	if (title=="Other")
	{
		document.getElementById(whichLayer).style.display = "block";
	}
	else
	{	
		document.getElementById(whichLayer).style.display = "";
		title = "";
	}
}


function showAddressFields()
{
	document.getElementById("divAddressTitle").style.display = "block";
	document.getElementById("divAddress1").style.display = "block";
	document.getElementById("divAddress2").style.display = "block";
	document.getElementById("divAddress3").style.display = "block";
	document.getElementById("divAddress4").style.display = "block";
	document.getElementById("divPostTownTitle").style.display = "block";
	document.getElementById("divPostTown").style.display = "block";
	document.getElementById("divPostcodeTitle").style.display = "block";
	document.getElementById("divPostcode").style.display = "block";	
	document.getElementById("divOrganisation").style.display = "block";	
	document.getElementById("divOrganisationTitle").style.display = "block";	
}

function toggleOtherCouncil()
{
	var whichLayer = "divOtherCouncil"
	var council = (document.contactDetails.council.value);
	
	if (council=="Other")
	{
		document.getElementById(whichLayer).style.display = "block";
	}
	else
	{	
		document.getElementById(whichLayer).style.display = "";
		document.contactDetails.other_council.value = "";
	}
}


function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}
