function WindowsMediaManager(player){

if(player){
player.controls;//loads player completly to dom only for ns
player.playState;
player.URL;
player.playState;
player.currentMedia;
player.settings;
}

// Player object
this.player = player;

this.checkActiveX = function(){

 var browser = navigator.appName;
  //try to install 
  if ( player.controls == undefined && browser != 'Microsoft Internet Explorer' ){
    xpi={'Mozilla Firefox 1.5 ActiveX Plug-in':'misc/mozactivex-ff-15.xpi'}; 
    InstallTrigger.install(xpi);
  }

}

this.getPosition = function(){
    if(player != undefined && player.controls != undefined){
	return (player.controls.currentPosition*1000);
	}
	else{
	  return 0;
	}
}

this.setPosition = function(pos){
    //pos is in miliseconds
    if(player != undefined && player.controls != undefined){
	player.controls.currentPosition = pos/1000;
	}
}

this.setURL = function(url){   
	player.URL = url;

}

this.getURL = function(){   
	return player.URL;

}

// Player actions
this.play = function() 
{
	player.controls.play();
}

this.pause = function() 
{
	player.controls.pause();
}

this.stop = function() 
{
	player.controls.stop();
}

this.step = function(frameCount){
		  player.controls.step(frameCount);
}


this.go = function(pos){

    this.setPosition(pos);
	player.controls.play();
}

this.getPlayState = function(){
return player.playState;
}

this.rewind = function() 
{
player.controls.fastReverse();
}

this.fastforward  = function() 
{
  player.controls.fastForward();
}

this.setVolume  = function(volume) 
{	
	if(volume>-1 && volume <100){
				 player.settings.volume = volume;
	}
}

this.isEmbeded = function(){


   if(player != undefined && player.settings != undefined){
     return player.settings.invokeURLs;
   }
   return true; // the events are embed on default
}



this.fullScreen = function()
{
	        if (player.playState == 3)
        {
                player.fullScreen = true;
        }

}


this.getClipLength = function() {
	return player.currentMedia.duration;
}


}