



function displayDiv(cb,element){
	if(document.getElementById(element) && document.getElementById(cb)){
		if(document.getElementById(cb).checked){
			document.getElementById(element).style.display="";
			}
		else {
			document.getElementById(element).style.display="none";
			}
		}
		
	}
	
function decimalToCurrencyString(amount){
amount=parseFloat(amount);
if (amount==0){return "0.00";}
amount = Math.round(amount*100).toString();
amount = amount.substring(0,amount.length-2)+'.'+
amount.substring(amount.length-2,amount.length);
return amount;
}

function SetAllCheckBoxesAdd(c)
{
	if (c.checked){
	CheckValue=true;
	}
	else {
	CheckValue= false;	
	}
	
	for(var i = 0; i <= 100; i++){
		ido="addproduct"+i;
		if(document.getElementById(ido)){document.getElementById(ido).checked = CheckValue}	
	}
}

