
function DisplayBlock(p_strElementId) {
    document.getElementById(p_strElementId).style.display = 'block';
}

function DisplayNone(p_strElementId) {
    document.getElementById(p_strElementId).style.display = 'none';
}

function RollOver(p_strImgName, p_strImgSrc) {
    document.getElementById(p_strImgName).src = "/Images/Icons/" + p_strImgSrc;
}

function isEmail(p_strEmail) {
    return p_strEmail.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
}

function changeColor(p_strDiv, p_strColor, p_blnText, p_blnBackground) {
    if (p_blnText) {
        document.getElementById(p_strDiv).style.color = p_strColor
    }
    if (p_blnBackground) {
        document.getElementById(p_strDiv).style.backgroundColor = p_strColor
    }
}

function iFrames(p_strShow) {
    var x = document.getElementsByTagName('iframe');
    for (var i=0;i<x.length;i++) {
        if (p_strShow) {
            x[i].style.display = 'block';
        } else {
            x[i].style.display = 'none';
        }
    }
}

function HideCheckPopup() {
    document.getElementById('PopupContainerCheck').style.display='none';
}

function ShowCheckPopup(p_strPdfUrl) {
    document.getElementById('PopupContainerCheck').style.display = 'block';
    document.getElementById('divContentCheck').style.display = 'block';
    document.getElementById('divErrorCheck').style.display = 'none';    
    document.getElementById('checkAnswerJa').checked = false;
    document.getElementById('checkAnswerNee').checked = false;
    document.getElementById('txtHiddenUrl').value = p_strPdfUrl;
}

function CheckAnswer() {
    if (document.getElementById('checkAnswerJa').checked) {
        window.open('' + document.getElementById('txtHiddenUrl').value + '', '','resizable,scrollbars');
    } else if (document.getElementById('checkAnswerNee').checked) {
        document.getElementById('divContentCheck').style.display = 'none';
        document.getElementById('divErrorCheck').style.display = 'block';
    }
    return false;
}

function ChangeColor(p_strId, p_strColor) {
    document.getElementById(p_strId).style.color = p_strColor;
}