﻿function openReader(bookId)
{
    var r = window.open('../Student/Reader.aspx?bookId=' + bookId, 'reader', 'width=1000, height=600, status=0, location=0, toolbar=0');
    
    if(window.focus)
        r.focus()
}

function openAssignment(bookId)
{
    var a = window.open('../Services/Book/Assignment.ashx?bookId=' + bookId, 'assignment', 'width=800, height=600, status=0, location=0, toolbar=0');    

    if (window.focus)
        a.focus()
}

function openFAQ()
{
    var f = window.open('../Pages/Faq.aspx', 'faq', 'width=800, height=600, status=0, location=0, toolbar=0, scrollbars=yes');

    if (window.focus)
        f.focus()
}

function fullScreen()
{
    //if(confirm('Fullscreen?'))
    {
        top.window.moveTo(0, 0);

        if (document.all)
        {
            top.window.resizeTo(screen.availWidth, screen.availHeight);
        }
        else if (document.layers || document.getElementById)
        {
            if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth)
            {
                top.window.outerHeight = screen.availHeight;
                top.window.outerWidth = screen.availWidth;
            }
        }
    }
}


function gotoStudentSite()
{
    document.getElementById('gotStudentSitedialogbox').style.display = 'block';

    return false;
}

function go(pre)
{
    clsId = document.getElementById(clsddl).value;

    if (clsId == "-1")
        return;
        
    document.getElementById('gotStudentSitedialogbox').style.display = 'none';

    var s = window.open(pre + 'Student/?classId=' + clsId, 'Superbog', '');

    if (window.focus)
        s.focus();
}

function abort()
{
    document.getElementById('gotStudentSitedialogbox').style.display = 'none';
}
