// Disable the ability to right-click
// 20071105 JDA: Moved to the Page Footer of AC
/*function disableRightClick(){
	var message="That feature has been disabled!";

	function clickIE4(){
		if (event.button==2){
			alert(message);
			return false;
		}
	}

	function clickNS4(e){
		if (document.layers||document.getElementById&&!document.all){
			if (e.which==2||e.which==3){
				alert(message);
				return false;
			}
		}
	}

	if (document.layers){
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS4;
	}
	else if (document.all&&!document.getElementById){
		document.onmousedown=clickIE4;
	}

	document.oncontextmenu=new Function("alert(message);return false")
}*/

// Remove the statusbar message
function maskStatus(msg){
	window.status = msg;
	//alert('Function was called:' + msg);
	return true;
}

function displayFlashInfo(msg) {
	try
	{
		// We need to add the Flash object to the page if the customer is using IE.
		// If not, an embeded tag has already been added to the page to cover Firefox.
//		if(navigator.appName.indexOf("Microsoft") != -1)
//		{
//			/*var oForm = document.getElementsByTagName('form')[0];
//			var oEmbeded = document.getElementById('musicPlayer');
//			oForm.removeChild(oEmbeded);*/
//		
//			var oBodyTag = document.getElementsByTagName('Body')[0];
//			
//			// Remove the old tag if there, or we'll end up with multiple players on the page.
//			if(document.getElementById('flashcontentIE'))
//			{
//				// Lets kill any audio before we dispose of the old HTML Element.
//				if(document.getElementById('musicPlayer'))
//					document.getElementById('musicPlayer').dispose();
//					
//				oBodyTag.removeChild(document.getElementById('flashcontentIE'));
//			}
//				
//			var oDiv = document.createElement('div');
//			oDiv.setAttribute('id', "flashcontentIE");
//			oDiv.innerHTML = "This text is replaced by the Flash movie.";
//			oBodyTag.appendChild(oDiv);

//			var so = new SWFObject("/flash/musicplayer.swf", "musicPlayer", "1", "1", "9", "#FFFFFF");
//			so.write("flashcontentIE");
//			
//			setTimeout("loadSoundSample('" + msg + "')", 500);
//		}
//		else
//		{
			// Lets kill any audio before we dispose of the old HTML Element.
			//if(document.getElementById('musicPlayer'))
			//	document.getElementById('musicPlayer').stopMusic();
			
			loadSoundSample(msg);
//		}
	}
	catch(err)
	{
		// Do Nothing
		alert(err);
	}
}

function loadSoundSample(msg){
	try{
		// Do to the way we are adding the Flash object this is all that is needed now.
		if(document.getElementById("musicPlayer"))
			document.getElementById("musicPlayer").playMusic(msg);
	}
	catch(err){
		alert(err);
	}
}
