/*
Filename: kofc.js
*/



function KofC_OpenNewWindow(url,type,name,w,h) {
    var type;
    var new_win;
    var features;
    var toolbar;
    var location;
    var statusbar;
    var menubar;
    var resizable;
    var scrollbars;
    type = type.toLowerCase();
    if (type == 'html') {
        h=h-50;
        toolbar = 1;
        location = 1;
        statusbar = 1;
        menubar = 1;
        resizable = 'yes';
        scrollbars = 1;
        features =
        'height=' + h + ',' +
        'width=' + w + ',' +
        'top=' + (screen.height - h)/6 + ',' +
        'left=' + (screen.width - w)/2 + ',' +
        'toolbar=' + toolbar + ',' +
        'location=' + location + ',' +
        'statusbar=' + statusbar + ',' +
        'menubar=' + menubar + ',' +
        'resizable=' + resizable + ',' +
        'scrollbars=' + scrollbars;
    }
    else if (type == 'media') {
        toolbar = 0;
        location = 0;
        statusbar = 1;
        menubar = 0;
        resizable = 'no';
        scrollbars = 1;
        features =
        'height=' + h + ',' +
        'width=' + w + ',' +
        'top=' + (screen.height - h)/2 + ',' +
        'left=' + (screen.width - w)/2 + ',' +
        'toolbar=' + toolbar + ',' +
        'location=' + location + ',' +
        'statusbar=' + statusbar + ',' +
        'menubar=' + menubar + ',' +
        'resizable=' + resizable + ',' +
        'scrollbars=' + scrollbars;
    }
    else if (type == 'warning') {
        toolbar = 0;
        location = 0;
        statusbar = 1;
        menubar = 0;
        resizable = 'no';
        scrollbars = 1;
        features =
        'height=400' + ',' +
        'width=600' + ',' +
        'top=' + (screen.height - h)/2 + ',' +
        'left=' + (screen.width - w)/2 + ',' +
        'toolbar=' + toolbar + ',' +
        'location=' + location + ',' +
        'statusbar=' + statusbar + ',' +
        'menubar=' + menubar + ',' +
        'resizable=' + resizable + ',' +
        'scrollbars=' + scrollbars;
    }
    else if (type == 'flash') {
        toolbar = 0;
        location = 0;
        statusbar = 1;
        menubar = 0;
        resizable = 'no';
        scrollbars = 0;
        features =
        'height=' + h + ',' +
        'width=' + w + ',' +
        'top=' + (screen.height - h)/2 + ',' +
        'left=' + (screen.width - w)/2 + ',' +
        'toolbar=' + toolbar + ',' +
        'location=' + location + ',' +
        'statusbar=' + statusbar + ',' +
        'menubar=' + menubar + ',' +
        'resizable=' + resizable + ',' +
        'scrollbars=' + scrollbars;
    }
    else {
        toolbar = 0;
        location = 1;
        statusbar = 0;
        menubar = 0;
        resizable = 'yes';
        scrollbars = 1;
        features =
        'height=' + h + ',' +
        'width=' + w + ',' +
        'top=' + (screen.height - h)/4 + ',' +
        'left=' + (screen.width - w)/2 + ',' +
        'toolbar=' + toolbar + ',' +
        'location=' + location + ',' +
        'statusbar=' + statusbar + ',' +
        'menubar=' + menubar + ',' +
        'resizable=' + resizable + ',' +
        'scrollbars=' + scrollbars;
    }

    new_win = window.open(url,name,features) ;
    new_win.focus();
}

