function afterload(){
	fillCountry();
	GetCode();

	return false;
}
function checkvercode(varcode)
{
	if(document.getElementById('vercode1').innerHTML != varcode1)
	{
		document.getElementById('checkvercode').innerHTML = "<p style='color:red'>Varification code does not match please reload the page to continue</p>";
		document.drop_list.Submit.style.display = "none";
	}
	else
	{
		document.getElementById('checkvercode').innerHTML = "<p style='color:blue'>Sounds Good</p>";
	}
}  

function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;
	try{
		selectbox.add(optn,null);
	}
	catch(ex){
		selectbox.add(optn);
	}
}

function fillCountry(){
 // this function is used to fill the category list on load
 
	addOption(document.drop_list.Country, "Austria", "Austria");
	addOption(document.drop_list.Country, "Australia", "Australia");
	addOption(document.drop_list.Country, "Bangladesh", "Bangladesh");
	addOption(document.drop_list.Country, "Belarus", "Belarus");
	addOption(document.drop_list.Country, "Belgium", "Belgium");
	addOption(document.drop_list.Country, "Brazil", "Brazil");

	addOption(document.drop_list.Country, "Bulgaria", "Bulgaria");
	addOption(document.drop_list.Country, "Canada", "Canada");
	addOption(document.drop_list.Country, "Cyprus", "Cyprus");
	addOption(document.drop_list.Country, "Czech Republic", "Czech Republic");
	addOption(document.drop_list.Country, "Denmark", "Denmark");
	addOption(document.drop_list.Country, "Egypt", "Egypt");
	addOption(document.drop_list.Country, "Estonia", "Estonia");
	addOption(document.drop_list.Country, "Finland", "Finland");
	addOption(document.drop_list.Country, "France", "France"); 
	addOption(document.drop_list.Country, "Germany", "Germany");
	addOption(document.drop_list.Country, "Greece", "Greece");
	addOption(document.drop_list.Country, "Greenland", "Greenland");
	addOption(document.drop_list.Country, "Hong Kong", "Hong Kong");
	addOption(document.drop_list.Country, "Iceland", "Iceland");
	addOption(document.drop_list.Country, "INDIA", "INDIA");
	addOption(document.drop_list.Country, "Indonesia", "Indonesia");
	addOption(document.drop_list.Country, "Ireland", "Ireland");
	addOption(document.drop_list.Country, "Italy", "Italy");
	addOption(document.drop_list.Country, "Japan", "Japan");
	addOption(document.drop_list.Country, "Kenya", "Kenya");

	addOption(document.drop_list.Country, "Latvia", "Latvia");
	addOption(document.drop_list.Country, "Lebanon", "Lebanon");
	addOption(document.drop_list.Country, "Lithuania", "Lithuania");
	addOption(document.drop_list.Country, "Luxembourg", "Luxembourg");

	addOption(document.drop_list.Country, "Macedonia", "Macedonia");
	addOption(document.drop_list.Country, "Malaysia", "Malaysia");
	addOption(document.drop_list.Country, "Malta", "Malta");
	addOption(document.drop_list.Country, "Mexico", "Mexico");
	addOption(document.drop_list.Country, "Moldova", "Moldova");
	addOption(document.drop_list.Country, "Monaco", "Monaco");
	addOption(document.drop_list.Country, "Netherlands", "Netherlands");
	addOption(document.drop_list.Country, "New Zealand", "New Zealand");
	addOption(document.drop_list.Country, "Norway", "Norway");
	addOption(document.drop_list.Country, "Oman", "Oman");

	addOption(document.drop_list.Country, "Pakistan", "Pakistan");
	addOption(document.drop_list.Country, "Portugal", "Portugal");
	addOption(document.drop_list.Country, "Poland", "Poland");
	addOption(document.drop_list.Country, "Qatar", "Qatar");

	addOption(document.drop_list.Country, "Romania", "Romania");
	addOption(document.drop_list.Country, "Russia", "Russia");


	addOption(document.drop_list.Country, "Saudi Arabia", "Saudi Arabia"); 
	addOption(document.drop_list.Country, "Singapore", "Singapore");
	addOption(document.drop_list.Country, "Slovakia", "Slovakia");
	addOption(document.drop_list.Country, "South Africa", "South Africa");
	addOption(document.drop_list.Country, "Spain", "Spain");
	addOption(document.drop_list.Country, "Sri Lanka", "Sri Lanka");
	addOption(document.drop_list.Country, "Sweden", "Sweden");
	addOption(document.drop_list.Country, "Switzerland", "Switzerland");

	addOption(document.drop_list.Country, "Thailand", "Thailand"); 
	addOption(document.drop_list.Country, "Turkey", "Turkey");

	addOption(document.drop_list.Country, "UAE", "UAE");
	addOption(document.drop_list.Country, "UK", "UK");
	addOption(document.drop_list.Country, "US", "US");
	addOption(document.drop_list.Country, "Vietnam", "Vietnam");
	addOption(document.drop_list.Country, "Yemen", "Yemen");
	addOption(document.drop_list.Country, "Zimbabwe", "Zimbabwe");

}

function SelectCity(){
	// ON selection of category this function will work

	removeAllOptions(document.drop_list.City);
	addOption(document.drop_list.City, "", "City", "");

	if(document.drop_list.Country.value == 'Australia'){
	addOption(document.drop_list.City,"Adelaide", "Adelaide");
	addOption(document.drop_list.City,"Brisbane", "Brisbane");
	addOption(document.drop_list.City,"Canberra", "Canberra");
	addOption(document.drop_list.City,"Melbourne", "Melbourne");
	addOption(document.drop_list.City,"Perth", "Perth");

	addOption(document.drop_list.City,"Sydney", "Sydney");


	}

	if(document.drop_list.Country.value == 'Austria'){

	addOption(document.drop_list.City,"Graz", "Graz");
	addOption(document.drop_list.City,"Innsbruck", "Innsbruck");
	addOption(document.drop_list.City,"Klagenfurt", "Klagenfurt");
	addOption(document.drop_list.City,"Linz", "Linz");
	addOption(document.drop_list.City,"Salzburg", "Salzburg");
	}

	if(document.drop_list.Country.value == 'Belarus'){
	addOption(document.drop_list.City,"Brest", "Brest");
	addOption(document.drop_list.City,"Minsk", "Minsk");
	}


	if(document.drop_list.Country.value == 'Brazil'){
	addOption(document.drop_list.City,"Brasilla", "Brasilla");
	addOption(document.drop_list.City,"Fortaleza", "Fortaleza");
	addOption(document.drop_list.City,"Manaus", "Manaus");
	addOption(document.drop_list.City,"Recife", "Recife");
	addOption(document.drop_list.City,"Rio de Janeiro", "Rio de Janeiro");
	addOption(document.drop_list.City,"Salvador", "Salvador");
	}

	if(document.drop_list.Country.value == 'Belgium'){
	addOption(document.drop_list.City,"Antwerp", "Antwerp");
	addOption(document.drop_list.City,"Brussels", "Brussels");
	addOption(document.drop_list.City,"Liege", "Liege");
	}

	if(document.drop_list.Country.value == 'Bulgaria'){
	addOption(document.drop_list.City,"Bourgas", "Bourgas");
	addOption(document.drop_list.City,"Sofia", "Sofia");
	addOption(document.drop_list.City,"Varna", "Varna");

	}

	if(document.drop_list.Country.value == 'Cyprus'){
	addOption(document.drop_list.City,"Larnaca", "Larnaca");
	addOption(document.drop_list.City,"Nicosia", "Nicosia");
	addOption(document.drop_list.City,"Paphos", "Paphos");
	addOption(document.drop_list.City,"", "");
	}

	if(document.drop_list.Country.value == 'Czech Republic'){
	addOption(document.drop_list.City,"Brno", "Brno");
	addOption(document.drop_list.City,"Ercan", "Ercan");
	addOption(document.drop_list.City,"Ostrava", "Ostrava");
	addOption(document.drop_list.City,"Prague", "Prague");

	}

	if(document.drop_list.Country.value == 'Estonia'){
	addOption(document.drop_list.City,"Tallinn", "Tallinn");
	addOption(document.drop_list.City,"Tartu", "Tartu");
	}

	if(document.drop_list.Country.value == 'Finland'){
	addOption(document.drop_list.City,"Helsinki", "Helsinki");
	addOption(document.drop_list.City,"Ivalo", "Ivalo");
	addOption(document.drop_list.City,"Joensuu", "Joensuu");
	addOption(document.drop_list.City,"Jyvaskyla", "Jyvaskyla");
	addOption(document.drop_list.City,"Kajaani", "Kajaani");
	addOption(document.drop_list.City,"Kemi", "Kemi");
	addOption(document.drop_list.City,"Kittila", "Kittila");
	addOption(document.drop_list.City,"Kokkola Pietarsaa", "Kokkola Pietarsaa");
	addOption(document.drop_list.City,"Kuopio", "Kuopio");
	addOption(document.drop_list.City,"Kuusamo", "Kuusamo");
	addOption(document.drop_list.City,"Lappeenranta", "Lappeenranta");
	addOption(document.drop_list.City,"Mariehamn", "Mariehamn");

	}

	if(document.drop_list.Country.value == 'Greenland'){
	addOption(document.drop_list.City,"Ilulissat", "Ilulissat");
	addOption(document.drop_list.City,"Kangerlussuaq", "Kangerlussuaq");
	addOption(document.drop_list.City,"", "");
	addOption(document.drop_list.City,"", "");
	}

	if(document.drop_list.Country.value == 'Ireland'){
	addOption(document.drop_list.City,"Cork", "Cork");
	addOption(document.drop_list.City,"Donegal", "Donegal");
	addOption(document.drop_list.City,"Dublin", "Dublin");

	}

	if(document.drop_list.Country.value == 'Latvia'){
	addOption(document.drop_list.City,"Riga", "Riga");
	addOption(document.drop_list.City,"", "");
	addOption(document.drop_list.City,"", "");

	}

	if(document.drop_list.Country.value == 'Lithuania'){
	addOption(document.drop_list.City,"Kuanas", "Kuanas");
	addOption(document.drop_list.City,"Palanga", "Palanga");
	addOption(document.drop_list.City,"Shauliaj", "Shauliaj");

	}

	if(document.drop_list.Country.value == 'Malta'){
	addOption(document.drop_list.City,"Gozo", "Gozo");
	addOption(document.drop_list.City,"Malta", "Malta");
	addOption(document.drop_list.City,"", "");

	}

	if(document.drop_list.Country.value == 'Monaco'){
	addOption(document.drop_list.City,"Chisinau", "Chisinau");
	addOption(document.drop_list.City,"", "");
	addOption(document.drop_list.City,"", "");

	}

	if(document.drop_list.Country.value == 'Netherlands'){
	addOption(document.drop_list.City,"Amsterdam", "Amsterdam");
	addOption(document.drop_list.City,"Eindhoven", "Eindhoven");
	addOption(document.drop_list.City,"Enschede", "Enschede");

	}
	if(document.drop_list.Country.value == 'Norway'){
	addOption(document.drop_list.City,"Alta", "Alta");
	addOption(document.drop_list.City,"Bergen", "Bergen");
	addOption(document.drop_list.City,"Harstad Narvik", "Harstad Narvik");

	}
	if(document.drop_list.Country.value == 'Poland'){
	addOption(document.drop_list.City,"Bydgoszcz", "Bydgoszcz");
	addOption(document.drop_list.City,"Katowice", "Katowice");
	addOption(document.drop_list.City,"Poznan", "Poznan");
	addOption(document.drop_list.City,"Szczecin", "Szczecin");
	addOption(document.drop_list.City,"Warsaw", "Warsaw");
	addOption(document.drop_list.City,"Wroclaw", "Wroclaw");

	}
	if(document.drop_list.Country.value == 'Portugal'){
	addOption(document.drop_list.City,"Faro", "Faro");
	addOption(document.drop_list.City,"Horta", "Horta");
	addOption(document.drop_list.City,"Lisbon", "Lisbon");
	addOption(document.drop_list.City,"Ponta Delgada Azores", "Ponta Delgada Azores");
	addOption(document.drop_list.City,"Porto", "Porto");
	addOption(document.drop_list.City,"Terceira", "Terceira");


	}



	if(document.drop_list.Country.value == 'Romania'){
	addOption(document.drop_list.City,"Bucharest", "Bucharest");
	addOption(document.drop_list.City,"Timisoara", "Timisoara");
	addOption(document.drop_list.City,"", "");

	}


	if(document.drop_list.Country.value == 'Slovakia'){
	addOption(document.drop_list.City,"Bratislava", "Bratislava");
	addOption(document.drop_list.City,"", "");
	addOption(document.drop_list.City,"", "");

	}

	if(document.drop_list.Country.value == 'Slovenia'){
	addOption(document.drop_list.City,"Ljubliana", "Ljubliana");
	addOption(document.drop_list.City,"", "");
	addOption(document.drop_list.City,"", "");

	}



	if(document.drop_list.Country.value == 'Turkey'){
	addOption(document.drop_list.City,"Adana", "Adana");
	addOption(document.drop_list.City,"Balikesir", "Balikesir");
	addOption(document.drop_list.City,"Batman", "Batman");
	addOption(document.drop_list.City,"Bodrum", "Bodrum");
	addOption(document.drop_list.City,"Bursa", "Bursa");
	addOption(document.drop_list.City,"Canakkale", "Canakkale");
	addOption(document.drop_list.City,"Denizli", "Denizli");
	addOption(document.drop_list.City,"Diyarbakir", "Diyarbakir");
	addOption(document.drop_list.City,"Elazig", "Elazig");
	addOption(document.drop_list.City,"Erzurum", "Erzurum");
	addOption(document.drop_list.City,"Gaziantep", "Gaziantep");
	addOption(document.drop_list.City,"Isparta", "Isparta");
	addOption(document.drop_list.City,"Izmir", "Izmir");
	addOption(document.drop_list.City,"Kayseri", "Kayseri");

	}


	if(document.drop_list.Country.value == 'Spain'){
	addOption(document.drop_list.City,"Alicante", "Alicante");
	addOption(document.drop_list.City,"Almeria", "Almeria");
	addOption(document.drop_list.City,"Barcelona", "Barcelona");
	addOption(document.drop_list.City,"Fuerteventura", "Fuerteventura");
	addOption(document.drop_list.City,"Gran Canaria", "Gran Canaria");
	addOption(document.drop_list.City,"Ibiza", "Ibiza");
	addOption(document.drop_list.City,"Lanzarote", "Lanzarote");
	addOption(document.drop_list.City,"Malaga", "Malaga");
	addOption(document.drop_list.City,"Santa Cruz Palma", "Santa Cruz Palma");
	addOption(document.drop_list.City,"Santander", "Santander");
	addOption(document.drop_list.City,"Sevilla", "Sevilla");
	addOption(document.drop_list.City,"Valencia", "Valencia");
	addOption(document.drop_list.City,"Zaragoza", "Zaragoza");

	}

	if(document.drop_list.Country.value == 'Sweden'){
	addOption(document.drop_list.City,"Borlange Falun", "Borlange Falun");
	addOption(document.drop_list.City,"Gothenburg Landvetter", "Gothenburg Landvetter");
	addOption(document.drop_list.City,"Gothenburg Saeve", "Gothenburg Saeve");
	addOption(document.drop_list.City,"Kalmar", "Kalmar");
	addOption(document.drop_list.City,"Kiruna", "Kiruna");
	addOption(document.drop_list.City,"Longyearbyen", "Longyearbyen");
	addOption(document.drop_list.City,"Lulea", "Lulea");
	addOption(document.drop_list.City,"Norrkoping", "Norrkoping");
	addOption(document.drop_list.City,"Ornskoldsvik", "Ornskoldsvik");
	addOption(document.drop_list.City,"Skelleftea", "Skelleftea");
	addOption(document.drop_list.City,"Ronneby", "Ronneby");

	}




	if(document.drop_list.Country.value == 'Bangladesh'){
	addOption(document.drop_list.City,"Dinajpur", "Dinajpur", "");
	addOption(document.drop_list.City,"Dhaka", "Dhaka");
	addOption(document.drop_list.City,"Thakurgaon", "Thakurgaon");


	}
	if(document.drop_list.Country.value == 'Canada'){
	addOption(document.drop_list.City,"Edmoniton", "Edmoniton");
	addOption(document.drop_list.City,"ontario", "Ontario");
	addOption(document.drop_list.City,"Qebec", "Qebec");

	}

	if(document.drop_list.Country.value == 'Denmark'){
	addOption(document.drop_list.City,"Aalborg", "Aalborg");
	addOption(document.drop_list.City,"Aarhus", "Aarhus");
	addOption(document.drop_list.City,"Billund", "Billund");

	addOption(document.drop_list.City,"Copenhagen", "Copenhagen");
	addOption(document.drop_list.City,"Karup", "Karup");
	addOption(document.drop_list.City,"Roskilde", "Roskilde");
	}

	if(document.drop_list.Country.value == 'Egypt'){
	addOption(document.drop_list.City,"Cairo", "Cairo");
	}

	if(document.drop_list.Country.value == 'France'){
	addOption(document.drop_list.City,"Ajaccio", "Ajaccio");
	addOption(document.drop_list.City,"Annecy", "Annecy");
	addOption(document.drop_list.City,"Basel Mulhouse", "Basel Mulhouse");
	addOption(document.drop_list.City,"Bastia", "Bastia");
	addOption(document.drop_list.City,"Biarritz", "Biarritz");
	addOption(document.drop_list.City,"Bordeaux", "Bordeaux");
	addOption(document.drop_list.City,"Brest", "Brest");
	addOption(document.drop_list.City,"Caen", "Caen");
	addOption(document.drop_list.City,"Cannes", "Cannes");
	addOption(document.drop_list.City,"Castres", "Castres");
	addOption(document.drop_list.City,"Clermont Ferrand", "Clermont Ferrand");
	addOption(document.drop_list.City,"Dijon", "Dijon");
	addOption(document.drop_list.City,"Grenoble", "Grenoble");
	addOption(document.drop_list.City,"Lille", "Lille");
	addOption(document.drop_list.City,"Limoges", "Limoges");
	addOption(document.drop_list.City,"Lorient", "Lorient");
	addOption(document.drop_list.City,"Lourders", "Lourders");
	addOption(document.drop_list.City,"Lyon", "Lyon");
	addOption(document.drop_list.City,"Marseille", "Marseille");
	addOption(document.drop_list.City,"Nantes", "Nantes");
	addOption(document.drop_list.City,"Nimes", "Nimes");

	addOption(document.drop_list.City,"Paris", "Paris");
	addOption(document.drop_list.City,"Perpignan", "Perpignan");
	addOption(document.drop_list.City,"Quimper", "Quimper");
	addOption(document.drop_list.City,"Rennes", "Rennes");
	addOption(document.drop_list.City,"St. Tropez", "St. Tropez");
	addOption(document.drop_list.City,"Toulouse", "Toulouse");

	}


	if(document.drop_list.Country.value == 'Germany'){
	addOption(document.drop_list.City,"Berlin", "Berlin");
	addOption(document.drop_list.City,"Bayreuth", "Bayreuth");
	addOption(document.drop_list.City,"Bremen", "Bremen");
	addOption(document.drop_list.City,"Cologne", "Cologne");
	addOption(document.drop_list.City,"Dortmund", "Dortmund");
	addOption(document.drop_list.City,"Dresden", "Dresden");
	addOption(document.drop_list.City,"Erfurt", "Erfurt");
	addOption(document.drop_list.City,"Finkerwerder", "Finkerwerder");
	addOption(document.drop_list.City,"Friedrichshafen", "Friedrichshafen");
	addOption(document.drop_list.City,"Hanover", "Hanover");
	addOption(document.drop_list.City,"Karlsruhe", "Karlsruhe");
	addOption(document.drop_list.City,"Kiel", "Kiel");
	addOption(document.drop_list.City,"Leipzig/Halle", "Leipzig/Halle");
	addOption(document.drop_list.City,"Muenster", "Muenster");
	addOption(document.drop_list.City,"Munich", "Munich");
	addOption(document.drop_list.City,"Nuremberg", "Nuremberg");
	addOption(document.drop_list.City,"Rostock Laage", "Rostock Laage");
	addOption(document.drop_list.City,"Saarbruecken", "Saarbruecken");
	addOption(document.drop_list.City,"Stuttgart", "Stuttgart");
	addOption(document.drop_list.City,"Westerland", "Westerland");
	}


	if(document.drop_list.Country.value == 'Hong Kong'){
	addOption(document.drop_list.City,"Victoria", "victoria");
	}


	if(document.drop_list.Country.value == 'Indonesia'){
	addOption(document.drop_list.City,"Jakarta", "Jakarta");
	}


	if(document.drop_list.Country.value == 'INDIA'){
	addOption(document.drop_list.City,"Ahmedabad", "Ahmedabad");
	addOption(document.drop_list.City,"Ambala", "Ambala");
	addOption(document.drop_list.City,"Bahgalpur", "Bahgalpur");
	addOption(document.drop_list.City,"Bengalaru / Bangalore", "Bengalaru / Bangalore");

	addOption(document.drop_list.City,"Bhillai", "Bhillai");
	addOption(document.drop_list.City,"Bhavnagar", "Bhavnagar");
	addOption(document.drop_list.City,"Bhuj", "Bhuj");

	addOption(document.drop_list.City,"Bhopal", "Bhopal");
	addOption(document.drop_list.City,"Bilaspur", "Bilaspur");

	addOption(document.drop_list.City,"Chandigarh", "Chandigarh");
	addOption(document.drop_list.City,"Chennai", "Chennai");

	addOption(document.drop_list.City,"Delhi", "Delhi");
	addOption(document.drop_list.City,"Dharmasala", "Dharmasala");
	addOption(document.drop_list.City,"Faridabad", "Faridabad");
	addOption(document.drop_list.City,"Gandhinagar", "Gandhinagar");
	addOption(document.drop_list.City,"Guwahati", "Guwahati");
	addOption(document.drop_list.City,"Gurgaon", "Gurgaon");
	addOption(document.drop_list.City,"Gwalior", "Gwalior");

	addOption(document.drop_list.City,"Hyderabad / Secunderabad", "Hyderabad / Secunderabad");
	addOption(document.drop_list.City,"Jamshedpur", "Jamshedpur");
	addOption(document.drop_list.City,"Jammu", "Jammu");
	addOption(document.drop_list.City,"Jamnagar", "Jamnagar");

	addOption(document.drop_list.City,"Kakinada", "Kakinada");
	addOption(document.drop_list.City,"Kandla", "Kandla");
	addOption(document.drop_list.City,"Kannur", "Kannur");
	addOption(document.drop_list.City,"Kochi", "Kochi");

	addOption(document.drop_list.City,"Kolkata", "Kolkata");

	addOption(document.drop_list.City,"Mangalore", "Mangalore");

	addOption(document.drop_list.City,"Mumbai", "Mumbai");
	addOption(document.drop_list.City,"Mysoru ", "Mysoru ");

	addOption(document.drop_list.City,"Nellore", "Nellore");
	addOption(document.drop_list.City,"Nizamabad", "Nizamabad");
	addOption(document.drop_list.City,"Noida", "Noida");
	addOption(document.drop_list.City,"Panjim / Panaji", "Panjim / Panaji");
	addOption(document.drop_list.City,"Patna", "Patna");
	addOption(document.drop_list.City,"Pune", "Pune");


	addOption(document.drop_list.City,"Raipur", "Raipur");
	addOption(document.drop_list.City,"Rajahmundry", "Rajahmundry");
	addOption(document.drop_list.City,"Rajkot", "Rajkot");
	addOption(document.drop_list.City,"Ranchi", "Ranchi");

	addOption(document.drop_list.City,"Shimla", "Shimla");
	addOption(document.drop_list.City,"Srinagar", "Srinagar");
	addOption(document.drop_list.City,"Surat", "Surat");

	addOption(document.drop_list.City,"Tirupati", "Tirupati");
	addOption(document.drop_list.City,"Trivandrum", "Trivandrum");
	addOption(document.drop_list.City,"Vadodara / Baroda", "Vadodara / Baroda");
	addOption(document.drop_list.City,"Vasco Da Gama", "Vasco Da Gama");

	addOption(document.drop_list.City,"Vijayawada", "Vijayawada");
	addOption(document.drop_list.City,"Visakhapatnam", "Visakhapatnam");
	addOption(document.drop_list.City,"Warangal", "Warangal");

	}

	if(document.drop_list.Country.value == 'Italy'){
	addOption(document.drop_list.City,"Rome", "Rome");
	addOption(document.drop_list.City,"Alghero", "Alghero");
	addOption(document.drop_list.City,"Ancona", "Ancona");
	addOption(document.drop_list.City,"Bari", "Bari");
	addOption(document.drop_list.City,"Bologna", "Bologna");
	addOption(document.drop_list.City,"Brindisi", "Brindisi");
	addOption(document.drop_list.City,"Catania", "Catania");
	addOption(document.drop_list.City,"Elba Island", "Elba Island");
	addOption(document.drop_list.City,"Florence", "Florence");
	addOption(document.drop_list.City,"Lamezia Terme", "Lamezia Terme");
	addOption(document.drop_list.City,"Milan", "Milan");
	addOption(document.drop_list.City,"Naples Capodichno", "Naples Capodichno");
	addOption(document.drop_list.City,"Palermo", "Palermo");

	}

	if(document.drop_list.Country.value == 'Japan'){
	addOption(document.drop_list.City,"Tokyo", "Tokyo");
	}

	if(document.drop_list.Country.value == 'Kenya'){
	addOption(document.drop_list.City,"Nairobi", "Nairobi");
	}

	if(document.drop_list.Country.value == 'Lebanon'){
	addOption(document.drop_list.City,"Beirut", "Beirut");
	}

	if(document.drop_list.Country.value == 'Malaysia'){
	addOption(document.drop_list.City,"Nairobi", "Nairobi");
	}

	if(document.drop_list.Country.value == 'Mexico'){
	addOption(document.drop_list.City,"Mexico City", "Mexico City");
	}

	if(document.drop_list.Country.value == 'New Zealand'){
	addOption(document.drop_list.City,"Auckland", "Auckland");
	addOption(document.drop_list.City,"Christchurch", "Christchurch");
	addOption(document.drop_list.City,"Wellington", "Wellington");


	}

	if(document.drop_list.Country.value == 'Oman'){
	addOption(document.drop_list.City,"Muscat", "Muscat");
	}

	if(document.drop_list.Country.value == 'Pakistan'){
	addOption(document.drop_list.City,"Islamabad", "Islamabad");
	addOption(document.drop_list.City,"Karachi", "Karachi");
	addOption(document.drop_list.City,"Lahore", "Lahore");
	addOption(document.drop_list.City,"Multan", "Multan");
	}

	if(document.drop_list.Country.value == 'Qatar'){
	addOption(document.drop_list.City,"Doha", "Doha");
	}


	if(document.drop_list.Country.value == 'Russia'){
	addOption(document.drop_list.City,"Moscow", "Moscow");
	}

	if(document.drop_list.Country.value == 'Saudi Arabia'){
	addOption(document.drop_list.City,"Riyadh", "Riyadh");
	}

	if(document.drop_list.Country.value == 'Singapore'){
	addOption(document.drop_list.City,"Singapore", "Singapore");
	}

	if(document.drop_list.Country.value == 'South Africa'){
	addOption(document.drop_list.City,"Bloemfontein ", "Bloemfontein ");
	addOption(document.drop_list.City,"Cape Town", "Cape Town");
	addOption(document.drop_list.City,"Johannesburg", "Johannesburg");

	}

	if(document.drop_list.Country.value == 'Sri Lanka'){
	addOption(document.drop_list.City,"Colombo", "Colombo");
	addOption(document.drop_list.City,"Kotte", "Kotte");
	}

	if(document.drop_list.Country.value == 'Switzerland'){
	addOption(document.drop_list.City,"Bern", "Bern");
	addOption(document.drop_list.City,"Basel", "Basel");
	addOption(document.drop_list.City,"Basel Mulhouse", "Basel Mulhouse");
	addOption(document.drop_list.City,"Geneva", "Geneva");
	addOption(document.drop_list.City,"Lugano", "Lugano");
	addOption(document.drop_list.City,"Sion", "Sion");
	addOption(document.drop_list.City,"Zurich", "Zurich");

	}

	if(document.drop_list.Country.value == 'Thailand'){
	addOption(document.drop_list.City,"Bangkok", "Bangkok");
	}

	if(document.drop_list.Country.value == 'UAE'){
	addOption(document.drop_list.City,"Abu Dhabi", "Abu Dhabi");
	addOption(document.drop_list.City,"Dubai", "Dubai");
	addOption(document.drop_list.City,"Sharjah", "Sharjah");
	}

	if(document.drop_list.Country.value == 'UK'){
	addOption(document.drop_list.City,"Aberdeen", "Aberdeen");
	addOption(document.drop_list.City,"Belfast", "Belfast");
	addOption(document.drop_list.City,"Blackpool", "Blackpool");
	addOption(document.drop_list.City,"Bristol", "Bristol");
	addOption(document.drop_list.City,"Cambridge", "Cambridge");
	addOption(document.drop_list.City,"Cardiff", "Cardiff");
	addOption(document.drop_list.City,"City of London", "City of London");
	addOption(document.drop_list.City,"Christchurch, Dorset", "Christchurch, Dorset");
	addOption(document.drop_list.City,"Darlington", "Darlington");
	addOption(document.drop_list.City,"Doncaster", "Doncaster");
	addOption(document.drop_list.City,"Edinburgh", "Edinburgh");
	addOption(document.drop_list.City,"Guernsey", "Guernsey");
	addOption(document.drop_list.City,"Glasgow", "Glasgow");
	addOption(document.drop_list.City,"Inverness", "Inverness");
	addOption(document.drop_list.City,"Jersey", "Jersey");
	addOption(document.drop_list.City,"Liverpool", "Liverpool");
	addOption(document.drop_list.City,"Manchester", "Manchester");

	addOption(document.drop_list.City,"London", "London");
	addOption(document.drop_list.City,"Norwich", "Norwich");
	addOption(document.drop_list.City,"Newquay", "Newquay");

	addOption(document.drop_list.City,"Southampton", "Southampton");

	}

	if(document.drop_list.Country.value == 'US'){
	addOption(document.drop_list.City,"Chicago", "Chicago");
	addOption(document.drop_list.City,"Los Angeles", "Los Angeles");
	addOption(document.drop_list.City,"New York City", "New York City");
	addOption(document.drop_list.City,"Washington D.C.", "Washington D.C.");
	}


	if(document.drop_list.Country.value == 'Vietnam'){
	addOption(document.drop_list.City,"Hanoi", "Hanoi");
	}

	if(document.drop_list.Country.value == 'Yemen'){
	addOption(document.drop_list.City,"Sanaa", "Sanaa");
	}

	if(document.drop_list.Country.value == 'Zimbabwe'){
	addOption(document.drop_list.City,"Harare", "Harare");
	}
	
	else{
		return;
	}
}
function ValidateSelect()
{
formreset(false);
var noalpha = /^[a-zA-Z]*$/;
var flag = 0;
var red = "Required";
var red = red.fontsize(2);
var report = red.fontcolor("Red");

var cod = "You must enter the letters you see.";
var cod = cod.fontsize(2);
var match = cod.fontcolor("red");

var cnd = "Please accept terms and conditions to proceed...";
var cnd = cnd.fontsize(2);
var condns = cnd.fontcolor("red");


var f3 = "CountryName is required";
var f3 = f3.fontsize(2);
var cnty = f3.fontcolor("red");

var f4 = "CityName is Required ";
var f4 = f4.fontsize(2);
var cty = f4.fontcolor("red");

var f4 = "Please enter your mobile number!!.";
var f4 = f4.fontsize(2);
var mob = f4.fontcolor("red");

var f5 = "Mobile Number is incorrect!!.";
var f5 = f4.fontsize(2);
var mobin = f4.fontcolor("red");

var f6 = "Please enter the code that you see aside!!";;
var f6 = f6.fontsize(2);
var cod = f6.fontcolor("red");

//var enter = "Letters must match";
document.getElementById("cname").innerHTML = "";
//Mobile no validation
if(document.drop_list.mobileno.value == "" || noalpha.test(document.drop_list.mobileno.value))
{
document.getElementById("mobileno_label").innerHTML = mob;
//alert("Please Enetr your mobile no followed by the country code");
document.drop_list.mobileno.focus();
return false;
}
else if(document.drop_list.mobileno.value.length <9)
{
document.getElementById("mobileno_label").innerHTML = mobin;
//alert("Please Enetr your mobile no followed by the country code");
document.drop_list.mobileno.focus();
return false;
}

//Check for country(country should not be blank)
else if (document.drop_list.Country.value == 0) 
{
document.getElementById("cname").innerHTML = cnty;
document.drop_list.Country.focus();
return false;
}

//Check For City Value(city value should not be blank)
else if (document.drop_list.City.value == 0)
{
document.getElementById("ctyname").innerHTML = cty;
document.drop_list.City.focus();
return false;
}

//Check for Verificaton code(Verificaton code should not be blank)
else if (document.drop_list.vercode.value == "")
{
	
document.getElementById("equal").innerHTML = cod;
document.drop_list.vercode.focus();
return false;
}

//Check for Verificaton code
else if (document.getElementById('vercode1').innerHTML != document.drop_list.vercode.value) 
{
//alert(hidstr.value);
document.getElementById("equal").innerHTML = match;
document.drop_list.vercode.focus();
return false;
}

//Check for the Checkbox
//alert(document.drop_list.tac_checkbox.checked);
else if (document.drop_list.tac_checkbox.checked == false)
{
document.getElementById("terms").innerHTML = condns;
//document.drop_list.terms.focus();
return false;
}

}

 
//Form Validation Begins Here

function createRequestObject() {
//    var xmlhttp;
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
 }
/*    
    if (window.XMLHttpRequest)
	{
	  	xmlhttp=new XMLHttpRequest();
	}
	// code for IE
	else if (window.ActiveXObject)
	  {
	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	  
	if (typeof(xmlhttp) == 'undefined' || xmlhttp == null)
	  {
		  alert("Your browser does not support XMLHTTP.");
	  }
*/	  
/*    
    if (navigator.appName == "Microsoft Internet Explorer") {
	
        ro = new ActiveXObject("Microsoft.XMLHTTP");
		
    } else {
	
              ro = new XMLHttpRequest();
    }
*/	
    return xmlHttp;
}
var http = createRequestObject();


function GetCode()
{
  	
	  http.open('GET', 'http://www.icontactbook.com/RandomString.php',true);
	//http.open('GET', 'http://localhost:8080/icontactbook/RandomString.php',true);
	http.onreadystatechange = GetCodehandleResponse;
	http.send(null);
}

// Function handles the response from the PHP script.
function GetCodehandleResponse() {
	// If everything's okay:
	if(http.readyState == 4){
		// Assign the returned value to the document object.
		document.getElementById('vercode1').innerHTML = http.responseText;
	}
}

//Function for checking the password
function CheckPassword(confirm,password)
{
        
	    var dblue = "Sounds Good";
		var dblue = dblue.fontsize(3);
		var invest = dblue.fontcolor("darkblue");
		var red = "*Enter the same Password Twice.";
		var red = red.fontsize(2);
        var compare = red.fontcolor("Red");
		
		
		if(document.drop_list.confirm.value == "" || (document.drop_list.password.value != document.drop_list.confirm.value))
		{
			document.getElementById('checkmatching').innerHTML = compare;
		//document.getElementById("conf").innerHTML = compare;
		//document.drop_list.confirm.focus();
			return false;
		}
	 	else 
		{
			document.getElementById('checkmatching').innerHTML = invest;
		}
	
}
function CheckLength(password)
{
        
	    var dblue = "Sounds Good";
		var dblue = dblue.fontsize(3);
		var invest = dblue.fontcolor("darkblue");
		var red = "*Please enter the password of minimum 6 character.";
		var red = red.fontsize(2);
        var compare = red.fontcolor("Red");
		
		var pwdlength = password.length;
		
		if(document.drop_list.password.value < 6 )
		{
			
			document.getElementById('password_label').innerHTML = compare;
		//document.getElementById("conf").innerHTML = compare;
		//document.drop_list.confirm.focus();
			return false;
		}
	 	else 
		{
			document.getElementById('password_label').innerHTML = invest;
		}
	
}
/*
// Need to make an object of XMLHttpRequest Type.
function createRequestObject() {
    var ro;
    if (navigator.appName == "Microsoft Internet Explorer") {
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        ro = new XMLHttpRequest();
    }
    return ro;
}
var http = createRequestObject();
*/




//Ajax Request for Mobileno
function SendMobileNo(mobileno) {
    // Call the script.
	// Use the GET method.
	
    http.open('GET', 'http://www.icontactbook.com/Mobileno.php?mobileno=' + encodeURIComponent(mobileno));
    // http.open('GET', 'http://localhost:8080/icontactbook/Mobileno.php?mobileno=' + encodeURIComponent(mobileno));
    http.onreadystatechange = GethandleResponse;
    http.send(null);
}


//Response for mobileno
function GethandleResponse() {
	// If everything's okay:
    if(http.readyState == 4)
	{
    	// Assign the returned value to the document object.
        document.getElementById('mob').innerHTML = http.responseText;
	}
}


	
function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}
function formreset(frombutton){
	
	if(frombutton){
	    	window.location = "http://www.icontactbook.com/register.htm";
	}
	else
	{
		document.getElementById('mobileno_label').innerHTML = "";
		document.getElementById("ctyname").innerHTML = "";
		document.getElementById('equal').innerHTML = "";	 
		document.getElementById("terms").innerHTML = "";
	}
	return false;
}


