/******************************************************************* * * Squint - javascript text resizer library * * Useage: include this file in the header, then use * renderSquintControls to render buttons, or tie a button to * squint(1) to increase size and squint(-1) to decrease size. * Bind initSquint to document.onload in order to allow cookies * to remember which size is chosen * * Iain Wallace, bit10 ltd 2004/11/11 * *******************************************************************/ var strCookieName = "squintStartSize"; var arrTags = new Array( 'div','td','tr','button','a','span'); var arrSizes = new Array( '12px','13px','14px','15px','16px','17px','18px','19px' ); var strTrace = ""; var intDefaultSize = 2; var intStartSize = intDefaultSize; var strDomain = ""; // Tie to the document onload event - sets the start size if it's in a cookie function initSquint(){ strTrace += "Init\n"; strDomain = document.domain; strTrace += "set domain to " + strDomain + "\n"; i = getCookieVal( strCookieName ); if( i ){ strTrace += "Cookie found with value " + i + "\n"; intStartSize = i; squint(0); } } // Draw the controls onto the page //function renderSquintControls(){ // document.write( "
| + | Larger | " ); // document.write( "" ); // document.write( " | - | Smaller |