<!---
This file is Copyright � 1998-2009 by Home Care Business Services. This work may not be reproduced, in whole or in part,
using any medium, including, but not limited to, electronic transmission, CD-ROM or published in print, without the express
permission of Home Care Business Services.

$Revision: 1.13 $
$Id: index.cfm,v 1.13 2009/08/24 21:19:56 arlen Exp $
$Date: 2009/08/24 21:19:56 $
--->
<!--- This code makes sure that the user has logged in, if not it will not allow them to access this page --->

<meta http-equiv="expires" content="Mon, 06 Jan 1990 00:00:01 GMT">
<cfheader name="expires" value="#now()#">
<cfheader name="pragma" value="no-cache">
<cfheader name="cache-control" value="no-cache, no-store, must-revalidate">

<cfscript>session.setMaxInactiveInterval(3600);</cfscript>

<!---<script type="text/javascript">
   $.timeoutDialog({
   		timeout:3600,
		countdown: 60,
		restart_on_yes: true
	});
</script>--->

<cfif isDefined("session.nextURL") and session.nextURL neq ''>
 <cfset nextURL = session.nextURL />
 <cfset session.nextURL = '' />
 <cflocation url="#nextURL#" addtoken="No" />
</cfif>

<cfparam name=url.rpt default="" />
<cfparam name=url.cat default="" />

<cfset mytime = #DateFormat(#now()#,'yyyy-mm-dd')# />
<cfset url.cat = #ReplaceNoCase(url.cat,".cfm","","ALL")# />
<cfset url.rpt = #ReplaceNoCase(url.rpt,".cfm","","ALL")# />
<!--- End page specific code --->

<cfparam name=url.page default="dashboard" />
<cfparam name="URL.id" default=0 />
<cfparam name="URL.cat" default="" />
<cfparam name="URL.rpt" default="" />
<cfset NavRoot=".." />
<cfset url.context="dashboard" />
<cfset url.cat = #ReplaceNoCase(url.cat,".cfm","","ALL")# />
<cfset url.rpt = #ReplaceNoCase(url.rpt,".cfm","","ALL")# />
<!--- <script language="JavaScript" src="../Scripts/datetime.js"></script> --->
 <script language="JavaScript" src="../Scripts/cffunctions.js"></script> 
<script language="JavaScript" src="../Scripts/supplyedit.js"></script>
<script language="JavaScript" src="../Scripts/scheduleedit.js"></script>
<script language="JavaScript" src="../Scripts/ajax.js"></script>
<cfquery  name="getcurrentemp"  datasource="#Application.DataSrc#">
     SELECT * FROM #Request.prefix_db_lookup#.pEmployee
      WHERE pEmployee.Emp_ID = '#Session.employeeid#'
 </cfquery>
<cfset request.fetch_button_name  = "Fetch latest report" />
<cfoutput>
	<cfif url.page eq "dashboard">
		<cfif url.rpt eq "">
		      <cfif Session.Display EQ 'Melissa Cott'>
					<cfinclude template="homenew.cfm" />
				<cfelse>
					<cfinclude template="homenew.cfm" />
				</cfif>
				<!--- <cfinclude template="home1_new.cfm" /> --->
		<cfelseif url.rpt eq "powerpath_download">
			<cflocation url="#NavRoot#/agencyadmin/index.cfm?aMenu=billing&page=agency&cat=&rpt=#url.rpt#" addtoken="no" />
		<cfelse>
			<cfinclude template="#url.rpt#.cfm" />
		</cfif>
	<cfelseif url.page eq "mhb_university">
		<cflocation url="#NavRoot#/#url.page#/index.cfm?#CGI.QUERY_STRING#" addtoken="no" />
	<cfelseif url.page eq "agency">
		<cflocation url="#NavRoot#/agencyadmin/index.cfm?#CGI.QUERY_STRING#" addtoken="no" />
	<cfelseif url.page eq "patient">
		<cflocation url="#NavRoot#/patientadmin_new/index.cfm?#CGI.QUERY_STRING#" addtoken="no" />
	<cfelse>
		<cflocation url="#NavRoot#/agencyadmin/index.cfm?#CGI.QUERY_STRING#" addtoken="no" />
	</cfif>
</cfoutput>