        var toggle = 1;

        soundManager.onload = function() {
                // soundManager.createSound() etc. may now be called
                soundManager.createSound('24A', '/audio/24cntA.mp3');
                soundManager.createSound('24B', '/audio/24cntB.mp3');

		if( toggle = document.getElementById('soundToggle') ) { 
			toggle.innerHTML = 'Disable Sound';
		}
        }

        soundManager.defaultOptions.debugMode = false; // disable debug output

	var yyyy;
	var mm;
	var dd;
	var hh;
	var MM;
	var ss;

	var enableSound = 1; 

	function toggleSound() {
	
		if( enableSound == 1 ) { 
	
			enableSound = null;

			if( toggle = document.getElementById('soundToggle') ) { 
				toggle.innerHTML = 'Enable Sound';
			}
		}
		else { 
		
			enableSound = 1;

			if( toggle = document.getElementById('soundToggle') ) {
				toggle.innerHTML = 'Disable Sound';
			}
		}
		
	}

        function countdown( year, month, day, hour, minute, second ) {

		if( year != null ) yyyy = year;
		if( month != null ) mm = month;
		if( day != null ) dd = day;
		if( hour != null ) hh = hour;
		if( minute != null ) MM = minute;
		if( second != null ) ss = second;

		if( enableSound != null ) { 

	                if( toggle == 1 ) {
        	                soundManager.play('24A');
                	        toggle = 2;
	                }
        	        else {
                	        soundManager.play('24B');
                        	toggle = 1;
	                }
			
		}

                setTimeout("setTime( )", 250);
        }

        function setTime( ) {

                var now  = new Date( );
                var then = new Date( yyyy, mm, dd, hh, MM, ss );

                var diff = then.getTime( ) - now.getTime( );

                var t = new Array;

                t[0] = Math.floor(diff / (1000 * 60 * 60 * 24));
                diff -= t[0] * 24 * 60 * 60 * 1000;

                t[1] = Math.floor(diff / (1000 * 60 * 60));
                diff -= t[1] * 60 * 60 * 1000;

                t[2] = Math.floor(diff / (1000 * 60));
                diff -= t[2] * 60 * 1000;

                t[3] = Math.floor(diff / 1000);

                var timestring = '';

                for( x=0; x<=3; x++ ) {
                        if( x > 0 ) timestring = '' + timestring + ':';
                        if( t[x] <= 9 ) timestring = '' + timestring + '0';
                        timestring = '' + timestring + t[x];
                }


                if( divObj = document.getElementById('countdown') ) {
                        divObj.innerHTML = timestring;
                }


                setTimeout("countdown( )", 750);
        }


