function checkUnCheckAllForDelete(theElement,aantal) {
	
	var status = theElement.checked;
	for(var i = 0;i<aantal;i++)
	{
		try
		{
			var obj = document.getElementById("chk_" + i);
			
			obj.checked = status;	
					
		}
		catch(ex)
		{
					
		}
	}	
}

function checkUnCheckAll(theElement,what) {
	
	
	if(what=="tekst")
	{
		var what2 = new String("fonts");
		var what3 = new String("fontSizes");
	}
	else
	{
		var what2 = what;
		var what3 = what;
	}
	
	

	var oMain = new String("chkTop_" + what);
	var oChkMain = document.getElementById(oMain);
	var oChecked = oChkMain.checked;

	var theForm = theElement.form, z = 0;
	
				
				
	for(z=0; z<theForm.length;z++)
	{
		if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
			//theForm[z].checked = theElement.checked;
			var oName = new String(theForm[z].name);
			
			if((oName == what + "[]")||(oName == what2 + "[]")||(oName == what3 + "[]"))
			{
				
				theForm[z].checked = oChecked;
				//alert(theForm[z].name);
			}
		}
	}
}



