	// Global JavaScript Document

	document.write('<scr' + 'ipt src="library/js/sniffer.js" type="text/javascript"><\/scr' + 'ipt>');
	document.write('<scr' + 'ipt src="library/js/util.js" type="text/javascript"><\/scr' + 'ipt>');
	
	onload = function()
	{
		//
		local_init();
		//
		setElement();

	}
	
	function setElement()
	{
		c_el("a","back-home","mid-nav");
		g_el("back-home").href = "/h2o/";
	}
	
	function c_el(type,id,p)
	{
		el = document.createElement(type);
		el.id = id;
		if(p) document.getElementById(p).appendChild(el)
		else document.body.appendChild(el)
	}
	function g_el(id){return document.getElementById(id)}


	function getPageOffsetLeft(el)
	{
		var x;
		// Return the x coordinate of an element relative to the page.
		x = el.offsetLeft;
		if(el.offsetParent != null) x += getPageOffsetLeft(el.offsetParent)
		return x;
	}
	
	function getPageOffsetTop(el)
	{
		var y;
		// Return the x coordinate of an element relative to the page.
		y = el.offsetTop;
		if(el.offsetParent != null) y += getPageOffsetTop(el.offsetParent);
		return y;
	}
	
	function GetOffset(obj,coord)
	{	
		var val = obj["offset"+coord] ;
		if(coord == "Top") val += obj.offsetHeight;
		while((obj = obj.offsetParent) != null)
		{
			val += obj["offset"+coord];
			if(obj.border && obj.border != 0) val++;
		}
		return val;
	}
	
	function getSelectTag()
	{
		return document.getElementsByTagName("select").length;
	}
	
	function highlightLine(t)
	{
		for(i=0;i<document.getElementById(t).getElementsByTagName("tr").length;i++)
		{
			if(document.getElementById(t).getElementsByTagName("tr")[i].className != "head" && document.getElementById(t).getElementsByTagName("tr")[i].className != "no-result")
			{
				document.getElementById(t).getElementsByTagName("tr")[i].onmouseover = function()
				{
					this.style.color = "#fff";
					this.style.backgroundColor = "#2f560e";
					
					for(j=0;j<this.getElementsByTagName("a").length;j++)
					{
						this.getElementsByTagName("a")[j].style.color = "#fff";
					}
				}
				document.getElementById(t).getElementsByTagName("tr")[i].onmouseout = function()
				{
					this.style.color = (this.className == "l1")?"#fff":"#006600";
					this.style.backgroundColor = (this.className == "l1")?"transparent":"#fff";
					if(this.className != "l1")
					{
						for(j=0;j<this.getElementsByTagName("a").length;j++)
						{
							this.getElementsByTagName("a")[j].style.color = "#006600";
						}
					}

				}
				
			}
			
			
		}
		
	}
	

