function newWindow(newURL,width,height) {
appWindow = window.open(newURL, 'appwin', 'menubar=no,toolbar=yes,location=no,resizable=yes,scrollbars=yes,left=10,top=10,width=' + width + ',height=' + height);
}

function newWindow_noscroll(newURL,innerWidth,innerHeight) {
	appWindow = window.open(newURL, 'appwin', 'menubar=no,toolbar=no,location=no,resizable=no,scrollbars=no,left=10,top=10,width=' + innerWidth + ',height=' + innerHeight);
}

function newWindow_move(newURL,innerWidth,innerHeight,l,t) {
	innerWidth= innerWidth? innerWidth: 800;
	innerHeight= innerHeight? innerHeight: 600;
	var left = l ? l : (screen.width - innerWidth) / 2;
	var top = t ? t : (screen.height - innerHeight) / 2; 
	appWindow = window.open(newURL, 'appwin', 'menubar=no,toolbar=no,location=no,resizable=no,scrollbars=no,top='+top+',left=' + left + ',width=' + innerWidth + ',height=' + innerHeight);
	appWindow.focus();
}

function moviePopup() {
	if (document.getElementById('movielist')) {
		var a = document.getElementById('movielist').getElementsByTagName('a');
		for (var i=0;i<a.length;i++) {
			if (a[i].href.indexOf("?movie") == -1) continue;
			a[i].onclick=function(){newWindow_move(this.href,400,330);this.blur();return false;}
		}
	}
}

window.onload = function(){moviePopup();}