function burst(url, target, width, height) {
	if (arguments.length > 4) {
		var options = arguments[4];
	} else {
		var options = 'menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=yes';
	}

	if (width > window.screen.width - 50) width = window.screen.width - 50;
	if (height > window.screen.height - 100) height = window.screen.height - 100;

	var x = (window.screen.width - width) / 2;
	var y = (window.screen.height - height) / 3;

	var foo = window.open(url, target, 'width='+width+',height='+height+',left='+x+',top='+y+','+options);
	foo.focus();

	return false;
}

function replace_html(elementid, content) {
	if (document.all) {
		document.all[elementid].innerHTML = content;
	} else if (document.getElementById) {
		rng = document.createRange();
		el = document.getElementById(elementid);
		rng.setStartBefore(el);
		htmlFrag = rng.createContextualFragment(content);
		while (el.hasChildNodes()) el.removeChild(el.lastChild);
		el.appendChild(htmlFrag);
	}
	return false;
}

function load_image(src) {
	if (typeof __licache == "undefined")
		__licache = new Array();

	i = __licache.length;
	__licache[i] = new Image();
	__licache[i].src = src;
}

// provided by: http://simonwillison.net/2004/May/26/addLoadEvent/
function onload_loader(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}