//  footer.js
//  Written:  2002-03-29 by James Alarie <jalarie@umich.edu>
//
//  Places "View page source," etc. links on the page.
//
//  Usage:
//    <script type="text/javascript" src="footer.js"></script>

        var Out='';
        Out+='<a href="javascript:ViewSource();" title="view source">View page source<\/a>.&nbsp; \n';
//noCGI          document.write(Out);
        Out ='<a href="javascript:PrintFrame();" title="print frame">Print Frame</a>.&nbsp; \n';
          document.write(Out);
        Out ='<a href="javascript:RatePage();" title="rate this page">Rate this page<\/a>.&nbsp; \n';
          document.write(Out);

        if (top.window.frames.length == 0) {
          var Loc=window.location.href;
          var ix1=Loc.indexOf('?');
          var Qry='';
          if (ix1 > 0) {
            var Qry=Loc.substring(ix1+1);
            Loc=Loc.substring(0,ix1);
          }
          var ix1=Loc.lastIndexOf('/');
          Loc=Loc.substring(ix1+1);
          Out ='<a href="jaa_a.htm?Frame='+Loc+'" title="return to frames">Return to frames<\/a>.&nbsp;\n';
          if (Qry != '') {
            Out ='<a href="jaa_a.htm?Frame='+Loc+'&'+Qry+'" title="return to frames">Return to frames<\/a>.&nbsp; \n';
          }
            document.write(Out);
        }
        
        Out ='<img src="http://www.flint.umich.edu/cgi-bin/Count.cgi?df=jalarie.dat" align="bottom" alt="counter" title="counter" width="1" height="1" \/>&nbsp;\n';
          document.write(Out);
        
        document.write('<br \/>\n');
        
        function ViewSource() {
          var VS,PopVS;


VS=window.location.href;
VS='http://wwwtest.umflint.edu/cgi-bin/jalarie/filescan.cgi?file=1&source=yes&seek='+VS;
PopVS=window.open(VS,'ViewSource');

//VS=window.location.href;
//VS='http://wwwtest.umflint.edu/cgi-bin/jalarie/getpage.cgi?type=source&URL='+VS;
//PopVS=window.open(VS,'ViewSource');
//
//141.216.8.6 spruce
//http://www.samspade.org/t/safe?u=http%3A%2F%2Fspruce.flint.umich.edu%2F%7Ejalarie%2F

//          window.location="view-source:"+window.location;
          return void(0);
        } // ViewSource

        function PrintFrame() {
          if (top.window.frames.length == 0) {
            window.print();
            return void(0);
          }
          var Loc=document.location;
          var Opts='width=100,height=100';
          PF_Pop=window.open(Loc,'PrintFrame',Opts);
          this.window.focus();
          var PF_Time=setTimeout("PrintFrame2();",1*1000);
          return void(0);
        } // PrintFrame
        function PrintFrame2() {
          PF_Pop.window.print();
          var PF_Time=setTimeout("PrintFrame3();",5*1000);
          return true;
        } // PrintFrame2
        function PrintFrame3() {
          PF_Pop.window.close();
          return true;
        } // PrintFrame3
        
        function RatePage() {
          var Location=window.location.href;
          var Title=document.title;
          if (Title.substring(0,9) == 'jalarie: ') {
            Title=Title.substring(9);
          }
          var Loc='jaa_eb.htm?title='+Title+'&location='+Location;
          PopUp1=window.open(Loc,'RatePage');
          return void(0);
        } // RatePage

// access keys:
        AK_out ='';
        AK_out+='        <a accesskey="0" href="jaa_fb.htm"><\/a>\n';  // key list
        AK_out+='        <a accesskey="1" href="jaa_a.htm"><\/a>\n';   // home page
        AK_out+='        <a accesskey="2" href="jaa_g.htm"><\/a>\n';   // what's new
        AK_out+='        <a accesskey="3" href="jaa_b.htm"><\/a>\n';   // site map
        AK_out+='        <a accesskey="4" href="jaa_zc.htm"><\/a>\n';  // search
        AK_out+='        <a accesskey="5" href="???"><\/a>\n';         // 
        AK_out+='        <a accesskey="6" href="jaa_e.htm"><\/a>\n';   // help
        AK_out+='        <a accesskey="7" href="jaa_e.htm"><\/a>\n';   // complaints
        AK_out+='        <a accesskey="8" href="jaa_fe.htm"><\/a>\n';  // terms of service
        AK_out+='        <a accesskey="9" href="jaa_e.htm"><\/a>\n';   // feedback
          document.write(AK_out);
