// JavaScript for Pop-Up Windows 
// popUp(URL ADDRESS, POPUP WIDTH, POPUP HEIGHT, POSITION ON SCREEN)
function popUp(URL, popW, popH, position) {
var day = new Date();
var id = day.getTime();
var winL, winT;

switch(position) {
	case 'top right':
		winL = 10;
		winT = 10;
	break;
	case 'top left':
		winL = (screen.width - popW) - 20;
		winT = 10;
	break;
	case 'center':
		winL = (screen.width - popW) / 2;
		winT = (screen.height - popH) / 2;
	break;
	case 'bottom right':
		winL = 10;
		winT = (screen.height - popH) - 20;
	break;
	case 'bottom left':
		winL = (screen.width - popW) - 20;
		winT = (screen.height - popH) - 20;
	break;
	default: 
		winL = (screen.width - popW)/2;
		winT = (screen.height - popH)/2;
}

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + popW + ",height=" + popH + ",left = " + winL + ",top = " + winT + "');");
}