function splitcity(city, county) {	
		
	var cityarray = city.split(",");
	city = cityarray[0];
	var countyarray = county.split(",");
	county = countyarray[0];		
	document.location.href = document.Areas.path.value+document.Areas.cboCountry.options[document.Areas.cboCountry.selectedIndex].value+'/'+county+'/'+city+'/'+document.Areas.cboService.options[document.Areas.cboService.selectedIndex].value+'/Results/'
}


function showareapage(country, city, service, page, county, citypage) {	
					
	if (city != 'All_Cities') {
	
		var cityarray = city.split(",");
		city = cityarray[0];
		var citypage = cityarray[1].toLowerCase();
		var countyarray = county.split(",");
		county = countyarray[0];
	
		if (service != 'All_Services') {
			document.location.href = document.Areas.path.value+country+'/'+county+'/'+city+'/'+service+'/Results/'		
		}
		else {
			if (citypage == 'true') {								
				document.location.href=document.Areas.path.value+country+'/'+county+'/'+city+'/'+service;							
			}
			else {
				document.location.href=document.Areas.path.value+country+'/'+county+'/'+city+'/'+service+'/Results';
			}
		}
	
	}	
	else {
		var countyarray = county.split(",");
		county = countyarray[0];
		if (service != 'All_Services') {
			document.location.href=document.Areas.path.value+country+'/'+county+'/'+city+'/'+service+'/Results';	
		}
		else {
			document.location.href=document.Areas.path.value+country+'/'+county+'/'+city+'/'+service;	
		}
	}
}


function showregionpage(country, county, service, page) {		
	
	if (county != 'All_Counties') {		
	
		var countyarray = county.split(",");
		county = countyarray[0];
		var countypage = countyarray[1].toLowerCase();
	
		if (service != 'All_Services') {
			document.location.href = document.Areas.path.value+country+'/'+county+'/All_Cities/'+service+'/Results/'
		}	
		else {				
			if (countypage == 'true') {
				document.location.href=document.Areas.path.value+country+'/'+county+'/All_Cities/'+service;
			}
			else {
				document.location.href=document.Areas.path.value+country+'/'+county+'/All_Cities/'+service+'/Results';
			}
		}
	}
	else {	
		if (service != 'All_Services') {
			document.location.href=document.Areas.path.value+country+'/'+county+'/All_Cities/'+service+'/Results';
		}
		else {
			document.location.href=document.Areas.path.value+country+'/'+county+'/All_Cities/'+service;
		}
	}
	
	
	
}


function showservicepage(country, city, service, page, county) {		
	
	var cityarray = city.split(",");	
	city = cityarray[0];
	var citypage = cityarray[1].toLowerCase();
	var countyarray = county.split(",");
	county = countyarray[0];
		
	if (service != 'All_Services') {				
		document.location.href=document.Areas.path.value+country+'/'+county+'/'+city+'/'+service+'/Results/';
	} 
	else {
		if (country == 'All_Countries') {
			document.location.href=document.Areas.path.value+'index.asp';
		}
		else {
			if (citypage == 'true') {	
				document.location.href=document.Areas.path.value+country+'/'+county+'/'+city+'/'+service;
			}
			else {
				document.location.href=document.Areas.path.value+country+'/'+county+'/'+city+'/'+service+'/Results/';				
			}
		}
		
	}
	
}


function showcountrypage(country, city, service, county) {	
	if (country != 'All_Countries') {
		
		/*if (service == 'All_Services') {*/
			document.location.href=document.Areas.path.value+country+'/All_Counties/All_Cities/'+service;			
		/*}*/
	}	
	else {
		if (service == 'All_Services') {
			document.location.href=document.Areas.path.value+'index.asp';
		}
		else {
			document.location.href=document.Areas.path.value+country+'/All_Counties/All_Cities/'+service;
		}
	}
	
		
}


function displayemailcity(country) {
	if (country != '0') {
		document.getElementById('emailcity').style.visibility = 'visible';
	}
	
}

function displayemailcounty(country) {
	if (country != '0') {
		document.getElementById('emailcounty').style.visibility = 'visible';
	}
	
}


function ValidateEmail() {	
	/*var city = "";
	var city_value = " \nSelect atleast One City";		*/
	var county = "";
	var county_value = " \nSelect atleast One Area";		
	var email_value = "";		
	
	/*for (var i=0; i <= document.email.cboCityEmail.options.length-1; i++)
	{
		if (document.email.cboCityEmail.options(i).selected) {
			var city_value = "";
			}
	}*/
	
	for (var i=0; i <= document.email.cboCountyEmail.options.length-1; i++)
	{
		if (document.email.cboCountyEmail.options(i).selected) {
			var county_value = "";
			}
	} 
			
	if (!verif_email(document.email.SEmail.value))
			{
				 email_value = " \nEnter correct Email";
			}					
	
				
	/* if (city_value != "" || email_value != "")
			{
				alert("You must:\n"+city_value + email_value);						  	
				return false;
			} */
			
	if (county_value != "" || email_value != "")
			{
				alert("You must:\n"+county_value + email_value);						  	
				return false;
			}			
}

