function displayAgenda(fNum)
{
	document.form1.hold_month.value = document.form1.get_month.value;
	document.form1.hold_year.value = document.form1.get_year.value;
	document.form1.disp_agenda.value = fNum;
	document.form1.submit();
}

//(DS010407)
function displayMinutes(fNum)
{
	document.form1.hold_month.value = document.form1.get_month.value;
	document.form1.hold_year.value = document.form1.get_year.value;
	document.form1.disp_minutes.value = fNum;
	document.form1.submit();
}

function displayAgMemo(fNum,fRev,fMtg,fAgLine)
{
	document.form1.disp_agmemo.value = fNum;
	document.form1.disp_agmemo_rev.value = fRev;
	if (fMtg) {			//(DS031307)
		document.form1.disp_minutes.value = fMtg;
		document.form1.disp_minutes_ln.value = fAgLine;		//(DS071807) really, this is the minutes line rowid
	}
	document.form1.submit();
}

function returnAgenda(fNum,fAgLine)
{
/* (DS091506)
	if (cStatus != "")
	{
		alert("Thank you for your comments.  Comments will be reviewed by staff prior to publication");
		document.form1.hold_comm.value = document.form1.disp_agmemo.value;
		document.form1.hold_comm_rev.value = document.form1.disp_agmemo_rev.value;
	}
*/
	document.form1.ag_comm.value = document.form1.disp_agmemo.value;
	document.form1.ag_comm_rev.value = document.form1.disp_agmemo_rev.value;
	document.form1.disp_agmemo.value = "";
	document.form1.disp_agmemo_rev.value = "";
	document.form1.disp_agenda.value = fNum;
	document.form1.rtn_agline_rowid.value = fAgLine;		//(DS050707)
	document.form1.submit();
}

function returnMinutes(fNum,fMnLine)	//(DS031307)
{
	document.form1.disp_agmemo.value = "";
	document.form1.disp_agmemo_rev.value = "";
	document.form1.disp_minutes.value = fNum;
	document.form1.disp_minutes_ln.value = fMnLine;		//(DS071807) View Final not returning to appropriate minutes line
	document.form1.submit();
}

function returnAdvSrch(iAction) {
	document.form1.formaction.value = iAction;
	document.form1.submit();
}

function returnSelect()
{
	document.form1.disp_agenda.value = "";
	document.form1.submit();
}

function popupNarr(iLine) {
		if (! window.focus)return true;
		var href = '../print/print_agenda_narrative.cfm?line=' + iLine;
		window.open(href, 'NARRATIVE', 'width=400,height=400,scrollbars=yes,resizable=yes,menubar=yes');
		return false;
	}

function popupAttachments(iLink,iWindowName) {
	if (! window.focus)return true;
	var href = iLink
	window.open(href, iWindowName, 'width=640,height=400,scrollbars=yes,resizable=yes,menubar=yes');
	return false;
}

function printPopup(mylink, windowname, iMode, iSeq, iAILabel, iRev)
{
	if (iSeq != "")
	{
		if (! window.focus)return true;
		/*
		var href;
		href= mylink + '?seq=' + iSeq + '&mode=' + iMode + '&reloaded=true';	//(DS090706) added reloaded
		if (iRev) href += '&rev_num=' + iRev;						//(DS041806)
		window.open(href, windowname, 'width=800,height=400,scrollbars=yes,resizable=yes,menubar=yes');
		*/
		if (! iAILabel || iAILabel == '') iAILabel = 'Agenda Items';		
		var href = '../agenda/ag_prt_prompt.cfm?seq=' + iSeq + '&mode=' + iMode + '&link=' + mylink + '&AILabel=' + iAILabel + '&wname=' + windowname;
		if (iRev) href += '&rev_num=' + iRev;						//(DS041806)
		window.open(href, 'PROMPT', 'top=300,left=300,width=300,height=100,scrollbars=no,resizable=yes');		
	}
	else alert("Please select a meeting");
	return false;
}
function printMinPopup(mylink, windowname, iMode, iSeq, iAILabel, iRev)
{
	if (iSeq != "")
	{
		if (! window.focus)return true;
		var href;
		href= mylink + '?seq=' + iSeq + '&mode=' + iMode + '&reloaded=true';	//(DS090706) added reloaded
		if (iRev) href += '&rev_num=' + iRev;						//(DS041806)
		window.open(href, windowname, 'width=800,height=400,scrollbars=yes,resizable=yes,menubar=yes');	
	}
	else alert("Please select a meeting");
	return false;
}

// Bring up a print screen in a new window.
function printAGItem(mylink, windowname, iMode)
{
	if (! window.focus)
		return true;
	//(DS041806) add rev_num
	var href = mylink + '?seq=' + document.form1.disp_agmemo.value + '&rev_num=' + document.form1.disp_agmemo_rev.value + '&form=AG_MEMO';
		href += '&reloaded=true';				// don't display the 'saving agenda item message
	if (iMode) href += '&mode=' + iMode;
	window.open(href, windowname, 'width=640,height=400,scrollbars=yes,resizable=yes,left=50,top=50,menubar=yes');
	return false;
}

function pdfPopup(mylink, windowname, iMode)
{
	if (! window.focus)return true;
	var href;
	href= mylink + '&mode=' + iMode;
	window.open(href, windowname, 'scrollbars=yes,resizable=yes');

}