//
// Kalender
//
var callCalendar = new DatePicker("<%=strSprog%>",true, self, WComboBoxAnkomst_selected,0,-75,230);
callCalendar.date_fld = 'STARTDATO';
function WComboBoxAnkomst_selected(cal, date)
{
  document.forms['BestilHus'].elements[cal.date_fld].value =
    todigits(date.getDate()) + '-' + todigits((date.getMonth() + 1)) + '-' + date.getFullYear();
  //AnkomstPopup(BestilHus.STARTDATO);
}

function todigits(intvalue)
{
  var str=new String(intvalue);
  if (str.length<2) return "0"+str
  else return str;
}


function checkTekstfelt(tekstfelt)
{
  if (tekstfelt.value == "")
  {
    return false;
  }
  else
  {
    return true;
  }
}

function validate(field1)
{
  var fejltekst="", konto;
  if (!checkTekstfelt(document.BestilHus.ANTALDAGE)) {fejltekst = "<%=BestemtHus_Ind%>\n";}
  if (!checkTekstfelt(document.BestilHus.STARTDATO)) {fejltekst = "<%=BestemtHus_Ind%>\n";}
  
  
  if (fejltekst != "")
  {
    alert(fejltekst);
    return false;
  }
  else
  {
    return true;
  }

  
}

function tooltip(url, wid, hei, scrol)
  {
   
   open('' + url + '', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=' + scrol + ',resizable=no,directories=no,top=0,left=0,width=' + wid + ', height=' + hei + '');
  }
