﻿function popvideo(url,resolution)
{
    popUpCenteredWindow(url + "?res=" + resolution, 600, 400);
}

function popUpCenteredWindow(url, width, height) {

	//gets top and left positions based on user's resolution so hint window is centered.
	var nLeft = (window.screen.width/2) - ((width/2) + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	var nTop = (window.screen.height/2) - ((height/2) + 50); //half the screen height minus half the new window height (plus title and status bars).
	var popup = window.open(url,"wPPage","height=" + height + ",width=" + width + ",top=" + nTop + ",left=" + nLeft + ",toolbar=0,menubar=0,scrollbars=1,resizable=1,location=0,directories=0,status=0");
	popup.focus();
}



