// JavaScript Document
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";
	}
}

function populateFields(driverNumber)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var d1Address = document.autoQuote.d1Address.value;
		document.autoQuote.d2Address.value = d1Address;
		document.autoQuote.d3Address.value = d1Address;
		document.autoQuote.d4Address.value = d1Address;
		
		var d1City = document.autoQuote.d1City.value;
		document.autoQuote.d2City.value = d1City;
		document.autoQuote.d3City.value = d1City;
		document.autoQuote.d4City.value = d1City;
		
		var d1State = document.autoQuote.d1State.value;
		document.autoQuote.d2State.value = d1State;
		document.autoQuote.d3State.value = d1State;
		document.autoQuote.d4State.value = d1State;
		
		var d1Zip = document.autoQuote.d1Zip.value;
		document.autoQuote.d2Zip.value = d1Zip;
		document.autoQuote.d3Zip.value = d1Zip;
		document.autoQuote.d4Zip.value = d1Zip;
		
		//var style2 = document.getElementById('d' + driverNumber + 'Name').style;
		//style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		var d1Name = document.autoQuote.d1Name.value;
		document.autoQuote.d2Name.value = d1Name;
		// this is the way old msie versions work
		//var style2 = document.all[whichLayer].style;
		//style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		var d1Name = document.autoQuote.d1Name.value;
		document.autoQuote.d2Name.value = d1Name;
		// this is the way nn4 works
		//var style2 = document.layers[whichLayer].style;
		//style2.display = style2.display? "":"block";
	}
}