//Tooltipp Support
// req: Mouse Support




function TooltipSupport(tooltippid,effect){
	
        var tt_id = tooltippid;
	var tooltip = null;
        var showEffect = effect;
	
	function setInitialPosition(){
		if (tooltip != null) {
			tooltip.style.left = (mouseSupport.getX() + 20) + "px";
			tooltip.style.top 	= (mouseSupport.getY() + 20) + "px";
		}
	}
	
	this.updateMousePosition = function(x,y){
		if (tooltip != null) {
			tooltip.style.left = (x + 20) + "px";
			tooltip.style.top 	= (y + 20) + "px";
		}
	}
	
	this.showTooltip = function() {
                tooltip = document.getElementById(tt_id);
				
		if(tooltip!=null){
			setInitialPosition();
                        if(showEffect==null){
						//alert(tooltip.innerHTML);
                            tooltip.style.display = "block";
                        }else{
                            if(showEffect=='Appear'){
                                new Effect.Appear(tooltip.id);
                            }else{
                                tooltip.style.display = "block";
                            }
                        }
		}
			
	}
	
	this.hideTooltip = function() {
		if(tooltip!=null){
			tooltip.style.display = "none";
                        
		}
	}
}



