var sVideoType = "flash";

/*Tutte le chiamate Ajax usano MakeRequest*/
function MakeRequest(url,objDom,callback) {
	//url += "&videotype=" + sVideoType;
	$(objDom).html("");
	$.ajax({
		type: "GET",
		url: url,
		dataType: "xml",
		success: function(Xml) {

			//alert(objDom);
			//alert($("ContentHTML",Xml).text());
			$(objDom).html($("ContentHTML",Xml).text());		
			
			
			$(objDom).queue(function(){
			     
					if(callback) callback();
					$(this).dequeue();
					
			}) ;
       
	   }
   });
}

function LoadContentVideo(sDivID, sGuid, sAutoStart)
{
	var url = "/site/GetAjaxContent.html?template=ra\\ContentFlowPlayer" + "&WebTVContentID=" + sGuid + "&WebTVOnDemandChannelID=0";
	sContentPlayerURL = url;
	url += "&videotype=" + sVideoType;
	url += "&autostart=" + sAutoStart;
	MakeRequest(url, '#' + sDivID, function()
									{
										//alert("Ciao");
										//$('#flow_player').css('width', '100%');
										//$('#flow_player').css('height', '100%');
									}
								);
}

function videoEnded()
{
}
