<!--
var isOldSafari=(navigator.userAgent.search(/Safari\/(85|1\d\d)\D/i)!=-1);

function dss_addEvent(el,etype,fn) {
  var tN = el.tagName?el.tagName.toLowerCase():'';
  if(el.addEventListener && (!window.opera || opera.version) &&
  (etype!='load') &&(!isOldSafari || ((tN!='input') && (tN!='textarea')))) {
    el.addEventListener(etype,fn,false);
  } else if(el.attachEvent) {
    el.attachEvent('on'+etype,fn);
  } else {
    var tempFunc;
    if(typeof el['on'+etype] == "function") tempFunc=el['on'+etype];
    el['on'+etype] = function() {
      if(typeof tempFunc == "function") tempFunc();
      if(typeof fn == "function") fn();
    }
  }
}

if(typeof(Number)!='undefined'&&typeof(Number.prototype)!='undefined'){
  if(typeof(Number.prototype.toFixed)=='undefined'){
  // for IE versions older than 5.5 and Netscape 4.x
  // for this script it's only used in IE5.x, though because of the DOM1 
  // support requirement
    Number.prototype.toFixed=function(d){
      var n=this;
      d=(d||((d==0)&&(typeof(d)=='number')))?d:2;
      var f=Math.pow(10,d);
      n=((Math.round(n*f)/f)+Math.pow(10,-(d+1)))+'';
      return n.substring(0,(d==0)?n.indexOf('.'):n.indexOf('.')+d+1);
    }
  }
}

var checkboxItemValue = {
  'cb1':'10.00',
  'cb2':'7.50',
  'cb3':'11.50',
  'cb4':'14.00'
};

function updateTotal() {
  if(!document.getElementsByTagName || !document.createTextNode) return;
  var cbs = document.getElementById('cbGroup1').getElementsByTagName('input');
  var total = 113.97,num;
  for(var i=0;i<cbs.length;i++) {
    if(cbs[i].checked) {
      num=parseFloat(checkboxItemValue[cbs[i].id]);
      if(!isNaN(num)) total += num;
    }
  }
  var b = document.getElementById('cbGroup1Total');
  while(b.firstChild) b.removeChild(b.firstChild); // removes children of "b"
  b.appendChild(document.createTextNode('£ '+total.toFixed(2)));
}

function addEventsToCBGroup1() {
  if(!document.getElementsByTagName || !document.createTextNode) return;
  var cbs = document.getElementById('cbGroup1').getElementsByTagName('input');
  for(var i=0;i<cbs.length;i++) {
    dss_addEvent(cbs[i],'click',updateTotal);
  }
}

// IE5+/Win, Firefox, Netscape 6+, Opera 7+, Safari, IE5/Mac, iCab 3

dss_addEvent(window,'load',addEventsToCBGroup1);
dss_addEvent(window,'load',updateTotal);
// -->
