	/*
	* Author: Alex Baskov, 2009
	*/

	////
	// very simple way 
	//
	function showTabActors(tabID)
	{
		var tabID = tabID || 0;
		if (!(tabID == 1 || tabID == 2)) return false;

		var tabLink1 = document.getElementById('tab_link_1') || null;
		var tabLink2 = document.getElementById('tab_link_2') || null;
		var tabContent1 = document.getElementById('tab_1') || null;
		var tabContent2 = document.getElementById('tab_2') || null;
		
		if (tabLink1 && tabLink2 && tabContent1 && tabContent2)
		{
			tabLink1.className = (tabID == 1) ? 'tab_link_filter_on' : 'tab_link_filter';
			tabLink2.className = (tabID == 1) ? 'tab_link_shortlist' : 'tab_link_shortlist_on';
			tabContent1.style.display = (tabID == 1) ? 'block' : 'none';
			tabContent2.style.display = (tabID == 1) ? 'none' : 'block';
		}
		else
		{
			alert('Error. Some elements were not found.');
			return false;
		}

		return true;
	} // /showTabActors()


	function trim(str, chars) {
		return ltrim(rtrim(str, chars), chars);
	}
	 
	function ltrim(str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
	}
	 
	function rtrim(str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
	}