﻿
// This script is used on video pages within iframes on customer+testimonials.asp
// The 'MovieName' var must be set in the video page
// The video page must have an element with an id set to 'container'
// The video pages are in /flash/testimonials

function PlayMovie()
{
    // Stop any other movie that may be playing
    window.parent.StopMovies();
    
    // Build HTML string for Flash movie
    var embed = "<embed src='" + MovieName + ".swf'";
    embed += " name='" + MovieName + "'";
    embed += " quality='high' bgcolor='#104271' width='320' height='280'";
    embed += " align='middle' allowScriptAccess='sameDomain' allowFullScreen='false'";
    embed += " type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
    SetHTML(embed)
}

function StopMovie()
{
    // Build HTML string for splash image
    var img = "<a href='#' onclick='PlayMovie()'><img src='" + MovieName + ".jpg'";
    img += " alt='Click to Play' style='height:280px; width:320px; border:0;' /></a>";
    SetHTML(img);
}

function SetHTML(str)
{
    // Output HTML string
    document.getElementById('container').innerHTML = str
}
