function setAccount(value) 
	{
	var n = value;
	
	if (n != 'default')
		{
		location.href = n;
		submit();
		}
	}
	
	
function statementPeriod() 
	{
	var n = document.history.statement.value;
	
	switch (n)
		{
		case 'last':
			{
			document.history.action = "cardhistory.htm";
			document.history.submit();
			break;
			}
		case 'prior':
			{
			document.history.action = "cardhistory_previous.htm";
			document.history.submit();
			break;
			}
		case '3ago':
			{
			document.history.action = "cardhistory_3ago.htm";
			document.history.submit();
			break;
			}
		case 'order':
			{
			document.history.action = "orderstatement.htm";
			document.history.submit();
			break;
			}
		default:
			break;
		}
	}
	
function CLIOffer()
	{
	if (cli.clioption[0].checked)
		{
		location.href = "cliconfirm.htm";
		}
	else if (cli.clioption[1].checked || cli.clioption[2].checked)
		{
		location.href = "recentactivity_0003.htm";
		}
	else
		{
		location.href = "cliconfirm.htm";
		}	
	}
	
	
function showForm()
	{
	if (addressForm.country.value == "US" || addressForm.country.value == "AA" ||
	    addressForm.country.value == "AE" || addressForm.country.value == "AP" ||
	    addressForm.country[0].selected)
		{		
		changeObjectVisibility("countryMsg","hidden");
		changeObjectVisibility("citylabel","visible");		
		changeObjectVisibility("cityfield","visible");
		changeObjectVisibility("statelabel","visible");
		changeObjectVisibility("statefield","visible");
		changeObjectVisibility("ziplabel","visible");
		changeObjectVisibility("zipfield","visible");
		}
		
	else if (addressForm.country.value == "AS" || addressForm.country.value == "AU" ||
	    addressForm.country.value == "GU" || addressForm.country.value == "RS" ||
	    addressForm.country.value == "FM" || addressForm.country.value == "MP" ||
	    addressForm.country.value == "PI" || addressForm.country.value == "PW" ||
	    addressForm.country.value == "VI" || addressForm.country.value == "PR")
		{		
		changeObjectVisibility("countryMsg","visible");
		changeObjectVisibility("citylabel","hidden");		
		changeObjectVisibility("cityfield","hidden");
		changeObjectVisibility("statelabel","hidden");
		changeObjectVisibility("statefield","hidden");
		changeObjectVisibility("ziplabel","visible");
		changeObjectVisibility("zipfield","visible");
		}
		
	else
		{
		changeObjectVisibility("countryMsg","visible");
		changeObjectVisibility("citylabel","hidden");		
		changeObjectVisibility("cityfield","hidden");
		changeObjectVisibility("statelabel","hidden");
		changeObjectVisibility("statefield","hidden");
		changeObjectVisibility("ziplabel","hidden");
		changeObjectVisibility("zipfield","hidden");
		}
	
	}
	

function getStyleObject(objectId) {
  // checkW3C DOM, then MSIE 4, then NN 4.
  //
  if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
   }
   else if (document.all && document.all(objectId)) {  
	return document.all(objectId).style;
   } 
   else if (document.layers && document.layers[objectId]) { 
	return document.layers[objectId];
   } else {
	return false;
   }
}

function changeObjectVisibility(objectId, newVisibility) {
    // first get a reference to the cross-browser style object 
    // and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	// we couldn't find the object, so we can't change its visibility
	return false;
    }
}

