﻿// JScript File
function thisMovie(movieName) {
    if (window.document[movieName]) {
        return window.document[movieName];
    }
    
    if (navigator.appName.indexOf("Microsoft Internet")==-1) {
        if (document.embeds && document.embeds[movieName]) {
            return document.embeds[movieName];
        }
    } else {
        if (document.getElementById(movieName)) {
            return document.getElementById(movieName);
        } else {
            return null;
        }
    }
}

function playMovie(movie, splashScreen, videoPlayerName) {
    if (thisMovie(videoPlayerName) != null) {
        thisMovie(videoPlayerName).playVideo(movie, splashScreen, true);
    }
}

function playMovie2(movie, splashScreen, videoPlayerName, splashOverlay1, splashOverlayPosition1, splashOverlayFit1) {
    if (thisMovie(videoPlayerName) != null) {
        thisMovie(videoPlayerName).playVideo2(movie, splashScreen, true, splashOverlay1, splashOverlayPosition1, splashOverlayFit1);
    }
}

function playMovie3(movie, splashScreen, videoPlayerName, splashOverlay1, splashOverlayPosition1, splashOverlayFit1, splashOverlay2, splashOverlayPosition2, splashOverlayFit2) {
    if (thisMovie(videoPlayerName) != null) {
        thisMovie(videoPlayerName).playVideo3(movie, splashScreen, true, splashOverlay1, splashOverlayPosition1, splashOverlayFit1, splashOverlay2, splashOverlayPosition2, splashOverlayFit2);
    }
}

function playMovieKeepOverlay(movie, splashScreen, videoPlayerName) {
    if (thisMovie(videoPlayerName) != null) {
        thisMovie(videoPlayerName).playMovieKeepOverlay(movie, splashScreen, true);
    }
}

function stopMovie(videoPlayerName) {
    if (thisMovie(videoPlayerName) != null) {
        thisMovie(videoPlayerName).stopVideo();
    }
}
