// Script version 1.3 2003-10-28 (MB)
// Written by Michael Beddow for David Postles
// Copyright Michael Beddow 2001, 2003
// You may copy, use or adapt this script for any non-commercial purpose,
// provided that you acknowledge the source.
//
var hintWindow;

window.onerror = function() {return true;};


function newWindow()
    {

      var popX = 0;
      var popY = 0;
      if (screen)
        {
          popY = (screen.availWidth  - 15*(screen.availWidth/16));
          popX = (screen.availHeight - 15*(screen.availHeight/16));
        }

      if (!hintWindow || hintWindow.closed)
      {
      hintWindow = window.open('','hintWin4','width=400,height=30,left='+popY + ',top=' +popX);
      hintWindow.document.open();
      hintWindow.document.write('<html>');
      hintWindow.document.write('<head><title>Transcription</title><style>.hint { font-family: Arial; color: #004000 }</style></head>');
      hintWindow.document.write('<body><span class="hint"><center>Move the mouse pointer across the MS image to see transcriptions and hints here. You may move this little window somewhere else on your screen if you like)</center></span></body>');
      hintWindow.document.write('</html>');
      hintWindow.document.close();
      hintWindow.focus();
      }
      return true;
    } 

   
function mouseIn(message)
    {

    if (!hintWindow || hintWindow.closed)
       {
        newWindow();
        return true;
       }
    hintWindow.document.open();
    hintWindow.document.write('<html>');

    hintWindow.document.write('<head><title>Transcription</title></head>');
    hintWindow.document.write('<body><span class="hint">'+message+'</span></body>');
    hintWindow.document.write('</html>');
    hintWindow.document.close();
    hintWindow.focus();
    return true;
    } 
    
function mouseOut()
    {
     hintWindow.document.open();
     hintWindow.document.write('<html>');
     hintWindow.document.write('<head><title>Transcription</title></head>');
     hintWindow.document.write('<body>&nbsp;</body>');
     hintWindow.document.write('</html>');
     hintWindow.document.close();
     return true;
    } 
 