<!--hide
//start common scripts
//****************************************************************
//Open a topic in a popup. The close code must be in the topic.
//
//Typical usage:
//  onClick="HTMLPopup('p_func.htm')"
//
//Parameters:
// htmlfile = file to display in the popup.
//****************************************************************
var objHTMLPopup = null
function HTMLPopup(htmlfile)
	{
	objHTMLPopup = window.open(htmlfile, "Hpopup", "status=no,scrollbars=yes,width=400,height=300")
	window.event.cancelBubble = true
	window.event.returnValue = false
	}

//****************************************************************
//Open a text popup.
//
//Typical usage:
//  onCLick="TextPopup('Pop It Up', 'Text Popup Sample', 'This popup will self close.', 1)"
//
//Parameters:
//  title = window title bar text.
//  heading = a H3 style heading. If blank, the message starts on the first line.
//  msg = the body of the popup text.
//  autoClose = whether or not to autoclose
//      1 = yes, and don't post a CLose button.
//      0 = no, but post a Close button.
//****************************************************************
var objTextPopup = null;
function TextPopup(title, heading, msg, autoClose)
	{
	var s1 = "<title>" + title + "</title>"
	var s2 = null
	var s3 = null
	if (autoClose)
		{
		s2 = "<body onClick='self.close()' onBlur='self.close()'>"
		}
	else
		{
		s2 = "<body>"
		}
	if (heading != "")
		{
		s2 = s2 + "<h3>" + heading + "</h3>"
		}
	s2 = s2 + "<p>";
	if (autoClose)
		{
		s3 = "</p>"
		}
	else
		{
		s3 = "</p><form><input type='button' value='Close' " +
		"onClick='self.close()'></form></body>"
		}
	objTextPopup = window.open("", "Tpopup", "status=no,scrollbars=no,width=190,height=120")
	objTextPopup.document.write(s1 + s2 + msg + s3)
	objTextPopup.document.bgColor="C4B476"
	objTextPopup.document.close()
	objTextPopup.focus()
	window.event.cancelBubble = true
	window.event.returnValue = false
	}

//****************************************************************
//Open a topic in a separate browser window that looks like a browser window.
//The new window is called "second".
//Topics that go into this window need to take focus when they open.
//
//Typical call:
//  OpenSecond(htmlfile)
//
//Parameters:
//  htmlfile = file to display in the new window.
//****************************************************************
var objNewWindow = null
function OpenSecond(htmlfile)
	{
	objNewWindow = window.open(htmlfile, 'second')
	SetSecondary(objNewWindow)
	}


//****************************************************************
//Open a topic in the main window. The current window is closed.
//
//Typical call:
//  OpenMain(htmlfile)
//
//Parameters:
//  htmlfile = file to display in the new window.
//****************************************************************
function OpenMain(htmlfile)
	{
	opener.location.href=htmlfile
	self.close();
	window.event.cancelBubble = true;
	window.event.returnValue = false;
	}

//****************************************************************
//ClosePopup makes sure that the popup window is closed when the
//current page goes away.
//****************************************************************
function ClosePopup()
	{
	if (objHTMLPopup != null)
		{
		objHTMLPopup.close()
		}
	if (objTextPopup != null)
		{
		objTextPopup.close()
		}
	}

var isSecondary = null;
//********************************************************************
//SetSecondary is called when a document opens a secondary window.
//
//********************************************************************
function SetSecondary(objSWindow)
	{
	isSecondary = objSWindow;
	}

//********************************************************************
//CloseSecondary is called when the navigation pane in the main window
//is closed. It closes the secondary window.
//
//********************************************************************
function CloseSecondary()
	{
	if (isSecondary != null)
		{
		isSecondary.close()
		}
	}

//stop hiding-->

