var finasteridestudy = new Array(
	"studypopulation",
	"studyprotocols",
	"initialstudies",
	"extensionstudies",
	"endpoints",
	"methodology",
	"haircount",
	"patientassessment",
	"investigatorassessment",
	"photographicassessment"
);

var norwoodhamiltonscale = new Array(
	"savehair",
	"surprised",
	"mirror",
	"poster",
	"progression",
	"tissuebox"
);

var patientproductinformation = new Array(
	"ppi-q1","ppi-q2","ppi-q3","ppi-q4","ppi-q5","ppi-q6","ppi-q7","ppi-q8","ppi-q9"
);



function accordion(itemID,status) {
	
	// get the current page from the URL
	// and remove the - to find the correct array
	
	//getQueryString();
	//var CurrentPage = querystring['c'];
	var url = location.href;
	var CurrentPage = url.substring(url.lastIndexOf('/')+1, url.length-4);
	//return (fn == null)? “” : fn[1];
	//alert (CurrentPage);
	var TempArray = new Array();
	var CurrentAccordion = "";
	TempArray = CurrentPage.split("-");
	for (i=0; i<TempArray.length; i++) {
		CurrentAccordion = CurrentAccordion + TempArray[i];
	}
	CurrentAccordion = eval(CurrentAccordion);
	
	// closes all on initial load
	if (status=="load") {
		for (i=0; i<CurrentAccordion.length; i++) {
			hideBlock(CurrentAccordion[i]);
			changeClass(CurrentAccordion[i]+"-head","moreinfo");
		}
	}
	
	// opens the clicked and closes all others
	if (itemID!="all") {
		var itemClass = document.getElementById(itemID+"-head").className;
		if (itemClass == "moreinfo") {
			for (i=0; i<CurrentAccordion.length; i++) {
				itemClass = document.getElementById(CurrentAccordion[i]+"-head").className;
				if (itemClass == "closeinfo") {
					//changeClass(CurrentAccordion[i]+"-head","moreinfo");
					//Effect.BlindUp(CurrentAccordion[i]);
				}
			}
			changeClass(itemID+"-head","closeinfo");
			Effect.BlindDown(itemID);
		} else if (itemClass == "closeinfo") {
			Effect.BlindUp(itemID);
			changeClass(itemID+"-head","moreinfo");
		}
	}
}