﻿
function ReadMyData(filename)
{  
    try
    {   
        if (window.ActiveXObject)
              {xmlDoc=new ActiveXObject("Microsoft.XMLDOM");}
            // code for Mozilla, Firefox, Opera, etc.
            else if (document.implementation && document.implementation.createDocument)
              {xmlDoc=document.implementation.createDocument("","",null);}
            else
              {alert('Your browser cannot handle this script');
              return;
          }
            xmlDoc.async=false;
            xmlDoc.load(filename);
             this.firmName = (xmlDoc.getElementsByTagName("FirmName")[0].childNodes[0].nodeValue);
             this.firmSlogan = (xmlDoc.getElementsByTagName("FirmSlogan")[0].childNodes[0].nodeValue);
             this.firmAddress = (xmlDoc.getElementsByTagName("FirmAddress")[0].childNodes[0].nodeValue);
             this.firmPhone = (xmlDoc.getElementsByTagName("FirmPhone")[0].childNodes[0].nodeValue);
             this.firmLng = (xmlDoc.getElementsByTagName("FirmLng")[0].childNodes[0].nodeValue);
             this.firmLat = (xmlDoc.getElementsByTagName("FirmLan")[0].childNodes[0].nodeValue);
             this.firmEmail =  (xmlDoc.getElementsByTagName("FirmEmail")[0].childNodes[0].nodeValue); 
             this.firmEmailTagEN = '<a href="mailto:' + this.firmEmail + '?subject=Property Inquiry">For further details or if you have any questions </a>'      
             this.firmEmailTagGr = '<a href="mailto:' +  this.firmEmail + '?subject=Property Inquiry">ζητήστε περισσότερα</a>' 
    }
    catch(error)
    {alert("Σφάλμα κατά την ανάγνωση του αρχείου παρουσίασης γραφείου \n" + error.message)
       return;};
}


