﻿function ShowPopUpOpacity(strDivName,w,h)
{
    DarkenPage();
    ShowNewsletterPanel(strDivName,w,h);
}

// this function puts the dark screen over the entire page
function DarkenPage()
{
    var page_screen = document.getElementById('page_filter');
    page_screen.style.height = document.body.parentNode.scrollHeight + 'px';
    page_screen.style.display = 'block';
}

function ShowNewsletterPanel(strDivName,w,h)
{
    var newsletter_panel = document.getElementById(strDivName);
    
    // get the x and y coordinates to center the newsletter panel
    xc = Math.round((document.body.clientWidth/2)-(w/2))
    yc = Math.round((document.body.clientHeight/2)-(h/2))
    
    // show the newsletter panel
    newsletter_panel.style.left = xc + "px";
    newsletter_panel.style.top  = yc + "px";
    newsletter_panel.style.display = 'block';
}

function ClosePopUpOpacity(strDivName)
{
    // hide the newsletter panel
    var newsletter_panel = document.getElementById(strDivName);
    newsletter_panel.style.display = 'none';
    // lighten the page again
    LightenPage();
    var obj=document.getElementById('pnlLoginImg');
    if(obj) obj.style.display='none';
}

// this function removes the dark screen and the page is light again
function LightenPage()
{
    var page_screen = document.getElementById('page_filter');
    page_screen.style.display = 'none';
}


function OpenWin(strImg) {
    strImg = '../images/samplesbig/' + strImg;
	var win = window.open("ShowDesign.aspx?path=" + escape(strImg), null ,"height=510,width=850,directories=no,status=no,toolbar=no,resizable=yes,scrollbars=no,menubar=no,top=20,left=50");
	win.focus();
}
			
function popUp(pPage) {
    var winOpts = 'resizeable=no,scrollbars=yes,left=125,top=175,width=700,height=500';
	window.open(pPage,null,winOpts);
}   
        
function popUpHelp() {
    var winOpts = 'resizeable=no,scrollbars=no,left=125,top=175,width=305,height=135';
	window.open('SignUp_Help.aspx',null,winOpts);
} 



