<!--
function checkFields() {
missinginfo = "";
if (document.registrer.fornavn.value == "") 
{
missinginfo += "\nDu m&aring; oppgi fornavn";
}

if (document.registrer.etternavn.value == "") 
{
missinginfo += "\nDu m&aring; oppgi etternavn";
}

if (document.registrer.postnr.value == "") 
{
missinginfo += "\nDu m&aring; oppgi postnummer";
}

if (document.registrer.poststed.value == "") 
{
missinginfo += "\nDu m&aring; oppgi poststed";
}

if (document.registrer.telefon.value == "" && document.registrer.mobil.value == "") 
{
missinginfo += "\nDu m&aring; oppgi minst ett telefonnr.";
}

if ((document.registrer.epost.value != "") && (
(document.registrer.epost.value.indexOf('@') == -1) || 
(document.registrer.epost.value.indexOf('.') == -1))) {
missinginfo += "\nEpost er feil utfylt";
}

if (missinginfo != "") {
missinginfo = "Du har ikke fylt ut disse feltene korrekt:\n" +
missinginfo + "\n\n" +
"Vennligst korriger og forsøk igjen!";
alert(missinginfo);
return false;
}
else return true;
}

alert(missinginfo);

function IsNumeric(strString)
   //  check for valid numeric strings  
   {
   var strValidChars = "0123456789- ";
   var strChar;
   var blnResult = true;

   if (strString.length < 8) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

//-->

