//--Change Required Functions here
	function property(country, city){
		this.code = "UUA"
		
if (country == "Andorra")	
	this.code = "AD"
else if (country == "Afghanistan")	
	this.code = "AF"
else if (country == "Argentina")	
	this.code = "AR"
else if (country == "Australia")	
	this.code = "AU"
else if (country == "Austria")	
	this.code = "AT"
else if (country == "Bahamas")	
	this.code = "BS"
else if (country == "Bahrain")	
	this.code = "BH"
else if (country == "Barbados")	
	this.code = "BB"
else if (country == "Belgium")	
	this.code = "BE"
else if (country == "Brazil")	
	this.code = "BR"
else if (country == "Brunei")	
	this.code = "BN"
else if (country == "Bulgaria")	
	this.code = "BG"
else if (country == "Cambodia")	
	this.code = "KH"
else if (country == "Canada")	
	this.code = "CA"
else if (country == "Chile")	
	this.code = "CL"
else if (country == "China")	
	this.code = "CN"
else if (country == "Colombia")	
	this.code = "CO"
else if (country == "Croatia")	
	this.code = "HR"
else if (country == "Cyprus")	
	this.code = "CY"
else if (country == "Czech Republic")	
	this.code = "CZ"
else if (country == "Denmark")	
	this.code = "DK"
else if (country == "Ecuador")	
	this.code = "EC"
else if (country == "Egypt")	
	this.code = "EG"
else if (country == "Estonia")	
	this.code = "EE"
else if (country == "Fiji")	
	this.code = "FJ"
else if (country == "Finland")	
	this.code = "FI"
else if (country == "France")	
	this.code = "FR"
else if (country == "Germany")	
	this.code = "DE"
else if (country == "Greece")	
	this.code = "GR"
else if (country == "Guadeloupe")	
	this.code = "GP"
else if (country == "Guatemala")	
	this.code = "GT"
else if (country == "Hawaii")	
	this.code = "HW"
else if (country == "Hong Kong")	
	this.code = "CN"
else if (country == "Hungary")	
	this.code = "HU"
else if (country == "Iceland")	
	this.code = "IS"
else if (country == "India")	
	this.code = "IN"
else if (country == "Indonesia")	
	this.code = "ID"
else if (country == "Ireland")	
	this.code = "IE"
else if (country == "Italy")	
	this.code = "IT"
else if (country == "Jamaica")	
	this.code = "JM"
else if (country == "Japan")	
	this.code = "JP"
else if (country == "Jordan")	
	this.code = "JO"
else if (country == "Korea")	
	this.code = "KR"
else if (country == "Kuwait")	
	this.code = "KW"
else if (country == "Laos People's Democratic Republic")	
	this.code = "LA"
else if (country == "Laos")	
	this.code = "LA"
else if (country == "Latvia")	
	this.code = "LV"
else if (country == "Lebanon")	
	this.code = "LB"
else if (country == "Lithuania")	
	this.code = "LT"
else if (country == "Luxembourg")	
	this.code = "LU"
else if (country == "Malaysia")	
	this.code = "MY"
else if (country == "Maldives")	
	this.code = "MV"
else if (country == "Malta")	
	this.code = "MT"
else if (country == "Mauritius")	
	this.code = "MU"
else if (country == "Mexico")	
	this.code = "MX"
else if (country == "Monaco")	
	this.code = "MC"
else if (country == "Montenegro")	
	this.code = "ME"
else if (country == "Morocco")	
	this.code = "MA"
else if (country == "Myanmar")	
	this.code = "MM"
else if (country == "Netherlands Antilles")	
	this.code = "AN"
else if (country == "Netherlands")	
	this.code = "NL"
else if (country == "New Zealand")	
	this.code = "NZ"
else if (country == "North Korea")	
	this.code = "KP"
else if (country == "Norway")	
	this.code = "NO"
else if (country == "Panama")	
	this.code = "PA"
else if (country == "Peru")	
	this.code = "PE"
else if (country == "Philippines")	
	this.code = "PH"
else if (country == "Poland")	
	this.code = "PL"
else if (country == "Portugal")	
	this.code = "PT"
else if (country == "Puerto Rico")	
	this.code = "PR"
else if (country == "Qatar")	
	this.code = "QA"
else if (country == "Republic of Serbia")	
	this.code = "RS"
else if (country == "Romania")	
	this.code = "RO"
else if (country == "Russia")	
	this.code = "RU"
else if (country == "Saudi Arabia")	
	this.code = "SA"
else if (country == "Select a Country")	
	this.code = ""
else if (country == "Serbia")	
	this.code = "RS"
else if (country == "Seychelles")	
	this.code = "SC"
else if (country == "Singapore")	
	this.code = "SG"
else if (country == "Slovakia")	
	this.code = "SK"
else if (country == "Slovekia")	
	this.code = "SK"
else if (country == "Slovenia")	
	this.code = "SI"
else if (country == "South Africa")
	this.code = "ZA"	
else if (country == "Spain")	
	this.code = "ES"
else if (country == "Sri Lanka")	
	this.code = "LK"
else if (country == "Sweden")	
	this.code = "SE"
else if (country == "Switzerland")	
	this.code = "CH"
else if (country == "Taiwan")	
	this.code = "TW"
else if (country == "Thailand")	
	this.code = "TH"
else if (country == "Turkey")	
	this.code = "TR"
else if (country == "United Arab Emirates")	
	this.code = "AE"
else if (country == "United Kingdom")	
	this.code = "GB"
else if (country == "United States")	
	this.code = "US"
else if (country == "USA")	
	this.code = "US"
else if (country == "Uruguay")	
	this.code = "UY"
else if (country == "Vietnam")	
	this.code = "VN"
else if (country == "Yemen")	
	this.code = "YE"

		this.country = country
		this.city = city
	}
	// 	Delete on 112106
	//else if (country == "Serbia and Montenegro")
	//		this.code = "YU"
	//else if (country == "Montenegro")
	//		this.code = "ME"
	//else if (country == "Republic of Serbia")
	//		this.code = "RS"
//--End Alter

function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}


	function countrySel()
	{
		countrySelected = cCountry.selectedIndex	
				
		/*		 
		var x =document.getElementById("citytr");
		var y =document.getElementById("nocitytr");
		var z =document.getElementById("nocitytext");
	
		
		
		 if (cCountry.options[cCountry.selectedIndex].text == "--------- Asia ---------" || cCountry.options[cCountry.selectedIndex].text == "------- Oceania -------" || cCountry.options[cCountry.selectedIndex].text == "-------- Europe -------" || cCountry.options[cCountry.selectedIndex].text == "------- America -------")
			{	
				//x.disabled=true;
				//cCity.disabled=true;				
				if (y != null)
					y.style.display = "inline";		
				//z.innerText= "Select a Country"
			}
			else
			{
				//x.disabled=false;
				//cCity.disabled=false;
	
				if (y != null)
					y.style.display = "none";	
				//z.innerText= "Select a Country"			
			}	
			*/
			cCity.disabled=false;
		if (cCountry.options[cCountry.selectedIndex].text == "--------- Asia ---------") 
			{
			cCity.disabled=true;
			//window.location="http://www.holidaycity.com/hcrs/tpl/tplcity2.aspx";
			//z.innerText= "Select a Country in Asia";			
			}
		if (cCountry.options[cCountry.selectedIndex].text == "------- Oceania -------") 
			{
			cCity.disabled=true;
			//window.location="http://www.holidaycity.com/hcrs/tpl/tplcity2.aspx";
			//z.innerText= "Select a Country in Oceania";
			}
		if (cCountry.options[cCountry.selectedIndex].text == "----- Middle East -----") 
			{
			cCity.disabled=true;
			}
		if (cCountry.options[cCountry.selectedIndex].text == "-------- Africa --------") 
			{
			cCity.disabled=true;
			}

		if (cCountry.options[cCountry.selectedIndex].text == "-------- Europe -------") 
			{
			cCity.disabled=true;
			//window.location="http://www.holidaycity.com/hcrs/tpl/tplcity2.aspx";
			//z.innerText= "Select a Country in Europe";
			}
		if (cCountry.options[cCountry.selectedIndex].text == "------- America -------")
			{
			cCity.disabled=true;
			//window.location="http://www.holidaycity.com/hcrs/tpl/tplcity2.aspx";
			//z.innerText= "Select a Country in America";
			}
		if (cCountry.options[cCountry.selectedIndex].text == "--- North America ---")
			{
			cCity.disabled=true;			
			}
		if (cCountry.options[cCountry.selectedIndex].text == "-- Central America --")
			{
			cCity.disabled=true;			
			}
		if (cCountry.options[cCountry.selectedIndex].text == "--- South America ---")
			{
			cCity.disabled=true;			
			}
			
		 
		 
		if(countrySelected == (parseInt(cCountry.length)-1))
		{
			/*
			var i;
			if(window.Country){
			for(i=0; i<countries.length-1; i++){
				if(countries[i].country==Country){
					cCountry.selectedIndex=i;
					break;
				}
			}
			*/
			for(y=cCity.options.length-1; y>0; y--) {
       				cCity.options[i] = null;
			}
		      	cityOfcountry = countries[i]
			for(j=0; j<cityOfcountry.city.length;j++){
				cCity.options[j] = new Option(cityOfcountry.city[j],cityOfcountry.city[j])
		 	}
			/*
			for(var i=0; i<cCity.options.length; i++){
				if(cCity[i].text == City){
				cCity.selectedIndex = i;
				break;
				}
			}
			}else{
				cCountry.selectedIndex=0;
				cCity.selectedIndex=0;
			}
			window.location="http://www.holidaycity.com/hcrs/tpl/tplcity2.aspx";
			return false;	
			*/
		}
		
		for(i=cCity.options.length-1; i>0; i--) {
       			cCity.options[i] = null;
		}
	      	cityOfcountry = countries[countrySelected]
		for(j=0; j<cityOfcountry.city.length;j++){
			cCity.options[j] = new Option(cityOfcountry.city[j],cityOfcountry.city[j])
	 	}
	}

	function countrySel1(){
		countrySelected = cCountry.selectedIndex
		
		for(i=cCity.options.length-1; i>0; i--) {
       			cCity.options[i] = null
		}
	      	cityOfcountry = countries[countrySelected]
		for(j=0; j<cityOfcountry.city.length;j++){
			cCity.options[j] = new Option(cityOfcountry.city[j],cityOfcountry.city[j])
	 	}
	}

function getQueryVariable(variable) 
	{ 
	  var query = window.location.search.substring(1); 
	  var vars = query.split("&"); 
	  for (var i=0;i<vars.length;i++) 
	   { 
	     var pair = vars[i].split("="); 
	     if (pair[0] == variable) 
		{ 
		   return pair[1]; 
		} 
	   } 
	 } 

	function clearData(){
	  		for(i=cCity.options.length; i>0; i--) {
        			cCity.options[i] = null
		      	}			
			cCity.options[0] = new Option("- Select a country -")

	}
