function alert() {}

/*************************************************************************
  This code is from Dynamic Web Coding at dyn-web.com
  Copyright 2003-5 by Sharon Paine 
  See Terms of Use at www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// adjust horizontal and vertical offsets here
// (distance from mouseover event which activates tooltip)
Tooltip.offX = 0;  
Tooltip.offY = 0;
Tooltip.followMouse = false; 

var menubox = '<table width=152 height=268 background="images/menu.gif"><tr><td><table height=220 width=80 align=center border=0><tr><td align=center><a href="graphics-corporate-logo.html"><img src="images/sub-button1.jpg" alt="Corporate Identities and Logos Portfolio" border="0" class="shadowcss" effect="popshadow" mousedowncolor="#00aec4" mouseupcolor="#84949d" /></a></td><td rowspan=4></td></tr><tr><td><a href="print-marketing-materials.html"><img src="images/sub-button2.jpg"  alt="Printed Materials Portfolio" border="0" class="shadowcss" effect="popshadow" mousedowncolor="#00aec4" mouseupcolor="#84949d"/></a></td></tr><tr><td><a href="print-advertising.html"><img src="images/sub-button3.jpg" alt="Print Advertising Portfolio" border="0" class="shadowcss" effect="popshadow" mousedowncolor="#00aec4" mouseupcolor="#84949d"/></a></td></tr><tr><td><a href="3d-applications.html"><img src="images/sub-button4.jpg" border="0" alt="3D Applications Portfolio" class="shadowcss" effect="popshadow" mousedowncolor="#00aec4" mouseupcolor="#84949d"/></a></td></tr></table></td></tr></table>';

function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.clearTimer();
  var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
  if ( tip && tip.onmouseout == null ) {
      tip.onmouseout = Tooltip.tipOutCheck;
      tip.onmouseover = Tooltip.clearTimer;
  }
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.timerId = setTimeout("Tooltip.hide()", 20);
}

Tooltip.tipOutCheck = function(e) {
  e = dw_event.DOMit(e);
  // is element moused into contained by tooltip?
  var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
  if ( this != toEl && !contained(toEl, this) ) Tooltip.hide();
}

// returns true of oNode is contained by oCont (container)
function contained(oNode, oCont) {
  if (!oNode) return; // in case alt-tab away while hovering (prevent error)
  while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true;
  return false;
}

Tooltip.timerId = 0;
Tooltip.clearTimer = function() {
  if (Tooltip.timerId) { clearTimeout(Tooltip.timerId); Tooltip.timerId = 0; }
}

Tooltip.unHookHover = function () {
    var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
    if (tip) {
        tip.onmouseover = null; 
        tip.onmouseout = null;
        tip = null;
    }
}

dw_event.add(window, "unload", Tooltip.unHookHover, true);
