// These functions are caught by the feeder object of the player.
function sendEvent(typ,prm) { thisMovie("player2").sendEvent(typ,prm); };
function loadFile(obj) { thisMovie("player2").loadFile(obj); };
function addItem(obj,idx) { thisMovie("player2").addItem(obj,idx); }
	function removeItem(idx) { thisMovie("player2").removeItem(idx); }
	function getItemData(idx) {
		var obj = thisMovie("player2").itemData(idx);
		var nodes = "";
		for(var i in obj) {
			nodes += "<li>"+i+": "+obj[i]+"</li>";
		}
	};
// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};

function controlPlayer(func,param) {
	thisMovie("player2").jsControl(func,param);
}

var currentState;

function getUpdate(typ, pr1, pr2, swf)
{
  if((typ == 'state') && (swf == 'jstest'))
  {
	var currentState = pr1;
  }
};

function loadAndPlay (obj) {
	
	loadFile (obj);
	
	if(currentState != 2) {
		
		thisMovie("player2").sendEvent('playpause');
		
 	}
	
};

var addthis_pub = 'cato_webmaster';