var hash=location.hash;
if (hash){
    var pathtofile = hash
    pathtofile = pathtofile.replace("#", "")
    //alert(pathtofile)
    //refer to ajax_request.js request
    loadPageContent(pathtofile + '.asp')
}



//Check the enquiry form is filled in correctly
function CheckForm () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a first name
	if (document.frmEnquiry.firstName.value == ""){
		errorMsg += "\n\tFornavn    \t\t- Indtast dit fornavn";	
	}
	
	//Check for a last name
	if (document.frmEnquiry.lastName.value == ""){
		errorMsg += "\n\tEfternavn   \t- Indtast dit efternavn";
	}
	 	
	//Check for an e-mail address and that it is valid
	if ((document.frmEnquiry.email.value == "") || (document.frmEnquiry.email.value.length > 0 && (document.frmEnquiry.email.value.indexOf("@",0) == - 1 || document.frmEnquiry.email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\tE-mail:       \t- Indtast en gyldig E-mail adresse";
	}
			
	//Check for an enquiry
	if (document.frmEnquiry.enquiry.value == "") { 
 		errorMsg += "\n\tSpørgsmål\t- Indtast dit spørgsmål";
	}
		
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Dit spørgsmål er ikke blevet sendt, da der er problemer med din indtastning\n";
		msg += "Vær venlig at rette problemet i formularen\n";
		msg += "______________________________________________________________\n\n";
		msg += "Følgende felter behøves at blive rettet: \n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}

