﻿// File JScript
function deletePlayer(theWrapper, thePlaceholder, thePlayerId) { 
swfobject.removeSWF(thePlayerId);
var tmp=document.getElementById(theWrapper);
if (tmp) { tmp.innerHTML = "<div id='container'></div>"; }
}

function createPlayer(thePlaceholder, thePlayerId, theWidth, theHeight, theFile, theImage,  theLogo, theAutostart, swfName) {
var flashvars = {
config:"",
author:"",
captions:"",
description:"",
duration:"0",
file: theFile, 
image:"/" + theImage, 
start:"0", 
title:"",
type: "video",

controlbar:"bottom",
logo:theLogo, 
playlist:"none", 
playlistsize:"180",  
skin:"",

autostart:theAutostart, 
bufferlength:"1", 
displayclick:"play", 
item:"0",
mute:"false", 
quality:"true", 
repeat:"none", 
shuffle:"false", 
stretching:"uniform",
volume:"90",  

abouttext:"",
aboutlink:"",
linktarget:"_blank",
streamer:"",
tracecall:""
}

var params = {
allowfullscreen:"true", 
allowscriptaccess:"always"
}
var attributes = {
id:thePlayerId,  
name:thePlayerId
}
    swfobject.embedSWF("/" + swfName,thePlaceholder, theWidth, theHeight, "9", false, flashvars, params, attributes);
}

function initPlayer(theFile, theImage, theLogo, theAutostart, swfName, thePlc) {
    if (thePlc == null) {
        thePlc = 'container'; 
    }
    createPlayer(thePlc, 'player1',
                 '640', '500', 
                 theFile, 
                 theImage, 
                 theLogo,
                 theAutostart, swfName)
}

function initSpot(theFile, theContainer, thePlayerId, theWidth, theHeight, fvar, par)
{
    var attributes = {
        id:thePlayerId,  
        name:thePlayerId
    }
    swfobject.embedSWF(theFile, theContainer, theWidth, theHeight, "9", false, fvar, par, attributes);
}

function removeSpot(thePlayerId) {
    swfobject.removeSWF(thePlayerId);
}

function removePlayer() {
    swfobject.removeSWF('player1');    
}
