function newWindow(page,target,winLoc,w,h,scroll,menu,tool,resize,address,status) {
	var dw=50;
	var dh=60;
	
	var posx;
	var posy;
	
	switch (winLoc) {
		case "center":
			posx = (screen.width - w - dw)/2;
			posy = (screen.height - h - dh)/2;
			break;
		case "lowright":
			posx = screen.width - w - dw;
			posy = screen.height - h - dh;
			break;
		case "upright":
			posx = screen.width - w - dw;
			posy = 0;
			break;
		case "lowleft":
			posx = 0;
			posy = screen.height - h - dh;
			break;
		default: // "upleft"
			posx = 0;
			posy = 0;
			break;
	}
		
	// Set window properties
	var sWindowprops = "height=" + h + ",width=" + w + ",left=" + posx + ",screenx=" + posx + ",top=" + posy
	+ ",screeny=" + posy + ",scrollbars=" + scroll + ",menubar=" + menu + ",toolbar=" + tool + ",resizable=" + resize + ",location=" + address + ",status=" + status;
	
	// Open new window
	var myWindow=window.open(page, target, sWindowprops);
	if(myWindow == null)
	    alert("The window was blocked by the popup blocker. Please disable it or add this site to the list of Allowed sites.");
	myWindow.opener= window;
	myWindow.focus();
	return false;
}

function printWindow(page,target,winLoc) {
	var w = 800;
	var h = 600;
	var scroll = 'yes';
	var menu = 'yes';
	var tool = 'yes';
	var resize = 'yes';
	var address = 'no';
	var status = 'no';
	newWindow(page,target,winLoc,w,h,scroll,menu,tool,resize,address,status);


	//Test
}
