/************************************************************************************************************
	(C) www.dhtmlgoodies.com, September 2005	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland	
	************************************************************************************************************/
       
	function showToolTip(e,text,count){
		if(document.all)e = event;
		
		var obj = document.getElementById('bubble_tooltip');
		var obj2 = document.getElementById('bubble_tooltip_content');

                obj2.innerHTML = text;          		
                
		obj.style.display = 'block';
		var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
		if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
		var leftPos = e.clientX - 180;
		if(leftPos<0)leftPos = 0;
		obj.style.left = leftPos + 'px';
		obj.style.top = e.clientY  - 46 + 'px';
	}	
	function hideToolTip(count)	{
		document.getElementById('bubble_tooltip').style.display = 'none';
        }
        
    function showToolTip2(e,text,count){
        if(document.all)e = event;
        var obj = document.getElementById('bubble_tooltip2');
        var obj2 = document.getElementById('bubble_tooltip_content2');
        obj2.innerHTML = text; 
        
//        if(featureArray[count] == null || featureArray[count] == "Loading...") {
//            loadFeatures(text);
//        } else {
//            obj2.innerHTML = featureArray[count];
//        }
        
        obj.style.display = 'block';
        var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
        if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
        var leftPos = e.clientX - 328;
        
        
//        var leftPos = e.clientX - obj2.offsetWidth;
       
        if(leftPos<0)leftPos = 0;
        obj.style.left = leftPos + 'px';
        obj.style.top = e.clientY  - 38 + 'px';
        
//        if( e.clientY - obj.offsetHeight -1 + st <= 0) {
//            obj.style.top = 1;
//        } else {
//            obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';
//        }
        
    }
    
    function hideToolTip2(count)	{
	document.getElementById('bubble_tooltip2').style.display = 'none';
            //featureArray[count] = document.getElementById("bubble_tooltip_content2").innerHTML;
    }