function validateForm() 
{
    //Check for empty fields
    if (document.forms[0].PersonNumber.value == '')
        {
        alert("Du måste fylla i alla fält!");
        return false;
    }
    else
    {
   //Check if rules are accepted
        if( !document.forms[0].Medlemsvillkor.checked )
        {
                alert("Du måste acceptera medlemsreglerna innan du kan gå vidare");
                //By returning false the users form data wont be lost in case of an error message
                return false;
        }
        else
        {
                document.forms[0].action = "mailer.asp";
   }

    }
}
	
function popenup(url) {
	newwindow=window.open(url,'name', 'height=630, width=710');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popup(url) {
	newwindow=window.open(url,'name','height=550,width=350');
	if (window.focus) {newwindow.focus()}
	return false;

}
