/***********************************************
* Image w/ description tooltip- By Dynamic Web Coding (www.dyn-web.com)
* Copyright 2002-2007 by Sharon Paine
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* IMPORTANT: Put script after tooltip div or 
* put tooltip div just before </BODY>
*/

var dom = (document.getElementById) ? true : false;
var ns5 = (!document.all && dom || window.opera) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false;

var origWidth, origHeight;

// avoid error of passing event object in older browsers
if (nodyn) { event = "nope" }

///////////////////////  CUSTOMIZE HERE   ////////////////////
// settings for tooltip 
// Do you want tip to move when mouse moves over link?
var tipFollowMouse= true;	
// Be sure to set tipWidth wide enough for widest image
var tipWidth= 300;
var offX= 20;	// how far from mouse to show tip
var offY= 12; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "8pt";
var tipFontalign= "justify";
// set default text color and background color for tooltip here
// individual tooltips can have their own (set in messages arrays)
// but don't have to
var tipFontColor= "#000000";
var tipBgColor= "#DDECFF"; 
var tipBorderColor= "#aca486";
var tipBorderWidth= 1;
var tipBorderStyle= "ridge";
var tipPadding= 4;

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing: 
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
messages[0] = new Array('','The items on the site have been picked out after carefully checking out design and quality. There are fundamental items - basic Tshirts and Tanktops and other essentials; there are unique clothing and accessories, chosen for originality and comfort; authentic designer jeans and pants for a lower cost. We also have a designer corner where we will feature up-and-coming jewelry designers,original pieces for below retail; a Stylist area where items from our website are put together to form complete outfits; and garage sale, where we have clearance items.',"#FFFFFF");
messages[1] = new Array('','BabyVision have developed an entire line of soft infant products that cover nearly all of your baby needs. From coordinated layette and bedding, bath towels and washcloths, drool and feeding bibs, bottles and pacifiers, socks and booties, gift sets, baby carriers and diaper bags, babyvision have made family values and commitment to excellence a part of each of the products.',"#FFFFFF");
messages[2] = new Array('','The purpose of this website is to be the one-stop shopping resource for unique baby clothes and baby products! This website is basically build using oscommerce, and modified to suit the client requirements. This is an ecommerce website with a complete admin section. This is an ongoing project, with continuous enhancement to the site.',"#FFFFFF");
messages[3] = new Array('','This website is build using oscommerce on LAMP technology, and modified to suit the client requirements. This ecommerce website has shopping cart, payment modules, admin module to add products and categories, generating orders, reports, packaging slips, etc. This is an ongoing project, with continuous enhancement to the site. The website is designed for premium baby clothing to target customers in USA.',"#FFFFFF");
messages[4] = new Array('','It is a web based application develop for Friedman & MacFadyen P.A. It provides useful information for cases which are under delinquency. Application is divided into different parts which manage information about Quicklook, Escrow, Tracking, Phonelog, Diary. Application provide services like online PDF document generation to  maintain stages, fax service from user desktop, mail service.',"#FFFFFF");
messages[5] = new Array('','It is a web based application developed for MSV. It provides the facility to users to submit their workorder and workorder related documents.',"#FFFFFF");
messages[6] = new Array('','GoShape.com is one of the Top US Herbalife Independent Distributor. This ecommerce website distibutes herbalife products online and also provides free email consultation for weight control. This project involves integration with payment gateways, devloping the checkout pages, preparing homepage banners and other changes to the site.',"#FFFFFF");
messages[7] = new Array('','Equation has one of the largest variety of sizes and brands of eyewear available and our prices are absolutely unbeatable. 100% of our eyewear is recycled. We are committed to helping the environment and helping people around the world see better for less. Our eyewear products are refurbished to like new conditions; this way, our customers don’t have to spend lots of money to own quality and name brand frames, eyeglasses, and sunglasses.',"#FFFFFF");
messages[8] = new Array('','Aristotle Financial Inc., founded by accountants for accountants, is dedicated to accounting services to allow you to have a "back office" without the expenses and headaches associated with managing one. Our services cover the complete gamut ranging from accounts payable, accounts receivable, to complete finance and accounting services.',"#FFFFFF");
messages[9] = new Array('','Official website for movie Falling for Grace, developed completely in flash. This website showcases the photo gallery, cast, story, screening time, reviews, interviews, etc of the movie.',"#FFFFFF");
messages[10] = new Array('','Official website for movie east broadway, developed completely in flash. A romantic comedy film with the following theme. \'Cultural complications arise when an Asian-American woman realizes her Cinderella fantasy by dating one of Gotham\'s most eligible blue-blood bachelors.\' This website showcases the photo gallery, cast, story, screening time, reviews, interviews, etc of the movie.',"#FFFFFF");
messages[11] = new Array('','The Connection Coach is website which is based on Carrer Acceleration Learning program. Its includes \'Connect to Your Future\' which is a proven program - by <I>Christine Belknap</I> that teaches you what you need to know as a new college grad to give you an edge over your “competition”',"#FFFFFF");
messages[12] = new Array('','NewPage is a focused placement and HR consulting agency that assists both established and emerging American, European, and Japanese multinational firms.This is a complete Job portal and can be accessed in 3 languages - English, Japanese and Chinese. The Employers can find the right individuals, who will devise and execute the company\'s future strategic direction. A Candidate can upload his resume, or search  the job according to his specialty and apply to a particular vacancy.',"#FFFFFF");
messages[13] = new Array('','On Target Homes, LLC has designed an entirely new way to sell your home for the highest possible price in less than one week, guaranteed. This website allows you to search the exact home you need for buyers depending on price, location, number of bed/bath, and provides you with direction to the house, you wish to buy.',"#FFFFFF");
messages[14] = new Array('','SPR is a worldwide provider of consulting services that enable organizations to compete more effectively through the predictable, on-time delivery of high-quality software by focusing on software estimation, measurement,and assessment. SPR services help companies manage the software development process for maximum productivity, performance, and quality. ',"#FFFFFF");
messages[15] = new Array('','Versataal Records is a music records website mainly  featuring artist \'Kenya\'. Music lovers can listen to any music or watch video of the featured artist. This site had audio and video records of various artists. Other features are photo gallery, DJ Booth, News and Multimedia with artists interviews.',"#FFFFFF");
messages[16] = new Array('','Fineslice was created to provide a tailored sourcing service for property investors. This website caters for the beginner to the fulltime property investor. This website has a content management system for dynamic updation of data.',"#FFFFFF");
messages[17] = new Array('','An ecommerce Jewelry website for ethnic artistic jewelry. This site involves user registration, and the inventories are divided into categories and sub cartegories and has extensive search features. The site has shopping cart with payment gateway and paypal options. The admin has all the features required for the store manager like reports, adding inventory, updating order, etc.',"#FFFFFF");
messages[18] = new Array('','Sell-Quick is a real estate website based in UK. We have developed the form integration for this website, where in the form entries and emails are directly populated in another emailer software. The enguiry details from the prospective buyers and sellers are send to the website adminstrator.',"#FFFFFF");
messages[19] = new Array('','Your home for a multitude of quality pet supplies offered at everyday discount prices. Whether you are in need of aquarium gravel, and quality aquarium substrate¸ or for aquarium prefilters and an assortment of fish aquarium gravel; we offer all of the aquarium supplies you need in our one stop online aquarium shop.',"#FFFFFF");
messages[20] = new Array('','WnyhSports is a sports website, where coaches and members have membership and can share information with other athletes and members and this site has various other features. We have build the complete website for this client from the existing code, myWnyh page with movable sections with weather, athletes, horoscope, forum, shopping cart, help desk, Coach control panel, admin etc',"#FFFFFF");
messages[21] = new Array('','<img src="images/indi_mba_logo.jpg"><br>Indisoft LLC is a member of MBA/MW. The Mortgage Bankers Association of Metropolitan Washington is the largest organization representing residential and commercial mortgage industry professionals in the District of Columbia and nearby counties and cities of Maryland and Virginia.<br><b>Meet us on the Trade Show at MBA/MW</b>.',"#f3f1f4");
////////////////////  END OF CUSTOMIZATION AREA  ///////////////////

// preload images that are to appear in tooltip
// from arrays above
if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

// to layout image and text, 2-row table, image centered in top cell
// these go in var tip in doTooltip function
// startStr goes before image, midStr goes between image and text
var startStr = '<table width="' + tipWidth + '">';
var midStr = '<tr><td valign="top" style="text-align:justify;">';
var endStr = '</td></tr></table>';

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

/////////////////////////////////////////////////
//  doTooltip function
//			Assembles content for tooltip and writes 
//			it to tipDiv
/////////////////////////////////////////////////
var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
	mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	if (tipOn) positionTip(evt);
}

/////////////////////////////////////////////////////////////
//  positionTip function
//		If tipFollowMouse set false, so trackMouse function
//		not being used, get position of mouseover event.
//		Calculations use mouseover event position, 
//		offset amounts and tooltip width to position
//		tooltip within window.
/////////////////////////////////////////////////////////////
function positionTip(evt) {
	if (!tipFollowMouse) {
		mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
		mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
	var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = mouseX-(tpWd+offX)+"px";
	else tipcss.left = mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = winHt-(tpHt+offY)+"px";
	else tipcss.top = mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

document.write('<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>')