<?php
/**
 * abbreviate.php 
 *
 * @package fedex automated shipping labels
 * @copyright Copyright 2007-2008 Numinix Technology http://www.numinix.com
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: abbreviate.php 3 2008-06-06 07:13:33Z numinix $
 * @author Numinix Technology
 */
function abbreviate_country($country) {
	switch ($country) {
      case 'United States':
        $country = 'US';
        break;
			case 'Canada':
        $country = 'CA';
        break;				
	}
	return $country;
}						

function abbreviate_state($state) {
    switch ($state) {
      case 'Alabama':
        $state = 'AL';
        break;
      case 'Alaska':
        $state = 'AK';
        break;
      case 'Alberta':
        $state = 'AB';
        break;  
      case 'American Samoa':
        $state = 'AS';
        break;
      case 'Arizona':
        $state = 'AZ';
        break;
      case 'Arkansas':
        $state = 'AR';
        break;
      case 'British Columbia':
        $state = 'BC';
        break;
			case 'California':
        $state = 'CA';
        break;
			case 'Colorado':
        $state = 'CO';
        break;
			case 'Connecticut':
			  $state = 'CT';
			  break;
			case 'Delaware':
			  $state = 'DE';
			  break;
			case 'District of Columbia':
			  $state = 'DC';
			  break;
			case 'Federated States of Micronesia':
			  $state = 'FM';
			  break;
			case 'Florida':
			  $state = 'FL';
			  break;
			case 'Georgia':
			  $state = 'GA';
			  break;
			case 'Guam':
			  $state = 'GU';
			  break;
			case 'Hawaii':
			  $state = 'HI';
			  break;
			case 'Idaho':
			  $state = 'ID';
			  break;
			case 'Illinois':
			  $state = 'IL';
			  break;
			case 'Indiana':
			  $state = 'IN';
			  break;
			case 'Iowa':
			  $state = 'IA';
			  break;
			case 'Kansas':
			  $state = 'KS';
			  break;
			case 'Kentucky':
			  $state = 'KY';
			  break;
			case 'Louisiana':
			  $state = 'LA';
			  break;
			case 'Maine':
			  $state = 'ME';
			  break;
      case 'Manitoba':
        $state = 'MB';
        break;
			case 'Marshall Islands':
			  $state = 'MH';
			  break;
			case 'Maryland':
			  $state = 'MD';
			  break;
			case 'Massachusetts':
			  $state = 'MA';
			  break;
			case 'Michigan':
			  $state = 'MI';
			  break;
			case 'Minnesota':
			  $state = 'MN';
			  break;
			case 'Mississippi':
			  $state = 'MS';
			  break;
			case 'Missouri':
			  $state = 'MO';
			  break;
			case 'Montana':
			  $state = 'MT';
			  break;
			case 'Nebraska':
			  $state = 'NE';
			  break;
			case 'Nevada':
			  $state = 'NV';
			  break;
      case 'New Brunswick':
        $state = 'NB';
        break;
      case 'Newfoundland':
        $state = 'NL';
        break;
			case 'New Hampshire':
			  $state = 'NH';
			  break;
			case 'New Jersey':
			  $state = 'NJ';
			  break;
			case 'New Mexico':
			  $state = 'NM';
			  break;
			case 'New York':
			  $state = 'NY';
			  break;
			case 'North Carolina':
			  $state = 'NC';
			  break;
			case 'North Dakota':
			  $state = 'ND';
			  break;
			case 'Northern Mariana Islands':
			  $state = 'MP';
			  break;
      case 'Northwest Territories':
        $state = 'NT';
        break;
      case 'Nova Scotia':
        $state = 'NS';
        break;
      case 'Nunavut':
        $state = 'NU';
        break;
			case 'Ohio':
			  $state = 'OH';
			  break;
			case 'Oklahoma':
			  $state = 'OK';
			  break;
      case 'Ontario':
        $state = 'ON';
        break;
			case 'Oregon':
			  $state = 'OR';
			  break;
			case 'Palau':
			  $state = 'PW';
			  break;
			case 'Pennsylvania':
			  $state = 'PA';
			  break;
      case 'Prince Edward Island':
        $state = 'PE';
        break;
			case 'Puerto Rico':
			  $state = 'PR';
			  break;
      case 'Quebec':
        $state = 'QC';
        break;
			case 'Rhode Island':
			  $state = 'RI';
			  break;
      case 'Saskatchewan':
        $state = 'SK';
        break;
			case 'South Carolina':
			  $state = 'SC';
			  break;
			case 'South Dakota':
			  $state = 'SD';
			  break;
			case 'Tennessee':
			  $state = 'TN';
			  break;
			case 'Texas':
			  $state = 'TX';
			  break;
			case 'Utah':
			  $state = 'UT';
			  break;
			case 'Vermont':
			  $state = 'VT';
			  break;
			case 'Virgin Islands':
			  $state = 'VI';
			  break;
			case 'Virginia':
			  $state = 'VA';
			  break;
			case 'Washington':
			  $state = 'WA';
			  break;
			case 'West Virginia':
			  $state = 'WV';
			  break;
			case 'Wisconsin':
			  $state = 'WI';
			  break;
			case 'Wyoming':
			  $state = 'WY';
			  break;
      case 'Yukon':
        $state = 'YT';
        break;
			}
		return $state;
		}
		
?>