function updatePrice() {
  numStay = parseInt(document.suite.numStay.value);
//  numYogaeri = parseInt(document.suite.numYogaeri.value);
  numCrew = parseInt(document.suite.numCrew.value);
  numNotCrew = numStay /*+ numYogaeri*/;
  numTotal = numStay /*+ numYogaeri*/ + numCrew;

  document.suite.numTotal.value = Math.floor(numTotal);

  priceSubtotal = 0;

  // "施設利用"

  n = document.suite.stay.selectedIndex;
  if (match = document.suite.stay.options[n].value.match(/[0-9,]+円/)) {
    up = parseInt(String(match).replace(",", ""));
    p = numStay * up;
  } else {
    up = p = 0;
  }
  priceSubtotal += p;
  document.suite.uPriceStay.value = Math.floor(up);
  document.suite.priceStay.value = Math.floor(p);

/*  n = document.suite.yogaeri.selectedIndex;
  if (match = document.suite.yogaeri.options[n].value.match(/[0-9,]+円/)) {
    up = parseInt(String(match).replace(",", ""));
    p = numYogaeri * up;
  } else {
    up = p = 0;
  }
  priceSubtotal += p;
  document.suite.uPriceYogaeri.value = Math.floor(up);
  document.suite.priceYogaeri.value = Math.floor(p);
*/
  if(document.suite.extraPay1.checked)
    p = numNotCrew * 3150;
  else
    p = 0;
  priceSubtotal += p;
  document.suite.numExtraPay1.value = Math.floor(numNotCrew);
  document.suite.priceExtraPay1.value = Math.floor(p);

  if(document.suite.extraPay2.checked)
    p = numNotCrew * 2100;
  else
    p = 0;
  priceSubtotal += p;
  document.suite.numExtraPay2.value = Math.floor(numNotCrew);
  document.suite.priceExtraPay2.value = Math.floor(p);

  if(document.suite.extraPay3.checked)
    p = numNotCrew * 4200;
  else
    p = 0;
  priceSubtotal += p;
  document.suite.numExtraPay3.value = Math.floor(numNotCrew);
  document.suite.priceExtraPay3.value = Math.floor(p);

  if(document.suite.extraPay4.checked)
    p = numNotCrew * 5250;
  else
    p = 0;
  priceSubtotal += p;
  document.suite.numExtraPay4.value = Math.floor(numNotCrew);
  document.suite.priceExtraPay4.value = Math.floor(p);

  document.suite.priceCrew.value = numCrew * 7350;

  // "お飲み物"

  n = document.suite.drink.selectedIndex;
  if (match = document.suite.drink.options[n].value.match(/[0-9,]+円/)) {
    up = parseInt(String(match).replace(",", ""));
    p = parseInt(document.suite.numDrink.value) * up;
  } else {
    up = p = 0;
  }
  priceSubtotal += p;
  document.suite.uPriceDrink.value = Math.floor(up);
  document.suite.priceDrink.value = Math.floor(p);

  // "芸者"

  p = parseInt(document.suite.numGeisha.value) * 15750;
  priceSubtotal += p;
  document.suite.priceGeisha.value = Math.floor(p);

  p = parseInt(document.suite.numGeishaExtra.value) * (parseInt(document.suite.minuteGeishaExtra.value) / 30) * 5250;
  priceSubtotal += p;
  document.suite.priceGeishaExtra.value = Math.floor(p);

  // "コンパニオン"

  p = parseInt(document.suite.numCompanion.value) * 15750;
  priceSubtotal += p;
  document.suite.priceCompanion.value = Math.floor(p);

  p = parseInt(document.suite.numCompanionExtra.value) * (parseInt(document.suite.minuteCompanionExtra.value) / 60) * 7875;
  priceSubtotal += p;
  document.suite.priceCompanionExtra.value = Math.floor(p);

  // "カラオケ・ショー"

  p = parseInt(document.suite.numKaraoke.value) * 5250;
  priceSubtotal += p;
  document.suite.priceKaraoke.value = Math.floor(p);
  
  p = parseInt(document.suite.numByakkotai.value) * 6300;
  priceSubtotal += p;
  document.suite.priceByakkotai.value = Math.floor(p);
  
  p = parseInt(document.suite.numOhayashi.value) * 6300;
  priceSubtotal += p;
  document.suite.priceOhayashi.value = Math.floor(p);
  
  p = parseInt(document.suite.numBand.value) * 84000;
  priceSubtotal += p;
  document.suite.priceBand.value = Math.floor(p);

  // "2次会の手配"

  n = document.suite.secondParty.selectedIndex;
  if (match = document.suite.secondParty.options[n].value.match(/[0-9,]+円/)) {
    up = parseInt(String(match).replace(",", ""));
    if ((document.suite.extraPay1.checked || document.suite.extraPay2.checked) && (match = document.suite.secondParty.options[n].value.match(/[0-9,]+円増/)))
      up += parseInt(String(match).replace(",", ""));
    p = parseInt(document.suite.numSecondParty.value) * up;
  } else {
    up = p = 0;
  }
  priceSubtotal += p;
  document.suite.uPriceSecondParty.value = Math.floor(up);
  document.suite.priceSecondParty.value = Math.floor(p);

  // "その他"

  n = document.suite.souvenir.selectedIndex;
  if (match = document.suite.souvenir.options[n].value.match(/[0-9,]+円/)) {
    up = parseInt(String(match).replace(",", ""));
    p = parseInt(document.suite.numSouvenir.value) * up;
  } else {
    up = p = 0;
  }
  priceSubtotal += p;
  document.suite.uPriceSouvenir.value = Math.floor(up);
  document.suite.priceSouvenir.value = Math.floor(p);

  // "合計"

  document.suite.priceSubtotal.value = Math.floor(priceSubtotal);

  p = numTotal * 150;
  document.suite.numBath.value = Math.floor(numTotal);
  document.suite.priceBath.value = Math.floor(p);

  p = priceSubtotal + p;
  document.suite.priceTotal.value = Math.floor(p);

  document.suite.priceOnePerson.value = (numTotal == 0 ? "" : Math.ceil(p / numTotal));
}

function gotoNextPage() {
  document.suite.submit();
}

function OpenWin(url){
  window.open(url, "new", "width=380,height=450");
}
