function getById(attr_id) {
 return(document.all[attr_id])
}

function getByTagName(tag) {
 tag = tag.toUpperCase();
 if(!this["lista"+tag]) {
  this["lista"+tag] = new Array();
  for(jtag=0,itag=0; jtag<this.all.length; jtag++) {
   if(this.all[jtag].tagName == tag)
    this["lista"+tag][itag++] = this.all[jtag];
  }
 }
 return(this["lista"+tag]);
}

function itm(x){
 return(this[x]);
}


function remAttr(attr){
 this.setAttribute(attr,"");
}

function init() {

 if(document.all && !document.getElementById)
  document.getElementById = getById;

 if(document.all && !document.getElementsByTagName)
  Array.prototype.item = itm;

 if(document.all && !document.getElementsByTagName)
  document.getElementsByTagName = getByTagName;

 for(ind=0; ind<document.all.length; ind++)
  if(!document.all[ind].getElementsByTagName)
   document.all[ind].getElementsByTagName = getByTagName;

 if(document.all && !document.all[0].removeAttribute) {
  for(ind=0; ind<document.all.length; ind++)
   document.all[ind].removeAttribute = remAttr;
 }
}

if(document.all && !document.getElementsByTagName)
 window.onload = init;
