
function isNumeric(s) {
	var validChars = "0123456789";
	var c;

	for (i = 0; i < s.length; i++) {
		c = s.charAt(i);
		if (validChars.indexOf(c) == -1) {
			return false;
		}
	}

	return true;
}

function NormalizeString(strData)
{
 return strData.replace(/^\s+|\s+$/g, "");
}


function formValidator() {
        var email = document.jfrm.eml;
        var Pwd = document.jfrm.p1;
        var ConfPwd = document.jfrm.p2;
        var Password = new String(document.jfrm.p1.value);
        var user = new String(document.jfrm.u.value);
        var country = document.jfrm.ctry;
        var province = document.jfrm.prov;
        var username = document.jfrm.u;

        Password = Password.toUpperCase();

        //user check

        if (username.value =="") {
                alert ("Please enter your username");
                username.focus();
                return false;
        } else if (user.length<3) {
           alert ("Please enter your username ( min 3 characters)");
           username.value="";
           username.focus();
           return false;
        }
        // Password Checker
        if (Pwd.value =="") {
                alert ("Please enter a password (min 6 characters)");
                Pwd.value="";
                ConfPwd.value="";
                Pwd.focus();
                return false;
        } else if (Password.length < 6) {
                alert ("Password must have at least 6 characters. Please Re-enter.");
                Pwd.value="";
                ConfPwd.value="";
                Pwd.focus();
                return false;
        } else if (!Password.match(/[0-9!@#\$%\^&\*\(\)\-_\+=\{\}\[\|:;'\?<>\.,~`"]/)) {
                alert ("Password must contain at least 1 number or punctuation character.");
                Pwd.value="";
                ConfPwd.value="";
                Pwd.focus();
                return false;
        } else if (!Password.match(/[A-Za-z]/)) {
                alert ("Password must contain at least 1 number or punctuation character.");
                Pwd.value="";
                ConfPwd.value="";
                Pwd.focus();
                return false;
        } else if (Password.lastIndexOf(email.value.toUpperCase()) > -1) {
                alert ("Password too closely resembles email.");
                Pwd.value="";
                ConfPwd.value="";
                Pwd.focus();
                return false;
        } else if (Pwd.value.indexOf(" ") >= 0) {
                alert ("Space is not allowed for password. Please re-enter.");
                Pwd.value="";
                ConfPwd.value="";
                Pwd.focus();
                return false;
        } else if (Pwd.value != ConfPwd.value) {
                alert ("Password do not matched. Please re-enter.");
                Pwd.value="";
                ConfPwd.value="";
                ConfPwd.focus();
                return false;
        }

        // Email Checker
        if (email.value == 0) {
                alert("Please enter your email address");
                email.focus();
                return false;
        } else if (email.value.indexOf("@") < 0) {
                alert("Incorrect email address. Please re-enter");
                email.focus();
                return false;
        } else if (email.value.indexOf(".") < 0) {
                alert("Incorrect email address. Please re-enter");
                email.focus();
                return false;
        } else if (email.value.indexOf(" ") >= 0) {
                alert("Incorrect email address. Please re-enter");
                email.focus();
                return false;
        }

        if (country[country.selectedIndex].value=="") {
           alert ("Please select your country.");
           return false;
        }
        var prv=document.getElementById('provinceSelect');
        if (prv.style.display!='none')
        {
            if (!province.selectedIndex) {
                alert("Please select your province.");
                return false;
            }
        }

        // Gender Check
        gender_check = -1;
        for (i=0; i<document.jfrm.gender.length; i++) {
                if (document.jfrm.gender[i].checked) {
                        gender_check = i;
                }
        }
        // Check dob
        if ((document.jfrm.by.value==0) || (document.jfrm.bd.value==0) || (document.jfrm.bm.value==0)) {
                alert ("Please enter a valid date for your birthday.");
                return false;
        }
        if (gender_check == -1) {
                //alert("Please select your Gender.");
                alert("Please select your Gender.");
                return false;
        }
        //code check
        if (document.jfrm.t.value == 0) {
                alert("Please enter the security code.");
                document.jfrm.t.focus();
                return false;
        } else if (document.jfrm.t.value.length!=8) {
				alert("Please enter the security code.");
                document.jfrm.t.focus();
                return false;
		}

}

function FillProvince(ctry_name)
{
   var provinceList = [
      {name:"Buenos Aires (Ciudad Autonoma de)", country:"Argentina"},
      {name:"Buenos Aires (provincia)", country:"Argentina"},
      {name:"Catamarca", country:"Argentina"},
      {name:"Chaco", country:"Argentina"},
      {name:"Chubut", country:"Argentina"},
      {name:"Cordoba", country:"Argentina"},
      {name:"Corrientes", country:"Argentina"},
      {name:"Entre Rios", country:"Argentina"},
      {name:"Formosa", country:"Argentina"},
      {name:"Jujuy", country:"Argentina"},
      {name:"La Pampa", country:"Argentina"},
      {name:"La Rioja", country:"Argentina"},
      {name:"Mendoza", country:"Argentina"},
      {name:"Misiones", country:"Argentina"},
      {name:"Neuquen", country:"Argentina"},
      {name:"Rio Negro", country:"Argentina"},
      {name:"Salta", country:"Argentina"},
      {name:"San Juan", country:"Argentina"},
      {name:"San Luis", country:"Argentina"},
      {name:"Santa Cruz", country:"Argentina"},
      {name:"Santa Fe", country:"Argentina"},
      {name:"Santiago del Estero", country:"Argentina"},
      {name:"Tierra del Fuego", country:"Argentina"},
      {name:"Tucuman", country:"Argentina"},
      {name:"Australian Capital Territory", country:"Australia"},
      {name:"New South Wales", country:"Australia"},
      {name:"Northern Territory", country:"Australia"},
      {name:"Queensland", country:"Australia"},
      {name:"South Australia", country:"Australia"},
      {name:"Tasmania", country:"Australia"},
      {name:"Victoria", country:"Australia"},
      {name:"Western Australia", country:"Australia"},
      {name:"Alberta", country:"Canada"},
      {name:"British Columbia", country:"Canada"},
      {name:"Manitoba", country:"Canada"},
      {name:"New Brunswick", country:"Canada"},
      {name:"Newfoundland", country:"Canada"},
      {name:"Northwest Territories", country:"Canada"},
      {name:"Nova Scotia", country:"Canada"},
      {name:"Nunavut", country:"Canada"},
      {name:"Ontario", country:"Canada"},
      {name:"Prince Edward", country:"Canada"},
      {name:"Quebec", country:"Canada"},
      {name:"Saskatchewan", country:"Canada"},
      {name:"Yukon", country:"Canada"},
      {name:"Aisen del General Carlos Ibanez del Campo", country:"Chile"},
      {name:"Antofagasta", country:"Chile"},
      {name:"Atacama", country:"Chile"},
      {name:"Biobio", country:"Chile"},
      {name:"Coquimbo", country:"Chile"},
      {name:"La Araucania", country:"Chile"},
      {name:"Libertador", country:"Chile"},
      {name:"Los Lagos", country:"Chile"},
      {name:"Magallanes y Antartica Chilena", country:"Chile"},
      {name:"Maule", country:"Chile"},
      {name:"Metropolitana de Santiago", country:"Chile"},
      {name:"Tarapaca", country:"Chile"},
      {name:"Valparaiso", country:"Chile"},
      {name:"Amazonas", country:"Colombia"},
      {name:"Antioquia", country:"Colombia"},
      {name:"Arauca", country:"Colombia"},
      {name:"Atlantico", country:"Colombia"},
      {name:"Bogota (Distrito Capital)", country:"Colombia"},
      {name:"Bolivar", country:"Colombia"},
      {name:"Boyaca", country:"Colombia"},
      {name:"Caldas", country:"Colombia"},
      {name:"Caqueta", country:"Colombia"},
      {name:"Casanare", country:"Colombia"},
      {name:"Cauca", country:"Colombia"},
      {name:"Cesar", country:"Colombia"},
      {name:"Choco", country:"Colombia"},
      {name:"Cordoba", country:"Colombia"},
      {name:"Cundinamarca", country:"Colombia"},
      {name:"Guainia", country:"Colombia"},
      {name:"Guaviare", country:"Colombia"},
      {name:"Huila", country:"Colombia"},
      {name:"La Guajira", country:"Colombia"},
      {name:"Magdalena", country:"Colombia"},
      {name:"Meta", country:"Colombia"},
      {name:"Narino", country:"Colombia"},
      {name:"Norte de Santander", country:"Colombia"},
      {name:"Putumayo", country:"Colombia"},
      {name:"Quindio", country:"Colombia"},
      {name:"Risaralda", country:"Colombia"},
      {name:"San Andres and Providencia", country:"Colombia"},
      {name:"Santander", country:"Colombia"},
      {name:"Sucre", country:"Colombia"},
      {name:"Tolima", country:"Colombia"},
      {name:"Valle del Cauca", country:"Colombia"},
      {name:"Vaupes", country:"Colombia"},
      {name:"Vichada", country:"Colombia"},
      {name:"Alajuela", country:"Costa Rica"},
      {name:"Cartago", country:"Costa Rica"},
      {name:"Guanacaste", country:"Costa Rica"},
      {name:"Heredia", country:"Costa Rica"},
      {name:"Limon", country:"Costa Rica"},
      {name:"Puntarenas", country:"Costa Rica"},
      {name:"San Jose", country:"Costa Rica"},
      {name:"All", country:"Denmark"},
      {name:"All", country:"DoDDs Schools"},
      {name:"Azuay", country:"Ecuador"},
      {name:"Bolivar", country:"Ecuador"},
      {name:"Canar", country:"Ecuador"},
      {name:"Carchi", country:"Ecuador"},
      {name:"Chimborazo", country:"Ecuador"},
      {name:"Cotopaxi", country:"Ecuador"},
      {name:"El Oro", country:"Ecuador"},
      {name:"Esmeraldas", country:"Ecuador"},
      {name:"Galapagos", country:"Ecuador"},
      {name:"Guayas", country:"Ecuador"},
      {name:"Imbabura", country:"Ecuador"},
      {name:"Loja", country:"Ecuador"},
      {name:"Los Rios", country:"Ecuador"},
      {name:"Manabi", country:"Ecuador"},
      {name:"Morona Santiago", country:"Ecuador"},
      {name:"Napo", country:"Ecuador"},
      {name:"Orellana", country:"Ecuador"},
      {name:"Pastaza", country:"Ecuador"},
      {name:"Pichincha", country:"Ecuador"},
      {name:"Sucumbios", country:"Ecuador"},
      {name:"Tungurahua", country:"Ecuador"},
      {name:"Zamora Chinchipe", country:"Ecuador"},
      {name:"All", country:"Finland"},
      {name:"Alsace", country:"France"},
      {name:"Aquitaine", country:"France"},
      {name:"Auvergne", country:"France"},
      {name:"Basse-Normandie", country:"France"},
      {name:"Bourgogne", country:"France"},
      {name:"Bretagne", country:"France"},
      {name:"Centre", country:"France"},
      {name:"Champagne-Ardenne", country:"France"},
      {name:"Corse", country:"France"},
      {name:"DOM", country:"France"},
      {name:"Franche-Comte", country:"France"},
      {name:"Haute-Normandie", country:"France"},
      {name:"Ile-de-France", country:"France"},
      {name:"Languedoc-Roussillon", country:"France"},
      {name:"Limousin", country:"France"},
      {name:"Lorraine", country:"France"},
      {name:"Midi-Pyrenees", country:"France"},
      {name:"Nord-Pas-de-Calais", country:"France"},
      {name:"PACA", country:"France"},
      {name:"Pays de la Loire", country:"France"},
      {name:"Picardie", country:"France"},
      {name:"Poitou-Charentes", country:"France"},
      {name:"Rhone-Alpes", country:"France"},
      {name:"TOM", country:"France"},
      {name:"Baden-Württemberg", country:"Germany"},
      {name:"Bayern", country:"Germany"},
      {name:"Berlin", country:"Germany"},
      {name:"Brandenburg", country:"Germany"},
      {name:"Bremen", country:"Germany"},
      {name:"Hamburg", country:"Germany"},
      {name:"Hessen", country:"Germany"},
      {name:"Mecklenburg-Vorpommern", country:"Germany"},
      {name:"Niedersachsen", country:"Germany"},
      {name:"Nordrhein-Westfalen", country:"Germany"},
      {name:"Rheinland-Pfalz", country:"Germany"},
      {name:"Saarland", country:"Germany"},
      {name:"Sachsen", country:"Germany"},
      {name:"Sachsen-Anhalt", country:"Germany"},
      {name:"Schleswig-Holstein", country:"Germany"},
      {name:"Thuringen", country:"Germany"},
      {name:"Central And Western", country:"Hong Kong"},
      {name:"Eastern", country:"Hong Kong"},
      {name:"Islands", country:"Hong Kong"},
      {name:"Kowloon City", country:"Hong Kong"},
      {name:"Kwai Tsing", country:"Hong Kong"},
      {name:"Kwun Tong", country:"Hong Kong"},
      {name:"North", country:"Hong Kong"},
      {name:"Sai Kung", country:"Hong Kong"},
      {name:"Sha Tin", country:"Hong Kong"},
      {name:"Sham Shui Po", country:"Hong Kong"},
      {name:"Southern", country:"Hong Kong"},
      {name:"Tai Po", country:"Hong Kong"},
      {name:"Tsuen Wan", country:"Hong Kong"},
      {name:"Tuen Mun", country:"Hong Kong"},
      {name:"Wan Chai", country:"Hong Kong"},
      {name:"Wong Tai Sin", country:"Hong Kong"},
      {name:"Yau Tsim Mong", country:"Hong Kong"},
      {name:"Yuen Long", country:"Hong Kong"},
      {name:"Carlow", country:"Ireland"},
      {name:"Cavan", country:"Ireland"},
      {name:"Clare", country:"Ireland"},
      {name:"Cork", country:"Ireland"},
      {name:"Donegal", country:"Ireland"},
      {name:"Dublin", country:"Ireland"},
      {name:"Galway", country:"Ireland"},
      {name:"Kerry", country:"Ireland"},
      {name:"Kildare", country:"Ireland"},
      {name:"Kilkenny", country:"Ireland"},
      {name:"Laois", country:"Ireland"},
      {name:"Leitrim", country:"Ireland"},
      {name:"Limerick", country:"Ireland"},
      {name:"Longford", country:"Ireland"},
      {name:"Louth", country:"Ireland"},
      {name:"Mayo", country:"Ireland"},
      {name:"Meath", country:"Ireland"},
      {name:"Monaghan", country:"Ireland"},
      {name:"Offaly", country:"Ireland"},
      {name:"Roscommon", country:"Ireland"},
      {name:"Sligo", country:"Ireland"},
      {name:"Tipperary", country:"Ireland"},
      {name:"Waterford", country:"Ireland"},
      {name:"Westmeath", country:"Ireland"},
      {name:"Wexford", country:"Ireland"},
      {name:"Wicklow", country:"Ireland"},
      {name:"Agrigento", country:"Italy"},
      {name:"Alessandria", country:"Italy"},
      {name:"Ancona", country:"Italy"},
      {name:"Aosta", country:"Italy"},
      {name:"Arezzo", country:"Italy"},
      {name:"Ascoli Piceno", country:"Italy"},
      {name:"Asti", country:"Italy"},
      {name:"Avellino", country:"Italy"},
      {name:"Bari", country:"Italy"},
      {name:"Belluno", country:"Italy"},
      {name:"Benevento", country:"Italy"},
      {name:"Bergamo", country:"Italy"},
      {name:"Biella", country:"Italy"},
      {name:"Bologna", country:"Italy"},
      {name:"Bolzano", country:"Italy"},
      {name:"Brescia", country:"Italy"},
      {name:"Brindisi", country:"Italy"},
      {name:"Cagliari", country:"Italy"},
      {name:"Caltanissetta", country:"Italy"},
      {name:"Campobasso", country:"Italy"},
      {name:"Caserta", country:"Italy"},
      {name:"Catania", country:"Italy"},
      {name:"Catanzaro", country:"Italy"},
      {name:"Chieti", country:"Italy"},
      {name:"Como", country:"Italy"},
      {name:"Cosenza", country:"Italy"},
      {name:"Cremona", country:"Italy"},
      {name:"Crotone", country:"Italy"},
      {name:"Cuneo", country:"Italy"},
      {name:"Enna", country:"Italy"},
      {name:"Ferrara", country:"Italy"},
      {name:"Firenze", country:"Italy"},
      {name:"Foggia", country:"Italy"},
      {name:"Forli - Cesena", country:"Italy"},
      {name:"Frosinone", country:"Italy"},
      {name:"Genova", country:"Italy"},
      {name:"Gorizia", country:"Italy"},
      {name:"Grosseto", country:"Italy"},
      {name:"Imperia", country:"Italy"},
      {name:"Isernia", country:"Italy"},
      {name:"La Spezia", country:"Italy"},
      {name:"L'Aquila", country:"Italy"},
      {name:"Latina", country:"Italy"},
      {name:"Lecce", country:"Italy"},
      {name:"Lecco", country:"Italy"},
      {name:"Livorno", country:"Italy"},
      {name:"Lodi", country:"Italy"},
      {name:"Lucca", country:"Italy"},
      {name:"Macerata", country:"Italy"},
      {name:"Mantova", country:"Italy"},
      {name:"Massa Carrara", country:"Italy"},
      {name:"Matera", country:"Italy"},
      {name:"Messina", country:"Italy"},
      {name:"Milano", country:"Italy"},
      {name:"Modena", country:"Italy"},
      {name:"Napoli", country:"Italy"},
      {name:"Novara", country:"Italy"},
      {name:"Nuoro", country:"Italy"},
      {name:"Oristano", country:"Italy"},
      {name:"Padova", country:"Italy"},
      {name:"Palermo", country:"Italy"},
      {name:"Parma", country:"Italy"},
      {name:"Pavia", country:"Italy"},
      {name:"Perugia", country:"Italy"},
      {name:"Pesaro", country:"Italy"},
      {name:"Pescara", country:"Italy"},
      {name:"Piacenza", country:"Italy"},
      {name:"Pisa", country:"Italy"},
      {name:"Pistoia", country:"Italy"},
      {name:"Pordenone", country:"Italy"},
      {name:"Potenza", country:"Italy"},
      {name:"Prato", country:"Italy"},
      {name:"Ragusa", country:"Italy"},
      {name:"Ravenna", country:"Italy"},
      {name:"Reggio Calabria", country:"Italy"},
      {name:"Reggio Emilia", country:"Italy"},
      {name:"Rieti", country:"Italy"},
      {name:"Rimini", country:"Italy"},
      {name:"Roma", country:"Italy"},
      {name:"Rovigo", country:"Italy"},
      {name:"Salerno", country:"Italy"},
      {name:"Sassari", country:"Italy"},
      {name:"Savona", country:"Italy"},
      {name:"Siena", country:"Italy"},
      {name:"Siracusa", country:"Italy"},
      {name:"Sondrio", country:"Italy"},
      {name:"Taranto", country:"Italy"},
      {name:"Teramo", country:"Italy"},
      {name:"Terni", country:"Italy"},
      {name:"Torino", country:"Italy"},
      {name:"Trapani", country:"Italy"},
      {name:"Trento", country:"Italy"},
      {name:"Treviso", country:"Italy"},
      {name:"Trieste", country:"Italy"},
      {name:"Udine", country:"Italy"},
      {name:"Varese", country:"Italy"},
      {name:"Venezia", country:"Italy"},
      {name:"Verbania-Cusio-Ossola", country:"Italy"},
      {name:"Vercelli", country:"Italy"},
      {name:"Verona", country:"Italy"},
      {name:"Vibo Valenza", country:"Italy"},
      {name:"Vicenza", country:"Italy"},
      {name:"Viterbo", country:"Italy"},
      {name:"Aguascalientes", country:"Mexico"},
      {name:"Baja California", country:"Mexico"},
      {name:"Baja California Sur", country:"Mexico"},
      {name:"Campeche", country:"Mexico"},
      {name:"Chiapas", country:"Mexico"},
      {name:"Chihuahua", country:"Mexico"},
      {name:"Coahuila", country:"Mexico"},
      {name:"Colima", country:"Mexico"},
      {name:"Distrito Federal", country:"Mexico"},
      {name:"Durango", country:"Mexico"},
      {name:"Guanajuato", country:"Mexico"},
      {name:"Guerrero", country:"Mexico"},
      {name:"Hidalgo", country:"Mexico"},
      {name:"Jalisco", country:"Mexico"},
      {name:"Mexico", country:"Mexico"},
      {name:"Michoacan", country:"Mexico"},
      {name:"Morelos", country:"Mexico"},
      {name:"Nayarit", country:"Mexico"},
      {name:"Nuevo Leon", country:"Mexico"},
      {name:"Oaxaca", country:"Mexico"},
      {name:"Puebla", country:"Mexico"},
      {name:"Queretaro", country:"Mexico"},
      {name:"Quintana Roo", country:"Mexico"},
      {name:"San Luis Potosi", country:"Mexico"},
      {name:"Sinaloa", country:"Mexico"},
      {name:"Sonora", country:"Mexico"},
      {name:"Tabasco", country:"Mexico"},
      {name:"Tamaulipas", country:"Mexico"},
      {name:"Tlaxcala", country:"Mexico"},
      {name:"Veracruz", country:"Mexico"},
      {name:"Yucatan", country:"Mexico"},
      {name:"Zacatecas", country:"Mexico"},
      {name:"Drenthe", country:"Netherlands"},
      {name:"Flevoland", country:"Netherlands"},
      {name:"Friesland", country:"Netherlands"},
      {name:"Gelderland", country:"Netherlands"},
      {name:"Groningen", country:"Netherlands"},
      {name:"Limburg", country:"Netherlands"},
      {name:"Noord-Brabant", country:"Netherlands"},
      {name:"Noord-Holland", country:"Netherlands"},
      {name:"Overijssel", country:"Netherlands"},
      {name:"Utrecht", country:"Netherlands"},
      {name:"Zeeland", country:"Netherlands"},
      {name:"Zuid-Holland", country:"Netherlands"},
      {name:"Auckland", country:"New Zealand"},
      {name:"Bay of Plenty", country:"New Zealand"},
      {name:"Canterbury", country:"New Zealand"},
      {name:"Gisborne", country:"New Zealand"},
      {name:"Hawke's Bay", country:"New Zealand"},
      {name:"Manawatu-Wanganui", country:"New Zealand"},
      {name:"Marlborough", country:"New Zealand"},
      {name:"Nelson", country:"New Zealand"},
      {name:"Northland", country:"New Zealand"},
      {name:"Otago", country:"New Zealand"},
      {name:"Southland", country:"New Zealand"},
      {name:"Taranaki", country:"New Zealand"},
      {name:"Tasman", country:"New Zealand"},
      {name:"Waikato", country:"New Zealand"},
      {name:"Wellington", country:"New Zealand"},
      {name:"West Coast", country:"New Zealand"},
      {name:"All", country:"Norway"},
      {name:"Amazonas", country:"Peru"},
      {name:"Ancash", country:"Peru"},
      {name:"Apurimac", country:"Peru"},
      {name:"Arequipa", country:"Peru"},
      {name:"Ayacucho", country:"Peru"},
      {name:"Cajamarca", country:"Peru"},
      {name:"Callao", country:"Peru"},
      {name:"Cusco", country:"Peru"},
      {name:"Huancavelica", country:"Peru"},
      {name:"Huanuco", country:"Peru"},
      {name:"Ica", country:"Peru"},
      {name:"Junin", country:"Peru"},
      {name:"La Libertad", country:"Peru"},
      {name:"Lambayeque", country:"Peru"},
      {name:"Lima", country:"Peru"},
      {name:"Loreto", country:"Peru"},
      {name:"Madre de Dios", country:"Peru"},
      {name:"Moquegua", country:"Peru"},
      {name:"Pasco", country:"Peru"},
      {name:"Piura", country:"Peru"},
      {name:"Puno", country:"Peru"},
      {name:"San Martin", country:"Peru"},
      {name:"Tacna", country:"Peru"},
      {name:"Tumbes", country:"Peru"},
      {name:"Ucayali", country:"Peru"},
      {name:"All", country:"Singapore"},
      {name:"East", country:"Singapore"},
      {name:"North", country:"Singapore"},
      {name:"South", country:"Singapore"},
      {name:"West", country:"Singapore"},
      {name:"alava", country:"Spain"},
      {name:"Albacete", country:"Spain"},
      {name:"Alicante", country:"Spain"},
      {name:"Almeria", country:"Spain"},
      {name:"Asturias", country:"Spain"},
      {name:"avila", country:"Spain"},
      {name:"Badajoz", country:"Spain"},
      {name:"Balears, Illes", country:"Spain"},
      {name:"Barcelona", country:"Spain"},
      {name:"Burgos", country:"Spain"},
      {name:"Caceres", country:"Spain"},
      {name:"Cadiz", country:"Spain"},
      {name:"Cantabria", country:"Spain"},
      {name:"Castellon", country:"Spain"},
      {name:"Ceuta", country:"Spain"},
      {name:"Ciudad Real", country:"Spain"},
      {name:"Cordoba", country:"Spain"},
      {name:"Coruna, A", country:"Spain"},
      {name:"Cuenca", country:"Spain"},
      {name:"Girona/Gerona", country:"Spain"},
      {name:"Granada", country:"Spain"},
      {name:"Guadalajara", country:"Spain"},
      {name:"Guipúzcoa", country:"Spain"},
      {name:"Huelva", country:"Spain"},
      {name:"Huesca", country:"Spain"},
      {name:"Jaen", country:"Spain"},
      {name:"Leon", country:"Spain"},
      {name:"Lerida/Lleida", country:"Spain"},
      {name:"Lugo", country:"Spain"},
      {name:"Madrid", country:"Spain"},
      {name:"Malaga", country:"Spain"},
      {name:"Melilla", country:"Spain"},
      {name:"Murcia", country:"Spain"},
      {name:"Navarra", country:"Spain"},
      {name:"Ourense", country:"Spain"},
      {name:"Palencia", country:"Spain"},
      {name:"Palmas, Las", country:"Spain"},
      {name:"Pontevedra", country:"Spain"},
      {name:"Rioja, La", country:"Spain"},
      {name:"Salamanca", country:"Spain"},
      {name:"Santa Cruz de Tenerife", country:"Spain"},
      {name:"Segovia", country:"Spain"},
      {name:"Sevilla", country:"Spain"},
      {name:"Soria", country:"Spain"},
      {name:"Tarragona", country:"Spain"},
      {name:"Teruel", country:"Spain"},
      {name:"Toledo", country:"Spain"},
      {name:"Valencia", country:"Spain"},
      {name:"Valladolid", country:"Spain"},
      {name:"Vizcaya", country:"Spain"},
      {name:"Zamora", country:"Spain"},
      {name:"Zaragoza", country:"Spain"},
      {name:"All", country:"Sweden"},
      {name:"Channel Islands", country:"United Kingdom"},
      {name:"East", country:"United Kingdom"},
      {name:"Isle Of Man", country:"United Kingdom"},
      {name:"London and South East", country:"United Kingdom"},
      {name:"Midlands", country:"United Kingdom"},
      {name:"Northeast", country:"United Kingdom"},
      {name:"Northern Ireland", country:"United Kingdom"},
      {name:"Northwest", country:"United Kingdom"},
      {name:"Scotland", country:"United Kingdom"},
      {name:"South", country:"United Kingdom"},
      {name:"Southwest", country:"United Kingdom"},
      {name:"Wales", country:"United Kingdom"},
      {name:"Artigas", country:"Uruguay"},
      {name:"Canelones", country:"Uruguay"},
      {name:"Cerro Largo", country:"Uruguay"},
      {name:"Colonia", country:"Uruguay"},
      {name:"Durazno", country:"Uruguay"},
      {name:"Flores", country:"Uruguay"},
      {name:"Florida", country:"Uruguay"},
      {name:"Lavalleja", country:"Uruguay"},
      {name:"Maldonado", country:"Uruguay"},
      {name:"Montevideo", country:"Uruguay"},
      {name:"Paysandu", country:"Uruguay"},
      {name:"Rio Negro", country:"Uruguay"},
      {name:"Rivera", country:"Uruguay"},
      {name:"Rocha", country:"Uruguay"},
      {name:"Salto", country:"Uruguay"},
      {name:"San Jose", country:"Uruguay"},
      {name:"Soriano", country:"Uruguay"},
      {name:"Tacuarembo", country:"Uruguay"},
      {name:"Treinta y Tres", country:"Uruguay"},
      {name:"Alabama", country:"United States"},
      {name:"Alaska", country:"United States"},
      {name:"Arizona", country:"United States"},
      {name:"Arkansas", country:"United States"},
      {name:"California", country:"United States"},
      {name:"Colorado", country:"United States"},
      {name:"Connecticut", country:"United States"},
      {name:"Delaware", country:"United States"},
      {name:"Florida", country:"United States"},
      {name:"Georgia", country:"United States"},
      {name:"Hawaii", country:"United States"},
      {name:"Idaho", country:"United States"},
      {name:"Illinois", country:"United States"},
      {name:"Indiana", country:"United States"},
      {name:"Iowa", country:"United States"},
      {name:"Kansas", country:"United States"},
      {name:"Kentucky", country:"United States"},
      {name:"Louisiana", country:"United States"},
      {name:"Maine", country:"United States"},
      {name:"Maryland", country:"United States"},
      {name:"Massachusetts", country:"United States"},
      {name:"Michigan", country:"United States"},
      {name:"Minnesota", country:"United States"},
      {name:"Mississippi", country:"United States"},
      {name:"Missouri", country:"United States"},
      {name:"Montana", country:"United States"},
      {name:"Nebraska", country:"United States"},
      {name:"Nevada", country:"United States"},
      {name:"New Hampshire", country:"United States"},
      {name:"New Jersey", country:"United States"},
      {name:"New Mexico", country:"United States"},
      {name:"New York", country:"United States"},
      {name:"North Carolina", country:"United States"},
      {name:"North Dakota", country:"United States"},
      {name:"Ohio", country:"United States"},
      {name:"Oklahoma", country:"United States"},
      {name:"Oregon", country:"United States"},
      {name:"Pennsylvania", country:"United States"},
      {name:"Rhode Island", country:"United States"},
      {name:"South Carolina", country:"United States"},
      {name:"South Dakota", country:"United States"},
      {name:"Tennessee", country:"United States"},
      {name:"Texas", country:"United States"},
      {name:"Utah", country:"United States"},
      {name:"Vermont", country:"United States"},
      {name:"Virginia", country:"United States"},
      {name:"Washington", country:"United States"},
      {name:"Washington DC", country:"United States"},
      {name:"West Virginia", country:"United States"},
      {name:"Wisconsin", country:"United States"},
      {name:"Wyoming", country:"United States"},
      {name:"Amazonas", country:"Venezuela"},
      {name:"Anzoategui", country:"Venezuela"},
      {name:"Apure", country:"Venezuela"},
      {name:"Aragua", country:"Venezuela"},
      {name:"Barinas", country:"Venezuela"},
      {name:"Bolivar", country:"Venezuela"},
      {name:"Carabobo", country:"Venezuela"},
      {name:"Cojedes", country:"Venezuela"},
      {name:"Delta Amacuro", country:"Venezuela"},
      {name:"Dependencias Federales", country:"Venezuela"},
      {name:"Distrito Capital", country:"Venezuela"},
      {name:"Falcon", country:"Venezuela"},
      {name:"Guarico", country:"Venezuela"},
      {name:"Lara", country:"Venezuela"},
      {name:"Merida", country:"Venezuela"},
      {name:"Miranda", country:"Venezuela"},
      {name:"Monagas", country:"Venezuela"},
      {name:"Nueva Esparta", country:"Venezuela"},
      {name:"Portuguesa", country:"Venezuela"},
      {name:"Sucre", country:"Venezuela"},
      {name:"Tachira", country:"Venezuela"},
      {name:"Trujillo", country:"Venezuela"},
      {name:"Vargas", country:"Venezuela"},
      {name:"Yaracuy", country:"Venezuela"},
      {name:"Zulia", country:"Venezuela"},
];

      var objprov=document.jfrm.elements['prov'];
           objprov.options.length = 1;
      var userBrowser = navigator.userAgent.toLowerCase();
      if( !(userBrowser.indexOf('msie') + 1) )
              provNum = provinceList.length;
      else
              provNum = provinceList.length - 1;


      var counter = 0;
      for ( i=0; i < provNum; i++ ){

            if ( provinceList[i].country==ctry_name){
                    counter++;
                    objprov.options[counter]=new Option( provinceList[i].name, provinceList[i].name);
            }
      }

    if(counter>0)
    {
             document.getElementById('provinceSelect').style.display='';
    }
    else
    {
            document.getElementById('provinceSelect').style.display='none';
    }
}