function checkSearchForm() {
	var t = $('frmSearch').txtSearch.value.trim();
	if (t != '') doSearch();
	return false;
}

function doSearch() {
	var t = $('frmSearch').txtSearch.value.trim();
	if (t != '') {
		window.location.href='/'+vLang+'/search/'+t;
	}
}

function showGallery(id, pid) {
	window.open("/"+vLang+"/gallery/"+id+","+pid, 'gallery', 'resizable=1,scrollbars=1,width=600,height=400');
}

function showGMap(id) {
	window.open("/"+vLang+"/gmap/"+id, 'gmap', 'resizable=1,scrollbars=1,width=600,height=400');
}

function gotoRegion(value) {
	if (value != '') {
		window.location.href = value;
	}
}


var IceFeaturedList = new Class({
	initialize: function(el) {
		this.lastId = 0;
		el.getElements('ul li').each(function(e) {
			var id = parseInt(e.className.split('-').getLast());
			if (this.lastId == 0) this.lastId = id;
			e.addEvent('mouseenter', function() {
				e.addClass('hover');
				var im = el.getElement('img.img-'+this.lastId);
				if (im != null) im.addClass('hidden');
				el.getElement('div.inf-'+this.lastId).addClass('hidden');
				el.getElement('img.img-'+id).removeClass('hidden');
				el.getElement('div.inf-'+id).removeClass('hidden');
				this.lastId = id;
			}.bind(this));
			e.addEvent('mouseleave', function() {
				e.removeClass('hover');
			}.bind(this));
		}.bind(this));
	}
});
