/// var Settings = new function() { this.bSearchEnabled = null; this.sPhoneNumber = null; this.isSearchEnabled = function() { return this.bSearchEnabled; }; this.getPhoneNumber = function() { return this.sPhoneNumber; }; this.init = function() { this.bSearchEnabled =true; this.sPhoneNumber = null; var url = Common.getUrl("smartphones/Sites/" + Common.getSiteID() + "/settings.xml"); this.doc = XML.load(url); //try { //this.bSearchEnabled = this.doc. ings.searchEnabled; //if ("false" == this.doc.getElementsByTagName("SearchEnabled")[0].textContent) // this.bSearchEnabled = false; //} catch (e) { // console.log("error in Settings init 1 :"+e); //} try { this.sPhoneNumber=this.doc.firstChild.getAttribute("phoneNumber"); } catch (e) { console.log("error in Settings init (getting phone number) :"+e); } ; }; this.init(); };