//Initialize first demo:
ddaccordion.init({
	headerclass: "menutitle", //Shared CSS class name of headers group
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
	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.
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: false, //persist state of opened contents within browser session?
	toggleclass: ["menutitle", "menutitle_active"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["none", "", ""], 
	animatespeed: "fast", //speed of animation: "fast", "normal", or "slow",
	oninit:function(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		
	}
})

ddaccordion.init({
	headerclass: "menutitle_top", //Shared CSS class name of headers group
	contentclass: "submenu_top", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
	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.
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: false, //persist state of opened contents within browser session?
	toggleclass: ["menutitle_top", "menutitle_top_active"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["none", "", ""], 
	animatespeed: "fast", //speed of animation: "fast", "normal", or "slow",
	oninit:function(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 Change(obj, state){
		if (state == 0)
		{
			if(obj.className == "menutitle_over")
				obj.className = "menutitle";
			else if(obj.className == "menutitle_top_over")
				obj.className = "menutitle_top";			
		}
		else
		{
			if(obj.className == "menutitle")
				obj.className = "menutitle_over";
			else if(obj.className == "menutitle_top")
				obj.className = "menutitle_top_over";
		}							
}
function $(inputID)
{
    var retVar;
    if (document.getElementById) // test if browser supports document.getElementById
        retVar = document.getElementById(inputID);
    else if (document.all) // test if browser supports document.all
        retVar = document.all[inputID];
    else if (document.layers) // test if browser supports document.layers
        retVar = document.layers[inputID];
   return retVar;   
}
