# /www/master-default.tcl
#
# Set basic attributes and provide the logical defaults for variables that
# aren't provided by the slave page.
#
# Author: Kevin Scaldeferri (kevin@arsdigita.com)
# Creation Date: 14 Sept 2000
# $Id: azure.tcl,v 1.3 2006/03/15 17:11:45 cvs Exp $
#

# fall back on defaults
ad_page_contract {

    Passion Theme
    
    @author SriHarsha Chintalapani(sriharsha.ch@azri.biz)
    @cvs-id $Id: azure.tcl,v 1.3 2006/03/15 17:11:45 cvs Exp $
} {
    {search_p:optional}
    {help_p:optional}
    {from_cms_p:optional}
} 



if { [template::util::is_nil subnavbar_link] } {
    set subnavbar_link ""
}


set skin_css [list "/skin/css/azure/azure.css" "/skin/css/azure/maincontent.css" "/skin/css/azure/portlets.css" ]
set package_id [ad_conn package_id]
if { ![exists_and_not_null help_p] } {
set help_p ""
}
if { $help_p == "on" } {
    set helpon [parameter::set_value -parameter help_p -value off]
} elseif { $help_p == "off" } {
    set helpon [parameter::set_value -parameter help_p -value on]
}

set package_key [apm_package_key_from_id $package_id]
#get the user_id
set user_id [ad_get_user_id]

#Context Bar
 if { [info exists context] } {

     lappend context_tmp $context
     unset context
 } else {
     set context_tmp {}
 }

if {![exists_and_not_null from_cms_p]} {
    set from_cms_p ""
}

ad_context_bar_multirow  -- $context_tmp


if { ![info exists active_section] } {
switch -exact -- $package_key {
    user-directory { set active_section 2 }
    photo-album { set active_section 3 }
    dotlrn { set active_section 4 }
    edit-this-page {
	if {[exists_and_not_null from_cms_p]} {
	    set active_section 1
	} else {
	    set active_section 5
	}
    } 
    bug-tracker {set active_section 7}
    sbn {set active_section 6}
    events {set active_section 10}
    mailing-lists/index {set active_section 8}    
    
    default { set active_section 1 }
}
}
 if { [template::util::is_nil title] } {
    set title [ad_conn instance_name]
}


if {[exists_and_not_null navigation_second]} {
 foreach naventry $navigation_second {
	  set navtext [lindex $naventry 0]
	  set navlink [lindex $naventry 1]
          append navhref "<a href=\"$navlink\">$navtext</a>&nbsp;|&nbsp;"

 }
}


if {[exists_and_not_null navigation_third]} {
 append nav3href "<table>"
 foreach nav3entry $navigation_third {
	  set nav3text [lindex $nav3entry 0]
	  set nav3link [lindex $nav3entry 1]
     
     append nav3href "<tr align=left><td><font size=2><a href=\"$nav3link\">$nav3text</a></font>&nbsp;</td></tr><tr></tr>"
     

 }
append nav3href "</table>"
}
