﻿// This code is from Dynamic Web Coding www.dyn-web.com 
// Copyright 2002 by Sharon Paine Permission granted to use this code as long as this entire notice is included.
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/

var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

if (nodyn) { event = "nope" }
var tipFollowMouse	= true;	
var tipWidth		= 250;
var tipHeight		= 200;
var offX		 	= 12;	// how far from mouse to show tip
var offY		 	= 12; 
var tipFontFamily 	= "'Myriad Pro', tahoma, verdana, arial, helvetica, sans-serif";
var tipFontSize		= "9pt";
var tipFontColor	= "#000000";
var tipBgColor		= "#DDECFF"; 
var origBgColor 	= tipBgColor; // in case no bgColor set in array
var tipBorderColor 	= "#cccccc";
var tipBorderWidth 	= 1;
var tipBorderStyle 	= "ridge";
var tipPadding	 	= 6;

var messages = new Array();
messages[0] = new Array('http://www.abcimaging.com/images/laserengraving_img3.jpg','<h2>Acrylic Cube</h2>Fabricated from thick clear acrylic, these shapes engrave a frosty white color for excellent contrast. The Acrylic Cubes feature beveled edges for extra flair and are ideal for awards, gifts or paperweights.<br><br><b>Part Number:</b> ATH 001<br><b>Description:</b> Acrylic Cube &#8211; 2x2x2 inches<br><b>Price:</b> 26.95<br>',"#ffffff");
messages[1] = new Array('http://www.abcimaging.com/images/laserengraving_img2.jpg','<h2>Acrylic Mega Paperweight</h2>Great-looking beveled edges with a black background for added contrast when engraving photos or text. Makes a perfect desk top gift or special award.<br><br><b>Part Number:</b> AME 018<br><b>Description:</b> Acrylic Mega Paperweight &#8211; Black<br><b>Price:</b> 23.95<br>',"#ffffff");
messages[2] = new Array('http://www.abcimaging.com/images/WedgePyramidGrp.jpg','<h2>Acrylic Pyramids and Wedges</h2>Acrylic Pyramids and Wedgessparkle with brilliance and quality. Cast acrylic for frosty white engraving and precision machined and polished for outstanding quality. The colored bases reflect deep, saturated colors which contrast perfectly with the laser engraved message or logo. Available in two distinct sizes and black, gold, red and blue base colors. The Acrylic Pyramids and Wedges are very easy to engrave using the available engraving fixtures.<br><br><b>Part Numbers:</b> AUS 030 &#8211; AUS 049<br><b>Descriptions:</b> Pyramid or Wedge &amp; color<br><b>Prices:</b> 38.95&#8211;110.95 (differs depending on shape and color)<br>',"#ffffff");
messages[3] = new Array('http://www.abcimaging.com/images/alumamarksheet.jpg','<h2>AlumaMark Sheets</h2>AlumaMark has become the standard for i.d. plates, plaque plates, name tags and dozens of other applications. The material works ideally with photographs, highly detailed graphics, small text and large fills. AlumaMark Sheets are available in Matte Silver, Satin Gold, Satin Silver, Satin Brass, Satin Bronze and the newly added colors of Gloss Silver and Gloss Gold. Each sheet is 12 x 20 inches in size and .020 inches thick.<br><br><b>Part Number:</b> NUS 120 &#8211; NUS 128<br><b>Description:</b> AlumaMark (followed by color)<br><b>Price:</b> 40.00 for 20 x 20 sheet<br>',"#ffffff");
messages[4] = new Array('http://www.abcimaging.com/images/laserengraving_img7.jpg','<h2>Anodized Aluminum Sheets</h2>These Anodized Aluminum Sheets are perfect for dozens of signage and identification applications. Available in a rich gold and deep black color, these sheets can be cut with a metal shear and engraved with a frosty white tone for snappy contrast. The Anodized Aluminum Sheets are sold in single sheets sized at 12 x 24 inches and are a thickness of .030 inches.<br><br><b>Part Number:</b> NUS 230, NUS 231<br><b>Description:</b> Anodized Aluminim Sheet &#8211; Gold, Anodized Aluminum Sheet &#8211; Black<br><b>Price:</b> 10.25<br>',"#ffffff");
messages[5] = new Array('http://www.abcimaging.com/images/massagepens.jpg','<h2>Anodized Massage Grip Pens</h2>The Anodized Massage Grip Pens are available in three vibrant colors of gold, green and blue. These smooth writing ballpoints have a modern appearance and a stylish massage grip which provides the cushion needed for a comfortable writing experience.<br><br><b>Part Number:</b> NCH 105, 106, 107<br><b>Description:</b> Anodized Massage Grip Pen<br><b>Price:</b> 5.95<br>',"#ffffff");
messages[6] = new Array('http://www.abcimaging.com/images/pens.jpg','<h2>Anodized Pens</h2>These new Anodized Pens are stylish and sophisticated, making them perfect for any occasion. They feature silver trim accents, smooth push mechanism and durable clip.<br><br>Your laser will engrave a bright white color with clarity and detail for small text or logos.<br><br>Available in three rich colors &#8211; red, blue, and black.<br><br><b>Part Number:</b> NTW 020. 021, 022<br><b>Description:</b> Anodized Pen<br><b>Price:</b> 4.95<br>',"#ffffff");
messages[7] = new Array('http://www.abcimaging.com/images/cardcasered.jpg','<h2>Business Card Cases</h2>The sleek, modern styling of this business card case provides the perfect background for your company logo or personalized message. The case easily opens for unrestricted access to the stored business cards and makes an ideal corporate gift or executive desk item. The card cases have a black base, while the cover is available in metallic red, metallic blue and matte black.<br><br><b>Part Number:</b> NTW 013<br><b>Description:</b> Anodized Business Card Case<br><b>Price:</b> 8.95<br>',"#ffffff");
messages[8] = new Array('http://www.abcimaging.com/images/carabineer.jpg', '<h2>Carabineer Key Ring</h2>Available in black, red, blue, and gold, each Carabineer Key Ring includes a split ring and is a durable and practical way to hold keys. Great for personalization, the carabineers laser engraves a white color for excellent contrast. Each carabineer can fit up to 29 characters of 12 point type.<br><b>NOTE: These carabineers are not for climbing use.</b><br><br><b>Part Number:</b> NTW 024<br><b>Description:</b> Anodized Carabineer Key Ring<br><b>Price:</b> 3.95<br>', "#ffffff");
messages[9] = new Array('http://www.abcimaging.com/images/cardbox.jpg','<h2>Card Boxes</h2>A great-looking gift box for business or playing cards. Engrave the top of the box or flip open the lid and engrave the inside too! Solid wood construction that will last for years.<br><br><b>Part Number:</b> WTW 001<br><b>Description:</b> Card Box &#8211; Rosewood<br><b>Price:</b> 14.50<br>',"#ffffff");
messages[10] = new Array('http://www.abcimaging.com/images/laserengraving_img4.jpg','<h2>Classic Rosewood Rollerball Pen</h2>These Classic Rosewood Rollerball Pens offer a sophisticated look for any business employee or student and are great for personalization. These pens are made from quality woods that laser dark. Each pen comes with a German ink cartridge and has a ceramic ball for smooth writing.<br><br><b>Part Number:</b> WHK 043<br><b>Description:</b> Classic Rosewood Rollerball Pen<br><b>Price:</b> 7.95<br>',"#ffffff");
messages[11] = new Array('http://www.abcimaging.com/images/foldingcardholder.jpg','<h2>Folding Card Holders</h2>Choose from the ever popular Rosewood Folding Card Holder and the Maple Arched Card Holder. These products look great when folded closed or open as a desk top display. Each Card Holder is sanded smooth and has a clear coat applied &#8211; arriving ready to engrave.<br><br><b>Part Number:</b> WHK 039<br><b>Description:</b> Rosewood Folding Card Holder<br><b>Price:</b> 11.95<br>',"#ffffff");
messages[12] = new Array('http://www.abcimaging.com/images/illustrationboard.jpg','<h2>Illustration Board</h2>Black &amp; White Illustration boards are available in various sizes up to 40 x 60 inches. These are very thin, flexible boards, .32 inches in thickness ideal for displaying illustrations and artwork.<br><br><b>Description:</b> Black and White Illustration Boards<br><b>Price:</b> 7.00 &#8211; 14.00<br>',"#ffffff");
messages[13] = new Array('http://www.abcimaging.com/images/keychains.jpg','<h2>Key Chains</h2>Available in both Maple and Rosewood are the popular Rectangle and Round Key Chains both with smooth, rounded edges and first quality hardware. All the Key Chains offered by LaserBits have a clear finish applied for easy cleanup after engraving.<br><br><b>Part Number:</b> WHK 034&#8211;037<br><b>Description:</b> Round or Rectangular, Rosewood or Maple Keychain<br><b>Price:</b> 2.95<br>',"#ffffff");
messages[14] = new Array('http://www.abcimaging.com/images/laserlaminate.jpg','<h2>Laser Wood Laminates</h2>These Laser Wood Laminates are available in a variety of finishes. The Cherry, Maple and Walnut Laser Woods have a Birch core with wood laminate on each side which is sanded smooth and finished with a clear coat. These wood sheets are 1/8 inches thick. Also available is a high quality engineered wood &#8211; available in four popular finishes.<br><br>The Econo Laser Wood is a wonderful economically minded product for laser engraving and is 1/8 inches thick; the Duro Laser Wood is .25 inches thick and of a more consistent density. The Duro White and Black Laser Wood Sheets, .25 inches in thickness, have a durable semi-gloss laminate on both sides &#8211; making them perfect for many laser engraving applications.<br><br>The Duro Birch Laser Wood Sheets also .25 inches thick, arrive with the Birch laminate on both sides and are free of any finish or coating.<br><br><b>Part Number:</b> WUS 105&#8211;WUS 114<br><b>Description:</b> (the type of wood) Laser Laminate<br><b>Price:</b> 6.74 &#8211; 17.94<br>',"#ffffff");
messages[15] = new Array('http://www.abcimaging.com/images/mapleDeskSet.jpg','<h2>Maple Desk Set</h2>The Maple Pen Holder, Card Holder and Clip Holder are made from solid Maple and have a smooth, clear finish. This Maple Desk Set is perfect for all types of engraving and gift occasions.<br><br>It can be used on any desk or flat surface. The Maple wood engraves a dark brown color, which provides excellent contrast for text or logos.<br><br><b>Part Number:</b> WHK 031. WHK 032, WHK 033<br><b>Description:</b> Maple Pen Holder, Maple Card Holder, Maple Paper Clip Holder<br><b>Price:</b> 11.95, 9.95, 9.95<br>',"#ffffff");
messages[16] = new Array('http://www.abcimaging.com/images/marbleacrylicsheet.jpg','<h2>Marbled Acrylic Sheets</h2>The Marble Acrylic Sheets are a cast acrylic and the colored marble pattern of the Acrylic Sheet is a fantastic background for the bright white color, revealed by laser engraving. The Marble Acrylic Sheets, 1/8 inch in thickness and available in 12x24 inch sheets, are ideal for ornament and signage applications.<br><br><b>Part Number:</b> AUS 107, AUS 108, AUS 109<br><b>Description:</b> Acrylic Sheet &#8211; Blue Marble, Green Marble, Red Marble<br><b>Price:</b> 24.00<br>',"#ffffff");
messages[17] = new Array('http://www.abcimaging.com/images/marblebusiness.jpg','<h2>Marble Business Card Holders</h2>Display business cards in style! These Marble Business Card Holders are an elegant addition to any desk-top. The jet black marble accents the cards and the large engraving area is perfect for logos and text.<br><br><b>Part Number:</b> MPA 006<br><b>Description:</b> Marble Business Card Holder<br><b>Price:</b> 35.95<br>',"#ffffff");
messages[18] = new Array('http://www.abcimaging.com/images/laserengraving_img5.jpg','<h2>Marble Desk Name Bar</h2>The triangle Marble Desk Name Bar features brightly polished black marble and looks spectacular when personalized with a company logo or a name.<br><br><b>Size:</b> 8 x 2 x 2 inches.<br><b>Part Number:</b> MPA 001<br><b>Description:</b> Marble Desk Name Bar<br><b>Price:</b> 38.95<br>',"#ffffff");
messages[19] = new Array('http://www.abcimaging.com/images/MarbleGiftBox.jpg','<h2>Marble Gift Box</h2>These Marble Gift Boxes are perfect for gift-giving! Laser engrave text and logos on the top or on the sides of the base to create a truely elegant gift item<br><br><b>Part Number:</b> MPA 011<br><b>Description:</b> Marble Round Gift Box<br><b>Price:</b> 32.99<br>',"#ffffff");
messages[20] = new Array('http://www.abcimaging.com/images/marblepenholder.jpg','<h2>Marble Pen/Pencil Holder</h2>Sturdy black Marble Pen/Pencil Holder makes a unique and usable gift. The jet black marble engraves a frosty white color for excellent contrast.<br><br><b>Part Number:</b> MPA 004<br><b>Description:</b> Marble Pen/Pencil Holder<br><b>Price:</b> 42.95<br>',"#ffffff");
messages[21] = new Array('http://www.abcimaging.com/images/MarblePinnacle.jpg','<h2>Marble Pinnacle Award</h2>The impressive Pinnacle Award is a statement in achievement. Polished black marble with tapered sides and beveled top engraves a frosty white color for an appealing contrast.<br><br><b>Part Number:</b> MPA 009<br><b>Description:</b> Marble Pinnacle Award<br><b>Price:</b> 38.95<br>',"#ffffff");
messages[22] = new Array('http://www.abcimaging.com/images/penbox.jpg','<h2>Pen Boxes</h2>LaserBits has added some new Pen Boxes to their product line. The Folding Pen Boxes, when unfolded, will reveal one pen. The Folding Pen Box, crafted from both Rosewood and Maple remains a favorite.<br><br><b>Part Number:</b> WTW 001<br><b>Description:</b> Single Folding Pen Box<br><b>Price:</b> 13.95<br>',"#ffffff");
messages[23] = new Array('http://www.abcimaging.com/images/storageboxes.jpg','<h2>Presentation &amp; Storage Boxes</h2>Present and store artwork and photos in anodized aluminum boxes. These lift-off lid boxes are fully archival and feature finger notches on the sides to facilitate removal of the lids.<br><br><b>Inside Dimensions:</b> 8.5 x 10.5 x 1 , 9 x 11.5 x 1, 13.5 x 19.5 x 1<br><b>Description:</b> presentation and storage anodized aluminum boxes<br><b>Price:</b> 55.00, 60.00, 85.00 plus laser engraving $1.00 per minute<br>',"#ffffff");

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];
  }
}

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>';

var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = (ns4)? document.tipDiv: 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) {
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

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 (ns4) {
		var tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + curBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td>'+ startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr + '</td></tr></table></td></tr></table>';
		tooltip.write(tip);
		tooltip.close();
	} else 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) {
	mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	if (tipOn) positionTip(evt);
}

function positionTip(evt) {
	if (!tipFollowMouse) {
		mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
	else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
	else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}
