function getSelectValue(theSelect)
{

	if (theSelect.selectedIndex == -1)
	{
		return('');
	}else{
		return(theSelect.options[theSelect.selectedIndex].value);
	}

}

function letSelectValue(theSelect,theValue)
{

	for (var i = 0;  i < theSelect.options.length;  i++)
	{
		if (theSelect.options[i].value == theValue)
		{
			theSelect.selectedIndex = i;
			return true;
		}
	}
	
	return false;
}

function fillCCADD(theForm)
{
	theForm.CardholderAddress.value = theForm.Contact_StreetAddress.value;
	theForm.CardholderCity.value = theForm.Contact_City.value;
	letSelectValue(theForm.CardholderState, getSelectValue(theForm.Contact_State));
	theForm.CardholderZip.value = theForm.Contact_ZIP.value;

return false;
}

function fillCCDBA(theForm)
{
	theForm.CardholderAddress.value = theForm.varstreet.value;
	theForm.CardholderCity.value = theForm.varcity.value;
	letSelectValue(theForm.CardholderState, getSelectValue(theForm.varstate2));
	theForm.CardholderZip.value = theForm.varzip.value;

return false;
}

