// JavaScript Document
// <!CDATA[

function Login(div_id)
{
    DarkenPage();
    ShowLoginPanel(div_id);
}

function ShowLoginPanel(div_id)
{
    var login_panel = document.getElementById(div_id);
    
    w = 400;
    h = 50;
    
    // get the x and y coordinates to center 
    xc = Math.round((document.body.clientWidth/2)-(w/2))
    yc = 180
    
    // show the newsletter panel
    login_panel.style.left = xc + "px";
    login_panel.style.top  = yc + "px";
    login_panel.style.display = 'block';
}

// this function puts the dark screen over the entire page
function DarkenPage()
{
    var page_screen = document.getElementById('page_screen');
    page_screen.style.height = document.body.parentNode.scrollHeight + 'px';
    page_screen.style.width = document.body.parentNode.scrollWidth + 'px';
    page_screen.style.display = 'block';
}

// this function removes the dark screen and the page is light again
function LightenPage()
{
    var page_screen = document.getElementById('page_screen');
    page_screen.style.display = 'none';
}

function LoginCancel(div_id)
{
    var login_panel = document.getElementById(div_id);
    login_panel.style.display = 'none';
	
    //document.getElementById('login_error').style.display = 'none';
	// lighten the page again
    LightenPage();
}