
function _$(objId) { return document.getElementById(objId); }
function f$(str) { return document.forms[str.split(':')[0]].elements[str.split(':')[1]]; }

function _bind(obj, method) {
  return function() {
    return method.apply(obj, arguments);
  };
}

function popitup(url, name, width, height)
{
	newwindow = window.open(url, name, 'width=' + width + ', height=' + height + ', scrollbars=1');
	if (window.focus) newwindow.focus();
	return false;
}

// opens a new tab
function openLink(url, win_name)
{
	var new_win = window.open(url, win_name);
	new_win.focus();
}

// returns the version of an IE browser or 0
function msie()
{
	var rv = 0;
	if(navigator.appName == 'Microsoft Internet Explorer')
	{
		var ua = navigator.userAgent;
		var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		if(re.exec(ua) != null) rv = parseFloat(RegExp.$1);
	}
	
	return rv;
}

function _rand() { return Math.floor(Math.random() * 4294967295); }

