
    
    var mousex = 0;
    var mousey = 0;

		var IE = document.all?true:false;
		if (!IE) 
		{
			document.captureEvents(Event.MOUSEMOVE)
		}
		document.onmousemove = getMouseXYTemp;
		function getMouseXYTemp(e) {
			if (IE) { // grab the x-y pos.s if browser is IE
				mousex = event.clientX + document.body.scrollLeft;
				mousey = event.clientY + document.body.scrollTop;
			}
			else {  // grab the x-y pos.s if browser is NS
				mousex = e.pageX;
				mousey = e.pageY;
			}  
			if (mousex < 0){mousex = 0;}
			if (mousey < 0){mousey = 0;}  
			
			return true;
		}

    function getMouseXY(e) // works on IE6,FF,Moz,Opera7
    {
      if (!e) e = window.event; // works on IE, but not NS (we rely on NS passing us the event)

      if (e)
      {
        if (e.pageX || e.pageY)
        { // this doesn't work on IE6!! (works on FF,Moz,Opera7)
          mousex = e.pageX;
          mousey = e.pageY;
          }
        else if (e.clientX || e.clientY)
        { // works on IE6,FF,Moz,Opera7
          mousex = e.clientX + document.body.scrollLeft;
          mousey = e.clientY + document.body.scrollTop;
	
        }  
      }
    }

    function displayTooltip(elem, index)
    {
	
       if(index <= toolTipArray.length)
        {
            var toolTip = document.getElementById('toolTip');
            toolTip.style.display = 'inline-block';
            var toolTipContent = document.getElementById('toolTip_content');
           // getMouseXY(elem.event);
            toolTipContent.innerHTML = toolTipArray[index];
            
            if(mousex>0)
            {
                toolTip.style.left = mousex + 'px';;
                toolTip.style.top = mousey + 1 + 'px';;
                
            }
            else 
            {
                toolTip.style.left = elem.offsetLeft + 120 + 'px';;
                toolTip.style.top = elem.offsetTop + 155 + 'px';;
            }            
        }

    }
    function hideTooltip()
    {
        var toolTip = document.getElementById('toolTip');
        var toolTipContent = document.getElementById('toolTip_content');
        
        toolTip.style.display = 'none';
    }
    
   
    var agent= navigator.userAgent.toLowerCase();
    var ver = parseInt(navigator.appVersion);
     
    var ie = agent.indexOf("msie")>=0;
    var ie6=ie && agent.indexOf("msie 6")>=0;
    var ie7=ie && agent.indexOf("msie 7")>=0;
     
    var ff=!ie && agent.indexOf("mozilla")>=0;



    
    var tbl1 = document.getElementById('tblLeft');
    var tbl2 = document.getElementById('tblRight');
    
    if (tbl1.scrollHeight < tbl2.scrollHeight) 
    {
        tbl1.style.height = tbl2.scrollHeight + 'px';
        tbl2.style.height = tbl1.scrollHeight + 'px';
    }
    if (tbl1.scrollHeight > tbl2.scrollHeight) 
    {
        tbl2.style.height = tbl1.scrollHeight + 'px';
        tbl1.style.height = tbl2.scrollHeight + 'px';
    }
    if(ie)
    {
	//tbl2.style.height = ( 33 )+ 'px';
    }
    
    if(tbl1.rows.length >= 1){

        if(ie)
        {
            //tbl1.rows[0].style.height = '32px';
            //tbl2.rows[0].style.height = '0px';
        }    
      
        
        for (var i = 0; i < tbl1.rows.length; i++) 
        {
            //tbl1.rows[i].style.height = tbl1.rows[i].scrollHeight + 'px';
            //tbl2.rows[i].style.height = tbl2.rows[i].scrollHeight + 'px';
            //alert(i + ' ' + tbl1.rows[i].scrollHeight + ' ' + tbl2.rows[i].scrollHeight)
            if (tbl1.rows[i].scrollHeight != tbl2.rows[i].scrollHeight) 
            {
                if (tbl1.rows[i].scrollHeight >= tbl2.rows[i].scrollHeight)
                {
                    tbl2.rows[i].style.height = tbl1.rows[i].scrollHeight + 'px';
                    tbl1.rows[i].style.height = tbl1.rows[i].scrollHeight + 'px';
                }  
                if (tbl2.rows[i].scrollHeight > tbl1.rows[i].scrollHeight)
                {
                    tbl1.rows[i].style.height = tbl2.rows[i].scrollHeight + 'px';
                    tbl2.rows[i].style.height = tbl2.rows[i].scrollHeight + 'px';
                }
                //alert(tbl1.rows[i].style.height + ' - ' + tbl2.rows[i].style.height )
            }
            else
            {
                if(ie)
                {
                    tbl2.rows[i].style.height = tbl1.rows[i].scrollHeight + 'px';
                }
                else
                {
                    //tbl1.rows[i].style.height = tbl1.rows[i].scrollHeight + 'px';
                    tbl2.rows[i].style.height = tbl1.rows[i].style.height + 'px';
                }
            }
            if(IE && i == tbl2.rows.length - 1)
            {	
		        tbl2.rows[i].style.height = tbl2.rows[i].scrollHeight + 16;
            } 
        }
    }

