/*************************************************************************
  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!
*************************************************************************/
/*
##########################################################################
#	File Updated By : Somdatt Sharma                                 #
#	Updated Time 	: Tuesday, 17 February 2009 , 11:30:38 AM         #
##########################################################################

*/
// adjust horizontal and vertical offsets here
// (distance from mouseover event which activates tooltip)
Tooltip.offX = 4;  
Tooltip.offY = 4;
Tooltip.followMouse = false;  // must be turned off for hover-tip

// tooltip content variables
var msgSample = '<span class="tooltipfont">This is the sample of the help text. This can <a href="#">link</a> any other page as well.</span>';
var msgMarketplace = '<span class="tooltipfont">A marketplace ad is a place for classifieds ads for our members.</span>';
/*var msgWishlist = '<span class="tooltipfont">A Wishlist is a post from one of our members of things, connections, jobs, partners they want.</span>';*/
var msgWishlist = '<span class="tooltipfont">A Wishlist is a list of post from members which includes things, connections, jobs, partners they want.</span>';
var msgPremiumOnly = '<span class="tooltipfont">Must be a premium member to download.</span>';
var msgFreeMember = '<span class="tooltipfont">Any member can download.</span>';

<!-- Forum Messages-->
var msgFreeForum = '<span class="tooltipfont">All members can access this forum.</span>';
var msgPremiumForum = '<span class="tooltipfont">Only Premium members can access this forum.</span>';

<!-- Groups Messages-->
var msgWhatIsGroup = '<span class="tooltipfont">Its where people with a shared interest meet, get to know each other, and stay informed.</span>';
var msgPublicGroup = '<span class="tooltipfont">This is a Public Group - Anyone can Join!</span>';
var msgPrivateGroup = '<span class="tooltipfont">This is a Private Group - Moderators approval is required to join.</span>';

var msgAvailableDays = '<span class="tooltipfont">This content will be unlocked when you are a member for 10 days</span>';
var msgPremiumMembers = '<span class="tooltipfont">This article is unavailable to you at this membership level.</span>';

var msgAvailablePremiumM = '<span class="tooltipfont">This article is unavailable to you at this membership level.</span>';
//var msgAvailableAll = '<span class="tooltipfont">This is available to All</span>';
// update by manmohan
var msgAvailableAll = '<span class="tooltipfont">This is available to All</span>';

var msgArticleAdmin = '<span class="tooltipfont">This article is posted by administrator. You will not be able to contact the guru through this</span>';



var msgTerms = 'The code is free for <a href="http://www.dyn-web.com/bus/terms.html#personal">personal use</a> but all other uses require purchase of a <a href="http://www.dyn-web.com/bus/purchase.html">license</a>.';

var msginvitmemberhelp='<div class="invitFriendColumn"><div class="invitscolumns" >Name</div><div class="invitscolumns" >Email</div><div class="clear" ></div><div class="invitscolumns" >Gorge tran</div><div class="invitscolumns" >Gorgetran@gmail.com</div><div class="clear" ></div><div class="invitscolumns" >Mike walter</div><div class="invitscolumns" >Mikewalter@yahoo.com</div></div>';

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()", 300);
}

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);