Wow, this is quite a challange. First, let me say that AppleScript isn’t really suited to this… but that’s never stopped me before. 
The following is a very untested solution. Perhaps other scripters might take a look at it and suggest improvements. The idea here is to create a stay-open, run-only script applet that is always running on the kiddies computers. The quit handler tries to ensure that they can’t turn off the applet without a password. Then, every few seconds or so, the applet checks to see if a browser was opened, (ie: the browser is launched first, then the warning pops up).
This is probably not a good idea, and you may be better off buying appropriate security software, as this isn’t going to stop a smart and persistent child:
-- If your kids are really intelligent, (and have access to
-- ResEdit under OS9 or any source code editor under OSX,
-- then this method of storing a password will be woefully
-- inadequate).
--
property thePassword : "Mr. Tyrrell is so cool."
-- Allow applet to quit only after school is over, (or with
-- Mr. Tyrrell's password.)
--
property schoolIsOver : 60 * 60 * 15 -- 3:00 pm, in seconds
-- This indicates how many seconds elaspse between each check
-- for an open browser. AppleScript doesn't allow fractional
-- seconds, and you have to be careful, because if it checks
-- too often, it could cause memory problems:
--
property checkEvery : 5 -- seconds
-- Internal boolean switch
--
property browserWasLaunched : false
on quit
-- Requires the computer's clock to be kept set properly,
-- (which in a school environment is no doubt difficult).
--
set theTime to time of (current date) --> seconds
if (theTime < shoolIsOver) then -- school's in session
display dialog ("Oh, trying to quit, are we?") ¬
buttons {"Password"} ¬
default button ("Password") ¬
default answer ""
set thisPassword to text returned of result
if (thisPassword = thePassword) then continue quit
display dialog ("An illegal attempt to quit this Security " & ¬
"Protocal has been logged to Mr. Tyrrell's laptop.") ¬
buttons {"VIOLATOR!!!"} default button "VIOLATOR!!!"
-- Put code here that ACTUALLY makes a log entry,
-- (I'll let someone else post a solution for this).
else
continue quit -- school's over, kids have gone home
end if
end quit
on idle
tell application "Finder"
set programNames to (name of every application process) as string
end tell
if (programNames contains "Safari") or ¬
(programNames contains "Netscape") or ¬
(programNames contains "Internet Explorer") then
set browserIsOpen to true
else
set browserIsOpen to false
end if
if (browserWasLaunched) and (not browserIsOpen) then
-- browser was closed
--
set browserWasLaunched to false
else if (not browserWasLaunched) and (browserIsOpen) then
-- browser was opened, so go scare the kiddies
--
set browserWasLaunched to true
tell me to activate -- frontmost
display dialog ("Your internet activity is being monitored " & ¬
"by Mr.Tyrrell. Do you want to continue?") ¬
buttons {"No, I'm bad.", "Yes, I'm good."} ¬
default button "Yes, I'm good."
if (button returned of result = "Yes, I'm good.") then
display dialog ("Your internet activity is being monitored " & ¬
"by Mr. Tyrrell via wireless connection to his laptop. " & ¬
"Are you sure you want to continue?") ¬
buttons {"Never mind.", "Yes, I'm sure."} ¬
default button "Yes, I'm sure."
if (button returned of result = "Yes, I'm sure.") then
display dialog ("Are you really sure? Remember that " & ¬
"EVERYTHING is being logged!") ¬
buttons {"Oh... no.", "Yeah, man, get on with it."} ¬
default button "Yeah, man, get on with it."
if (button returned of result = "Yeah, man, get on with it.") then
-- put logging code here
return checkEvery -- break out of handler here
end if
end if
end if
end if
-- Oh... last minute idea: if any of the above dialogs was "no",
-- then let's go ahead and quit the offending application.
--
--
-- Umm... under classic, I knew how to do this, but under OS X,
-- the Finder isn't allowing me to send events to any "application
-- process as <<class psn >>" What's going on here?
return checkEvery -- break out of handler here
end idle
The above is not very robust, and I created it primarily as an exercise, but let me know if seems useful. 
Note: Any application can be force-quit with command-option-escape, which any real Macintosh literate kid is going to know, sorry.