<CFSETTING ENABLECFOUTPUTONLY="YES">
<!--- ------------------------------------------------------------------------------------------------
This template will build the drop down menu that will be loaded on the top of every pages
-------------------------------------------------------------------------------------------------- --->
<CFPARAM NAME="attributes.con_id" DEFAULT="0">
<CFSETTING ENABLECFOUTPUTONLY="NO">

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
   function gotoURL() {
      URLpass = self.document.menu_form.event[self.document.menu_form.event.selectedIndex].value;
      if (URLpass != '') {
         self.document.location = URLpass;
      }
   }
</SCRIPT>

<FORM NAME="menu_form" ACTION="index.cfm" METHOD="post">
<CFOUTPUT>
	<INPUT TYPE="hidden" NAME="con_id" VALUE="#attributes.con_id#">
</CFOUTPUT>
<TABLE CELLPADDING="5" WIDTH="100%" CELLSPACING="0">
<TR BGCOLOR="#efefef">
	<TD>
		<!---/// Events ///--->
		<SELECT NAME="event" SIZE="1" ONCHANGE="gotoURL();">
			<OPTION VALUE="">---- Contacts ----</option>
			<OPTION VALUE="index.cfm?fuseaction=contactform&event=add">Add a New Contact</option>
		<CFIF VAL(attributes.con_id) GT 0>
         <CFOUTPUT>
			   <OPTION VALUE="index.cfm?fuseaction=contactform&event=update&con_id=#attributes.con_id#">Edit Contact</option>
			   <OPTION VALUE="index.cfm?fuseaction=deletecontact&event=delete&con_id=#attributes.con_id#">Delete</option>
         </CFOUTPUT>
		</CFIF>
			<OPTION VALUE="">----------------------------------------</OPTION>
			<OPTION VALUE="index.cfm?fuseaction=contactlist">Display All</OPTION>
		</select>

		<INPUT TYPE="button" VALUE="Go" ONCLICK="gotoURL();">
	</TD>
	<TD ALIGN="right">
		<FONT SIZE="+1"><B>Simple Contact Manager</B></FONT>
	</TD>
</TR>
</TABLE>
</FORM>