/*
	browser library
	Copyright (C) 2001 Jay R. Smith Mfg Co.
	Distributed under the GNU Lesser General Public License.
	2001-02-14 Joe Walp <walpj@usa.net>
*/

//* adapted from DynAPI2 (2000-10-23)
Browser = function () {
var b=navigator.appName
var r=navigator.appVersion
var v=parseFloat(r)
var u=navigator.userAgent.toLowerCase()
var p="other"
var e=r.indexOf("MSIE")
if(b=="Netscape")b="ns"
if(b=="Microsoft Internet Explorer")b="ie"
if(e>0)v=parseFloat(r.substr(e+5))
if(u.indexOf("win")>0)p="win32"
if(u.indexOf("mac")>0)p="mac"
this.b=b
this.v=v
this.p=p
this.ns=(b=="ns"&&v>=4)
this.ie=(b=="ie"&&v>=4)
this.min=(this.ns||this.ie)
this.dom=(this.min&&v>=5)
}
//* create the "is" object
is=new Browser()

function getElement(id, paths, window_) {
var d=window_?window_.document:document
var e
if(is.dom)e=d.getElementById(id)
else if(is.ns)e=(paths[id]=="")?(d.layers[id]):(eval("d."+paths[id]+".document."+id))
else if(is.ie)e=d.all(id)
return e
}

