var t = 'username';
var sl = function (o) {
       if (o.value.replace(/\s+$/, '') == t) o.value = '';
}
var el = function (o) {
        if (o.value.replace(/^\s+/, '') == '') o.value = t;
}
var acceptterms = function (o) {
   document.getElementById ('continue').disabled = !o.checked;
}
var iacceptterms = function () {
    if (!document.getElementById ('iaccept').checked) {
        alert ('Du skal acceptere betingelserne');
        return false;
    }
    else {
        return true;
    }
}
var showterms = function () {
    window.open ('/terms.php', '_blank', 'height=800,width=820,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');
    return false;
}
var whatiscvc = function () {
    window.open ('/whatiscvc.php', '_blank', 'height=108,width=234,status=no,toolbar=no,menubar=no,location=no,scrollbars=no');
    return false;
}

var checkpakkebg = function (e) {
    var nl = document.forms.subscription.type;
    for (var i = 0; i < nl.length; i++) { 
        if (nl[i].checked == true) {
            nl[i].parentNode.parentNode.style.backgroundImage = "url('/images/knap-valgt.gif')";
        }
        else {
            nl[i].parentNode.parentNode.style.backgroundImage = "url('/images/knap-ikke-valgt.gif')";
        }
        
    }
    return true;
}
  
  
 
 
