// these functions are caught by the JavascriptView object of the player.
function sendEvent(typ,prm) { thisMovie("mpl").sendEvent(typ,prm); };
function sendEvent1(typ,prm,jjjid) { thisMovie(jjjid).sendEvent(typ,prm); };


// These functions are caught by the feeder object of the player.
function loadFile(obj) { thisMovie("mpl").loadFile(obj); };
function loadFile1(obj,jjid) { thisMovie(jjid).loadFile(obj); };

// 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 movieupdate (divid,dsptxt,currentid,numvid,list,cls_on,cls_off) {
	if(!cls_on) cls_on = "cld";
	if(!cls_off) cls_off = "";
	if(!list) list = 'li';

	for(x=1;x<=numvid;x++) {
		document.getElementById(list+'_'+x).className=cls_off;			
	}
	document.getElementById(list+'_'+currentid).className=cls_on;
	
	document.getElementById(divid).innerHTML = dsptxt;
}


function ThePlayer (plr,pid,section,vid,img) {
var s1 = new SWFObject('/common2/videos/flvplayer.swf','mpl','480','360','7');
s1.addParam('allowfullscreen','true');
s1.addParam('menu','false');
s1.addParam('allowscriptaccess','always');
s1.addVariable('displayheight','360');
s1.addVariable('file','/common2/videos/'+section+'/'+pid+'/'+vid);
s1.addVariable("image",'/common2/videos/'+section+'/'+pid+'/'+img);
s1.addVariable('frontcolor','0x353535');
s1.addVariable("enablejs","true");
s1.addVariable("javascriptid","mpl");
s1.addVariable('lightcolor','0x757575');
s1.addVariable('height','460');
s1.addVariable('thumbsinplaylist','true');
//s1.addVariable("logo", "logo1.png");
s1.addVariable('width','480');
s1.write(plr);
}

function playerpackages (plr,pid,section,vid,img,jaid) {
var s1 = new SWFObject('/common2/videos/flvplayer.swf','mpl_'+jaid,'400','300','7');
s1.addParam('allowfullscreen','true');
s1.addParam('menu','false');
s1.addParam('allowscriptaccess','always');
s1.addVariable('displayheight','300');
s1.addVariable('file','/common2/videos/'+section+'/'+pid+'/'+vid);
s1.addVariable("image",'/common2/videos/'+section+'/'+pid+'/'+img);
s1.addVariable('frontcolor','0x353535');
s1.addVariable("enablejs","true");
s1.addVariable("javascriptid",'mpl_'+jaid);
s1.addVariable('lightcolor','0x757575');
s1.addVariable('height','400');
s1.addVariable('thumbsinplaylist','true');
s1.addVariable('width','400');
s1.write(plr);
}

function indiplayer (plr,vid,vwid,vheight,fheight) {
var s1 = new SWFObject('/common2/videos/flvplayer_indi.swf','mpl',vwid,fheight,'7');
s1.addParam('allowfullscreen','true');
s1.addParam('menu','false');
s1.addParam('allowscriptaccess','always');
s1.addVariable('displayheight',vheight);
s1.addVariable('file','/common2/videos/other/'+vid);
//s1.addVariable("image",'/common2/videos/'+section+'/'+pid+'/'+img);
s1.addVariable('frontcolor','0x353535');
s1.addVariable("enablejs","true");
s1.addVariable("javascriptid","mpl");
s1.addVariable('lightcolor','0x757575');
s1.addVariable('height',fheight);
s1.addVariable('thumbsinplaylist','true');
//s1.addVariable("logo", "logo1.png");
s1.addVariable('width',vwid);
s1.write(plr);
}

function MyMediaPlayer (plr,pid,section,vid,img) {
var s1 = new SWFObject('/common2/videos/flvplayer.swf','mpl','480','360','7');
s1.addParam('allowfullscreen','true');
s1.addParam('menu','false');
s1.addParam('allowscriptaccess','always');
s1.addVariable('displayheight','360');
s1.addVariable('file','/common2/videos/'+section+'/'+pid+'/'+vid);
s1.addVariable("image",'/common2/videos/'+section+'/'+pid+'/'+img);
s1.addVariable('frontcolor','0x353535');
s1.addVariable("enablejs","true");
s1.addVariable("javascriptid","mpl");
s1.addVariable('lightcolor','0x757575');
s1.addVariable('height','460');
s1.addVariable('thumbsinplaylist','true');
//s1.addVariable("logo", "logo1.png");
s1.addVariable('width','480');
s1.write(plr);
}

function MyMediaPlayer (plr,vid,img) {
var s1 = new SWFObject('/common2/videos/flvplayer.swf','mpl','480','360','7');
s1.addParam('allowfullscreen','true');
s1.addParam('menu','false');
s1.addParam('allowscriptaccess','always');
s1.addVariable('displayheight','360');
s1.addVariable('file',vid);
s1.addVariable("image",img);
s1.addVariable('frontcolor','0x353535');
s1.addVariable("enablejs","true");
s1.addVariable("javascriptid","mpl");
s1.addVariable('lightcolor','0x757575');
s1.addVariable('height','460');
s1.addVariable('thumbsinplaylist','true');
//s1.addVariable("logo", "logo1.png");
s1.addVariable('width','480');
s1.write(plr);
}

