﻿// JavaScript Document
function innerACSP()
{
	document.write("<div id='principal'></div>");
	
	if(document.implementation && document.implementation.createDocument){
	// *** Mozilla
	var xsltProcessor = new XSLTProcessor();
	// *** load the XSL file
	var myXMLHTTPRequest = new XMLHttpRequest();
	myXMLHTTPRequest.open("GET", "swdata/HomeACSP.xsl", false);
	myXMLHTTPRequest.send(null);
	// *** get the XML document
	xslStylesheet = myXMLHTTPRequest.responseXML;
	xsltProcessor.importStylesheet(xslStylesheet);
	// *** load the xml file
	myXMLHTTPRequest = new XMLHttpRequest();
	myXMLHTTPRequest.open("GET", "swdata/HomeACSP.xml", false);
	myXMLHTTPRequest.send(null);
	var xmlSource = myXMLHTTPRequest.responseXML;
	// *** transform
	var resultDocument = xsltProcessor.transformToFragment(xmlSource, document);
	//document.write(resultDocument);
	document.getElementById("principal").appendChild(resultDocument);
	}else if(window.ActiveXObject){
	// *** IE
	// *** Load XML
	xml = new ActiveXObject("MSXML2.DOMDocument");
	xml.async = false
	xml.load("swdata/HomeACSP.xml")
	// *** Load XSL
	xsl = new ActiveXObject("MSXML2.DOMDocument");
	xsl.async = false
	xsl.load("swdata/HomeACSP.xsl")
	// *** Transform
	document.write(xml.transformNode(xsl));
	}else{
	// *** Browser unknown
	alert("Seu navegador não da suporte a esse site.");
	}

}
function innerACSPdestaques()
{
	document.write("<div id='principal'></div>");
	
	if(document.implementation && document.implementation.createDocument){
	// *** Mozilla
	var xsltProcessor = new XSLTProcessor();
	// *** load the XSL file
	var myXMLHTTPRequest = new XMLHttpRequest();
	myXMLHTTPRequest.open("GET", "swdataHomeACSP.xsl", false);
	myXMLHTTPRequest.send(null);
	// *** get the XML document
	xslStylesheet = myXMLHTTPRequest.responseXML;
	xsltProcessor.importStylesheet(xslStylesheet);
	// *** load the xml file
	myXMLHTTPRequest = new XMLHttpRequest();
	myXMLHTTPRequest.open("GET", "swdata/HomeACSPdest.xml", false);
	myXMLHTTPRequest.send(null);
	var xmlSource = myXMLHTTPRequest.responseXML;
	// *** transform
	var resultDocument = xsltProcessor.transformToFragment(xmlSource, document);
	//document.write(resultDocument);
	document.getElementById("principal").appendChild(resultDocument);
	}else if(window.ActiveXObject){
	// *** IE
	// *** Load XML
	xml = new ActiveXObject("MSXML2.DOMDocument");
	xml.async = false
	xml.load("swdata/HomeACSP.xml")
	// *** Load XSL
	xsl = new ActiveXObject("MSXML2.DOMDocument");
	xsl.async = false
	xsl.load("swdata/HomeACSPdest.xsl")
	// *** Transform
	document.write(xml.transformNode(xsl));
	}else{
	// *** Browser unknown
	alert("Seu navegador não da suporte a esse site.");
	}

}