function valider_bookingformular () {
	error = 0;
	
	if((document.booking_formular.navn.value=='') && (error==0))   
		{ 
		alert('Du mangler at udfylde navn');
		document.booking_formular.navn.focus();
		error = 1; 
		}
		
	if((document.booking_formular.adresse.value=='') && (error==0))   
		{ alert('Du mangler at udfylde adresse');
		document.booking_formular.adresse.focus();
		error = 1; 
		}
		
		if((document.booking_formular.postnr.value=='') && (error==0))   
		{ alert('Du mangler at udfylde postnr');
		document.booking_formular.postnr.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.postnr.value)&& (error==0))   
		{ alert('Du har ikke angivet et gyldigt postnummer');
		document.booking_formular.postnr.focus();
		error = 1; 
		}
		
		if((document.booking_formular.by.value=='') && (error==0))   
		{ alert('Du mangler at udfylde by');
		document.booking_formular.by.focus();
		error = 1; 
		}
		
		if((document.booking_formular.land.value=='') && (error==0))   
		{ alert('Du mangler at udfylde land');
		document.booking_formular.land.focus();
		error = 1; 
		}
		
		if((document.booking_formular.telefon.value=='') && (error==0))   
		{ alert('Du mangler at udfylde telefon');
		document.booking_formular.telefon.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.telefon.value)&& (error==0))   
		{ alert('Du har ikke angivet et gyldigt telefonnummer');
		document.booking_formular.telefon.focus();
		error = 1; 
		}

		
		if((document.booking_formular.mobil.value=='') && (error==0))   
		{ alert('Du mangler at udfylde mobil');
		document.booking_formular.mobil.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.mobil.value)&& (error==0))   
		{ alert('Du har ikke angivet et gyldigt mobilnummer');
		document.booking_formular.mobil.focus();
		error = 1; 
		}
		
		if((document.booking_formular.email.value=='') && (error==0))   
		{ alert('Du mangler at udfylde email');
		document.booking_formular.email.focus();
		error = 1; 
		}
		
		if(!emailCheck(document.booking_formular.email.value) && (error==0))   
		{ alert('Den angivne e-mail er ikke gyldig');
		document.booking_formular.email.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_dag.value=='') && (error==0))   
		{ alert('Du mangler vælge dag for ankomst');
		document.booking_formular.ankomst_dag.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_maaned.value=='') && (error==0))   
		{ alert('Du mangler at vælge måned for ankomst');
		document.booking_formular.ankomst_maaned.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_aar.value=='') && (error==0))   
		{ alert('Du mangler at vælge år for ankomst');
		document.booking_formular.ankomst_aar.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_dag.value=='') && (error==0))   
		{ alert('Du mangler vælge dag for afrejse');
		document.booking_formular.afrejse_dag.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_maaned.value=='') && (error==0))   
		{ alert('Du mangler at vælge måned for afrejse');
		document.booking_formular.afrejse_maaned.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_aar.value=='') && (error==0))   
		{ alert('Du mangler at vælge år for afrejse');
		document.booking_formular.afrejse_aar.focus();
		error = 1; 
		}
		
		if((document.booking_formular.lejligheder.value=='') && (error==0))   
		{ alert('Du mangler at angive antal lejligheder');
		document.booking_formular.lejligheder.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.lejligheder.value)&& (error==0))   
		{ alert('Du skal angive et tal i antal lejligheder');
		document.booking_formular.lejligheder.focus();
		error = 1; 
		}
		
		if((document.booking_formular.voksne.value=='') && (error==0))   
		{ alert('Du mangler at vælge antal voksne');
		document.booking_formular.voksne.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.voksne.value)&& (error==0))   
		{ alert('Du skal angive et tal i antal voksne');
		document.booking_formular.voksne.focus();
		error = 1; 
		}
		
		if((document.booking_formular.born.value=='') && (error==0))   
		{ alert('Du mangler at vælge antal børn under 12 år');
		document.booking_formular.born.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.born.value)&& (error==0))   
		{ alert('Du skal angive et tal i antal børn under 12 år');
		document.booking_formular.born.focus();
		error = 1; 
		}
		
		if((document.booking_formular.linnedpakker.value=='') && (error==0))   
		{ alert('Du mangler at vælge antal linnedpakker');
		document.booking_formular.linnedpakker.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.linnedpakker.value)&& (error==0))   
		{ alert('Du skal angive et tal i antal linnedpakker');
		document.booking_formular.linnedpakker.focus();
		error = 1; 
		}
		
		if((document.booking_formular.barneseng.value=='') && (error==0))   
		{ alert('Du mangler at vælge antal børnesenge incl. evt. barnestol');
		document.booking_formular.barneseng.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.barneseng.value)&& (error==0))   
		{ alert('Du skal angive et tal i antal børnesenge incl. evt. barnestol');
		document.booking_formular.barneseng.focus();
		error = 1; 
		}
		
		if((document.booking_formular.husdyr.value=='') && (error==0))   
		{ alert('Du mangler at vælge antal husdyr');
		document.booking_formular.husdyr.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.husdyr.value)&& (error==0))   
		{ alert('Du skal angive et tal i antal husdyr');
		document.booking_formular.husdyr.focus();
		error = 1; 
		}
		
	
		
		
	
		
	if(error == 0) 
	  document.booking_formular.submit();	
}


function valider_bookingformular_tys () {
	error = 0;
	
	if((document.booking_formular.navn.value=='') && (error==0))   
		{ 
		alert('Name nicht korrekt');
		document.booking_formular.navn.focus();
		error = 1; 
		}
		
	if((document.booking_formular.adresse.value=='') && (error==0))   
		{ alert('Adresse nicht korrekt');
		document.booking_formular.adresse.focus();
		error = 1; 
		}
		
		if((document.booking_formular.postnr.value=='') && (error==0))   
		{ alert('Postleizahl nicht korrekt');
		document.booking_formular.postnr.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.postnr.value)&& (error==0))   
		{ alert('Postleizahl nicht korrekt');
		document.booking_formular.postnr.focus();
		error = 1; 
		}
		
		if((document.booking_formular.by.value=='') && (error==0))   
		{ alert('Ort nicht korrekt');
		document.booking_formular.by.focus();
		error = 1; 
		}
		
		if((document.booking_formular.land.value=='') && (error==0))   
		{ alert('Land nicht korrekt');
		document.booking_formular.land.focus();
		error = 1; 
		}
		
		if((document.booking_formular.telefon.value=='') && (error==0))   
		{ alert('Telefon nicht korrekt');
		document.booking_formular.telefon.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.telefon.value)&& (error==0))   
		{ alert('Telefon nicht korrekt');
		document.booking_formular.telefon.focus();
		error = 1; 
		}

		
		if((document.booking_formular.mobil.value=='') && (error==0))   
		{ alert('Mobil nicht korrekt');
		document.booking_formular.mobil.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.mobil.value)&& (error==0))   
		{ alert('Mobil nicht korrekt');
		document.booking_formular.mobil.focus();
		error = 1; 
		}
		
		if((document.booking_formular.email.value=='') && (error==0))   
		{ alert('Email nicht korrekt');
		document.booking_formular.email.focus();
		error = 1; 
		}
		
		if(!emailCheck(document.booking_formular.email.value) && (error==0))   
		{ alert('Email nicht korrekt');
		document.booking_formular.email.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_dag.value=='') && (error==0))   
		{ alert('Ankunft Tag nicht korrekt');
		document.booking_formular.ankomst_dag.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_maaned.value=='') && (error==0))   
		{ alert('Ankunft Monat nicht korrekt');
		document.booking_formular.ankomst_maaned.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_aar.value=='') && (error==0))   
		{ alert('Ankunft Jahre nicht korrekt');
		document.booking_formular.ankomst_aar.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_dag.value=='') && (error==0))   
		{ alert('Abreise Tag nicht korrekt');
		document.booking_formular.afrejse_dag.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_maaned.value=='') && (error==0))   
		{ alert('Abreise Monat nicht korrekt');
		document.booking_formular.afrejse_maaned.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_aar.value=='') && (error==0))   
		{ alert('Abreise Jahre nicht korrekt');
		document.booking_formular.afrejse_aar.focus();
		error = 1; 
		}
		
		if((document.booking_formular.lejligheder.value=='') && (error==0))   
		{ alert('Wohnung nicht korrekt');
		document.booking_formular.lejligheder.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.lejligheder.value)&& (error==0))   
		{ alert('Wohnung nicht korrekt');
		document.booking_formular.lejligheder.focus();
		error = 1; 
		}
		
		if((document.booking_formular.voksne.value=='') && (error==0))   
		{ alert('Erwachsene nicht korrekt');
		document.booking_formular.voksne.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.voksne.value)&& (error==0))   
		{ alert('Erwachsene nicht korrekt');
		document.booking_formular.voksne.focus();
		error = 1; 
		}
		
		if((document.booking_formular.born.value=='') && (error==0))   
		{ alert('Kinder unter 12 Jahre nicht korrekt');
		document.booking_formular.born.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.born.value)&& (error==0))   
		{ alert('Kinder unter 12 Jahre nicht korrekt');
		document.booking_formular.born.focus();
		error = 1; 
		}
		
		if((document.booking_formular.linnedpakker.value=='') && (error==0))   
		{ alert('Bettwäsche nicht korrekt');
		document.booking_formular.linnedpakker.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.linnedpakker.value)&& (error==0))   
		{ alert('Bettwäsche nicht korrekt');
		document.booking_formular.linnedpakker.focus();
		error = 1; 
		}
		
		if((document.booking_formular.barneseng.value=='') && (error==0))   
		{ alert('Kinderbett und stuhl nicht korrekt');
		document.booking_formular.barneseng.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.barneseng.value)&& (error==0))   
		{ alert('Kinderbett und stuhl nicht korrekt');
		document.booking_formular.barneseng.focus();
		error = 1; 
		}
		
		if((document.booking_formular.husdyr.value=='') && (error==0))   
		{ alert('Tiere nicht korrekt');
		document.booking_formular.husdyr.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.husdyr.value)&& (error==0))   
		{ alert('Tiere nicht korrekt');
		document.booking_formular.husdyr.focus();
		error = 1; 
		}
		
	
		
		
	
		
	if(error == 0) 
	  document.booking_formular.submit();	
}


function valider_bookingformular_eng () {
	error = 0;
	
	if((document.booking_formular.navn.value=='') && (error==0))   
		{ 
		alert('Name not valid');
		document.booking_formular.navn.focus();
		error = 1; 
		}
		
	if((document.booking_formular.adresse.value=='') && (error==0))   
		{ alert('Address not valid');
		document.booking_formular.adresse.focus();
		error = 1; 
		}
		
		if((document.booking_formular.postnr.value=='') && (error==0))   
		{ alert('Zipcode not valid');
		document.booking_formular.postnr.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.postnr.value)&& (error==0))   
		{ alert('Zipcode must be a number');
		document.booking_formular.postnr.focus();
		error = 1; 
		}
		
		if((document.booking_formular.by.value=='') && (error==0))   
		{ alert('City not valid');
		document.booking_formular.by.focus();
		error = 1; 
		}
		
		if((document.booking_formular.land.value=='') && (error==0))   
		{ alert('Country not valid');
		document.booking_formular.land.focus();
		error = 1; 
		}
		
		if((document.booking_formular.telefon.value=='') && (error==0))   
		{ alert('Phone not valid');
		document.booking_formular.telefon.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.telefon.value)&& (error==0))   
		{ alert('Phone muse be a number');
		document.booking_formular.telefon.focus();
		error = 1; 
		}

		
		if((document.booking_formular.mobil.value=='') && (error==0))   
		{ alert('Cellphone not valid');
		document.booking_formular.mobil.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.mobil.value)&& (error==0))   
		{ alert('Cellphone must be a number');
		document.booking_formular.mobil.focus();
		error = 1; 
		}
		
		if((document.booking_formular.email.value=='') && (error==0))   
		{ alert('Email not valid');
		document.booking_formular.email.focus();
		error = 1; 
		}
		
		if(!emailCheck(document.booking_formular.email.value) && (error==0))   
		{ alert('Email not valid');
		document.booking_formular.email.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_dag.value=='') && (error==0))   
		{ alert('Arrival day not valid');
		document.booking_formular.ankomst_dag.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_maaned.value=='') && (error==0))   
		{ alert('Arrival month not valid');
		document.booking_formular.ankomst_maaned.focus();
		error = 1; 
		}
		
		if((document.booking_formular.ankomst_aar.value=='') && (error==0))   
		{ alert('Arrival year not valid:');
		document.booking_formular.ankomst_aar.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_dag.value=='') && (error==0))   
		{ alert('Departure day not valid');
		document.booking_formular.afrejse_dag.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_maaned.value=='') && (error==0))   
		{ alert('Departure month not valid');
		document.booking_formular.afrejse_maaned.focus();
		error = 1; 
		}
		
		if((document.booking_formular.afrejse_aar.value=='') && (error==0))   
		{ alert('Departure year not valid');
		document.booking_formular.afrejse_aar.focus();
		error = 1; 
		}
		
		if((document.booking_formular.lejligheder.value=='') && (error==0))   
		{ alert('Apartment(s) not valid');
		document.booking_formular.lejligheder.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.lejligheder.value)&& (error==0))   
		{ alert('Apartment(s) must be a number');
		document.booking_formular.lejligheder.focus();
		error = 1; 
		}
		
		if((document.booking_formular.voksne.value=='') && (error==0))   
		{ alert('Adults not valid');
		document.booking_formular.voksne.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.voksne.value)&& (error==0))   
		{ alert('Adults must be a number');
		document.booking_formular.voksne.focus();
		error = 1; 
		}
		
		if((document.booking_formular.born.value=='') && (error==0))   
		{ alert('Children under 12 years is not valid');
		document.booking_formular.born.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.born.value)&& (error==0))   
		{ alert('Children under 12 years must be a number');
		document.booking_formular.born.focus();
		error = 1; 
		}
		
		if((document.booking_formular.linnedpakker.value=='') && (error==0))   
		{ alert('Bedlinen not valid');
		document.booking_formular.linnedpakker.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.linnedpakker.value)&& (error==0))   
		{ alert('Bedlinen must be a number');
		document.booking_formular.linnedpakker.focus();
		error = 1; 
		}
		
		if((document.booking_formular.barneseng.value=='') && (error==0))   
		{ alert('Children bed and chair not valid');
		document.booking_formular.barneseng.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.barneseng.value)&& (error==0))   
		{ alert('Children bed and chair must be a number');
		document.booking_formular.barneseng.focus();
		error = 1; 
		}
		
		if((document.booking_formular.husdyr.value=='') && (error==0))   
		{ alert('Pets not valid');
		document.booking_formular.husdyr.focus();
		error = 1; 
		}
		
		if(!IsNumeric(document.booking_formular.husdyr.value)&& (error==0))   
		{ alert('Pets must be a number');
		document.booking_formular.husdyr.focus();
		error = 1; 
		}
		
	
		
		
	
		
	if(error == 0) 
	  document.booking_formular.submit();	
}


function IsNumeric(strString) //  check for valid numeric strings	
{
	if(!/\D/.test(strString)) return true;//IF NUMBER
	else if(/^\d+\.\d+$/.test(strString)) return true;//IF A DECIMAL NUMBER HAVING AN INTEGER ON EITHER SIDE OF THE DOT(.)
	else return false;
}

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- V1.1.3: Sandeep V. Tamhankar (stamhankar@hotmail.com) -->
<!-- Original:  Sandeep V. Tamhankar (stamhankar@hotmail.com) -->
<!-- Changes:
/* 1.1.4: Fixed a bug where upper ASCII characters (i.e. accented letters
international characters) were allowed.

1.1.3: Added the restriction to only accept addresses ending in two
letters (interpreted to be a country code) or one of the known
TLDs (com, net, org, edu, int, mil, gov, arpa), including the
new ones (biz, aero, name, coop, info, pro, museum).  One can
easily update the list (if ICANN adds even more TLDs in the
future) by updating the knownDomsPat variable near the
top of the function.  Also, I added a variable at the top
of the function that determines whether or not TLDs should be
checked at all.  This is good if you are using this function
internally (i.e. intranet site) where hostnames don't have to 
conform to W3C standards and thus internal organization e-mail
addresses don't have to either.
Changed some of the logic so that the function will work properly
with Netscape 6.

1.1.2: Fixed a bug where trailing . in e-mail address was passing
(the bug is actually in the weak regexp engine of the browser; I
simplified the regexps to make it work).

1.1.1: Removed restriction that countries must be preceded by a domain,
so abc@host.uk is now legal.  However, there's still the 
restriction that an address must end in a two or three letter
word.

1.1: Rewrote most of the function to conform more closely to RFC 822.

1.0: Original  */
// -->

<!-- Begin
function emailCheck (emailStr) {

/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */


return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {

return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {

return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid


return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {

return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {

return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {

return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {

return false;
}

// If we've gotten this far, everything's valid!
return true;
}

//  End -->

