function billing2shipping() {
	var aForm = document.flexFrmBillingShipping;
	aForm.vchShippingFirstName.value = aForm.vchBillingFirstName.value;
	aForm.vchShippingLastName.value = aForm.vchBillingLastName.value;
	aForm.vchShippingStreetAddr.value = aForm.vchBillingStreetAddr.value;
	aForm.vchShippingStreetAddr2.value = aForm.vchBillingStreetAddr2.value;
	aForm.vchShippingCity.value = aForm.vchBillingCity.value;
	aForm.vchShippingState.value = aForm.vchBillingState.value;
	aForm.vchShippingZIP.value = aForm.vchBillingZIP.value;
	aForm.vchShippingDaytimePhone.value = aForm.vchBillingDaytimePhone.value;
	aForm.vchShippingDaytimeExt.value = aForm.vchBillingDaytimeExt.value;
	return false;
}
// US State autocompleter begin
var USStates = new Array( "Alaska", "Alabama", "Arkansas", "Arizona", "California", "Colorado", "Connecticut", "District of Columbia", "Delaware", "Florida", "Georgia", "Hawaii", "Iowa", "Idaho", "Illinois", "Indiana", "Kansas", "Kentucky", "Louisiana", "Massachusetts", "Maryland", "Maine", "Michigan", "Minnesota", "Missouri", "Mississippi", "Montana", "North Carolina", "North Dakota", "Nebraska", "New Hampshire", "New Jersey", "New Mexico", "Nevada", "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Virginia", "Vermont", "Washington", "Wisconsin", "West Virginia", "Wyoming" );

function flexAutocompletePrecheck( sender, e )
{
	// Check for alpha numeric keys
	if ( ( e.keyCode >= 48 && e.keyCode <= 57 ) || ( e.keyCode >= 65 && e.keyCode <= 90 ) )
	{
		var searchState = sender.value.toLowerCase();
		for ( var i = 0; i < USStates.length; i++ ) {
			var state = USStates[i].toLowerCase();
			if( state.indexOf(searchState) != -1 ) {
				if( sender.name == 'vchBillingState' ) {
					cb_flexAutocomplete1( USStates[i].substr(searchState.length,USStates[i].length) );
				}
				else {
					cb_flexAutocomplete2( USStates[i].substr(searchState.length,USStates[i].length) );
				}
				break;
			}
		}
		return false;
	}
}
function cb_flexAutocomplete1( suggestion )
{
	if ( suggestion )
	{
		var inp = document.getElementById( 'vchBillingState' );

		// IE
		if ( document.selection )
		{
			var sel = document.selection.createRange();
			sel.text = suggestion;
			sel.move( 'character', -suggestion.length );
			sel.findText( suggestion );
			sel.select();
		}
		else
		{
			var preLength = inp.value.length;
			inp.value += suggestion;
			inp.selectionStart = preLength;
			inp.selectionEnd   = inp.value.length;
		}
	}
}
function cb_flexAutocomplete2( suggestion )
{
	if ( suggestion )
	{
		var inp = document.getElementById( 'vchShippingState' );

		// IE
		if ( document.selection )
		{
			var sel = document.selection.createRange();
			sel.text = suggestion;
			sel.move( 'character', -suggestion.length );
			sel.findText( suggestion );
			sel.select();
		}
		else
		{
			var preLength = inp.value.length;
			inp.value += suggestion;
			inp.selectionStart = preLength;
			inp.selectionEnd   = inp.value.length;
		}
	}
}
// US State autocompleter end