first checkin of Postnuke ATutor integration module
authorgreg gay <ggay@ocad.ca>
Mon, 25 Oct 2010 17:56:16 +0000 (17:56 -0000)
committergreg gay <ggay@ocad.ca>
Mon, 25 Oct 2010 17:56:16 +0000 (17:56 -0000)
16 files changed:
mods/pnATutor/ATutor/index_pn.php [new file with mode: 0644]
mods/pnATutor/pnadmin.php [new file with mode: 0644]
mods/pnATutor/pnblocks/courses.php [new file with mode: 0644]
mods/pnATutor/pndocs/credits.txt [new file with mode: 0644]
mods/pnATutor/pndocs/license.txt [new file with mode: 0644]
mods/pnATutor/pndocs/readme.txt [new file with mode: 0644]
mods/pnATutor/pnincludes/overlib.js [new file with mode: 0644]
mods/pnATutor/pnincludes/overlib_mini.js [new file with mode: 0644]
mods/pnATutor/pnincludes/overlib_power.gif [new file with mode: 0644]
mods/pnATutor/pninit.php [new file with mode: 0644]
mods/pnATutor/pnlang/eng/admin.php [new file with mode: 0644]
mods/pnATutor/pnlang/eng/courses.php [new file with mode: 0644]
mods/pnATutor/pntemplates/pnATutor_block_courses.htm [new file with mode: 0644]
mods/pnATutor/pntemplates/pnATutor_block_courses_modify.htm [new file with mode: 0644]
mods/pnATutor/pnuser.php [new file with mode: 0644]
mods/pnATutor/pnversion.php [new file with mode: 0644]

diff --git a/mods/pnATutor/ATutor/index_pn.php b/mods/pnATutor/ATutor/index_pn.php
new file mode 100644 (file)
index 0000000..4f4f38e
--- /dev/null
@@ -0,0 +1,100 @@
+<?php\r
+$reqVar = '_' . $_SERVER['REQUEST_METHOD'];\r
+$form_vars = $$reqVar;\r
+$parm = $form_vars['parm'] ;\r
+\r
+$url = explode("|", $parm);\r
+\r
+$f_username = $url[0];\r
+$f_usermail = $url[1];\r
+$f_users = $url[2];\r
+$db = $url[3] ;\r
+$home= $url[4] ;\r
+$home .= "user.php?op=loginscreen&module=NS-User" ;\r
+$cid = $url[5] ;\r
+$srt= $url[6] ;\r
+$version= $url[7] ;\r
+\r
+if ($f_username==""){\r
+       header ("Location : $home") ;\r
+}\r
+\r
+$_public       = true;\r
+$page   = 'PostNuke_start';\r
+$_user_location        = 'public';\r
+\r
+\r
+if ($version == '1.3.0'){\r
+       $_include_path = 'include/';\r
+       require ($_include_path.'vitals.inc.php');\r
+} else {\r
+       define('AT_INCLUDE_PATH', 'include/');\r
+       require(AT_INCLUDE_PATH.'vitals.inc.php');\r
+}\r
+\r
+$pwd = '';\r
+\r
+$sql = "SELECT password FROM ".TABLE_PREFIX."members WHERE login='$f_username' ";\r
+$result = mysql_query($sql);\r
+$num_rows = mysql_num_rows($result);\r
+\r
+\r
+if ($num_rows < 1){\r
+       if ($f_users != ''){\r
+               // Insert the new user\r
+               $new_pwd = ranpass() ;\r
+               $adding = "INSERT INTO ".TABLE_PREFIX."members (login, password,email,language,preferences) VALUES ( '$f_username','$new_pwd','$f_username', 'en',' ')";\r
+               $added = mysql_query($adding) or mysql_error();\r
+               // Run query again\r
+               $sql = "SELECT password FROM ".TABLE_PREFIX."members WHERE login='$f_username' ";\r
+               $result = mysql_query($sql);\r
+               $row99 = mysql_fetch_row($result) ;\r
+               $pwd = $row99[0];\r
+       }\r
+} else {\r
+       $row99 = mysql_fetch_row($result) ;\r
+       $pwd = $row99[0];\r
+}\r
+\r
+/* form post login */\r
+$this_login    = $f_username;\r
+$this_password  = $pwd;\r
+$auto_login            = 0;\r
+$used_cookie   = false;\r
+\r
+$sql = "SELECT member_id, login, preferences, PASSWORD(password) AS pass, language FROM ".TABLE_PREFIX."members WHERE login='$this_login' AND PASSWORD(password)=PASSWORD('$this_password')";\r
+\r
+$result = mysql_query($sql);\r
+if ($row = mysql_fetch_array($result)) {\r
+       $_SESSION['login']              = $row['login'];\r
+       $_SESSION['valid_user'] = TRUE;\r
+       $_SESSION['member_id']  = intval($row['member_id']);\r
+       assign_session_prefs(unserialize(stripslashes($row['preferences'])));\r
+       $_SESSION['is_guest']   = 0;\r
+       $_SESSION['lang']               = $row['language'];\r
+\r
+       $_POST['form_course_id'] = $url[5] ;\r
+       Header('Location: ./bounce.php?course='.$_POST['form_course_id']);\r
+       exit ;\r
+} else {\r
+       $errors[] = AT_ERROR_INVALID_LOGIN;\r
+       Header('Location: ./login.php');\r
+}\r
+Header('Location: ./login.php');\r
+exit ;\r
+\r
+\r
+function ranpass($len = "8"){\r
+ $pass = NULL;\r
+ for($i=0; $i<$len; $i++) {\r
+   $char = chr(rand(48,122));\r
+   while (!ereg("[a-zA-Z0-9]", $char)){\r
+     if($char == $lchar) continue;\r
+     $char = chr(rand(48,90));\r
+   }\r
+   $pass .= $char;\r
+   $lchar = $char;\r
+ }\r
+ return $pass;\r
+}\r
+?>
\ No newline at end of file
diff --git a/mods/pnATutor/pnadmin.php b/mods/pnATutor/pnadmin.php
new file mode 100644 (file)
index 0000000..f628988
--- /dev/null
@@ -0,0 +1,246 @@
+<?php\r
+// $Id: pnadmin.php\r
+// ----------------------------------------------------------------------\r
+// POST-NUKE Content Management System\r
+// Copyright (C) 2002 by the PostNuke Development Team.\r
+// http://www.postnuke.com/\r
+// ----------------------------------------------------------------------\r
+// Based on:\r
+// PHP-NUKE Web Portal System - http://phpnuke.org/\r
+// Thatware - http://thatware.org/\r
+// ----------------------------------------------------------------------\r
+// LICENSE\r
+//\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License (GPL)\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+//\r
+// This program is distributed in the hope that it will be useful,\r
+// but WIthOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+// GNU General Public License for more details.\r
+//\r
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html\r
+// ----------------------------------------------------------------------\r
+// Filename: 1.0\r
+// Based on : pnATutor\r
+// Postnuked by Cas Nuy\r
+// Purpose of file:  Admin functions for pnATutor\r
+// ----------------------------------------------------------------------\r
+\r
+/**\r
+ * the main administration function\r
+ */\r
+function pnATutor_admin_main()\r
+{\r
+\r
+    // Create output object\r
+    $output = new pnHTML();\r
+\r
+    // Security check\r
+    if (!pnSecAuthAction(0, 'pnATutor::', '::', ACCESS_ADMIN)) {\r
+        $output->Text(pnVarPrepHTMLDisplay(_PNATUTORNOAUTH));\r
+        return $output->GetOutput();\r
+    }\r
+\r
+    // Add menu to output\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->Text(pnATutor_adminmenu());\r
+    $output->SetInputMode(_PNH_PARSEINPUT);\r
+\r
+    // Return the output that has been generated by this function\r
+    return $output->GetOutput();\r
+}\r
+\r
+/*\r
+ * Main administration menu\r
+ */\r
+function pnATutor_adminmenu() {\r
+\r
+   $theme = pnUserGetTheme();\r
+       pnThemeLoad($theme);\r
+\r
+    // Create output object\r
+    $output = new pnHTML();\r
+\r
+    // Security check\r
+    if (!pnSecAuthAction(0, 'pnATutor::', '::', ACCESS_ADMIN)) {\r
+        $output->Text(pnVarPrepHTMLDisplay(_PNATUTORNOAUTH));\r
+        return $output->GetOutput();\r
+    }\r
+\r
+       //Title\r
+       ob_start();\r
+       OpenTable();\r
+       $oTable = ob_get_contents();\r
+       ob_end_clean();\r
+       $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+       $output->Text($oTable);\r
+       $output->Title(pnVarPrepHTMLDisplay('<b>'._PNATUTOR.'</b>'));\r
+    $output->Text(pnVarPrepHTMLDisplay(_PNATUTORMODIFYCONFIG));\r
+       ob_start();\r
+       CloseTable();\r
+       $cTable = ob_get_contents();\r
+       ob_end_clean();\r
+       $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+       $output->Text($cTable);\r
+\r
+       // Start form\r
+    $output->FormStart(pnModURL('pnATutor', 'admin', 'updateconfig'));\r
+\r
+    // Add an authorisation ID\r
+    $output->FormHidden('authid', pnSecGenAuthKey());\r
+\r
+\r
+    // Start the table that holds the information to be modified.\r
+    ob_start();\r
+       OpenTable();\r
+       $oTable = ob_get_contents();\r
+       ob_end_clean();\r
+       $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+       $output->Text($oTable);\r
+       $output->TableStart();\r
+\r
+       // pnATutor location\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_MODSUBJECT));\r
+    $row[] = $output->FormText('_loc', pnModGetVar('pnATutor', '_loc'), 50, 50);\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+       // Warning\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_MODWARNING));\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+\r
+       // ATutor DB\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_MODDB));\r
+    $row[] = $output->FormText('_db', pnModGetVar('pnATutor', '_db'), 25, 25);\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+       // ATutor DB prefix\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_PNATUTOR_PREFIX));\r
+    $row[] = $output->FormText('_prf', pnModGetVar('pnATutor', '_prf'), 15, 15);\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+       // ATutor version\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_PNATUTORVERSION));\r
+    $row[] = $output->FormText('_version', pnModGetVar('pnATutor', '_version'), 5, 5);\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+       // Open in New >Window\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_MODWINDOW));\r
+    $row[] = $output->FormCheckbox('_window', pnModGetVar('pnATutor', '_window'));\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+\r
+       // Create users\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_MODUSERS));\r
+    $row[] = $output->FormCheckbox('_users', pnModGetVar('pnATutor', '_users'));\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+\r
+       // Allow guest access\r
+    $row = array();\r
+    $output->SetOutputMode(_PNH_RETURNOUTPUT);\r
+    $row[] = $output->Text(pnVarPrepHTMLDisplay(_MODGUEST));\r
+    $row[] = $output->FormCheckbox('_guest', pnModGetVar('pnATutor', '_guest'));\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+    $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+    $output->TableAddrow($row, 'left');\r
+\r
+       $output->TableEnd();\r
+       ob_start();\r
+       CloseTable();\r
+       $cTable = ob_get_contents();\r
+       ob_end_clean();\r
+       $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+       $output->Text($cTable);\r
+\r
+       // End form\r
+    //$output->Linebreak(1);\r
+       ob_start();\r
+       OpenTable();\r
+       $oTable = ob_get_contents();\r
+       ob_end_clean();\r
+       $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+       $output->Text($oTable);\r
+       $output->Text('<div align="center"><br>');\r
+    $output->FormSubmit(pnVarPrepHTMLDisplay(_PNATUTORUPDATE));\r
+       $output->Text('<br><br></div>');\r
+       ob_start();\r
+       CloseTable();\r
+       $cTable = ob_get_contents();\r
+       ob_end_clean();\r
+       $output->SetInputMode(_PNH_VERBATIMINPUT);\r
+       $output->Text($cTable);\r
+    $output->FormEnd();\r
+\r
+       // Return the output that has been generated by this function\r
+    $output->SetOutputMode(_PNH_KEEPOUTPUT);\r
+       return $output->GetOutput();\r
+}\r
+\r
+function pnATutor_admin_updateconfig()\r
+{\r
+    // Get parameters from whatever input we need.\r
+       $_loc = pnVarCleanFromInput('_loc');\r
+       $_window = pnVarCleanFromInput('_window');\r
+       $_db = pnVarCleanFromInput('_db');\r
+       $_guest = pnVarCleanFromInput('_guest');\r
+       $_users = pnVarCleanFromInput('_users');\r
+       $_version = pnVarCleanFromInput('_version');\r
+       $_prf = pnVarCleanFromInput('_prf');\r
+\r
+\r
+    // Confirm authorisation code.\r
+    if (!pnSecConfirmAuthKey()) {\r
+        pnSessionSetVar('errormsg', _BADAUTHKEY);\r
+        pnRedirect(pnModURL('pnATutor', 'admin', ''));\r
+        return true;\r
+    }\r
+\r
+    // Update module variables.\r
+    pnModSetVar('pnATutor', '_loc', $_loc);\r
+    pnModSetVar('pnATutor', '_window', $_window);\r
+    pnModSetVar('pnATutor', '_db', $_db);\r
+    pnModSetVar('pnATutor', '_guest', $_guest);\r
+    pnModSetVar('pnATutor', '_users', $_users);\r
+    pnModSetVar('pnATutor', '_version', $_version);\r
+    pnModSetVar('pnATutor', '_prf', $_prf);\r
+\r
+    // This function generated no output, and so now it is complete we redirect\r
+    // the user to an appropriate page for them to carry on their work\r
+    pnRedirect('admin.php');\r
+\r
+    // Return\r
+    return true;\r
+}\r
+?>\r
diff --git a/mods/pnATutor/pnblocks/courses.php b/mods/pnATutor/pnblocks/courses.php
new file mode 100644 (file)
index 0000000..64a9e0b
--- /dev/null
@@ -0,0 +1,184 @@
+<?php\r
+function pnATutor_coursesblock_init()\r
+{\r
+    // Security\r
+    pnSecAddSchema('pnATutor:courses:', 'Block title::');\r
+}\r
+\r
+\r
+function pnATutor_coursesblock_info()\r
+{\r
+    return array('text_type'      => 'courses',\r
+                 'module'         => 'pnATutor',\r
+                 'text_type_long' => 'Available courses within ATutor',\r
+                 'allow_multiple' => true,\r
+                 'form_content'   => false,\r
+                 'form_refresh'   => false,\r
+                 'show_preview'   => true);\r
+}\r
+\r
+\r
+function pnATutor_coursesblock_display($blockinfo)\r
+{\r
+  if (!pnSecAuthAction(0,\r
+                         'pnATutor:courses:',\r
+                         "$blockinfo[title]::",\r
+                         ACCESS_READ)) {\r
+        return false;\r
+    }\r
+\r
+\r
+   // Get current content\r
+    $vars = pnBlockVarsFromContent($blockinfo['content']);\r
+\r
+    // Defaults\r
+    if (empty($vars['amount'])) {\r
+        $vars['amount'] = 5;\r
+    }\r
+\r
+    if (empty($vars['trim'])) {\r
+        $vars['trim'] = 30;\r
+    }\r
+    if (empty($vars['usejava'])) {\r
+        $vars['usejava'] = 'n';\r
+    }\r
+    if (empty($vars['loadjava'])) {\r
+        $vars['loadjava'] = 'n';\r
+    }\r
+    if (empty($vars['enrolled'])) {\r
+        $vars['enrolled'] = 'n';\r
+    }\r
+\r
+$amount=$vars['amount'];\r
+$trim = $vars['trim'] ;\r
+$usejava= $vars['usejava'];\r
+$loadjava = $vars['loadjava'] ;\r
+$enrolled =$vars['enrolled'] ;\r
+\r
+$db=pnModGetVar('pnATutor', '_db');\r
+$prefix=pnModGetVar('pnATutor', '_prf');\r
+$std_db = pnConfigGetVar('dbname');\r
+\r
+$pcModInfo = pnModGetInfo(pnModGetIDFromName('pnATutor'));\r
+$ModName = pnVarPrepForOS($pcModInfo['directory']);\r
+\r
+$username=pnUserGetVar(uname);\r
+\r
+$true = mysql_select_db($db) or die("cannot select database: " . mysql_error()) ;\r
+if ($enrolled == 'n'){\r
+$result = mysql_query("select course_id, title, description from $prefix".courses."  order by course_id DESC limit ".$amount." ") or die("cannot select from table: " . mysql_error());\r
+} else {\r
+       if (pnUserLoggedIn()) {\r
+               $result1 =mysql_query( "SELECT member_id FROM $prefix".members." WHERE login='$username' ");\r
+               if (mysql_num_rows($result1)< 1){\r
+                       $userid = 0;\r
+               }else {\r
+                       $row99 = mysql_fetch_row($result1) ;\r
+                       $userid = $row99[0];\r
+               }\r
+\r
+               $result = mysql_query("SELECT $prefix".courses.".course_id, title, description FROM $prefix".courses.", $prefix".course_enrollment." WHERE  $prefix".course_enrollment.".course_id = $prefix".courses.".course_id and $prefix".course_enrollment.".member_id = ".$userid." order by title limit ".$amount."  ") or die("cannot select from table: " . mysql_error());\r
+       }\r
+}\r
+$items = array();\r
+while (list($id, $title, $summary) = mysql_fetch_row($result)) {\r
+    if ($trim != 0){\r
+        if (strlen($title) > $trim) {\r
+            $title = substr($title,0,$trim);\r
+            $title .= "...";\r
+        }\r
+    }\r
+\r
+       $items[] = array('id' => $id,'title' => $title ,'summary' => $summary);\r
+\r
+}\r
+\r
+$url1="index.php?module=pnATutor&func=main";\r
+$urllink = _PNATUTORMODULE ;\r
+\r
+$true = mysql_select_db($std_db) ;\r
+\r
+// Create output object\r
+// Note that for a block the corresponding module must be passed.\r
+$pnRender =& new pnRender('pnATutor');\r
+$pnRender->assign('items', $items);\r
+$pnRender->assign('url1', $url1);\r
+$pnRender->assign('urllink', $urllink);\r
+$pnRender->assign('loadjava', $loadjava);\r
+$pnRender->assign('usejava', $usejava);\r
+$pnRender->assign('modname', $ModName);\r
+\r
+\r
+\r
+// Populate block info and pass to theme\r
+$blockinfo['content'] = $pnRender->fetch('pnATutor_block_courses.htm');\r
+themesideblock($blockinfo);\r
+}\r
+\r
+\r
+\r
+\r
+function pnATutor_coursesblock_modify($blockinfo)\r
+{\r
+\r
+    // Get current content\r
+    $vars = pnBlockVarsFromContent($blockinfo['content']);\r
+\r
+    // Defaults\r
+    if (empty($vars['amount'])) {\r
+        $vars['amount'] = 5;\r
+    }\r
+\r
+    if (empty($vars['trim'])) {\r
+        $vars['trim'] = 30;\r
+    }\r
+    if (empty($vars['usejava'])) {\r
+        $vars['usejava'] = 'n';\r
+    }\r
+    if (empty($vars['loadjava'])) {\r
+        $vars['loadjava'] = 'n';\r
+    }\r
+    if (empty($vars['enrolled'])) {\r
+        $vars['enrolled'] = 'y';\r
+    }\r
+    // Create output object\r
+       $pnRender =& new pnRender('pnATutor');\r
+\r
+       // As Admin output changes often, we do not want caching.\r
+       $pnRender->caching = false;\r
+\r
+    // assign the approriate values\r
+       $pnRender->assign('amount', $vars['amount']);\r
+       $pnRender->assign('trim', $vars['trim']);\r
+       $pnRender->assign('usejava', $vars['usejava']);\r
+       $pnRender->assign('loadjava', $vars['loadjava']);\r
+       $pnRender->assign('enrolled', $vars['enrolled']);\r
+\r
+    // Return the output that has been generated by this function\r
+       return $pnRender->fetch('pnATutor_block_courses_modify.htm');\r
+}\r
+\r
+function pnATutor_coursesblock_update($blockinfo)\r
+{\r
+   // Get current content\r
+    $vars = pnBlockVarsFromContent($blockinfo['content']);\r
+\r
+       // alter the corresponding variable\r
+    $vars['amount'] = pnVarCleanFromInput('amount');\r
+    $vars['trim'] = pnVarCleanFromInput('trim');\r
+    $vars['usejava'] = pnVarCleanFromInput('usejava');\r
+    $vars['loadjava'] = pnVarCleanFromInput('loadjava');\r
+    $vars['enrolled'] = pnVarCleanFromInput('enrolled');\r
+\r
+       // write back the new contents\r
+    $blockinfo['content'] = pnBlockVarsToContent($vars);\r
+\r
+       // clear the block cache\r
+       $pnRender =& new pnRender('pnATutor');\r
+       $pnRender->clear_cache('pnATutor_block_courses.htm');\r
+\r
+    return $blockinfo;\r
+\r
+}\r
+\r
+?>\r
diff --git a/mods/pnATutor/pndocs/credits.txt b/mods/pnATutor/pndocs/credits.txt
new file mode 100644 (file)
index 0000000..0fdd765
--- /dev/null
@@ -0,0 +1,10 @@
+/************************************************************************/\r
+/* pnATutor            (/pndoc/credits.txt)                             */\r
+/************************************************************************/\r
+pnATutor 1.4 for PN 0.72x\r
+(with full props to the ones below)\r
+Cas@nuy.info / www.nuy.info\r
+\r
+Feature for removing Scrollbars based upon idea of Carlos Pelaez\r
+http://www.solidealia.net\r
+/*****************************************************************\r
diff --git a/mods/pnATutor/pndocs/license.txt b/mods/pnATutor/pndocs/license.txt
new file mode 100644 (file)
index 0000000..4dfd6b7
--- /dev/null
@@ -0,0 +1,346 @@
+/************************************************************************/
+/* pnATutor                   (/docs/license.txt)                       */
+/************************************************************************/
+                                                                     
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+       Appendix: How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+                         
+                                                                      
+To read the license please visit http://www.gnu.org/copyleft/gpl.html\r
diff --git a/mods/pnATutor/pndocs/readme.txt b/mods/pnATutor/pndocs/readme.txt
new file mode 100644 (file)
index 0000000..cef251e
--- /dev/null
@@ -0,0 +1,21 @@
+/************************************************************************/\r
+/* pnATutor       (/pndocs/readme.txt)                                */\r
+/************************************************************************/\r
+\r
+The pnATutor hack for Postnuke is very simple and requires no tables in the DB.\r
+\r
+Tested with :\r
+Postnuke 0.760\r
+ATutor 1.4/1.5\r
+Linux/Windows\r
+\r
+Location of the ATutor installation is not important.\r
+\r
+\r
+INSTALLATION\r
+======================\r
+0.  Install ATutor stand alone and verify it is working correct.\r
+1.  Unzip the contents to your /modules directory.\r
+2.  Copy ATutor\*.* to the root of your ATutor directory\r
+3.  Initialise & activate the module\r
+4.  Link the module into a menu block as : {pnATutor}\r
diff --git a/mods/pnATutor/pnincludes/overlib.js b/mods/pnATutor/pnincludes/overlib.js
new file mode 100644 (file)
index 0000000..330e8b4
--- /dev/null
@@ -0,0 +1,1315 @@
+//\/////\r
+//\  overLIB 4.00 - You may not remove or change this notice.\r
+//\  Copyright Erik Bosrup 1998-2004. All rights reserved.\r
+//\\r
+//\  Contributors are listed on the homepage.\r
+//\  This file might be old, always check for the latest version at:\r
+//\  http://www.bosrup.com/web/overlib/\r
+//\\r
+//\  Please read the license agreement (available through the link above)\r
+//\  before using overLIB. Direct any licensing questions to erik@bosrup.com.\r
+//\\r
+//\  Do not sell this as your own work or remove this copyright notice. \r
+//\  For full details on copying or changing this script please read the\r
+//\  license agreement at the link above. Please give credit on sites that\r
+//\  use overLIB and submit changes of the script so other people can use\r
+//\  them as well.\r
+//   $Revision: 1.68.2.1 $                $Date: 2004/03/23 16:29:38 $\r
+//\/////\r
+//\mini\r
+\r
+////////\r
+// PRE-INIT\r
+// Ignore these lines, configuration is below.\r
+////////\r
+var olLoaded = 0;var pmStart = 10000000; var pmUpper = 10001000; var pmCount = pmStart+1;  var pms = new Array(); var olInfo = new Info('4.00', 1);\r
+var FREPLACE = 0; var FBEFORE = 1; var FAFTER = 2; var FALTERNATE = 3;\r
+var olHideForm=0;  // parameter for hiding SELECT and ActiveX elements in IE5.5+ \r
+registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');\r
+\r
+////////\r
+// DEFAULT CONFIGURATION\r
+// Settings you want everywhere are set here. All of this can also be\r
+// changed on your html page or through an overLIB call.\r
+////////\r
+if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#CCCCFF";\r
+if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#333399";\r
+if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000";\r
+if (typeof ol_capcolor=='undefined') var ol_capcolor="#FFFFFF";\r
+if (typeof ol_closecolor=='undefined') var ol_closecolor="#9999FF";\r
+if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica";\r
+if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica";\r
+if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica";\r
+if (typeof ol_textsize=='undefined') var ol_textsize="1";\r
+if (typeof ol_captionsize=='undefined') var ol_captionsize="1";\r
+if (typeof ol_closesize=='undefined') var ol_closesize="1";\r
+if (typeof ol_width=='undefined') var ol_width="200";\r
+if (typeof ol_border=='undefined') var ol_border="1";\r
+if (typeof ol_cellpad=='undefined') var ol_cellpad=2;\r
+if (typeof ol_offsetx=='undefined') var ol_offsetx=10;\r
+if (typeof ol_offsety=='undefined') var ol_offsety=10;\r
+if (typeof ol_text=='undefined') var ol_text="Default Text";\r
+if (typeof ol_cap=='undefined') var ol_cap="";\r
+if (typeof ol_sticky=='undefined') var ol_sticky=0;\r
+if (typeof ol_background=='undefined') var ol_background="";\r
+if (typeof ol_close=='undefined') var ol_close="Close";\r
+if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT;\r
+if (typeof ol_status=='undefined') var ol_status="";\r
+if (typeof ol_autostatus=='undefined') var ol_autostatus=0;\r
+if (typeof ol_height=='undefined') var ol_height=-1;\r
+if (typeof ol_snapx=='undefined') var ol_snapx=0;\r
+if (typeof ol_snapy=='undefined') var ol_snapy=0;\r
+if (typeof ol_fixx=='undefined') var ol_fixx=-1;\r
+if (typeof ol_fixy=='undefined') var ol_fixy=-1;\r
+if (typeof ol_relx=='undefined') var ol_relx=null;\r
+if (typeof ol_rely=='undefined') var ol_rely=null;\r
+if (typeof ol_fgbackground=='undefined') var ol_fgbackground="";\r
+if (typeof ol_bgbackground=='undefined') var ol_bgbackground="";\r
+if (typeof ol_padxl=='undefined') var ol_padxl=1;\r
+if (typeof ol_padxr=='undefined') var ol_padxr=1;\r
+if (typeof ol_padyt=='undefined') var ol_padyt=1;\r
+if (typeof ol_padyb=='undefined') var ol_padyb=1;\r
+if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0;\r
+if (typeof ol_vpos=='undefined') var ol_vpos=BELOW;\r
+if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0;\r
+if (typeof ol_capicon=='undefined') var ol_capicon="";\r
+if (typeof ol_frame=='undefined') var ol_frame=self;\r
+if (typeof ol_timeout=='undefined') var ol_timeout=0;\r
+if (typeof ol_function=='undefined') var ol_function=null;\r
+if (typeof ol_delay=='undefined') var ol_delay=0;\r
+if (typeof ol_hauto=='undefined') var ol_hauto=0;\r
+if (typeof ol_vauto=='undefined') var ol_vauto=0;\r
+if (typeof ol_closeclick=='undefined') var ol_closeclick=0;\r
+if (typeof ol_wrap=='undefined') var ol_wrap=0;\r
+if (typeof ol_followmouse=='undefined') var ol_followmouse=1;\r
+if (typeof ol_mouseoff=='undefined') var ol_mouseoff=0;\r
+if (typeof ol_closetitle=='undefined') var ol_closetitle='Close';\r
+if (typeof ol_css=='undefined') var ol_css=CSSOFF;\r
+if (typeof ol_fgclass=='undefined') var ol_fgclass="";\r
+if (typeof ol_bgclass=='undefined') var ol_bgclass="";\r
+if (typeof ol_textfontclass=='undefined') var ol_textfontclass="";\r
+if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass="";\r
+if (typeof ol_closefontclass=='undefined') var ol_closefontclass="";\r
+\r
+////////\r
+// ARRAY CONFIGURATION\r
+////////\r
+\r
+// You can use these arrays to store popup text here instead of in the html.\r
+if (typeof ol_texts=='undefined') var ol_texts = new Array("Text 0", "Text 1");\r
+if (typeof ol_caps=='undefined') var ol_caps = new Array("Caption 0", "Caption 1");\r
+\r
+////////\r
+// END OF CONFIGURATION\r
+// Don't change anything below this line, all configuration is above.\r
+////////\r
+\r
+\r
+\r
+\r
+\r
+////////\r
+// INIT\r
+////////\r
+// Runtime variables init. Don't change for config!\r
+var o3_text="";\r
+var o3_cap="";\r
+var o3_sticky=0;\r
+var o3_background="";\r
+var o3_close="Close";\r
+var o3_hpos=RIGHT;\r
+var o3_offsetx=2;\r
+var o3_offsety=2;\r
+var o3_fgcolor="";\r
+var o3_bgcolor="";\r
+var o3_textcolor="";\r
+var o3_capcolor="";\r
+var o3_closecolor="";\r
+var o3_width=100;\r
+var o3_border=1;\r
+var o3_cellpad=2;\r
+var o3_status="";\r
+var o3_autostatus=0;\r
+var o3_height=-1;\r
+var o3_snapx=0;\r
+var o3_snapy=0;\r
+var o3_fixx=-1;\r
+var o3_fixy=-1;\r
+var o3_relx=null;\r
+var o3_rely=null;\r
+var o3_fgbackground="";\r
+var o3_bgbackground="";\r
+var o3_padxl=0;\r
+var o3_padxr=0;\r
+var o3_padyt=0;\r
+var o3_padyb=0;\r
+var o3_fullhtml=0;\r
+var o3_vpos=BELOW;\r
+var o3_aboveheight=0;\r
+var o3_capicon="";\r
+var o3_textfont="Verdana,Arial,Helvetica";\r
+var o3_captionfont="Verdana,Arial,Helvetica";\r
+var o3_closefont="Verdana,Arial,Helvetica";\r
+var o3_textsize="1";\r
+var o3_captionsize="1";\r
+var o3_closesize="1";\r
+var o3_frame=self;\r
+var o3_timeout=0;\r
+var o3_timerid=0;\r
+var o3_allowmove=0;\r
+var o3_function=null; \r
+var o3_delay=0;\r
+var o3_delayid=0;\r
+var o3_hauto=0;\r
+var o3_vauto=0;\r
+var o3_closeclick=0;\r
+var o3_wrap=0;\r
+var o3_followmouse=1;\r
+var o3_mouseoff=0;\r
+var o3_closetitle='';\r
+var o3_css=CSSOFF;\r
+var o3_fgclass="";\r
+var o3_bgclass="";\r
+var o3_textfontclass="";\r
+var o3_captionfontclass="";\r
+var o3_closefontclass="";\r
+\r
+// Display state variables\r
+var o3_x = 0;\r
+var o3_y = 0;\r
+var o3_showingsticky = 0;\r
+var o3_removecounter = 0;\r
+\r
+// Our layer\r
+var over = null;\r
+var fnRef, hoveringSwitch = false;\r
+\r
+// Decide browser version\r
+var isMac = (navigator.userAgent.indexOf("Mac") != -1);\r
+var olOp = (navigator.userAgent.toLowerCase().indexOf('opera 7.') > -1);\r
+var olNs4 = (navigator.appName=='Netscape' && parseInt(navigator.appVersion) == 4);\r
+var olNs6 = (document.getElementById) ? true : false;\r
+var olIe4 = (document.all) ? true : false;\r
+var olIe5 = false; \r
+var olIe55 = false; // Added additional variable to identify IE5.5+\r
+var docRoot = 'document.body';\r
+\r
+// Resize fix for NS4.x to keep track of layer\r
+if (olNs4) {\r
+       var oW = window.innerWidth;\r
+       var oH = window.innerHeight;\r
+       window.onresize = function() { if (oW != window.innerWidth || oH != window.innerHeight) location.reload(); }\r
+}\r
+\r
+// Microsoft Stupidity Check(tm).\r
+if (olIe4) {\r
+       var versNum=parseFloat(navigator.userAgent.match(/MSIE (\d\.\d+)\.*/i)[1]);\r
+       if (versNum >= 5){\r
+               olIe5=true;\r
+               olIe55=(versNum>=5.5&&!olOp) ? true : false;\r
+               if (olNs6) olNs6=false;\r
+       }\r
+       if (olNs6) olIe4 = false;\r
+}\r
+\r
+// Check for compatability mode.\r
+if (document.compatMode && document.compatMode == 'CSS1Compat') {\r
+       docRoot= ((olIe4 && !olOp) ? 'document.documentElement' : docRoot);\r
+}\r
+\r
+// Add window onload handlers to indicate when all modules have been loaded\r
+// For Netscape 6+ and Mozilla, uses addEventListener method on the window object\r
+// For IE it uses the attachEvent method of the window object and for Netscape 4.x\r
+// it sets the window.onload handler to the OLonload_handler function\r
+if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,true);\r
+else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler);\r
+else window.onload=OLonLoad_handler;\r
+\r
+// Capture events, alt. diffuses the overlib function.\r
+var olCheckMouseCapture = true;\r
+if ((olNs4 || olNs6 || olIe4)) {\r
+       olMouseCapture();\r
+} else {\r
+       overlib = no_overlib;\r
+       nd = no_overlib;\r
+       ver3fix = true;\r
+}\r
+\r
+\r
+////////\r
+// PUBLIC FUNCTIONS\r
+////////\r
+\r
+// overlib(arg0,...,argN)\r
+// Loads parameters into global runtime variables.\r
+function overlib() {\r
+       if (!olLoaded || isExclusive(overlib.arguments)) return true;\r
+       if (olCheckMouseCapture) olMouseCapture();\r
+       if (over) cClick();\r
+\r
+       // Load defaults to runtime.\r
+       o3_text=ol_text;\r
+       o3_cap=ol_cap;\r
+       o3_sticky=ol_sticky;\r
+       o3_background=ol_background;\r
+       o3_close=ol_close;\r
+       o3_hpos=ol_hpos;\r
+       o3_offsetx=ol_offsetx;\r
+       o3_offsety=ol_offsety;\r
+       o3_fgcolor=ol_fgcolor;\r
+       o3_bgcolor=ol_bgcolor;\r
+       o3_textcolor=ol_textcolor;\r
+       o3_capcolor=ol_capcolor;\r
+       o3_closecolor=ol_closecolor;\r
+       o3_width=ol_width;\r
+       o3_border=ol_border;\r
+       o3_cellpad=ol_cellpad;\r
+       o3_status=ol_status;\r
+       o3_autostatus=ol_autostatus;\r
+       o3_height=ol_height;\r
+       o3_snapx=ol_snapx;\r
+       o3_snapy=ol_snapy;\r
+       o3_fixx=ol_fixx;\r
+       o3_fixy=ol_fixy;\r
+       o3_relx=ol_relx;\r
+       o3_rely=ol_rely;\r
+       o3_fgbackground=ol_fgbackground;\r
+       o3_bgbackground=ol_bgbackground;\r
+       o3_padxl=ol_padxl;\r
+       o3_padxr=ol_padxr;\r
+       o3_padyt=ol_padyt;\r
+       o3_padyb=ol_padyb;\r
+       o3_fullhtml=ol_fullhtml;\r
+       o3_vpos=ol_vpos;\r
+       o3_aboveheight=ol_aboveheight;\r
+       o3_capicon=ol_capicon;\r
+       o3_textfont=ol_textfont;\r
+       o3_captionfont=ol_captionfont;\r
+       o3_closefont=ol_closefont;\r
+       o3_textsize=ol_textsize;\r
+       o3_captionsize=ol_captionsize;\r
+       o3_closesize=ol_closesize;\r
+       o3_timeout=ol_timeout;\r
+       o3_function=ol_function;\r
+       o3_delay=ol_delay;\r
+       o3_hauto=ol_hauto;\r
+       o3_vauto=ol_vauto;\r
+       o3_closeclick=ol_closeclick;\r
+       o3_wrap=ol_wrap;        \r
+       o3_followmouse=ol_followmouse;\r
+       o3_mouseoff=ol_mouseoff;\r
+       o3_closetitle=ol_closetitle;\r
+       o3_css=ol_css;\r
+       o3_fgclass=ol_fgclass;\r
+       o3_bgclass=ol_bgclass;\r
+       o3_textfontclass=ol_textfontclass;\r
+       o3_captionfontclass=ol_captionfontclass;\r
+       o3_closefontclass=ol_closefontclass;\r
+       \r
+       setRunTimeVariables();\r
+       \r
+       fnRef = '';\r
+       \r
+       // Special for frame support, over must be reset...\r
+       o3_frame = ol_frame;\r
+       \r
+       if (olNs4) {\r
+               over = o3_frame.document.layers['overDiv'];\r
+       } else if (document.all) {\r
+               over = o3_frame.document.all['overDiv'];\r
+       } else if (document.getElementById) {\r
+               over = o3_frame.document.getElementById("overDiv");\r
+       }\r
+\r
+       parseTokens('o3_', overlib.arguments);\r
+       if (!postParseChecks()) return false;\r
+\r
+       if (o3_delay == 0) {\r
+               return runHook("olMain", FREPLACE);\r
+       } else {\r
+               o3_delayid = setTimeout("runHook('olMain', FREPLACE)", o3_delay);\r
+               return false;\r
+       }\r
+}\r
+\r
+// Clears popups if appropriate\r
+function nd(time) {\r
+       if (olLoaded && !isExclusive()) {\r
+               if (time && !o3_delay) {\r
+                       if (o3_timerid > 0) clearTimeout(o3_timerid);\r
+                       \r
+                       o3_timerid = setTimeout("cClick()",(o3_timeout = time));\r
+               }\r
+               if (o3_removecounter >= 1) { o3_showingsticky = 0 };\r
+               \r
+               if (o3_showingsticky == 0) {\r
+                       o3_allowmove = 0;\r
+                       if (over != null && o3_timerid == 0) runHook("hideObject", FREPLACE, over);\r
+               } else {\r
+                       o3_removecounter++;\r
+               }\r
+       }\r
+       \r
+       return true;\r
+}\r
+\r
+// The Close onMouseOver function for stickies\r
+function cClick() {\r
+       if (olLoaded) {\r
+               runHook("hideObject", FREPLACE, over);\r
+               o3_showingsticky = 0;   \r
+       }       \r
+       return false;\r
+}\r
+\r
+// Method for setting page specific defaults.\r
+function overlib_pagedefaults() {\r
+       parseTokens('ol_', overlib_pagedefaults.arguments);\r
+}\r
+\r
+\r
+////////\r
+// OVERLIB MAIN FUNCTION\r
+////////\r
+\r
+// This function decides what it is we want to display and how we want it done.\r
+function olMain() {\r
+       var layerhtml, styleType;\r
+       runHook("olMain", FBEFORE);\r
+       \r
+       if (o3_background!="" || o3_fullhtml) {\r
+               // Use background instead of box.\r
+               layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);\r
+       } else {\r
+               // They want a popup box.\r
+               styleType = (pms[o3_css-1-pmStart] == "cssoff" || pms[o3_css-1-pmStart] == "cssclass");\r
+\r
+               // Prepare popup background\r
+               if (o3_fgbackground != "") o3_fgbackground = "background=\""+o3_fgbackground+"\"";\r
+               if (o3_bgbackground != "") o3_bgbackground = (styleType ? "background=\""+o3_bgbackground+"\"" : o3_bgbackground);\r
+\r
+               // Prepare popup colors\r
+               if (o3_fgcolor != "") o3_fgcolor = (styleType ? "bgcolor=\""+o3_fgcolor+"\"" : o3_fgcolor);\r
+               if (o3_bgcolor != "") o3_bgcolor = (styleType ? "bgcolor=\""+o3_bgcolor+"\"" : o3_bgcolor);\r
+\r
+               // Prepare popup height\r
+               if (o3_height > 0) o3_height = (styleType ? "height=\""+o3_height+"\"" : o3_height);\r
+               else o3_height = "";\r
+\r
+               // Decide which kinda box.\r
+               if (o3_cap=="") {\r
+                       // Plain\r
+                       layerhtml = runHook('ol_content_simple', FALTERNATE, o3_css, o3_text);\r
+               } else {\r
+                       // With caption\r
+                       if (o3_sticky) {\r
+                               // Show close text\r
+                               layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close);\r
+                       } else {\r
+                               // No close text\r
+                               layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, "");\r
+                       }\r
+               }\r
+       }       \r
+\r
+       // We want it to stick!\r
+       if (o3_sticky) {\r
+               if (o3_timerid > 0) {\r
+                       clearTimeout(o3_timerid);\r
+                       o3_timerid = 0;\r
+               }\r
+               o3_showingsticky = 1;\r
+               o3_removecounter = 0;\r
+       }\r
+\r
+       // Created a separate routine to generate the popup to make it easier\r
+       // to implement a plugin capability\r
+       if (!runHook("createPopup", FREPLACE, layerhtml)) return false;\r
+\r
+       // Prepare status bar\r
+       if (o3_autostatus > 0) {\r
+               o3_status = o3_text;\r
+               if (o3_autostatus > 1) o3_status = o3_cap;\r
+       }\r
+\r
+       // When placing the layer the first time, even stickies may be moved.\r
+       o3_allowmove = 0;\r
+\r
+       // Initiate a timer for timeout\r
+       if (o3_timeout > 0) {          \r
+               if (o3_timerid > 0) clearTimeout(o3_timerid);\r
+               o3_timerid = setTimeout("cClick()", o3_timeout);\r
+       }\r
+\r
+       // Show layer\r
+       runHook("disp", FREPLACE, o3_status);\r
+       runHook("olMain", FAFTER);\r
+\r
+       if (o3_status != '') {\r
+               return true;\r
+       } else {\r
+               return;\r
+       }\r
+}\r
+\r
+////////\r
+// LAYER GENERATION FUNCTIONS\r
+////////\r
+// These functions just handle popup content with tags that should adhere to the W3C standards specification.\r
+\r
+// Makes simple table without caption\r
+function ol_content_simple(text) {\r
+       txt='<table width="'+o3_width+ '" border="0" cellpadding="'+o3_border+'" cellspacing="0" '+(o3_bgclass ? 'class="'+o3_bgclass+'"' : o3_bgcolor+' '+o3_height)+'><tr><td><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" '+(o3_fgclass ? 'class="'+o3_fgclass+'"' : o3_fgcolor+' '+o3_fgbackground+' '+o3_height)+'><tr><td valign="TOP"'+(o3_textfontclass ? ' class="'+o3_textfontclass+'">' : '>')+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'</td></tr></table></td></tr></table>';\r
+\r
+       set_background("");\r
+       return txt;\r
+}\r
+\r
+// Makes table with caption and optional close link\r
+function ol_content_caption(text,title,close) {\r
+       var nameId;\r
+       closing="";\r
+       closeevent="onmouseover";\r
+       if (o3_closeclick==1) closeevent= (o3_closetitle ? "title='" + o3_closetitle +"'" : "") + " onclick";\r
+       if (o3_capicon!="") {\r
+               nameId=' hspace=\"5\"'+' align=\"middle\" alt=\"\"';\r
+               if (typeof o3_dragimg!='undefined'&&o3_dragimg) nameId=' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';\r
+               o3_capicon='<img src=\"'+o3_capicon+'\"'+nameId+' />';\r
+       }\r
+\r
+       if (close != "") closing='<td '+(o3_closefontclass ? 'class="'+o3_closefontclass : 'align="RIGHT')+'"><a href="javascript:return '+fnRef+'cClick();" '+closeevent+'="return '+fnRef+'cClick();">'+(o3_closefontclass ? '' : wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass ? '' : wrapStr(1,o3_closesize,'close'))+'</a></td>';\r
+       txt='<table width="'+o3_width+ '" border="0" cellpadding="'+o3_border+'" cellspacing="0" '+(o3_bgclass ? 'class="'+o3_bgclass+'"' : o3_bgcolor+' '+o3_bgbackground+' '+o3_height)+'><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td'+(o3_captionfontclass ? ' class="'+o3_captionfontclass+'">' : '>')+(o3_captionfontclass ? '' : '<b>'+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass ? '' : wrapStr(1,o3_captionsize)+'</b>')+'</td>'+closing+'</tr></table><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" '+(o3_fgclass ? 'class="'+o3_fgclass+'"' : o3_fgcolor+' '+o3_fgbackground+' '+o3_height)+'><tr><td valign="TOP"'+(o3_textfontclass ? ' class="'+o3_textfontclass+'">' :'>')+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize)) + '</td></tr></table></td></tr></table>';\r
+\r
+       set_background("");\r
+       return txt;\r
+}\r
+\r
+// Sets the background picture,padding and lots more. :)\r
+function ol_content_background(text,picture,hasfullhtml) {\r
+       if (hasfullhtml) {\r
+               txt=text;\r
+       } else {\r
+               txt='<table width="'+o3_width+'" border="0" cellpadding="0" cellspacing="0" height="'+o3_height+'"><tr><td colspan="3" height="'+o3_padyt+'"></td></tr><tr><td width="'+o3_padxl+'"></td><td valign="TOP" width="'+(o3_width-o3_padxl-o3_padxr)+'">'+wrapStr(0,o3_textsize,'text')+text+wrapStr(1,o3_textsize)+'</td><td width="'+o3_padxr+'"></td></tr><tr><td colspan="3" height="'+o3_padyb+'"></td></tr></table>';\r
+       }\r
+\r
+       set_background(picture);\r
+       return txt;\r
+}\r
+\r
+// Loads a picture into the div.\r
+function set_background(pic) {\r
+       if (pic == "") {\r
+               if (olNs4) {\r
+                       over.background.src = null; \r
+               } else if (over.style) {\r
+                       over.style.backgroundImage = "none";\r
+               }\r
+       } else {\r
+               if (olNs4) {\r
+                       over.background.src = pic;\r
+               } else if (over.style) {\r
+                       over.style.backgroundImage = "url("+pic+")";\r
+               }\r
+       }\r
+}\r
+\r
+////////\r
+// HANDLING FUNCTIONS\r
+////////\r
+\r
+// Displays the popup\r
+function disp(statustext) {\r
+       runHook("disp", FBEFORE);\r
+       \r
+       if (o3_allowmove == 0) {\r
+               runHook("placeLayer", FREPLACE);\r
+               runHook("showObject", FREPLACE, over);\r
+               o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1;\r
+       }\r
+       \r
+       runHook("disp", FAFTER);\r
+\r
+       if (statustext != "") self.status = statustext;\r
+}\r
+\r
+// Creates the actual popup structure\r
+function createPopup(lyrContent){\r
+       runHook("createPopup", FBEFORE);\r
+       \r
+       if (o3_wrap && !(olNs4 || olOp)) {\r
+               if (olIe4) {\r
+                       over.style.pixelWidth = 0;\r
+               } else if (olNs6) {\r
+                       repositionTo(over, 0, -over.offsetHeight);\r
+               }\r
+       }\r
+\r
+       layerWrite(lyrContent);\r
+       \r
+       // Have to set o3_width for placeLayer() routine if o3_wrap is turned on\r
+       if (o3_wrap) o3_width=(olNs4 ? over.clip.width : over.offsetWidth);\r
+       \r
+       runHook("createPopup", FAFTER, lyrContent);\r
+\r
+       return true;\r
+}\r
+\r
+// Decides where we want the popup.\r
+function placeLayer() {\r
+       var placeX, placeY, widthFix = 0;\r
+       \r
+       // HORIZONTAL PLACEMENT\r
+       if (eval('o3_frame.'+docRoot) && eval("typeof o3_frame."+docRoot+".clientWidth=='number'") && eval('o3_frame.'+docRoot+'.clientWidth')) {\r
+               iwidth = eval('o3_frame.'+docRoot+'.clientWidth');\r
+       } else if (typeof(o3_frame.innerWidth) == 'number') {\r
+               widthFix = Math.ceil(1.2*(o3_frame.outerWidth - o3_frame.innerWidth));\r
+               iwidth = o3_frame.innerWidth;\r
+       }\r
+\r
+       // Horizontal scroll offset\r
+       winoffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset;\r
+       var parsedWidth = parseInt(o3_width);\r
+\r
+       if (o3_fixx > -1 || o3_relx != null) {\r
+               // Fixed position\r
+               placeX=(o3_relx != null ? ( o3_relx < 0 ? winoffset +o3_relx+ iwidth - parsedWidth - widthFix : winoffset+o3_relx) : o3_fixx);\r
+       } else {  \r
+               // If HAUTO, decide what to use.\r
+               if (o3_hauto == 1) {\r
+                       if ((o3_x - winoffset) > (iwidth / 2)) {\r
+                               o3_hpos = LEFT;\r
+                       } else {\r
+                               o3_hpos = RIGHT;\r
+                       }\r
+               }               \r
+\r
+               // From mouse\r
+               if (o3_hpos == CENTER) { // Center\r
+                       placeX = o3_x+o3_offsetx-(parsedWidth/2);\r
+\r
+                       if (placeX < winoffset) placeX = winoffset;\r
+               }\r
+\r
+               if (o3_hpos == RIGHT) { // Right\r
+                       placeX = o3_x+o3_offsetx;\r
+\r
+                       if ((placeX+parsedWidth) > (winoffset+iwidth - widthFix)) {\r
+                               placeX = iwidth+winoffset - parsedWidth - widthFix;\r
+                               if (placeX < 0) placeX = 0;\r
+                       }\r
+               }\r
+               if (o3_hpos == LEFT) { // Left\r
+                       placeX = o3_x-o3_offsetx-parsedWidth;\r
+                       if (placeX < winoffset) placeX = winoffset;\r
+               }       \r
+\r
+               // Snapping!\r
+               if (o3_snapx > 1) {\r
+                       var snapping = placeX % o3_snapx;\r
+\r
+                       if (o3_hpos == LEFT) {\r
+                               placeX = placeX - (o3_snapx+snapping);\r
+                       } else {\r
+                               // CENTER and RIGHT\r
+                               placeX = placeX+(o3_snapx - snapping);\r
+                       }\r
+\r
+                       if (placeX < winoffset) placeX = winoffset;\r
+               }\r
+       }       \r
+\r
+       // VERTICAL PLACEMENT\r
+       if (eval('o3_frame.'+docRoot) && eval("typeof o3_frame."+docRoot+".clientHeight=='number'") && eval('o3_frame.'+docRoot+'.clientHeight')) {\r
+               iheight = eval('o3_frame.'+docRoot+'.clientHeight');\r
+       } else if (typeof(o3_frame.innerHeight)=='number') {\r
+               iheight = o3_frame.innerHeight;\r
+       }\r
+\r
+       // Vertical scroll offset\r
+       scrolloffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset;\r
+       var parsedHeight=(o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight));\r
+\r
+       if (o3_fixy > -1 || o3_rely != null) {\r
+               // Fixed position\r
+               placeY=(o3_rely != null ? (o3_rely < 0 ? scrolloffset+o3_rely+iheight - parsedHeight : scrolloffset+o3_rely) : o3_fixy);\r
+       } else {\r
+               // If VAUTO, decide what to use.\r
+               if (o3_vauto == 1) {  \r
+                       if ((o3_y - scrolloffset) > (iheight/2)) {\r
+                               o3_vpos = ABOVE;\r
+                       } else {\r
+                               o3_vpos = BELOW;\r
+                       }\r
+               }\r
+\r
+               // From mouse\r
+               if (o3_vpos == ABOVE) {\r
+                       if (o3_aboveheight == 0) o3_aboveheight = parsedHeight; \r
+\r
+                       placeY = o3_y - (o3_aboveheight+o3_offsety);\r
+                       if (placeY < scrolloffset) placeY = scrolloffset;\r
+               } else {\r
+                       // BELOW\r
+                       placeY = o3_y+o3_offsety;\r
+               } \r
+\r
+               // Snapping!\r
+               if (o3_snapy > 1) {\r
+                       var snapping = placeY % o3_snapy;                       \r
+\r
+                       if (o3_aboveheight > 0 && o3_vpos == ABOVE) {\r
+                               placeY = placeY - (o3_snapy+snapping);\r
+                       } else {\r
+                               placeY = placeY+(o3_snapy - snapping);\r
+                       }                       \r
+\r
+                       if (placeY < scrolloffset) placeY = scrolloffset;\r
+               }\r
+       }\r
+\r
+       // Actually move the object.\r
+       repositionTo(over, placeX, placeY);\r
+}\r
+\r
+// Moves the layer\r
+function olMouseMove(e) {\r
+       var e = (e) ? e : event;\r
+\r
+       if (e.pageX) {\r
+               o3_x = e.pageX;\r
+               o3_y = e.pageY;\r
+       } else if (e.clientX) {\r
+               o3_x = eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft');\r
+               o3_y = eval('e.clientY+o3_frame.'+docRoot+'.scrollTop');\r
+       }\r
+       \r
+       if (o3_allowmove == 1) runHook("placeLayer", FREPLACE);\r
+\r
+       // MouseOut handler\r
+       if (hoveringSwitch && !olNs4 && runHook("cursorOff", FREPLACE)) {\r
+               cClick();\r
+               hoveringSwitch = !hoveringSwitch;\r
+       }\r
+}\r
+\r
+// Fake function for 3.0 users.\r
+function no_overlib() { return ver3fix; }\r
+\r
+// Capture the mouse and chain other scripts.\r
+function olMouseCapture() {\r
+       capExtent = document;\r
+       var fN, mseHandler = olMouseMove;\r
+       var re = /function[ ]+(\w+)\(/;\r
+       \r
+       if (document.onmousemove || (!olIe4 && window.onmousemove)) {\r
+               if (window.onmousemove) capExtent = window;\r
+               fN = capExtent.onmousemove.toString().match(re);\r
+\r
+               if (fN[1] == 'anonymous' || fN[1] == 'olMouseMove') {\r
+                       olCheckMouseCapture = false;\r
+                       return;\r
+               }\r
+               var str = fN[1]+'(e); ' + 'olMouseMove(e); ';\r
+               mseHandler = new Function('e', str);\r
+       }\r
+\r
+       capExtent.onmousemove = mseHandler;\r
+       if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE);\r
+}\r
+\r
+\r
+////////\r
+// PARSING FUNCTIONS\r
+////////\r
+\r
+// Does the actual command parsing.\r
+function parseTokens(pf, ar) {\r
+       // What the next argument is expected to be.\r
+       var v, mode=-1, par = (pf != 'ol_');    \r
+       var fnMark = (par && !ar.length ? 1 : 0);\r
+\r
+       for (i = 0; i < ar.length; i++) {\r
+               if (mode < 0) {\r
+                       // Arg is maintext,unless its a number between pmStart and pmUpper\r
+                       // then its a command.\r
+                       if (typeof ar[i] == 'number' && ar[i] > pmStart && ar[i] < pmUpper) {\r
+                               fnMark = (par ? 1 : 0);\r
+                               i--;   // backup one so that the next block can parse it\r
+                       } else {\r
+                               switch(pf) {\r
+                                       case 'ol_':\r
+                                               ol_text = ar[i].toString();\r
+                                               break;\r
+                                       default:\r
+                                               o3_text=ar[i].toString();  \r
+                               }\r
+                       }\r
+                       mode = 0;\r
+               } else {\r
+                       // Note: NS4 doesn't like switch cases with vars.\r
+                       if (ar[i] >= pmCount || ar[i]==DONOTHING) { continue; }\r
+                       if (ar[i]==INARRAY) { fnMark = 0; eval(pf+'text=ol_texts['+ar[++i]+'].toString()'); continue; }\r
+                       if (ar[i]==CAPARRAY) { eval(pf+'cap=ol_caps['+ar[++i]+'].toString()'); continue; }\r
+                       if (ar[i]==STICKY) { if (pf!='ol_') eval(pf+'sticky=1'); continue; }\r
+                       if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==NOCLOSE) { if (pf!='ol_') opt_NOCLOSE(); continue; }\r
+                       if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; }\r
+                       if (ar[i]==CENTER || ar[i]==LEFT || ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); continue; }\r
+                       if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; }\r
+                       if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; }\r
+                       if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; }\r
+                       if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; }\r
+                       if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; }\r
+                       if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; }\r
+                       if (ar[i]==AUTOSTATUS) { eval(pf +'autostatus=('+pf+'autostatus == 1) ? 0 : 1'); continue; }\r
+                       if (ar[i]==AUTOSTATUSCAP) { eval(pf +'autostatus=('+pf+'autostatus == 2) ? 0 : 2'); continue; }\r
+                       if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; } // Same param again.\r
+                       if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; }\r
+                       if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; }\r
+                       if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; }\r
+                       if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; }\r
+                       if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; }\r
+                       if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; }\r
+                       if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; }\r
+                       if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; }\r
+                       if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; }\r
+                       if (ar[i]==FULLHTML) { if (pf!='ol_') eval(pf+'fullhtml=1'); continue; }\r
+                       if (ar[i]==BELOW || ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); continue; }\r
+                       if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+                       if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+                       if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+                       if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; }\r
+                       if (ar[i]==FUNCTION) { if (pf=='ol_') { if (typeof ar[i+1]!='number') { v=ar[++i]; ol_function=(typeof v=='function' ? v : null); }} else {fnMark = 0; v = null; if (typeof ar[i+1]!='number') v = ar[++i];  opt_FUNCTION(v); } continue; }\r
+                       if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; }\r
+                       if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto == 0) ? 1 : 0'); continue; }\r
+                       if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto == 0) ? 1 : 0'); continue; }\r
+                       if (ar[i]==CLOSECLICK) { eval(pf +'closeclick=('+pf+'closeclick == 0) ? 1 : 0'); continue; }\r
+                       if (ar[i]==WRAP) { eval(pf +'wrap=('+pf+'wrap == 0) ? 1 : 0'); continue; }\r
+                       if (ar[i]==FOLLOWMOUSE) { eval(pf +'followmouse=('+pf+'followmouse == 1) ? 0 : 1'); continue; }\r
+                       if (ar[i]==MOUSEOFF) { eval(pf +'mouseoff=('+pf+'mouseoff == 0) ? 1 : 0'); continue; }\r
+                       if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; }\r
+                       if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; }\r
+                       if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; }\r
+                       if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; }\r
+                       i = parseCmdLine(pf, i, ar);\r
+               }\r
+       }\r
+\r
+       if (fnMark && o3_function) o3_text = o3_function();\r
+       \r
+       if ((pf == 'o3_') && o3_wrap) {\r
+               o3_width = 0;\r
+               \r
+               if (olOp || (olIe4 && isMac)) {\r
+                       var tReg=/<.*\n*>/ig;\r
+                       if (!tReg.test(o3_text)) o3_text = o3_text.replace(/[ ]+/g, '&nbsp;');\r
+                       if (!tReg.test(o3_cap))o3_cap = o3_cap.replace(/[ ]+/g, '&nbsp;');\r
+               }\r
+       }\r
+       if ((pf == 'o3_') && o3_sticky) {\r
+               if (!o3_close && (o3_frame != ol_frame)) o3_close = ol_close;\r
+               if (o3_mouseoff && (o3_frame == ol_frame)) opt_NOCLOSE(' ');\r
+       }\r
+}\r
+\r
+\r
+////////\r
+// LAYER FUNCTIONS\r
+////////\r
+\r
+// Writes to a layer\r
+function layerWrite(txt) {\r
+       txt += "\n";\r
+       if (olNs4) {\r
+               var lyr = o3_frame.document.overDiv.document\r
+               lyr.write(txt)\r
+               lyr.close()\r
+       } else if (typeof over.innerHTML != 'undefined') {\r
+               if (olIe5 && isMac) over.innerHTML = '';\r
+               over.innerHTML = txt;\r
+       } else {\r
+               range = o3_frame.document.createRange();\r
+               range.setStartAfter(over);\r
+               domfrag = range.createContextualFragment(txt);\r
+               \r
+               while (over.hasChildNodes()) {\r
+                       over.removeChild(over.lastChild);\r
+               }\r
+               \r
+               over.appendChild(domfrag);\r
+       }\r
+}\r
+\r
+// Make an object visible\r
+function showObject(obj) {\r
+       runHook("showObject", FBEFORE);\r
+\r
+       var theObj=(olNs4 ? obj : obj.style);\r
+       theObj.visibility = 'visible';\r
+\r
+       runHook("showObject", FAFTER);\r
+}\r
+\r
+// Hides an object\r
+function hideObject(obj) {\r
+       runHook("hideObject", FBEFORE);\r
+\r
+       var theObj=(olNs4 ? obj : obj.style);\r
+       theObj.visibility = 'hidden';\r
+\r
+       if (o3_timerid > 0) clearTimeout(o3_timerid);\r
+       if (o3_delayid > 0) clearTimeout(o3_delayid);\r
+\r
+       o3_timerid = 0;\r
+       o3_delayid = 0;\r
+       self.status = "";\r
+\r
+       if (over.onmouseout || over.onmouseover) {\r
+               if (olNs4) over.releaseEvents(Event.MOUSEOUT || Event.MOUSEOVER);\r
+               over.onmouseout = over.onmouseover = null;\r
+       }\r
+\r
+       runHook("hideObject", FAFTER);\r
+}\r
+\r
+// Move a layer\r
+function repositionTo(obj, xL, yL) {\r
+       var theObj=(olNs4 ? obj : obj.style);\r
+       theObj.left = xL + (!olNs4 ? 'px' : 0);\r
+       theObj.top = yL + (!olNs4 ? 'px' : 0);\r
+}\r
+\r
+// Check position of cursor relative to overDiv DIVision; mouseOut function\r
+function cursorOff() {\r
+       var left = parseInt(over.style.left);\r
+       var top = parseInt(over.style.top);\r
+       var right = left+over.offsetWidth;\r
+       var bottom = top+ over.offsetHeight;\r
+\r
+       if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return true;\r
+\r
+       return false;\r
+}\r
+\r
+\r
+////////\r
+// COMMAND FUNCTIONS\r
+////////\r
+\r
+// Calls callme or the default function.\r
+function opt_FUNCTION(callme) {\r
+       o3_text = (callme ? (typeof callme=='string' ? (/.+\(.*\)/.test(callme) ? eval(callme) : callme) : callme()) : (o3_function ? o3_function() : 'No Function'));\r
+\r
+       return 0;\r
+}\r
+\r
+// Handle hovering\r
+function opt_NOCLOSE(unused) {\r
+       if (!unused) o3_close = "";\r
+\r
+       if (olNs4) {\r
+               over.captureEvents(Event.MOUSEOUT || Event.MOUSEOVER);\r
+               over.onmouseover = function () { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid = 0; } }\r
+               over.onmouseout = cClick;\r
+       } else {\r
+               over.onmouseover = function () {hoveringSwitch = true; if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid =0; } }\r
+       }\r
+\r
+       return 0;\r
+}\r
+\r
+// Function to scan command line arguments for multiples\r
+function opt_MULTIPLEARGS(i, args, parameter) {\r
+  var k = i, l, re, pV, str = '';\r
+\r
+  for(k=i; k<args.length; k++) {\r
+               str += args[k] + ',';\r
+               if(typeof args[k] == 'number'&&args[k]>pmStart) break;\r
+       }\r
+  if(k >= args.length) l = str.length-1;\r
+  else {\r
+    re = eval('/,' + args[k] + '/');\r
+    l = str.search(re);\r
+  }\r
+\r
+       k--;  // reduce by one so the for loop this is in works correctly\r
+       str = str.substring(0, l);\r
+       pV = (olNs4&&/cellpad/i.test(parameter)) ? str.split(',')[0] : str;\r
+       eval(parameter + '="' + pV + '"');\r
+\r
+       return k;\r
+}\r
+\r
+// Remove &nbsp; in texts when done.\r
+function nbspCleanup() {\r
+       if (o3_wrap && (olOp || (olIe4 && isMac))) {\r
+               o3_text = o3_text.replace(/\&nbsp;/g, ' ');\r
+               o3_cap = o3_cap.replace(/\&nbsp;/g, ' ');\r
+       }\r
+}\r
+\r
+// Escape embedded single quotes in text strings\r
+function escSglQuote(str) {\r
+  return str.toString().replace(/'/g,"\\'");\r
+}\r
+\r
+// Onload handler for window onload event\r
+function OLonLoad_handler(e) {\r
+       if (!olLoaded) olLoaded=1;  // indicates that all modules have loaded now\r
+\r
+       // remove the OLonload_handler for Ns6+, Mozilla based browsers, and IE\r
+       if (window.removeEventListener) window.removeEventListener("load",OLonLoad_handler,true);\r
+       else if (window.detachEvent) window.detachEvent("onload",OLonLoad_handler);\r
+       \r
+       // Route the event to the normal handler in Nx4.x\r
+       if (olNs4) routeEvent(e);\r
+}\r
+\r
+// Wraps strings in Layer Generation Functions with the correct tags\r
+//    endWrap true(if end tag) or false if start tag\r
+//    fontSizeStr - font size string such as '1' or '10px'\r
+//    whichString is being wrapped -- 'text', 'caption', or 'close'\r
+function wrapStr(endWrap,fontSizeStr,whichString) {\r
+       var fontStr, fontColor, isClose=((whichString=='close') ? 1 : 0), hasDims=/[%\-a-z]+$/.test(fontSizeStr);\r
+       fontSizeStr = (olNs4) ? (!hasDims ? fontSizeStr : '1') : fontSizeStr;\r
+       if (endWrap) return (hasDims&&!olNs4) ? (isClose ? '</span>' : '</div>') : '</font>';\r
+       else {\r
+               fontStr='o3_'+whichString+'font';\r
+               fontColor='o3_'+((whichString=='caption')? 'cap' : whichString)+'color';\r
+               return (hasDims&&!olNs4) ? (isClose ? '<span style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">' : '<div style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">') : '<font face="'+eval(fontStr)+'" color="'+eval(fontColor)+'" size="'+(parseInt(fontSizeStr)>7 ? '7' : fontSizeStr)+'">';\r
+       }\r
+}\r
+\r
+// Quotes Multi word font names; needed for CSS Standards adherence in font-family\r
+function quoteMultiNameFonts(theFont) {\r
+       var v, pM=theFont.split(',');\r
+       for (var i=0; i<pM.length; i++) {\r
+               v=pM[i];\r
+               v=v.replace(/^\s+/,'').replace(/\s+$/,'');\r
+               if(/\s/.test(v) && !/['"]/.test(v)) {\r
+                       v="\'"+v+"\'";\r
+                       pM[i]=v;\r
+               }\r
+       }\r
+       return pM.join();\r
+}\r
+\r
+// dummy function which will be overridden \r
+function isExclusive(args) {\r
+       return false;\r
+}\r
+////////\r
+//  PLUGIN ACTIVATION FUNCTIONS\r
+////////\r
+\r
+// Runs plugin functions to set runtime variables.\r
+function setRunTimeVariables(){\r
+       if (typeof runTime != 'undefined' && runTime.length) {\r
+               for (var k = 0; k < runTime.length; k++) {\r
+                       runTime[k]();\r
+               }\r
+       }\r
+}\r
+\r
+// Runs plugin functions to parse commands.\r
+function parseCmdLine(pf, i, args) {\r
+       if (typeof cmdLine != 'undefined' && cmdLine.length) { \r
+               for (var k = 0; k < cmdLine.length; k++) { \r
+                       var j = cmdLine[k](pf, i, args);\r
+                       if (j >- 1) {\r
+                               i = j;\r
+                               break;\r
+                       }\r
+               }\r
+       }\r
+\r
+       return i;\r
+}\r
+\r
+// Runs plugin functions to do things after parse.\r
+function postParseChecks(){\r
+       if (typeof postParse != 'undefined' && postParse.length) {\r
+               for (var k = 0; k < postParse.length; k++) {\r
+                       if (postParse[k]()) continue;\r
+                       return false;  // end now since have an error\r
+               }\r
+       }\r
+       return true;\r
+}\r
+\r
+\r
+////////\r
+//  PLUGIN REGISTRATION FUNCTIONS\r
+////////\r
+\r
+// Registers commands and creates constants.\r
+function registerCommands(cmdStr) {\r
+       if (typeof cmdStr!='string') return;\r
+\r
+       var pM = cmdStr.split(',');\r
+       pms = pms.concat(pM);\r
+\r
+       for (var i = 0; i< pM.length; i++) {\r
+               eval(pM[i].toUpperCase()+'='+pmCount++);\r
+       }\r
+}\r
+\r
+// Register a function to hook at a certain point.\r
+function registerHook(fnHookTo, fnRef, hookType, optPm) {\r
+       var hookPt, last = typeof optPm;\r
+       \r
+       if (fnHookTo == 'plgIn'||fnHookTo == 'postParse') return;\r
+       if (typeof hookPts == 'undefined') hookPts = new Array();\r
+       if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference();\r
+\r
+       hookPt = hookPts[fnHookTo];\r
+\r
+       if (hookType != null) {\r
+               if (hookType == FREPLACE) {\r
+                       hookPt.ovload = fnRef;  // replace normal overlib routine\r
+                       if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef; \r
+\r
+               } else if (hookType == FBEFORE || hookType == FAFTER) {\r
+                       var hookPt=(hookType == 1 ? hookPt.before : hookPt.after);\r
+\r
+                       if (typeof fnRef == 'object') {\r
+                               hookPt = hookPt.concat(fnRef);\r
+                       } else {\r
+                               hookPt[hookPt.length++] = fnRef;\r
+                       }\r
+\r
+                       if (optPm) hookPt = reOrder(hookPt, fnRef, optPm);\r
+\r
+               } else if (hookType == FALTERNATE) {\r
+                       if (last=='number') hookPt.alt[pms[optPm-1-pmStart]] = fnRef;\r
+               }\r
+\r
+               return;\r
+       }\r
+}\r
+\r
+// Register a function that will set runtime variables.\r
+function registerRunTimeFunction(fn) {\r
+       if (isFunction(fn)) {\r
+               if (typeof runTime == 'undefined') runTime = new Array();\r
+               if (typeof fn == 'object') {\r
+                       runTime = runTime.concat(fn);\r
+               } else {\r
+                       runTime[runTime.length++] = fn;\r
+               }\r
+       }\r
+}\r
+\r
+// Register a function that will handle command parsing.\r
+function registerCmdLineFunction(fn){\r
+       if (isFunction(fn)) {\r
+               if (typeof cmdLine == 'undefined') cmdLine = new Array();\r
+               if (typeof fn == 'object') {\r
+                       cmdLine = cmdLine.concat(fn);\r
+               } else {\r
+                       cmdLine[cmdLine.length++] = fn;\r
+               }\r
+       }\r
+}\r
+\r
+// Register a function that does things after command parsing. \r
+function registerPostParseFunction(fn){\r
+       if (isFunction(fn)) {\r
+               if (typeof postParse == 'undefined') postParse = new Array();\r
+               if (typeof fn == 'object') {\r
+                       postParse = postParse.concat(fn);\r
+               } else {\r
+                       postParse[postParse.length++] = fn;\r
+               }\r
+       }\r
+}\r
+\r
+////////\r
+//  PLUGIN REGISTRATION FUNCTIONS\r
+////////\r
+\r
+// Runs any hooks registered.\r
+function runHook(fnHookTo, hookType) {\r
+       var l = hookPts[fnHookTo], optPm, arS, ar = runHook.arguments;\r
+\r
+       if (hookType == FREPLACE) {\r
+               arS = argToString(ar, 2);\r
+\r
+               if (typeof l == 'undefined' || !(l = l.ovload)) return eval(fnHookTo+'('+arS+')');\r
+               else return eval('l('+arS+')');\r
+\r
+       } else if (hookType == FBEFORE || hookType == FAFTER) {\r
+               if (typeof l == 'undefined') return;\r
+               l=(hookType == 1 ? l.before : l.after);\r
+\r
+               if (!l.length) return;\r
+\r
+               arS = argToString(ar, 2);\r
+               for (var k = 0; k < l.length; k++) eval('l[k]('+arS+')'); \r
+\r
+       } else if (hookType == FALTERNATE) {\r
+               optPm = ar[2];\r
+               arS = argToString(ar, 3);\r
+\r
+               if (typeof l == 'undefined' || (l = l.alt[pms[optPm-1-pmStart]]) == 'undefined') {\r
+                       return eval(fnHookTo+'('+arS+')');\r
+               } else {\r
+                       return eval('l('+arS+')');\r
+               }\r
+       }\r
+}\r
+\r
+////////\r
+//  UTILITY FUNCTIONS\r
+////////\r
+\r
+// Checks if something is a function.\r
+function isFunction(fnRef) {\r
+       var rtn = true;\r
+\r
+       if (typeof fnRef == 'object') {\r
+               for (var i = 0; i < fnRef.length; i++) {\r
+                       if (typeof fnRef[i]=='function') continue;\r
+                       rtn = false;\r
+                       break;\r
+               }\r
+       } else if (typeof fnRef != 'function') {\r
+               rtn = false;\r
+       }\r
+       \r
+       return rtn;\r
+}\r
+\r
+// Converts an array into an argument string for use in eval.\r
+function argToString(array, strtInd, argName) {\r
+       var jS = strtInd, aS = '', ar = array;\r
+       argName=(argName ? argName : 'ar');\r
+       \r
+       if (ar.length > jS) {\r
+               for (var k = jS; k < ar.length; k++) aS += argName+'['+k+'], ';\r
+               aS = aS.substring(0, aS.length-2);\r
+       }\r
+       \r
+       return aS;\r
+}\r
+\r
+// Places a hook in the correct position in a hook point.\r
+function reOrder(hookPt, fnRef, order) {\r
+       if (!order || typeof order == 'undefined' || typeof order == 'number') return;\r
+       \r
+       var newPt = new Array(), match;\r
+\r
+       if (typeof order=='function') {\r
+               if (typeof fnRef=='object') {\r
+                       newPt = newPt.concat(fnRef);\r
+               } else {\r
+                       newPt[newPt.length++]=fnRef;\r
+               }\r
+               \r
+               for (var i = 0; i < hookPt.length; i++) {\r
+                       match = false;\r
+                       if (typeof fnRef == 'function' && hookPt[i] == fnRef) {\r
+                               continue;\r
+                       } else {\r
+                               for(var j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {\r
+                                       match = true;\r
+                                       break;\r
+                               }\r
+                       }\r
+                       if (!match) newPt[newPt.length++] = hookPt[i];\r
+               }\r
+\r
+               newPt[newPt.length++] = order;\r
+\r
+       } else if (typeof order == 'object') {\r
+               if (typeof fnRef == 'object') {\r
+                       newPt = newPt.concat(fnRef);\r
+               } else {\r
+                       newPt[newPt.length++] = fnRef;\r
+               }\r
+               \r
+               for (var j = 0; j < hookPt.length; j++) {\r
+                       match = false;\r
+                       if (typeof fnRef == 'function' && hookPt[j] == fnRef) {\r
+                               continue;\r
+                       } else {\r
+                               for (var i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {\r
+                                       match = true;\r
+                                       break;\r
+                               }\r
+                       }\r
+                       if (!match) newPt[newPt.length++]=hookPt[j];\r
+               }\r
+\r
+               for (i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];\r
+               newPt.length = 0;\r
+               \r
+               for (var j = 0; j < hookPt.length; j++) {\r
+                       match = false;\r
+                       for (var i = 0; i < order.length; i++) {\r
+                               if (hookPt[j] == order[i]) {\r
+                                       match = true;\r
+                                       break;\r
+                               }\r
+                       }\r
+                       if (!match) newPt[newPt.length++] = hookPt[j];\r
+               }\r
+               newPt = newPt.concat(order);\r
+       }\r
+\r
+       for(i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];\r
+\r
+       return hookPt;\r
+}\r
+\r
+////////\r
+// OBJECT CONSTRUCTORS\r
+////////\r
+\r
+// Object for handling hooks.\r
+function FunctionReference() {\r
+       this.ovload = null;\r
+       this.before = new Array();\r
+       this.after = new Array();\r
+       this.alt = new Array();\r
+}\r
+\r
+// Object for simple access to the overLIB version used.\r
+// Examples: simpleversion:351 major:3 minor:5 revision:1\r
+function Info(version, prerelease) {\r
+       this.version = version;\r
+       this.prerelease = prerelease;\r
+\r
+       this.simpleversion = parseInt(this.version*100);\r
+       this.major = parseInt(this.simpleversion / 100);\r
+       this.minor = parseInt(this.simpleversion / 10) - this.major * 10;\r
+       this.revision = parseInt(this.simpleversion) - this.major * 100 - this.minor * 10;\r
+}\r
+\r
+\r
+\r
+////////\r
+// STANDARD REGISTRATIONS\r
+////////\r
+registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF);\r
+registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF);\r
+registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSOFF);\r
+registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS);\r
+registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS);\r
+registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSCLASS);\r
+registerHook("hideObject", nbspCleanup, FAFTER);\r
+\r
diff --git a/mods/pnATutor/pnincludes/overlib_mini.js b/mods/pnATutor/pnincludes/overlib_mini.js
new file mode 100644 (file)
index 0000000..6aa4b8a
--- /dev/null
@@ -0,0 +1,328 @@
+//\/////\r
+//\  overLIB 4.00 - You may not remove or change this notice.\r
+//\  Copyright Erik Bosrup 1998-2004. All rights reserved.\r
+//\\r
+//\  Contributors are listed on the homepage.\r
+//\  This file might be old, always check for the latest version at:\r
+//\  http://www.bosrup.com/web/overlib/\r
+//\\r
+//\  Please read the license agreement (available through the link above)\r
+//\  before using overLIB. Direct any licensing questions to erik@bosrup.com.\r
+//\\r
+//\  Do not sell this as your own work or remove this copyright notice. \r
+//\  For full details on copying or changing this script please read the\r
+//\  license agreement at the link above. Please give credit on sites that\r
+//\  use overLIB and submit changes of the script so other people can use\r
+//\  them as well.\r
+//\/////\r
+//\  THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!\r
+var olLoaded=0;var pmStart=10000000; var pmUpper=10001000; var pmCount=pmStart+1;  var pms=new Array(); var olInfo=new Info('4.00', 1);var FREPLACE=0; var FBEFORE=1; var FAFTER=2; var FALTERNATE=3;var olHideForm=0;registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');\r
+if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#CCCCFF";if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#333399";if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000";if (typeof ol_capcolor=='undefined') var ol_capcolor="#FFFFFF";if (typeof ol_closecolor=='undefined') var ol_closecolor="#9999FF";if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica";if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica";if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica";if (typeof ol_textsize=='undefined') var ol_textsize="1";if (typeof ol_captionsize=='undefined') var ol_captionsize="1";if (typeof ol_closesize=='undefined') var ol_closesize="1";if (typeof ol_width=='undefined') var ol_width="200";if (typeof ol_border=='undefined') var ol_border="1";if (typeof ol_cellpad=='undefined') var ol_cellpad=2;if (typeof ol_offsetx=='undefined') var ol_offsetx=10;if (typeof ol_offsety=='undefined') var ol_offsety=10;if (typeof ol_text=='undefined') var ol_text="Default Text";if (typeof ol_cap=='undefined') var ol_cap="";if (typeof ol_sticky=='undefined') var ol_sticky=0;if (typeof ol_background=='undefined') var ol_background="";if (typeof ol_close=='undefined') var ol_close="Close";if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT;if (typeof ol_status=='undefined') var ol_status="";if (typeof ol_autostatus=='undefined') var ol_autostatus=0;if (typeof ol_height=='undefined') var ol_height=-1;if (typeof ol_snapx=='undefined') var ol_snapx=0;if (typeof ol_snapy=='undefined') var ol_snapy=0;if (typeof ol_fixx=='undefined') var ol_fixx=-1;if (typeof ol_fixy=='undefined') var ol_fixy=-1;if (typeof ol_relx=='undefined') var ol_relx=null;if (typeof ol_rely=='undefined') var ol_rely=null;if (typeof ol_fgbackground=='undefined') var ol_fgbackground="";if (typeof ol_bgbackground=='undefined') var ol_bgbackground="";if (typeof ol_padxl=='undefined') var ol_padxl=1;if (typeof ol_padxr=='undefined') var ol_padxr=1;if (typeof ol_padyt=='undefined') var ol_padyt=1;if (typeof ol_padyb=='undefined') var ol_padyb=1;if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0;if (typeof ol_vpos=='undefined') var ol_vpos=BELOW;if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0;if (typeof ol_capicon=='undefined') var ol_capicon="";if (typeof ol_frame=='undefined') var ol_frame=self;if (typeof ol_timeout=='undefined') var ol_timeout=0;if (typeof ol_function=='undefined') var ol_function=null;if (typeof ol_delay=='undefined') var ol_delay=0;if (typeof ol_hauto=='undefined') var ol_hauto=0;if (typeof ol_vauto=='undefined') var ol_vauto=0;if (typeof ol_closeclick=='undefined') var ol_closeclick=0;if (typeof ol_wrap=='undefined') var ol_wrap=0;if (typeof ol_followmouse=='undefined') var ol_followmouse=1;if (typeof ol_mouseoff=='undefined') var ol_mouseoff=0;if (typeof ol_closetitle=='undefined') var ol_closetitle='Close';if (typeof ol_css=='undefined') var ol_css=CSSOFF;if (typeof ol_fgclass=='undefined') var ol_fgclass="";if (typeof ol_bgclass=='undefined') var ol_bgclass="";if (typeof ol_textfontclass=='undefined') var ol_textfontclass="";if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass="";if (typeof ol_closefontclass=='undefined') var ol_closefontclass="";\r
+if (typeof ol_texts=='undefined') var ol_texts=new Array("Text 0", "Text 1");if (typeof ol_caps=='undefined') var ol_caps=new Array("Caption 0", "Caption 1");\r
+var o3_text="";var o3_cap="";var o3_sticky=0;var o3_background="";var o3_close="Close";var o3_hpos=RIGHT;var o3_offsetx=2;var o3_offsety=2;var o3_fgcolor="";var o3_bgcolor="";var o3_textcolor="";var o3_capcolor="";var o3_closecolor="";var o3_width=100;var o3_border=1;var o3_cellpad=2;var o3_status="";var o3_autostatus=0;var o3_height=-1;var o3_snapx=0;var o3_snapy=0;var o3_fixx=-1;var o3_fixy=-1;var o3_relx=null;var o3_rely=null;var o3_fgbackground="";var o3_bgbackground="";var o3_padxl=0;var o3_padxr=0;var o3_padyt=0;var o3_padyb=0;var o3_fullhtml=0;var o3_vpos=BELOW;var o3_aboveheight=0;var o3_capicon="";var o3_textfont="Verdana,Arial,Helvetica";var o3_captionfont="Verdana,Arial,Helvetica";var o3_closefont="Verdana,Arial,Helvetica";var o3_textsize="1";var o3_captionsize="1";var o3_closesize="1";var o3_frame=self;var o3_timeout=0;var o3_timerid=0;var o3_allowmove=0;var o3_function=null;var o3_delay=0;var o3_delayid=0;var o3_hauto=0;var o3_vauto=0;var o3_closeclick=0;var o3_wrap=0;var o3_followmouse=1;var o3_mouseoff=0;var o3_closetitle='';var o3_css=CSSOFF;var o3_fgclass="";var o3_bgclass="";var o3_textfontclass="";var o3_captionfontclass="";var o3_closefontclass="";\r
+var o3_x=0;var o3_y=0;var o3_showingsticky=0;var o3_removecounter=0;\r
+var over=null;var fnRef, hoveringSwitch=false;\r
+var isMac=(navigator.userAgent.indexOf("Mac")!=-1);var olOp=(navigator.userAgent.toLowerCase().indexOf('opera 7.')>-1);var olNs4=(navigator.appName=='Netscape'&&parseInt(navigator.appVersion)==4);var olNs6=(document.getElementById)?true:false;var olIe4=(document.all)?true:false;var olIe5=false;var olIe55=false;var docRoot='document.body';\r
+if (olNs4) {var oW=window.innerWidth;var oH=window.innerHeight;window.onresize=function() { if (oW!=window.innerWidth||oH!=window.innerHeight) location.reload(); }\r
+}\r
+if (olIe4) {var versNum=parseFloat(navigator.userAgent.match(/MSIE (\d\.\d+)\.*/i)[1]);if (versNum>=5){olIe5=true;olIe55=(versNum>=5.5&&!olOp)?true:false;if (olNs6) olNs6=false;}\r
+if (olNs6) olIe4=false;}\r
+if (document.compatMode&&document.compatMode=='CSS1Compat') {docRoot=((olIe4&&!olOp)?'document.documentElement':docRoot);}\r
+if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,true);else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler);else window.onload=OLonLoad_handler;\r
+var olCheckMouseCapture=true;if ((olNs4||olNs6||olIe4)) {olMouseCapture();} else {overlib=no_overlib;nd=no_overlib;ver3fix=true;}\r
+function overlib() {if (!olLoaded||isExclusive(overlib.arguments)) return true;if (olCheckMouseCapture) olMouseCapture();if (over) cClick();\r
+o3_text=ol_text;o3_cap=ol_cap;o3_sticky=ol_sticky;o3_background=ol_background;o3_close=ol_close;o3_hpos=ol_hpos;o3_offsetx=ol_offsetx;o3_offsety=ol_offsety;o3_fgcolor=ol_fgcolor;o3_bgcolor=ol_bgcolor;o3_textcolor=ol_textcolor;o3_capcolor=ol_capcolor;o3_closecolor=ol_closecolor;o3_width=ol_width;o3_border=ol_border;o3_cellpad=ol_cellpad;o3_status=ol_status;o3_autostatus=ol_autostatus;o3_height=ol_height;o3_snapx=ol_snapx;o3_snapy=ol_snapy;o3_fixx=ol_fixx;o3_fixy=ol_fixy;o3_relx=ol_relx;o3_rely=ol_rely;o3_fgbackground=ol_fgbackground;o3_bgbackground=ol_bgbackground;o3_padxl=ol_padxl;o3_padxr=ol_padxr;o3_padyt=ol_padyt;o3_padyb=ol_padyb;o3_fullhtml=ol_fullhtml;o3_vpos=ol_vpos;o3_aboveheight=ol_aboveheight;o3_capicon=ol_capicon;o3_textfont=ol_textfont;o3_captionfont=ol_captionfont;o3_closefont=ol_closefont;o3_textsize=ol_textsize;o3_captionsize=ol_captionsize;o3_closesize=ol_closesize;o3_timeout=ol_timeout;o3_function=ol_function;o3_delay=ol_delay;o3_hauto=ol_hauto;o3_vauto=ol_vauto;o3_closeclick=ol_closeclick;o3_wrap=ol_wrap;o3_followmouse=ol_followmouse;o3_mouseoff=ol_mouseoff;o3_closetitle=ol_closetitle;o3_css=ol_css;o3_fgclass=ol_fgclass;o3_bgclass=ol_bgclass;o3_textfontclass=ol_textfontclass;o3_captionfontclass=ol_captionfontclass;o3_closefontclass=ol_closefontclass;\r
+setRunTimeVariables();\r
+fnRef='';\r
+o3_frame=ol_frame;\r
+if (olNs4) {over=o3_frame.document.layers['overDiv'];} else if (document.all) {over=o3_frame.document.all['overDiv'];} else if (document.getElementById) {over=o3_frame.document.getElementById("overDiv");}\r
+parseTokens('o3_', overlib.arguments);if (!postParseChecks()) return false;\r
+if (o3_delay==0) {return runHook("olMain", FREPLACE);} else {o3_delayid=setTimeout("runHook('olMain', FREPLACE)", o3_delay);return false;}\r
+}\r
+function nd(time) {if (olLoaded&&!isExclusive()) {if (time&&!o3_delay) {if (o3_timerid>0) clearTimeout(o3_timerid);\r
+o3_timerid=setTimeout("cClick()",(o3_timeout=time));}\r
+if (o3_removecounter>=1) { o3_showingsticky=0 };\r
+if (o3_showingsticky==0) {o3_allowmove=0;if (over!=null&&o3_timerid==0) runHook("hideObject", FREPLACE, over);} else {o3_removecounter++;}\r
+}\r
+return true;}\r
+function cClick() {if (olLoaded) {runHook("hideObject", FREPLACE, over);o3_showingsticky=0;}\r
+return false;}\r
+function overlib_pagedefaults() {parseTokens('ol_', overlib_pagedefaults.arguments);}\r
+function olMain() {var layerhtml, styleType;runHook("olMain", FBEFORE);\r
+if (o3_background!=""||o3_fullhtml) {\r
+layerhtml=runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);} else {\r
+styleType=(pms[o3_css-1-pmStart]=="cssoff"||pms[o3_css-1-pmStart]=="cssclass");\r
+if (o3_fgbackground!="") o3_fgbackground="background=\""+o3_fgbackground+"\"";if (o3_bgbackground!="") o3_bgbackground=(styleType?"background=\""+o3_bgbackground+"\"":o3_bgbackground);\r
+if (o3_fgcolor!="") o3_fgcolor=(styleType?"bgcolor=\""+o3_fgcolor+"\"":o3_fgcolor);if (o3_bgcolor!="") o3_bgcolor=(styleType?"bgcolor=\""+o3_bgcolor+"\"":o3_bgcolor);\r
+if (o3_height>0) o3_height=(styleType?"height=\""+o3_height+"\"":o3_height);else o3_height="";\r
+if (o3_cap=="") {\r
+layerhtml=runHook('ol_content_simple', FALTERNATE, o3_css, o3_text);} else {\r
+if (o3_sticky) {\r
+layerhtml=runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close);} else {\r
+layerhtml=runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, "");}\r
+}\r
+}\r
+if (o3_sticky) {if (o3_timerid>0) {clearTimeout(o3_timerid);o3_timerid=0;}\r
+o3_showingsticky=1;o3_removecounter=0;}\r
+if (!runHook("createPopup", FREPLACE, layerhtml)) return false;\r
+if (o3_autostatus>0) {o3_status=o3_text;if (o3_autostatus>1) o3_status=o3_cap;}\r
+o3_allowmove=0;\r
+if (o3_timeout>0) {if (o3_timerid>0) clearTimeout(o3_timerid);o3_timerid=setTimeout("cClick()", o3_timeout);}\r
+runHook("disp", FREPLACE, o3_status);runHook("olMain", FAFTER);\r
+if (o3_status!='') {return true;} else {return;}\r
+}\r
+function ol_content_simple(text) {txt='<table width="'+o3_width+'" border="0" cellpadding="'+o3_border+'" cellspacing="0" '+(o3_bgclass?'class="'+o3_bgclass+'"':o3_bgcolor+' '+o3_height)+'><tr><td><table width="100%" border="0" cellpadding="'+o3_cellpad+'" cellspacing="0" '+(o3_fgclass?'class="'+o3_fgclass+'"':o3_fgcolor+' '+o3_fgbackground+' '+o3_height)+'><tr><td valign="TOP"'+(o3_textfontclass?' class="'+o3_textfontclass+'">':'>')+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'</td></tr></table></td></tr></table>';\r
+set_background("");return txt;}\r
+function ol_content_caption(text,title,close) {var nameId;closing="";closeevent="onmouseover";if (o3_closeclick==1) closeevent=(o3_closetitle?"title='"+o3_closetitle+"'":"")+" onclick";if (o3_capicon!="") {nameId=' hspace=\"5\"'+' align=\"middle\" alt=\"\"';if (typeof o3_dragimg!='undefined'&&o3_dragimg) nameId=' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';o3_capicon='<img src=\"'+o3_capicon+'\"'+nameId+' />';}\r
+if (close!="") closing='<td '+(o3_closefontclass?'class="'+o3_closefontclass:'align="RIGHT')+'"><a href="javascript:return '+fnRef+'cClick();" '+closeevent+'="return '+fnRef+'cClick();">'+(o3_closefontclass?'':wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass?'':wrapStr(1,o3_closesize,'close'))+'</a></td>';txt='<table width="'+o3_width+'" border="0" cellpadding="'+o3_border+'" cellspacing="0" '+(o3_bgclass?'class="'+o3_bgclass+'"':o3_bgcolor+' '+o3_bgbackground+' '+o3_height)+'><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td'+(o3_captionfontclass?' class="'+o3_captionfontclass+'">':'>')+(o3_captionfontclass?'':'<b>'+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass?'':wrapStr(1,o3_captionsize)+'</b>')+'</td>'+closing+'</tr></table><table width="100%" border="0" cellpadding="'+o3_cellpad+'" cellspacing="0" '+(o3_fgclass?'class="'+o3_fgclass+'"':o3_fgcolor+' '+o3_fgbackground+' '+o3_height)+'><tr><td valign="TOP"'+(o3_textfontclass?' class="'+o3_textfontclass+'">' :'>')+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'</td></tr></table></td></tr></table>';\r
+set_background("");return txt;}\r
+function ol_content_background(text,picture,hasfullhtml) {if (hasfullhtml) {txt=text;} else {txt='<table width="'+o3_width+'" border="0" cellpadding="0" cellspacing="0" height="'+o3_height+'"><tr><td colspan="3" height="'+o3_padyt+'"></td></tr><tr><td width="'+o3_padxl+'"></td><td valign="TOP" width="'+(o3_width-o3_padxl-o3_padxr)+'">'+wrapStr(0,o3_textsize,'text')+text+wrapStr(1,o3_textsize)+'</td><td width="'+o3_padxr+'"></td></tr><tr><td colspan="3" height="'+o3_padyb+'"></td></tr></table>';}\r
+set_background(picture);return txt;}\r
+function set_background(pic) {if (pic=="") {if (olNs4) {over.background.src=null;} else if (over.style) {over.style.backgroundImage="none";}\r
+} else {if (olNs4) {over.background.src=pic;} else if (over.style) {over.style.backgroundImage="url("+pic+")";}\r
+}\r
+}\r
+function disp(statustext) {runHook("disp", FBEFORE);\r
+if (o3_allowmove==0) {runHook("placeLayer", FREPLACE);runHook("showObject", FREPLACE, over);o3_allowmove=(o3_sticky||o3_followmouse==0)?0:1;}\r
+runHook("disp", FAFTER);\r
+if (statustext!="") self.status=statustext;}\r
+function createPopup(lyrContent){runHook("createPopup", FBEFORE);\r
+if (o3_wrap&&!(olNs4||olOp)) {if (olIe4) {over.style.pixelWidth=0;} else if (olNs6) {repositionTo(over, 0,-over.offsetHeight);}\r
+}\r
+layerWrite(lyrContent);\r
+if (o3_wrap) o3_width=(olNs4?over.clip.width:over.offsetWidth);\r
+runHook("createPopup", FAFTER, lyrContent);\r
+return true;}\r
+function placeLayer() {var placeX, placeY, widthFix=0;\r
+if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth')) {iwidth=eval('o3_frame.'+docRoot+'.clientWidth');} else if (typeof(o3_frame.innerWidth)=='number') {widthFix=Math.ceil(1.2*(o3_frame.outerWidth-o3_frame.innerWidth));iwidth=o3_frame.innerWidth;}\r
+winoffset=(olIe4)?eval('o3_frame.'+docRoot+'.scrollLeft'):o3_frame.pageXOffset;var parsedWidth=parseInt(o3_width);\r
+if (o3_fixx>-1||o3_relx!=null) {\r
+placeX=(o3_relx!=null?( o3_relx<0?winoffset+o3_relx+iwidth-parsedWidth-widthFix:winoffset+o3_relx):o3_fixx);} else {\r
+if (o3_hauto==1) {if ((o3_x-winoffset)>(iwidth/2)) {o3_hpos=LEFT;} else {o3_hpos=RIGHT;}\r
+}\r
+if (o3_hpos==CENTER) {placeX=o3_x+o3_offsetx-(parsedWidth/2);\r
+if (placeX<winoffset) placeX=winoffset;}\r
+if (o3_hpos==RIGHT) {placeX=o3_x+o3_offsetx;\r
+if ((placeX+parsedWidth)>(winoffset+iwidth-widthFix)) {placeX=iwidth+winoffset-parsedWidth-widthFix;if (placeX<0) placeX=0;}\r
+}\r
+if (o3_hpos==LEFT) {placeX=o3_x-o3_offsetx-parsedWidth;if (placeX<winoffset) placeX=winoffset;}\r
+if (o3_snapx>1) {var snapping=placeX % o3_snapx;\r
+if (o3_hpos==LEFT) {placeX=placeX-(o3_snapx+snapping);} else {\r
+placeX=placeX+(o3_snapx-snapping);}\r
+if (placeX<winoffset) placeX=winoffset;}\r
+}\r
+if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval('o3_frame.'+docRoot+'.clientHeight')) {iheight=eval('o3_frame.'+docRoot+'.clientHeight');} else if (typeof(o3_frame.innerHeight)=='number') {iheight=o3_frame.innerHeight;}\r
+scrolloffset=(olIe4)?eval('o3_frame.'+docRoot+'.scrollTop'):o3_frame.pageYOffset;var parsedHeight=(o3_aboveheight?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight));\r
+if (o3_fixy>-1||o3_rely!=null) {\r
+placeY=(o3_rely!=null?(o3_rely<0?scrolloffset+o3_rely+iheight-parsedHeight:scrolloffset+o3_rely):o3_fixy);} else {\r
+if (o3_vauto==1) {if ((o3_y-scrolloffset)>(iheight/2)) {o3_vpos=ABOVE;} else {o3_vpos=BELOW;}\r
+}\r
+if (o3_vpos==ABOVE) {if (o3_aboveheight==0) o3_aboveheight=parsedHeight;\r
+placeY=o3_y-(o3_aboveheight+o3_offsety);if (placeY<scrolloffset) placeY=scrolloffset;} else {\r
+placeY=o3_y+o3_offsety;}\r
+if (o3_snapy>1) {var snapping=placeY % o3_snapy;\r
+if (o3_aboveheight>0&&o3_vpos==ABOVE) {placeY=placeY-(o3_snapy+snapping);} else {placeY=placeY+(o3_snapy-snapping);}\r
+if (placeY<scrolloffset) placeY=scrolloffset;}\r
+}\r
+repositionTo(over, placeX, placeY);}\r
+function olMouseMove(e) {var e=(e)?e:event;\r
+if (e.pageX) {o3_x=e.pageX;o3_y=e.pageY;} else if (e.clientX) {o3_x=eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft');o3_y=eval('e.clientY+o3_frame.'+docRoot+'.scrollTop');}\r
+if (o3_allowmove==1) runHook("placeLayer", FREPLACE);\r
+if (hoveringSwitch&&!olNs4&&runHook("cursorOff", FREPLACE)) {cClick();hoveringSwitch=!hoveringSwitch;}\r
+}\r
+function no_overlib() { return ver3fix; }\r
+function olMouseCapture() {capExtent=document;var fN, mseHandler=olMouseMove;var re=/function[ ]+(\w+)\(/;\r
+if (document.onmousemove||(!olIe4&&window.onmousemove)) {if (window.onmousemove) capExtent=window;fN=capExtent.onmousemove.toString().match(re);\r
+if (fN[1]=='anonymous'||fN[1]=='olMouseMove') {olCheckMouseCapture=false;return;}\r
+var str=fN[1]+'(e); '+'olMouseMove(e); ';mseHandler=new Function('e', str);}\r
+capExtent.onmousemove=mseHandler;if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE);}\r
+function parseTokens(pf, ar) {\r
+var v, mode=-1, par=(pf!='ol_');var fnMark=(par&&!ar.length?1:0);\r
+for (i=0; i<ar.length; i++) {if (mode<0) {\r
+if (typeof ar[i]=='number'&&ar[i]>pmStart&&ar[i]<pmUpper) {fnMark=(par?1:0);i--;} else {switch(pf) {case 'ol_':\r
+ol_text=ar[i].toString();break;default:\r
+o3_text=ar[i].toString();}\r
+}\r
+mode=0;} else {\r
+if (ar[i]>=pmCount||ar[i]==DONOTHING) { continue; }\r
+if (ar[i]==INARRAY) { fnMark=0; eval(pf+'text=ol_texts['+ar[++i]+'].toString()'); continue; }\r
+if (ar[i]==CAPARRAY) { eval(pf+'cap=ol_caps['+ar[++i]+'].toString()'); continue; }\r
+if (ar[i]==STICKY) { if (pf!='ol_') eval(pf+'sticky=1'); continue; }\r
+if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==NOCLOSE) { if (pf!='ol_') opt_NOCLOSE(); continue; }\r
+if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; }\r
+if (ar[i]==CENTER||ar[i]==LEFT||ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); continue; }\r
+if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; }\r
+if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; }\r
+if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; }\r
+if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; }\r
+if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; }\r
+if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; }\r
+if (ar[i]==AUTOSTATUS) { eval(pf+'autostatus=('+pf+'autostatus==1)?0:1'); continue; }\r
+if (ar[i]==AUTOSTATUSCAP) { eval(pf+'autostatus=('+pf+'autostatus==2)?0:2'); continue; }\r
+if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; }\r
+if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; }\r
+if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; }\r
+if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; }\r
+if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; }\r
+if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; }\r
+if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; }\r
+if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; }\r
+if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; }\r
+if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; }\r
+if (ar[i]==FULLHTML) { if (pf!='ol_') eval(pf+'fullhtml=1'); continue; }\r
+if (ar[i]==BELOW||ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); continue; }\r
+if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; }\r
+if (ar[i]==FUNCTION) { if (pf=='ol_') { if (typeof ar[i+1]!='number') { v=ar[++i]; ol_function=(typeof v=='function'?v:null); }} else {fnMark=0; v=null; if (typeof ar[i+1]!='number') v=ar[++i];  opt_FUNCTION(v); } continue; }\r
+if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; }\r
+if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto==0)?1:0'); continue; }\r
+if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto==0)?1:0'); continue; }\r
+if (ar[i]==CLOSECLICK) { eval(pf+'closeclick=('+pf+'closeclick==0)?1:0'); continue; }\r
+if (ar[i]==WRAP) { eval(pf+'wrap=('+pf+'wrap==0)?1:0'); continue; }\r
+if (ar[i]==FOLLOWMOUSE) { eval(pf+'followmouse=('+pf+'followmouse==1)?0:1'); continue; }\r
+if (ar[i]==MOUSEOFF) { eval(pf+'mouseoff=('+pf+'mouseoff==0)?1:0'); continue; }\r
+if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; }\r
+if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; }\r
+if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; }\r
+if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; }\r
+i=parseCmdLine(pf, i, ar);}\r
+}\r
+if (fnMark&&o3_function) o3_text=o3_function();\r
+if ((pf=='o3_')&&o3_wrap) {o3_width=0;\r
+if (olOp||(olIe4&&isMac)) {var tReg=/<.*\n*>/ig;if (!tReg.test(o3_text)) o3_text=o3_text.replace(/[ ]+/g, '&nbsp;');if (!tReg.test(o3_cap))o3_cap=o3_cap.replace(/[ ]+/g, '&nbsp;');}\r
+}\r
+if ((pf=='o3_')&&o3_sticky) {if (!o3_close&&(o3_frame!=ol_frame)) o3_close=ol_close;if (o3_mouseoff&&(o3_frame==ol_frame)) opt_NOCLOSE(' ');}\r
+}\r
+function layerWrite(txt) {txt+="\n";if (olNs4) {var lyr=o3_frame.document.overDiv.document\r
+lyr.write(txt)\r
+lyr.close()\r
+} else if (typeof over.innerHTML!='undefined') {if (olIe5&&isMac) over.innerHTML='';over.innerHTML=txt;} else {range=o3_frame.document.createRange();range.setStartAfter(over);domfrag=range.createContextualFragment(txt);\r
+while (over.hasChildNodes()) {over.removeChild(over.lastChild);}\r
+over.appendChild(domfrag);}\r
+}\r
+function showObject(obj) {runHook("showObject", FBEFORE);\r
+var theObj=(olNs4?obj:obj.style);theObj.visibility='visible';\r
+runHook("showObject", FAFTER);}\r
+function hideObject(obj) {runHook("hideObject", FBEFORE);\r
+var theObj=(olNs4?obj:obj.style);theObj.visibility='hidden';\r
+if (o3_timerid>0) clearTimeout(o3_timerid);if (o3_delayid>0) clearTimeout(o3_delayid);\r
+o3_timerid=0;o3_delayid=0;self.status="";\r
+if (over.onmouseout||over.onmouseover) {if (olNs4) over.releaseEvents(Event.MOUSEOUT||Event.MOUSEOVER);over.onmouseout=over.onmouseover=null;}\r
+runHook("hideObject", FAFTER);}\r
+function repositionTo(obj, xL, yL) {var theObj=(olNs4?obj:obj.style);theObj.left=xL+(!olNs4?'px':0);theObj.top=yL+(!olNs4?'px':0);}\r
+function cursorOff() {var left=parseInt(over.style.left);var top=parseInt(over.style.top);var right=left+over.offsetWidth;var bottom=top+over.offsetHeight;\r
+if (o3_x<left||o3_x>right||o3_y<top||o3_y>bottom) return true;\r
+return false;}\r
+function opt_FUNCTION(callme) {o3_text=(callme?(typeof callme=='string'?(/.+\(.*\)/.test(callme)?eval(callme):callme):callme()):(o3_function?o3_function():'No Function'));\r
+return 0;}\r
+function opt_NOCLOSE(unused) {if (!unused) o3_close="";\r
+if (olNs4) {over.captureEvents(Event.MOUSEOUT||Event.MOUSEOVER);over.onmouseover=function () { if (o3_timerid>0) { clearTimeout(o3_timerid); o3_timerid=0; } }\r
+over.onmouseout=cClick;} else {over.onmouseover=function () {hoveringSwitch=true; if (o3_timerid>0) { clearTimeout(o3_timerid); o3_timerid=0; } }\r
+}\r
+return 0;}\r
+function opt_MULTIPLEARGS(i, args, parameter) {var k=i, l, re, pV, str='';\r
+for(k=i; k<args.length; k++) {str+=args[k]+',';if(typeof args[k]=='number'&&args[k]>pmStart) break;}\r
+if(k>=args.length) l=str.length-1;else {re=eval('/,'+args[k]+'/');l=str.search(re);}\r
+k--;str=str.substring(0, l);pV=(olNs4&&/cellpad/i.test(parameter))?str.split(',')[0]:str;eval(parameter+'="'+pV+'"');\r
+return k;}\r
+function nbspCleanup() {if (o3_wrap&&(olOp||(olIe4&&isMac))) {o3_text=o3_text.replace(/\&nbsp;/g, ' ');o3_cap=o3_cap.replace(/\&nbsp;/g, ' ');}\r
+}\r
+function escSglQuote(str) {return str.toString().replace(/'/g,"\\'");}\r
+function OLonLoad_handler(e) {if (!olLoaded) olLoaded=1;\r
+if (window.removeEventListener) window.removeEventListener("load",OLonLoad_handler,true);else if (window.detachEvent) window.detachEvent("onload",OLonLoad_handler);\r
+if (olNs4) routeEvent(e);}\r
+function wrapStr(endWrap,fontSizeStr,whichString) {var fontStr, fontColor, isClose=((whichString=='close')?1:0), hasDims=/[%\-a-z]+$/.test(fontSizeStr);fontSizeStr=(olNs4)?(!hasDims?fontSizeStr:'1'):fontSizeStr;if (endWrap) return (hasDims&&!olNs4)?(isClose?'</span>':'</div>'):'</font>';else {fontStr='o3_'+whichString+'font';fontColor='o3_'+((whichString=='caption')? 'cap':whichString)+'color';return (hasDims&&!olNs4)?(isClose?'<span style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">':'<div style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">'):'<font face="'+eval(fontStr)+'" color="'+eval(fontColor)+'" size="'+(parseInt(fontSizeStr)>7?'7':fontSizeStr)+'">';}\r
+}\r
+function quoteMultiNameFonts(theFont) {var v, pM=theFont.split(',');for (var i=0; i<pM.length; i++) {v=pM[i];v=v.replace(/^\s+/,'').replace(/\s+$/,'');if(/\s/.test(v)&&!/['"]/.test(v)) {v="\'"+v+"\'";pM[i]=v;}\r
+}\r
+return pM.join();}\r
+function isExclusive(args) {return false;}\r
+function setRunTimeVariables(){if (typeof runTime!='undefined'&&runTime.length) {for (var k=0; k<runTime.length; k++) {runTime[k]();}\r
+}\r
+}\r
+function parseCmdLine(pf, i, args) {if (typeof cmdLine!='undefined'&&cmdLine.length) {for (var k=0; k<cmdLine.length; k++) {var j=cmdLine[k](pf, i, args);if (j >-1) {i=j;break;}\r
+}\r
+}\r
+return i;}\r
+function postParseChecks(){if (typeof postParse!='undefined'&&postParse.length) {for (var k=0; k<postParse.length; k++) {if (postParse[k]()) continue;return false;}\r
+}\r
+return true;}\r
+function registerCommands(cmdStr) {if (typeof cmdStr!='string') return;\r
+var pM=cmdStr.split(',');pms=pms.concat(pM);\r
+for (var i=0; i< pM.length; i++) {eval(pM[i].toUpperCase()+'='+pmCount++);}\r
+}\r
+function registerHook(fnHookTo, fnRef, hookType, optPm) {var hookPt, last=typeof optPm;\r
+if (fnHookTo=='plgIn'||fnHookTo=='postParse') return;if (typeof hookPts=='undefined') hookPts=new Array();if (typeof hookPts[fnHookTo]=='undefined') hookPts[fnHookTo]=new FunctionReference();\r
+hookPt=hookPts[fnHookTo];\r
+if (hookType!=null) {if (hookType==FREPLACE) {hookPt.ovload=fnRef;if (fnHookTo.indexOf('ol_content_')>-1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef;\r
+} else if (hookType==FBEFORE||hookType==FAFTER) {var hookPt=(hookType==1?hookPt.before:hookPt.after);\r
+if (typeof fnRef=='object') {hookPt=hookPt.concat(fnRef);} else {hookPt[hookPt.length++]=fnRef;}\r
+if (optPm) hookPt=reOrder(hookPt, fnRef, optPm);\r
+} else if (hookType==FALTERNATE) {if (last=='number') hookPt.alt[pms[optPm-1-pmStart]]=fnRef;}\r
+return;}\r
+}\r
+function registerRunTimeFunction(fn) {if (isFunction(fn)) {if (typeof runTime=='undefined') runTime=new Array();if (typeof fn=='object') {runTime=runTime.concat(fn);} else {runTime[runTime.length++]=fn;}\r
+}\r
+}\r
+function registerCmdLineFunction(fn){if (isFunction(fn)) {if (typeof cmdLine=='undefined') cmdLine=new Array();if (typeof fn=='object') {cmdLine=cmdLine.concat(fn);} else {cmdLine[cmdLine.length++]=fn;}\r
+}\r
+}\r
+function registerPostParseFunction(fn){if (isFunction(fn)) {if (typeof postParse=='undefined') postParse=new Array();if (typeof fn=='object') {postParse=postParse.concat(fn);} else {postParse[postParse.length++]=fn;}\r
+}\r
+}\r
+function runHook(fnHookTo, hookType) {var l=hookPts[fnHookTo], optPm, arS, ar=runHook.arguments;\r
+if (hookType==FREPLACE) {arS=argToString(ar, 2);\r
+if (typeof l=='undefined'||!(l=l.ovload)) return eval(fnHookTo+'('+arS+')');else return eval('l('+arS+')');\r
+} else if (hookType==FBEFORE||hookType==FAFTER) {if (typeof l=='undefined') return;l=(hookType==1?l.before:l.after);\r
+if (!l.length) return;\r
+arS=argToString(ar, 2);for (var k=0; k<l.length; k++) eval('l[k]('+arS+')');\r
+} else if (hookType==FALTERNATE) {optPm=ar[2];arS=argToString(ar, 3);\r
+if (typeof l=='undefined'||(l=l.alt[pms[optPm-1-pmStart]])=='undefined') {return eval(fnHookTo+'('+arS+')');} else {return eval('l('+arS+')');}\r
+}\r
+}\r
+function isFunction(fnRef) {var rtn=true;\r
+if (typeof fnRef=='object') {for (var i=0; i<fnRef.length; i++) {if (typeof fnRef[i]=='function') continue;rtn=false;break;}\r
+} else if (typeof fnRef!='function') {rtn=false;}\r
+return rtn;}\r
+function argToString(array, strtInd, argName) {var jS=strtInd, aS='', ar=array;argName=(argName?argName:'ar');\r
+if (ar.length>jS) {for (var k=jS; k<ar.length; k++) aS+=argName+'['+k+'], ';aS=aS.substring(0, aS.length-2);}\r
+return aS;}\r
+function reOrder(hookPt, fnRef, order) {if (!order||typeof order=='undefined'||typeof order=='number') return;\r
+var newPt=new Array(), match;\r
+if (typeof order=='function') {if (typeof fnRef=='object') {newPt=newPt.concat(fnRef);} else {newPt[newPt.length++]=fnRef;}\r
+for (var i=0; i<hookPt.length; i++) {match=false;if (typeof fnRef=='function'&&hookPt[i]==fnRef) {continue;} else {for(var j=0; j<fnRef.length; j++) if (hookPt[i]==fnRef[j]) {match=true;break;}\r
+}\r
+if (!match) newPt[newPt.length++]=hookPt[i];}\r
+newPt[newPt.length++]=order;\r
+} else if (typeof order=='object') {if (typeof fnRef=='object') {newPt=newPt.concat(fnRef);} else {newPt[newPt.length++]=fnRef;}\r
+for (var j=0; j<hookPt.length; j++) {match=false;if (typeof fnRef=='function'&&hookPt[j]==fnRef) {continue;} else {for (var i=0; i<fnRef.length; i++) if (hookPt[j]==fnRef[i]) {match=true;break;}\r
+}\r
+if (!match) newPt[newPt.length++]=hookPt[j];}\r
+for (i=0; i<newPt.length; i++) hookPt[i]=newPt[i];newPt.length=0;\r
+for (var j=0; j<hookPt.length; j++) {match=false;for (var i=0; i<order.length; i++) {if (hookPt[j]==order[i]) {match=true;break;}\r
+}\r
+if (!match) newPt[newPt.length++]=hookPt[j];}\r
+newPt=newPt.concat(order);}\r
+for(i=0; i<newPt.length; i++) hookPt[i]=newPt[i];\r
+return hookPt;}\r
+function FunctionReference() {this.ovload=null;this.before=new Array();this.after=new Array();this.alt=new Array();}\r
+function Info(version, prerelease) {this.version=version;this.prerelease=prerelease;\r
+this.simpleversion=parseInt(this.version*100);this.major=parseInt(this.simpleversion/100);this.minor=parseInt(this.simpleversion/10)-this.major * 10;this.revision=parseInt(this.simpleversion)-this.major * 100-this.minor * 10;}\r
+registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF);registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF);registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSOFF);registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS);registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS);registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSCLASS);registerHook("hideObject", nbspCleanup, FAFTER);\r
diff --git a/mods/pnATutor/pnincludes/overlib_power.gif b/mods/pnATutor/pnincludes/overlib_power.gif
new file mode 100644 (file)
index 0000000..83d8640
Binary files /dev/null and b/mods/pnATutor/pnincludes/overlib_power.gif differ
diff --git a/mods/pnATutor/pninit.php b/mods/pnATutor/pninit.php
new file mode 100644 (file)
index 0000000..a2c8428
--- /dev/null
@@ -0,0 +1,79 @@
+<?php\r
+// $Id: pninit.php\r
+// ----------------------------------------------------------------------\r
+// POST-NUKE Content Management System\r
+// Copyright (C) 2002 by the PostNuke Development Team.\r
+// http://www.postnuke.com/\r
+// ----------------------------------------------------------------------\r
+// Based on:\r
+// PHP-NUKE Web Portal System - http://phpnuke.org/\r
+// Thatware - http://thatware.org/\r
+// ----------------------------------------------------------------------\r
+// LICENSE\r
+//\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License (GPL)\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+//\r
+// This program is distributed in the hope that it will be useful,\r
+// but WIthOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+// GNU General Public License for more details.\r
+//\r
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html\r
+// ----------------------------------------------------------------------\r
+// Filename: 1.0\r
+// Based on : pnATutor\r
+// Postnuked  by Cas Nuy\r
+// Purpose of file:  Initialisation functions for pnATutor\r
+// ----------------------------------------------------------------------\r
+\r
+/**\r
+ * initialise the pnATutor module\r
+ * This function is only ever called once during the lifetime of this module\r
+ */\r
+function pnATutor_init()\r
+{\r
+\r
+    // pnATutor Default Settings\r
+       pnModSetVar(pnATutor, '_loc', '/ATutor');\r
+       pnModSetVar(pnATutor, '_window', 0);\r
+       pnModSetVar(pnATutor, '_db', 'atutor');\r
+       pnModSetVar(pnATutor, '_prf', '');\r
+       pnModSetVar(pnATutor, '_guest', 'n');\r
+       pnModSetVar(pnATutor, '_users', 'n');\r
+       pnModSetVar(pnATutor, '_version','1.3.1');\r
+   return true;\r
+}\r
+/**\r
+ * update the pnATutor module\r
+ * This function is only ever called once during the lifetime of this module\r
+ */\r
+function pnATutor_upgrade()\r
+{\r
+pnModSetVar(pnATutor, '_prf', '');\r
+return true;\r
+}\r
+\r
+\r
+/**\r
+ * delete the pnATutor module\r
+ * This function is only ever called once during the lifetime of this module\r
+ */\r
+function pnATutor_delete()\r
+{\r
+\r
+pnModDelVar(pnATutor, '_loc');\r
+pnModDelVar(pnATutor, '_window');\r
+pnModDelVar(pnATutor, '_wrap');\r
+pnModDelVar(pnATutor, '_db');\r
+pnModDelVar(pnATutor, '_guest');\r
+pnModDelVar(pnATutor, '_users');\r
+pnModDelVar(pnATutor, '_version');\r
+pnModDelVar(pnATutor, '_prf');\r
+\r
+return true;\r
+}\r
+\r
+?>\r
diff --git a/mods/pnATutor/pnlang/eng/admin.php b/mods/pnATutor/pnlang/eng/admin.php
new file mode 100644 (file)
index 0000000..287c168
--- /dev/null
@@ -0,0 +1,21 @@
+<?php\r
+/************************************************************************/\r
+/* pnNetjuke                  (lang/eng/admin.php)                      */\r
+/************************************************************************/\r
+\r
+/*---ADMIN-TEXT--------------------------------------------------------------*/\r
+define("_MODSUBJECT", "The Location of the ATutor installation");\r
+define("_MODWARNING", "Do not use the trailing slash !!!!");\r
+define("_MODERROR", "Error message when logon fails");\r
+define("_MODWINDOW", "Open Application Full Screen");\r
+define("_MODDB", "Name of the ATutor-Database (for future sideblock) ");\r
+define('_PNATUTOR_PREFIX','Prefix ATutor Database :');\r
+define("_MODGUEST", "Allow Guest access ( y/n )");\r
+define("_MODUSERS", "Create PostNuke users ( y/n )");\r
+define("_PNATUTORNOAUTH", "You are not authorised for this action");\r
+define("_PNATUTOR", "pnATutor 2.2");\r
+define("_PNATUTORMODIFYCONFIG", "Modify pnATutor Configuration");\r
+define("_PNATUTORUPDATE", "Update pnATutor Configuration");\r
+define("_PNATUTORVERSION", "Version of ATutor (default 1.3.1) :");\r
+/*---END-ADMIN-TEXT----------------------------------------------------------*/\r
+?>\r
diff --git a/mods/pnATutor/pnlang/eng/courses.php b/mods/pnATutor/pnlang/eng/courses.php
new file mode 100644 (file)
index 0000000..2d00835
--- /dev/null
@@ -0,0 +1,8 @@
+<?php\r
+define('_AMOUNT','Amount of Courses to show :');\r
+define('_PNATUTORMODULE','Go to ATutor');\r
+define('_USE_JAVA','Use Java script in Block (y/n) : ');\r
+define('_LOAD_JAVA','Load Java Sript (y/n) : ');\r
+define('_TRIM','Trim titles to X  ( 0 = no trim) :');\r
+define('_ENROLLED','Show only Courses already Enrolled (y/n) : ');\r
+?>\r
diff --git a/mods/pnATutor/pntemplates/pnATutor_block_courses.htm b/mods/pnATutor/pntemplates/pnATutor_block_courses.htm
new file mode 100644 (file)
index 0000000..2e4e115
--- /dev/null
@@ -0,0 +1,26 @@
+<!--[*  $Id: pnATutor_block_courses.htm,v 1.4 2004/02/05 23:43:19 markwest Exp $  *]-->\r
+<!--[if $loadjava eq 'y']-->\r
+<div id=overDiv style=position:absolute; visibility:hidden; z-index:1000;></div><script language=JavaScript src="modules/<!--[$modname]-->/pnincludes/overlib_mini.js"><!-- overLIB (c) Erik Bosrup --></script>\r
+<!--[else]-->\r
+<div style="text-align:center;">\r
+<!--[/if]-->\r
+<!--[section name="items" loop=$items]-->\r
+<!--[if $usejava eq 'y']-->\r
+<A HREF="index.php?module=pnATutor&func=view&id=<!--[$items[items].id]-->" onmouseover="return overlib('<!--[$items[items].summary]-->');" onmouseout="return nd()";"><!--[$items[items].title]--></A>\r
+<!--[else]-->\r
+<A HREF="index.php?module=pnATutor&func=view&id=<!--[$items[items].id]-->"><!--[$items[items].title]--></A>\r
+<!--[/if]-->\r
+<br>\r
+<!--[/section]-->\r
+<br>\r
+<A HREF="<!--[$url1]-->"><!--[$urllink]--></A>\r
+</div>\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/mods/pnATutor/pntemplates/pnATutor_block_courses_modify.htm b/mods/pnATutor/pntemplates/pnATutor_block_courses_modify.htm
new file mode 100644 (file)
index 0000000..02d1896
--- /dev/null
@@ -0,0 +1,44 @@
+<tr>\r
+  <td>\r
+    <label for="amount"><!--[pnml name="_AMOUNT"]--></label>\r
+  </td>\r
+  <td>\r
+    <input id="amount" type="text" name="amount" value="<!--[$amount|pnvarprephtmldisplay]-->" size="5" maxlength="5" />\r
+  </td>\r
+</tr>\r
+\r
+<tr>\r
+  <td>\r
+    <label for="usejava"><!--[pnml name="_USE_JAVA"]--></label>\r
+  </td>\r
+  <td>\r
+    <input id="usejava" type="text" name="usejava" value="<!--[$usejava|pnvarprephtmldisplay]-->" size="1" maxlength="1" />\r
+  </td>\r
+</tr>\r
+\r
+<tr>\r
+  <td>\r
+    <label for="loadjava"><!--[pnml name="_LOAD_JAVA"]--></label>\r
+  </td>\r
+  <td>\r
+    <input id="loadjava" type="text" name="loadjava" value="<!--[$loadjava|pnvarprephtmldisplay]-->" size="1" maxlength="1" />\r
+  </td>\r
+</tr>\r
+\r
+<tr>\r
+  <td>\r
+    <label for="trim"><!--[pnml name="_TRIM"]--></label>\r
+  </td>\r
+  <td>\r
+    <input id="trim" type="text" name="trim" value="<!--[$trim|pnvarprephtmldisplay]-->" size="2" maxlength="2" />\r
+  </td>\r
+</tr>\r
+\r
+<tr>\r
+  <td>\r
+    <label for="enrolled"><!--[pnml name="_ENROLLED"]--></label>\r
+  </td>\r
+  <td>\r
+    <input id="enrolled" type="text" name="enrolled" value="<!--[$enrolled|pnvarprephtmldisplay]-->" size="1" maxlength="1" />\r
+  </td>\r
+</tr>\r
diff --git a/mods/pnATutor/pnuser.php b/mods/pnATutor/pnuser.php
new file mode 100644 (file)
index 0000000..b1ceeb2
--- /dev/null
@@ -0,0 +1,147 @@
+<?php\r
+function pnATutor_user_main() {\r
+$loc1=pnModGetVar('pnATutor', '_loc');\r
+$loc=trim($loc1);\r
+$window=pnModGetVar('pnATutor', '_window');\r
+$wrap=pnModGetVar('pnATutor', '_wrap');\r
+$guest=pnModGetVar('pnATutor', '_guest');\r
+$users=pnModGetVar('pnATutor', '_users');\r
+$db=pnModGetVar('pnATutor', '_db');\r
+$version=pnModGetVar('pnATutor', '_version');\r
+\r
+$username=pnUserGetVar(uname);\r
+$usermail=pnUserGetVar(email);\r
+\r
+if (!pnUserLoggedIn()) {\r
+       if ($guest == 1){\r
+               $username= "Guest" ;\r
+       } else {\r
+               $username= "" ;\r
+       }\r
+}\r
+$home = pnGetBaseURL() ;\r
+$parm = $username ;\r
+$parm .="|";\r
+$parm .= $usermail;\r
+$parm .="|";\r
+$parm .= $users;\r
+$parm .="|";\r
+$parm .= $db;\r
+$parm .="|";\r
+$parm .= $home ;\r
+$parm .="|";\r
+$parm .= 0;\r
+$parm .="|";\r
+$parm .= 0 ;\r
+$parm .="|";\r
+$parm .= $version ;\r
+\r
+\r
+$url="$loc/index_pn.php?parm=$parm";\r
+\r
+if ($window == 1 ) {\r
+       $url="$loc/index_pn.php?parm=$parm&check=$check";\r
+       ?>\r
+       <script type="text/javascript">\r
+       window.open('<?php echo $url;?>')\r
+       </script>\r
+       <?php\r
+}\r
+\r
+$go = pnATutor_user_go($url) ;\r
+\r
+return true;\r
+\r
+}\r
+\r
+\r
+function pnATutor_user_view() {\r
+$cid = pnVarCleanFromInput('id');\r
+\r
+$loc1=pnModGetVar('pnATutor', '_loc');\r
+$loc=trim($loc1);\r
+$window=pnModGetVar('pnATutor', '_window');\r
+$wrap=pnModGetVar('pnATutor', '_wrap');\r
+$guest=pnModGetVar('pnATutor', '_guest');\r
+$users=pnModGetVar('pnATutor', '_users');\r
+$db=pnModGetVar('pnATutor', '_db');\r
+$version=pnModGetVar('pnATutor', '_version');\r
+\r
+$username=pnUserGetVar(uname);\r
+$usermail=pnUserGetVar(email);\r
+\r
+if (!pnUserLoggedIn()) {\r
+       if ($guest == 1){\r
+               $username= "Guest" ;\r
+       } else {\r
+               $username= "" ;\r
+       }\r
+}\r
+$home = pnGetBaseURL() ;\r
+$parm = $username ;\r
+$parm .="|";\r
+$parm .= $usermail;\r
+$parm .="|";\r
+$parm .= $users;\r
+$parm .="|";\r
+$parm .= $db;\r
+$parm .="|";\r
+$parm .= $home ;\r
+$parm .="|";\r
+$parm .= $cid;\r
+$parm .="|";\r
+$parm .= 0 ;\r
+$parm .="|";\r
+$parm .= $version ;\r
+\r
+\r
+$url="$loc/index_pn.php?parm=$parm";\r
+\r
+if ($window == 1 ) {\r
+       $url="$loc/index_pn.php?parm=$parm&check=$check";\r
+       ?>\r
+       <script type="text/javascript">\r
+       window.open('<?php echo $url;?>')\r
+       </script>\r
+       <?php\r
+}\r
+$go = pnATutor_user_go($url) ;\r
+\r
+return true;\r
+\r
+}\r
+\r
+function pnATutor_user_go($url=""){\r
+\r
+$guest=pnModGetVar('pnATutor', '_guest');\r
+$window=pnModGetVar('pnATutor', '_window');\r
+$home = pnGetBaseURL() ;\r
+$home .= "user.php?op=loginscreen&module=NS-User" ;\r
+\r
+include("header.php");\r
+if ($window != 1 ) {\r
+echo "<script language='javascript' type='text/javascript'>";\r
+echo "function iFrameHeight() {";\r
+echo "  var h = 0;";\r
+echo " if ( !document.all ) {";\r
+echo "         h = document.getElementById('blockrandom').contentDocument.height;";\r
+echo "         document.getElementById('blockrandom').style.height = h + 60 + 'px';";\r
+echo " } else if( document.all ) {";\r
+echo "         h = document.frames('blockrandom').document.body.scrollHeight;";\r
+echo "         document.all.blockrandom.style.height = h + 20 + 'px';";\r
+echo " }";\r
+echo "}";\r
+echo "</script>";\r
+echo "<iframe onload='iFrameHeight()' id='blockrandom' name='pnSMF'";\r
+echo "  src='$url' width='100%' height='400' scrolling='auto' align='top' frameborder='0'>";\r
+echo "</iframe>";\r
+}else{\r
+echo pnVarPrepHTMLDisplay(_PNSMF_LAUNCHED);\r
+}\r
+include("footer.php");\r
+return true;\r
+\r
+\r
+}\r
+\r
+?>\r
diff --git a/mods/pnATutor/pnversion.php b/mods/pnATutor/pnversion.php
new file mode 100644 (file)
index 0000000..8a6d35a
--- /dev/null
@@ -0,0 +1,18 @@
+<?php\r
+/************************************************************************/\r
+/* pnATutor                  (Version.php)                             */\r
+/************************************************************************/\r
+$modversion['name'] = 'pnATutor';  //Module name\r
+$modversion['version'] = '2.2';  //Version number\r
+$modversion['description'] = 'Postnuke ATutor Hack';  //Module description\r
+$modversion['credits'] = 'pndocs/credits.txt';  //Credits file\r
+$modversion['help'] = 'pndocs/readme.txt';  //Help file\r
+$modversion['changelog'] = 'pndocs/changelog.txt';  //Change log file\r
+$modversion['license'] = 'pndocs/license.txt';  //License file\r
+$modversion['official'] = '0';  //Official PostNuke Approved Module 1 = yes, 0 = no\r
+$modversion['author'] = 'Cas Nuy';  //Author\r
+$modversion['contact'] = 'Cas@nuy.info';  //The authors website or contact email address\r
+$modversion['admin'] = 1;\r
+$modversion['securityschema'] = array('pnATutor::' => '::');\r
+\r
+?>\r