var xmlDoc
var mozzila
var mozzilaText
var html
function loadXML(xmlURL)
{

//load xml file
// code for IE
if (window.ActiveXObject)
{
	xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	xmlDoc.async=false;
	xmlDoc.load(xmlURL);
	nesto = getmessage()
	return nesto;
}
// code for Mozilla, etc.
else if (document.implementation && document.implementation.createDocument)
{
	var mozzila = 1;
	xmlDoc= document.implementation.createDocument("","",null);
	xmlDoc.load(xmlURL);
	xmlDoc.onload=getmessage
}
else
{
	alert('Your browser cannot handle this script');
}
}

function getmessage()
{
//var num_of_items = xmlDoc.getElementsByTagName("content").length;
//alert(num_of_items);
//HTML = new Array();
//path_temp = naslov.toLowerCase();
//path_directory = path_temp.replace(/š/g, "s");
//path_directory = path_directory.replace(/ð/g, "dj");
//if (path_directory.indexOf(" - ") > -1) {
//	path_directory = path_directory.replace(/ - /g, "_");
	//path_directory = path_directory.replace(/ /g, "_");
	//path_directory_store = path_directory;
//} else {
	//path_directory = path_directory.replace(/ /g, "_");
	//path_directory_store = path_directory;
//}
naslov =  xmlDoc.getElementsByTagName("name")[0].firstChild.nodeValue;
content = xmlDoc.getElementsByTagName("content")[0].firstChild.nodeValue;
//if (mozzila != 1) {
	var html = '<strong>' + naslov + '</strong><br>' + content;
	return html;
//} else {
	//mozzilaText = '<strong>' + naslov + '</strong><br>' + content;
	//return mozzilaText;
//}
}
