var scale = 1;

function rescale(s, e) {
	if ( (s > 0 && scale < 1.7) || (s < 0 && scale > .6) ) {
		scale += parseFloat(s);
		scale = (Math.round(scale*10))/10;
		var els = e.getElementsByTagName('*');
		for (i=0; i<els.length; i++) {
			el = els[i];
			if (el.nodeName != '' && el.nodeName != 'IMG' && el.nodeName != 'BR') {
				if (!el.getAttribute('startpx') || typeof(el.getAttribute('startpx')) == 'undefined') {
					el.setAttribute('startpx', getStyle(el, 'font-size', 'fontSize'));
				}
				el.style.fontSize = (parseInt(el.getAttribute('startpx')) * scale) + (el.getAttribute('startpx').match(/\%/) ? '%' : 'px');
			}
		}
	} 
}

function getStyle(el,styleProp,stylePropIE) {
	if (el.currentStyle) {
		var y = el.currentStyle[stylePropIE];
	}
	else if (window.getComputedStyle) {
		var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
	}
	return y;
}

