
/*
micro-API for writing cross-browser DHTML.
  use this function to gain access
  to the HTML element you want to influence.

It will pass you the HTML element you asked for,
  regardless of browser DOM.
_________________________________________  

==>  element must have a proper ID  <==
_________________________________________

  and, if your script must work in Netscape 4,
  should have a position defined in the style sheet.
 (+if Netscape 4 NESTED layers wanted, get more script, this is not enough then)

 	 
  usage:
  var x = new getObj('layername');
  
  what happens?
  function creates a new JavaScript object x.
    It goes through all possible DOMs
    and if it finds the one that the browser supports
    it sets this.obj and this.style.
       The *this* keyword makes sure that the two properties
       obj and style are added to the new object x.  
  
    object x:
    merely a container for its two properties:
		1. .obj, giving access to the actual HTML element.
		         use this property to read out or set anything else than styles.
		         [ alert(x.obj.id) näyttäisi id:n ]
		2. .style, giving access to the styles of the HTML element.
		         use this property to read out or set the styles of the element.
		         [ x.style.top = '20px'; changes the top coordinate ]

micro-API generously provided by
http://www.quirksmode.org/js/dhtmloptions.html, jh salutes!
*/


function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

