<!--
var totalLayer 
function findTotalLayer() {
	if (document.getElementById) {
		totalLayer = document.getElementById('total');
	} else if (document.all) {
		totalLayer = document.all.total;
	}
}

function calculateTotal(price) {

  if(isNumber(price)==true) {
    price = (parseFloat(price)*0.05)* 1.08;

    if(price<10.8) {
      if (price<=0) {
        price = 0;
      } else {
        price=10.8;
      }
    }

        
    price = dollarFormat(price);

  } else {
    price="0"
  }

  price = "$" + price;
  
  var priceStr = "<table cellpadding=0 cellspacing=0 border=0 width=100><tr><td class=content align=right>" + price + "</td></tr></table>"
	
	if (document.layers) {
			document.total.document.total1.document.writeln(priceStr);
			document.total.document.total1.document.close();

	} else {
		if (totalLayer) {
			totalLayer.innerHTML=priceStr
		}
	}
}

function calculateSeasonTotal(formElement) {
    var price1 = parseFloat(dollarFormat(formElement.passFee1.value));
    var price2 = parseFloat(dollarFormat(formElement.passFee2.value));
    var price3 = parseFloat(dollarFormat(formElement.passFee3.value));
    var price4 = parseFloat(dollarFormat(formElement.passFee4.value));
    var total = price1+price2+price3+price4

    formElement.total.value = dollarFormat(total)
    
    var fees = dollarFormat(((total * 0.05) * 1.08))

    if(fees<10.8) {
      if (fees<=parseInt(0)) {
        fees = 0;
      } else {
        fees=10.8;
      }
    }
    
    formElement.fees.value = dollarFormat(fees);

}

function dollarFormat(price) {
    //alert(isNaN(price)==true)
    if (isNumber(price)==true && isNaN(price)==false) {
      price = (Math.floor((price * 100)+.5))/100    
      
      var decPos = price.toString().indexOf(".");    
      var dec
      if (decPos!=-1) {
        dec = price.toString().substring(decPos);
        
        if (dec.length==1) {
          price = price + "00";
        } else if (dec.length==2) {
          price = price + "0"
        }
  
      } else { price=price+".00"; }
    } else {
        price=0;
    }
    
    return price

}

function isNumber(numVal) {

  var oneDecimal = false;
  var numStr = numVal.toString();
  
  for (var i=0;i<numStr.length;i++) {
    var oneChar = numStr.charAt(i);
    if (i==0 && oneChar=="-") {
      continue;
    }
  
    if (oneChar=="." && !oneDecimal) {
      oneDecimal=true;
      return false;
    }
    
    if(oneChar<"0" || oneChar>"9") {
      return false;
    }
    
    return true;
  }

}
// -->
