
//  ***** Function for displaying program specific information *****
function displayProgram(timezone) {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/program.xsl";
	var result = "";	
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	try {
    var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
    }
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
  
  }
	xmlDoc.async = false;
	//
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// add parameters used in the stylesheet
   		xslProc.addParameter("timezone", timezone);
		xslProc.addParameter("ID", parseInt(Request.QueryString("ID")));
		xslProc.addParameter("lnkto", parseInt(Request.QueryString("lnkto")));
		xslProc.addParameter("lnktopm", parseInt(Request.QueryString("lnktopm")));
		
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}  
//  ***** End Program specific function *****

//  ***** Function for displaying the weekly schedule *****
function displaySchedule(timezone) {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/weekly.xsl";
	var result = "";
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	try {
    var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
    
	}
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
  
  	}
	xmlDoc.async = false;
	//
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// add parameters used in the stylesheet
   		xslProc.addParameter("timezone", timezone);
		
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}
//  ***** End function for displaying weekly schedule *****

//  ***** Function for displaying the schedule by category *****
function displayCategory(timezone) {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/category.xsl";
	
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	try {
    	var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
   
	}
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	try {
		var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
  
  	}
	xmlDoc.async = false;
	//
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// add parameters used in the stylesheet
   		xslProc.addParameter("timezone", timezone);
		
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}
//  ***** End function for displaying category schedule *****

//  ***** Function for displaying the program list by disease state *****
function displayProgsByDisease() {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/disease.xsl";
	var result = "";
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	try {
    var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
    
}
	
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
  
  }
	xmlDoc.async = false;
	//
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}
//  ***** End function for displaying program list *****

//  ***** Function for displaying the Health and Wellness program list *****
function displayHealthProgs() {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/health.xsl";
	var result = "";
	//create objects for the style sheet transformation
	
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	try {
    var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
   
	}
	
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
  	ActiveDocument.BrowserURL = "";
  	return;
  	}
	
	xmlDoc.async = false;
	//
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}
//  ***** End function for displaying program list *****

//  ***** Function for displaying the Health and Wellness program list *****
function displayAll() {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/allprogs.xsl";
	var result = "";
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	try {
    var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
   
	}	
	
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
   	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
  
  	}
	
	xmlDoc.async = false;
	//
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}
//  ***** End function for displaying category list *****
//  ***** Function for displaying weekly information *****
function displayWeekly(timezone) {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/weekly.xsl";
	var result = "";
	
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	
	
	try {
    	var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
    
   }
	
	
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	
	
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
    }
	
	xmlDoc.async = false;
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// add parameters used in the stylesheet
   		xslProc.addParameter("timezone", timezone);
				
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}  
//  ***** End of Weekly Schedule Display ***** 
//  ***** Function for displaying program specific information *****
function printHTML(timezone) {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/print_html.xsl";
	
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	
	
	try {
    	var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
    
   }
	
	
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	
	
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
    }
	
	xmlDoc.async = false;
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// add parameters used in the stylesheet
   		xslProc.addParameter("timezone", timezone);
		xslProc.addParameter("prnt", parseInt(Request.QueryString("prnt")));
		
		
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}  

//  ***** Function for displaying weekly information *****
function displayWeeklyPrint(timezone) {
	// Set locations of needed data files.  These are relative to the HTML file using this utility
	var xmlfile = "scripts/XML/data.xml";
	var xslfile = "scripts/XML/print_WeeklyHTML.xsl";
	var result = "";
	
	//create objects for the style sheet transformation
	var xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
	
	
	try {
    	var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
    }
    catch(exception) {
    result = reportRuntimeError("Page Preview Error:", exception);
    alert(result + "\nFailed second use of MSXML.");
    
   }
	
	
	var xslProc;
	xslDoc.async = false;
	xslDoc.resolveExternals = false;
	xslDoc.load(xslfile);
	xslt.stylesheet = xslDoc;
	
	// create object representing XML data file
	
	
	try {
	var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
	}
  	catch(exception) {
  	result = reportRuntimeError("Page Preview Error:", exception);
  	alert(result + "\nYou need to get the latest version of MSXML from the Microsoft site.");
    }
	
	xmlDoc.async = false;
	xmlDoc.resolveExternals = false;
	xmlDoc.load(xmlfile);
	
	// check for a valid xml document
	if (xmlDoc.parseError.errorCode != 0) {
   		var myErr = xmlDoc.parseError;
   		document.write("You have error " + myErr.reason);
	} else {
   		xslProc = xslt.createProcessor();
   		xslProc.input = xmlDoc;
		
		// add parameters used in the stylesheet
   		xslProc.addParameter("timezone", timezone);
				
		// process and write out results
   		xslProc.transform();
   		document.write(xslProc.output);
	}
	
	var xslt = "";
	var xslDoc = "";
	var xslProc = "";
	var xmlDoc = "";

}  
//  ***** End of Weekly Schedule Display ***** 



