// -------------------------------------------------------------------
// Switch Content Script- By Dynamic Drive, available at: http://www.dynamicdrive.com
// Created: Jan 5th, 2007
// Last updated: Jan 25th, 2007. Fixed defaultExpanded() feature not working when persistence is enabled (applicable only for 1st page load)
// -------------------------------------------------------------------

//   MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
//1) Instance.setStatus(openHTML, closedHTML)- Sets optional HTML to prefix the headers to indicate open/closed states
//2) Instance.collapsePrevious(true/false)- Sets whether previous content should be contracted when current one is expanded
//3) Instance.defaultExpanded(indices)- Sets contents that should be expanded by default (ie: 0, 1). Persistence feature overrides this setting!
//4) Instance.init() REQUIRED
var box=new switchcontent("group1", "div") //Limit scanning of switch contents to just "div" elements
box.setStatus('<a href="#" title="Urlaubsplaner zuklappen"><img src="img/objects/assi_button_1_' + lang + '.png" class="arrow" /></a>', '<a href="#"  title="Urlaubsplaner aufklappen"><img src="img/objects/assi_button_0_' + lang + '.png" class="arrow" /></a>')
box.collapsePrevious(0)
box.defaultExpanded(4)
box.init()

var adress=new switchcontent("group2", "div") //Limit scanning of switch contents to just "div" elements
adress.setStatus('<img src="img/objects/icon_close.gif" width="15" height="15" border="0" alt="" class="icon" /"><span class="switch_title">Zus&auml;tzliche Formularfelder schlie&szlig;en</span>', '<img src="img/objects/icon_open.gif" width="15" height="15" border="0" alt="" class="icon" /><span class="switch_title">Zus&auml;tzliche Formularfelder &ouml;ffnen</span>')
adress.collapsePrevious(1)
adress.defaultExpanded(1)
adress.init()

/* container formularelemente filter */
var formbox=new switchcontent("group3", "div") //Limit scanning of switch contents to just "div" elements
formbox.setStatus('<span class="img"><img src="img/objects/icon_minus.gif" width="11" height="11" border="0" alt="" /></span>', '<span class="img"><img src="img/objects/icon_plus.gif" width="11" height="11" border="0" alt="" /></span>')
formbox.collapsePrevious()
//formbox.defaultExpanded()
//formbox.init()