﻿//Envirowise - media player functions
//Version 0.8.3-min - 24 Feb 2010
//Tom Harris, Oxford Internet Consultants
var playerLocation = "/media/mediaplayer/player-licensed.swf", defaultSplashImage = "/images/videoSplash.gif";
function createVideoPlayer(a, c, d, b, e, g, f, i, h) {
    if (h) { if (h == "") h = defaultSplashImage } else h = defaultSplashImage; d = { file: d, id: a, image: h, "captions.file": b, "captions.fontsize": "16", "captions.state": i, "captions.back": "false", "audiodescription.state": "false", "audiodescription.file": e, bufferlength: "10" }; d.plugins = b == "" && e == "" ? "" : b != "" && e != "" ? "captions-1,audiodescription-1" : e == "" ? "captions-1" : "audiodescription-1"; b = {}; b.wmode = "opaque"; b.allowfullscreen = "true"; b.allowscriptaccess = "always"; e = {}; e.id = a; swfobject.embedSWF(playerLocation,
c, g, f, "9.0.0", false, d, b, e)
} function createVideoPlayerAll(a, c, d, b, e, g, f, i) { createVideoPlayer(a, c, d, b, e, g, f, "false", i) } function createAudioPlayerAll(a, c, d, b, e, g) { d = { file: d, id: a, bufferlength: "10" }; if (b != "") d.duration = b; b = {}; b.wmode = "opaque"; b.allowfullscreen = "true"; b.allowscriptaccess = "always"; var f = {}; f.id = a; swfobject.embedSWF(playerLocation, c, e, g, "9.0.0", false, d, b, f) } function increaseVolume(a) { a = document.getElementById(a); var c = a.getConfig().volume; c = Math.min(c + 10, 100); a.sendEvent("VOLUME", c) }
function decreaseVolume(a) { a = document.getElementById(a); var c = a.getConfig().volume; c = Math.max(c - 10, 0); a.sendEvent("VOLUME", c) } function togglePlay(a) { document.getElementById(a).sendEvent("PLAY") } function playerStop(a) { document.getElementById(a).sendEvent("STOP") } function playerMute(a) { document.getElementById(a).sendEvent("MUTE") } function showPanel(a) { $("#" + a).show() } function hidePanel(a) { $("#" + a).hide() } function focusPlayer(a) { $("#" + a).focus() };
