function cProv() {

		// created two new arrays of provinces and states for each country
		var prov = new Array("BC", "AB", "SK", "MB" , "ON", "QC", "NB", "NS", "PE", "NL", "YT", "NT", "NU");

		var state = new Array("AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NB","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY");
		
		
		// created variable to store the option value of the country selection
		var option1;
		
		// created a value for province field 
		var fProv =  document.mtiform.field_data_State_Province;
		var provLength = fProv.length // need this value to counter the deletion effects in loop
		
		// clears any existing values in the state province field
	function stateClear() {	
		for (iCount=0; iCount<provLength; iCount++) {
			
			fProv.options[0] = null;  // the value of zero deletes all zero position values as the array is re-ordered
			}
		}
	
		//capitalizes the first letter of the string for the country or province	
	function capFirst(coffee) {
	  	
	  	var txtEspressione = /^\D/g;
	  	var toReplace;
	  	
	  	toReplace = coffee.replace(txtEspressione, function(sMatch){ return sMatch.toUpperCase() });
	  	cinzano = toReplace;
	  	return cinzano;
 	}
 	
 		// loops through the selection array and finds the selected variable
		// then assigns this value to the option1 variable
		for (i=0;i<document.mtiform.field_data_Country.length;i++) {
												
				if (document.mtiform.field_data_Country[i].selected==true) {
				option1=document.mtiform.field_data_Country[i].value;
				}
			}

		switch (option1){

		case "Canada":
		//	document.mtiform.field_data_State_Province.disabled=false;
			
			stateClear();
			
			for (j=0;j<prov.length;j++){
			  document.mtiform.field_data_State_Province[j]=new Option(prov[j], prov[j]);
			}
			document.mtiform.field_data_State_Province.focus();
			break;

		case "USA":
		//	document.mtiform.field_data_State_Province.disabled=false;
			
			stateClear();
			
			for (j=0;j<state.length;j++){
			  document.mtiform.field_data_State_Province[j]=new Option(state[j], state[j]);
			}
			document.mtiform.field_data_State_Province.focus();
			break;
	
		case "Other":
		
		//	document.mtiform.field_data_State_Province.disabled=false;
			
			stateClear();
			
			var interNational =prompt("Please enter the name of your Country", "Italia");
			
			var cinzano = interNational.toLowerCase(); 
			capFirst(cinzano);
			
			
			for (k=0;k<1 ;k++){
			  document.mtiform.field_data_Country[0]=new Option(cinzano, cinzano);
			  
			  document.mtiform.field_data_Country[0].selected=true;					  
			}
			
			var interProvince =prompt("Please enter the name of your State, Province or Region", "Puglia");
		
			var cinzano = interProvince.toLowerCase(); 
			capFirst(cinzano);

			for (j=0;j<1 ;j++){
			  document.mtiform.field_data_State_Province[0]=new Option(cinzano, cinzano);
			 
			}
			document.mtiform.field_data_State_Province.focus();			
			break;
		
		default:
			document.mtiform.field_data_State_Province.focus();
			break;
		}
}
