//<!--******************************************************************************************-->
//
//  警告: 本電腦程式著作受著作權法及國際公約之保護。
//  未經授權擅自複製或散佈本電腦程式著作之全部或部分
//  ，將導致嚴厲的民事或刑事處份，且將被依法提起最大
//  範圍的追訴。
//
//  CopyRight (C) Galaxy Software Service
//  Version: 2.0.500.4
//<!--******************************************************************************************-->
function __NBaseLoadXml(vstrReq){
//var strReq;				variable to hold request string
	var root, source;		//A couple of XMLDOM objects (document and 
	var sT;

	//Show a searching message
	status = 'searching, please wait....';
	//Create an xml document object, and load the server's response
	source = new ActiveXObject('Microsoft.XMLDOM');
	source.async = false;

	//Send the request string and read the result into the XMLDOM object
	source.load(vstrReq);
	//Check to see if there was an error parsing the response from the server
	if (source.parseError != 0){
		sT = 'XML Error...<br>reason:' + source.parseError.reason + '<br>';
		sT += 'errorCode:' + source.parseError.errorCode + '<br>';
		sT += 'filepos:' + source.parseError.filepos + '<br>';
		sT += 'line:' + source.parseError.line + '<br>';
		sT += 'linepos:' + source.parseError.linepos + '<br>';
		sT += 'reason:' + source.parseError.reason + '<br>';
		sT += 'srcText:' + source.parseError.srcText + '<br>';
		sT += '<pre>' + source.xml + '</pre><br>';
		alert(sT);
		status = 'XML Error!';}
	else {
		root = source.documentElement;		//Get a reference to root XML object
		status = 'Done';
		return root;}
}
function __NBasePostXML(vstrURL,vstrXML)
{    
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.Open("POST", vstrURL, false);
    xmlhttp.setRequestHeader("Content-Type", "text/xml");
    xmlhttp.Send(vstrXML);
    if(xmlhttp.responseXML.xml!=""){
		var objDoc = new ActiveXObject("Microsoft.XMLDOM");
		objDoc.async = false;
		objDoc.loadXML(xmlhttp.responseXML.xml);
		return objDoc;
    }
}
