﻿function ShowPopForm(FormURL, CSSCLass) 
{
    var lightBoxOuter = document.getElementById('light_outer');
    var OverLay = document.getElementById('fade');
    var iframePopform = document.getElementById('iframePopform');

    lightBoxOuter.className = CSSCLass;
    lightBoxOuter.style.display = 'block';
    OverLay.style.display = 'block';
    OverLay.style.height = getDocHeight() + 'px';
    iframePopform.src = FormURL;
    window.scrollTo(0, 0);
}

function HidePopForm()
{
    document.getElementById('light_outer').style.display = 'none';
    document.getElementById('fade').style.display='none';
}

function getDocHeight() 
{
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}