function loadFLV (name, src, preview, title, width, height, autostart, description, type) {
	//alert('loadFLV ('+ name +', '+ src +', '+ preview +', '+ title +', '+ width +', '+ height +', '+ autostart +', '+ description +')');
	loadFile (name, src, preview, width, height, autostart, type);
	if (typeof title != "undefined" && '' != title) {
		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("mediaplay?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, type) {

//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);
        var fo = new FlashObject("/js/cinemapro.swf?file="+ src +'&autostart='+ autoplay+'&rsn='+ Math.random(), _name, _width, _height, "7", "#000000", true);
		fo.addParam("quality", "high");
        fo.addParam("wmode", "transparent");
        fo.addParam("menu", "false");
		fo.addParam("allowScriptAccess", "sameDomain");
		fo.addParam("allowFullScreen", "false");
		if (type != 'auto')
		{
			if (type == 'hp')
				section = 'homepage';
			else 
				section = 'site';

			fo.addVariable("X1_ad_params", escape("pub=632203491294404&site=cinemapro&section="+section+"&zone=rectangle_video&size=0x0"));
			fo.addVariable("X1_pg_id", window.X1_PgId);
			fo.addVariable("X1_url", escape(document.URL));
			fo.addVariable("X1_referrer", escape(document.referrer));
			fo.addVariable("X1_disabled", "false");
		}
        if(preview != "" && preview != null) {
                fo.addVariable("image", preview);
        }
		
		if(preview != "" && preview != null) {
                fo.addParam("image", preview);
        }
        fo.addVariable("file",src);

        if(autoplay == "true") {
                fo.addVariable("autostart","true");
        } else {
                fo.addVariable("autostart","false");
		}
        if(volumetype != "" && volumetype != null) {
                fo.addVariable("volumetype", volumetype);
        }
		 fo.addVariable("width",_width);
		 fo.addVariable("height",_height);


		//fo.addVariable("starttxt","Click aici...");
		//fo.addVariable("buffer","Se incarca...");
 		fo.write(_name);
		
}
