function loadFLV (name, src, preview, title, width, height, autostart, description, url) {
//alert('loadFLV ('+ name +', '+ src +', '+ preview +', '+ title +', '+ width +', '+ height +', '+ autostart +', '+ description +')');
	loadFile (name, src, preview, width, height, autostart);
	if (typeof title != "undefined" && '' != title) {
		if(typeof url != "undefined" && '' != url)
			document.getElementById('video_title').innerHTML = '<a href="'+url+'" style="color:#FFFFFF">'+title+'</a>';
		else
			document.getElementById('video_title').innerHTML = title;
	}
	if (typeof description != "undefined" && '' != description) {
		document.getElementById('video_description').innerHTML = description;
	}
}

function loadMP3 (name, src, preview, title, width, height, autostart, description) {
	loadFile (name, src, preview, width, height, autostart);
	if (typeof title != "undefined" && '' != title) {
		document.getElementById('audio_title').innerHTML = title;
	}
	if (typeof description != "undefined" && '' != description) {
		document.getElementById('audio_description').innerHTML = description;
	}
}

function OLD_loadFile(name, src, preview, width, height, autostart) {
//prompt('Video URL:', src);
//prompt('Video Preview:', preview);
	var _width = width;
	var _height = height;
	var _name = name;
	var fo = new FlashObject("/cms/thirdparty/flvplayer.swf?file="+ src +'&autoplay='+ autostart, _name, _width, _height, "7", "#000000", true);
	fo.addParam("quality", "high");
	fo.addParam("wmode", "transparent");
	fo.addParam("menu", "false");
	if(preview != "" && preview != null) {
		fo.addVariable("previewfile", preview);
	}
//	fo.addVariable("autostart", autostart);
	fo.write(_name);
}

function loadFile(name, src, preview, width, height, autoplay) {
//prompt('Video URL:', src);
//prompt('Video Preview:', preview);
		var volumetype = '';
        var _width = width;
        var _height = height;
        var _name = name;
        var fo = new FlashObject("/cms/thirdparty/flvplayer.swf", _name, _width, _height, "7", "#000000", true);
        fo.addParam("quality", "high");
        fo.addParam("wmode", "transparent");
        fo.addParam("menu", "false");

        if(preview != "" && preview != null) {
                fo.addVariable("previewfile", preview);
        }
        fo.addVariable("file",src);

        if(autoplay == "true") {
                fo.addVariable("autoplay","true");
        } else {
                fo.addVariable("autoplay","false");
		}
        if(volumetype != "" && volumetype != null) {
                fo.addVariable("volumetype", volumetype);
        }
		fo.addVariable("starttxt","Click aici...");
		fo.addVariable("buffer","Se incarca...");
 		fo.write(_name);
		
}
