<!-- Audio Play -->

    function playaudio(audioURL)									// audio-function for init and realize audio-play by clicking on audio-list-link
    {
		if (navigator.appName == "Netscape")						// browser-check: NS
		{
           	start_audio = 1;										// set var start_audio (audio-file is already played)
			ChangeButtonStatesToPlayA();							// audio-button control commands by hagen
			UpdateButtons();
			g_audioURL = audioURL;
			setFileName_audio(g_audioURL);							// call setfilename-function with var g_audioURL
		}
		else														// browser-check: no NS
		{
			v_audio = MediaPlayer1.Volume;							// set v_audio with current MediaPlayer volume
			change_volume_audio_img(v_audio);						// call change_volume_audio_img function
			document.all.info_display.innerHTML = g_infoTEXT;		// set text for infodisplay
			start_audio = 1;										// set var start_audio (audio-file is already played)
			ChangeButtonStatesToPlayA();							// audio-button control commands by hagen
			UpdateButtons();
			g_audioURL = audioURL;
			MediaPlayer1.FileName=(g_audioURL);						// set audio-url for MediaPlayer
			message('play_audio');									// call function message with "play_audio"
			play_state_audio = '2';									// play_state_audio = PLAY
		}
    }
 
    function audiostatusplay()										// audio function for init and realize audio-play by clicking on transportcontroll(tc)-button
    {
		if (navigator.appName == "Netscape")						// browser-check: NS
		{
			if (start_audio == 0)									// no audiofile is select
			{
				alert('no audio select');							// message
			}
			else													// audiofile is select
			{
				controlPlayerNS1(2);								// call function for NS audio transportcontroll to PLAY MediaPlayer
				ChangeButtonStatesToPlayA();						// audio-button control commands by hagen
				UpdateButtons();
			}	
		}
		else														// browser-check: no NS
		{
			if (start_audio == 0)									// no audiofile is select
			{
				message('no_audio');								// call function message
				document.all.audiotime_display.innerHTML = '00:00 / 00:00 min';		// set start value fpr timedisplay
				play_state_audio = '0';								// play_state_audio = STOP
			}
			else													// audiofile ist select
			{
				v_audio = MediaPlayer1.Volume;						// set v_audio with current MediaPlayer volume
				change_volume_audio_img(v_audio);					// call change_volume_audio_img function
				current_position = MediaPlayer1.CurrentPosition;	// set current_position of audiofile
				ChangeButtonStatesToPlayA();						// audio-button control commands by hagen
				UpdateButtons();
				MediaPlayer1.PLAY();								// set MediaPlay to PLAY
				message('play_audio');								// call function message
				play_state_audio = '2';								// play_state_audio = PLAY
			}
		}
    }

<!-- Audio Pause -->

    function audiostatuspause()										// audio function for init and realize audio pause by clicking on transportcontroll(tc)-button
    {
		if (navigator.appName == "Netscape")
		{
			if (start_audio == 0)
			{
				alert('no audio select');
			}
			else
			{
				controlPlayerNS1(1);								// call function for NS audio transportcontroll to PAUSE MediaPlayer
				ChangeButtonStatesToPauseA();
				UpdateButtons();
			}
		}
		else
		{
			  if (MediaPlayer1.PlayState)
			  {
				if (start_audio == 0)
				{
					message('no_audio');
					document.all.audiotime_display.innerHTML = '00:00 / 00:00 min';
				}
				else
				{
					window.clearInterval(aktiv_audio); 				// clear interval for calling audio_timedisplay
					message('pause_audio');
					ChangeButtonStatesToPauseA();
					UpdateButtons();
					MediaPlayer1.Pause();
					play_state_audio = '1';							// play_state_audio = PAUSE
				}
			  }
		}
    }

<!-- Audio Stop -->

    function audiostatusstop()										// audio function for init and realize audio stop by clicking on transportcontroll(tc)-button
    {
		if (navigator.appName == "Netscape")
		{
			if (start_audio == 0)
			{
				alert('no audio select');
			}
			else
			{
				controlPlayerNS1(0);								// call function for NS audio transportcontroll to STOP MediaPlayer
				ChangeButtonStatesToStopA();
				UpdateButtons();
			}
		}
		else
		{
			if (start_audio == 0)
			{
				message('no_audio');
				document.all.audiotime_display.innerHTML = '00:00 / 00:00 min';
			}
			else
			{
				window.clearInterval(aktiv_audio); 				// clear interval for calling audio_timedisplay
				ChangeButtonStatesToStopA();
				UpdateButtons();
				MediaPlayer1.Stop();
			    MediaPlayer1.CurrentPosition = (0);				// set CurrentPosition of audiofile to StartPosition
				message('stop_audio');
				play_state_audio = '0';							// play_state_audio = STOP
			}
		}
    }

<!-- Change Audio Button -->									// change audio button commands by hagen

	function ChangeButtonStatesToPlayA()
	{
	 status_aplay |= BUTTON_STATUS_ON;
	 status_aplay &=~ BUTTON_STATUS_OFF;
	 status_apause |= BUTTON_STATUS_OFF;
	 status_apause &=~ BUTTON_STATUS_ON;
	 status_astop |= BUTTON_STATUS_OFF;
	 status_astop &=~ BUTTON_STATUS_ON;
	}
	function ChangeButtonStatesToPauseA()
	{
	 status_aplay |= BUTTON_STATUS_OFF;
	 status_aplay &=~ BUTTON_STATUS_ON;
	 status_apause |= BUTTON_STATUS_ON;
	 status_apause &=~ BUTTON_STATUS_OFF;
	 status_astop |= BUTTON_STATUS_OFF;
	 status_astop &=~ BUTTON_STATUS_ON;
	}
	function ChangeButtonStatesToStopA()
	{
	 status_aplay |= BUTTON_STATUS_OFF;
	 status_aplay &=~ BUTTON_STATUS_ON;
	 status_apause |= BUTTON_STATUS_OFF;
	 status_apause &=~ BUTTON_STATUS_ON;
	 status_astop |= BUTTON_STATUS_ON;
	 status_astop &=~ BUTTON_STATUS_OFF;
	}

<!-- ****************************************************************************** -->

	function MouseOutPlayA()
	{
		 status_aplay&=~BUTTON_STATUS_OVER; 
		UpdateButtons();
		status=' '; return true;
	}
	
	function MouseOverPlayA()
	{
		status_aplay|=BUTTON_STATUS_OVER;
		UpdateButtons();
		status='PLAY'; return true;
	}
	function MouseOutStopA()
	{
		 status_astop&=~BUTTON_STATUS_OVER; 
		UpdateButtons();
		status=' '; return true;
	}
	
	function MouseOverStopA()
	{
		status_astop|=BUTTON_STATUS_OVER;
		UpdateButtons();
		status='STOP'; return true;
	}
	function MouseOutPauseA()
	{
		 status_apause&=~BUTTON_STATUS_OVER; 
		UpdateButtons();
		status=' '; return true;
	}
	
	function MouseOverPauseA()
	{
		status_apause|=BUTTON_STATUS_OVER;
		UpdateButtons();
		status='PAUSE'; return true;
	}
	