here are my functions for specials on menu items. i need to be able to add a s, m, or l one at a time and produce a total. i dont know how to do this. help.

btw..am i supposed to post somewhere else or something? my questions never get answered.

thank so much, great forum.





//////////////////////////////////////////////////
// CALCULATION FUNCTION DEFINITION
/////////////////////////////////////////////////

/* calTotal() -- function to determine the rate
* for renting a piece of equipment
*/
function calTotal() {

var cost;
var size; // used for display
var special; // used for display
var goodData = true; // used to keep track if input is valid or not
var display = ""; // string to gather my display text
var mp;
var sp;
var lp;
var bill;
var totals = new Array();
var total="Total";

// INPUT though the itemID is a digit, we won't be doing any math with
// it, so leave it as a string
var type = document.rentals.itemID.value;
var howLong = document.rentals.time.value;


// regardless of whether the user entered lower or upper case, I'll change
// that value to upper case so that we only have to test upper-case letters
type= itemSiz.toUpperCase();

// Let's make sure the user entered valid data
if (type != "s" && type != "m" && type !="l") {
alert("Invalid item number. Please try again");
goodData = false;
}


// only continue if we have good data
if (goodData) {

/* PROCESS: Pizza cost, super order menu viola

*/

if (type == "s"){
var small = 5.99;
}

else if (mp>1){
var medTotal=7.99*1
medtotal+=(4.99*(mp-1));
}

else if(lp>3){
bill=bill-(.10*bill)
}
}