	var my_window_id = 0;

function printpage() {
	window.print();  
}
	
// SOUND functions ---------------------------------------------------------------
	var play_sound = 0;
	var sound_src_name = '';
	var using_embed_tag = 0;
				
function loadSound(filename) {
		sound_src_name = filename;
		
	if (!sound_src_name) { return 0; }	
								
	if (navigator.appName == "Microsoft Internet Explorer") {
		document.writeln ('<BGSOUND id="background_music" SRC="' + sound_src_name + '">');
		document.writeln ('<a href="javascript:void(0);" onclick="toggleSound(\'background_music\'); return false;" id="background_music_control" class="bmgcontrol">Stop Music</a>');
	} else {
		document.writeln ('<EMBED id="background_music" SRC="' + sound_src_name + '" AUTOSTART="TRUE" WIDTH="144" HEIGHT="18" LOOP="3" enablejavascript="true"><P>');
			using_embed_tag = 1;
	}
								
		play_sound = 1;
}

function toggleSound(id) {
		var sound_id = document.getElementById(id);
		var control_id = document.getElementById(id + '_control');

	// if control_id exists, then change the text of it
	// if not, then the sound is coming from an embed tag

	if (play_sound) {
		// Turn sound OFF
		if (!using_embed_tag) {
				sound_id.src = '';

			if (control_id) {
				control_id.innerHTML = 'Start Music';
			}
		} else {
			sound_id.Stop();	
		}		

			play_sound = 0;
	} else {
		// Turn sound ON
		if (!using_embed_tag) {
			sound_id.src = sound_src_name;
				if (control_id) {
					control_id.innerHTML = 'Stop Music';
				}
		} else {
			sound_id.Play();
		}
						
				play_sound = 1;
	}
}
