function searchMain()
{
	return search(1, document.getElementById('tbmSrearchText').value);
}

function search(pageNum, txt)
{
	var searchTxt = (txt == null) ? document.getElementById('tbSearchText').value : txt;

	if ((searchTxt != '') && (searchTxt.length > 1))
	{
		var sType;

		if (txt == null)
		{
			var rbtns = document.getElementsByName('searchType');
			sType = (rbtns[0].checked ? rbtns[0].value : rbtns[1].value);
		}
		else
			sType = 'and';

		var p = document.location.pathname;
//		p = p.substr(0, p.lastIndexOf('/') + 1) + 'support.aspx';
		p = '/support.aspx';
		document.location.href = document.location.protocol + '//' + document.location.host + p + '?q=' + searchTxt + '&t='
			+ sType + '&p=' + pageNum;
	}
}

