﻿/***********************************************
* Bottom slide tooltip- by Ron Grafe (mailto:grafer@REMOVETHIScolumbus.rr.com)
* Website URL: http://www.gdevresources.com
* Script modified by and available at Dynamic Drive: http://www.dynamicdrive.com/
***********************************************/

//SET TOOLTIP DESCRIPTIONS BELOW


//Do not edit below here

var ie4=document.all
var ns6=document.getElementById&&!document.all
if(ie4||ns6)
{
    document.write('<div id="tagcontainer"></div>')
    document.write('<iframe id="Someiframe" src="javascript:false;" scrolling="no" frameborder="0" ></iframe>')
}
//*************************************************************************************
//Returns the dimensions of the top and left from the outter most part of the
//parent to the present obj
//*************************************************************************************
function getposOffset(what, offsettype){
    var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;     //If it does not equal left then it must be top
    var parentEl=what.offsetParent;
    while (parentEl!=null)
    {
        totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
        parentEl=parentEl.offsetParent;
    }
return totaloffset;
}
function ShowTab(txt,tabwidth,tabheight,obj,e) 
{ 
    IfrRef=document.getElementById? document.getElementById("Someiframe") : Someiframe
    divRef=document.getElementById? document.getElementById("tagcontainer") : tagcontainer
    if (tabwidth==undefined){tabwidth=100;}     /* TabWidth is not passed in */
    if (tabheight==undefined){tabheight=200;}   /* TabHeight is not passed in */
    
    //Tab Container must be at least the same size as the object text. 
    if (obj.offsetWidth>tabwidth){tabwidth=obj.offsetWidth} 
    IfrRef.style.left=IfrRef.style.top=-500
    IfrRef.style.width=tabwidth + "px"
    IfrRef.x=getposOffset(obj, "left")
    IfrRef.y=getposOffset(obj, "top")-2
    IfrRef.style.left=IfrRef.x +"px"                        
    IfrRef.style.top=IfrRef.y+ obj.offsetHeight +"px"  
    IfrRef.style.visibility="visible"
    IfrRef.style.width=tabwidth +"px"        //Width of the ToolTip
    IfrRef.style.height=tabheight + "px"      //Height of the ToolTip
    IfrRef.style.display = "block"; 
    var tabgap=obj.offsetWidth-2        /* Determines the gap of the tab */
        
    //'Display the text to add into the tooltip
    var mtable 
    mtable="<table id=\"fldtag\" height=\"" + tabheight + "\ width=\"" + tabwidth +"px\" cellpadding=\"0\" cellspacing=\"0\ valign=\"top\" >"
    
    mtable+="<tr>"
    //Top Left Cell
    mtable+="<td class=\"topleft\">"
    mtable+="<img alt=\"\" src=\"spacer.gif\" width=\"" + tabgap + "px\" height=\"1px\" />"
    mtable+="</td>"
    
    //Top Center Cell
    mtable+="<td class=\"topcenter \">"
    mtable+="<img alt=\"\" src=\"spacer.gif\" width=\"100%\" height=\"1px\" />"
    mtable+="</td>"
    
    //Top Right Cell
    mtable+="<td class=\"topright\">"
    mtable+="<img alt=\"\" src=\"spacer.gif\" width=\"1px\" height=\"1px\" />"
    mtable+="</td>"
    mtable+="</tr>"
    
    //Body of the tab
    mtable+="<tr>"
    mtable+="<td style=\"padding-left:3px; padding-right:3px\"colspan=\"3\" class=\"midleft\" valign=\"top\">"
    mtable+="<!-- This is where you place your text for the tab -->"
    mtable+= txt
    mtable+="</td>"
    mtable+="</tr>"
    
    //Bottom of the tab
    mtable+="<tr>"
    mtable+="<td colspan=\"3\" class=\"btm\">"
    mtable+="<img alt=\"\" src=\"spacer.gif\" width=\"1px\" height=\"1px\" /></td>"
    mtable+="</tr>"
    mtable+="</table>"
 
    divRef.innerHTML=mtable
    //Creates the IFrame for the IE 6 and lower compatability
    divRef.style.width = IfrRef.offsetWidth + "px"
    divRef.style.height = IfrRef.offsetHeight + "px"; 
    divRef.style.top = IfrRef.style.top; 
    divRef.style.left = IfrRef.offsetLeft+"px"
    divRef.style.zIndex = IfrRef.style.zIndex + 1; 
    divRef.style.display = "block"; 
    divRef.style.visibility="visible"
} 
function HideTab()
{
    var divRef = document.getElementById('tagcontainer'); 
    var IfrRef = document.getElementById('Someiframe'); 
    divRef.style.display = "none"; 
    IfrRef.style.display = "none"; 
} 
