﻿/*
    Name        :       Resource Center flash code
    Author      :       GregJ (Baudville)
    Date        :       1/22/2009
*/

//JavaScript Variables that will be referenced in the viewer initialization and viewer argument list
var myName=genInstance();	//This needs to match the ID and NAME in the flash initialization below.  This is generated randomly dependant on curent time in order to prevent multiple page instances from interfering with each other by having the same instance name declared
var viewerType = "videoplayer";  //this can be changed to basiczoom, genericspin, or genericbrochure but make sure that the parameter references are valid for any other viewer type utilized
   
var videoName = "Baudville/Videos/Baudville/RC_HOME_VIDEO_CRONICALS.flv";  //Image, ImageSet, or comma seperated list of Company/Image to pass to the viewer
var configName = "Baudville/DefaultViewerConfig.xml";  //Viewer configuration settings to use at viewer initialization

var flashvars = {
				}; 
				
var params = {     //Setup param tag elements for the flash object to embed in the page 
	allowScriptAccess:"sameDomain",
	menu:"false",
	quality:"high",
	scale:"noscale",
	salign:"LT",
	bgcolor:"#333333",
	wmode: "transparent"
};  

var attributes = {  //Setup object tag elements for the flash object to embed in the page
	id: myName,
	name: myName
};

var viewerUrl = "";  //Build Viewer Path to Viewer swf
viewerUrl += S7Config.isViewerRoot;
viewerUrl += "flash/" + viewerType + ".swf?";
viewerUrl += "&contentroot=" + S7Config.contentRoot + "e2/";
viewerUrl += "&instanceName=" + myName;
viewerUrl += "&encodingXml=" + S7Config.contentRoot + "e2/" + videoName + ".xml";
//viewerUrl += "&viewerXML=" + S7Config.contentRoot + "e2/";
		
swfobject.embedSWF(viewerUrl, "myContent", "500", "265", "7.0.14.0", false, flashvars, params, attributes);  //Add Viewer to page into the myContent div element, at 600 x 600 pixels, checking for flash version 6,0,65 before allowing initialization to proceed, otherwise show the default div content
