function cdd_menu355390(){//////////////////////////Start Menu Data/////////////////////////////////

this.menu_background_color = "#DCEDF5"
this.menu_items_text_color = "#003366"
this.menu_items_text_decoration = "none"
this.menu_items_font_family = "Tahoma"
this.menu_items_font_size = "11px"
this.menu_items_font_style = "normal"
this.menu_items_font_weight = "normal"
this.menu_items_text_align = "left"
this.menu_border_color = "#6f6f6f"
this.menu_border_width = 1
this.menu_padding = "0,0,0,0"
this.menu_items_padding = "4,5,4,5"
this.menu_border_style = "solid"
this.menu_items_border_style = "solid"
this.menu_items_border_width = 0
this.divider_caps = true
this.divider_width = 1
this.divider_height = 1
this.divider_background_color = "#CCCCCC"
this.divider_border_style = "none"
this.divider_border_width = 0
this.divider_border_color = "#000000"
this.menu_is_horizontal = false
this.menu_is_horizontal_main = true
this.menu_width = "130"
this.menu_items_width = 110
this.menu_xy = "-111,2"
this.uid = 355390
this.menu_scroll_direction = 1
this.menu_scroll_reverse_on_hide = true
this.menu_scroll_delay = 0
this.menu_scroll_step = 5
this.rel_icon_image0 = "../images/squares_0.gif"
this.rel_icon_rollover0 = "../images/squares_0_hl.gif"
this.rel_icon_image_wh0 = "13,8"
this.icon_rel = 0
this.item0 = "ABOUT USINPAC"
this.item0_0 = "Mission Objective"
this.url0_0 = "../mission_objective.asp"
this.item0_1 = "Achievements"
this.url0_1 = "../achievements.asp"
this.item0_2 = "Executive Committee"
this.url0_2 = "../our_team.asp"
this.item0_3 = "Committees"
this.url0_3 = "../committees.asp"
this.item0_4 = "Indian American Census &nbsp;&nbsp;&nbsp;&nbsp;Profile"
this.url0_4 = "../indian_americans2.asp"
this.item1 = "NEWS"
this.item1_0 = "Press Releases"
this.url1_0 = "../news.asp"
this.item1_1 = "Media Coverage"
this.url1_1 = "../media_coverage.asp"
//this.item1_2 = "Newsletter"
//this.url1_2 = "../newsletter.asp"
this.item2 = "EVENTS"
this.url2 = "../EventLists.asp"
this.item3 = "ISSUES"
this.url3 = "../issues.asp"
this.item4 = "GRASSROOTS"
this.item5 = "INFORMATION CENTER"
this.item6 = "MEMBERSHIP"
this.url6 = "../membership.asp"
this.item7 = "GET INVOLVED"
this.item7_0 = "FAQ's "
this.url7_0 = "../faq.asp"
this.item7_1 = "Join USINPAC "
this.url7_1 = "../register.asp"
this.item7_2 = "Contribute"
//this.url7_2 = "#"
<!--this.menu_xy7_2 = "2,-22"-->
this.item7_2_0 = "Contribute to USINPAC, Make the wheels strong!"
this.url7_2_0 = "http://pleasecontribute.com/7491"
this.item7_2_1 = "Contribute to candidates of your choice directly!"
this.url7_2_1 = "http://www.fundraisingbynet.net/fbn/contributionFunds.asp?guidRegistration=585B565E"
this.item7_3 = "Volunteer"
this.url7_3 = "../volunteer.asp"
this.item7_4 = "Internship"
this.url7_4 = "../internship.asp"
//this.item7_4 = "Opportunities "
//this.url7_4 = "../opportunities.asp"
this.item7_5 = "Petition"
this.url7_5 = "../petitions.asp"
//this.item7_5 = "Opinion Poll"
//this.url7_5 = "../opinion_poll.asp"
this.item7_6 = "Contact Us"
this.url7_6 = "../contact_us.asp"




this.menu_padding_main = "0,0,0,0"
this.menu_items_text_color_roll = "#990000"
this.menu_background_color_main = ""
this.menu_border_color_main = "#666666"
this.menu_items_text_color_main = "#ffffff"
this.menu_items_background_color_main = ""
this.menu_items_border_color_main = "#000000"
this.divider_background_color_main = "#999999"
this.menu_items_text_color_roll_main = "#990000"
this.menu_items_background_color_roll_main = "#DCEDF5"
this.menu_items_border_color_roll_main = "#000000"
this.rel_icon_image1 = "../images/circle_4.gif"
this.rel_icon_image_wh1 = "12,8"
this.rel_icon_rollover1 = "../images/circle_4.gif"
this.menu_items_text_decoration_roll = "none"
this.menu_animation = "progid:DXImageTransform.Microsoft.none(duration=0.3)"
this.url = "../under_construction.asp"
this.menu_width0 = 156
this.item_width0 = 109
this.item_width5 = 138
this.item_width1 = 73
this.menu_xy1 = "-74,2"
this.item_width2 = 76
this.item_width3 = 74
this.menu_items_font_family_roll_main = "Tahoma"
this.menu_items_font_style_roll_main = "normal"
this.menu_items_font_weight_roll_main = "normal"
this.menu_items_font_size_roll_main = "11px"
//this.url2 = "../under_construction.asp"
//this.url3 = "../under_construction.asp"
//this.url4 = "../under_construction.asp"
this.item_width4 = 101
//this.url5 = "../under_construction.asp"
//this.url6 = "../under_construction.asp"
this.item_width6 = 101
this.item_width7 = 101
this.menu_xy6 = "-102,2"
//this.item1_2 = "News Media"
//this.url1_2 = "../under_construction.asp"
this.item2_0 = "Activities "
this.url2_0 = "../activities.asp"
this.menu_xy2 = "-77,2"
this.item2_1 = "Photo Gallery"
this.url2_1 = "../photo_gallery.asp"
this.item2_2 = "Events Calendar"
this.url2_2 = "../EventLists.asp"
//this.item3_0 = "Terrorism and Homeland Security" Changed by Purushartha as requested by Michael
//this.url3_0 = "../issue_details.asp?News_ID=3" Changed by Purushartha as requested by Michael
//this.menu_xy3 = "-75,2" Changed by Purushartha as requested by Michael
//this.item3_1 = "US-India Trade" Changed by Purushartha as requested by Michael
//this.url3_1 = "../issue_details.asp?News_ID=4" Changed by Purushartha as requested by Michael
//this.item3_1_0 = "AIDS/HIV" Changed by Purushartha as requested by Michael
//this.url3_1_0 = "../issue_details.asp?News_ID=5" Changed by Purushartha as requested by Michael
//this.item3_1_1 = "Immigration" Changed by Purushartha as requested by Michael
//this.url3_1_1 = "../immigration.asp" Changed by Purushartha as requested by Michael

//this.item3_3 = "US India Strategic relations" 
//this.url3_3 = "../under_construction.asp" 
//this.item3_4 = "Hate Crimes"
//this.url3_4 = "../under_construction.asp"
//this.item3_5 = "Key Positions in the Administration"
//this.url3_5 = "../under_construction.asp"


this.menu_xy4 = "-102,2"
this.item4_0 = "National Outreach Program"
this.url4_0 = "../nat_outreach_program.asp"
//this.item4_1 = "Committees"
//this.url4_1 = "../committees.asp"
this.item4_1 = "Youth Committee"
this.url4_1 = "../youth_committee.asp"
this.item5_0 = "For Members of USINPAC"
//this.url5_0 = "#"
this.menu_xy5 = "-139,2"
this.item5_1 = "For Members of Congress"
//this.url5_1 = "#"
this.item5_0_0 = "List of Members of Senate Caucus"
this.url5_0_0 = "../members_senate_caucus.asp"
this.menu_xy5_0 = "2,-23"
this.item5_0_1 = "List of Members of House Caucus"
this.url5_0_1 = "../members_house_caucus.asp"
this.item5_0_2 = "Legislative info"
this.url5_0_2 = "../legislative_info.asp"
this.item5_1_0 = "About Indian Americans"
this.url5_1_0 = "../indian_americans.asp"
this.menu_xy5_1 = "2,-22"
this.item5_1_1 = "IA Demographics"
this.url5_1_1 = "../ia_demographics.asp"
this.item5_1_2 = "Our Position on Issues"
this.url5_1_2 = "../issues.asp"
this.item5_1_3 = "Current Legislation"
this.url5_1_3 = "../legislative_info.asp"
this.item5_2 = "Indian American &nbsp;&nbsp;&nbsp;&nbsp;Candidates Supported by &nbsp;&nbsp;&nbsp;  USINPAC"
this.url5_2 = "../indian_americans_candidates.asp"
this.item5_3 = "Indian American Political &nbsp;&nbsp;&nbsp;&nbsp;Appointments Facilitated  &nbsp;&nbsp;&nbsp;&nbsp;by USINPAC"
this.url5_3 = "../indian_americans_facilitated.asp"




this.menu_width4 = 159
this.menu_width3 = 200
this.menu_width5 = 150
this.menu_width5_0 = 189
this.menu_width5_1 = 160

}///////////////////////// END Menu Data /////////////////////////////////////////



//Document Level Settings

cdd__activate_onclick = false
cdd__showhide_delay = 75
cdd__url_target = "_top"
cdd__url_features = "resizable=1, scrollbars=1, titlebar=1, menubar=1, toolbar=1, location=1, status=1, directories=1, channelmode=0, fullscreen=0"
cdd__display_urls_in_status_bar = true
cdd__default_cursor = "hand"


// IMAGE ROLLOVER STARTS HERE - NavStudio Code (Warning: Do Not Alter!)

if (window.showHelp){b_type = "ie"; if (!window.attachEvent) b_type += "mac";}if (document.createElementNS) b_type = "dom";if (navigator.userAgent.indexOf("afari")>-1) b_type = "safari";if (window.opera) b_type = "opera"; qmap1 = "\<\script language=\"JavaScript\" vqptag='loader_sub' src=\""; qmap2 = ".js\">\<\/script\>";;function iesf(){};;function vqp_error(val){alert(val)}
if (b_type){document.write(qmap1+cdd__codebase+"pbrowser_"+b_type+qmap2);document.close();}

//specify interval between slide (in mili seconds)
var slidespeed=6525

//specify images

//var slideimages=new "images/home_img52.jpg","images/home_img53.jpg","images/home_img50.jpg","images/home_img49.jpg","images/home_img39.jpg","images/home_img40.jpg","images/home_img41.jpg","images/home_img45.jpg","images/home_img48.jpg","images/home_img47.jpg","images/home_img42.jpg","images/home_img43.jpg","images/home_img44.jpg","images/home_img36.jpg","images/home_img37.jpg","images/home_img38.jpg","images/home_img32.jpg","images/home_img1.jpg","images/home_img8.jpg","images/home_img10.jpg","images/home_img11.jpg","images/home_img12.jpg","images/home_img18.jpg","images/home_img2.jpg","images/home_img20.jpg","images/home_img21.jpg")

//commented on June 07, 2007 by Jagannath Joshi
var slideimages=new Array("images/home_img114.jpg","images/home_img111.jpg","images/home_img113.jpg","images/home_img112.jpg","images/home_img110.jpg","images/home_img109.jpg","images/home_img108.jpg","images/home_img107.jpg","images/home_img92.jpg","images/home_img101.jpg","images/home_img106.jpg","images/home_img105.jpg","images/home_img104.jpg","images/home_img103.jpg","images/home_img97.jpg","images/home_img98.jpg","images/home_img99.jpg","images/home_img100.jpg","images/home_img102.jpg","images/home_img96.jpg","images/home_img95.jpg","images/home_img94.jpg","images/home_img93.jpg","images/home_img91.jpg","images/home_img90.jpg","images/home_img89.jpg","images/home_img81.jpg","images/home_img84.jpg","images/home_img77.jpg","images/home_img83.jpg","images/home_img85.jpg","images/home_img32.jpg","images/home_img86.jpg","images/home_img87.jpg","images/home_img88.jpg","images/home_img82.jpg","images/home_img80.jpg","images/home_img79.jpg","images/home_img76.jpg","images/home_img78.jpg","images/home_img73.jpg","images/home_img74.jpg","images/home_img75.jpg","images/home_img8.jpg","images/home_img71.jpg","images/home_img72.jpg","images/home_img67.jpg","images/home_img68.jpg","images/home_img69.jpg","images/home_img70.jpg","images/home_img63.jpg","images/home_img61.jpg","images/home_img1.jpg","images/home_img60.jpg","images/home_img52.jpg","images/home_img65.jpg","images/home_img64.jpg","images/home_img59.jpg","images/home_img55.jpg","images/home_img53.jpg","images/home_img50.jpg","images/home_img49.jpg","images/home_img40.jpg","images/home_img41.jpg","images/home_img45.jpg","images/home_img42.jpg","images/home_img43.jpg","images/home_img44.jpg","images/home_img36.jpg","images/home_img37.jpg","images/home_img10.jpg","images/home_img11.jpg","images/home_img18.jpg","images/home_img2.jpg","images/home_img20.jpg")

//var slideimages=new Array("images/home_img61.jpg",)


//specify corresponding links
var slidelinks=new Array("")

var newwindow=1 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}



//====== IMAGE ROLLOVER - SCRIPT

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->




//======VALIDATE FORM - SCRIPT

<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}
//-->




function switchcontent(className){
this.className=className
this.collapsePrev=false //Default: Collapse previous content each time
this.enablePersist=false //Default: Disable session only persistence
//Limit type of element to scan for on page for switch contents if 2nd function parameter is defined, for efficiency sake (ie: "div")
this.filter_content_tag=(arguments.length==2)? arguments[1].toLowerCase() : ""
}

switchcontent.prototype.setStatus=function(openHTML, closeHTML){ //PUBLIC: Set open/ closing HTML indicator. Optional
this.statusOpen=openHTML
this.statusClosed=closeHTML
}

switchcontent.prototype.setColor=function(openColor, closeColor){ //PUBLIC: Set open/ closing color of switch header. Optional
this.colorOpen=openColor
this.colorClosed=closeColor
}

switchcontent.prototype.setPersist=function(bool){ //PUBLIC: Enable/ disable persistence. Default is true.
this.enablePersist=bool
}

switchcontent.prototype.collapsePrevious=function(bool){ //PUBLIC: Enable/ disable collapse previous content. Default is false.
this.collapsePrev=bool
}


switchcontent.prototype.sweepToggle=function(setting){ //PUBLIC: Expand/ contract all contents method. (Values: "contract"|"expand")
if (typeof this.headers!="undefined" && this.headers.length>0){ //if there are switch contents defined on the page
for (var i=0; i<this.headers.length; i++){
if (setting=="expand")
this.expandcontent(this.headers[i]) //expand each content
else if (setting=="contract")
this.contractcontent(this.headers[i]) //contract each content
}
}
}


// -------------------------------------------------------------------
// PUBLIC: defaultExpanded(indices_of_contents)- Set contents that should be expanded by default when the page loads.
// Note that the persistence feature (if enabled) overrides this setting.
// Pass in the position of the contents relative to the rest of the contents ie: defaultExpanded(0,2,3) would expand the 1st, 3rd, and 4th contents by default
// -------------------------------------------------------------------

switchcontent.prototype.defaultExpanded=function(){
var expandedindices=[] //Array to hold indices (position) of content to be expanded by default
//Loop through function arguments, and store each one within array
//Two test conditions: 1) End of Arguments array, or 2) If "collapsePrev" is enabled, only the first entered index (as only 1 content can be expanded at any time)
for (var i=0; (!this.collapsePrev && i<arguments.length) || (this.collapsePrev && i==0); i++)
expandedindices[expandedindices.length]=arguments[i]
this.expandedindices=expandedindices.join(",") //convert array into a string of the format: "0,2,3" for later parsing by script
}


//PRIVATE: Sets color of switch header.

switchcontent.prototype.togglecolor=function(header, status){
if (typeof this.colorOpen!="undefined")
header.style.color=status
}


//PRIVATE: Sets status indicator HTML of switch header.

switchcontent.prototype.togglestatus=function(header, status){
if (typeof this.statusOpen!="undefined")
header.firstChild.innerHTML=status
}


//PRIVATE: Contracts a content based on its corresponding header entered

switchcontent.prototype.contractcontent=function(header){
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
innercontent.style.display="none"
this.togglestatus(header, this.statusClosed)
this.togglecolor(header, this.colorClosed)
}


//PRIVATE: Expands a content based on its corresponding header entered

switchcontent.prototype.expandcontent=function(header){
var innercontent=document.getElementById(header.id.replace("-title", ""))
innercontent.style.display="block"
this.togglestatus(header, this.statusOpen)
this.togglecolor(header, this.colorOpen)
}

// -------------------------------------------------------------------
// PRIVATE: toggledisplay(header)- Toggles between a content being expanded or contracted
// If "Collapse Previous" is enabled, contracts previous open content before expanding current
// -------------------------------------------------------------------

switchcontent.prototype.toggledisplay=function(header){
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
if (innercontent.style.display=="block")
this.contractcontent(header)
else{
this.expandcontent(header)
if (this.collapsePrev && typeof this.prevHeader!="undefined" && this.prevHeader.id!=header.id) // If "Collapse Previous" is enabled and there's a previous open content
this.contractcontent(this.prevHeader) //Contract that content first
}
if (this.collapsePrev)
this.prevHeader=header //Set current expanded content as the next "Previous Content"
}


// -------------------------------------------------------------------
// PRIVATE: collectElementbyClass()- Searches and stores all switch contents (based on shared class name) and their headers in two arrays
// Each content should carry an unique ID, and for its header, an ID equal to "CONTENTID-TITLE"
// -------------------------------------------------------------------

switchcontent.prototype.collectElementbyClass=function(classname){ //Returns an array containing DIVs with specified classname
var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
this.headers=[], this.innercontents=[]
if (this.filter_content_tag!="") //If user defined limit type of element to scan for to a certain element (ie: "div" only)
var allelements=document.getElementsByTagName(this.filter_content_tag)
else //else, scan all elements on the page!
var allelements=document.all? document.all : document.getElementsByTagName("*")
for (var i=0; i<allelements.length; i++){
if (typeof allelements[i].className=="string" && allelements[i].className.search(classnameRE)!=-1){
if (document.getElementById(allelements[i].id+"-title")!=null){ //if header exists for this inner content
this.headers[this.headers.length]=document.getElementById(allelements[i].id+"-title") //store reference to header intended for this inner content
this.innercontents[this.innercontents.length]=allelements[i] //store reference to this inner content
}
}
}
}


//PRIVATE: init()- Initializes Switch Content function (collapse contents by default unless exception is found)

switchcontent.prototype.init=function(){
var instanceOf=this
this.collectElementbyClass(this.className) //Get all headers and its corresponding content based on shared class name of contents
if (this.headers.length==0)
return //If no headers are present (no contents to switch), just exit
// Get ids of open contents below. Three possible scenerios:
// 1) Persistence is enabled AND corresponding cookie contains a non blank ("") string, indicating this isn't the first page load
// 2) Or, check to see if there are contents that should be enabled by default (even if persistence is enabled and this IS the first page load)
// 3) Or, default to no contents should be expanded on page load ("" value)
var opencontents_ids=(this.enablePersist && switchcontent.getCookie(this.className)!="")? ','+switchcontent.getCookie(this.className)+',' : (this.expandedindices)? ','+this.expandedindices+',' : ""
for (var i=0; i<this.headers.length; i++){ //BEGIN FOR LOOP (1)
if (typeof this.statusOpen!="undefined") //If open/ closing HTML indicator is enabled/ set
this.headers[i].innerHTML='<span class="status"></span>'+this.headers[i].innerHTML //Add a span element to original HTML to store indicator
if (opencontents_ids.indexOf(','+i+',')!=-1){ //(2) if index "i" exists within cookie string or default-enabled string (i=position of the content to expand)
this.expandcontent(this.headers[i]) //Expand each content per stored indices (if ""Collapse Previous" is set, only one content)
if (this.collapsePrev) //If "Collapse Previous" set
this.prevHeader=this.headers[i]  //Indicate the expanded content's corresponding header as the last clicked on header (for logic purpose)
}
else //else if no indices found in stored string
this.contractcontent(this.headers[i]) //Contract each content by default
this.headers[i].onclick=function(){instanceOf.toggledisplay(this)}
}
if (this.enablePersist)
switchcontent.dotask(window, function(){instanceOf.rememberpluscleanup()}, "unload") //Call persistence method onunload
}


// -------------------------------------------------------------------
// PRIVATE: rememberpluscleanup()- Stores the indices of content that are expanded inside session only cookie
// If "Collapse Previous" is enabled, only 1st expanded content index is stored
// -------------------------------------------------------------------

switchcontent.prototype.rememberpluscleanup=function(){ //store index of opened ULs relative to other ULs in Tree into cookie
// Define array to hold ids of open content that should be persisted
// Default to just "none" to account for the case where no contents are open when user leaves the page (and persist that):
var opencontents=new Array("none")
for (var i=0; i<this.innercontents.length; i++){
//If persistence enabled, content in question is expanded, and either "Collapse Previous" is disabled, or if enabled, this is the first expanded content
if (this.enablePersist && this.innercontents[i].style.display=="block" && (!this.collapsePrev || (this.collapsePrev && opencontents.length<2)))
opencontents[opencontents.length]=i //save the index of the opened UL (relative to the entire list of ULs) as an array element
this.headers[i].onclick=null //Cleanup code
}
if (opencontents.length>1) //If there exists open content to be persisted
opencontents.shift() //Boot the "none" value from the array, so all it contains are the ids of the open contents
if (typeof this.statusOpen!="undefined") //Cleanup code
this.statusOpen=this.statusClosed=null //Cleanup code
switchcontent.setCookie(this.className, opencontents.join(",")) //populate cookie with indices of open contents: classname=1,2,3,etc
}


// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------


switchcontent.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}

switchcontent.getCookie=function(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

switchcontent.setCookie=function(name, value){
document.cookie = name+"="+value
}