///////////////////// swfPlayerGobalFunctions /////////////////////

var swfFormFixStatus = false;
var swfFormFixDelay = 0;

swfPlayerSetFormFixStatus = function () {
	clearInterval(swfFormFixDelay);
	swfFormFixStatus = true;
}

swfPlayerCheckFormFixStatus = function () {
	return swfFormFixStatus;
}

/////////////////////////// end ////////////////////////


///////////////////// swfPlayerControl /////////////////////

function swfPlayerControl(){}

var _this = swfPlayerControl.prototype = new Object();

_this.constructor			= swfPlayerControl;

_this.className = "swfPlayerControl";

_this.browser = "";

_this.aSwfControls = [];
_this.aSwfPlayerName = [];
_this.aSwfControlStatus = [];

_this.init = function () {

	if (navigator.appName.indexOf("Microsoft") != -1) {
		// IE
		this.browser = "IE";
	} else {
		// FireFox
		this.browser = "FF";
	}
	
}

_this.addSwfControl = function (cControl, cPlayer) {
	this.aSwfControls.push(cControl);
	this.aSwfPlayerName.push(cPlayer);
	this.aSwfControlStatus.push(false);
}

_this.swfFormFixInit = function (cControl) {
	var lOk = true;	
	for (nIndex = 0; nIndex <= this.aSwfControls.length - 1; nIndex = nIndex + 1) {
		if (this.aSwfControls[nIndex] == cControl) {
			this.aSwfControlStatus[nIndex] = true;	
		}
	}
	for (nIndex = 0; nIndex <= this.aSwfControls.length - 1; nIndex = nIndex + 1) {
		if (!this.aSwfControlStatus[nIndex]) {
			lOk = false;
		}			
	}
	if (lOk) {
		//  All form fix requests received
		this.swfFormFixProcessing();
	}
}

_this.swfFormFixProcessing = function(aSwfPlayers) {
	swfFormFixDelay = setInterval( function () {swfPlayerSetFormFixStatus()}, 200);
	if (this.browser == "IE") {
		SWFFormFix(this.aSwfPlayerName[this.aSwfPlayerName.length - 1]);
	}
}			

_this.swfBrowser = function () {
	return this.browser;
}

/////////////////////////// end ////////////////////////


///////////////////// InstallSwf ///////////////

function InstallSwf(){}

var _this = InstallSwf.prototype = new Object();

_this.constructor	= InstallSwf;

_this.className = "InstallSwf";

_this.name;
_this.parent;
_this.version;

_this.playerVersion;
_this.majorVersion;
_this.minorVersion;
_this.releaseVersion;
_this.message;
_this.playerDiv;
_this.minimumMajor;
_this.requiredMajor;
_this.requiredMinor;
_this.requiredRelease;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	this.playerDiv = aPlayer[0];
	this.version = true;
	this.playerVersion 		= swfobject.getFlashPlayerVersion(); 
	this.majorVersion 		= this.playerVersion.major;
	this.minorVersion 		= this.playerVersion.minor;
	this.releaseVersion 	= this.playerVersion.release;	
	this.minimumMajor     = "9";
	this.requiredMajor 		= "9";
	this.requiredMinor    = "0";
	this.requiredRelease  = "124";
	
	if (this.majorVersion < this.minimumMajor) {
		this.message = '<p>In October 2008 we launched a new website.  It looked pretty much like the previous one, but with one big difference - we can now update the acts and news in-house, which means we can keep it bang up to date.</p><br>' 
		this.message = this.message + '<p>It does, however, require the latest version of Flash, which you can download by clicking on this button.</p>'
		this.message = this.message + '<a style="position:absolute; float:left; top:125px; left:120px;" href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>'	
		this.message = this.message + '<br><br><br><br><br><p>If, however, you prefer not to do this, you can still visit our original website by clicking on the following button.</p>'				
		this.message = this.message + '<a href="http://preludeentertainment.compan.net" style="position:absolute; float:left; top:210px; right:15px;" href="#"><img src="images/previouswebsite.png" alt="Enter Previous Website" /></a>'
		document.getElementById(this.playerDiv).style.display='block';
		document.getElementById(this.playerDiv).innerHTML  = this.message	
		this.version = false;
	} else {
		if (this.majorVersion == this.requiredMajor) {
			if (this.releaseVersion < this.requiredRelease) {
				this.message = '<p>In October 2008 we launched a new website.  It looked pretty much like the previous one, but with one big difference - we can now update the acts and news in-house, which means we can keep it bang up to date.</p><br>' 
				this.message = this.message + '<p>It does, however, require the latest version of Flash, which you can download by clicking on this button.</p>'
				this.message = this.message + '<a style="position:absolute; float:left; top:125px; left:120px;" href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>'	
				this.message = this.message + '<br><br><br><br><br><p>If, however, you prefer not to do this, you can still visit our original website by clicking on the following button.</p>'				
				this.message = this.message + '<a href="http://preludeentertainment.compan.net" style="position:absolute; float:left; top:210px; right:15px;" href="#"><img src="images/previouswebsite.png" alt="Enter Previous Website" /></a>'
				document.getElementById(this.playerDiv).style.display='block';
				document.getElementById(this.playerDiv).innerHTML  = this.message
				this.version = false;
			}
		}
	}
}

_this.hide = function () {
	document.getElementById(this.playerDiv).style.display='none';		
}

_this.loaded = function () {
	return this.version;	
}

///////////////////// end ////////////////////////



///////////////////// PreludeClassB ///////////////

function PreludeClassB(){}

var _this = PreludeClassB.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassB;

_this.className = "PreludeClassB";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;
_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;

	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData 		= cXmlData;
	this.xmlContent = cXmlContent;
	
	this.instantiate();
	
}

_this.swfInit = function () {
	this.playerElement.swfInit(this.xmlData, this.xmlContent);			
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		this.playerElement.swfStart();	
		clearInterval(this.delay);
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStop = function () {
	if (this.loaded) {
		this.playerElement.swfStop();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage + "?rnd=" + (new Date()).getTime().toString(), swfClassType:this.playerClassType};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	switch(cStatus) {	
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);		
 			this.swfFormFixInit();	
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 50); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.swfStart();
		// this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		this.swfStart(); 
	}
}

///////////////////// end ////////////////////////


///////////////////// PreludeClassC ///////////////

function PreludeClassC(){}

var _this = PreludeClassC.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassC;

_this.className = "PreludeClassC";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;
_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;
	
	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData 		= cXmlData;
	this.xmlContent = cXmlContent;
	
	this.instantiate();
	
}

_this.swfInit = function () {
	this.playerElement.swfInit(this.xmlData + "?rnd=" + (new Date()).getTime().toString(), this.xmlContent + "&rnd=" + (new Date()).getTime().toString());			
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		this.playerElement.swfStart();	
		clearInterval(this.delay);
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStopTrack = function () {
	if (this.loaded) {
		this.playerElement.swfStopTrack();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage + "?rnd=" + (new Date()).getTime().toString(), swfClassType:this.playerClassType, swfBrowserType:this.browser};
	if(this.browser == "IE") { 
		var swfParameters 	= {wmode:"transparent"};
	} else {
		var swfParameters 	= {};		
	}
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	switch(cStatus) {	
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);		
 			this.swfFormFixInit();	
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 200); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.swfStart(); 
		// this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		this.swfStart(); 
	}
}

///////////////////// end ////////////////////////


///////////////////// PreludeClassD ///////////////

function PreludeClassD(){}

var _this = PreludeClassD.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassD;

_this.className = "PreludeClassD";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;
_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;

	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData 		= cXmlData;
	this.xmlContent = cXmlContent;
	
	this.instantiate();
	
}

_this.swfInit = function () {
	this.playerElement.swfInit(this.xmlData, this.xmlContent);			
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		this.playerElement.swfStart();	
		clearInterval(this.delay);
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStop = function () {
	if (this.loaded) {
		this.playerElement.swfStop();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage + "?rnd=" + (new Date()).getTime().toString(), swfClassType:this.playerClassType};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	switch(cStatus) {	
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);		
 			this.swfFormFixInit();	
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 200); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.swfStart(); 
		// this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		this.swfStart(); 
	}
}

///////////////////// end ////////////////////////


///////////////////// PreludeClassF ///////////////

function PreludeClassF(){}

var _this = PreludeClassF.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassF;

_this.className = "PreludeClassF";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 
_this.containerElement = "null";

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;
_this.delay1;
_this.delay2;
_this.delay3;
_this.delay4;

_this.xmlData;
_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;

	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData 		= cXmlData;
	this.xmlContent = cXmlContent;
	
	this.instantiate();
	
}

_this.swfInit = function () {
	this.playerElement.swfInit(this.xmlData, this.xmlContent);			
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay1 = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		clearInterval(this.delay1);
		this.playerElement.swfStart();	
	}
}

_this.swfStop = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStop();	
	} else {
		this.delay2 = setInterval( function () {self.delayedStop()}, 50); 
	}	
}

_this.delayedStop = function () {
	if (this.loaded) {
		clearInterval(this.delay2);
		this.playerElement.swfStop();	
	}
}

_this.swfShow = function () {

    // set class = ""
    this.containerElement.className = "";
	var self = this;
	if (this.loaded) {
		this.playerElement.swfShow();	
	} else {
		this.delay3 = setInterval( function () {self.delayedShow()}, 50); 
	}	
}

_this.delayedShow = function () {
	if (this.loaded) {
		clearInterval(this.delay3);
		this.playerElement.swfShow();	
	}
}

_this.swfHide = function () {

    // set class = "offScreen"
    this.containerElement.className = "offScreen";
	var self = this;
	if (this.loaded) {
		this.playerElement.swfHide();	
	} else {
		this.delay4 = setInterval( function () {self.delayedHide()}, 50); 
	}	
}

_this.delayedHide = function () {
	if (this.loaded) {
		clearInterval(this.delay4);
		this.playerElement.swfHide();	
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];
	
    this.findContainer();  
	
	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage + "?rnd=" + (new Date()).getTime().toString(), swfClassFype:this.playerClassFype};
 	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	switch(cStatus) {	
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);		
 			this.swfFormFixInit();	
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 50); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		// this.swfStart(); 
	}
}

// AMS 15th Aug 
_this.findContainer = function(){
    var eRef = document.getElementById( this.playerDiv );
    if( eRef ){
        var eParent = eRef.parentNode
        var bNotFound = true;
        while(eParent.parentNode && bNotFound){
            if( eParent.tagName == "DIV" ){
                this.containerElement = eParent;
                bNotFound = false;
            }
        }
    }
}

///////////////////// end ////////////////////////



///////////////////// PreludeClassI ///////////////

function PreludeClassI(){}

var _this = PreludeClassI.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassI;

_this.className = "PreludeClassI";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;

_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;
	
	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);
			
	this.xmlData = cXmlData;
	
	this.xmlContent = cXmlContent;

	this.instantiate();
	
}

_this.swfInit = function () {	
	this.playerElement.swfInit(this.xmlData + "?rnd=" + (new Date()).getTime().toString(), this.xmlContent + "&rnd=" + (new Date()).getTime().toString());					
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		this.playerElement.swfStart();	
		clearInterval(this.delay);
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStop = function () {
	if (this.loaded) {
		this.playerElement.swfStop();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
	
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus"};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl  + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	var self = this; 	
	switch(cStatus) {		
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);
			this.swfFormFixInit();	
			break;
		case "Movie:Instantiated":
			this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 		
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 200); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
	}	

}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		this.swfStart(); 
	}
}

///////////////////// end ////////////////////////


///////////////////// PreludeClassL ///////////////

function PreludeClassL(){}

var _this = PreludeClassL.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassL;

_this.className = "PreludeClassL";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;

_this.xmlContent;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData = cXmlData;
	
	this.xmlContent = cXmlContent;
		
	this.instantiate();
		
}

_this.swfInit = function () {
	var self = this;
	if (this.loaded) {	
		this.playerElement.swfInit(this.xmlData + "?rnd=" + (new Date()).getTime().toString(), this.xmlContent + "&rnd=" + (new Date()).getTime().toString());							
	} else {
		this.delay = setInterval( function () {self.delayedInit()}, 50); 
	}	
}

_this.delayedInit = function () {
	if (this.loaded) {
		clearInterval(this.delay);
		this.playerElement.swfInit(this.xmlData + "?rnd=" + (new Date()).getTime().toString(), this.xmlContent + "&rnd=" + (new Date()).getTime().toString());							
	}
}

_this.swfStart = function () {
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStop = function () {
	if (this.loaded) {
		this.playerElement.swfStop();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();
	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];

}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus"};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);

}

_this.swfStatus = function(cStatus) {
	var self = this; 	
	switch(cStatus) {		
		case "Movie:Loaded":
		 	this.playerElement = document.getElementById(this.playerName);
		 	this.swfFormFixInit();	
 			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}


_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 200); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		this.swfStart(); 
	}
}

///////////////////// end ////////////////////////



///////////////////// PreludeClassS ///////////////

function PreludeClassS(){}

var _this = PreludeClassS.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassS;

_this.className = "PreludeClassS";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;
_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;

	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData 		= cXmlData;
	this.xmlContent = cXmlContent;
	
	this.instantiate();
	
}

_this.swfInit = function () {
	this.playerElement.swfInit(this.xmlData, this.xmlContent);			
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		this.playerElement.swfStart();	
		clearInterval(this.delay);
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStop = function () {
	if (this.loaded) {
		this.playerElement.swfStop();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage + "?rnd=" + (new Date()).getTime().toString(), swfClassSype:this.playerClassSype};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	switch(cStatus) {	
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);		
 			this.swfFormFixInit();	
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 50); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.swfStart(); 
		// this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		// this.swfStart(); 
	}
}

///////////////////// end ////////////////////////



///////////////////// PreludeClassV ///////////////

function PreludeClassV(){}

var _this = PreludeClassV.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassV;

_this.className = "PreludeClassV";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;
_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {
	
	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;

	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData 		= cXmlData;
	this.xmlContent = cXmlContent;
	
	this.instantiate();
	
}

_this.swfInit = function () {
	this.playerElement.swfInit(this.xmlData, this.xmlContent);			
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		this.playerElement.swfStart();	
		clearInterval(this.delay);
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStopVideo = function () {
	if (this.loaded) {
		this.playerElement.swfStop();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage + "?rnd=" + (new Date()).getTime().toString(), swfClassType:this.playerClassType};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	switch(cStatus) {	
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);		
 			this.swfFormFixInit();	
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 50); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.swfStart(); 
		// this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		// this.swfStart(); 
	}
}

///////////////////// end ////////////////////////


///////////////////// PreludeClassT ///////////////

function PreludeClassT(){}

var _this = PreludeClassT.prototype = new swfPlayerControl();

_this.constructor	= PreludeClassT;

_this.className = "PreludeClassT";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.xmlData;
_this.xmlContent;

_this.waitingLetterP;

_this.init = function (cName, aPlayer, cXmlData, cXmlContent) {

	swfPlayerControl.prototype.init.call(this, cName) 

	this.name = cName;
				
	this.loaded = false;

	this.waitingLetterP = 0;

	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	this.setPlayer(aPlayer);

	this.xmlData 		= cXmlData;
	this.xmlContent = cXmlContent;
	
	this.instantiate();
	
}

_this.swfInit = function () {
	this.playerElement.swfInit(this.xmlData, this.xmlContent);			
}

_this.swfStart = function () {
	var self = this;
	if (this.loaded) {
		this.playerElement.swfStart();	
	} else {
		this.delay = setInterval( function () {self.delayedStart()}, 50); 
	}	
}

_this.delayedStart = function () {
	if (this.loaded) {
		this.playerElement.swfStart();	
		clearInterval(this.delay);
	}
}

_this.swfDeletePlayer = function () {	
	if (this.playerElement) {
		this.playerElement.swfReset();
	}
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.swfStop = function () {
	if (this.loaded) {
		this.playerElement.swfStop();
	}
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage + "?rnd=" + (new Date()).getTime().toString(), swfClassType:this.playerClassType};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "";
	swfobject.embedSWF(this.playerUrl + "?rnd=" + (new Date()).getTime().toString(), this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
	
}

_this.swfStatus = function(cStatus) {
	switch(cStatus) {	
		case "Movie:Loaded":	
 			this.playerElement = document.getElementById(this.playerName);		
 			this.swfFormFixInit();	
			break;
		default:
			break;
	}
	this.parent.swfStatus(this.name, cStatus);
}

_this.swfFormFixInit = function () {
	var self = this; 	
	this.formFix = setInterval( function () {self.waitingFormFix()}, 50); 
	this.addSwfControl(this.name, this.playerName);
	swfPlayerControl.prototype.swfFormFixInit.call(this, this.name);
}

_this.waitingFormFix = function () {
	var self = this; 	
	if (swfPlayerCheckFormFixStatus()) {
		clearInterval(this.formFix);
		this.loaded = true;
		this.swfInit();
		this.waitingLetterP = setInterval( function () {self.waitingLetterPFinished()}, 50); 
	}	
}

_this.waitingLetterPFinished = function () {
	if (this.parent.letterPFinished()) {
		clearInterval(this.waitingLetterP);	
		this.swfStart(); 
	}
}

///////////////////// end ////////////////////////


///////////////////// LetterP ///////////////

function LetterP(){}

var _this = LetterP.prototype = new Object();

_this.constructor	= LetterP;

_this.className = "LetterP";

_this.name;
_this.parent;
_this.oPlayer;
_this.playerName;
_this.playerElement;
_this.playerDiv; 
_this.playerRootUrl;
_this.playerUrl; 
_this.playerWidth; 
_this.playerHeight; 
_this.playerVersion; 
_this.playerBackground; 
_this.playerImage;
_this.playerClassType;

_this.pageType;

_this.loaded;
_this.hidden;
_this.formFix;

_this.delay;

_this.init = function (cName, aPlayer, cPageType) {

	this.name = cName;
				
	this.loaded = false;

	this.pageType = cPageType;
		
	if (aPlayer[1].substr(aPlayer[1].length - 1, 1) == "/") {
		this.playerRootUrl = aPlayer[1];	
	} else {
		this.playerRootUrl = aPlayer[1] + "/";		
	}

	 this.setPlayer(aPlayer);
	
	 this.instantiate();
	
}

_this.swfDeletePlayer = function () {	
	swfobject.removeSWF(this.playerDiv);
	delete this.oPlayer;
}

_this.setPlayer = function (aPlayer) {
		
	this.playerDiv 					= aPlayer[0];
	this.playerUrl 					= this.playerRootUrl + aPlayer[2];
	this.playerWidth 				= aPlayer[3];
	this.playerHeight 			= aPlayer[4];
	this.playerVersion 			= aPlayer[5];
	this.playerBackground 	= aPlayer[6];
	this.playerImage 				= this.playerRootUrl + aPlayer[7];

	this.playerName = "";
	var cTemp = this.playerUrl.toLowerCase();

	var aParts = cTemp.split("/");
	var cName = aParts[aParts.length - 1].replace(".swf", "");
	if ( typeof top[cName] == "undefined") {
		top[cName] = 0;
	}
	top[cName] = top[cName] + 1;
	this.playerName = cName + top[cName];
}

_this.instantiate = function ( ) {
		
	var swfVariables 		= {swfCallBack:this.name + ".swfStatus", swfImage:this.playerImage, swfPageType:this.pageType};
	var swfParameters 	= {wmode:"transparent"};
	var swfAttributes 	= {id:this.playerName, name:this.playerName};
	var swfInstall			= "expressInstall.swf";
	swfobject.embedSWF(this.playerUrl, this.playerDiv, this.playerWidth, this.playerHeight, this.playerVersion, swfInstall, swfVariables, swfParameters, swfAttributes);
		
}

_this.swfStatus = function(cStatus) {
	this.parent.swfStatus(this.name, cStatus);
}

///////////////////// end ////////////////////////
