﻿function openWindow(url, windowwidth, windowheight, scrollbar, resize) {

    var left = (screen.width / 2) - (windowwidth / 2);
    var top = (screen.height / 2) - (windowheight / 2);
    var prop;
    prop = 'height=' + windowheight + ',width=' + windowwidth + ', scrollbars=' + scrollbar + ',resizable=' + resize + ',location=0,toolbar=0' + ', top=' + top + ', left=' + left;

    newwindow = window.open(url, 'name', prop);
}

function getMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    } else {
        return document[movieName];
    }
}

function setSize(width, height) {

    //getMovie("flashContent").width = width;
    getMovie("flashContent").height = height;
    window.scrollTo(0, 0);


    if (navigator.appName.indexOf("Microsoft") != -1) {
        window.body.focus();
    } else {
        document.body.focus();
    }


}


function resetSize() {
    getMovie("flashContent").height = "100%";

}
