﻿// Ensure Root Namespaces are existing..
Type.registerNamespace('aspdnsf.Products');

aspdnsf.Products.ToolTipControl = function(id, clientId) {
    this.id = id;
    this.ctrl = $getElement(clientId);
    
    this.backColor = '';
    this.display = '';
    this.width = 300;
}
aspdnsf.Products.ToolTipControl.registerClass('aspdnsf.Products.ToolTipControl');
aspdnsf.Products.ToolTipControl.prototype = {

    setDisplay : function(display) {
        this.display = display;
    },
    
    setBackColor : function(backColor) {
        this.backColor = backColor;
    },
    
    setWidth : function(width) {
        this.width = width;
    },
    
    attach : function() {
        if(this.ctrl) {
            var display = HtmlDecode(this.display);
            var backColor = this.backColor;
            var width = this.width;
            
            if(ddrivetip) {
                this.ctrl.onmouseover = function(){ddrivetip(display, backColor, width)};
            }
            
            if(hideddrivetip) {
                this.ctrl.onmouseout = hideddrivetip;
            }
        }
    }
    
}

