/*Setup code for JTRS website
Coded by Sean Watson of seanowatson.com
May 2007*/

//--------------------------------------------------
var isIE = navigator.appName.indexOf("Microsoft") != -1;
var flashPlayer = "";

//--------------------------------------------------

function advertPlayer(fileName,configFile,dataFile,layer){
var flashPhotoPlayer = new SWFObject(fileName, "PhotoPLayer 1.0", "850px", "310px", "8", "#000000");
flashPhotoPlayer.useExpressInstall('expressinstall.swf');
flashPhotoPlayer.addParam("quality", "high");
flashPhotoPlayer.addParam("wmode", "transparent");
flashPhotoPlayer.addParam("scale", "noscale");
flashPhotoPlayer.addParam("allowScriptAccess","sameDomain" );
//
flashPhotoPlayer.addVariable("title", "JTRS Marketing");
flashPhotoPlayer.addVariable("configFile", configFile);
flashPhotoPlayer.addVariable("xmlData", dataFile);
//
//Write to flash content to layer (div)
flashPhotoPlayer.write(layer);		

}

//--------------------------------------------------

function mediaPlayer(fileName,configFile,dataFile,layer){
var player = new SWFObject(fileName, "MediaPlayer 2.0", "900px", "340px", "8", "#000000");
player.useExpressInstall('expressinstall.swf');
player.addParam("quality", "high");
player.addParam("wmode", "transparent");
player.addParam("scale", "noscale");
player.addParam("allowScriptAccess","sameDomain" );
//
player.addVariable("title", "JTRS Marketing");
player.addVariable("configFile", configFile);
player.addVariable("xmlData", dataFile);
//Write to flash content to layer (div)
player.write(layer);	
}

//--------------------------------------------------

  function playVideo(str) {
var fl = (isIE) ? window[layer] : document[layer];	
 flashPlayer.playVideo(str);
    }
//--------------------------------------------------



