function includeMedia(sala) {

chkQT();

$.ajax({
type: "GET",
dataType: "text",
url: SRCxml,
success: function(xmlData){
	//alert(SRCxml);
     try //Internet Explorer
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async="false";
  xmlDoc.loadXML(xmlData);
  }
	catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    parser=new DOMParser();
    xmlDoc=parser.parseFromString(xmlData,"text/xml");
    }
  catch(e) {alert('xml non creato')}
  }

parseXML(xmlDoc, sala);
    },
error: function(){
htmlCode="<code>Flusso dati non disponibile.<br />Riprova pi&ugrave; tardi.</code>"; 
dumpHTML(htmlCode); 
}

});
}

function parseXML(xmlDoc, sala) {
elm=xmlDoc.getElementsByTagName('htmltag');
htmlCode = "";

for (jw=0; jw<elm.length; jw++) {
htmlCode += elm[jw].firstChild.nodeValue;
}
dumpHTML(htmlCode, sala);
}

function dumpHTML(htmlCode, rpl) {
document.getElementById('media').innerHTML = htmlCode.replace("##sala##",rpl);
}