var kcal=0;
var sitem="";
var heat="";
var total="";
var s_item=0;
function add_count(s_item){
kcal = kcal + parseInt(s_item);
return kcal;
}
function delete_item(form){
sitem=(form.selected_display.options[form.selected_display.selectedIndex].innerHTML);
heat=(form.selected_display.options[form.selected_display.selectedIndex].value);
if (form.selected_display.selectedIndex != 0)
{
form.cal_volume.value = delete_count(heat);
form.selected_display.options[form.selected_display.selectedIndex]=null;
}
}
function delete_count(s_item){
kcal = kcal - parseInt(s_item);
return kcal;
}
function cal_volume1(form){
sitem=(form.kcal_item1.options[form.kcal_item1.selectedIndex].innerHTML);
heat=(form.kcal_item1.options[form.kcal_item1.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length]=food;
form.cal_volume.value = add_count(heat);
form.kcal_item1.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume2(form){
sitem=(form.kcal_item2.options[form.kcal_item2.selectedIndex].innerHTML);
heat=(form.kcal_item2.options[form.kcal_item2.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length]=food;
form.cal_volume.value = add_count(heat);
form.kcal_item2.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume3(form){
sitem=(form.kcal_item3.options[form.kcal_item3.selectedIndex].innerHTML);
heat=(form.kcal_item3.options[form.kcal_item3.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length]=food;
form.cal_volume.value = add_count(heat);
form.kcal_item3.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume4(form){
sitem=(form.kcal_item4.options[form.kcal_item4.selectedIndex].innerHTML);
heat=(form.kcal_item4.options[form.kcal_item4.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length]=food;
form.cal_volume.value = add_count(heat);
form.kcal_item4.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume5(form){
sitem = (form.kcal_item5.options[form.kcal_item5.selectedIndex].innerHTML);
heat=(form.kcal_item5.options[form.kcal_item5.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item5.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume6(form){
sitem = (form.kcal_item6.options[form.kcal_item6.selectedIndex].innerHTML);
heat=(form.kcal_item6.options[form.kcal_item6.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item6.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume7(form){
sitem = (form.kcal_item7.options[form.kcal_item7.selectedIndex].innerHTML);
heat=(form.kcal_item7.options[form.kcal_item7.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item7.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume8(form){
sitem = (form.kcal_item8.options[form.kcal_item8.selectedIndex].innerHTML);
heat=(form.kcal_item8.options[form.kcal_item8.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item8.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume9(form){
sitem = (form.kcal_item9.options[form.kcal_item9.selectedIndex].innerHTML);
heat=(form.kcal_item9.options[form.kcal_item9.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item9.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume10(form){
sitem = (form.kcal_item10.options[form.kcal_item10.selectedIndex].innerHTML);
heat=(form.kcal_item10.options[form.kcal_item10.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item10.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume11(form){
sitem = (form.kcal_item11.options[form.kcal_item11.selectedIndex].innerHTML);
heat=(form.kcal_item11.options[form.kcal_item11.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item11.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume12(form){
sitem = (form.kcal_item12.options[form.kcal_item12.selectedIndex].innerHTML);
heat=(form.kcal_item12.options[form.kcal_item12.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item12.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume13(form){
sitem = (form.kcal_item13.options[form.kcal_item13.selectedIndex].innerHTML);
heat=(form.kcal_item13.options[form.kcal_item13.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item13.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume14(form){
sitem = (form.kcal_item14.options[form.kcal_item14.selectedIndex].innerHTML);
heat=(form.kcal_item14.options[form.kcal_item14.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item14.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume15(form){
sitem = (form.kcal_item15.options[form.kcal_item15.selectedIndex].innerHTML);
heat=(form.kcal_item15.options[form.kcal_item15.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item15.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume16(form){
sitem = (form.kcal_item16.options[form.kcal_item16.selectedIndex].innerHTML);
heat=(form.kcal_item16.options[form.kcal_item16.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item16.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume17(form){
sitem = (form.kcal_item17.options[form.kcal_item17.selectedIndex].innerHTML);
heat=(form.kcal_item17.options[form.kcal_item17.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item17.selectedIndex=0;
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}
function cal_volume18(form){
sitem = (form.kcal_item18.options[form.kcal_item18.selectedIndex].innerHTML);
heat=(form.kcal_item18.options[form.kcal_item18.selectedIndex].value);
food = new Option(sitem,sitem);
form.selected_display.options[form.selected_display.length] = food;
form.cal_volume.value = add_count(heat);
form.kcal_item18.selectedIndex=0;
if(heatresult>0){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - HeatCalculator.getTotal())+"卡路里";
}
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}


function starting_yy(){

totalc=Number(document.getElementById('cal_volume').value);
document.getElementById("jixufenxi").innerHTML="<UL style=\"LINE-HEIGHT: 25px\">  <LI><u>踢足球</u>&nbsp;&nbsp;"+Math.round(totalc*0.1)+"分钟</LI>  <LI>或<u>打网球</u>&nbsp;&nbsp;"+Math.round(totalc*0.1)+"分钟</LI>  <LI>或<u>打篮球运动</u>&nbsp;&nbsp;"+Math.round(totalc*0.12)+"分钟</LI>  <LI>或<u>打羽毛球运动</u>&nbsp;&nbsp;"+Math.round(totalc*0.12)+"分钟</LI>  <LI>或<u>游泳（自由式）</u>&nbsp;&nbsp;"+Math.round(totalc*0.14)+"分钟</LI>  <LI>或<u>进行慢跑</u>&nbsp;&nbsp;"+Math.round(totalc*0.09)+"分钟</LI>  <LI>或<u>进行快速跑</u>&nbsp;&nbsp;"+Math.round(totalc*0.04)+"分钟</LI>  <LI>或<u>打扫卫生</u>&nbsp;&nbsp;"+Math.round(totalc*0.24)+"分钟</LI>  <LI>或<u>匀速跳绳</u>&nbsp;&nbsp;"+Math.round(totalc*0.07)+"分钟</LI>  <LI>或<u>骑脚踏车</u>&nbsp;&nbsp;"+Math.round(totalc*0.29)+"分钟</LI></UL>"
}
function resetall(){
//this_form.selected_display.options[form.selected_display.Index]="";
this_form.selected_display.innerHTML='';
this_form.cal_volume.value = "0";
kcal=0;
document.getElementById("heat").value="";
document.getElementById("advice").innerHTML = "";
}


function calculateHeat(){
var heatresult = 0;
if(document.getElementById("age").value>=18 && document.getElementById("age").value<=30 && document.getElementById("weight").value!=""){
heatresult = (document.getElementById("weight").value*0.062+2.036) * 240;
}
else if(document.getElementById("weight").value!="" && document.getElementById("age").value!="")
{
heatresult = (document.getElementById("weight").value*0.062+3.538) * 240;
}
if(heatresult>0&&heatresult>=Number(this_form.cal_volume.value)){
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天还可以吃"+(parseInt(heatresult) - Number(this_form.cal_volume.value))+"卡路里";
}
else if (heatresult>0&&heatresult<Number(this_form.cal_volume.value))
{
document.getElementById("heat").value=parseInt(heatresult);
document.getElementById("advice").innerHTML = "你今天已经吃了超出"+(Number(this_form.cal_volume.value) - parseInt(heatresult))+"卡路里的热量了，赶紧做点运动消耗吧";
}
}