//--------------------------------------------------------------------
// Global settings; tweak as required
//
tipTitle = "Version info";
tipBgColor = "#ffcccc";          // Gray background
tipColor = "#cc3333"            // red text color
tipWidth = 700;
tipHeight = 100;
// Timing
tipOpen = 50;                         // open msecs after mouseover
tipClose = 500;                         // close msecs after mouseout
tipFactor = 20;                         // est: chars read in 1 msec
// Null defaults
tipWin = null;
tipOTime = null; tipOFlag = 0;
tipCTime = null; tipCFlag = 0;

//--------------------------------------------------------------------
// tip(tipLocation, tipText, later)
//      tipLocation -- handle:  a Window name
//      tipText -- string:      the message to display in tipLocation
//                              null string to close tipLocation
//      later -- boolean:       show text immediately or after pause
//
// Usage:
//      onMouseOver='tip(win,"This is descriptive.",1); return true;'
//      onMouseOut='tip(win,"",0); return true;'
//      onClick='tip(win,"",0); return true;'
//
//   o  Don't forget the onClick(), or else the tip window may pop
//      up while you are off doing whatever the click action was.
//
function tip(tipLocation, tipText, later) {
    //
    // Clear any pending window opens or closes. Please note:
    //   uninitialized "timeout id" in NN3.x is untestable 'opaque'
    //   object, while "timeout id" in MSIE *must* be tested before
    //   clearTimeout(). Therefore, use global integers to bypass
    //   this Catch-22 situation.
    //
    if (tipOFlag != 0) { clearTimeout(tipOTime); tipOFlag = 0; }
    if (tipCFlag != 0) { clearTimeout(tipCTime); tipCFlag = 0; }
    //
    // Remove the tip from display
    //
    if (tipText == '') {
	if (tipWin == null) return;     // already gone
	//
	// Close window in the future (extra delay is to
	//   avoid popping down & up if there is a subsequent
	//   mouseOver).
	//
	tipCTime = window.setTimeout(
				     "if (tipWin != null) {tipWin.close(); tipWin=null;}",
				     tipClose);
	tipCFlag = 1;
    }
    //
    // Display the tip
    //
    else {
	//
	// If not yet open and requesting delayed open...
	//
	if (tipWin == null && later > 0) {
	    tipOTime = window.setTimeout("tip('"+tipLocation+"','"+tipText+"',0);", tipOpen);
	    tipOFlag = 1;
	    return;
	}
	//
	// MSIE requires explicit options on open(). Also,
	//   contrary to appearances, this double open is not
	//   for the known NN2 open() bug (which ignores the
	//   location URL), but rather for an IE3 problem that
	//   creates a window object without a valid document
	//   object within.
	// The 'dependent' attribute is Netscapism to indicate
	//   a window child relationship.
	//
	tipWin = window.open("",tipLocation,
			     "width="+tipWidth+",height="+tipHeight+","+
			     "toolbar=0,menubar=0,scrollbars=0,"+
			     "location=0,status=0,resizable=0,"+
			     "directories=0,dependent=1");
	tipWin = window.open("",tipLocation,
			     "width="+tipWidth+",height="+tipHeight+","+
			     "toolbar=0,menubar=0,scrollbars=0,"+
			     "location=0,status=0,resizable=0,"+
			     "directories=0,dependent=1");
	if (tipWin == null) return;     // whoops!
	// bring window to front
	if (parseInt(navigator.appVersion) > 2) tipWin.focus();
	if (tipWin.document) {
	    tipWin.document.open('text/html');
	    tipWin.document.write("<HEAD><TITLE>");
	    tipWin.document.write(tipTitle);
	    tipWin.document.write("</TITLE></HEAD>");
	    tipWin.document.write("<BODY BGCOLOR='"+tipBgColor+"' TEXT='"+tipColor+"'>");
	    tipWin.document.write(tipText.italics());
	    tipWin.document.write("</BODY>");
	    tipWin.document.close();
	}
	else if (tipWin) {
	    // open window, but still no document?!?
	    tipWin.close();
	    return;
	}
	//
	// Estimate how long it takes to read this much text;
	//   blank the tip text after a suitable delay for
	//   reading.
	//
	tipRead = Math.round(tipText.length/tipFactor) * 1000;
	tipOTime = window.setTimeout(
				     "tip('"+tipLocation+"','',0);",
				     tipRead);
	tipOFlag = 1;
    }
}

function revisie(author, date, revision) {
    tip("TOP",
	"<strong>"+document.URL+"</strong><br>"+
	  "<p class=footer> Dit document is voor het laatst veranderd door <span class=footer-id>"+author+
	"</span>, op <span class=footer-id>"+date+
	"</span> (UTC); waarbij het <span class=footer-id>"+revision+
	"</span> werd.</p>",
	1);
    return false;
}





