var tags = new Array('a', 'p', 'div', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'); var class_to_exclude = new Array('font-size-exclude'); function getStyle(elem, IEStyleProp, CSSStyleProp) { if (elem.currentStyle) { return elem.currentStyle[IEStyleProp]; } else if (window.getComputedStyle) { var compStyle = window.getComputedStyle(elem, ''); return compStyle.getPropertyValue(CSSStyleProp); } return ''; } function change_size(size, root) { for(var i=0; i < tags.length; i++) { if(root && root.getElementsByTagName){ var items = root.getElementsByTagName(tags[i]); for(var j=0; j = 0) ){ var current = getStyle(items[j], 'fontSize', 'font-size'); if (current) { current = Math.round(parseInt(current.replace('px','')) * size); items[j].style.fontSize = current + 'px'; } } } } } } function page_size() { var rootArray = font_resizing_content_array; for(i =0; i < font_resizing_content_array.length; i++){ change_size(1.15, document.getElementById(rootArray[i])); document.getElementById('content').style.display = 'block'; } } function element_size(element_id) { var root = document.getElementById(element_id); change_size(1.15, root);} function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(page_size);