function SearchProduct()
{
	var select;
	var input;
	var url;
	
	// get id city
	select = document.getElementById('sltcities');
	var idCity = select.options[select.selectedIndex].value;
	
	// get id category
	select = document.getElementById('header_HotelCategories');
	var idCategory = select.options[select.selectedIndex].value;
	
	// get id theme
	select = document.getElementById('header_HotelThemes');
	var idTheme = select.options[select.selectedIndex].value;
	
	// get keyword
	input = document.getElementById('hotelKeyword');
	var keyword = input.value;
	
	// get from date
	input = document.getElementById('hotelFromDate');
	var fromDate = input.value;
	
	
	input = document.getElementById('hotelDuration');
	var duration = input.value;

	input = document.getElementById('header_Detinations');
	idDestination = input.value;

	// calculate to date
	var toDate = AddDays(fromDate, duration);

	// compose url
	url = applicationPath + "/cr.resa/ui/aba/Hotel_Search.aspx?"
		+ "iddestination=" + idDestination
		+ "&idcity=" + idCity 
		+ "&idcategory=" + idCategory 
		+ "&fromdate=" + fromDate 
		+ "&keyword=" + keyword 
		+ "&idtheme=" + idTheme 
		+ "&todate=" + toDate 
		+ "&curr=1&ilng=1&user=1063";
	
	location.href = url;
}



function addToNewsletter()
{
	var input = document.getElementById('newsletter');
	var email = input.value;
	if (IsValidMail(email))
	{
		var url = applicationPath + "/common/newsletter.aspx?m=0&email=" + email 
				+ "&curr=1&ilng=1&user=1063";
				
		location.href = url;
	}	
	
	return false;
}

