	var elelen;
	var curstyles;
	if(document.all) {
		elelen = document.all.length;
		curstyles = new Array(elelen);
	}
	function fnSetCountries(){
		//alert(defcountry+" "+document.searchForm.country.value);
		//if(defcountry!=document.eventForm.country.value) {
			//defcountry = document.eventForm.country.value;
//			setPointer();
			setTimeout('tempfnSetCountries()',1); 
	//	}
		//defcountry = "";
	}
	function tempfnSetCountries(){
		var exhiName = document.getElementById("idTxtEditable").value;
		var exhiCode = "";
		var day = document.eventForm.eventDate_dsd.value;
		var mon = document.eventForm.eventDate_dsm.value;
		var year = document.eventForm.eventDate_dsy.value;
		
		if(exhiName==""){
			//fnRemoveExhiCountryValues();
			//resetPointer(); 
			return;
		}

		if (document.implementation && document.implementation.createDocument) {
			xmlDocC = document.implementation.createDocument("","",null);
			xmlDocC.load("../GetCountries?exhiName="+exhiName+"&exhiCode="+exhiCode+"&srchDay="+day+"&srchMon="+mon+"&srchYear="+year);
			xmlDocC.onload = setCountries;
		}
		else if (window.ActiveXObject) {
				xmlDocC = new ActiveXObject("Microsoft.XMLDOM");
				xmlDocC.onreadystatechange = function(){
					if(xmlDocC.readyState == 4)setCountries();
				}
				xmlDocC.load("GetCountries?exhiName="+exhiName+"&exhiCode="+exhiCode+"&srchDay="+day+"&srchMon="+mon+"&srchYear="+year);
		} else {
				alert(jsBrowserRSValidation);
		}
//		resetPointer(); 
	}
	function setCountries() {
	//	fnRemoveExhiCountryValues();
		var x = xmlDocC.getElementsByTagName('exhiCountry');
		//for(i=0;i<x.length;i++){
			//var objOption = document.createElement("option");
			//objOption.value=x[i].childNodes[0].firstChild.nodeValue;
		//	objOption.text=x[i].childNodes[1].firstChild.nodeValue;
		//	try {
		//		document.eventForm.country.add(objOption);
		//	} catch( e ) {
		//		document.eventForm.country.add(objOption,null);
		//	}	
		//}
//		if(x.length == 0)
//		{
//			document.eventForm.country.selectedIndex = 0; 
//		}	
//		else
//		{
//			document.eventForm.country.selectedIndex = 1;	
//		}	
		if(x.length > 0)
		{
			document.eventForm.country.value = x[0].childNodes[0].firstChild.nodeValue; 
		}	

		fnSetVenues();
		fnSetTowns('e');
		//fnSetTown('e');
	}
		<!--Function to remove the values from the town select box-->
	function fnRemoveExhiCountryValues(){
		while (document.eventForm.country.length>1){
			document.eventForm.country.remove(1);
		}
	}
