	function ToggleChecks(objChkBox)
		{
			var arrCheckBoxes = document.getElementsByTagName("input");
			for(i=0; i< arrCheckBoxes.length-1;i++)
			if (arrCheckBoxes(i).type == 'checkbox' && arrCheckBoxes(i).disabled == false)
			arrCheckBoxes(i).checked = objChkBox.checked;
		}
		function CountSelectedCheckBoxes()
		{
			var iCheck=0;
			var arrCheckBoxes = document.getElementsByTagName("input");
			for(i=0; i< arrCheckBoxes.length-1;i++)
			{
			if (arrCheckBoxes(i).type == 'checkbox' && arrCheckBoxes(i).checked == true)
			iCheck = iCheck + 1;
			}
			return iCheck;
						
		}
		function CountChecked()
		{
				var iCount=0;
				iCount=CountSelectedCheckBoxes();
				if (iCount <= 2 )
				{
				alert('please select more than two products');
				return(false);
				}
				return (true);
		}
		
		function CountSOTMChecked(check)
		{ 
				var iCount=0;
				iCount=CountSelectedCheckBoxes();
				if (iCount != check )
				{
				alert('Please select only ' + check + ' products');
				return(false);
				}
				return (true);
		}
		
				function ToggleChecks(objChkBox)
		{
			var arrCheckBoxes = document.getElementsByTagName("input");
			for(i=0; i< arrCheckBoxes.length-1;i++)
			if (arrCheckBoxes(i).type == 'checkbox' && arrCheckBoxes(i).disabled == false)
			arrCheckBoxes(i).checked = objChkBox.checked;
		}
		
		function TotalCheckBoxes()
		{
			var iCountAll=0;
			var arrCheckBoxes = document.getElementsByTagName("input");
			for(i=0; i< arrCheckBoxes.length-1;i++)
			{
				if (arrCheckBoxes(i).type == 'checkbox')
				iCountAll = iCountAll + 1;
			}
			//alert("TotalCheckBoxes=" + iCountAll);
			return iCountAll;
		}
				  	

		
		function CheckMainCheckBox()
		{		
			var arrCheckBoxes = document.getElementsByTagName("input");
			if (arrCheckBoxes("rptSteakOfMonth:_ctl0:chkSOTM_ALL").type == 'checkbox' && arrCheckBoxes("rptSteakOfMonth:_ctl0:chkSOTM_ALL").checked == true)
			   return true;
			else
			{
				return false;
			}
		}
		
		function CheckTotalValues()
		{
			var i=0,j=0,iTotal=0,iSelected=0;
			var bCheckBox = false;
			bCheckBox = CheckMainCheckBox();
			iTotal = TotalCheckBoxes();
			iSelected = CountSelectedCheckBoxes();
			if (iTotal == iSelected)
			{
				i = iSelected - 1 ;
			}
			else
			{
			if ( (bCheckBox == true ))
			{
				i =  iSelected - 2 ;
				bCheckBox = false;
			}
			else
				i = iSelected;	
		    }

			j = document.forms(0).txtSelectedItems.value ;
			alert(j);
			
			if ( i != j )
			{ 
			var check;
				check = "please check any " + j + " checkboxes"
				alert(check); return false;
			}
		
		}
		
		function doMultiple() {
		  
            document.getElementById('multiple_row').style.display=''; 
            document.getElementById('multiple_link').style.display='none'; 
            document.getElementById('normal_shipping').style.display='none'; 
          
            var frm = document.forms['checkout_address']; 
            var step = eval(frm.step.value);
            
            if (step == 2) document.getElementsByName('action')[0].value="process";
            else document.getElementsByName('action')[0].value="multiple";
            frm.shipping.value="multiple_multiple";
		  		  
		}		
		function doSingle() {
		  
            document.getElementById('multiple_row').style.display='none'; 
            document.getElementById('multiple_link').style.display=''; 
            document.getElementById('normal_shipping').style.display=''; 
          
            var frm = document.forms['checkout_address']; 
            document.getElementsByName('action')[0].value="process";
            frm.shipping.value="table_table";
		  		  
		}