var Toolbar=Class.create();
Object.extend(Toolbar,{
	initialize: function() {
    	this.originalFontSize = $j('.reziseable:first').css('font-size');
	},
	popup:function(url) {
		popWindow=window.open(url,"_blank","toolbar=0,status=0,resizable=1,scrollbars=1,width=900,height=600"); 
		if(popWindow){ popWindow.focus(); }
	}, 
	resize:function(action) {
		if (action == 'Enlarge') {
			var currentFontSize = $j('.reziseable:first').css('font-size');
    		var currentFontSizeNum = parseFloat(currentFontSize, 10);
			var newFontSize = currentFontSizeNum * 1.2;
			var newFontSizeRounded = Math.round(newFontSize);
			if ( newFontSizeRounded < 22 ) {
				$j('.reziseable').css('font-size', newFontSize);
				$j('.reziseable').css('line-height', '1.6em');
			}
			return false;
		} else if (action == 'Reset') {
			$j('.reziseable').css('font-size', this.originalFontSize);
			$j('.reziseable').css('line-height', '1.6em');
			return false;
		} else if (action == 'Decrease') {
			var currentFontSize = $j('.reziseable:first').css('font-size');
			var currentFontSizeNum = parseFloat(currentFontSize, 10);
			var newFontSize = currentFontSizeNum*0.8;
			var newFontSizeRounded = Math.round(newFontSize);
			if ( newFontSizeRounded >= 10 ) {
				$j('.reziseable').css('font-size', newFontSize);
				$j('.reziseable').css('line-height', '1.6em');
			}
			return false;
		}
	},
	print:function() {
		window.print();
	}
});

$j(document).ready(function() { Toolbar.initialize();  });