var currentItem;

function getUpdate(typ,pr1,pr2,pid) {
if(typ == "item") { currentItem = pr1; setTimeout("getItemData(currentItem)",100); }
};
                
function getItemData(idx) {
var obj = thisMovie("playerId").itemData(idx);
document.getElementById("annotation").innerHTML = obj["description"]; 
document.getElementById("annotation2").innerHTML = obj["description"]; 
};
                
function thisMovie(movieName) {
if(navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
return document[movieName];
}
};
                
function createplayer(theFile, go) {
var s = new SWFObject("../Flash/WatchandListen/v4/mediaplayer.swf","playerId","643","340","7");
s.addVariable("file",encodeURIComponent(theFile));
s.addParam("allowfullscreen","true");							// added to allow full screen
s.addVariable("fullscreen","true");								// added to set full screen icon to visible
s.write("placeholder");
}

function swapblogid(theFile2, go) { 
var s2 = new SWFObject("../Flash/WatchandListen/BlogSelector/Selector.swf","single","550","80","7"); 
s2.addVariable("xmlfile",theFile2);
if (go) { s2.addVariable("autostart","false"); } 
s2.write("blogselector"); } 

function init () {
createplayer('rs.aspx?MinistryID=24', true);
swapblogid('../playlists/blogid.xml', true);
}	
