newWindow = null;

function popupPrinting(page,idx,wide,high) { 
	leftPos = 0;
	topPos = 0;
	widthoffset = (wide/2)+10;
	heightoffset = high/2;
	if (screen) {
		leftPos = (screen.width/2)-widthoffset;
		topPos 	= (screen.height/2)-heightoffset;
		if (idx=='0') {  
			var pageURL='custom_pages/printer_friendly.cfm?page='+page;
		} else {  
			var pageURL='custom_pages/printer_friendly.cfm?page='+page+'&id='+idx;
		}
		newWindow = window.open(pageURL, 'popupWin', 'toolbar=yes,status=no,scrollbars=yes,width='+wide+',height='+high+',left='+leftPos+',top='+topPos);
	}
}

function popupEmailing(page,wide,high) { 
	leftPos = 0;
	topPos = 0;
	widthoffset = (wide/2)+10;
	heightoffset = high/2;
	if (screen) {
		leftPos = (screen.width/2)-widthoffset
		topPos 	= (screen.height/2)-heightoffset
		newWindow = window.open('custom_pages/email2friend.cfm?page='+page, 'popupWin', 'toolbar=yes,status=no,scrollbars=yes,width='+wide+',height='+high+',left='+leftPos+',top='+topPos);
	}
}