// ======================

var today = new Date();
var expires = new Date(today.getTime() + (1 * 86400000));

// Set position (x,y) of menu display
var xPos = 5;
var yPos = 140;

// ======================

// explorer reload image error
function reloadImage() {
   lLevel1._updateList( true, xPos, yPos );
}


// ======================

function init_gstmnu() {
   var width = 132;
   var height = 18;
   var extraspaces = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

   // set menu level structure
   lLevel1  = new List(true,  width, height);


   // Main Menu level
   lLevel1.addItem( "<a href='index.html'         	onFocus='this.blur();' class='menu'>Home"                     + extraspaces + "</a>");
   lLevel1.addItem( "<a href='about_us.html'      	onFocus='this.blur();' class='menu'>About&nbsp;Us"            + extraspaces + "</a>");
   lLevel1.addItem( "<a href='mxmanage.html'      	onFocus='this.blur();' class='menu'>MxManage"                 + extraspaces + "</a>");
   lLevel1.addItem( "<a href='why_mxmanage.html'  	onFocus='this.blur();' class='menu'>Why&nbsp;MxManage?"       + extraspaces + "</a>");
   lLevel1.addItem( "<a href='our_customers.html' 	onFocus='this.blur();' class='menu'>Our&nbsp;Customers"       + extraspaces + "</a>");
   // lLevel1.addItem( "<a hre='resource_systems.html' onFocus='this.blur();' class='menu'>Resource&nbsp;Systems"    + extraspaces + "</a>");
   lLevel1.addItem( "<a href='news.html'          	onFocus='this.blur();' class='menu'>News"                     + extraspaces + "</a>");
   // lLevel1.addItem( "<a href='http://customercare.resourcesystem.com/Marketplace/MxManageDemoWebinars/tabid/109/Default.aspx' target='_blank' onFocus='this.blur();' class='menu'>Webinar&nbsp;Schedule" + extraspaces + "</a>");


   // appearance
   lLevel1.setFont("<FONT COLOR='#000000' FACE=Arial SIZE=2><B>","</B></FONT>");

   lLevel1.setIndent(-1);

   // build menu
   lLevel1.build( xPos, yPos );

   // get menu state cookies -must expand AFTER build because a NETSCAPE ERROR!
   for (var i=0;i<lLevel1.types.length;i++) {
      if ((Get_Cookie("exp" + i) != null) && (Get_Cookie("exp" + i) != "null")) {
         expand(i);
      };
   };

   // set expand event
   lLevel1.onexpand = RememberExpand;

   // explorer reload image error
   setTimeout('reloadImage()',5000);
}


// ======================

function RememberExpand(id) {
   if (this.visible) {
      Set_Cookie("exp" + id, id,"","/","");
   } else {
      Set_Cookie("exp" + id, "null","","/","");
   }
}


// ======================
function GuestLogin() {
   document.write( '<form name="frm_login" autocomplete=off  method="post" action="open_db.asp" onSubmit="return checklogin()">' );
   document.write( '<input type="hidden" value="" name="hdn_browsertype">' );
   document.write( '<table class="login">' );

         document.write( '<tr>' );
            document.write( '<td align="right"  width="40"><font class="NORMAL_SIDETEXT">User:&nbsp;</font></td>' );
            document.write( '<td align="left"   width="80"><INPUT type="text" NAME="txt_name" VALUE="" class="comboblue" size=12></td>' );
         document.write( '</tr>' );

         document.write( '<tr>' );
            document.write( '<td align="right"  width="40"><font class="NORMAL_SIDETEXT">Pass:&nbsp;</font></td>' );
            document.write( '<td align="left"   width="80"><INPUT type="password" NAME="txt_password" VALUE="" class="comboblue" size=12></td>' );
         document.write( '</tr>' );

         document.write( '<tr>' );
            document.write( '<td align="center" width="40">&nbsp;</td>' );
            document.write( '<td align="left"   width="80"><INPUT type="submit" name="btn_submit" class="buttonblue" VALUE="Enter" ></td>' );
         document.write( '</tr>' );

         document.write( '<tr>' );
            document.write( '<td align="center" colspan="2"><a class="forgot" href="#nowhere" onClick="(PasswordAlert())">Forgot your password?<a></td>' );
         document.write( '</tr>' );


   document.write( '</form>' );
   document.write( '</table>' );

}

function WebSchedWin() {

	// In order to close the Webinar Schedule window without a nag screen, it has to be opened via javascript
	window.open( "WebinarSchedule.html" );
}


function GuestLeftColumn() {
   // Login
   document.write( '<table class="leftcolumn">' );
   document.write( '<tr><td>' );
   GuestLogin();
   document.write( '</td></tr>' );
   document.write( '</table>' );


   // Space Holder for Menu
   document.write( '<table class="leftcolumn">' );
   document.write( '<tr><td class="menuspacer">&nbsp;</td></tr>' );
   document.write( '</table>' );


	// Webinar Button
	document.write( '<table class="leftcolumn">' );
	document.write( '<tr><td><br />' );
	document.write( '<img src="graphs/button/WebSchedBtn.gif" alt="Click here to view our webinar schedule" style="cursor:pointer;" onclick="WebSchedWin();"/>' );
	document.write( '<br /><br /></td></tr>' );
	document.write( '</table>' );


   // Complimentary Demo
   document.write( '<table class="leftcolumn">' );
   document.write( '<tr><td class="demo">For a complimentary demo using your<br> MDS data, call<br>800.338.3681</td></tr>' );
   document.write( '</table>' );



   // Rotating Testimonials
	document.write( '<table class="leftcolumn_rotate">' );
	document.write( '<tr><td class="rotate">' );

	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent" style="display: block" id="fader"><i>"MxManage is a wonderful tool to use to help us maximize our RUGs."                           																										</i><br><br><font class="testcredits">Lorie Overbeek, Therapy Manager, Spectrum Health Reed Campus							</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"We have been very fortunate to have access to this program. The benefits have been an asset to our facility and our residents."																										</i><br><br><font class="testcredits">Renee Cunningham, DON, Kalkaska Memorial Hospital											</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"MxManage has been extremely helpful in identifying areas of concern on our Quality Indicator report."                          																										</i><br><br><font class="testcredits">Linda Arnold, BSN, HFA, Director of Health Care Services, Swiss Village, Inc.		</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"We were very impressed with the information available related to this program."                                                																										</i><br><br><font class="testcredits">Renee Cunningham, DON, Kalkaska Memorial Hospital											</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"The (MxManage) reports have tremendously helped us identify resident issues, increased the team’s level of awareness of problem areas with appropriate interventions and increased our reimbursement." 		</i><br><br><font class="testcredits">Ruth Klintworth, RAC-C, West View Manor														</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"We can use MxManage to check our MDSs for mistakes that might cause a drop in a RUG."                                          																										</i><br><br><font class="testcredits">Lorie Overbeek, Therapy Manager, Spectrum Health Reed Campus							</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"MxManage helps us to focus our attention on the specific resident or area of concern in a very user friendly way.  MxManage takes the guesswork out of where to start.  Makes the best use of our time." 		</i><br><br><font class="testcredits">Mary Whitlock, Director of Nursing, Newaygo Medical Care Facility					</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"We are able to … improve both our finances along with our care."                                                               																										</i><br><br><font class="testcredits">Renee Cunningham, DON, Kalkaska Memorial Hospital										</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"We are able to monitor the MDS process to make certain we are capturing the documentation that affects our reimbursement."     																										</i><br><br><font class="testcredits">Linda Arnold, BSN, HFA, Director of Health Care Services, Swiss Village, Inc. 	</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"Tracking ADL scores has been the best help - to make sure rehab RUG levels are consistent with ADL scores."                    																										</i><br><br><font class="testcredits">Lorie Overbeek, Therapy Manager, Spectrum Health Reed Campus							</font></div></a>' );
	document.write( '<a class="rotate" href="our_customers.html" title="See what else our customers have to say!"><div class="dyncontent"><i>"The program can be accessed by all of our team members to allow them to see the areas he or she may have concerns with."       																										</i><br><br><font class="testcredits">Renee Cunningham, DON, Kalkaska Memorial Hospital										</font></div></a>' );
	document.write( '</td></tr>' );

	document.write( '</table>' );

}


// ======================

function GuestTitle() {

   document.write( '<tr>' );
      document.write( '<td>' );
         document.write( '<table cellpadding=0 width="100%" align="center" background="graphs/pic/imgColorBlockCornerSmallL.gif" style="background-repeat:no-repeat">' );
            document.write( '<tr>' );

               document.write( '<td valign="bottom" align="left" style="padding-bottom:15px; padding-left:55px" >' );
                  document.write( '<font class="pagetitle">' + document.title + '</font>' );
               document.write( '</td>' );

               document.write( '<td valign="middle" align="right">' );
               	document.write( '<a href="http://www.resourcesystems.net/CustomerArea/MxManage.aspx" target="_blank" title="Click here to learn more">' );
                  document.write( '<img src="graphs/logo/MxManageLogo100px.gif" alt="Click here to learn more" border="0"/>' );
               	document.write( '</a>' );
               document.write( '</td>' );

            document.write( '</tr>' );
         document.write( '</table>' );
      document.write( '</td>' );
   document.write( '</tr>' );

}


// ======================

function GuestFooter() {

   document.write( '<table class="main">' );

   	document.write( '<tr>' );

   		document.write( '<td class="mainmenu" valign="top">&nbsp;</td>' );

   		document.write( '<td class="maincontent">' );

            document.write( '<table border=0 cellspacing=0 cellpadding=0 width="100%">' );
               document.write( '<tr>' );

                  document.write( '<td width="10%" align="left" valign="middle">' );
                     document.write( '<img src="graphs/logo/MxCirclesSmall.gif" alt="Mx Circles Logo" border="0" />' );
                  document.write( '</td>' );

                  document.write( '<td width="80%" valign="middle" align="left" style="padding-left:5px" >' );
                     document.write( '<font class="normal_footer">' );
                     document.write( '140 South Friendship Drive<br>New Concord, Ohio 43762<br>' );
                     document.write( 'Phone: 800.338.3681<br>Fax: 740.826.4324<br>' );
   						document.write( '<a href="mailto:info@resourcesystems.net">Click here to contact us via email</a>' );
                     document.write( '</font>' );
                  document.write( '</td>' );

                  document.write( '<td width="10%" align="right" valign="middle">' );
                     document.write( '<img src="graphs/pic/imgColorBlockCornerSmallBR.gif" border="0" />' );
                  document.write( '</td>' );

               document.write( '</tr>' );

            document.write( '</table>' );

   			GuestCopyright();

   		document.write( '</td>' );

   	document.write( '</tr>' );

   document.write( '</table>' );

}


// ======================

function PasswordAlert() {

   alert( "If you've forgotten your password, please call 800.338.3681 to have it reset." );

}


// ======================

function GuestCopyright() {
   var today = new Date();

   document.write('<table border=0 cellspacing=0 cellpadding=0 width="100%" style="padding-top:4px"> ');
   document.write('<tr><td valign=middle align="center">');
   document.write('<font class="small">');
   document.write('&copy; ' + today.getFullYear() + ' Resource Systems. All rights reserved. ');
   // document.write('<a href="TermsOfUse.pdf" target="_blank" class="small">Terms of Use.</a><br>&nbsp;');
   document.write('</font></td></tr></table>');

}



