home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2011 October / PCgo_1011_CD.iso / interface / js / interactive.js < prev    next >
Encoding:
Text File  |  2009-10-15  |  1.6 KB  |  53 lines

  1. document.observe('dom:loaded', function() {
  2.   if ( $('div_license').innerHTML == 'Vollversion' || $('div_license').innerHTML == 'Film' || $('div_license').innerHTML == 'eBook' ) {
  3.     if ( $('btn_relating') ) {
  4.       $('btn_relating').style.display = 'none';
  5.     }
  6.   } else {
  7.       if( $('developer') ) {
  8.         $('developer').style.display = 'none';
  9.       } else {
  10.         return
  11.       }
  12.     }
  13.     
  14.   if ($('div_license').innerHTML == 'eBook') {
  15.     if ( $$('.operationItemInstallBTN') ) {
  16.       $$('.operationItemInstallBTN').each ( function ( elmt ) {
  17.         elmt.removeClassName('operationItemInstallBTN');
  18.         elmt.addClassName( 'operationItemReadBTN' );
  19.         elmt.innerHTML = 'Lesen';
  20.       });
  21.     } 
  22.   }
  23.     
  24.   if ($('div_license').innerHTML == 'PDF') {
  25.     if ( $$('.operationItemInstallBTN') ) {
  26.       $$('.operationItemInstallBTN').each ( function ( elmt ) {
  27.         elmt.removeClassName('operationItemInstallBTN');
  28.         elmt.addClassName( 'operationItemReadBTN' );
  29.         elmt.innerHTML = 'Lesen';
  30.       });
  31.     } 
  32.   }
  33.   
  34.   if ($('div_license').innerHTML == 'Film') {
  35.     if ( $$('.operationItemInstallBTN') ) {
  36.       $$('.operationItemInstallBTN').each ( function ( elmt ) {
  37.         elmt.removeClassName('operationItemInstallBTN');
  38.         elmt.addClassName( 'operationItemPlayBTN' );
  39.         elmt.innerHTML = 'Starten';
  40.       });
  41.     } 
  42.   }
  43.   
  44.   $$('.shortText').each( function ( elmt ) {
  45.   
  46.     text = elmt.innerHTML;
  47.     if ( text.length > 34 ) {
  48.       elmt.innerHTML = text.substring(0,30)+'...';
  49.     }
  50.     
  51.    }
  52.   );
  53. });