function check_user( dest_href, strNewWindowHref ){
	var	new_win;   // window object

	// create a window with no controls
	new_win = window.open("/eptroot/kopflex/include/check_user.asp?dest_href=" + escape(dest_href), "", "directories=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,height=135,width=390");
	
	return;
}



function openEPTHome( login ){
	var new_win;	// window object
	var nw_frames;	// frame object


	// if the user is logged in, load the main page without the login capability
	if (login == true){

		// open the EPT home page for logged in users
		new_win = window.open('/eptroot/eptedge/default.asp?From=KopFlexHomepage');
		
	}
	else {
		// open the default EPT Home page in a seperate window
		new_win = window.open('/default.asp');
	}

	return;
}


/* this function makes sure that all parent elements of object 'x' are shown,
 * by recursively calling itself on the parent of 'x'.
 */
function showParent( x )
{	if (x != null && typeof x.parentElement != "undefined")
	{	show(x.parentElement);           // draw this object
		showParent(x.parentElement);     // draw the parent of this object
	}
}


/* this functions makes sure that object 'x' is drawn on the screen */
function show( x )
{	if (x != null && typeof x.style.display != "undefined")
		x.style.display = "inline";      // draw the object
}


/* this function makes sure that object 'x' is NOT drawn on the screen */
function hide( x )
{	if (x != null && typeof x.style.display != "undefined")
		x.style.dipslay = "none";        // don't draw the object
}


/* this function simply toggles the displays status of object 'x'.  if it is
 * currently not displayed, then calling this function will force it to be
 * displayed.  if it is being displayed, then calling this function will force
 * it NOT to be displayed.  notice that we also make sure any parent objects
 * of 'x' are shown (after all, if 'x' is displayed, but the object it is
 * inside is not, then 'x' will not be seen).
 */
function toggleDisplay( x )
{	/* first, make sure that x is a valid object that supports styles */
	if (x != null && typeof x.style.display == "undefined")
	{ return; }

	if (x.style.display == "none")
	{	showParent(x);                   // make sure all parents are visible
		x.style.display = "inline";      // make the menu visible
		x.scrollIntoView(true);          // bring the new menu into view
	}
	else {
		x.style.display = "none";        // make the menu invisible
   }
}


/* here, if the page being loaded has a title, we force that title to be the
 * one in the window's title-bar.  any page that never intends to use its
 * title should NOT have one (otherwise, it will be used).
 */
function setTitle( x )
{	if (x != null && typeof top.document.title != "undefined")
		top.document.title = x;
}


/* this function dynamically loads a file (whose filename is specified by x)
 * into the contents frame (which _should_ be the left-navigation frame)
 */
function loadContents( x )
{	if (x != null && typeof x != "undefined" && typeof top.contents != "undefined")
		top.contents.location.href = x;
}


/* this function dynamically loads a file (whose filename is specified by x)
 * into the main frame (which _should_ be the center frame through which all
 * active content is displayed)
 */
function loadMain( x )
{	if (x != null && typeof x != "undefined" && typeof top.main != "undefined")
		top.main.location.href = x;
}


/* this function dynamically loads a file (whose filename is specified by x)
 * into the banner frame (the one containing the page's header)
 */
function loadBanner( x )
{	if (x != null && typeof x != "undefined")
	{	/* next, we check to see if either 'FrameTop' or 'banner' is the name
		 * of the frame for the header (they are different depending on if you
		 * are logged in or not).  this makes sure that the correct one is
		 * used
		 */
		if (typeof top.FrameTop != "undefined")
			top.FrameTop.location.href = x;
		else if (typeof top.banner != "undefined")
			top.banner.location.href = x;
	}
}


/* this function dynamically loads a file (whose filename is specified by x)
 * into the FrameBottom frame (the one containing the solve button)
 */
function loadFooter( x )
{	if (x != null && typeof x != "undefined" && typeof top.FrameBottom != "undefined")
		top.FrameBottom.location.href = x;
}


/* this function hides the footer frame without reloading anything */
function hideFooter ()
{ top.outerFrameset.rows = "68,*,0"; }


/* this function shows the footer frame without reloading anything */
function showFooter ()
{ top.outerFrameset.rows = "68,*,33"; }


/* this toggles the display status of the footer */
function toggleFooter ()
{  if (top.outerFrameset.rows == "68,*,33")
      hideFooter();
   else
      showFooter();
}
