/*  코드 : ofdream.com
 *  로그 남기기위해서 최소한의 ajax 코드
 *--------------------------------------------------------------------------*/

LOGSendXMLObj = function()
{
	this.strXML = "<OFDREAM>"; 
}

LOGSendXMLObj.prototype.StartSubTag = function(strTagName)
{
	this.strXML += "<";
	this.strXML += strTagName;
	this.strXML += ">";
}

LOGSendXMLObj.prototype.EndSubTag = function(strTagName)
{
	this.strXML += "</";
	this.strXML += strTagName;
	this.strXML += ">";
}

LOGSendXMLObj.prototype.AddData = function(strTagName, strTagData)
{
	this.strXML += "<";
	this.strXML += strTagName;
	this.strXML += "><![CDATA[";
	this.strXML += strTagData;
	this.strXML += "]]></"
	this.strXML += strTagName;
	this.strXML += ">";
}

LOGSendXMLObj.prototype.GetXML = function()
{
	return this.strXML + "</OFDREAM>";		
}



	try
	{
		var XMLHttpObj;

		if (window.XMLHttpRequest) 
		{
			XMLHttpObj = new XMLHttpRequest();
		}
		else if (window.ActiveXObject) 
		{
			XMLHttpObj = new ActiveXObject("Microsoft.XMLHTTP");
		}

		var XMLObj = new LOGSendXMLObj();

		XMLObj.StartSubTag("SUB_TAG");
			XMLObj.AddData("href", location.href);
			XMLObj.AddData("referrer", document.referrer);
		XMLObj.EndSubTag("SUB_TAG");

		var strXML = XMLObj.GetXML();
	 
		XMLHttpObj.open("POST", "/odsys/bbs/admin/weblog/_ajax_write_log.php", true);  

		XMLHttpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); 
		XMLHttpObj.setRequestHeader("Content-length",  strXML.length);
		XMLHttpObj.setRequestHeader("Connection", "close");

		XMLHttpObj.send(strXML);
	}
	catch(e)
	{
		alert("catch");
		//무시
	}





