function inspect( obj ) { var cnt = 1 ; var str = ""; for ( var i in obj ) { str += cnt + ". " + i + " " + eval( 'obj.' + i ) + "\n" ; if ( ( cnt % 10 ) == 0 ) { alert( str ) ; str = "" ; } cnt++ ; } alert( str ) ; alert( 'Total number of elements: ' + ( --cnt ) ) ; } /*--- | this function exists because the DOM occasionally appends "px" to the left | and top style members. When these exist, they cause the additions to fail, | so we remove them. Note the return statement: I deliberately divide the | string "str" by 1 to "unconvert" it from an object into something useful. *---*/ function truncatePX( val ) { var str = new String( val ) ; if ( ( pxpos = str.lastIndexOf( "px" ) ) >= 0 ) { str = val.substr( 0, pxpos ) ; } return( str / 1 ) ; } /*============================================================================== | This function 'grows' an image to allow its gradual appearance from hidden to | visible. A poor man's version of flash, I guess *=============================================================================*/ function grow( ) { var ctl = document.getElementById( 'mysonsam' ) ; if ( ctl ) { if ( cnt < 16 ) { window.setTimeout( "grow( )", 250 ) ; } else if ( cnt == 16 ) { var bio = document.getElementById( 'samsname' ) ; if ( bio ) { bio.className = 'samsname' ; } window.setTimeout( "grow( )", 250 ) ; } else if ( cnt == 17 ) { var bio = document.getElementById( 'samsdates' ) ; if ( bio ) { bio.className = 'samsdates' ; } window.setTimeout( "grow( )", 250 ) ; } else if ( cnt == 18 ) { var bio = document.getElementById( 'samsepitaph' ) ; if ( bio ) { bio.className = 'samsepitaph' ; } window.setTimeout( "grow( )", 250 ) ; } cnt++ ; ctl.style.height = truncatePX( ctl.style.height ) + 10 ; ctl.style.width = truncatePX( ctl.style.width ) + 6 ; } } /*--- | These functions exist to allow a 'hover' effect in IE. I don't know | why IE won't change colors by className though (sigh). *--*/ function hover( self ) { self.className = 'vmenu_btn_hover' ; self.style.background = 'tan' ; } function nohover( self ) { self.className = 'vmenu_btn' ; self.style.background = '#996633' ; } /*============================================================================== | Copyright (C) 2003, Kurt Arthur Syndicate, LLC All Rights Reserved. | Purpose: ECMA (JavaScript) file for an HTML grid control | | This program is free software; you can redistribute it and/or modify it under | the terms of the GNU General Public License as published by the Free Software | Foundation; either version 2 of the License, or (at your option) any later | version. | | This program is distributed in the hope that it will be useful, but WITHOUT | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | details. | | You should have received a copy of the GNU General Public License along with | this program; if not, write to the Free Software Foundation, Inc., 59 Temple | Place - Suite 330, Boston, MA 02111-1307, USA | | $Revision: 1.3 $ *============================================================================== | $Log: mysonsam.ecm,v $ | Revision 1.3 2004/09/17 21:31:56 umbdae | Forced baseline. | | Revision 1.2 2004/09/07 21:05:39 umbdae | Added "grow()" function to make the opening window grow. | | Revision 1.1 2004/09/07 19:59:02 umbdae | Initial revision | *=============================================================================*/