function ImgProperties(str_NameImage) {
  this.obj = document.images[str_NameImage];
  
  //Posicion en pantalla
  if (document.all) {
    yPos = this.obj.offsetTop;
    tempImagen = this.obj.offsetParent;
    while (tempImagen != null) {
      yPos += tempImagen.offsetTop;
      tempImagen = tempImagen.offsetParent;
      }
      
    xPos = this.obj.offsetLeft;
    tempImagen = this.obj.offsetParent;
    while (tempImagen != null) {
      xPos += tempImagen.offsetLeft;
      tempImagen = tempImagen.offsetParent;
      }
    
    this.x = xPos;
    this.y = yPos;
  }else{
    this.x = this.obj.x;
    this.y = this.obj.y;
    }
  
  this.id = str_NameImage;
  this.name = str_NameImage;
  this.w = this.obj.width;
  this.h = this.obj.height;
  this.src = this.obj.src;
  
  this.Info = function() {
    str_Info = "";
    str_Info += "Id: " + this.id;
    str_Info += "\nName: " + this.name;
    str_Info += "\nPosition: " + this.x + "x" + this.y;
    str_Info += "\nSize: " + this.w + "x" + this.h;
    str_Info += "\nSource: " + this.src;
    alert(str_Info);
    }
  
  this.SetSrc = function(src) {
    var obj_imgt = new Image();
    obj_imgt.src = src;
    
    this.obj.src = this.src = src;
    this.SetSize(obj_imgt.width, obj_imgt.height);
    }
  
  this.SetSize = function(wf, hf) {
    this.obj.width = this.w = wf;
    this.obj.height = this.h = hf;
    }
  
  this.obj.ondblclick = this.Info;
  }

function ObjProperties(obj) {
  this.obj = obj;
  
  //Posicion en pantalla
  if (document.all) {
    yPos = this.obj.offsetTop;
    xPos = this.obj.offsetLeft;
    tempImagen = this.obj.offsetParent;
    while (tempImagen != null) {
      yPos += tempImagen.offsetTop;
      xPos += tempImagen.offsetLeft;
      tempImagen = tempImagen.offsetParent;
      }
    
    this.x = xPos;
    this.y = yPos;
    this.w = this.obj.offsetWidth;
    this.h = this.obj.offsetHeight;
  }else{
    this.x = this.obj.x;
    this.y = this.obj.y;
    }
  
  this.id = this.obj.id;
  this.name = this.obj.name;
  this.Info = function() {
    str_Info = "";
    str_Info += "Id: " + this.id;
    str_Info += "\nName: " + this.name;
    str_Info += "\nPosition: " + this.x + "x" + this.y;
    alert(str_Info);
    }
  }
  
function DivProperties(str_layername) {
  if (document.layers) {
    this.obj = document.layers[str_layername];
    this.css = this.obj;
    var wTam = parseInt(this.css.clip.width);
    var hTam = parseInt(this.css.clip.height);
    
    str_Visible = "show";
    str_Hidden = "hide";
  }else if (document.all) {
    this.obj = document.all[str_layername];
    this.css = this.obj.style;
    var wTam = parseInt(this.obj.offsetWidth);
    var hTam = parseInt(this.obj.offsetHeight);
    
    str_Visible = "visible";
    str_Hidden = "hidden";
  }else if (document.getElementById) {
    this.obj = document.getElementById(str_layername);
    this.css = this.obj.style;
    
    var wTam = parseInt(this.obj.offsetWidth);
    var hTam = parseInt(this.obj.offsetHeight);
    
    str_Visible = "visible";
    str_Hidden = "hidden";
    }
  
  this.id = str_layername;
  this.x = parseInt(this.css.left);
  this.y = parseInt(this.css.top);
  this.w = wTam;
  this.h = hTam;
  this.v = this.css.visibility;
  
  this.InfoAlert = function() {
    str_Info = "Name: " + this.id;
    str_Info += "\nPosition: " + this.x + "x" + this.y;
    str_Info += "\nSize: " + this.w + "x" + this.h;
    str_Info += "\nVisibility: " + this.v;
    alert(str_Info);
    }
  
  this.SetVisibility = function(status) {
    if (status == "off" || status == false) this.css.visibility = this.v = str_Hidden;
    else this.css.visibility = this.v = str_Visible;
    }
  
  this.SetPosition = function(xf,yf) {
    this.css.left = this.x = xf;
    this.css.top = this.y = yf;
    }
  
  this.SetSize = function(wf,hf) {
    if (document.layers) {
      this.obj.clip.width = this.w = wf;
      this.css.clip.height = this.h = hf;
    }else{
      this.css.width = this.w = wf;
      this.css.height = this.h = hf;
      }
    }
  
  this.SetScroll = function(wf,hf) {
    this.css.overflow = "auto";
    this.SetSize(wf, hf);
    }
  }

function ScreenProperties() {
  if (document.all || document.getElementById) {
    this.height = self.screen.height;
    this.width = self.screen.width;
    
    this.availHeight = self.screen.availHeight;
    this.availWidth = self.screen.availWidth;
    
    this.colorDepth = self.screen.colorDepth;
  }else{
    return false;
    }
  } 