if (!libLoc)
	var libLoc = "http://lib2.sesalos.com/flash/unisite/";

function playAudio (f) {
	var mp3 = '';
	
	mp3 += '<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>';
	//id("mediaPop").innerHTML = mp3;
	//var s1 = new SWFObject("jw_mp3_player/mp3player.swf", "single", "240", "20", "7");
	var s1 = new SWFObject(libLoc+"flash/unisite/swf/mp3player.swf", "single", "240", "20", "7");
	s1.addVariable("file",f);
	s1.addVariable("autostart","true");
	s1.addVariable("logo","false");
	s1.addVariable("repeat","false");
	
	s1.addVariable("displayheight","0");
	s1.addVariable("backcolor","0xFFFFFF");
	s1.addVariable("frontcolor","0x555555");
	s1.addVariable("lightcolor","0x000000");
	
	id("mediaPop").style.width = "280px";
	//var xtop = parseFloat((xClientHeight()+xScrollTop())/2);
	var xtop = parseFloat(((xClientHeight()/2)-(70))+xScrollTop());
	xtop = (xtop > 0) ? xtop : 0;
	id("mediaPop").style.top = xtop+"px";
	id("mediaPop").style.left = parseFloat((xClientWidth()/2)-120)+"px";
	s1.write("mediaDrop");
	id("mediaPop").style.display = "block"
}
function playFLV (f, w, h) {
	var flv = '';
	flv += '<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>';
	//id("mediaPop").innerHTML = flv;
	
	//var s1 = new SWFObject("jw_flv_player/flvplayer.swf","single",w,parseInt(h+20),"7");
	var s1 = new SWFObject(libLoc+"flash/unisite/swf/flvplayer.swf","single",w,h,"7");
	s1.addParam("allowfullscreen","true");
	s1.addVariable("autostart","true");
	s1.addVariable("logo","false");
	s1.addVariable("repeat","false");
	
	s1.addVariable("backcolor","0xFFFFFF");
	s1.addVariable("frontcolor","0x555555");
	s1.addVariable("lightcolor","0x000000");

	//s1.addVariable("file",String("../"+f));
	s1.addVariable("file",base+String(f));
	s1.addVariable("image","http://vc.sesalos.com/scripts/pagestuff/nopage.php?page=images/flv-preview.jpg&amp;id=328&amp;currentURL=new.access.co.za.dedi134.cpt2.host-h.net");
	
	id("mediaPop").style.width = w+"px";
	var xtop = parseFloat(((xClientHeight()/2)-(h/2))+(xScrollTop()-70));
	xtop = (xtop > 0) ? xtop : 0;
	xtop = ((xtop + h) > (xClientHeight() + xScrollTop())) ? ((xClientHeight()+xScrollTop())-(h+70)) : xtop;
	id("mediaPop").style.top = (screen.height /2) + "px";
	id("mediaPop").style.left = parseFloat((xClientWidth()/2)-(w/2))+"px";
	s1.write("mediaDrop");
	id("mediaPop").style.display = "block"
}
function playEmbededFLV (f, w, h, elemID) {
	var flv = '';
	flv += '<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>';
	
	var s1 = new SWFObject(libLoc+"flash/unisite/swf/flvplayer.swf","single",w,h,"7");
	s1.addParam("allowfullscreen","true");
	s1.addVariable("autostart","false");
	s1.addVariable("logo","false");
	s1.addVariable("repeat","false");
	
	s1.addVariable("backcolor","0xFFFFFF");
	s1.addVariable("frontcolor","0x555555");
	s1.addVariable("lightcolor","0x000000");

	//s1.addVariable("file",String("../"+f));
	s1.addVariable("file",base+String(f));
	s1.addVariable("image","http://vc.sesalos.com/scripts/pagestuff/nopage.php?page=images/flv-preview.jpg&amp;id=328&amp;currentURL=new.access.co.za.dedi134.cpt2.host-h.net");
	
	id(elemID).style.width = w+"px";
	var xtop = parseFloat(((xClientHeight()/2)-(h/2))+(xScrollTop()-70));
	xtop = (xtop > 0) ? xtop : 0;
	xtop = ((xtop + h) > (xClientHeight() + xScrollTop())) ? ((xClientHeight()+xScrollTop())-(h+70)) : xtop;
	id(elemID).style.top = (screen.height /2) + "px";
	id(elemID).style.left = parseFloat((xClientWidth()/2)-(w/2))+"px";
	s1.write(elemID);
	id(elemID).style.display = "block"
}
function playMOV (f, w, h) {
	var mov = '';
	mov += '<object id="movmov" width="'+w+'" height="'+h+'" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';
	mov += '<param name="src" value="'+f+'">';
	mov += '<param name="controller" value="true">';
	mov += '<param name="autoplay" value="true">';
	mov += '<embed name="movmov" src="'+f+'"';
	mov += 'width="'+w+'" height="'+h+'"';
	mov += 'controller="true" autoplay="true"';
	mov += 'scale="tofit" cache="true" enablejavascript="true"';
	mov += 'pluginspage="http://www.apple.com/quicktime/download/"';
	mov += '>';
	mov += '</object>';
	
	var fix = '<embed id="OCplayer" type=video/quicktime pluginspage=http://www.apple.com/quicktime/download/ src="' + f + '" height="' + h + '" width="' + w + '" align="left" autoplay="true" controller="true"></embed>';
	
	var fix2 = '';
	fix2 += '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
	fix2 += 'codebase="http://www.apple.com/qtactivex/qtplugin.cab"';
	fix2 += 'width="'+w+'" height="'+h+'"';
	fix2 += 'id="movmov">';
	fix2 += '<param name="src" value="'+f+'">';
	fix2 += '<embed width="'+w+'" height="'+h+'"';
	fix2 += 'src="'+f+'"';
	fix2 += 'name="movmov"';
	fix2 += 'controller="true" autoplay="true" scale="tofit" cache="true"';
	fix2 += 'enablejavascript="true">';
	fix2 += '</embed>';
	fix2 += '</object>';
	
	id("mediaPop").style.width = parseFloat(w+40)+"px";
	var xtop = parseFloat(((xClientHeight()/2)-(h/2))+(xScrollTop()-70));
	xtop = (xtop > 0) ? xtop : 0;
	xtop = ((xtop + h) > (xClientHeight() + xScrollTop())) ? ((xClientHeight()+xScrollTop())-(h+70)) : xtop;
	id("mediaPop").style.top = xtop+"px";
	id("mediaPop").style.left = parseFloat((xClientWidth()/2)-(w/2))+"px";
	id("mediaDrop").innerHTML = mov;
	id("mediaPop").style.display = "block"
}
function mediaKill () {
	if (id('movmov')) {
		document.movmov.Stop();
		//document.embeds['movmov'].Stop();
	}
	id('mediaPop').style.display = "none";
	id("mediaDrop").innerHTML = " ";
}




/* --------------------------------------------------------------------------------------------------------------------- */

function xScrollTop(e, bWin)
{
  var offset=0;
  if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    var w = window;
    if (bWin && e) w = e;
    if(w.document.documentElement && w.document.documentElement.scrollTop) offset=w.document.documentElement.scrollTop;
    else if(w.document.body && xDef(w.document.body.scrollTop)) offset=w.document.body.scrollTop;
  }
  else {
    e = xGetElementById(e);
    if (e && xNum(e.scrollTop)) offset = e.scrollTop;
  }
  return offset;
}

function xClientHeight()
{
  var v=0,d=document,w=window;
  if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientHeight)
    {v=d.documentElement.clientHeight;}
  else if(d.body && d.body.clientHeight)
    {v=d.body.clientHeight;}
  else if(xDef(w.innerWidth,w.innerHeight,d.width)) {
    v=w.innerHeight;
    if(d.width>w.innerWidth) v-=16;
  }
  return v;
}

function xClientWidth()
{
  var v=0,d=document,w=window;
  if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientWidth)
    {v=d.documentElement.clientWidth;}
  else if(d.body && d.body.clientWidth)
    {v=d.body.clientWidth;}
  else if(xDef(w.innerWidth,w.innerHeight,d.height)) {
    v=w.innerWidth;
    if(d.height>w.innerHeight) v-=16;
  }
  return v;
}

function xGetElementById(e)
{
  if(typeof(e)=='string') {
    if(document.getElementById) e=document.getElementById(e);
    else if(document.all) e=document.all[e];
    else e=null;
  }
  return e;
}

function xDef()
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
  return true;
}

function xNum()
{
  for(var i=0; i<arguments.length; ++i){if(isNaN(arguments[i]) || typeof(arguments[i])!='number') return false;}
  return true;
}