var CurrentClass = '', img, el; //document.oncontextmenu = function() {return false;}; //document.onselectstart = function() {return false;}; document.ondragstart = function() {return false;}; function isObject( a ) { return (a && typeof a == 'object'); } function getElements( what ) { var el = what.childNodes, l = el.length; for( var x = 0; x < l; x++ ) if( el[x].tagName.toUpperCase( ) == 'IMG' ) { window['img'] = el[x]; window['el'] = document.getElementById( window['img'].name.replace( '_img', '' ) ); break; } } function setState( what ) { getElements( what ) if( window['img'].src.indexOf( '_d.' ) == -1 ) { window['img'].src = window['img'].src.replace( '.gif', '_d.gif' ); if( isObject( window['el'] ) ) window['el'].value = 0; what.className = 'buttonCellDisabled'; window['CurrentClass'] = 'buttonCellDisabled'; } else { window['img'].src = window['img'].src.replace( '_d.gif', '.gif' ); if( isObject( window['el'] ) ) window['el'].value = 1; what.className = 'buttonCellEnabled'; window['CurrentClass'] = 'buttonCellEnabled'; } } function getState( what ) { getElements( what ); if( window['img'].src.indexOf( '_d.' ) == -1 ) // Image is NIET disabled: return true; else return false; } function buttonState( what, state ) { if( what.onclick!=null ) switch( state ) { case 'out': what.style.cssText = 'border: 2px groove;'; what.className = window['CurrentClass']; break; case 'over': window['CurrentClass'] = what.className; what.className = 'buttonCellOver'; break; case 'up': what.style.cssText = 'border: 2px groove;'; break; case 'down': what.style.cssText = 'border: 2px inset;'; what.className = 'buttonCellMouseDown'; break; } } function onpressenter( what, e ) { var keycode; if( window.event ) keycode = window.event.keyCode; else if( e ) keycode = e.which; if( keycode == 13 ) return true; return false; } function checked( ) { return true; } function check( ) { return true; }