top.s_checked = '/images/check.gif';
top.s_nochecked = '/images/no_check.gif';
top.s_empty = '/images/spacer.gif';
top.hotel_img_path = '/files/resized/193/140/FFFFFF/';
top.hotel_img_ext = '.jpg';

function c_status()
{
	if (arguments[0] == 1)
	{
		var tt = document.getElementById('n_' + arguments[1]);
		var qq = document.getElementById('search_numbers_' + arguments[1]);
	}
	else if (arguments[0] == 2)
	{
		var tt = document.getElementById('sl_' + arguments[1]);
		var qq = document.getElementById('search_numbers_ls_' + arguments[1]);
	}

	if (qq.value == '1')
	{
		qq.value = '2';
		tt.src = top.s_nochecked;
	}
	else if (qq.value == '2')
	{
		tt.src = top.s_empty;
		qq.value = '';
	}
	else
	{
		tt.src = top.s_checked;
		qq.value = '1';
	}
}

function check_a_search()
{
	var t1 = document.getElementById('a_s_country');
	var t2 = document.getElementById('a_s_city');
	var t3 = document.getElementById('a_s_location');
	var t4 = document.getElementById('a_s_tube');
	var t5 = document.getElementById('a_s_rail');

	var qq = arguments[0];

//			alert(t2.value);
	eval("var qq1 = (t" + qq + ".value&&t" + qq + ".value!=''&&t" + qq + ".value!=0&&t" + qq + ".value!=-1?qq:qq-1);");

//			var qq = (t1.value>0?1 + (t2.value?1 + (t3.value?1 + (t4.value?1 + (t5.value?1:0):0):0):0):0);

	t2.disabled = (qq1>0?false:true);
	t3.disabled = (qq1>1?false:true);
	t4.disabled = (qq1>2?false:true);
	t5.disabled = (qq1>2?false:true);

	t2.selectedIndex = (qq1>0?t2.selectedIndex:-1);
	t3.selectedIndex = (qq1>1?t3.selectedIndex:-1);
	t4.selectedIndex = (qq1>2?t4.selectedIndex:-1);
	t5.selectedIndex = (qq1>2?t5.selectedIndex:-1);

//			alert(qq);
	if (qq == qq1)
	{
		if ((qq == 1) && (t1.value != '') && (t1.value != -1))
			t2.fill();
		else if ((qq == 2) && (t2.value != '') && (t2.value != 0))
			t3.fill();
		else if ((qq == 3) && (t3.value != '') && (t3.value != 0))
		{
			t4.fill();
			t5.fill();
		}
	}
}

function rotate_img()
{
	var el = document.getElementById(arguments[0]);

	if (el)
	{
		var at = el.getAttribute('srcs');
		var cu = el.getAttribute('current');
		var pNode = el.parentNode;

		at1 = at.split(',');
		if (arguments[1] == 1)
		{
			if (!cu)
				cu = 2;
			else if (cu == at1.length)
				cu = 1;
			else
				cu++;
		}
		else
		{
			if (!cu || (cu == 1))
				cu = at1.length;
			else
				cu--;
		}

		el.setAttribute('current', cu);

		var im = document.createElement('IMG');
		im.style.display = 'none';
		im.setAttribute('srcs', at);
		im.setAttribute('current', cu);
		im.onload = function ()
		{
			im.id = el.id;
			im.style.display = '';
			pNode.innerHTML = '';
			pNode.appendChild(im);
//			alert('Im Loaded');
		}
		var tt = document.createTextNode('Loading...');
		pNode.innerHTML = '';
		pNode.appendChild(tt);
		im.src = top.hotel_img_path + at1[cu-1] + top.hotel_img_ext;
		try { pNode.removeChild(el); } catch (e) {}

		pNode.appendChild(im);
//		alert(at1[cu-1]);
	}
}

function bookmarkURL(title)
{
	if (title == '')
		title = document.title;

	try{
		window.external.AddFavorite(document.location.href,title);
	}
	catch (e)
	{
		try{
			window.sidebar.addPanel(title, document.location.href,"");
		}
		catch(e1){}
	}
}
