// The first two functions display a modal window that informs the
// user that he is about to leave school web server.
// The external web site is always opened in a new window.

// The first function always returns "false" so the default
// action of "onclick" for the MORE button is not performed.
// That action would open the new document.  Instead, the
// URL is passed to the function below and it creates a new
// window and opens the document after the warning message
// and user action of clicking on the OK button.

function offServerWarning ( externalPage )
{
	var w = window.open ( );
	var d = w.document;

	d.write ( '<html>' );
	d.write ( '<body  bgcolor="#CCCCCC">' );

	d.write ( '<div align="center">' );
	d.write ( '<center>' );
	d.write ( '<table border="0" cellpadding="0" cellspacing="0" width="90%">' );
	d.write ( '<tr><td width="100%" height="100"></td></tr>' );
	d.write ( '<tr><td width="100%">' );

	d.write ( '<center>' );
	d.write ( '<table border="2" bgcolor="#DDEEEE" bordercolor="#660000" cellpadding="12" cellspacing="0">' );
	d.write ( '<tr><td align="center">' );
	d.write ( '<nobr><big><b>The web site you are about to display</b></big></nobr><br>' );
	d.write ( '<nobr><big><b>is not on the official Arlington Public</b></big></nobr><br>' );
	d.write ( '<nobr><big><b>School\'s web server.</b></big></nobr><br>' );

	d.write ( '<form>' );
	d.write ( '<input type="button" value="   OK   " onclick="location.replace(' );
	d.write ( "'" );
	d.write ( externalPage );
	d.write ( "'" );
	d.write ( ');">&nbsp;&nbsp;&nbsp;' );
	d.write ( '<input type="button" value="Cancel" onclick="self.close();">' );
	d.write ( '</form>' );

	d.write ( '<p>' );
	d.write ( '<nobr>Arlington Public School\'s web site policy requires</nobr><br>' );
	d.write ( '<nobr>that you should be notified whenever you leave</nobr><br>' );
	d.write ( '<nobr>the official web server.</nobr><br>' );
	d.write ( '<br>' );
	d.write ( '<nobr>For your convenience, the new web site will be </nobr><br>' );
	d.write ( '<nobr>displayed in a separate window, so you can </nobr><br>' );
	d.write ( '<nobr>still have access to the official  web pages.</nobr><br>' );
	d.write ( '</p>' );

	d.write ( '</td></tr>' );
	d.write ( '</table>' );
	d.write ( '</center>' );

	d.write ( '</td></tr>' );
	d.write ( '</table>' );
	d.write ( '</center>' );

	d.write ( '</div>' );

	d.write ( '</body>' );
	d.write ( '</html>' );

	d.close ( );

	return false;
}

// The second function below is identical to the one above,
// but does not return anything.  This function is used
// in the menu buttons that send the user to an outside
// web site.  If it did return a value, then this value
// would be displayed in the original window, instead of
// leaving the window as is.

function offServerWarningMenu ( externalPage )
{
	offServerWarning ( externalPage );
}

// The next function has nothing to do with off server warning.
// It is used in Milonic's manu_data.js to open the specific pages in top window,
// i.e. to get out of a frame set.
// (This "fixes" the bug in Milonic's version 5.0 for Netscape 7.1 and Netscape 4.x
// in which "target=_top;" is not handled correctly.  In other words, menu
// items of the form
//	aI("text=Schedules;url=../main/schedules.htm;target=_top;separatorsize=1")
// are replaced by
//	aI("text=Schedules;url=javascript:targetTop(\"../main/schedules.htm\");separatorsize=1")

function targetTop ( pageURL )
{
	window.open ( pageURL, "_top" );
}

// One more function to add to the set.  This one opens a new window.

function targetBlank ( pageURL )
{
	window.open ( pageURL, "_blank" );
}







