<!--- 
Module:         DefaultLayout.cfm
Author:         M Jeo, L Chalnick
Function:       Defines the basic HTML layout for this circuit. 
                This includes a standard head and body. Note that
                the variable, PageTitle, is used to set the value
                for the <title> and in the <body>. The value of
                PageTitle is defined in each fuseaction.
                This page also includes a <select> menu. 
Date created:   4/25/2002
Updated:        11/28/2004
--->
<cfparam name="attributes.con_id" default="0">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><cfoutput>#Variables.PageTitle#</cfoutput></title>
<link rel="STYLESHEET" type="text/css" href="default.css">
<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>
</head>
<body>
<h2>Simple Contact Manager</h2>
<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>
          <cfoutput> 
            <option 
                value="#self#?fuseaction=#XFA.contactForm#&event=add">Add a New Contact</option>
            <cfif val(attributes.con_id) gt 0>
              <option value="#self#?fuseaction=#XFA.contactForm#&event=update&con_id=#attributes.con_id#"
              >Edit Contact</option>
              <option value="#self#?fuseaction=#XFA.deleteContact#&event=delete&con_id=#attributes.con_id#"
              >Delete</option>
            </cfif>
            <option value="">----------------------------------------</option>
            <option value="#self#?fuseaction=#XFA.contactList#">Display All</option>
          </cfoutput> </select> <input type="button" value="Go" 
          onClick="gotoURL();"> </td>
      <td align="right"> <font size="+1"><b><cfoutput> #Variables.PageTitle#</cfoutput> </b></font> 
      </td>
    </tr>
  </table>
</form>
<cfoutput>#fusebox.layout#</cfoutput> 
<p>&nbsp;</p>
<table cellpadding="5" width="100%" cellspacing="0">
  <tr bgcolor="#efefef"> 
    <td class="smallText">&copy; 2002, Orange Whip Studios</td>
  </tr>
</table>
</body>
</html>
