function popWin(strURL, strWinName, intWidth, intHeight, blnScrollbars, strCustomParams){
	var intLeft = (screen.width-intWidth)/2;
	var intTop = (screen.height-intHeight)/2;
	var strSettings, intWin;

	strSettings = "height="+ intHeight + ",";
	strSettings += "width="+ intWidth + ",";
	strSettings += "top=" + intTop + ",";
	strSettings += "left=" + intLeft + ",";
	strSettings += "scrollbars=" + blnScrollbars;
	if (strCustomParams && strCustomParams.length) {
		strSettings += "," + strCustomParams;
  	}
  intWin = window.open(strURL, strWinName, strSettings);
}


function popWinNetFax(strURL, strWinName, intWidth, intHeight, blnScrollbars, strCustomParams){
	var intLeft = (screen.width-intWidth)/2;
	var intTop = 50;
	var strSettings, intWin;

	strSettings = "height="+ intHeight + ",";
	strSettings += "width="+ intWidth + ",";
	strSettings += "top=" + intTop + ",";
	strSettings += "left=" + intLeft + ",";
	strSettings += "scrollbars=" + blnScrollbars;
	if (strCustomParams && strCustomParams.length) {
		strSettings += "," + strCustomParams;
  	}
  intWin = window.open(strURL, strWinName, strSettings);
}


/* Insert any predefined pop up window functions here. */
function SurveyScrn(){
	popWin('index.cfm?fuseaction=main.DspPage&PageID=69&fkMainPage=0&dspLay=Pop&MainPageID=<cfoutput>#MainPageID#</cfoutput>', 'Survey', 600, 600, 1)
}
function LoginScrn(){
	popWin('index.cfm?fuseaction=main.DspPage&PageID=14&fkMainPage=0&dspLay=Pop', 'Login', 600, 600, 1)
}

function MailingScrn(){
	popWin('index.cfm?fuseaction=main.DspPage&PageID=50&fkMainPage=0&dspLay=Pop', 'Mailing', 600, 500, 0)
}

function NetFaxScrn(spid, f){
	popWinNetFax('index.cfm?fuseaction=main.DspSubPage&PageID=14&SubPageID='+ spid +'&fkMainPage=0&dspLay=NetFax&winOpnd=1&focus='+ f, 'News', 838, 700, 1, 'menubar=1, status=1, location=1, resizable=1, toolbar=1');
}

function NewsScanScrn(spid, f){
	popWinNetFax('index.cfm?fuseaction=main.DspSubPage&PageID=14&SubPageID='+ spid +'&fkMainPage=0&dspLay=Newsletter&winOpnd=1&focus='+ f, 'News', 840, 700, 1, 'menubar=1, status=1, location=1, resizable=1, toolbar=1');
}

function FormatWin1(lnk){
	popWinNetFax(lnk+'&focus=1', 'News', 800, 500, 1, 'menubar=1, status=1, location=1, resizable=1, toolbar=1');
}

function PrintScrn(pid, Srch){
	popWin('index.cfm?fuseaction=main.DspPage&PageID='+ pid +'&fkMainPage=0&dspLay=PrintScrn&'+Srch, 'Print', 800, 600, 1, 'menubar=1')
}

function PrintSubScrn(pid, spid, Srch){
	popWin('index.cfm?fuseaction=main.DspSubPage&PageID='+ pid +'&SubPageID='+ spid +'&fkMainPage=0&dspLay=PrintScrn&winOpnd=1&'+Srch, 'Print', 800, 600, 1, 'menubar=1')
}

function PrintScrnNetFax(pid, spid){
	popWinNetFax('index.cfm?fuseaction=main.DspSubPage&PageID='+ pid +'&SubPageID='+ spid +'&fkMainPage=0&dspLay=PrintScrnNetFax&winOpnd=1', 'Print', 800, 600, 1, 'menubar=1')
}

function EventScrn(id){
	popWinNetFax('calendarPopup.cfm?ID='+id, 'Calendar', 800, 600, 1, 'menubar=1, status=1, location=1, resizable=1, toolbar=1')
}

function ViewEvents(){
	popWinNetFax('dspAllEventsPopup.cfm', 'Events', 800, 500, 1, 'menubar=1, status=1, location=1, resizable=1, toolbar=1')
}


