function popWin(url, width, height, windowName, scrollbar, content){
	var x = (screen.width) ? (screen.width-width) / 2 : 100;
	var y = (screen.height) ? (screen.height-height) / 2 : 100;

	var features = "width=" + width + "px, height=" + height + "px, top=" + y + "px, left=" + x + "px";
		features += (scrollbar) ? ", scrollbars=yes" : "";
		features += ", resizable=yes";
	if (!windowName){
		windowName = "untitled";
	}
	var popWindow = window.open(url, windowName, features);

	if (popWin.arguments.length == 6 && content != ""){
		popWindow.document.write(content);
	}
	if (document.layers){
		window.moveTo(x, y);
	}
	popWindow.focus();
}