﻿function windowipix(file, width, height, name) {
	xpos = (screen.width - width) / 2;
	ypos = (screen.height - height) / 2;

	link = "ipixPopup.html?file=" + file + "&name=" + name;

	var popWindow = window.open(link, "windowpop", 'left=' + xpos + ',top=' + ypos + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + width + ',height=' + height);
}

function openWindow(url, name, width, height, resizable, scrollbars, statusbar, menubar, toolbar) {
	var win = eval(name);
	var optionString = "";
	if (width) optionString += "width=" + width + ",";
	if (height) optionString += "height=" + height + ",";
	if (resizable) optionString += "resizable=" + resizable + ",";
	if (scrollbars) optionString += "scrollbars=" + scrollbars + ",";
	if (statusbar) optionString += "statusbar=" + statusbar + ",";
	if (menubar) optionString += "menubar=" + menubar + ",";
	if (toolbar) optionString += "toolbar=" + toolbar + ",";
	win = window.open(url, name, optionString);
	win.focus();
}

var printWin = null;
function doPrint(tID) {
	openWindow("Print.aspx?topicID=" + tID, "printWin", 600, 450, 0, 0, 0, 0, ((window.print) ? 0 : 1));
	return false;
}

