Event.observe(window, 'load', function(){
	if($('tab1')) {
		// check product descriptions for "&lt;BR&gt;" and replace with "<br />"
		$('tab1').next().innerHTML = $('tab1').next().innerHTML.replace(/&lt;BR&gt;/g, "<br />");
	}

	if($('tabset_productPage')) {
		// add listener to automatically adjust the tabset height for each tab onclick
		$('tabset_productPage').select('dt').each(function(v){
			 v.observe('click', function(e){
				  e.target.up().setStyle({height: e.target.next().scrollHeight + 60 + 'px'})
			 });
		});
	}

	// initialize the height of the tabset according to the content within the first tab
	if ($('tab1')) {
		$('tabset_productPage').setStyle({height: $('tab1').next().scrollHeight + 60 + 'px'});
	} else if ($('tab2')) {
		$('tabset_productPage').setStyle({height: $('tab2').next().scrollHeight + 60 + 'px'});
	} else if ($('tab3')) {
		$('tabset_productPage').setStyle({height: $('tab3').next().scrollHeight + 60 + 'px'});
	} 
});
