//list of clases to be changed
var min = 12;
var max = 36;
var scale = 1;
/*var win = this.contentWindow;
var body = (Browser.Engine.trident) ? $(win.document.body) : $(win.document.html);*/

function sizeDown() 
{				
	if(scale > 1) scale= scale-0.05;
	reScale(scale);
	return;
	elSel = $$('#leftcont p, #leftcont span');
	elSel.each(function(el){
	/*$$('*').each(function(el) 
	{
		//check the code comments in the jQuery version of this function
		//except different function names this here works the same as above*/
		var fs = 0;
		if (fs = el.getStyle('font-size').toInt()) 
		{
			if(fs > min){
				el.setStyle('font-size', (fs - 1) + 'px');
			if (fs = el.getStyle('line-height').toInt())
				el.setStyle('line-height', (fs - 1) + 'px');
			}
		}
	});
}

function sizeUp() 
{				
	if(scale < 2) scale= scale+0.05;
	reScale(scale);
	
	return;
	elSel = $$('#leftcont p, #leftcont span');
	elSel.each(function(el){
	//$$('*').each(function(el) 
	//{
		//check the code comments in the jQuery version of this function
		//except different function names this here works the same as above
		var fs = 0;
		if (fs = el.getStyle('font-size').toInt()) 
		{
			if(fs < max){
				el.setStyle('font-size', (fs + 1) + 'px');
				if (fs = el.getStyle('line-height').toInt())
					el.setStyle('line-height', (fs + 1) + 'px');
			}
		
		}
		
	});
}

function reScale(scale){
	var body = $(document.body);
	var bodyWidth = document.body.offsetWidth;
	var ofsetx = (bodyWidth * scale - bodyWidth  ) / 2;
	if (Browser.Engine.trident){
		scale = parseInt(scale*100);
		
		body.setStyles({
			zoom: scale+"%"
			});
			
			$$('html').setStyle('overflow-x','scroll');

	}
		else{
			var origin = "0 0";
			body.setStyles({
		//'transform-origin': origin,
		'transform': 'scale(' + scale + ',' + scale +')',
		'-moz-transform-origin': origin,
		'-moz-transform': 'scale(' + scale + ',' + scale +')',
		'-webkit-transform-origin': origin,
		'-webkit-transform': 'scale(' + scale + ',' + scale +')'
		//'padding-right': self.options.width,
		//'padding-bottom': self.options.height
		});
		
	}
	
	new Fx.Scroll(body).set(ofsetx ,0);
	//$('wrapper').position({x:'center',y:'top'});
	//$('footerbg').position({x:'center',y:'bottom'});
}


