<!--
/*
This code is from Dynamic Web Coding 
at http://www.dyn-web.com/
Copyright 2002 by Sharon Paine 
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code 
as long as this entire notice is included.

Idea and math for time-based animation from 
Aaron Boodman at www.youngpup.net
*/

var origWidth, origHeight;
if (document.layers) {
  origWidth = window.innerWidth;
  origHeight = window.innerHeight;
}
// onresize
function to_do_onresize() {
	if (document.layers) {
	 if (window.innerWidth != origWidth || window.innerHeight != origHeight)
	    window.location.reload();
	} else {
		win_width = getWinWidth();
		win_height = getWinHeight();
	}
}
window.onresize = to_do_onresize;	

// avoid error of passing event object in older browsers
if (!document.getElementById && !document.all && !document.layers) 
	event = "";

var win_width, win_height;	

/////////////////////////////////////////////////////////////////////
// Customize tooltip here

// preload images to appear in tooltip
var imgAr = new Array("images/dot-com-btn.gif");

if (document.images) {
	var imgs = new Array();
	for (var i=0; i<imgAr.length; i++) {
  	imgs[i] = new Image(); 
		imgs[i].src = imgAr[i];
  }
}

// settings for tooltip 
var tipWidth 			 	= 300;
var tipOffX				 	= 10;	// how far from mouse to show tip
var tipOffY				 	= 10; 
var tipFontFamily 	= "Comic Sans MS, arial, helvetica, sans-serif";
var tipFontSize			= "11px";
var tipFontColor		= "#333366";
var tipBgColor 			= "#d6e4fc";
var tipBorderColor 	= "#333366";
var tipBorderWidth 	= 1;
var tipBorderStyle 	= "dashed";
var tipPadding		 	= 4;
var tipAniLen				= 300; // time allotted for slideOut/In (milliseconds)

// messages for links
var msg01 = "The <em>Dolphins-Cove</em> is a small network of mentors and a core group of travellers who are linked by common causes in the oceans of Life and to maintain the balance amongst the peoples.";
var msg02 = "There are those among us who stand at the cusp of change, for evolution and revolution. We are the Edgerunners of Life.";
var msg03 = "till next time, my friends";
var msg04 = "Even from a dark night, songs of beauty can be born.";
var msg05 = "The greatest difficulty is that men do not think enough of themselves, do not consider what it is that they are sacrificing when they follow in a herd, or when they cater for their establishment...A man should learn to detect and foster that gleam of light which flashes across his mind from within far more than the luster of the whole firmament without. Yet he dismisses without notice his peculiar thought because it is peculiar. The time will come when he will postpone all acquired knowledge to this spontaneous wisdom, and will watch for this illumination more than those who watch for morning.";
var msg06 = "Our life is what our thoughts make it.";
var msg07 = "link here to see the thanks and good wills that made the dolphins-cove possible";
var msg08 = "[ to the dolphins-cove.com ]";
var msg09 = "where we depend upon the largess of our fellows for goodwill and times";
var msg10 = "[ to BoSPMwaA! Assemble! ]";

var msgImg = '<img src="images/dot-com-btn.gif" width="176" height="30" alt="" border="0"><div class="tp1">Images and text can go together in a tooltip.</div>';

// end of tooltip customization area
/////////////////////////////////////////////////////////////////////

var tooltip, tipMult, startTime;
function initTip() {
	tooltip = new dynObj('tipDiv');
	if (!tooltip) return;
	if (!document.layers && (typeof tooltip.doc.innerHTML == "undefined" || window.opera) ){
		tooltip = null;
		return; // opera 7 not ok
	}
	tooltip.slideOut = slideOut;
	tooltip.slideIn = slideIn;
	
	win_width = getWinWidth();
	win_height = getWinHeight();
	if (tooltip.el.style) {	// ns4 would lose all this on rewrites
		tooltip.css.width = tipWidth+"px";
		tooltip.css.fontFamily = tipFontFamily;
		tooltip.css.fontSize = tipFontSize;
		tooltip.css.color = tipFontColor;
		tooltip.css.backgroundColor = tipBgColor;
		tooltip.css.borderColor = tipBorderColor;
		tooltip.css.borderWidth = tipBorderWidth+"px";
		tooltip.css.padding = tipPadding+"px";
		tooltip.css.borderStyle = tipBorderStyle;
	}
	// adjust for border and padding in standards-compliant browsers
	// be sure to skip ie4 which will give window width
	if (document.getElementById && tooltip.el.offsetWidth) 
		tipWidth = tooltip.el.offsetWidth;
	tooltip.clipTo(0,0,0,0);	
	tipMult = tipWidth/tipAniLen/tipAniLen;	// used for slideIn/Out
}
window.onload=initTip;

function doTip(txt,evt) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1); if (t2) clearTimeout(t2);
	var cntnt;
	if (document.layers) // styles need to be reapplied each time for ns4
		cntnt = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + tipBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td><span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + tipFontColor + ';">' + txt  + '</span></td></tr></table></td></tr></table>';
	else cntnt = txt;
	tooltip.writeLyr(cntnt);
	
	evt = (window.event)? window.event: evt;
	if (evt) {
		var mouseX = (evt.pageX)? evt.pageX: evt.clientX + getScrollX();
		var mouseY = (evt.pageY)? evt.pageY: evt.clientY + getScrollY();
	}
	tooltip.width = getWidth(tooltip.el);	
	tooltip.height = getHeight(tooltip.el);
	tooltip.clipTo(0,tooltip.width,tooltip.height,0);
	positionTip(mouseX,mouseY)
	
	startTime = (new Date()).getTime();
	tooltip.slideOut();
}

// check coordinates and position tooltip
function positionTip(mouseX,mouseY) {
	var x, y;
	
	if ((mouseX + tipOffX + tooltip.width) > win_width + getScrollX()) 
		x = mouseX - (tooltip.width + tipOffX);
	else x = mouseX + tipOffX;
	
	if ((mouseY + tipOffY + tooltip.height) > win_height + getScrollY()) 
		y = (mouseY - (tooltip.height + tipOffY) > getScrollY())?  mouseY - (tooltip.height + tipOffY): win_height + getScrollY() - (tooltip.height + tipOffY);
	else y = mouseY + tipOffY;
	tooltip.shiftTo(x,y);
}

var t1, t2;	// for setTimeout's
function slideOut() {
	var elapsed = (new Date()).getTime()-startTime;
	if (elapsed<tipAniLen) {
		var cv = this.width - Math.round(Math.pow(tipAniLen-elapsed,2)*tipMult);
		this.clipTo(0,cv,this.height,0);
		t1 = setTimeout(this.obj+".slideOut()",35);
	} else this.clipTo(0,this.width,this.height,0);
}

function slideIn() {
	var elapsed = (new Date()).getTime()-startTime;
	if (elapsed<tipAniLen) {
		var cv = Math.round(Math.pow(tipAniLen-elapsed,2)*tipMult);
		this.clipTo(0,cv,this.height,0);
		t2 = setTimeout(this.obj+".slideIn()",35);
	} else this.clipTo(0,0,this.height,0);
}

function shrink() {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);
	if (t2) clearTimeout(t2);
	startTime = (new Date()).getTime();
	tooltip.slideIn();
}

//-->