var states = new Array();
var currencies = new Array();
 
	states.push(new Array(3, 'Alabama', 6, false) );
	states.push(new Array(3, 'Alaska', 7, false) );
	states.push(new Array(3, 'Arizona', 8, false) );
	states.push(new Array(3, 'Arkansas', 23, false) );
	states.push(new Array(3, 'California', 2, false) );
	states.push(new Array(3, 'Colorado', 24, false) );
	states.push(new Array(3, 'Connecticut', 12, false) );
	states.push(new Array(3, 'Delaware', 25, false) );
	states.push(new Array(3, 'Florida', 14, false) );
	states.push(new Array(3, 'Georgia', 16, false) );
	states.push(new Array(3, 'Hawaii', 26, false) );
	states.push(new Array(3, 'Idaho', 27, false) );
	states.push(new Array(3, 'Illinois', 4, false) );
	states.push(new Array(3, 'Indiana', 28, false) );
	states.push(new Array(3, 'Iowa', 29, false) );
	states.push(new Array(3, 'Kansas', 30, false) );
	states.push(new Array(3, 'Kentucky', 31, false) );
	states.push(new Array(3, 'Louisiana', 32, false) );
	states.push(new Array(3, 'Maine', 9, false) );
	states.push(new Array(3, 'Maryland', 17, false) );
	states.push(new Array(3, 'Massachusetts', 10, false) );
	states.push(new Array(3, 'Michigan', 13, false) );
	states.push(new Array(3, 'Minnesota', 11, false) );
	states.push(new Array(3, 'Mississippi', 33, false) );
	states.push(new Array(3, 'Missouri', 34, false) );
	states.push(new Array(3, 'Montana', 35, false) );
	states.push(new Array(3, 'Nebraska', 36, false) );
	states.push(new Array(3, 'Nevada', 37, false) );
	states.push(new Array(3, 'New Hampshire', 38, false) );
	states.push(new Array(3, 'New Jersey', 3, false) );
	states.push(new Array(3, 'New Mexico', 39, false) );
	states.push(new Array(3, 'New York', 5, false) );
	states.push(new Array(3, 'North Carolina', 20, false) );
	states.push(new Array(3, 'North Dakota', 40, false) );
	states.push(new Array(3, 'Ohio', 41, false) );
	states.push(new Array(3, 'Oklahoma', 42, false) );
	states.push(new Array(3, 'Oregon', 43, false) );
	states.push(new Array(3, 'Pennsylvania', 18, false) );
	states.push(new Array(3, 'Rhode Island', 44, false) );
	states.push(new Array(3, 'South Carolina', 45, false) );
	states.push(new Array(3, 'South Dakota', 46, false) );
	states.push(new Array(3, 'Tennessee', 47, false) );
	states.push(new Array(3, 'Texas', 1, false) );
	states.push(new Array(3, 'Utah', 48, false) );
	states.push(new Array(3, 'Vermont', 49, false) );
	states.push(new Array(3, 'Virginia', 15, false) );
	states.push(new Array(3, 'Washington', 19, false) );
	states.push(new Array(3, 'West Virginia', 50, false) );
	states.push(new Array(3, 'Wisconsin', 22, false) );
	states.push(new Array(3, 'Wyoming', 51, false) );
	currencies.push(new Array(1, 'CAD', 174, 9));
	currencies.push(new Array(1, 'CAD', 174, 24));
	currencies.push(new Array(1, 'CAD', 174, 10));
	currencies.push(new Array(1, 'CAD', 174, 23));
	currencies.push(new Array(1, 'CAD', 174, 2));
	currencies.push(new Array(1, 'CAD', 174, 28));
	currencies.push(new Array(1, 'CAD', 174, 12));
	currencies.push(new Array(1, 'CAD', 174, 14));
	currencies.push(new Array(1, 'CAD', 174, 11));
	currencies.push(new Array(1, 'CAD', 174, 20));
	currencies.push(new Array(1, 'CAD', 174, 5));
	currencies.push(new Array(1, 'CAD', 174, 13));
	currencies.push(new Array(1, 'CAD', 174, 26));
	currencies.push(new Array(1, 'CAD', 174, 19));
	currencies.push(new Array(1, 'CAD', 174, 4));
	currencies.push(new Array(1, 'CAD', 174, 36));
	currencies.push(new Array(1, 'CAD', 174, 15));
	currencies.push(new Array(1, 'CAD', 174, 18));
	currencies.push(new Array(1, 'CAD', 174, 30));
	currencies.push(new Array(1, 'CAD', 174, 16));
	currencies.push(new Array(1, 'CAD', 174, 17));
	currencies.push(new Array(1, 'CAD', 174, 3));
	currencies.push(new Array(1, 'CAD', 174, 8));
	currencies.push(new Array(1, 'CAD', 174, 6));
	currencies.push(new Array(1, 'CAD', 174, 27));
	currencies.push(new Array(1, 'CAD', 174, 167));
	currencies.push(new Array(1, 'USD', 171, 17));
	currencies.push(new Array(1, 'USD', 171, 12));
	currencies.push(new Array(3, 'USD', 171, 23));
	currencies.push(new Array(3, 'USD', 171, 19));
	currencies.push(new Array(3, 'USD', 171, 15));
	currencies.push(new Array(3, 'USD', 171, 73));
	currencies.push(new Array(3, 'USD', 171, 28));
	currencies.push(new Array(3, 'USD', 171, 11));
	currencies.push(new Array(3, 'USD', 171, 20));
	currencies.push(new Array(3, 'USD', 171, 5));
	currencies.push(new Array(3, 'USD', 171, 14));
	currencies.push(new Array(3, 'USD', 171, 87));
	currencies.push(new Array(3, 'USD', 171, 36));
	currencies.push(new Array(3, 'USD', 171, 26));
	currencies.push(new Array(3, 'USD', 171, 117));
	currencies.push(new Array(3, 'USD', 171, 2));
	currencies.push(new Array(3, 'USD', 171, 6));
	currencies.push(new Array(3, 'USD', 171, 88));
	currencies.push(new Array(3, 'USD', 171, 4));
	currencies.push(new Array(3, 'USD', 171, 13));
	currencies.push(new Array(3, 'USD', 171, 130));
	currencies.push(new Array(3, 'USD', 171, 167));
	currencies.push(new Array(3, 'USD', 171, 32));
	currencies.push(new Array(3, 'USD', 171, 30));
	currencies.push(new Array(3, 'USD', 171, 17));
	currencies.push(new Array(3, 'USD', 171, 8));
	currencies.push(new Array(3, 'USD', 171, 31));
	currencies.push(new Array(3, 'USD', 171, 24));
	currencies.push(new Array(3, 'USD', 171, 10));
	currencies.push(new Array(3, 'USD', 171, 9));
	currencies.push(new Array(3, 'USD', 171, 27));
	currencies.push(new Array(3, 'USD', 171, 18));
	currencies.push(new Array(3, 'USD', 171, 16));
	currencies.push(new Array(3, 'USD', 171, 1));
	currencies.push(new Array(3, 'USD', 171, 12));
	currencies.push(new Array(3, 'JMD', 217, 130));
	currencies.push(new Array(3, 'PHP', 233, 2));
	currencies.push(new Array(3, 'PHP', 233, 36));
	currencies.push(new Array(3, 'DOP', 203, 87));
	currencies.push(new Array(3, 'PHP', 233, 5));
	currencies.push(new Array(4, 'GBP', 173, 23));
	currencies.push(new Array(4, 'GBP', 173, 9));
	currencies.push(new Array(4, 'GBP', 173, 26));
	currencies.push(new Array(4, 'GBP', 173, 19));
	currencies.push(new Array(4, 'GBP', 173, 36));
	currencies.push(new Array(4, 'GBP', 173, 20));
	currencies.push(new Array(4, 'GBP', 173, 2));
	currencies.push(new Array(4, 'GBP', 173, 30));
	currencies.push(new Array(4, 'GBP', 173, 15));
	currencies.push(new Array(4, 'GBP', 173, 167));
	currencies.push(new Array(4, 'GBP', 173, 3));
	currencies.push(new Array(4, 'GBP', 173, 24));
	currencies.push(new Array(4, 'GBP', 173, 16));
	currencies.push(new Array(4, 'GBP', 173, 17));
	currencies.push(new Array(4, 'GBP', 173, 14));
	currencies.push(new Array(4, 'GBP', 173, 33));
	currencies.push(new Array(4, 'GBP', 173, 6));
	currencies.push(new Array(4, 'GBP', 173, 8));
	currencies.push(new Array(4, 'GBP', 173, 1));
	currencies.push(new Array(4, 'GBP', 173, 10));
	currencies.push(new Array(4, 'GBP', 173, 18));
	currencies.push(new Array(4, 'GBP', 173, 27));
	currencies.push(new Array(4, 'GBP', 173, 13));
	currencies.push(new Array(4, 'GBP', 173, 5));
	currencies.push(new Array(4, 'GBP', 173, 28));
	currencies.push(new Array(4, 'GBP', 173, 12));
	currencies.push(new Array(4, 'GBP', 173, 11));
	currencies.push(new Array(4, 'USD', 171, 30));
	currencies.push(new Array(4, 'INR', 177, 5));
	currencies.push(new Array(4, 'BDT', 187, 6));
	currencies.push(new Array(4, 'USD', 171, 33));
	currencies.push(new Array(4, 'USD', 171, 15));
	currencies.push(new Array(5, 'INR', 177, 19));
	currencies.push(new Array(5, 'INR', 177, 2));
	currencies.push(new Array(5, 'INR', 177, 6));
	currencies.push(new Array(5, 'INR', 177, 26));
	currencies.push(new Array(5, 'INR', 177, 4));
	currencies.push(new Array(5, 'INR', 177, 15));
	currencies.push(new Array(5, 'INR', 177, 9));
	currencies.push(new Array(5, 'INR', 177, 27));
	currencies.push(new Array(5, 'INR', 177, 24));
	currencies.push(new Array(5, 'INR', 177, 13));
	currencies.push(new Array(5, 'INR', 177, 23));
	currencies.push(new Array(5, 'INR', 177, 28));
	currencies.push(new Array(5, 'INR', 177, 10));
	currencies.push(new Array(5, 'INR', 177, 11));
	currencies.push(new Array(5, 'INR', 177, 30));
	currencies.push(new Array(5, 'INR', 177, 1));
	currencies.push(new Array(6, 'BDT', 187, 5));
	currencies.push(new Array(20, 'AED', 252, 4));
	currencies.push(new Array(20, 'AED', 252, 9));
	currencies.push(new Array(20, 'AED', 252, 28));
	currencies.push(new Array(20, 'AED', 252, 6));
	currencies.push(new Array(20, 'AED', 252, 3));
	currencies.push(new Array(20, 'AED', 252, 2));
	currencies.push(new Array(20, 'AED', 252, 26));
	currencies.push(new Array(20, 'AED', 252, 10));
	currencies.push(new Array(20, 'AED', 252, 27));
	currencies.push(new Array(20, 'AED', 252, 30));
	currencies.push(new Array(20, 'AED', 252, 11));
	currencies.push(new Array(20, 'AED', 252, 24));
	currencies.push(new Array(20, 'AED', 252, 23));
	currencies.push(new Array(20, 'AED', 252, 17));
	currencies.push(new Array(20, 'AED', 252, 1));
	currencies.push(new Array(20, 'AED', 252, 5));
	currencies.push(new Array(20, 'USD', 171, 9));
	currencies.push(new Array(20, 'USD', 171, 5));
	currencies.push(new Array(20, 'USD', 171, 6));
	currencies.push(new Array(21, 'SAR', 239, 2));
	currencies.push(new Array(21, 'SAR', 239, 11));
	currencies.push(new Array(21, 'SAR', 239, 19));
	currencies.push(new Array(21, 'SAR', 239, 5));
	currencies.push(new Array(21, 'SAR', 239, 13));
	currencies.push(new Array(21, 'SAR', 239, 17));
	currencies.push(new Array(21, 'SAR', 239, 9));
	currencies.push(new Array(21, 'SAR', 239, 6));
	currencies.push(new Array(22, 'MYR', 222, 19));
	currencies.push(new Array(22, 'USD', 171, 19));
	currencies.push(new Array(23, 'EUR', 172, 11));
	currencies.push(new Array(23, 'EUR', 172, 20));
	currencies.push(new Array(23, 'EUR', 172, 2));
	currencies.push(new Array(23, 'EUR', 172, 26));
	currencies.push(new Array(23, 'EUR', 172, 19));
	currencies.push(new Array(23, 'EUR', 172, 4));
	currencies.push(new Array(23, 'EUR', 172, 17));
	currencies.push(new Array(23, 'EUR', 172, 30));
	currencies.push(new Array(23, 'EUR', 172, 5));
	currencies.push(new Array(23, 'EUR', 172, 3));
	currencies.push(new Array(23, 'EUR', 172, 27));
	currencies.push(new Array(23, 'EUR', 172, 24));
	currencies.push(new Array(23, 'EUR', 172, 167));
	currencies.push(new Array(23, 'EUR', 172, 12));
	currencies.push(new Array(23, 'EUR', 172, 15));
	currencies.push(new Array(23, 'EUR', 172, 10));
	currencies.push(new Array(23, 'EUR', 172, 1));
	currencies.push(new Array(23, 'EUR', 172, 9));
	currencies.push(new Array(23, 'EUR', 172, 36));
	currencies.push(new Array(23, 'EUR', 172, 28));
	currencies.push(new Array(23, 'USD', 171, 2));
	currencies.push(new Array(24, 'AUD', 175, 27));
	currencies.push(new Array(24, 'AUD', 175, 2));
	currencies.push(new Array(24, 'AUD', 175, 5));
	currencies.push(new Array(24, 'AUD', 175, 1));
	currencies.push(new Array(24, 'AUD', 175, 23));
	currencies.push(new Array(24, 'AUD', 175, 13));
	currencies.push(new Array(24, 'AUD', 175, 28));
	currencies.push(new Array(24, 'AUD', 175, 20));
	currencies.push(new Array(24, 'AUD', 175, 8));
	currencies.push(new Array(24, 'AUD', 175, 26));
	currencies.push(new Array(24, 'AUD', 175, 9));
	currencies.push(new Array(24, 'AUD', 175, 4));
	currencies.push(new Array(24, 'AUD', 175, 19));
	currencies.push(new Array(24, 'AUD', 175, 11));
	currencies.push(new Array(24, 'AUD', 175, 30));
	currencies.push(new Array(24, 'AUD', 175, 15));
	currencies.push(new Array(24, 'AUD', 175, 10));
	currencies.push(new Array(24, 'AUD', 175, 3));
	currencies.push(new Array(24, 'USD', 171, 10));
	currencies.push(new Array(24, 'USD', 171, 2));
	currencies.push(new Array(26, 'EUR', 172, 20));
	currencies.push(new Array(26, 'EUR', 172, 11));
	currencies.push(new Array(26, 'EUR', 172, 28));
	currencies.push(new Array(26, 'EUR', 172, 4));
	currencies.push(new Array(26, 'EUR', 172, 5));
	currencies.push(new Array(26, 'EUR', 172, 24));
	currencies.push(new Array(26, 'EUR', 172, 30));
	currencies.push(new Array(26, 'EUR', 172, 3));
	currencies.push(new Array(26, 'EUR', 172, 9));
	currencies.push(new Array(26, 'EUR', 172, 1));
	currencies.push(new Array(26, 'EUR', 172, 23));
	currencies.push(new Array(26, 'EUR', 172, 2));
	currencies.push(new Array(26, 'EUR', 172, 19));
	currencies.push(new Array(26, 'EUR', 172, 27));
	currencies.push(new Array(26, 'EUR', 172, 10));
	currencies.push(new Array(26, 'EUR', 172, 15));
	currencies.push(new Array(27, 'SGD', 241, 20));
	currencies.push(new Array(27, 'SGD', 241, 10));
	currencies.push(new Array(27, 'SGD', 241, 28));
	currencies.push(new Array(27, 'SGD', 241, 5));
	currencies.push(new Array(27, 'SGD', 241, 4));
	currencies.push(new Array(27, 'SGD', 241, 19));
	currencies.push(new Array(27, 'SGD', 241, 11));
	currencies.push(new Array(27, 'SGD', 241, 26));
	currencies.push(new Array(27, 'SGD', 241, 3));
	currencies.push(new Array(27, 'SGD', 241, 6));
	currencies.push(new Array(27, 'SGD', 241, 2));
	currencies.push(new Array(27, 'SGD', 241, 30));
	currencies.push(new Array(27, 'SGD', 241, 24));
	currencies.push(new Array(27, 'SGD', 241, 15));
	currencies.push(new Array(27, 'SGD', 241, 23));
	currencies.push(new Array(27, 'SGD', 241, 9));
	currencies.push(new Array(27, 'SGD', 241, 1));
	currencies.push(new Array(28, 'EUR', 172, 8));
	currencies.push(new Array(28, 'EUR', 172, 15));
	currencies.push(new Array(28, 'EUR', 172, 24));
	currencies.push(new Array(28, 'EUR', 172, 167));
	currencies.push(new Array(28, 'EUR', 172, 5));
	currencies.push(new Array(28, 'EUR', 172, 3));
	currencies.push(new Array(28, 'EUR', 172, 11));
	currencies.push(new Array(28, 'EUR', 172, 26));
	currencies.push(new Array(28, 'EUR', 172, 1));
	currencies.push(new Array(28, 'EUR', 172, 19));
	currencies.push(new Array(28, 'EUR', 172, 13));
	currencies.push(new Array(28, 'EUR', 172, 30));
	currencies.push(new Array(28, 'EUR', 172, 27));
	currencies.push(new Array(28, 'EUR', 172, 9));
	currencies.push(new Array(28, 'EUR', 172, 16));
	currencies.push(new Array(28, 'EUR', 172, 23));
	currencies.push(new Array(28, 'EUR', 172, 20));
	currencies.push(new Array(28, 'EUR', 172, 2));
	currencies.push(new Array(28, 'EUR', 172, 36));
	currencies.push(new Array(28, 'EUR', 172, 10));
	currencies.push(new Array(28, 'EUR', 172, 4));
 
 
if (document.getElementById('currency_code')) { 
 
origin_countries_select = $('search_origin_country_id').options;
	origin_countries_select[origin_countries_select.length] = new Option('Australia', 24);
	origin_countries_select[origin_countries_select.length] = new Option('Bangladesh', 6);
	origin_countries_select[origin_countries_select.length] = new Option('Canada', 1);
	origin_countries_select[origin_countries_select.length] = new Option('France', 28);
	origin_countries_select[origin_countries_select.length] = new Option('India', 5);
	origin_countries_select[origin_countries_select.length] = new Option('Malaysia', 22);
	origin_countries_select[origin_countries_select.length] = new Option('Netherlands', 26);
	origin_countries_select[origin_countries_select.length] = new Option('Saudi Arabia', 21);
	origin_countries_select[origin_countries_select.length] = new Option('Singapore', 27);
	origin_countries_select[origin_countries_select.length] = new Option('Spain', 23);
	origin_countries_select[origin_countries_select.length] = new Option('United Arab Emirates', 20);
	origin_countries_select[origin_countries_select.length] = new Option('United Kingdom', 4);
	origin_countries_select[origin_countries_select.length] = new Option('United States', 3);
 

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Algeria';
    oOption.value = 36;
    oOption.id = 'search_target_country_select_36';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Angola';
    oOption.value = 18;
    oOption.id = 'search_target_country_select_18';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Australia';
    oOption.value = 24;
    oOption.id = 'search_target_country_select_24';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Bangladesh';
    oOption.value = 6;
    oOption.id = 'search_target_country_select_6';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Brazil';
    oOption.value = 31;
    oOption.id = 'search_target_country_select_31';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Canada';
    oOption.value = 1;
    oOption.id = 'search_target_country_select_1';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'China';
    oOption.value = 10;
    oOption.id = 'search_target_country_select_10';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Colombia';
    oOption.value = 73;
    oOption.id = 'search_target_country_select_73';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Dominican Republic';
    oOption.value = 87;
    oOption.id = 'search_target_country_select_87';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Ecuador';
    oOption.value = 88;
    oOption.id = 'search_target_country_select_88';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Egypt';
    oOption.value = 11;
    oOption.id = 'search_target_country_select_11';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'France';
    oOption.value = 28;
    oOption.id = 'search_target_country_select_28';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Haiti';
    oOption.value = 117;
    oOption.id = 'search_target_country_select_117';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'India';
    oOption.value = 5;
    oOption.id = 'search_target_country_select_5';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Indonesia';
    oOption.value = 19;
    oOption.id = 'search_target_country_select_19';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Jamaica';
    oOption.value = 130;
    oOption.id = 'search_target_country_select_130';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Jordan';
    oOption.value = 17;
    oOption.id = 'search_target_country_select_17';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Mexico';
    oOption.value = 32;
    oOption.id = 'search_target_country_select_32';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Morocco';
    oOption.value = 167;
    oOption.id = 'search_target_country_select_167';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Netherlands';
    oOption.value = 26;
    oOption.id = 'search_target_country_select_26';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Nigeria';
    oOption.value = 12;
    oOption.id = 'search_target_country_select_12';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Pakistan';
    oOption.value = 9;
    oOption.id = 'search_target_country_select_9';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Philippines';
    oOption.value = 2;
    oOption.id = 'search_target_country_select_2';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Poland';
    oOption.value = 30;
    oOption.id = 'search_target_country_select_30';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Romania';
    oOption.value = 33;
    oOption.id = 'search_target_country_select_33';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Singapore';
    oOption.value = 27;
    oOption.id = 'search_target_country_select_27';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Spain';
    oOption.value = 23;
    oOption.id = 'search_target_country_select_23';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Sri Lanka';
    oOption.value = 13;
    oOption.id = 'search_target_country_select_13';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Thailand';
    oOption.value = 15;
    oOption.id = 'search_target_country_select_15';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'United Arab Emirates';
    oOption.value = 20;
    oOption.id = 'search_target_country_select_20';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'United Kingdom';
    oOption.value = 4;
    oOption.id = 'search_target_country_select_4';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'United States';
    oOption.value = 3;
    oOption.id = 'search_target_country_select_3';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Venezuela';
    oOption.value = 16;
    oOption.id = 'search_target_country_select_16';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'VietNam';
    oOption.value = 8;
    oOption.id = 'search_target_country_select_8';
    $('search_target_country_id').appendChild(oOption);

    var oOption = document.createElement("option");
    oOption.innerHTML = 'Zimbabwe';
    oOption.value = 14;
    oOption.id = 'search_target_country_select_14';
    $('search_target_country_id').appendChild(oOption);

 
};
 
function countrySelected() {
  country_id = $('search_origin_country_id').getValue(); 
  options = $('search_origin_state_id').options;
  options.length = 1; //first reset the list of origin_state_id's
  //now reload the states select box based on the selected origin_country_id
  states.each(function(state) {  
    if (state[0] == country_id) {
      options[options.length] = new Option(state[1], state[2], state[3] ,state[3]);
    }
  });
  
  //now also grey out the appropriate receiving countries in the receiving country select list based on whether fees exist for the specific corridor
  //first grey out all the items in the select list
  if (document.getElementById('search_target_country_id')) {
   for (var i = 1; i <  $('search_target_country_id').length; i++)
   {$('search_target_country_id').options[i].disabled=true; };
  
  //then enable all the target countries which have fees for the selected origin country
  currencies.each(function(currency) {
    if (currency[0] == country_id) {
      $('search_target_country_select_' + currency[3]).disabled=false;
      }
  });
  };
 
  //hide or show the state select list box	
  if (options.length == 1) {
    $('origin_state_field').hide();
    } else {
    $('origin_state_field').show();
    }
  } 
  
function populateCurrencyCode(){
	// if currency_code field exists
  if (document.getElementById('currency_code')) {
    currency_code_options = $('currency_code').options;
	  currency_code_options.length = 0;
   	target_country_id = $('search_target_country_id').getValue();
		currencies.each(function(currency) {
			if (currency[0] == country_id && currency[3] == target_country_id) {
				currency_code_options[currency_code_options.length] = new Option(currency[1], currency[2] );
			}
		})
	};
}

function resetTargetCountry() {
  $('search_target_country_id').options[0].selected=true
}
 
document.observe('dom:loaded', function() {
  countrySelected();
  $('search_origin_country_id').observe('change', countrySelected);
  //check if the currency_code element exists, because this javascript code is used for the Fees tab on the aggregation site as well (which does not have a currency_code
  if (document.getElementById('currency_code')) {  
		// adds an observer to reset target country if origin country changes
    $('search_origin_country_id').observe('change', resetTargetCountry);
		$('search_target_country_id').observe("change", populateCurrencyCode)
   }
});