
function setfocus()
{
  document.forms[0].elements[0].focus();
}

function passcheck(form,pw1,pw2) {
  if (form.elements[pw1].value==form.elements[pw2].value) return true;
  else {
    alert("de to kodeord du indtastede er ikke ens");
    return false;
  }
}

function formcheckiktom(form,liste,tekst) {
  b=0;
  temp="";
  for(a=0;a<liste.length;a++){
    if(form.elements[liste[a]].value=="") b++;
    temp=temp+liste[a]+',';
  }
  temp=temp.substring(0,temp.length-1);
  temp=temp+' og '+liste[liste.length-1];
  if(b>0) {
    if(tekst!='') alert(tekst);
    else alert("felterne "+temp+" skal udfyldes");
    return false;
  }
  else return true
}

function fjernmellemrum(form,liste) {
  for(a=0;a<liste.length;a++){
    indhold=form.elements[liste[a]].value;
    form.elements[liste[a]].value=indhold.replace(" ","");
  }
}

function nytVindue(destination,b,h) {
	window.open(destination,"my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+b+", height="+h);
}




