function checkForm(theForm)
{
    
    //check if vi are at the contact page
    if (true == false)
    {
        var snValue = theForm.elements['txtName'].value;
        var dtValue = theForm.elements['txtPhone'].value;
	    var emValue = theForm.elements['txtEmail'].value;
	    var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
    	
        if (snValue == "")
        {
	        alert('Indtast venligst dit navn!'); 	
	        return false;
	    }

        if (dtValue == "")
        {
	        alert("Indtast venligst dit telefonnummer!"); 	
	        return false;
	    }

        if (emValue == "")
        {
	        alert("Indtast venligst din e-mailadresse!");
	        return false;
	    }
        if (filter.test(emValue)== false)
        {
	        alert("Indtast venligst en korrekt e-mailadresse!");
	        return false;
	    }
        else return true;
    } 
    
    
	
}


function ContactResponse()
{
   document.getElementById('contact').style.display = "none";
}



function ExpandBox(headerRow, rows, buttonToShow, buttonToHide)
{
    if(headerRow != '')
    {
        document.getElementById(headerRow).style.display = '';
    }
    if(rows != '')
    {
        document.getElementById(rows).style.display = '';
    }
    document.getElementById(buttonToShow).style.display = '';
    document.getElementById(buttonToHide).style.display = 'none';
    
}
function FoldBox(headerRow, rows, buttonToShow, buttonToHide)
{
    if(headerRow != '')
    {
        document.getElementById(headerRow).style.display = 'none';
    }
    if(rows != '')
    {
        document.getElementById(rows).style.display = 'none';
    }
    document.getElementById(buttonToShow).style.display = '';
    document.getElementById(buttonToHide).style.display = 'none';
}

function Redirect(url)
{
    window.location = url;
}