<!-- Begin

// INTERFACE FUNCTIONS

function createStandardCountryList() {
	createCountryList(null);
}

function createCountryList(defaultCountryCode) {
	createNamedCountryList("country", defaultCountryCode);
}

function createNamedCountryList(name, defaultCountryCode, onChangeName) {
	// if the defaultCountryCode is null or not in the array, set to fallback default
	var notFound = true;
        var onChangeTag = null;
	if (defaultCountryCode != null) {
		for ( var i=0; notFound && i<COUNTRY_COUNT; i++ ) {
			notFound = !(defaultCountryCode == countryCodes[i]);
		}
		if ( notFound ) {
   		defaultCountryCode = FALLBACK_DEFAULT_COUNTRY_CODE;
		}
	} else {
  		defaultCountryCode = FALLBACK_DEFAULT_COUNTRY_CODE;
  	}
        if (onChangeName != null) {
          onChangeTag = 'onChange="' + onChangeName + '"';
        }
	// open the SELECT tag
	document.writeln('<SELECT NAME="' + name + '"' + ' ' + onChangeTag + '>');
	// write the values
	for ( var i = 0; i < COUNTRY_COUNT; i++) {
		if (countryCodes[i] != defaultCountryCode) {
		   document.writeln('<OPTION VALUE="' + countryCodes[i] + '">' + countryNames[i] + '</OPTION>');
		} else {
		   document.writeln('<OPTION SELECTED="SELECTED" VALUE="' + countryCodes[i] + '">' + countryNames[i] + '</OPTION>');
		}
	}
	// close the SELECT tag
	document.writeln("</SELECT>");
}

function printCountryName(code) {
        var name = getCountryName(code);
        if (name != null) {
           document.writeln(name);
        }
}

function getCountryName(code) {
	for ( var i=0; i<COUNTRY_COUNT; i++ ) {
   	if ( countryCodes[i] == code ) {
   		return countryNames[i];
		}
	}
	return null;
}

function getCountryCode(name) {
	for ( var i=0; i<COUNTRY_COUNT; i++ ) {
   	if ( countryNames[i] == name ) {
   		return countryCodes[i];
		}
	}
	return null;
}

// PARAMETERS AND DATA
var FALLBACK_DEFAULT_COUNTRY_CODE = "NONE";
var COUNTRY_COUNT = 240;
var countryCodes = new Array(COUNTRY_COUNT);
var countryNames = new Array(COUNTRY_COUNT);
countryCodes[0] = ""; countryNames[0] = "Please Select a Country";
countryCodes[1] = "AF"; countryNames[1] = "Afghanistan";
countryCodes[2] = "AL"; countryNames[2] = "Albania";
countryCodes[3] = "DZ"; countryNames[3] = "Algeria";
countryCodes[4] = "AS"; countryNames[4] = "American Samoa";
countryCodes[5] = "AD"; countryNames[5] = "Andorra";
countryCodes[6] = "AO"; countryNames[6] = "Angola";
countryCodes[7] = "AI"; countryNames[7] = "Anguilla";
countryCodes[8] = "AQ"; countryNames[8] = "Antarctica";
countryCodes[9] = "AG"; countryNames[9] = "Antigua And Barbuda";
countryCodes[10] = "AR"; countryNames[10] = "Argentina";
countryCodes[11] = "AM"; countryNames[11] = "Armenia";
countryCodes[12] = "AW"; countryNames[12] = "Aruba";
countryCodes[13] = "AU"; countryNames[13] = "Australia";
countryCodes[14] = "AT"; countryNames[14] = "Austria";
countryCodes[15] = "AZ"; countryNames[15] = "Azerbaijan";
countryCodes[16] = "BS"; countryNames[16] = "Bahamas";
countryCodes[17] = "BH"; countryNames[17] = "Bahrain";
countryCodes[18] = "BD"; countryNames[18] = "Bangladesh";
countryCodes[19] = "BB"; countryNames[19] = "Barbados";
countryCodes[20] = "BY"; countryNames[20] = "Belarus";
countryCodes[21] = "BE"; countryNames[21] = "Belgium";
countryCodes[22] = "BZ"; countryNames[22] = "Belize";
countryCodes[23] = "BJ"; countryNames[23] = "Benin";
countryCodes[24] = "BM"; countryNames[24] = "Bermuda";
countryCodes[25] = "BT"; countryNames[25] = "Bhutan";
countryCodes[26] = "BO"; countryNames[26] = "Bolivia";
countryCodes[27] = "BA"; countryNames[27] = "Bosnia And Herzegowina";
countryCodes[28] = "BW"; countryNames[28] = "Botswana";
countryCodes[29] = "BV"; countryNames[29] = "Bouvet Island";
countryCodes[30] = "BR"; countryNames[30] = "Brazil";
countryCodes[31] = "IO"; countryNames[31] = "British Indian Ocean Territory";
countryCodes[32] = "BN"; countryNames[32] = "Brunei Darussalam";
countryCodes[33] = "BG"; countryNames[33] = "Bulgaria";
countryCodes[34] = "BF"; countryNames[34] = "Burkina Faso";
countryCodes[35] = "BI"; countryNames[35] = "Burundi";
countryCodes[36] = "KH"; countryNames[36] = "Cambodia";
countryCodes[37] = "CM"; countryNames[37] = "Cameroon";
countryCodes[38] = "CA"; countryNames[38] = "Canada";
countryCodes[39] = "CV"; countryNames[39] = "Cape Verde";
countryCodes[40] = "KY"; countryNames[40] = "Cayman Islands";
countryCodes[41] = "CF"; countryNames[41] = "Central African Republic";
countryCodes[42] = "TD"; countryNames[42] = "Chad";
countryCodes[43] = "CL"; countryNames[43] = "Chile";
countryCodes[44] = "CN"; countryNames[44] = "China";
countryCodes[45] = "CX"; countryNames[45] = "Christmas Island";
countryCodes[46] = "CC"; countryNames[46] = "Cocos (Keeling) Islands";
countryCodes[47] = "CO"; countryNames[47] = "Colombia";
countryCodes[48] = "KM"; countryNames[48] = "Comoros";
countryCodes[49] = "CG"; countryNames[49] = "Congo";
countryCodes[50] = "CD"; countryNames[50] = "Congo, The Democratic Republic Of The";
countryCodes[51] = "CK"; countryNames[51] = "Cook Islands";
countryCodes[52] = "CR"; countryNames[52] = "Costa Rica";
countryCodes[53] = "CI"; countryNames[53] = "Cote D'Ivoire";
countryCodes[54] = "HR"; countryNames[54] = "Croatia (Local Name: Hrvatska)";
countryCodes[55] = "CU"; countryNames[55] = "Cuba";
countryCodes[56] = "CY"; countryNames[56] = "Cyprus";
countryCodes[57] = "CZ"; countryNames[57] = "Czech Republic";
countryCodes[58] = "DK"; countryNames[58] = "Denmark";
countryCodes[59] = "DJ"; countryNames[59] = "Djibouti";
countryCodes[60] = "DM"; countryNames[60] = "Dominica";
countryCodes[61] = "DO"; countryNames[61] = "Dominican Republic";
countryCodes[62] = "TP"; countryNames[62] = "East Timor";
countryCodes[63] = "EC"; countryNames[63] = "Ecuador";
countryCodes[64] = "EG"; countryNames[64] = "Egypt";
countryCodes[65] = "SV"; countryNames[65] = "El Salvador";
countryCodes[66] = "GQ"; countryNames[66] = "Equatorial Guinea";
countryCodes[67] = "ER"; countryNames[67] = "Eritrea";
countryCodes[68] = "EE"; countryNames[68] = "Estonia";
countryCodes[69] = "ET"; countryNames[69] = "Ethiopia";
countryCodes[70] = "FK"; countryNames[70] = "Falkland Islands (Malvinas)";
countryCodes[71] = "FO"; countryNames[71] = "Faroe Islands";
countryCodes[72] = "FJ"; countryNames[72] = "Fiji";
countryCodes[73] = "FI"; countryNames[73] = "Finland";
countryCodes[74] = "FR"; countryNames[74] = "France";
countryCodes[75] = "FX"; countryNames[75] = "France, Metropolitan";
countryCodes[76] = "GF"; countryNames[76] = "French Guiana";
countryCodes[77] = "PF"; countryNames[77] = "French Polynesia";
countryCodes[78] = "TF"; countryNames[78] = "French Southern Territories";
countryCodes[79] = "GA"; countryNames[79] = "Gabon";
countryCodes[80] = "GM"; countryNames[80] = "Gambia";
countryCodes[81] = "GE"; countryNames[81] = "Georgia";
countryCodes[82] = "DE"; countryNames[82] = "Germany";
countryCodes[83] = "GH"; countryNames[83] = "Ghana";
countryCodes[84] = "GI"; countryNames[84] = "Gibraltar";
countryCodes[85] = "GR"; countryNames[85] = "Greece";
countryCodes[86] = "GL"; countryNames[86] = "Greenland";
countryCodes[87] = "GD"; countryNames[87] = "Grenada";
countryCodes[88] = "GP"; countryNames[88] = "Guadeloupe";
countryCodes[89] = "GU"; countryNames[89] = "Guam";
countryCodes[90] = "GT"; countryNames[90] = "Guatemala";
countryCodes[91] = "GN"; countryNames[91] = "Guinea";
countryCodes[92] = "GW"; countryNames[92] = "Guinea-Bissau";
countryCodes[93] = "GY"; countryNames[93] = "Guyana";
countryCodes[94] = "HT"; countryNames[94] = "Haiti";
countryCodes[95] = "HM"; countryNames[95] = "Heard And Mc Donald Islands";
countryCodes[96] = "VA"; countryNames[96] = "Holy See (Vatican City State)";
countryCodes[97] = "HN"; countryNames[97] = "Honduras";
countryCodes[98] = "HK"; countryNames[98] = "Hong Kong";
countryCodes[99] = "HU"; countryNames[99] = "Hungary";
countryCodes[100] = "IS"; countryNames[100] = "Iceland";
countryCodes[101] = "IN"; countryNames[101] = "India";
countryCodes[102] = "ID"; countryNames[102] = "Indonesia";
countryCodes[103] = "IR"; countryNames[103] = "Iran (Islamic Republic Of)";
countryCodes[104] = "IQ"; countryNames[104] = "Iraq";
countryCodes[105] = "IE"; countryNames[105] = "Ireland";
countryCodes[106] = "IL"; countryNames[106] = "Israel";
countryCodes[107] = "IT"; countryNames[107] = "Italy";
countryCodes[108] = "JM"; countryNames[108] = "Jamaica";
countryCodes[109] = "JP"; countryNames[109] = "Japan";
countryCodes[110] = "JO"; countryNames[110] = "Jordan";
countryCodes[111] = "KZ"; countryNames[111] = "Kazakhstan";
countryCodes[112] = "KE"; countryNames[112] = "Kenya";
countryCodes[113] = "KI"; countryNames[113] = "Kiribati";
countryCodes[114] = "KP"; countryNames[114] = "Korea, Democratic People'S Republic Of";
countryCodes[115] = "KR"; countryNames[115] = "Korea, Republic Of";
countryCodes[116] = "KW"; countryNames[116] = "Kuwait";
countryCodes[117] = "KG"; countryNames[117] = "Kyrgyzstan";
countryCodes[118] = "LA"; countryNames[118] = "Lao People'S Democratic Republic";
countryCodes[119] = "LV"; countryNames[119] = "Latvia";
countryCodes[120] = "LB"; countryNames[120] = "Lebanon";
countryCodes[121] = "LS"; countryNames[121] = "Lesotho";
countryCodes[122] = "LR"; countryNames[122] = "Liberia";
countryCodes[123] = "LY"; countryNames[123] = "Libyan Arab Jamahiriya";
countryCodes[124] = "LI"; countryNames[124] = "Liechtenstein";
countryCodes[125] = "LT"; countryNames[125] = "Lithuania";
countryCodes[126] = "LU"; countryNames[126] = "Luxembourg";
countryCodes[127] = "MO"; countryNames[127] = "Macau";
countryCodes[128] = "MK"; countryNames[128] = "Macedonia, The Former Yugoslav Republic Of";
countryCodes[129] = "MG"; countryNames[129] = "Madagascar";
countryCodes[130] = "MW"; countryNames[130] = "Malawi";
countryCodes[131] = "MY"; countryNames[131] = "Malaysia";
countryCodes[132] = "MV"; countryNames[132] = "Maldives";
countryCodes[133] = "ML"; countryNames[133] = "Mali";
countryCodes[134] = "MT"; countryNames[134] = "Malta";
countryCodes[135] = "MH"; countryNames[135] = "Marshall Islands";
countryCodes[136] = "MQ"; countryNames[136] = "Martinique";
countryCodes[137] = "MR"; countryNames[137] = "Mauritania";
countryCodes[138] = "MU"; countryNames[138] = "Mauritius";
countryCodes[139] = "YT"; countryNames[139] = "Mayotte";
countryCodes[140] = "MX"; countryNames[140] = "Mexico";
countryCodes[141] = "FM"; countryNames[141] = "Micronesia, Federated States Of";
countryCodes[142] = "MD"; countryNames[142] = "Moldova, Republic Of";
countryCodes[143] = "MC"; countryNames[143] = "Monaco";
countryCodes[144] = "MN"; countryNames[144] = "Mongolia";
countryCodes[145] = "MS"; countryNames[145] = "Montserrat";
countryCodes[146] = "MA"; countryNames[146] = "Morocco";
countryCodes[147] = "MZ"; countryNames[147] = "Mozambique";
countryCodes[148] = "MM"; countryNames[148] = "Myanmar";
countryCodes[149] = "NA"; countryNames[149] = "Namibia";
countryCodes[150] = "NR"; countryNames[150] = "Nauru";
countryCodes[151] = "NP"; countryNames[151] = "Nepal";
countryCodes[152] = "NL"; countryNames[152] = "Netherlands";
countryCodes[153] = "AN"; countryNames[153] = "Netherlands Antilles";
countryCodes[154] = "NC"; countryNames[154] = "New Caledonia";
countryCodes[155] = "NZ"; countryNames[155] = "New Zealand";
countryCodes[156] = "NI"; countryNames[156] = "Nicaragua";
countryCodes[157] = "NE"; countryNames[157] = "Niger";
countryCodes[158] = "NG"; countryNames[158] = "Nigeria";
countryCodes[159] = "NU"; countryNames[159] = "Niue";
countryCodes[160] = "NF"; countryNames[160] = "Norfolk Island";
countryCodes[161] = "MP"; countryNames[161] = "Northern Mariana Islands";
countryCodes[162] = "NO"; countryNames[162] = "Norway";
countryCodes[163] = "OM"; countryNames[163] = "Oman";
countryCodes[164] = "PK"; countryNames[164] = "Pakistan";
countryCodes[165] = "PW"; countryNames[165] = "Palau";
countryCodes[166] = "PA"; countryNames[166] = "Panama";
countryCodes[167] = "PG"; countryNames[167] = "Papua New Guinea";
countryCodes[168] = "PY"; countryNames[168] = "Paraguay";
countryCodes[169] = "PE"; countryNames[169] = "Peru";
countryCodes[170] = "PH"; countryNames[170] = "Philippines";
countryCodes[171] = "PN"; countryNames[171] = "Pitcairn";
countryCodes[172] = "PL"; countryNames[172] = "Poland";
countryCodes[173] = "PT"; countryNames[173] = "Portugal";
countryCodes[174] = "PR"; countryNames[174] = "Puerto Rico";
countryCodes[175] = "QA"; countryNames[175] = "Qatar";
countryCodes[176] = "RE"; countryNames[176] = "Reunion";
countryCodes[177] = "RO"; countryNames[177] = "Romania";
countryCodes[178] = "RU"; countryNames[178] = "Russian Federation";
countryCodes[179] = "RW"; countryNames[179] = "Rwanda";
countryCodes[180] = "KN"; countryNames[180] = "Saint Kitts And Nevis";
countryCodes[181] = "LC"; countryNames[181] = "Saint Lucia";
countryCodes[182] = "VC"; countryNames[182] = "Saint Vincent And The Grenadines";
countryCodes[183] = "WS"; countryNames[183] = "Samoa";
countryCodes[184] = "SM"; countryNames[184] = "San Marino";
countryCodes[185] = "ST"; countryNames[185] = "Sao Tome And Principe";
countryCodes[186] = "SA"; countryNames[186] = "Saudi Arabia";
countryCodes[187] = "SN"; countryNames[187] = "Senegal";
countryCodes[188] = "SC"; countryNames[188] = "Seychelles";
countryCodes[189] = "SL"; countryNames[189] = "Sierra Leone";
countryCodes[190] = "SG"; countryNames[190] = "Singapore";
countryCodes[191] = "SK"; countryNames[191] = "Slovakia (Slovak Republic)";
countryCodes[192] = "SI"; countryNames[192] = "Slovenia";
countryCodes[193] = "SB"; countryNames[193] = "Solomon Islands";
countryCodes[194] = "SO"; countryNames[194] = "Somalia";
countryCodes[195] = "ZA"; countryNames[195] = "South Africa";
countryCodes[196] = "GS"; countryNames[196] = "South Georgia And The South Sandwich Islands";
countryCodes[197] = "ES"; countryNames[197] = "Spain";
countryCodes[198] = "LK"; countryNames[198] = "Sri Lanka";
countryCodes[199] = "SH"; countryNames[199] = "St. Helena";
countryCodes[200] = "PM"; countryNames[200] = "St. Pierre And Miquelon";
countryCodes[201] = "SD"; countryNames[201] = "Sudan";
countryCodes[202] = "SR"; countryNames[202] = "Suriname";
countryCodes[203] = "SJ"; countryNames[203] = "Svalbard And Jan Mayen Islands";
countryCodes[204] = "SZ"; countryNames[204] = "Swaziland";
countryCodes[205] = "SE"; countryNames[205] = "Sweden";
countryCodes[206] = "CH"; countryNames[206] = "Switzerland";
countryCodes[207] = "SY"; countryNames[207] = "Syrian Arab Republic";
countryCodes[208] = "TW"; countryNames[208] = "Taiwan, Province Of China";
countryCodes[209] = "TJ"; countryNames[209] = "Tajikistan";
countryCodes[210] = "TZ"; countryNames[210] = "Tanzania, United Republic Of";
countryCodes[211] = "TH"; countryNames[211] = "Thailand";
countryCodes[212] = "TG"; countryNames[212] = "Togo";
countryCodes[213] = "TK"; countryNames[213] = "Tokelau";
countryCodes[214] = "TO"; countryNames[214] = "Tonga";
countryCodes[215] = "TT"; countryNames[215] = "Trinidad And Tobago";
countryCodes[216] = "TN"; countryNames[216] = "Tunisia";
countryCodes[217] = "TR"; countryNames[217] = "Turkey";
countryCodes[218] = "TM"; countryNames[218] = "Turkmenistan";
countryCodes[219] = "TC"; countryNames[219] = "Turks And Caicos Islands";
countryCodes[220] = "TV"; countryNames[220] = "Tuvalu";
countryCodes[221] = "UG"; countryNames[221] = "Uganda";
countryCodes[222] = "UA"; countryNames[222] = "Ukraine";
countryCodes[223] = "AE"; countryNames[223] = "United Arab Emirates";
countryCodes[224] = "GB"; countryNames[224] = "United Kingdom";
countryCodes[225] = "US"; countryNames[225] = "United States";
countryCodes[226] = "UM"; countryNames[226] = "United States Minor Outlying Islands";
countryCodes[227] = "UY"; countryNames[227] = "Uruguay";
countryCodes[228] = "UZ"; countryNames[228] = "Uzbekistan";
countryCodes[229] = "VU"; countryNames[229] = "Vanuatu";
countryCodes[230] = "VE"; countryNames[230] = "Venezuela";
countryCodes[231] = "VN"; countryNames[231] = "Viet Nam";
countryCodes[232] = "VG"; countryNames[232] = "Virgin Islands (British)";
countryCodes[233] = "VI"; countryNames[233] = "Virgin Islands (U.S.)";
countryCodes[234] = "WF"; countryNames[234] = "Wallis And Futuna Islands";
countryCodes[235] = "EH"; countryNames[235] = "Western Sahara";
countryCodes[236] = "YE"; countryNames[236] = "Yemen";
countryCodes[237] = "YU"; countryNames[237] = "Yugoslavia";
countryCodes[238] = "ZM"; countryNames[238] = "Zambia";
countryCodes[239] = "ZW"; countryNames[239] = "Zimbabwe";


// End -->

