/* ----------------------------------------------------------------------------
	
	JavaScript Configuration File
	Castanet Flash Media Player
	/media/support/externalcode.js
	
	This is the unmodified code used to open these
	+ media players from their original sources
	
	Usage:
	Called from /media/player.php
	
---------------------------------------------------------------------------- */


// copied from silkfm - homepage
function Lvl_openWin(u,n,w,h,l,t,c,f) { //v2.2 4LevelWebs
  var x=((screen.width-w)/2);if(c==1){l=x;t=(screen.height-h)/2;}if(c==2){l=x}
        f+=',top='+t+',left='+l;LvlWin=window.open(u,n,f);LvlWin.focus();
}


// copied from Castanet - Kelowna streaming audio page

function openPlayer( pageToLoad) {

	center=1;
	width=310;
	height=300;
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	args = "width=" + width + ","
	+ "height=" + height + ","
	+ "screenx=" + xposition + ","  //NN Only
	+ "screeny=" + yposition + ","  //NN Only
	+ "left=" + xposition + ","	 //IE Only
	+ "top=" + yposition;		   //IE Only

	newwin=window.open( pageToLoad, "Player" ,args );

}