function recalc_price() {

  price = 0;
  
  //check which level
  level = $("#training_level").val();
  if (level == 0) { //no level - nothing to do
    return;
  }
  
  //check which activity
  activity = $("#training_activity").val();

  //check equipment
  itms = new Array();
  //PACK = 0
  //TENT = 1
  //SLEEPING BAG = 2
  //SLEEPING MAT = 3
  //COOKER = 4
  //POTS = 5
  //GAS = 6
  
  if ($("#pack_on:checked").length == 1) itms[0] = 1;
  if ($("#tent_on:checked").length == 1) itms[1] = 1;
  if ($("#sleeping_bag_on:checked").length == 1) itms[2] = 1;
  if ($("#sleeping_mat_on:checked").length == 1) itms[3] = 1;
  if ($("#cooker_on:checked").length == 1) itms[4] = 1;
  if ($("#pots_on:checked").length == 1) itms[5] = 1;
  if ($("#gas_on:checked").length == 1) itms[6] = 1;
  
  if (activity == 1) {
    price = 215;
  } else if (activity == 2) {
    if (level == 1) price = 165;
    if (level == 2) price = 195;
    if (level == 3) price = 225;
  } else if (activity == 3) {
    if (level == 1) price = 195;
    if (level == 2) price = 225;
    if (level == 3) price = 350;  //change from 300 BG344
  };
  
	$("#programme_info").html(level+"|"+activity);
  subtot = price.toFixed(2);
  $("#programme_subtotal").html("$"+subtot);
  $("#programme_subtotal_s").html("$"+subtot);
   
  price = 0;
  $("#tent_na").hide();
  $("#sleeping_mat_na").hide();
  $("#cooker_na").hide();
  $("#gas_na").hide();
  if ( (level == 3) && (activity == 1)) {
    $("#tent_na").show();
  } else if ( (level ==1) && (activity == 3)) {
    $("#tent_na").show();
    $("#sleeping_mat_na").show();
    $("#cooker_na").show();
    $("#gas_na").show();
  }  
    
  bought = '';
	priceb4 = price;
  if (itms[0]) {
    if (activity == 1) { 
      price = price + 5;
    } else if (activity == 2) {
      if (level == 1) price = price + 5;
      if (level == 2) price = price + 10;
      if (level == 3) price = price + 10;
    } else if (activity == 3) {
      if (level == 1) price = price + 10;
      if (level == 2) price = price + 10;
      if (level == 3) price = price + 15;
    };
  }
	if (priceb4 != price) {
	  bought = bought + 'pack:'+(price-priceb4)+'|';
	};  

	priceb4 = price;
  if (itms[1]) {
    if (activity == 1) { 
      if (level == 1) price = price + 15;
      if (level == 2) price = price + 15;
    } else if (activity == 2) {
      if (level == 1) price = price + 15;
      if (level == 2) price = price + 20;
      if (level == 3) price = price + 20;
    } else if (activity == 3) {
      if (level == 2) price = price + 20;
      if (level == 3) price = price + 25;
    };
  }  
	if (priceb4 != price) {
	  bought = bought + 'tent:'+(price-priceb4)+'|';
	};  
  
	priceb4 = price;
  if (itms[2]) {
    if (activity == 1) { 
      price = price + 10;
    } else if (activity == 2) {
      price = price + 10;
    } else if (activity == 3) {
      if (level == 1) price = price + 10;
      if (level == 2) price = price + 10;
      if (level == 3) price = price + 15;
    };
  }  
	if (priceb4 != price) {
	  bought = bought + 'sleeping bag:'+(price-priceb4)+'|';
	};  

	priceb4 = price;
  if (itms[3]) {
    if (activity == 1) { 
      price = price + 1;
    } else if (activity == 2) {
      if (level == 1) price = price + 1;
      if (level == 2) price = price + 2;
      if (level == 3) price = price + 2;
    } else if (activity == 3) {
      if (level == 2) price = price + 2;
      if (level == 3) price = price + 3;
    };
  }  
	if (priceb4 != price) {
	  bought = bought + 'sleeping mat:'+(price-priceb4)+'|';
	};  

	priceb4 = price;
  if (itms[4]) {
    if (activity == 1) { 
      price = price + 2;
    } else if (activity == 2) {
      if (level == 1) price = price + 2;
      if (level == 2) price = price + 4;
      if (level == 3) price = price + 4;
    } else if (activity == 3) {
      if (level == 2) price = price + 4;
      if (level == 3) price = price + 4;
    };
  }  
	if (priceb4 != price) {
	  bought = bought + 'cooker:'+(price-priceb4)+'|';
	};  


	priceb4 = price;
  if (itms[5]) {
    if (activity == 1) { 
      price = price + 5;
    } else if (activity == 2) {
      if (level == 1) price = price + 5;
      if (level == 2) price = price + 6;
      if (level == 3) price = price + 6;
    } else if (activity == 3) {
      if (level == 1) price = price + 5;
      if (level == 2) price = price + 6;
      if (level == 3) price = price + 6;
    };
  }  
	if (priceb4 != price) {
	  bought = bought + 'pots:'+(price-priceb4)+'|';
	};  

	priceb4 = price;
  if (itms[6]) {
    if (activity == 1) { 
      price = price + 8;
    } else if (activity == 2) {
      price = price + 8;      
    } else if (activity == 3) {
      if (level == 2) price = price + 8;
      if (level == 3) price = price + 8;
    };
  }  
	if (priceb4 != price) {
	  bought = bought + 'gas:'+(price-priceb4)+'|';
	};  

	$("#cart_contents").html(bought);
	 
  cartsubtot = price.toFixed(2);
  $("#cart_subtotal").html("$"+cartsubtot);
  $("#cart_subtotal_s").html("$"+cartsubtot);
  
  if ($("#joinpps").val() == 1) {
    joinpps = 10;
  } else {
    joinpps = 0;
  }
  p = joinpps.toFixed(2);
  $("#joinpps_subtotal_s").html("$"+p);
   
  price = parseFloat(cartsubtot) + parseFloat(subtot) + parseFloat(joinpps);

  p = price.toFixed(2);
  $("#totalprice").html("$"+p);
}