
var descriptions = new Array();

descriptions["dect"] = "DECT (Digital Enhanced Cordless Telecommunications) is a digital wireless telephone technology created strictly for telecommunication use, allowing clear sound, no interference and longer range. They are ideal for home and office system use and have 30% more battery life expectancy over 5.8GHz and 2.4GHz phones. The new DECT phone has the unique quality, stylish design and the practical features you are looking for.";
descriptions["fv2"] = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz";
descriptions["fv12"] = "<img src='http://www.101Shavers.com/images/CatalogItemVariation/1218/panasonic-kxtg6022b-150_20-3-2007_10-6-14.jpg'>";


/*****************************************************
*************TOUCH NOTHING BELOW THIS*****************
*****************************************************/

var table;


table = "\n<table cellspacing=\"0\">";
table = table +	"\n<tr>";
table = table +	"\n<td class=\"top_left\"></td>";
table = table +	"\n<td class=\"top\"></td>";
table = table +	"\n<td class=\"top_right\"></td>";
table = table +	"\n</tr>";
table = table +	"\n<tr>";
table = table +	"\n<td class=\"left\"></td>";
table = table +	"\n<td class=\"pkg_pop_content\">";
table = table +	"\n<div id=\"toolTipContent\">";
table = table +	"\n</div>";
table = table +	"\n</td>";
table = table +	"\n<td class=\"right\"></td>";
table = table +	"\n</tr>";
table = table +	"\n<tr>";
table = table +	"\n<td class=\"bottom_left\"></td>";
table = table +	"\n<td class=\"bottom\"></td>";
table = table +	"\n<td class=\"bottom_right\"></td>";
table = table +	"\n</tr>";
table = table +	"\n</table>";


function getDivContents(fID)
{
	contentDiv = document.getElementById('toolTipContent');
	contentDiv.innerHTML = descriptions[fID];

}

function showTip(id,fID,e)
{

	var divToShow = document.getElementById(id);
	divToShow.innerHTML = table;
	getDivContents(fID);
	positionTip2(id,e);
	divToShow.style.display = 'block';
	divToShow.style.visibility = 'visible';
}


function hideTip(id)
{
	var divToHide = document.getElementById(id);
	divToHide.style.display = 'none';
	divToHide.style.visibility = 'hidden';
}


var TIPoffsetfromcursorX=10;
var TIPoffsetfromcursorY=50;

var TIPoffsetdivfrompointerX=10;
var TIPoffsetdivfrompointerY=101;
/*
var ie=document.all;
var ns6=document.getElementById && !document.all;

var curX;
var curY;

var winheight;
var winwidth;

var leftedge;
var rightedge;

var bottomedge;
var topedge;


function ietruebody()
{
	
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
*/
function positionTip2(div_id,e)
{
    
	curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
	curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop-180;

	winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight;
	winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth+20;

	leftedge=ie&&!window.opera? event.clientX-TIPoffsetfromcursorX : e.clientX-TIPoffsetfromcursorX;
	rightedge=ie&&!window.opera? winwidth-event.clientX-TIPoffsetfromcursorX : winwidth-e.clientX-TIPoffsetfromcursorX;
	
	bottomedge=ie&&!window.opera? winheight-event.clientY-TIPoffsetfromcursorY : winheight-e.clientY-TIPoffsetfromcursorY;
	topedge=ie&&!window.opera? event.clientY+TIPoffsetfromcursorY : e.clientY+TIPoffsetfromcursorY;
	
    /*myX1.innerHTML = curX + " (" + leftedge + ")" ;
    myY1.innerHTML = curY + " (" + topedge + ")" ;
    myX.innerHTML = winwidth + " (" + winheight  + ")";
    myY.innerHTML = rightedge + " (" + bottomedge + ")"; */
                
	displaytip2(div_id);
}


function displaytip2(div_id)
{

	var tipobj = document.getElementById(div_id);
	
	showfirsttime=false;
		var nondefaultpos=false
		var nondefaultYpos=false
		
		var tiptop=0
		
		var testpos=false;
		
		var tippos=(curY+TIPoffsetfromcursorY-(tipobj.offsetHeight/3))
		
		if ((tippos>=curY-topedge-1) && (tippos+tipobj.offsetHeight-10<=curY+bottomedge))
		{testpos=true;}
		else
		{
			tippos=(curY+TIPoffsetfromcursorY-(tipobj.offsetHeight/2))
			if ((tippos>=curY-topedge-1) && (tippos+tipobj.offsetHeight-10<=curY+bottomedge))
			{testpos=true;}
			else
			{
				tippos=(curY+TIPoffsetfromcursorY-(tipobj.offsetHeight*2/4))
				if ((tippos>=curY-topedge-1) && (tippos+tipobj.offsetHeight-10<=curY+bottomedge))
				{testpos=true;}
			}
		
		}
		
		if (testpos)
		{
			tipobj.style.top=tippos+"px"
			tiptop=tippos
		}
		else
		{
			if (topedge<tipobj.offsetHeight-25)
			{
				tipobj.style.top=curY-topedge+"px"
				tiptop=curY-topedge
			}
			else
			{
				if (bottomedge<tipobj.offsetHeight-10)
				{
					tipobj.style.top=curY+bottomedge-tipobj.offsetHeight+"px"
					tiptop=curY+bottomedge-tipobj.offsetHeight
					nondefaultYpos=true
				}
				else
				{
					tippos=(curY+TIPoffsetfromcursorY-(tipobj.offsetHeight/3))
					tipobj.style.top=tippos+"px"
					tiptop=tippos
					nondefaultYpos=true
				}
			}
		}
		if ((rightedge<tipobj.offsetWidth+TIPoffsetdivfrompointerX-25) && (leftedge>=tipobj.offsetWidth+TIPoffsetdivfrompointerX+TIPoffsetfromcursorX-5))
		{
			tipobj.style.left=curX-TIPoffsetfromcursorX-TIPoffsetdivfrompointerX-tipobj.offsetWidth+10+8+"px"
			nondefaultpos=true
		}
		else
		{
			tipobj.style.left=curX+TIPoffsetfromcursorX+TIPoffsetdivfrompointerX-10+"px"
		}
}