
<!--
function Calc()

{
   myRef = document.frmMain;
   myPayRef = document.frmPayPal;

		if(myRef.dvd_title.value == "")
 			{
			  alert('Please enter a title for your DVD');
			  myRef.dvd_title.focus();
			  return false;
   			}
			
			if(myRef.Photos_Qty.value + myRef.Digi_Qty.value < 1)
 			{
			  alert('Please enter a Quantity for your order');
			  myRef.Photos_Qty.focus();
			  return false;
   			}

   var DvdSubTotal
   DvdSubTotal=0;
   //calculate each item
	   if(myRef.Photos_Qty.value > 0)
   {
	   
	   if(myRef.Photos_Qty.value < 301)
	   	{
			DvdSubTotal = myRef.Photos_Qty.value * .50;
		}
		else
		{
			DvdSubTotal = myRef.Photos_Qty.value * .40;
		}
		myRef.Photos_total.value  = DvdSubTotal;
	   	document.getElementById('txtPhotos_total').innerHTML = CurrencyFormatted(DvdSubTotal);
   }
   else {myRef.Photos_total.value = 0;
   		document.getElementById('txtphotos_total').innerHTML = 0;}
		
			   if(myRef.Digi_Qty.value > 0)
   {
		DvdSubTotal = myRef.Digi_Qty.value * .25;
		myRef.Digi_total.value  = DvdSubTotal;
	   	document.getElementById('txtDigi_total').innerHTML = CurrencyFormatted(DvdSubTotal);
   }
   else {myRef.Digi_total.value = 0;
   		document.getElementById('txtDigi_total').innerHTML = 0;}
   
  
//calc order total

var OrderTotal
ExtraCopies = myRef.dvd_qty.value * 7.50;
OrderTotal = parseFloat(myRef.Photos_total.value) + parseFloat(myRef.Digi_total.value) + parseFloat(ExtraCopies);
//OrderTotal = CurrencyFormatted(OrderTotal);
myRef.OrderTotal.value = CurrencyFormatted(OrderTotal);
myPayRef.amount.value = CurrencyFormatted(OrderTotal);
myPayRef.item_number.value = myRef.OrderNumber.value;
document.getElementById('txtOrderTotal').innerHTML = CurrencyFormatted(OrderTotal);

 	document.getElementById('orderterms').style.display='';
	 return true;


}

function CurrencyFormatted(amount)
{
	var i = parseFloat(amount);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	return s;
}

function TSandCS()
{
	//enable the print button
  	myRef = document.frmMain;
	myRef.PrintButton.disabled=false;
}

-->