var selonDoc = {

    //req:  null,
    xslStyleSheet: null,
    doc: null,
    droot: '',

    title: "",

    author: "",

    segments:  {},
    
    getRequest: function() {
    	var req;
    	if (!window.ActiveXObject) {
	    req = new XMLHttpRequest;
	} else {
	    req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return req;
    },
    initReq : function(url) {
    	var req = this.getRequest();
    	if (req) {
	   var thisObj = this;

	   // alert("request is not null" + this.req);
	   req.onreadystatechange = function(){thisObj.documentHandler(req)};
	   req.open("GET", url);
	   req.send(null);
	} else {
	  
	  alert ("request is null");
	}
    },

     xsltInitReq : function(url) {

	 var req = this.getRequest();
	 req.open("GET", this.xsltUrl, true);
  	 req.send(null);
	 //alert(req.responseText);
  	 var xslSS = req.responseXML;
	 return xslSS;
    },


    documentHandler: function(req) {
	if (req.readyState == 4) {
	    // alert("got to readystate");
	    // only if "OK"
	    // alert(req.status);
	    //if (req.status == 200) {
	    this.doc = req.responseText;
	    // alert(req.responseText);
	    this.makeDoc();
	    //this.handlePage();
	}
    },

    makeDoc: function() {
	this.droot = document.getElementById("divrootSalon"); 
	var pre = document.createElement("pre");
	pre.style.fontSize = "9pt";
	pre.appendChild(document.createTextNode(this.doc));
	this.droot.appendChild(pre);
	
    }
}

