if(typeof oActive_insert == 'undefined') oActive_insert 	= new Object();
oActive_insert 	= function (src,type,width,height,params)
{
	this.oSrc 		= src;
	this.oType		= type;
	this.oWidth		= width;
	this.oHeight		= height;
	this.oParams		= params;
	
	if(this.oParams == '') this.oParams = ' wmode="transparent" ';
	
	this.init		= function()
	{
		this.oHTML 		= ''; // reset the html
		if(this.oParams == '' || typeof(this.oParams) == 'undefined') 	this.oParams = 'autoplay=\"0\" autostart=\"0\"';
		if(this.oType == 'swf') this.getswf();
		if(this.oType == 'mov') this.getmov();
		if(this.oType == 'avi') this.getmov();
		if(this.oType == 'mpeg' || this.oType == 'mpg') this.getmpeg();
		if(this.oType == 'wmv') this.getwmv();		
		document.write(this.oHTML);
	}
		
	this.getswf = function()
	{
        this.oHTML 		= '<embed src="'+this.oSrc+'" '+ this.oParams +' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+this.oWidth+'" height="'+this.oHeight+'" />';
	}
	
	this.getmov = function()
	{
        this.oHTML 		= '  <embed src="'+this.oSrc+'" '+ this.oParams +' pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" width="'+this.oWidth+'" height="'+this.oHeight+'" />';
	}
	
	this.getmpeg = function()
	{
        this.oHTML 		= '  <embed src="'+this.oSrc+'" '+ this.oParams +' pluginspage="http://www.microsoft.com/mac/otherproducts/otherproducts.aspx?pid=windowsmedia" type="video/quicktime" width="'+this.oWidth+'" height="'+this.oHeight+'" />';
	}
	
	this.getwmv = function()
	{
		this.oSrc = this.oSrc.replace("../../userfiles/",oAbspath+"userfiles/"); // op de een of andere manier werkt wmv alleen met absoluut pad
        this.oHTML 		= '  <embed src="'+this.oSrc+'" '+ this.oParams +' width="'+this.oWidth+'" height="'+this.oHeight+'" />';
	}
	
	this.init();
}

