

/***********************************************
* 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= false;	
// Be sure to set tipWidth wide enough for widest image
var tipWidth= 525;
var offX= 20;	// how far from mouse to show tip
var offY= 12; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "10pt";
// 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= "#d7d8fb"; 
var tipBorderColor= "#7363c5";
var tipBorderWidth= 5;
var tipBorderStyle= "ridge";
var tipPadding= 10;

// 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('images/pvccutter.jpg','This is a tool for cutting PVC pipe it cost around $15.00 at your local home improvement center and is a slick way to cut PVC pipe. It is not necessary if you are only going to build one light stand, but if you plan on building more than one it would be a nice tool to have.');
messages[1] = new Array('images/iron.jpg','Inexpensive soldering iron that can be purchased at Wal-Mart for around $10.00. <B>Caution</B> must be used when using the soldering iron to avoid the fumes, do all of my hole work either outside or in front of a fan.');
messages[2] = new Array('images/circle.jpg','The above photo shows <B>1.</B> the cup laying on its side with the wick out of the bottom, <B>2.</B> the wick laying on top of the soil in a circle.');
messages[3] = new Array('images/reservoir.jpg','This photo shows the various reservoirs that can be used for wick watering. <b>1.</b> Butter tub <b>2.</b> Storage containers <b>3.</b> My favorite wick reservoirs from Cape Cod Violetry.');
messages[4] = new Array('images/tray.jpg','I take a piece of egg crate (from the home center) and cut it to fit the bottom of a tray (my favorite and cheapest are sweater boxes) and then cut a piece of acrylic blanket that is 4 inches longer so I can wrap 2 inches around the ends of the egg crate. With this setup using a piece of glass or plastic I can control the humidity in the trays which leaves and young plants need.');
messages[5] = new Array('images/nylon.jpg','This is the label from a spool of nylon cord that I use it comes from your local Wal-Mart sporting goods department. Since I made the orginal scan of this label I think Wal-Mart has changed brands but it should still give you an idea of what I use.');
messages[6] = new Array('images/shelflayout.jpg','These photos show: <b>1</b> all of the pieces cut for each shelf and they way that they go together for each shelf. <b>2</b> The assembled shelf unit. Five of these shelf units are required for each light stand.');
messages[7] = new Array('images/wood.jpg','Photo Coming Soon<br />This photo shows the underneath side of one of the wooden shelf units with the shop light fixture installed on it. The shop light is fastened to the shelf with screws and washers through existing holes in the top, back, whatever of the light fixture.');
messages[8] = new Array('images/supportdetail.jpg','<b>Photo of shelf supports</b><br />This photo shows the location of the supports and the measurements that I used to locate them on the shelf. There should be 12.5 inches between them on the inside and they should be 5 inches in from the other edges of the shelf.');
messages[9] = new Array('images/done.jpg','Photo coming soon<br />This what the finished light stand should look like ready for plants.');
messages[10] = new Array('images/tank.jpg','As you can see my storage tank is just a round plastic container from good ole Wal-Mart. I tried a square one first and the sides were just not strong enough to support all the weight. Just be sure and get the strongest and heaviest made one possible, round seems to work best.');
messages[11] = new Array('images/pump.jpg','There is several different kinds, sizes, and prices of pond pumps available. The one that I am using I believe pumps somewhere around 1200 gallons per hour, and happens to be made by Little Gaint Pump out of Oklahoma City. It requires one of this size to pump the water to the height and distance that is required to reach all the shelves of a plant stand.');
messages[12] = new Array('images/nozzel.jpg','This is one of the better garden watering nozzels available. I chose this particular one for two reasons it seemed well constructed and had a nice feel to it important for long periods of watering. Since I thought its construction was better I felt like it would not leak and get water all over me or my plant room.');
messages[13] = new Array('images/pipe.jpg','This is just a small diameter chrome plated pipe that is used to plumb bathroom or kitchen sinks. It is approximately 20 inches in length and 1/4 inch in diameter, any kind of pipe would work. This particular pipe was the right length and flexible to put a slight bend in one end.');
messages[14] = new Array('images/fitting.jpg','This is the fitting that I found to connect the pipe to the garden nozzel. I have no idea what its use was for orginally but I found it in with the brass fittings and it worked.');
messages[15] = new Array('images/wand.jpg','Here is my version of a plant watering wand. I did not like the weed sprayer replacement nozzels and was not able to come up with a commercially made one so made my own. Experiment and see what you can come up with.');
messages[16] = new Array('images/sponges.jpg','Photo coming soon.<br />There is several different kinds, sizes, and prices of pond pumps available. The one that I am using I believe pumps somewhere around 1200 gallons per hour, and happens to be made by Little Gaint Pump out of Oklahoma City. It requires one of this size to pump the water to the height and distance that is required to reach all the shelves of a plant stand.');
messages[17] = new Array('images/brush.jpg','Here we have blush travel brush. The bristles are so soft that they do not damage the leaves and it is short enough that it fits nicely into my travel grooming kit.');
messages[18] = new Array('images/tool.jpg','The ceramic cleaning tool is a double ended tool. One end has a hooked blade that can be used for removing suckers. The opposite end is a flat blade that makes a fair cutting tool.');
messages[19] = new Array('images/sucker.jpg','<b>Suckers</b> are small plants that can be seen in the <b>axils</b> (from the Latin <i>axilla</i>, armpit) of established plants. They must be removed from single crown plants to maintain the shape of the plant. Placed in a rooting medium they will usually root and become plants that can later be transplanted into individual pots.')
messages[20] = new Array('images/saucer.jpg','This my favorite "pot" for african violet trailers. They can purchased at most garden centers and come in a variety of sizes, I usually use the 8", 10", or 12" sizes.');
messages[21] = new Array('images/pattern.gif','Here is what your pattern should look like for the mat pad. The two measurements that you will need is the diameter of the top of your resevoir or the inside bottom of your leaf support container, and the second measurement is the depth of your resevoir. I ususally 4 inches for both it works in most of my containers.');
messages[22] = new Array('images/pad.jpg','Photo 1</b> shows the completed capilliary pad not much to it, but it does a great job. As I said I cut mine out of acrylic blankets. <b>Photo 2</b> shows the pad in a leaf support container and on a resevoir ready to use, they are great give them a try.');
messages[23] = new Array('images/tub.jpg','In the first photo we see the lid to the butter tub with the hole cut in the lid. Remember to cut the hole just a shade larger than the bottom of the pot. The second photo shows the lid on the tub and the pot inserted in the lid.');
messages[24] = new Array('images/mc109.jpg','');
messages[25] = new Array('images/mc134.jpg','');
messages[26] = new Array('images/mc150.jpg','');
messages[27] = new Array('images/mc517.jpg','');
messages[28] = new Array('images/mc519.jpg','');
messages[29] = new Array('images/mc621.jpg','');
messages[30] = new Array('images/mc001.jpg','');
messages[31] = new Array('images/mc002.jpg','');
messages[32] = new Array('images/mc003.jpg','');
messages[33] = new Array('images/mc004.jpg','');
messages[34] = new Array('images/mc005.jpg','');
messages[35] = new Array('images/mc006.jpg','');
messages[36] = new Array('images/yarn.jpg','Just any cheap yarn will do, just make sure it is acrylic or man made. Natural fibers will eventually rot. I use the full strand some split it into single strands for smaller pots.');
messages[37] = new Array('images/nylonhose.jpg','I cut just strips of old nylon hose. When mother was alive I begged her old panty hose, washed and cut into strips. Now I obtain hose where ever I might.');
messages[38] = new Array('images/superthrive.jpg','SUPERthrive is one of the best products on the market. It is like a wonder drug for plants. Now it can be purchased at Wal-Mart.');
messages[39] = new Array('images/spacer.gif','Returns you to the page you just left.');
messages[40] = new Array('images/leafplants.jpg','Leaf container with the reward of baby plants.');
messages[41] = new Array('images/chiritahisiko.jpg','<i>Chirita sinesis</i> Hisako');
messages[42] = new Array('images/chiritaleaf.jpg','How about a <i>Chirita sinesis</i> Hisako leaf that I cut way down to start future plants from.');
messages[43] = new Array('images/cups.jpg','A couple of the varities of cups used.');
messages[44] = new Array('images/leafbox.jpg','One of my sweater boxes filled with 3 ounce solo cups and leaves. Some leaves are almost ready to transplant.');





////////////////////  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 + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
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) {
		standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
		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>')


