
function setVal() {
  dz=document.form.duration.options[document.form.duration.selectedIndex].value;
  mz=document.form.numberofpeople.options[document.form.numberofpeople.selectedIndex].value;
  arrivalday=document.form.arrivalday.options[document.form.arrivalday.selectedIndex].value;
  arrivalmonth=document.form.arrivalmonth.options[document.form.arrivalmonth.selectedIndex].value;
  arrivalyear=document.form.arrivalyear.options[document.form.arrivalyear.selectedIndex].value;
  dollarconv=document.form.dollareuro.value;
  poundeuro=document.form.poundeuro.value;
  lang=document.form.lang.value;

sstemp = new Date(arrivalyear,arrivalmonth-1,arrivalday);
ss = sstemp.getTime();

ppn=0;

if (mz < 3 && dz < 7)
{ppn = 60}
if (mz < 3 && dz > 6)
{ppn = 52}
if (mz < 3 && dz == 2)
{ppn = 80}

if (mz == 3  && dz < 4)
{ppn = 72}
if (mz == 3  && dz == 4)
{ppn = 66}
if (mz == 3 && dz == 5)
{ppn = 72}
if (mz == 3 && dz == 6)
{ppn = 72}
if (mz == 3 && dz > 6)
{ppn = 62}
if (mz == 3 && dz == 2)
{ppn = 80}

if (mz == 4  && dz < 4)
{ppn = 72}
if (mz == 4  && dz == 4)
{ppn = 66}
if (mz == 4 && dz == 5)
{ppn = 72}
if (mz == 4 && dz == 6)
{ppn = 72}
if (mz == 4 && dz > 6)
{ppn = 62}
if (mz == 4 && dz == 2)
{ppn = 80}

if (mz > 4 && dz == 2)
{ppn = 81}
if (mz > 4 && dz == 3)
{ppn = 75}
if (mz > 4 && dz == 4)
{ppn = 69}
if (mz > 4 && dz == 5)
{ppn = 74}
if (mz > 4 && dz == 6)
{ppn = 74}
if (mz > 4 && dz == 7)
{ppn = 63}
if (mz > 4 && dz > 7)
{ppn = 64}

price = ppn*dz;
fullprices = price;
dollars= fullprices*dollarconv; 
pounds= fullprices*poundeuro; 

discountsup(dz,fullprices,ss)
fullprices = fullprices + holsup_zz;

fianza=fullprices/4;
if (fianza < 50)
{fianza = 50 }
pricepn = fullprices/dz;
pricepp = fullprices/mz;
pesetass = fullprices*166.386;

 document.form.fullprice.value=Math.round(+fullprices*100)/100;
 document.form.pounds.value=Math.round(+pounds*100)/100;
 document.form.dollars.value=Math.round(+dollars*100)/100;
 document.form.deposit.value=Math.round(+fianza*100)/100;
 document.form.ppn.value=Math.round(+pricepn*100)/100;
 document.form.ppp.value=Math.round(+pricepp*100)/100;
 document.form.pesetas.value=Math.round(+pesetass);
document.form.holsupdays.value=holsupdays_zz;
document.form.holsup.value=holsup_zz;

}

