function sendEvent(pid,typ,prm) { 
	thisMovie(pid).sendEvent(typ,prm); 
	}
function thisMovie(movieName) {
if(navigator.appName.indexOf("Microsoft") != -1) {
	return window[movieName];
	} else {
	return document[movieName];
	}
}

function getUpdate(typ, pr1, pr2, pid) {
var theseplayers = ['mpl1', 'mpl2', 'mpl3', 'mpl4', 'mpl5', 'mpl6', 'mpl7', 'mpl8', 'mpl9', 'mpl10'];
      if(pid != "undefined") {
        if(typ == "time") {
			currentPosition = pr1;
			if (currentPosition > "100"){
				sendEvent(pid,'stop');
			}
		}
        else if(typ == "state") { 
			currentState = pr1; 
			var activeplr = pid;
			if (currentState=="2"){
				for (var i=0; i<theseplayers.length;i++){
					if (activeplr!=theseplayers[i]){
					sendEvent(theseplayers[i],'stop');
					}
				}
			}
		}
      }
    }
