<!--
function SearchCatCng(c)
{
	var e = document.getElementById(c.id+'L');
	if(c.checked)
	{
		e.style.fontWeight = "bold";
		e.style.color = "#000000";
	}
	else
	{
		e.style.fontWeight = "normal";
		e.style.color = "#333333";
	}
	
	getResultsCount();
}

function getResultsCount()
{	
	var catList = '';
	var countyList = '';
	
	for (var i=0;i<document.searchForm.elements.length;i++)
	{
    	var e = document.searchForm.elements[i];
    	if (e.type == 'checkbox' && e.name.substr(0, 8) == 'category' && e.checked)
		{
			catList += e.value + ",";
    	}
  	}
	if(catList != '')
		catList = catList.substr(0, catList.length-1);
		
	if(document.searchForm.county1.value != '')
		countyList += document.searchForm.county1.value + ",";
	if(document.searchForm.county2.value != '')
		countyList += document.searchForm.county2.value + ",";
	if(document.searchForm.county3.value != '')
		countyList += document.searchForm.county3.value + ",";
	if(countyList != '')
		countyList = countyList.substr(0, countyList.length-1);
	
	$("SearchAjaxCountPreview").innerHTML = 'Searching...';
	
	var url = "ajax/countsearchresults.php?cats=" + catList + "&counties=" + countyList + "&r=" + Math.random();
	$("SearchAjaxCountPreview").load(url);
}

function filterCatCng(c)
{
	var e = document.getElementById(c.id+'L');
	if(c.checked)
	{
		e.style.fontWeight = "bold";
		e.style.color = "#000000";
	}
	else
	{
		e.style.fontWeight = "normal";
		e.style.color = "#333333";
	}
}

function preloadImages()
{
	var imSrc = new Array("menu_search_grey", "menu_members_grey", "menu_articles_grey", "menu_links_grey", "menu_about_grey");
	var im;
	for(var i = 0; i < imSrc.length; i++)
	{
		im = new Image();
		im.src = "/images/"+imSrc[i]+".jpg";
	}
}

preloadImages();
-->
