function SignInForLogin()
{
    DarkenPage();
    ShowPanel();
}

function ShowPanel()
{
    var panel = document.getElementById('login_panel');
    
    // w is a width of the  panel
    w = 300;
    // h is a height of the  panel
    h = 300;
    
    // get the x and y coordinates to center the  panel
    xc = Math.round((document.body.clientWidth/2)-(w/2))
    yc = Math.round((document.body.clientHeight/2)-(h/2))
    
    // show the newsletter panel
    panel.style.left = xc + "px";
    panel.style.top  = yc + "px";
    panel.style.display = 'block';
}

function SignIn()
{
    // hide the  panel
    var panel = document.getElementById('login_panel');
    panel.style.display = 'none';
    // lighten the page again
    LightenPage();
}

// 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.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';
}

