function mo_OpenLogin(){
    if (!$('mo_login_box').visible()) {
        var menu_pos = $('mo_header').cumulativeOffset();
        var horPos = menu_pos[0] + $('mo_header').getWidth() - $('mo_login_box').getWidth() - 20;
        
        $('mo_login_box').style.left = horPos + "px";
        $('mo_login_box').style.top = menu_pos[1] + "px";
        
        Effect.SlideDown('mo_login_box', {
            duration: 0.25
        });
    }
    else {
        mo_CloseLogin();
    }
}

function mo_CloseLogin(){
    if ($('mo_login_box').visible()) {
        Effect.SlideUp('mo_login_box', {
            duration: 0.25
        });
    }
}

function mo_OpenForgot(){
    if (!$('mo_forgot_box').visible()) {
        var menu_pos = $('mo_header').cumulativeOffset();
        var horPos = menu_pos[0] + $('mo_header').getWidth() - $('mo_forgot_box').getWidth() - 20;
        
        $('mo_forgot_box').style.left = horPos + "px";
        $('mo_forgot_box').style.top = menu_pos[1] + "px";
        
        Effect.SlideDown('mo_forgot_box', {
            duration: 0.25
        });
    }
    else {
        mo_CloseForgot();
    }
}

function mo_CloseForgot(){
    if ($('mo_forgot_box').visible()) {
        Effect.SlideUp('mo_forgot_box', {
            duration: 0.25
        });
    }
}



function mo_OpenShareEmail(){
    if (!$('mo_share_box').visible()) {
        var menu_pos = $('mo_header').cumulativeOffset();
        var horPos = menu_pos[0] + $('mo_header').getWidth() - $('mo_share_box').getWidth() - 20;
        
        $('mo_share_box').style.left = horPos + "px";
        $('mo_share_box').style.top = menu_pos[1] + "px";
        
        Effect.SlideDown('mo_share_box', {
            duration: 0.25
        });
		
		document.getElementById('inputMailPage').value=location.href;
		document.getElementById('inputMailTitle').value=document.title;
    }
    else {
        mo_CloseShareMail();
    }
}

function mo_CloseShareMail(){
    if ($('mo_share_box').visible()) {
        Effect.SlideUp('mo_share_box', {
            duration: 0.25
        });
    }
}



