function insertContent2( xmlUrl, xsltUrl, objName, loadingText, time, language ) {
var xmlDoc;
var xsltDoc;
var obj = document.getElementById( objName );
//display warning( xml is loading )
if( obj && loadingText && loadingText != "" )
obj.innerHTML = loadingText;
var xmlHttp = XmlHttp.create();
xmlHttp.open( "GET", xmlUrl, true );
xmlHttp.onreadystatechange = function () {
if( xmlHttp.readyState == 4 ) {
if ( xmlHttp.responseXML == null || xmlHttp.responseXML.xml == "" ) {
if ( language == 'de' ) {
//obj.innerHTML = 'Fehler beim Laden des RSS Feed von diesem Speicherort: `' + xmlHttp.responseText + '`.
Bitte versuchen Sie, die Seite neu zu laden.';
obj.innerHTML = '';
} else {
//obj.innerHTML = 'Error loading the rss feed from this location: `' + xmlHttp.responseText + '`.
Try to reload the page.';
obj.innerHTML = '';
}
} else {
xmlDoc = xmlHttp.responseXML;
xsltDoc = XmlDocument.create();
xsltDoc.load( xsltUrl );
xsltDoc.onreadystatechange = function () {
if( xmlHttp.readyState == 4 ) {
XmlDocument.transform( xmlDoc, xsltDoc, obj );
//initMenus( obj );
//update the content
if( time && time != 0 )
window.setTimeout( "insertContent( '"+xmlUrl+"','" + xsltUrl + "','" + objName + "','" + loadingText + "'," + time + ")",time * 1000 );
}
}
}
}
}
xmlHttp.send( null );
}