function resizeDiv(d,h) {
	$("#"+d).css("height", h+"px");
	return false;
}

function flashReplace() {
	// Create a CSS expression for all elements you want to replace
	selector="#page_body_content h2, .rail_content h2";
	
	// Go through the selector match
	$(selector).each(function(k, v) {
		$_this=$(this);
				
		// Skip "no_flash" entries
		if (!$_this.is(".no_flash")) {
		
			// If the element doesn't have an id, make up a unique one for it.
			if ($_this.attr('id')=="") {
				now=new Date();
				content=$_this.text();
				content=content.replace(/\W/g, "");
				content="generated_id_"+content+Math.round(Math.random()*1000000)+"_"+now.getTime();
				$_this.attr('id', content);
			}
			
			fontSize=parseInt($_this.css('font-size'));
			
			text=$_this.text();
			text=text.replace(/\s+/g, ' ');
			text=text.replace(/^\s/g, '');
			text=text.replace(/\"/g, '\'\'');
			
			// Perform the swfobject based replacement		
			swfobject.embedSWF('/apps/lifetech/docroot/images/textReplace.swf', $_this.attr("id"), '100%', '23', '9.0.124', '', {t:text, l:$("a:first", this).attr("href"), lt:$("a:first", this).attr("target"), d:$_this.attr("id"), s:fontSize}, {menu:'false', quality:'best', scale:'noscale', wmode:'transparent'});
		}
	});	
}
