function launchDrive(driveLetter){
    System.Shell.execute(driveLetter + ":")
}

function playStateChange(newstate)
{
	switch (newstate){ 
	case 1: // Stopped
		playbackStatus.innerText = "Stopped";
		controlImage.src = "images/play.png";
		break;

	case 2: // Paused
		playbackStatus.innerText = "Paused";
		controlImage.src = "images/play.png";
		break;
	
	case 3: // Playing
		playbackStatus.innerText = "Playing";
		controlImage.src = "images/stop.png";
		break;

	case 6: // Buffering
		playbackStatus.innerText = "Buffering";
		break;

	case 7: // Waiting
		playbackStatus.innerText = "Waiting";
		break;

	case 8: // Media Ended
		playbackStatus.innerText = "Media Ended";
		controlImage.src = "images/play.png";
		break;

	case 9: // Transitioning
		playbackStatus.innerText = "Transition";
		break;

	case 10: // Ready
		playbackStatus.innerText = "Radio";
		controlImage.src = "images/play.png";
		break;
	}
}

function controlImageClick()
{		                
	if(controlImage.src.match("images/stop.png")){
		mediaPlayer.controls.stop();
	}else{
		mediaPlayer.controls.play();
	}
}

function ShowBin()
{
	System.Shell.execute('::{645FF040-5081-101B-9F08-00AA002F954E}');
}

function taskmgr()
{
	System.Shell.execute("taskmgr.exe")
}

function powercfg()
{
	System.Shell.execute("powercfg.cpl")
}

function performanceLauch()
{
	System.Shell.execute("perfmon.msc")
}

function ncpa()
{
    System.Shell.execute("ncpa.cpl")
}