//functies t.b.v. layout.

function menuOver(item){
  if(document.location.href.match("/www[.]fietswaaier[.]nl/") && item.className!="boeklink"){
    item.style.textDecoration="underline";
    item.style.color="#FFFFFF";
  }else{
    item.style.textDecoration="underline";
    item.style.color="#0000FF";
  }

}

function menuOut(item){
  item.style.textDecoration="none";
  var color="#000066";
  if(  (document.location.href.match("/www[.]fietswaaier[.]nl/") ||
  		document.location.href.match("/fietswaaier[.]nl/") ) 
  		&& item.className!="boeklink" ){
    color="#EEEEEE";
  }
  if(  (document.location.href.match("/www[.]fietswaaier[.]nl/") ||
  		document.location.href.match("/fietswaaier[.]nl/") ) 
  		&& item.className!="menulink" ) {
  	color="#FFFFFF";
  }
  item.style.color=color;
}

function selectlink(select){
  var link = select.options[select.selectedIndex].value;
  if(link != ""){
    document.location.href=link;
  }
  return true;
}


//functies t.b.v. boekingsformulier


function formcancel()
{
  document.location.href="menu.php3";
}

function idem(naam,nummer){
  evstr = "document.reizigerform."+naam+".value=document.reizigerform."+naam+"1.value;";
  eval(evstr);
}

function telidem(naam1,naam2){
  evstr = "document.reizigerform."+naam1+".value=document.reizigerform."+naam2+".value;";
  eval(evstr);
}


function sidem(naam){
  evstr = "document.reizigerform."+naam+".selectedIndex=document.reizigerform."+naam+"1.selectedIndex;";
  eval(evstr);
}

function setgarantie(){
  if(eval("document.reizigerform.garantie.selectedIndex")==1){
    eval("document.reizigerform.reisverzekering.selectedIndex=0");
    eval("document.reizigerform.annulering.selectedIndex=0");
  }
}

function unsetgarantie(){
   if(eval("document.reizigerform.reisverzekering.selectedIndex")==1 || eval("document.reizigerform.annulering.selectedIndex")==1){
     eval("document.reizigerform.garantie.selectedIndex=0");
   }
}

function deelnemersetgarantie(i){
  if(eval("document.reizigerform.garantie"+i+".selectedIndex")==1){
    eval("document.reizigerform.reisverzekering"+i+".selectedIndex=0");
    eval("document.reizigerform.annulering"+i+".selectedIndex=0");
  }
}

function deelnemerunsetgarantie(i){
   if(eval("document.reizigerform.reisverzekering"+i+".selectedIndex")==1 || eval("document.reizigerform.annulering"+i+".selectedIndex")==1){
     eval("document.reizigerform.garantie"+i+".selectedIndex=0");
   }
}



function setNewDate(veld,veld2){
  eval("dagen = document.stap2form."+veld+".value;");
  eval("d = document.stap2form."+veld+"dag.value;");
  eval("m = document.stap2form."+veld+"maand.selectedIndex;");
  eval("y = document.stap2form."+veld+"jaar.value;");
  alert(y+"-"+m+"-"+d);
  date = new Date();
  date.setYear(y);
  date.setMonth(m);
  date.setDate(d+dagen);
  alert(date.toGMTString());
  year = date.getYear()+1900;
  month = date.getMonth();
  day = date.getDate();
  eval("document.stap2form."+veld2+"dag.value="+day+";");
  eval("document.stap2form."+veld2+"maand.selectedIndex="+month+";");
  eval("document.stap2form."+veld2+"jaar.value="+year+";");
  
}

function startBoeking(url, id){
  window.open(url,'boekuwreis_id_' + id,'width=770,height=550,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no');
  return false;
}
