﻿
function NewState(){
var x=document.getElementById(div).playState;
alert(x);
var WMState = new Array();         
WMState[0]  = "Undefined";          
WMState[1]  = "Stopped";          
WMState[2]  = "Paused";          
WMState[3]  = "Playing";          
WMState[4]  = "Scan Forward";          
WMState[5]  = "Scan Reverse";          
WMState[6]   = "Buffering";          
WMState[7]  = "Waiting";          
WMState[8]  = "Media Ended";          
WMState[9]  = "Transitioning";          
WMState[10] = "Ready";          
WMState[11] = "Reconnecting";

alert(WMState[x]);

}


function MediaStart(div){
document.getElementById(div).controls.play();
}

function MediaLoad(div,fn){
document.getElementById(div).URL=fn;
}

function MediaPause(div){
document.getElementById(div).controls.Pause();
}

function MediaStop(div){
document.getElementById(div).controls.stop();
}

function MediaMute(div){
var m=document.getElementById(div).settings.mute;
    if (m==0){
    document.getElementById(div).settings.mute = "1";
    }
    else{
    document.getElementById(div).settings.mute = "0";
    }
}
