/************************************************************
*	DO not use functions from 
*	Old global Javascript file containing standardfunctions
*	modified: 2004-10-08	by: <johb>
*
************************************************************/
var popupWin
function openWindow(url, name, w_width, w_height,extraFeatures) {
 if(extraFeatures!='')extraFeatures=extraFeatures+',';
 if (!popupWin || popupWin.closed) {
  center_of_screen_X=Math.floor(screen.availWidth/2)-Math.floor(w_width/2);
  center_of_screen_Y=Math.floor(screen.availHeight/2)-Math.floor(w_height/2);
    popupWin = window.open(url, name, extraFeatures + 'width='+w_width+',height='+w_height+',left='+center_of_screen_X+',top='+center_of_screen_Y);
  if (!popupWin.opener) popupWin.opener = window
 } else {
  // window is already open; bring window to front
  	popupWin.location = url;
  	popupWin.focus();
 }
}

function openRemoteWindow(url) { // Ersätts av SG_ow(url) och så småning om tas bort	
	openWindow(url,'remote','800','600','location=yes,resizable=yes,scrollbars=yes,location=no,toolbar=yes');
}

function SG_ow(url) { // Namn kortat eftersom funktionen kallas ofta
	openWindow(url,'remote','800','600','location=yes,resizable=yes,scrollbars=yes,location=no,toolbar=yes');
}

     NS4 = (document.layers);
     IE4 = (document.all);
    ver4 = (NS4 || IE4);
	 IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
   isMac = (navigator.appVersion.indexOf("Mac") != -1);
  isMenu = (NS4 || (IE4 && !isMac) || (IE5 && isMac));
function popUp(){return};
function popDown(){return};
if (!ver4) event=null;
// -------------------------------------------M
// Programming by Anders Mårtén 2002-03-20^
// andersmarten@hotmail.com^
// -------------------------------------------^
// Set this variable depending on where the player is located
var VideoPlayerMenuURL = "/mediaplayer/mediaplayer_real/default.htm";
function OpenVideoWindowFromMenu(mediapath, title, version)
{ 
        var URL = VideoPlayerMenuURL + "?" + mediapath + "&" + escape(title) + "&" + version;
        var videowindow = window.open(URL, 'videowindow','scrolling=yes,width=355,height=334,framespacing=0');
}

function OpenVideoWindow(mediapath, title, version)
{ 
        var URL = VideoPlayerMenuURL + "?" + mediapath + "&" + escape(title) + "&" + version;
        var videowindow = window.open(URL, 'videowindow','scrolling=yes,width=355,height=334,framespacing=0');
}


