
function setVal() {
  dz=document.form.duration.options[document.form.duration.selectedIndex].value;
  mz=document.form.numberofpeople.options[document.form.numberofpeople.selectedIndex].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)

price= "0";


//1 or 2 PAX
if (dz < 31 && mz < 3)
{price = dz * 65}

if (dz < 16 && mz < 3)
{price = dz * 80}

if (dz < 11 && mz < 3)
{price = dz * 85}

if (dz < 6 && mz < 3)
{price = dz * 90}





// 3 PAX

if (dz < 31 && mz == 3)
{price = dz * 85}

if (dz < 16 && mz == 3)
{price = dz * 100}

if (dz < 11 && mz == 3)
{price = dz * 105}

if (dz < 6 && mz == 3)
{price = dz * 110}


// 4 PAX

if (dz < 31 && mz == 4)
{price = dz * 105}

if (dz < 16 && mz == 4)
{price = dz * 120}

if (dz < 11 && mz == 4)
{price = dz * 125}

if (dz < 6 && mz == 4)
{price = dz * 130}


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);
}
