var d = document;
var w = window;

var isIE = navigator.appName == "Microsoft Internet Explorer";
var isFF = d.getElementById && !d.all;

function nav(path) { if(path) window.location.href=path; }
function _hover(obj, col) { if(!obj) return; pb = obj.style.backgroundColor; obj.style.backgroundColor = (col ? col : '#ddeeff'); obj.onmouseout = function() { obj.style.backgroundColor = pb; }  }
function _confirm(msg) { return confirm( (msg ? msg : 'This cannot be undone! Proceed with this action?') ); }
function _get(id) { return document.getElementById(id); }

function _tags(nm) { return d.getElementsByTagName(nm); }

function _attachEvent(obj, eventName, func)
{
	return (isIE) ? obj.attachEvent('on'+eventName, func) : obj.addEventListener(eventName, func, false);
}

function _getnew(tag)
{
	el = d.createElement(tag);
	for(i=1; i<arguments.length; i++)
	{
		arg = arguments[i].split('=');
		el.setAttribute(arg[0], arg[1]);
	}
	return el;
}

function _parent(obj, level)
{
	if(level <= 0) return obj;
	return _parent(obj.parentNode, level-1);
}