function setVal() {


  dz=document.form.duration.options[document.form.duration.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();

min34 = minimum(dz,ss)
if (min34 == false) 
{return false;}

one_night()

if (not_allow_one_night == "notallow")
{return false;}



//NEW YEAR DATES CODE
next = new Date(2006,11,31);
nex = next.getTime();


//THIS YEAR
if (ss < nex) 
{ 
high = dz * 160;
mid = dz * 130;
low = dz * 90;
}

//NEXT YEAR
if (ss > nex) 
{ 
high = dz * 190;
mid = dz * 150;
low = dz * 90;
}




howmanyap = 0;

room = "";

howmanypeople = 0;



sultanvalues = 0;

if (document.form.sultan.checked)

{sultanvalues = high;

howmanyap = howmanyap + 1;

howmanypeople = howmanypeople + 2;

room = room + "Sultan + ";}



fuentevalues = 0;

if (document.form.fuente.checked)

{fuentevalues = mid;

howmanyap = howmanyap + 1;

howmanypeople = howmanypeople + 2;

room = room + "Fuente + ";}



linderajavalues = 0;

if (document.form.linderaja.checked)

{linderajavalues = mid;

howmanyap = howmanyap + 1;

howmanypeople = howmanypeople + 2;

room = room + "Linderaja + ";}



aljibevalues = 0;

if (document.form.aljibe.checked)

{aljibevalues = low;

howmanyap = howmanyap + 1;

howmanypeople = howmanypeople + 2;

room = room + "Aljibe";}



var d = new Date()

secs=d.getTime()

secss=("" + secs)

stamp=secss.substr(0,10)



price= sultanvalues+fuentevalues+linderajavalues+aljibevalues;



fullprices = price;

fullprices = fullprices + (fullprices * 0.08)

fianth = fullprices/4;

if (fianth < 51 )

{fianth = 50}



dollars= fullprices*dollarconv; 

pounds= fullprices*poundeuro; 



fianza=fianth;

pricepn = fullprices/dz;

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.pesetas.value=Math.round(+pesetass);




 document.form.sultanvalues.value=sultanvalues;
document.form.sultanvaluesiva.value=sultanvalues + (sultanvalues * 0.08);


 document.form.fuentevalues.value=fuentevalues;
 document.form.fuentevaluesiva.value=fuentevalues + (fuentevalues * 0.08);

 document.form.linderajavalues.value=linderajavalues;
 document.form.linderajavaluesiva.value=linderajavalues + (linderajavalues * 0.08);


 document.form.aljibevalues.value=aljibevalues;
 document.form.aljibevaluesiva.value=aljibevalues + (aljibevalues * 0.08);

 document.form.howmanyap.value=howmanyap;

 document.form.room.value=room;

 document.form.numberofpeople.value=howmanypeople;

}

        





          

