Hi,

I have a client (nursing home) who would like to use a javascript they saw on another website that allows the guest to increase or decrease the font size. I have incorporated it into my website page, but if you increase it too much, then the navigation bar goes out of wack. Is there anyway to limit the number of times a person increases the font size so this won't happen? Or is there away to set it up so it just affects the text in the body of the page.

Hope this makes sense...


link to page:
http://www.sitesbysarah.com/oaknoll/aboutus.htm


Textsizer.JS code:

HTML Code:
// JavaScript Document


//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr');

//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
if (!document.getElementById) return
var d = document,cEl = null,sz = startSz,i,j,cTags;

sz += inc;
if ( sz < 0 ) sz = 0;
if ( sz > 6 ) sz = 6;
startSz = sz;

if (!( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

cEl.style.fontSize = szs[ sz ];

for ( i = 0 ; i < tgs.length ; i++ ) {
cTags = cEl.getElementsByTagName( tgs[ i ] );
for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
}
} 
Thanks,
Sarb