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;
lang=document.form.lang.value;

dollarconv=document.form.dollareuro.value;
poundeuro=document.form.poundeuro.value;

var d = new Date()
secs=d.getTime()
secss=("" + secs)
stamp=secss.substr(0,10)

sstemp = new Date(arrivalyear,arrivalmonth-1,arrivalday);
ss = sstemp.getTime();

min34 = minimum(dz,ss)
if (min34 == false) 
{return false;}


price= "0";

if (dz < 7 )longdicount = 0;
if (dz > 6 )longdicount = 1;
if (dz > 13 )longdicount = 2;
if (dz > 20 )longdicount = 3;
if (dz > 27 )longdicount = 4;

dz = dz - longdicount;

if (mz < 5)
{price = dz*100}
if (mz < 4)
{price = dz*90}
if (mz < 3)
{price = dz*75}


fullprices = price;

fianth = fullprices/4;
if (fianth < 51 )
{fianth = 50}

dollars= fullprices*dollarconv; 
pounds= fullprices*poundeuro;  

fianza=fianth;
pricepn = fullprices/dz;
pricepp = fullprices/mz;
pesetass = fullprices*166.386;

 document.form.id.value=+stamp;
 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);
}
            
