function isIE4()
{
        return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}

function little_window(newurl)
{
        littlewin = window.open(newurl, 'LittleWindow', 'scrollbars=yes,resizable=yes,width=620,height=460') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        littlewin.focus() ;
                }
        }

        if (littlewin.opener == null) littlewin.opener = window ;
        littlewin.opener.name = "StaMain" ;
}

function med_window(newurl)
{
        medwin = window.open(newurl, 'MedWindow', 'scrollbars=yes,resizable=yes,width=685,height=550') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        medwin.focus() ;
                }
        }

        if (medwin.opener == null) medwin.opener = window ;
        medwin.opener.name = "StaMain" ;
}

function big_window(newurl)
{
        bigwin = window.open(newurl, 'BigWindow', 'scrollbars=yes,resizable=yes,width=850,height=650') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        bigwin.focus() ;
                }
        }

        if (bigwin.opener == null) bigwin.opener = window ;
        bigwin.opener.name = "StaMain" ;
}

function xlg_window(newurl)
{
        xlgwin = window.open(newurl, 'XlgWindow', 'scrollbars=yes,resizable=yes,width=970,height=770') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        xlgwin.focus() ;
                }
        }

        if (xlgwin.opener == null) xlgwin.opener = window ;
        xlgwin.opener.name = "StaMain" ;
}

function xxlg_window(newurl)
{
        xxlgwin = window.open(newurl, 'XXlgWindow', 'scrollbars=yes,resizable=yes,width=1100,height=800') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        xxlgwin.focus() ;
                }
        }

        if (xxlgwin.opener == null) xxlgwin.opener = window ;
        xxlgwin.opener.name = "StaMain" ;
}

function xlbook_window(newurl)
{
       xlbookwin = window.open(newurl, 'XlBookWindow', 'scrollbars=yes,resizable=yes,width=900,height=1200') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        xlbookwin.focus() ;
                }
        }

        if (xlbookwin.opener == null) xlbookwin.opener = window ;
        xlbookwin.opener.name = "StaMain" ;
}

function book_window(newurl)
{
       bookwin = window.open(newurl, 'BookWindow', 'scrollbars=yes,resizable=yes,width=650,height=850') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        bookwin.focus() ;
                }
        }

        if (bookwin.opener == null) bookwin.opener = window ;
        bookwin.opener.name = "StaMain" ;
}

function cap_win(newurl)
{
       capwin = window.open(newurl, 'CapWindow', 'toolbar=no,location=no,directories=no,menu=no,scrollbars=yes,resizable=yes,width=675,height=400') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        capwin.focus() ;
                }
        }

        if (capwin.opener == null) capwin.opener = window ;
        capwin.opener.name = "StaMain" ;
}

function caps_win(newurl)
{
       capswin = window.open(newurl, 'CapsWindow', 'toolbar=no,location=no,directories=no,menu=no,scrollbars=yes,resizable=yes,width=300,height=350') ;
        if ( !isIE4() ) {
                if (window.focus) {
                        capswin.focus() ;
                }
        }

        if (capswin.opener == null) capswin.opener = window ;
        capswin.opener.name = "StaMain" ;
}

function custom_window(newurl, width, height)
{
        customwin = window.open(newurl, 'CustomWindow', 'scrollbars=yes,resizable=yes,width=' + width + ',height=' + height) ;
        if ( !isIE4() ) {
                if (window.focus) {
                        customwin.focus() ;
                }
        }

        if (customwin.opener == null) customwin.opener = window ;
        customwin.opener.name = "StaMain" ;
}
