ddaccordion.init({ //top level headers initialization
 headerclass: "expandable", //Shared CSS class name of headers group that are expandable
 contentclass: "categoryitems", //Shared CSS class name of contents group
 revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
 mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
 collapseprev: false, //Collapse previous content (so only one open at any time)? true/false 
 defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
 onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
 animatedefault: false, //Should contents open by default be animated into view?
 persiststate: true, //persist state of opened contents within browser session?
 toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
 togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
 animatespeed: "normal", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
 oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
  //do nothing
 },
 onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
  //do nothing
 }
})



function nameDefined(ckie,nme)
{
   var splitValues;
   var i;

var clength = ckie.length;
   for (i=0;i<clength;++i)
   {
      splitValues=ckie[i].split("=")
      if (splitValues[0]==nme) return true;
   }

   return false;
}
function delBlanks(strng)
{
   var result="";
   var i;
   var chrn;
   for (i=0;i<strng.length;++i) {
      chrn=strng.charAt(i)
      if (chrn!=" ") result += chrn;
   }
   return result;
}
function getCookieValue(ckie,nme)
{
   var splitValues;
   var i;
   for(i=0;i<ckie.length;++i) {
      splitValues=ckie[i].split("=")
      if(splitValues[0]==nme) return splitValues[1]
   }
   return "";
}

function deletecookie()
{
	var d = new Date();
	document.cookie = "expandable=0c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=1c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=2c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=3c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=4c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=5c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=6c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=7c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=8c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=9c;expires=" + d.toGMTString() + ";" + ";";
	document.cookie = "expandable=10c;expires=" + d.toGMTString() + ";" + ";";
}
deletecookie();

function setNewCookie(val)
{
var newval	= val+'c';

 var cookie=document.cookie;
  var chkdCookie=delBlanks(cookie)  //are on the client computer

 var nvpair=chkdCookie.split(";");

var tvalue=null
if(nameDefined(nvpair,'expandable'))       //See if the name is in any pair
   {   
       tvalue=getCookieValue(nvpair,'expandable');  //Gets the value of the cookie
   }

	var futdate = new Date()		//Get the current time and date
      var expdate = futdate.getTime()  //Get the milliseconds since Jan 1, 1970
      expdate += 500*1000  //expires in 1 hour(milliseconds)
      futdate.setTime(expdate)

	//if(tvalue==null)
		var newCookie="expandable="+newval+","+tvalue+";";	//Set the new cookie values up
//else
//	var newCookie="expandable="+newval+";";	//Set the new cookie values up

    newCookie += " expires=" + futdate.toGMTString()
      window.document.cookie=newCookie 
}