/***********************
It is critical that the following HTML code be located within the BODY tags of the document using the popup:

	<div id="popuplayer" style="position:absolute; visibility:hidden;">
		<table bgcolor="#ffffcc" cellpadding=10 cellspacing=0 border=1 width=420><tr><td>
		<p class="TABLE" align="right"><a href="javascript:hidePop()"><img src="x.gif" border=0></a></p><p>
		<div id="content"></div>
		</td></tr></table>
	</div>

***********************/

var y1 = 20;	// increase to position popup further down on the page


// The hidePop() function is very simple.  It looks for a DIV element with an Id of "popuplayer" and then hides it.
// It is used to mimic the closing of a popup window.  Although it appears the popup is being closed, in reality it is just being hidden.
function hidePop() {document.getElementById("popuplayer").style.visibility='hidden';}


// The showPop() function first looks for a DIV element with an Id of "content," then writes the input argument "text" to it.
// Next it looks for a DIV element with an Id of "popuplayer" and makes it visible.
//
// NOTE: The "content" DIV is located within the "popuplayer" DIV.  This was done in order to keep the "text" simple,
//       and to eliminate the repetitive entering of the following code:
//       <p class="TABLE" align="right"><a href="javascript:hidePop()"><img src="x.gif" border=0></a></p><p>
function showPop(text) {
  document.getElementById("content").innerHTML = text;					// write text to popup
  document.getElementById("popuplayer").style.visibility='visible';		// show popup
}


// The placePop() function positions the "popuplayer" DIV element on the page based on the size of the user's browser window and the y1 variable.
function placePop() {
  if (document.getElementById && !document.all) {document.getElementById("popuplayer").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1))}  // Needed for Firefox compatability.
  if (document.all) {document.all["popuplayer"].style.top = document.body.scrollTop + (document.body.clientHeight - (document.body.clientHeight-y1));}
  window.setTimeout("placePop()", 10);
}

window.onload=placePop;		// re-positions the popup if the user changes the size of their browser window


// This function is used for internal articles that require popups to be printable.  So far just R10989 and R10484 require this function.
// The winPop() function opens a new window (or a new tab in IE7 in FF) named foobar.
// Then it adds the KBstyle stylesheet and writes the contents of "text" to the foobar window.
function winPop(text) {
  var foobar = window.open();
  foobar.document.writeln("<html><link rel='STYLESHEET' href='KBstyle.css' type='text/css'>");
  foobar.document.write(text);
  foobar.focus();
}



// RBB, 12/04/2006
