var guestRoomPnts=0;var cateringPnts=0;var totalPnts=0;var trVal1,trVal2,trVal3,trVal4,trVal5,trVal6,trVal7,trVal8,trVal9;function writeVal(id,str){var o=window.document.getElementById("bonus"+id.toString());if(document.layers){with(o.document){open();writeln('<span id="bonus'+id+'" class="bonusUp">'+str+"</span>");close()}}else{o.innerHTML=str}}function calcPoints(){var h=window.document.getElementById("divCalc1");var b=(h.where[0].checked)?[250,50,50,50,100,100,250]:[250,250,100,50,50,50,100];var f=0;var c=false;for(var e=1;e<8;e++){var d=h["tr"+e].value;if(d&&d<10){if(!c){alert("Must have a minimum of 10 rooms per night to earn bonus points");c=true}}else{if(isNaN(d)){alert("Please enter only numeric values.")}else{var g=d*b[e-1];f=f+g;writeVal((e-1),g)}}}guestRoomPnts=f;if(guestRoomPnts>50000){guestRoomPnts=50000;alert("The program you entered has exceeded the maximum points you can earn in conjunction with a single meeting or event.  If this program actualized, you would receive the maximum limit of 50,000 bonus points.")}totalPnts=(guestRoomPnts)+(cateringPnts);writeVal(7,guestRoomPnts);writeVal(11,totalPnts)}function cateringPoints(){var b=window.document.getElementById("divCalc1");trVal8=(b.tr8.value)*1;trVal9=(b.tr9.value)*2;cateringPnts=(trVal8)+(trVal9);totalPnts=(guestRoomPnts)+(cateringPnts);var a=isNaN(totalPnts);if(a==true){alert("Please enter only numeric values.")}else{writeVal(8,trVal8);writeVal(9,trVal9);writeVal(10,cateringPnts);writeVal(11,totalPnts)}};
