function nothing()
{
	return;
}

String.prototype.trim = function () {
	return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

function gid(elmID)
{
	return document.getElementById(elmID);
}

function submenu(grpID)
{
	for (var i=1; i < submenus.length; i++)
	{
		if (i == grpID)
		{
			for (var t=0; t < submenus[i].length; t++)
			{
				if (sbmState[grpID] == 0)
				{
					document.getElementById(submenus[i][t]).style.display = "";
				}
				else
				{
					document.getElementById(submenus[i][t]).style.display = "none";
				}
			}
			sbmState[grpID] = (sbmState[grpID] == 0)?1:0;
			
		}
	}
}

function topmenu(topID)
{
	for(var i = 1; i <= topMenuItems; i++)
	{
		if (i == topID)
		{
			document.getElementById("tm" + i).style.backgroundColor = 'white';
			document.getElementById("tm" + i).style.borderBottom = 'solid 1px white';
		}
		else
		{
			document.getElementById("tm" + i).style.backgroundColor = '#FBFAF8';
			document.getElementById("tm" + i).style.borderBottom = 'solid 1px #D2D2D2';
		}
	}
}

function viewCountry(selectElm)
{
	cid = selectElm.value;
	si = selectElm.selectedIndex;
	cname = selectElm.options[si].text;
	
	if(cname)
	{
		cname = cname.toLowerCase().replace(/\s/,"-").replace(/[^a-zA-Z0-9-]/ig,"");
	}

	window.location.href = '/client/search-by-country/' + cid + '-' + cname + '.html';
}

function searchArchive() {
	
	if (!jQuery.trim($('#keywords').val())) {
		alert("Enter keywords for search");
		return false;
	}
	return true;
}

function only_one(elm)
{
	if (elm.value != '')
	{
		if (elm.id == "country")
		{
			gid("region").selectedIndex = '';
		}
		else if (elm.id == "region")
		{
			gid("country").selectedIndex = '';
		}
	}
}