// <!CDATA[

function ContinueLogin(admin)
{
    DarkenPage();
    ShowWelcome(admin);
}

function ShowWelcome(admin)
{
    var welcome_panel = document.getElementById('welcome_panel');
	var btn;
	if (admin=="rms")
	{
		btn=document.getElementById('newpass');
	}
	else
	{
		btn=document.getElementById('button');
	}
   
    // w is a width of the newsletter panel
    w = 400;
    // h is a height of the newsletter panel
    h = 200;
    
    // 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
    welcome_panel.style.left = xc + "px";
    welcome_panel.style.top  = yc + "px";
    welcome_panel.style.display = 'block';
	btn.focus();
}

function Welcome(admin)
{
    // hide the newsletter panel
    var welcome_panel = document.getElementById('welcome_panel');
    welcome_panel.style.display = 'none';
    // lighten the page again
    LightenPage();
	if(admin=="")
		document.location='index.php';
	else if(admin=="rms")
		document.location='logout.php';
	else
		document.location='leapersadm.php';
}

// 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';
}

// ]]>
