var isSaveLogByLocalSource = "true";
var xmlHttp_siteTotal = false;
function createXMLHttpRequest() {
    /*@cc_on @*/
    /*@if (@_jscript_version >= 5)
    // JScript gives us Conditional compilation, we can cope with old IE versions.
    // and security blocked creation of the objects.
     try {
      xmlHttp_siteTotal = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (e) {
      try {
       xmlHttp_siteTotal = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
       xmlHttp_siteTotal = false;
      }
     }
    @end @*/
    if (!xmlHttp_siteTotal && typeof XMLHttpRequest!='undefined') {
        try {
            xmlHttp_siteTotal = new XMLHttpRequest();
        } catch (e) {
            xmlHttp_siteTotal=false;
        }
    }
    if (!xmlHttp_siteTotal && window.createRequest) {
        try {
            xmlHttp_siteTotal = window.createRequest();
        } catch (e) {
            xmlHttp_siteTotal=false;
        }
    }
}


function prepareXML() { 
	var sourceUrl = document.referrer;
	if(sourceUrl == null || sourceUrl==""){
		if(window.parent.document.referrer!=""){
			sourceUrl = window.parent.document.referrer;
		}else{
			sourceUrl = "ÊÖ¹¤ÊäÈë";
		}
	}
   var xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
   			+"<WebSite-Total>"
   			+"<Request-Step>1</Request-Step>"
		    +"<Request>"
			+"<Source-Url>"+ sourceUrl +"</Source-Url>"
			+"<Visit-Url>"+ document.URL +"</Visit-Url>"
			+"<Article-Title>"+document.title +"</Article-Title>"
			+"</Request>"
			+"</WebSite-Total>";
   return xml;
 }
 
 function sendRequestTotalXML() {
    var xml = prepareXML();   
    
    var url = "/sitestat/WebsiteTotalService?timeStamp" + new Date().getTime(); 

    createXMLHttpRequest();   
	xmlHttp_siteTotal.open("POST", url);
	xmlHttp_siteTotal.send(xml);   

}

sendRequestTotalXML();

