function audioon()
{
	var thissound=document.getElementById('audioplayer');
	thissound.Play();
}

function audiooff()
{
	var thissound = document.getElementById('audioplayer');
	thissound.Stop();
}

function playIntro()
{ 
	audioon();
}

function init()
{
	if (!window.location.search)
	{
		setTimeout("playIntro()", 3000);
	}
}

function getPlayer(gid) 
{
	if(navigator.appName.indexOf("Microsoft") != -1) 
	{
		return window[gid];
	} 
	else 
	{
		return document[gid];
	}
}

var myFileName = "";
function playFile(fileName)
{
	myFileName = fileName;
	if (!document.getElementById('mp3player').style.display.match(/block/))
	{
		document.getElementById('videoplayer').style.display = "none";
		document.getElementById('mp3player').style.display = "block";
	}
	setTimeout("loadPlayer()", 200);	
}
function loadPlayer()
{
	var player = getPlayer('ply');
	var obj = {file:myFileName,image:"images/cover.gif"};

	player.sendEvent('STOP',null);
	player.sendEvent('LOAD', obj);
	player.sendEvent('PLAY',true);
}

function playVideo(theVideo)
{ 
	if (!document.getElementById('videoplayer').style.display.match(/block/))
	{
		document.getElementById('mp3player').style.display = "none";
		document.getElementById('videoplayer').style.display = "block";
	}
	var video = '';
	switch (theVideo)
	{
		case 1: video = '<object width="319" height="258"><param name="movie" value="http://www.youtube.com/v/5_Sf5s2G5Yk&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/5_Sf5s2G5Yk&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="319" height="258"></embed></object>';
			break;
		case 2: video = '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/gcfZ97HwPNM&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/gcfZ97HwPNM&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="319" height="258"></embed></object>';
			break;
	}
	//theVideo = theVideo.replace("\'", '"');
	document.getElementById('videoplayer').innerHTML = video;
}


