	

//***********************************************************************************************			 

 		//allbox is the name of the check box which allows to select all or deselect all	
		//checkBoxName is the common name of all checkboxes to be changed when allbox is changed
		//according to its value	
		//Onclick of the allbox we call this function
		function CheckAll(formObj,allbox,checkBoxName)
			{
			for (var i=0;i<formObj.elements.length;i++)
				{
					var e = formObj.elements[i];
					if ((e.name != allbox) && (e.type=='checkbox') && (e.name == checkBoxName) )
					e.checked = formObj.elements[allbox].checked;
				}
			}
		
		//onClick of the checkboxs we call this	
		//checkBoxName is the common name of all checkboxes to be changed when allbox is changed
		function CheckCheckAll(formObj,allbox,checkBoxName)
			{
				var TotalBoxes = 0;
				var TotalOn = 0;
				for (var i=0;i<formObj.elements.length;i++)
					{
						var e = formObj.elements[i];
						if ((e.name != allbox) && (e.type=='checkbox') && (e.name == checkBoxName) )
							{
								TotalBoxes++;
								if (e.checked)
									{
										TotalOn++;
									}
							}
					}
				if (TotalBoxes==TotalOn)
						{formObj.elements[allbox].checked=true;}
				else
						{formObj.elements[allbox].checked=false;}
			 }

//***************************************************************************************************
		//allbox is the name of the check box which allows to select all or deselect all	
		//according to its value	
		//Onclick of the allbox we call this function
		function OLD_CheckAll(formObj,allbox)
			{
			for (var i=0;i<formObj.elements.length;i++)
				{
					var e = formObj.elements[i];
					if ((e.name != allbox) && (e.type=='checkbox'))
					e.checked = formObj.elements[allbox].checked;
				}
			}
		
		//onClick of the chckboxs we call this	
		function OLD_CheckCheckAll(formObj,allbox)
			{
				var TotalBoxes = 0;
				var TotalOn = 0;
				for (var i=0;i<formObj.elements.length;i++)
					{
						var e = formObj.elements[i];
						if ((e.name != allbox) && (e.type=='checkbox'))
							{
								TotalBoxes++;
								if (e.checked)
									{
										TotalOn++;
									}
							}
					}
				if (TotalBoxes==TotalOn)
						{formObj.elements[allbox].checked=true;}
				else
						{formObj.elements[allbox].checked=false;}
			 }


