function i2m_Utiles() {
  
  this.objSelectToList = function(select) {
    var selected = "";
    var html = "";
    
    var i = 0;
    var j = select.options.length;
    while(i < j) {
      html += '<li><span class="ComboBoxId">' + i + "</span><span>" + select.options[i].innerHTML + "</span></li>";
      
      ++i;
    }
    
    if(j > 0) {
      html = '<div id="ComboBox_' + select.id + '" class="i2m_ComboBox">' +
        "<h2>" + select.options[select.selectedIndex].innerHTML + "</h2>" +
        "<ul>" + html + "</ul>" +
        "</div>";
    }
    
    
    return html;
  };
  
  this.getLeft = function(elem) {
      xPos = elem.offsetLeft;
      
      tempEl = elem.offsetParent;
      while(tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
      }
    
      
      return xPos;
  };

  this.getTop = function(elem) {
    yPos = elem.offsetTop;
    
    tempEl = elem.offsetParent;
    while(tempEl != null) {
      yPos += tempEl.offsetTop;
      tempEl = tempEl.offsetParent;
    }
    
    
    return yPos;
  };
  
  this.loadJS = function(file, exec) {
    var loaded = 0;
    
    if((exec != undefined) && (exec != "")) {
      try {
        if(exec != false) {
          eval(exec)();
        }
        
        loaded = 1;
      } catch(e) {
        
      }
    }
    
    if(loaded == 0) {
      $$("head")[0].appendChild(new Element("script", {
        type: "text/javascript",
        src: file
      }));
    }
  };
  
  this.loadCSS = function(file, id) {
    var loaded = 0;
    if((id != undefined) && (id != "") && ($(id) != undefined) && ($(id) != null)) {
      loaded = 1;
    }
    
    if(loaded == 0) {
      var elem = new Element("link", {
        href: file,
        rel: "stylesheet",
        type: "text/css"
      });
      
      if((id != undefined) && (id != "")) {
        elem.id = id;
      }
    
      $$("head")[0].appendChild(elem);
    }
  };
}

var i2m_util = new i2m_Utiles();