﻿function OpenIframe(url)
{
    scroll(0,0);
    var div=document.createElement("div");
    div.id="divIframe";
    div.className="divIframe";
    
    var iframe=document.createElement('iframe');
    iframe.src=url+"&iframe=1";
    if(url.match('Banner/Update.aspx')=='Banner/Update.aspx')
    {
        iframe.style.height="665px";
    }
    else if(url.match('News/Update.aspx')=='News/Update.aspx')
    {
        iframe.style.height="525px";
        iframe.style.marginTop="45px";
    }
    else if(url.match('FooterContents/Search.aspx')=='FooterContents/Search.aspx')
    {
        iframe.style.height="600px";
        iframe.style.marginTop="7px";
    }
    else if(url.match('Services/Services.aspx')=='Services/Services.aspx' || 
        url.match('Section/Section.aspx')=='Section/Section.aspx')
    {
        iframe.style.height="590px";
        iframe.style.marginTop="6px";
    }
    else if(url.match('Modules/Update.aspx')=='Modules/Update.aspx')
        iframe.style.height="1800px";
    else if(url.match('Download/Update.aspx')=='Download/Update.aspx')
        iframe.style.height="1480px";
    else
        iframe.style.height="1000px";
    div.appendChild(iframe);
    document.getElementById('aspnetForm').appendChild(div);
    document.body.style.overflow="hidden";
}
function refreshParent(isRefresh)
{
    document.getElementById('aspnetForm').removeChild(document.getElementById('divIframe'));
    document.body.style.overflow="auto";
    if(isRefresh=="true")
        window.location=window.location;
}
