//
// lpmjs.js
// (C) DJ Greaves, Mixerton.com
// $Id: $
//
//


  function MSIEUnHighlightRow( rowNumber )
  {
      var targetRow = eval( "document.all.row" + rowNumber );
      targetRow.bgColor = "white";
  }
  function MSIEHighlightRow( rowNumber )
  {
      var targetRow = eval( "document.all.row" + rowNumber );
      targetRow.bgColor = "lightsteelblue";
  }




  function MSIEUnHighlightRow( rowNumber )
  {
      var targetRow = eval( "document.all.row" + rowNumber );
      targetRow.bgColor = "white";
  }

  function MSIEHighlightRow( rowNumber )
  {
      var targetRow = eval( "document.all.row" + rowNumber );
      targetRow.bgColor = "lightsteelblue";
  }


  function NetscapeHighlightRow( rowNumber )
  {
      var highlight = document.layers["highlightLayer"];
      var height = highlight.clip.height;
      highlight.moveTo( 1, ( rowNumber * height ) );
      highlight.visibility="show";
  }
  function NetscapeUnHighlightRow( rowNumber )
  {
      var highlight = document.layers["highlightLayer"];
      highlight.visibility="hide";
  }


  
  // set functions according to browser type
  if( navigator.appName.search(  /Microsoft Internet Explorer/i ) > -1 )
  {
      HighlightRow = MSIEHighlightRow;
      UnHighlightRow = MSIEUnHighlightRow;
  }
  else
  {
      // else assume Netscape (a real application should do more complete checking!)
      HighlightRow = NetscapeHighlightRow;
      UnHighlightRow = NetscapeUnHighlightRow;
  }
  // keep track of line # for currently selected row
  var selectedRow = "undefined";  

  function UnSelectRow( rowID )
  {
      // unhighlight the previously selected row, if any
      if( selectedRow != "undefined" )
          UnHighlightRow( selectedRow );

   }

  function SelectRow( rowID )
  {
      // unhighlight the previously selected row, if any
      if( selectedRow != "undefined" )
          UnHighlightRow( selectedRow );

      // if necessary, convert row ID to row line number here
      rowNumber = rowID;

      // highlight and save selected row
      HighlightRow( rowNumber );
      selectedRow = rowNumber;
  }




       firsttime = true;

       function initialise()
       {
          firsttime = false;

	  if (document.getElementById) stdBrowser = true;
	  else stdBrowser = false;

          active = new Image();
          inactive = new Image();
          active.src="/lockup/lomp/gifs/record-red.gif"
          inactive.src="/lockup/lomp/gifs/record-green.gif"

         
          if (document.all)
          {
             maxHeight = document.body.clientHeight-40;
             maxWidth = document.body.clientWidth-40;
          }
          else
          {
             maxHeight = window.innerHeight-40;
             maxWidth = window.innerWidth-40;
          }

          flag = 1;
       
       }



       function CBGonload()
       {
          if (firsttime) initialise();
	  // 	  setTimeout("moveIt()", 1000);

	  //  window.status = flag;

       }

       function activate(x) 
       {
         SelectRow(x)
       }
 
       function deactivate(x)
       {
         UnSelectRow(x)
       }

// End of javascripts




