image_header_replace = function() { 
	var h2s = document.getElementById('content').getElementsByTagName('h2');
	for (i in h2s) {
		txt = h2s[i].innerHTML;
		h2s[i].innerHTML = '<img src="/images/header_text.php?text='+escape(txt)+'" alt="'+txt+'" />';
	}
}
// thanks brothercake.com/site/resources/scripts/onload/ for the following

if(typeof window.addEventListener != 'undefined') {
	//.. gecko, safari, konqueror and standard
	window.addEventListener('load', image_header_replace, false);
} else if(typeof document.addEventListener != 'undefined') {
	//.. opera 7
	document.addEventListener('load', image_header_replace, false);
} else if(typeof window.attachEvent != 'undefined') {
	//.. win/ie
	window.attachEvent('onload', image_header_replace);
}

// image_header_replace = new domFunction(function() { 
// 	var h2s = document.getElementById('content').getElementsByTagName('h2');
// 	for (i in h2s) {
// 		txt = h2s[i].innerHTML;
// 		h2s[i].innerHTML = '<img src="/images/header_text.php?text='+escape(txt)+'" alt="'+txt+'" />';
// 	}
// }, { 'content' : 'id', 'h2' : 'tag' });
