function getCityStateZip()
{
	var zip = JAY.$(this.id);
	if(zip.value.length >= 5)
	{
		var type = (this.id.substr(0, 1) == 'S' ? this.id.substr(0, 1) : '');
		if(zip.value.length >= 5 && (new RegExp("[0-9]")).test(zip.value))
		{
			JAY.ajaxRequest('/?src=AJAX/ups_validate' + (internal ? '.php' : '') + '&zip='+zip.value,
			{
				completeListener:function()
				{
					var states = JAY.$(type + 'states') || JAY.$(type + 'state');
					
					var addr = this.responseText.split('|');
					JAY.$(type + 'city').value = addr[0];
					var state = addr[1];
					
					if(state == 'APO' || state == 'FPO')
						states.insertOption(state);
					
					for(var i = 0; i < states.options.length; i++)
					{
						if(states.options[i].value == state)
						{
							states.options[i].selected = true;
							i = states.options.length;
						}
					} 
				}
			});  
		}
	}
}