// Javascript file to load and display the blanket date for discounts
//  Author:  Gail Morrison  07/24/2006
//  This script will read the XML file published through Web Report Publisher
//   in /info_post/reports/discount/ folder.  It is used on the home page
//   to show the next blanket discount date and allow the user to click a
//   link to retrieve the Interruptible Transportation Discount report.


var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
var myDate = '(myDate)';

function loadXML(xmlFile)
{
	xmlDoc.async="false";
	xmlDoc.onreadystatechange=verify
	xmlDoc.load(xmlFile);
	xmlObj=xmlDoc.documentElement;
}

function verify()
{
	// 0 Object is not initialized
	// 1 Loading object is loading data
	// 2 Loaded object has loaded data
	// 3 Data from object can be worked with
	// 4 Object completely initialized
	if (xmlDoc.readyState != 4)
	{
		return false;
	} 
}

function showDate()
{
	document.write(myDate);
}

loadXML('/info_post/reports/discounts/blanketdate.xml');

myDate = xmlObj.childNodes(0).text;
