	function toggleAll(fieldname,theType)
	{
		var theObj = eval("document.forms[0]."+ fieldname);
		if (theType.checked){
					for(i=0; i<theObj.length; i++)
					{
						theObj[i].checked = true ; 
					}
		} else {

					for(i=0; i<theObj.length; i++)
					{
						theObj[i].checked = false ; 
					}

		}
	}
	
	function toggleAllCat(rootName,fieldname,theType)
	{
		var theObj = eval("document.forms[0]."+ fieldname);
		if (theType.checked){
					for(i=0; i<theObj.length; i++)
					{
						if (theObj[i].id.indexOf(rootName) >= 0)
							theObj[i].checked = true ; 
					}
		} else {

					for(i=0; i<theObj.length; i++)
					{
						if (theObj[i].id.indexOf(rootName) >= 0)
							theObj[i].checked = false ; 
					}

		}
	}
