window.onload = function()
{
    var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;		// true if we're on ie
	var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; // true if we're on windows
    
    if (isWin)
    {
		misctext.loadxml();
	}
}

misctext = new Object();

misctext.is_regenerating = 'true';
//misctext.xml_path = 'http://localhost';
//misctext.xml_path = 'http://webserver:2228';
misctext.xml_path = 'http://www.productoftheyearusa.com';
misctext.output = output;

misctext.loadxml = function()
{
    var url_string = '';
	
	if (misctext.output == 'step1.xml') {
		url_string = '/poy.partials.aspx?output_file=' + misctext.output + '&xsl_path=' + misctext.xml_path + '/xslt/regform_text.xsl&is_regenerating=' + misctext.is_regenerating;
	} else {
		url_string = '/poy.partials.aspx?output_file=' + misctext.output + '&xsl_path=' + misctext.xml_path + '/xslt/misc_text.xsl&is_regenerating=' + misctext.is_regenerating;
	}
	
	NETJOHNHENRY.Ajax.load({
		url: url_string,
		onloadfunction: misctext.LoadContent
	});
	
	
}


misctext.LoadContent = function()
{
    xmlobj = arguments[0].responseXML;
    
    var contentPattern = '//page/contents';
	var contentIterator = NETJOHNHENRY.Document.evaluate(contentPattern, xmlobj, null, 0, null);
	var page = contentIterator.iterateNext()
	
	var p = page.textContent;
	var e = document.getElementById(ele);  
	
	if (e!=null)
	{
		e.innerHTML = p;
	}
}



