window.onload = (function() {
	
	//Project Search Result Show/Hide More
	$("a#projectResultLink").click(function () {
		$("tbody#projectResult").toggle();
		$(this).toggleClass("up");
	$("a#projectResultLink span").toggle();
	});
	
	//Participants Search Result Show/Hide More
	$("a#participantsResultLink").click(function () {
		$("tbody#participantsResult").toggle();
		$(this).toggleClass("up");
	$("a#participantsResultLink span").toggle();
	});
	
	//Raters Search Result Show/Hide More
	$("a#ratersResultLink").click(function () {
		$("tbody#ratersResult").toggle();
		$(this).toggleClass("up");
	$("a#ratersResultLink span").toggle();
	});
	
});


function checkAll(frmItem)
{
	if (frmItem)
	{
		if (frmItem.value)
		{
			frmItem.checked = true;
		}
		else
		{
			for(var x = 0; x < frmItem.length;  x++)
			{
				frmItem[x].checked = true;
			}
		}
	}
		
	getElement('checkAll').style.display = "none";
	getElement('clearAll').style.display = "";
}
	
function clearAll(frmItem)
{
	if (frmItem)
	{
		if (frmItem.value)
		{
			frmItem.checked = false;
		}
		else
		{
			for(var x = 0; x < frmItem.length;  x++)
			{
				frmItem[x].checked = false;
			}
		}
	}
		
	getElement('checkAll').style.display = "";
	getElement('clearAll').style.display = "none";
}
