function hideAll(currCont) {
	if(currCont != 'PagesList') { document.getElementById('PagesList').style.visibility = 'hidden'; }
}
function showDropdown(name) {
	var visi = document.getElementById(name);
	hideAll(name);
	if(visi.style.visibility == 'visible') {
		visi.style.visibility = 'hidden';
	} else {
		visi.style.visibility = 'visible';
	}
	return false;
}
function CloseDropDown(name) {
	var visi = document.getElementById(name);
	visi.style.visibility = 'hidden';
	return false;
}
function toggleDropDown(name) {


	if (document.getElementById(name).style.display=='none')
	{
		document.getElementById(name).style.display='block';
	} else {
		document.getElementById(name).style.display='none';
	}
//	document.getElementById('PagesList2').style.display='none';
}


/*Archive Functions*/
function showArchiveMonths(cboYear)
{
	var month=new Array(12);
	month[0]="January";
	month[1]="February";
	month[2]="March";
	month[3]="April";
	month[4]="May";
	month[5]="June";
	month[6]="July";
	month[7]="August";
	month[8]="September";
	month[9]="October";
	month[10]="November";
	month[11]="December";

	try
	{
		var cboMonth = document.getElementById(strMonth);
		var strValue = getSelectedValue(cboYear);

		var arrArchiveMonths = strValue.split(",");
		var numIndex = 0;
		
		clearOptions(cboMonth);
		
		addOptionRO(cboMonth, "", "All");
		
		if (strValue == "")
		{
			return;
		}
		
		for (numIndex = 0; numIndex < arrArchiveMonths.length; numIndex++)
		{
			addOptionRO(cboMonth, arrArchiveMonths[numIndex], month[arrArchiveMonths[numIndex] -1]);
		}
	}
	catch (exc)
	{
		showError(exc)
	}
}

function viewArchive()
{
	try
	{
		var cboYear = document.getElementById(strYear);
		var cboMonth = document.getElementById(strMonth);
		
		if (getSelectedValue(cboYear) == "")
		{
			// pleaseWait();
			window.location = strPageName;
			return true;
		}
		
		// pleaseWait();
		window.location = strPageName + "?y=" + cboYear.options[cboYear.selectedIndex].text + "&m=" + getSelectedValue(cboMonth);
		return true;
	}
	catch (exc)
	{
		showError(exc)
	}
}
