Object.extend(Prototype.Browser, {
	IE6 : false /*@cc_on || @_jscript_version < 5.7 @*/,
	IE7 : false /*@cc_on || @_jscript_version == 5.7 @*/
});

var MDBP = {
	Version: '1.2',
	
	clearForms: function()
	{
		$$('input[type=text]').each(function(f)
		{
			$(f)
				.observe('focus', function() { if ( $F(f) === $(f).defaultValue ) { $(f).value = ''; } })
				.observe('blur', function() { if ( $F(f).blank() ) { $(f).value = $(f).defaultValue; } });
		});
	},
	
	matchColumns: function()
	{
		var height = 0;
		$$('div.column')
			.each(function(column) { height = ( $(column).getHeight() > height ) ? $(column).getHeight() : height; })
			.invoke('setStyle', { minHeight : height + 'px' });
			
		if ( Prototype.Browser.IE6 ) { $$('div.column').invoke('setStyle', { height : height + 'px' }); }
	}
};

document.observe('contentloaded', function()
{
	MDBP.clearForms();
	if ( $('cancelform') )
	{
		$('cancelform').observe('click', function(e)
		{
			e.stop();
			$(this).up('form').reset();
		});
	}
});