Index: openacs-4/packages/latest/latest.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/latest.info,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/latest.info	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- Generated by the OpenACS Package Manager -->
+
+<package key="latest" url="http://openacs.org/repository/apm/packages/latest" type="apm_service">
+    <package-name>Latest</package-name>
+    <pretty-plural></pretty-plural>
+    <initial-install-p>f</initial-install-p>
+    <singleton-p>t</singleton-p>
+    <auto-mount>latest</auto-mount>
+
+    <version name="0.1b1" url="http://openacs.org/repository/download/apm/latest-0.1b1.apm">
+        <owner url="mailto:hr_amado@viaro.net">Hector Amado</owner>
+        <owner url="mailto:roc@viaro.net">Rocael Hernandez</owner>
+        <release-date>2006-06-29</release-date>
+        <vendor url="http://www.viaro.net">Viaro Networks</vendor>
+        <maturity>3</maturity>
+
+        <provides url="latest" version="0.1b1"/>
+
+        <callbacks>
+        </callbacks>
+        <parameters>
+            <parameter datatype="number"  min_n_values="1"  max_n_values="1"  name="LinksPerApplication"  default="5" description="Max number of links per application to be shown at the player."/>
+        </parameters>
+
+    </version>
+</package>
Index: openacs-4/packages/latest/tcl/callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/tcl/callback-procs.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/tcl/callback-procs.tcl	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,63 @@
+# Tcl callback proc implementations
+
+ad_proc -public -callback subsite::get_extra_headers -impl latest {} {
+    return the stuff to run well in the latest frame viewer
+} {
+    set scripts {
+<script type="text/javascript">
+
+function hide_headers(){
+    if (top.location != location) { 
+	var siteheader=document.getElementById?document.getElementById("site-header"):null;
+	siteheader.style.display='none';
+	var contextbar=document.getElementById?document.getElementById("context-bar"):null;
+	contextbar.style.display='none';
+	var navbarx=document.getElementById?document.getElementById("navbarx"):null;
+	navbarx.style.display='none';
+	document.getElementById("pre-page-body").innerHTML="<span id=\"addc1\" style=\"align:left;display:;position:absolute;top:0px;left:0px;\"> \n<a href=\"\#\" onClick=\"return _tp(false)\" title=\"Hide panel\" class=\"show-hide-icon_link\"><img src=\"/latest/resources/ico_hide.gif\" alt=\"Hide\" width=\"21\" height=\"23\" border=\"0\" align=\"top\"/></a> \n</span> \n<span id=\"addc\" style=\"align:left;display:none;position:absolute;top:0px;left:0px;\"> \n<a href=\"\#\" onClick=\"return _tp(true)\" title=\"Show panel\" class=\"show-hide-icon_link\"><img src=\"/latest/resources/ico_show.gif\" alt=\"Show\" width=\"21\" height=\"23\" border=\"0\" align=\"top\"/></a> \n</span> \n";
+    } else {
+	document.getElementById("pre-navbar").innerHTML="<span style=\"align:right;position:absolute;right:20px;\"><a class=\"button\" href=\"/latest\">Latest Stuff</a> \n</span> \n";
+    }
+    return false;
+}
+
+</script>
+
+<script type="text/javascript">
+<!--
+function _gel(a){return document.getElementById?document.getElementById(a):null}
+
+function _tp(a){
+   var ab=_gel("addc");
+   var ac=_gel("addc1");
+
+   if (a) {
+     ai=''; 
+     aj='none';
+     parent.document.getElementById('latest').cols='250,*';
+   } else {
+     ai='none';
+     aj='';
+     parent.document.getElementById('latest').cols='0%,100%';
+   }
+
+   ac.style.display=ai;
+   ab.style.display=aj;
+   
+   return false;
+}
+// -->
+</script>
+
+}
+
+    return $scripts
+}
+
+ad_proc -public -callback subsite::header_onload -impl latest {} {
+    return the function to load when the page is served
+} {
+
+    return {hide_headers();}
+
+}
Index: openacs-4/packages/latest/tcl/latest-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/tcl/latest-procs.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/tcl/latest-procs.tcl	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,156 @@
+# Procs for each type of application
+
+namespace eval latest {}
+
+ad_proc -public latest::forums {
+    -pkgs_ids
+} {
+    Gets all the forums from X time to now.
+} {
+
+    set limit [parameter::get -parameter LinksPerApplication]
+
+    db_multirow -upvar_level 1 forums forums_select "
+    select o.title, o.object_id, t.pretty_name as object_type, to_char(o.last_modified, 'MM-DD-YYYY') as last_modified
+    from acs_object_types t, acs_objects o
+    where t.object_type = o.object_type and
+    o.object_type in ('forums_forum','forums_message')
+    and o.package_id in ($pkgs_ids) order by last_modified desc limit $limit " 
+
+}
+
+ad_proc -public latest::fs {
+    -pkgs_ids
+} {
+    Gets all the file storage objects from X time to now.
+} {
+
+    set limit [parameter::get -parameter LinksPerApplication]
+
+    db_multirow -upvar_level 1 fs fs_select "
+    select o.title, o.object_id, t.pretty_name as object_type, to_char(o.last_modified, 'MM-DD-YYYY') as last_modified
+    from acs_object_types t, acs_objects o
+    where t.object_type = o.object_type and
+    o.object_type in ('file_storage_object')
+    and o.package_id in ($pkgs_ids) order by last_modified desc limit $limit " 
+
+}
+
+
+ad_proc -public latest::asm {
+    -pkgs_ids
+} {
+    Gets all the assessment objects from X time to now.
+} {
+
+    set user_id [ad_conn user_id]
+    set limit [parameter::get -parameter LinksPerApplication]
+
+    set old_comm_node_id 0
+    db_multirow -upvar_level 1 -extend { assessment_url } assessment_sessions answered_assessments "
+	select cr.item_id as assessment_id, cr.title, a.password,
+	       to_char(a.start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time,
+	       to_char(a.end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time,
+	       to_char(now(), 'YYYY-MM-DD HH24:MI:SS') as cur_time,
+               to_char(cr.publish_date, 'MM-DD-YYYY') as publish_date,
+	       sc.node_id as comm_node_id, sa.node_id as as_node_id
+	from as_assessments a, cr_revisions cr, cr_items ci, cr_folders cf,
+	     site_nodes sa, site_nodes sc, apm_packages p
+	where a.assessment_id = cr.revision_id
+	and cr.revision_id = ci.latest_revision
+	and ci.parent_id = cf.folder_id
+		and sa.object_id = cf.package_id
+	and sc.node_id = sa.parent_id
+     and cf.package_id in ($pkgs_ids)
+	and p.package_id = sc.object_id
+	and exists (select 1
+		from as_assessment_section_map asm, as_item_section_map ism
+		where asm.assessment_id = a.assessment_id
+		and ism.section_id = asm.section_id)
+	and acs_permission__permission_p (a.assessment_id, :user_id, 'read') = 't'
+	order by publish_date desc limit $limit
+ " {
+
+     if {([empty_string_p $start_time] || $start_time <= $cur_time) && ([empty_string_p $end_time] || $end_time >= $cur_time)} {
+	 set assessment_url [site_node::get_url -node_id $as_node_id]
+
+	 if {[empty_string_p $password]} {
+	     append assessment_url [export_vars -base "assessment" {assessment_id}]
+	 } else {
+	     append assessment_url [export_vars -base "assessment-password" {assessment_id}]
+	 }
+
+     }
+ }
+
+}
+
+
+ad_proc -public latest::lors {
+    -pkgs_ids
+} {
+    Gets all the lors objects from X time to now.
+} {
+
+    set user_id [ad_conn user_id]
+    set limit [parameter::get -parameter LinksPerApplication]
+
+    db_multirow -upvar_level 1 -extend { course_url } \
+	d_courses select_d_courses "
+           select 
+	   cp.man_id,
+           cp.course_name,
+	   to_char(acs.creation_date, 'MM-DD-YYYY') as creation_date,
+	   pf.folder_name,
+	   pf.format_name,
+           cpmc.lorsm_instance_id
+	from
+           ims_cp_manifests cp, 
+	   acs_objects acs, 
+           ims_cp_manifest_class cpmc, 
+           lorsm_course_presentation_formats pf
+	where 
+           cp.man_id = acs.object_id
+	and
+           cp.man_id = cpmc.man_id
+      and
+         cpmc.lorsm_instance_id in ($pkgs_ids)
+	and
+           cpmc.isenabled = 't'
+	and
+	   pf.format_id = cp.course_presentation_format
+	order by acs.creation_date desc limit $limit
+" {
+    set ims_md_id $man_id
+    if { [string eq $format_name "default"] } {
+
+	set context [site_node::get_url_from_object_id -object_id $lorsm_instance_id]
+	if ([db_0or1row query "
+    		select
+           		cpr.man_id,
+           		cpr.res_id,
+           		case
+              			when upper(scorm_type) = 'SCO' then 'delivery-scorm'
+              			else 'delivery'
+           		end as needscorte
+    			from
+           			ims_cp_resources cpr
+    			where
+				cpr.man_id = :man_id 
+			order by cpr.scorm_type desc limit 1"
+	    ]) {
+
+	    set delivery_method $needscorte
+	    
+	    set course_url_url [export_vars -base "[lindex $context 0]$delivery_method" -url {man_id}]
+	    set course_url "<a href=\"$course_url_url\" title=\"[_ lorsm.Access_Course]\" target=new>$course_name</a>" 
+	    ns_log Debug "lorsm - course_url: $course_url"
+	} else {
+	    set course_url "NO RESOURCES ERROR"
+	} 
+    } else {
+	set course_url "<a href=\"[site_node::get_url_from_object_id -object_id $lorsm_instance_id]${folder_name}/?[export_vars man_id]\" title=\"[_ lorsm.Access_Course]\" target=new>$course_name</a>" 
+    }
+}
+
+}
Index: openacs-4/packages/latest/www/exit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/exit.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/www/exit.tcl	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,18 @@
+# exit.tcl
+
+ad_page_contract {
+    
+    @author Hector Roderico Amado S. (hr_amado@viaro.net)
+    @creation-date 2006-05-11
+    @arch-tag: 7b852c75-e4a6-41de-929b-1cf6f0ec9007
+    @cvs-id $Id: exit.tcl,v 1.1 2006/07/13 03:16:39 rocaelh Exp $
+} {
+    
+} -properties {
+} -validate {
+} -errors {
+}
+
+ad_returnredirect "/dotlrn"
+
+
Index: openacs-4/packages/latest/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/index.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/www/index.adp	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Latest stuff</title>
+</head>
+<frameset name="latest" id="latest" cols="250,*" frameborder="no" border="0" framespacing="0">
+<frame name="leftmenu" src="menu" name="navigator" scrolling="No" noresize="noresize" id="navigator" title="navigator" />
+<frame name="navigator" src="navigator"/>
+</frameset>
+<noframes><body>
+</body>
+</noframes></html>
Index: openacs-4/packages/latest/www/menu.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/menu.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/www/menu.adp	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Latest Menu</title>
+<link href="resources/whatsnew.css" rel="stylesheet" type="text/css" />
+<script src="resources/mktree.js" language="javascript"></script>
+</head>
+
+  <body>
+<div id="toolbox">
+<div class="title">
+Latest stuff 
+</div>
+<div class="contents">
+<span style="align:left;">
+<a href="#" onClick="expandTree('tree1'); return false;">Expand all</a> | <a href="#" onClick="collapseTree('tree1'); return false;">Collapse All</a> | <a href="/dotlrn" title="Exit" target="_top">Exit</a>
+</span>
+
+
+	<ul class="mktree" id="tree1">
+	    <li>#forums-portlet.pretty_name#
+
+                       <ul>
+                        <multiple name="forums">
+			<li><a href="/o/@forums.object_id@" target="navigator">@forums.title@</a><br><i>@forums.last_modified@</i></li>
+			</multiple>
+                       </ul>
+            </li> 
+	    <li>#fs-portlet.pretty_name#
+              <ul>
+                        <multiple name="fs">
+			<li><a href="/o/@fs.object_id@" target="navigator">@fs.title@</a> <i>@fs.last_modified@</i></li>
+			</multiple>
+                       </ul> 
+            </li> 
+           <li>#assessment.Assessments#
+              <ul>
+                        <multiple name="assessment_sessions">
+			<li><a href="@assessment_sessions.assessment_url@"  target="navigator">@assessment_sessions.title@</a><br> <i>@assessment_sessions.publish_date@</i></li>
+			</multiple>
+                       </ul>
+   
+           </li>
+            <li>#lorsm-portlet.Learning_Materials#
+                      <ul>
+                        <multiple name="d_courses">
+			<li>@d_courses.course_url;noquote@  <br> <i>@d_courses.creation_date@</i></li>
+			</multiple>
+
+                      </ul> 
+            </li> 
+        </ul> 
+
+     </div>
+
+</div>
+<br><br>
+  </body>
+
+</html>
Index: openacs-4/packages/latest/www/menu.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/menu.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/www/menu.tcl	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,60 @@
+# /lastest/www/menu.tcl
+ad_page_contract {
+    Left Menu
+    @author Hector Amado (hr_amado@viaro.net)
+    @creation-date 24-03-2006
+
+} {
+} -properties {
+} -validate {
+} -errors {
+}
+
+set user_id [ad_maybe_redirect_for_registration]
+
+# Communities that I belong to
+db_multirow -extend {} communities select_communities "
+   select dotlrn_communities_all.community_id,
+          dotlrn_community__url(dotlrn_communities_all.community_id) as url,
+          pretty_name
+   from
+          dotlrn_communities_all, dotlrn_member_rels_approved
+   where
+          dotlrn_communities_all.community_id = dotlrn_member_rels_approved.community_id and
+          dotlrn_member_rels_approved.user_id = :user_id and archived_p='f'
+" {
+}
+
+# List of pkg_ids
+set communities_list [db_list communities_all_select  "                   
+   select dotlrn_communities_all.package_id
+   from
+          dotlrn_communities_all, dotlrn_member_rels_approved
+   where
+          dotlrn_communities_all.community_id = dotlrn_member_rels_approved.community_id and
+          dotlrn_member_rels_approved.user_id = :user_id and archived_p='f'
+"]
+
+
+set packages_names [list]
+set objects [list]
+set packages  [list]
+
+foreach community $communities_list {
+    set snode [site_node::get_node_id_from_object_id -object_id $community]
+    foreach package [site_node::get_children -all -node_id $snode -element package_id] {
+	if {![empty_string_p $package] } {
+	    lappend packages $package
+	}
+    }
+}
+
+
+if {![llength $packages] == 0 } {
+    set pkgs_ids [join $packages ,]
+    latest::forums -pkgs_ids $pkgs_ids
+    latest::fs -pkgs_ids $pkgs_ids
+    latest::asm -pkgs_ids $pkgs_ids
+    latest::lors -pkgs_ids $pkgs_ids
+}
+
Index: openacs-4/packages/latest/www/navigator.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/navigator.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/www/navigator.adp	13 Jul 2006 03:16:39 -0000	1.1
@@ -0,0 +1,10 @@
+<html>
+<head>
+  <title>Navitator Viaro-Latest</title>
+</head>
+<body bgcolor="#d0d0d0">
+Select an activity type that you want to see the latest information.
+Navigator Viaro-Latest
+
+</body>
+</html>
Index: openacs-4/packages/latest/www/resources/contents_bg.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/contents_bg.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/latest/www/resources/ico_collapse.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/ico_collapse.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/latest/www/resources/ico_expand.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/ico_expand.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/latest/www/resources/ico_hide.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/ico_hide.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/latest/www/resources/ico_show.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/ico_show.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/latest/www/resources/mktree.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/mktree.js,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/www/resources/mktree.js	13 Jul 2006 03:16:43 -0000	1.1
@@ -0,0 +1,258 @@
+// JavaScript Document
+// ===================================================================
+// Author: Matt Kruse <matt@mattkruse.com>
+// WWW: http://www.mattkruse.com/
+//
+// NOTICE: Matt kindly gave OpenACS permission to incorporate his code.
+// Details are here: http://openacs.org/forums/message-view?message_id=284521
+// I'm leaving in his original notice below.  AG.
+//
+// NOTICE: You may use this code for any purpose, commercial or
+// private, without any further permission from the author. You may
+// remove this notice from your final code if you wish, however it is
+// appreciated by the author if at least my web site address is kept.
+//
+// You may *NOT* re-distribute this code in any way except through its
+// use. That means, you can include it in your product, or your web
+// site, or any other form where the code is actually being used. You
+// may not put the plain javascript up on your site for download or
+// include it in your javascript libraries for download. 
+// If you wish to share this code with others, please just point them
+// to the URL instead.
+// Please DO NOT link directly to my .js files from your site. Copy
+// the files to your server and use them there. Thank you.
+// ===================================================================
+
+// HISTORY
+// ------------------------------------------------------------------
+// December 9, 2003: Added script to the Javascript Toolbox
+// December 10, 2003: Added the preProcessTrees variable to allow user
+//      to turn off automatic conversion of UL's onLoad
+// March 1, 2004: Changed it so if a <li> has a class already attached
+//      to it, that class won't be erased when initialized. This allows
+//      you to set the state of the tree when painting the page simply
+//      by setting some <li>'s class name as being "liOpen" (see example)
+// March 29, 2005: Added cookie-managed state (AG).
+/*
+This code is inspired by and extended from Stuart Langridge's aqlist code:
+		http://www.kryogenix.org/code/browser/aqlists/
+		Stuart Langridge, November 2002
+		sil@kryogenix.org
+		Inspired by Aaron's labels.js (http://youngpup.net/demos/labels/) 
+		and Dave Lindquist's menuDropDown.js (http://www.gazingus.org/dhtml/?id=109)
+*/
+
+// Automatically attach a listener to the window onload, to convert the trees
+addEvent(window,"load",convertTrees);
+
+// Utility function to add an event listener
+function addEvent(o,e,f){
+	if (o.addEventListener){ o.addEventListener(e,f,true); return true; }
+	else if (o.attachEvent){ return o.attachEvent("on"+e,f); }
+	else { return false; }
+}
+
+// utility function to set a global variable if it is not already set
+function setDefault(name,val) {
+	if (typeof(window[name])=="undefined" || window[name]==null) {
+		window[name]=val;
+	}
+}
+
+// Full expands a tree with a given ID
+function expandTree(treeId) {
+	var ul = document.getElementById(treeId);
+	if (ul == null) { return false; }
+	expandCollapseList(ul,nodeOpenClass);
+}
+
+// Fully collapses a tree with a given ID
+function collapseTree(treeId) {
+	var ul = document.getElementById(treeId);
+	if (ul == null) { return false; }
+	expandCollapseList(ul,nodeClosedClass);
+}
+
+// Expands enough nodes to expose an LI with a given ID
+function expandToItem(treeId,itemId) {
+	var ul = document.getElementById(treeId);
+	if (ul == null) { return false; }
+	var ret = expandCollapseList(ul,nodeOpenClass,itemId);
+	if (ret) {
+		var o = document.getElementById(itemId);
+		if (o.scrollIntoView) {
+			o.scrollIntoView(false);
+		}
+	}
+}
+
+// Performs 3 functions:
+// a) Expand all nodes
+// b) Collapse all nodes
+// c) Expand all nodes to reach a certain ID
+function expandCollapseList(ul,cName,itemId) {
+	if (!ul.childNodes || ul.childNodes.length==0) { return false; }
+	// Iterate LIs
+	for (var itemi=0;itemi<ul.childNodes.length;itemi++) {
+		var item = ul.childNodes[itemi];
+		if (itemId!=null && item.id==itemId) { return true; }
+		if (item.nodeName == "LI") {
+			// Iterate things in this LI
+			var subLists = false;
+			for (var sitemi=0;sitemi<item.childNodes.length;sitemi++) {
+				var sitem = item.childNodes[sitemi];
+				if (sitem.nodeName=="UL") {
+					subLists = true;
+					var ret = expandCollapseList(sitem,cName,itemId);
+					if (itemId!=null && ret) {
+						item.className=cName;
+						return true;
+					}
+				}
+			}
+			if (subLists && itemId==null) {
+				item.className = cName;
+			}
+		}
+	}
+}
+
+// Search the document for UL elements with the correct CLASS name, then process them
+function convertTrees() {
+	setDefault("treeClass","mktree");
+	setDefault("nodeClosedClass","liClosed");
+	setDefault("nodeOpenClass","liOpen");
+	setDefault("nodeBulletClass","liBullet");
+	setDefault("nodeLinkClass","bullet");
+	setDefault("preProcessTrees",true);
+	if (preProcessTrees) {
+		if (!document.createElement) { return; } // Without createElement, we can't do anything
+		uls = document.getElementsByTagName("ul");
+		for (var uli=0;uli<uls.length;uli++) {
+			var ul=uls[uli];
+			if (ul.nodeName=="UL" && ul.className==treeClass) {
+				processList(ul);
+			}
+		}
+	}
+}
+
+// Process a UL tag and all its children, to convert to a tree
+function processList(ul) {
+	if (!ul.childNodes || ul.childNodes.length==0) { return; }
+	// Iterate LIs
+	for (var itemi=0;itemi<ul.childNodes.length;itemi++) {
+		var item = ul.childNodes[itemi];
+		if (item.nodeName == "LI") {
+			// Iterate things in this LI
+			var subLists = false;
+			for (var sitemi=0;sitemi<item.childNodes.length;sitemi++) {
+				var sitem = item.childNodes[sitemi];
+				if (sitem.nodeName=="UL") {
+					subLists = true;
+					processList(sitem);
+				}
+			}
+			var s= document.createElement("SPAN");
+			var t= '\u00A0'; // &nbsp;
+			s.className = nodeLinkClass;
+			if (subLists) {
+				// This LI has UL's in it, so it's a +/- node
+				if (item.className==null || item.className=="") {
+                    if (rememberCookieP(item) &&
+                      getCookie("mktree-" + item.getAttribute("id"))) {
+                        item.className = getCookie("mktree-" + item.getAttribute("id"));
+                    } else {
+                        item.className = nodeClosedClass;
+                    }
+				}
+				// If it's just text, make the text work as the link also
+				if (item.firstChild.nodeName=="#text") {
+					t = t+item.firstChild.nodeValue;
+					item.removeChild(item.firstChild);
+				}
+				s.onclick = function () {
+					this.parentNode.className = (this.parentNode.className==nodeOpenClass) ? nodeClosedClass : nodeOpenClass;
+                    if (rememberCookieP(this.parentNode)) {
+                       var today = new Date();
+                       var expire = new Date();
+                       expire.setTime(today.getTime() + 3600000*24*3650);
+                       setCookie(
+                         "mktree-" + this.parentNode.getAttribute("id"),
+                         this.parentNode.className,
+                         expire
+                       );
+                    }
+					return false;
+				}
+			}
+			else {
+				// No sublists, so it's just a bullet node
+				item.className = nodeBulletClass;
+				s.onclick = function () { return false; }
+			}
+			s.appendChild(document.createTextNode(t));
+			item.insertBefore(s,item.firstChild);
+		}
+	}
+}
+
+//These cookie functions are by AG
+
+function rememberCookieP(node) {
+    if (node.getAttribute("id") && node.getAttribute("remember") && node.getAttribute("remember") == 1) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+
+//These cookie functions are from 
+//http://www.webreference.com/js/column8/functions.html
+
+/*
+   name - name of the cookie
+   value - value of the cookie
+   [expires] - expiration date of the cookie
+     (defaults to end of current session)
+   [path] - path for which the cookie is valid
+     (defaults to path of calling document)
+   [domain] - domain for which the cookie is valid
+     (defaults to domain of calling document)
+   [secure] - Boolean value indicating if the cookie transmission requires
+     a secure transmission
+   * an argument defaults when it is assigned null as a placeholder
+   * a null placeholder is not required for trailing omitted arguments
+*/
+
+function setCookie(name, value, expires, path, domain, secure) {
+  var curCookie = name + "=" + escape(value) +
+      ((expires) ? "; expires=" + expires.toGMTString() : "") +
+      ((path) ? "; path=" + path : "") +
+      ((domain) ? "; domain=" + domain : "") +
+      ((secure) ? "; secure" : "");
+  document.cookie = curCookie;
+}
+
+
+/*
+  name - name of the desired cookie
+  return string containing value of specified cookie or null
+  if cookie does not exist
+*/
+
+function getCookie(name) {
+  var dc = document.cookie;
+  var prefix = name + "=";
+  var begin = dc.indexOf("; " + prefix);
+  if (begin == -1) {
+    begin = dc.indexOf(prefix);
+    if (begin != 0) return null;
+  } else
+    begin += 2;
+  var end = document.cookie.indexOf(";", begin);
+  if (end == -1)
+    end = dc.length;
+  return unescape(dc.substring(begin + prefix.length, end));
+}
Index: openacs-4/packages/latest/www/resources/title_bg.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/title_bg.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/latest/www/resources/whatsnew.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/latest/www/resources/whatsnew.css,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/latest/www/resources/whatsnew.css	13 Jul 2006 03:16:43 -0000	1.1
@@ -0,0 +1,96 @@
+/* CSS Document */
+
+body {
+	font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+	font-size: 12px;
+	color: #666666;
+	line-height: 1.5em;
+	margin: 10px;
+}
+a {
+	color: #336699;
+	text-decoration: none;
+}
+a:hover {
+	color: #0066FF;
+	text-decoration: underline;
+}
+#toolbox_hidden {
+	background-color: #e4ebff;
+	background-image: url(images/title_bg.gif);
+	background-repeat: repeat-x;
+	border: 1px solid #b6bdcc;
+	padding: 5px;
+	width: 10px;
+ 	position: absolute;
+	z-index: auto;
+	left: 10px;
+	top: 10px;
+	right: 10px;
+	bottom: 10px;
+}
+#toolbox {
+	background-color: #e4ebff;
+	border: 1px solid #b6bdcc;
+	width: 230px;
+}
+#toolbox .title {
+	background-image: url(title_bg.gif);
+	background-repeat: repeat-x;
+	padding: 10px;
+	font-size: 16px;
+	font-weight: bold;
+	color: #666666;
+	border-bottom: 1px solid #b6bdcc;
+}
+#toolbox .contents {
+	background-image: url(contents_bg.gif);
+	background-repeat: repeat-x;
+	padding: 10px;
+}
+#toolbox .date {
+	font-size: 10px;
+	color: #999999;
+}
+.show-hide-icon_link {
+	text-decoration: none;
+}
+/* MKTREE Script Related below */
+
+ul.mktree li {
+	list-style: none;
+} 
+
+ul.mktree, ul.mktree ul , ul.mktree li {
+	margin-left:5px;
+}
+
+ul.mktree li .bullet {
+	padding-left: 15px;
+}
+
+ul.mktree li.liOpen .bullet {
+	cursor: pointer;
+	background: url(ico_collapse.gif);
+	background-repeat: no-repeat;
+	background-position: center left;
+}
+
+ul.mktree li.liClosed .bullet {
+	cursor: pointer;
+	background: url(ico_expand.gif);
+	background-repeat: no-repeat;
+	background-position: center left;
+}
+
+ul.mktree li.liBullet .bullet {
+	cursor: default; background: url(/resources/acs-templating/bullet.gif) center left no-repeat;
+}
+
+ul.mktree li.liOpen ul {
+	display: block;
+}
+	
+ul.mktree li.liClosed ul {
+	display: none;
+}