// JavaScript compositor // --------------------- // Compositing 2 files // ----------------------------------------------------------- // File 1 // music.js var musicOnloadComplete = false; function music( isOn ) { // Show or hide the player as appropriate if ( isOn ) { // If page only just loaded and music is already switched on, don't do anything if ( !musicOnloadComplete ) { musicOnloadComplete = true; document.getElementById( 'musicCtrl1' ).style.fontWeight = 'bold'; return; } // Create music player HTML html = ''; } else html = ''; document.getElementById( 'music' ).innerHTML = html; // Embolden the appropriate ON/OFF control activeControl = isOn; inactiveControl = Math.abs( isOn - 1 ); document.getElementById( 'musicCtrl' + activeControl ).style.fontWeight = 'bold'; document.getElementById( 'musicCtrl' + inactiveControl ).style.fontWeight = 'normal'; // If user clicked a selection, send request to server to update status if ( musicOnloadComplete ) { hIframe = document.getElementById( 'musicPref' ); iframeLocation = '/audio/setPref.php?mode=' + isOn; if ( hIframe.contentDocument ) hIframe.contentDocument.location.href = iframeLocation; else document.frames[ 'musicPref' ].document.location.href = iframeLocation; } musicOnloadComplete = true; } // ----------------------------------------------------------- // File 2 // fader.js.php var hInterval; var colourID; var msgID; var hFader; var message = new Array( '
in the Gallery section - this is the 1st of many videos which we will be uploading soon...
', 'Click here to view it now!
', '