_HP_banner_format();
_HP_banner_delay();

function _HP_banner_format()
{
	var toolbarTable = document.getElementsByTagName('TABLE')[0];
	var toolbarTd = document.getElementById('ToolbarButtons');
	var productNameTd = document.createElement('TD');
	var logoImgTd = document.createElement('TD');
	var logoImg = document.createElement('IMG');

	document.styleSheets[0].disabled = true;
	document.body.style.border = "none";
	document.body.style.margin = "0";
	document.body.style.padding = "0"; 

	toolbarTable.style.width = "100%";
	toolbarTable.style.margin = "0";
	toolbarTable.style.padding = "0";
	toolbarTd.setAttribute('align','right');
	toolbarTd.style.padding = "0";
	toolbarTd.style.margin = "0"
	productNameTd.setAttribute('id', 'productNameTd');
	productNameTd.style.fontFamily = "arial, geneva, sans-serif";
	productNameTd.style.color = "#FFFFFF";
	productNameTd.style.fontSize = "66px";
	productNameTd.style.padding = "0px 0px 0px 0px";
	productNameTd.style.margin = "0";
	productNameTd.style.lineHeight = "15px";
	productNameTd.style.verticalAlign = "middle";
	productNameTd.style.whiteSpace = "nowrap";
 	logoImg.src = "../Content/Resources/MasterPages/_HPb_banner_graphic.png";
	logoImg.style.verticalAlign = "middle";
	logoImg.style.marginRight = "0px";
	logoImg.style.marginLeft = "1px";
 	logoImgTd.style.width = "5px";
	logoImgTd.appendChild(logoImg);
	toolbarTd.parentNode.insertBefore(logoImgTd, toolbarTd);
	toolbarTd.parentNode.insertBefore(productNameTd, toolbarTd);
}

function _HP_banner_delay()
{
	var topicLocation = parent.body.document.location.toString();
	var topicReady = parent.body.document.readyState.toString();
	if ((topicLocation.search(/Blank.htm$/) != -1) || (topicReady.search(/complete/i) == -1))
		setTimeout("_HP_banner_delay()", 250);
	else
		_HP_banner_setText();
}

function _HP_banner_setText()
{
	var feedbackVariables = parent.body.document.getElementById("hp-feedback-variables");
	var productName = feedbackVariables.getAttribute('productname');
	var line1 = "xxx"
	var line2 = "xxx"
	var productNameTd = document.getElementById('productNameTd');

	parent.document.title = productName;
	
	if (line2.length == 0) 
		productNameTd.appendChild(document.createTextNode(line1));
	else {
		productNameTd.style.fontSize = "55px";
		productNameTd.style.lineHeight = "14px";
		productNameTd.appendChild(document.createTextNode(line1));
		productNameTd.appendChild(document.createElement('BR'));
		productNameTd.appendChild(document.createTextNode(line2));
	}	
}