﻿function getSWF(movieName)
{
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
        return window[movieName];
    }
    else
    {
        var testObj = document[movieName];       
        if(document[movieName].length != undefined)
        {
            return document[movieName][1];
        }
        return document[movieName];
    }
}

function video(fileName, autoPlay, videoTitle) 
 {
     movie = document.getElementById("video_pro");
        movie = getSWF("video_pro");

    if(movie){
        movie.SetVariable( "flvloc", fileName ) ;
        movie.SetVariable( "autoVar", autoPlay ) ;
        movie.SetVariable( "getmyname", videoTitle);
        window.setTimeout("playit()",200);
    }
}

function videoHomePage(fileName, autoPlay, videoTitle, height, width) 
 {
     movie = document.getElementById("video_pro");
        movie = getSWF("video_pro");

    if(movie){
        movie.SetVariable( "flvloc", fileName ) ;
        movie.SetVariable( "autoVar", autoPlay ) ;
        movie.SetVariable( "getmyname", videoTitle);
        movie.SetVariable( "height", height ) ;
        movie.SetVariable( "width", width ) ;
        window.setTimeout("playit()",200);
    }
}

function playit(){
    movie.TCallFrame( '/', 0 );
}

var movie = null;
if (!AC_FL_RunContent || AC_FL_RunContent == 0) 
{
    alert("This page requires AC_RunActiveContent.js.");
} 
else 
{
    AC_FL_RunContent(
        'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
       'width', '333',
        'height', '280',
        'src', '/swf/video_pro',
        'quality', 'high',
        'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
        'align', 'middle',
        'play', 'false',
        'loop', 'false',
        'scale', 'showall',
        'wmode', 'window',
        'devicefont', 'false',
        'id', 'video_pro',
        'bgcolor', '#ffffff',
        'name', 'video_pro',
        'menu', 'true',
        'allowFullScreen', 'false',
        'allowScriptAccess','sameDomain',
        'movie', '/swf/video_pro',
        'salign', '',
        //'flashvars','&MM_ComponentVersion=1&skintoUse=swf/customskin.swf&flvloc=&autoPlay=false&autoRewind=false',
        //'flashvars','&skintoUse=/swf/customskin.swf',
        //'flashvars','&MM_ComponentVersion=1&skintoUse=/swf/customskin.swf&autoPlay=false&autoRewind=false',
        'flashvars','&MM_ComponentVersion=1&skintoUse=/swf/customskin.swf&flvloc=/files/void.flv&autoPlay=false&autoRewind=false',
        'allowFullScreen', 'true'
        ); //end AC code

        SWFFormFix("video_pro");   
} 

 
