

/* open new centered window with scrolling ability */
/* USAGE: javascript:popWinScroll('filename.html','windowname', width, height); */
var win;


function popWinScroll(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;
	
	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	win = window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=yes,toolbar=no,status=no,resizable=yes,top=' + topPos + ',left=' + leftPos);void(0);
}


/* open new centered window without scrolling ability with tracking */
/* USAGE: javascript:popTrackWin('filename.html','windowname', width, height); */

function popTrackWin(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;

	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=no,toolbar=no,status=no,resizable=no,top=' + topPos + ',left=' + leftPos);void(0);
}



/* open new centered window without scrolling ability */
/* USAGE: javascript:popWin('filename.html','windowname', width, height); */

function popWin(url,name,popW,popH) {
	/*alert("popWin: " + url);*/
        version = navigator.appVersion;
	var w = 800, h = 600;

	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=no,toolbar=no,status=no,resizable=no,top=' + topPos + ',left=' + leftPos);void(0);
}

//This is a temporary flash hack to allow shane to edit the url without doing anything to flash.
function openCustomBackgroundSelector(){
	OpenWindowCentered("/Admin/BrowserBg.aspx", 'CustomBGSelector', 775, 800, 1, 1);
}
