function rtLink(objectType, args) {

   this.initInheritedParams(args);
   this.initHelp(objectType);
   this.container = document.createElement("div");

   /* Initialize Parameters */
   this.params.label = 'label' in args? args.label: "";
   this.params.hoverColor = 'hoverColor' in args? args.hoverColor : "white";
   this.params.hoverBackColor = 'hoverBackColor' in args? args.hoverBackColor : this.styleParams.backgroundColor;
   this.params.hoverImage = 'hoverImage' in args? args.hoverImage : "";
   this.params.image = 'image' in args? args.image : "";
  
   this.initCustomParams = function() {
      this.container.innerHTML = "";
      if(this.params.image != "" && this.params.image != undefined) {
         this.image = document.createElement("img");
         this.image.src = this.params.image;
         this.image.parent = this;
         this.image.onmouseover = function() {
            if(this.parent.params.hoverImage != "" && this.parent.params.hoverImage != undefined) {
               this.src = this.parent.params.hoverImage;
            }
         }
         this.image.onmouseout = function() {
            if(this.parent.params.image != "" && this.parent.params.image != undefined) {
               this.src = this.parent.params.image;
            }
         }

         this.container.appendChild(this.image);
      }

      if(this.params.label != "" && this.params.label != undefined) {
         this.label = document.createElement("text");
         this.label.innerHTML = this.params.label;
          this.container.appendChild(this.label);
      }
      //this.label.innerHTML = 
      //this.container.appendChild(document.createElement("text") this.params.label;
   }

   /* End Parameter Description */

   this.container.me = this;

   this.initCustomParams();

   this.helpicon = document.createElement("div");
   this.helpicon.style.position = "absolute";
   this.helpicon.style.float = "right";
   this.helpimage = document.createElement("img");
   this.helpimage.src = "resources/images/helpicon.png";
   this.helpimage.style.height = "15px";
   this.helpimage.style.width = "15px";
   this.helpicon.appendChild(this.helpimage);
   this.container.appendChild(this.helpicon);
   this.helpicon.style.display = "none";

   this.container.onmouseover = function() { this.style.color = this.me.params.hoverColor; 
                                             this.style.backgroundColor = this.me.params.hoverBackColor;
                                             //this.me.helpicon.style.top = (this.offsetTop + parseInt(this.style.height) - 15)  + "px";
                                             //this.me.helpicon.style.left = this.offsetLeft + 138 + "px";
                                             //this.me.helpicon.style.left = (this.offsetLeft + parseInt(this.style.width) - 15) + "px";
                                             //this.me.helpicon.style.display = "inline";
                                             if(document.body.style.cursor != "wait") {
                                                document.body.style.cursor = "pointer";
                                             }
                                           };
                                               
                                                                       

   this.container.onmouseout = function() {  this.style.color = this.me.styleParams.color; 
                                             this.style.backgroundColor = this.me.styleParams.backgroundColor;
                                             //this.me.helpicon.style.display = "none";
                                             if(document.body.style.cursor != "wait") { 
                                                document.body.style.cursor = "";
                                             }
                                             //this.me.onmouseout();
                                         };
   this.container.onclick = function() {  var test = this.me.getPos(this);
                                          //alert("x = " + test.x + ", y = " +test.y);
                                          this.me.baseParams.callback();
   }

 
   //this.container.style.marginLeft = "auto";
   //this.container.style.marginRight = "auto";
   this.setGuts(this.container);
}
rtLink.prototype = new control;

