
	function __doPostBack(eventTarget, eventArgument) {
		var theform;
		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
			theform = document.Form1;
		}
		else {
			theform = document.forms["Form1"];
		}
		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
		theform.__EVENTARGUMENT.value = eventArgument;
		theform.submit();
	}



	function ExecuteSearch(buttonId)
	{
		// if ENTER pressed, we want to go perform a search > force click event on the Search button
		
		if(window.event.keyCode == 13)
		{
			event.returnValue = false;
			// not working
			document.getElementById(buttonId).click();
		}
	}
	
	function CheckValue(txtId)
	{
		// if search box empty, do not execute search
		if(document.getElementById(txtId).value.length == 0)
		{
			alert("Please enter a query.");
			return false;
		}
	}




	
	function showHide(navHeader, navBlock)
	{
		if(!document.getElementById) return;
	
		var theNavBlockHeader = document.getElementById(navHeader);	
		var theNavBlock = document.getElementById(navBlock);	
		
		var arrNavBlock = new Array();
		arrNavBlock[0] = "LeftNavBar_block1";
		arrNavBlock[1] = "LeftNavBar_block2";
		arrNavBlock[2] = "LeftNavBar_block3";
		arrNavBlock[3] = "LeftNavBar_block4";
		
		var arrNavBlockHeader = new Array();
		arrNavBlockHeader[0] = "LeftNavBar_block1Header";
		arrNavBlockHeader[1] = "LeftNavBar_block2Header";
		arrNavBlockHeader[2] = "LeftNavBar_block3Header";
		arrNavBlockHeader[3] = "LeftNavBar_block4Header";
		
		// hide all nav blocks
		for(index = 0; index < arrNavBlock.length; index++)
		{
			document.getElementById(arrNavBlock[index]).style.display = "none";
			swapCssClass(document.getElementById(arrNavBlockHeader[index]), "NavBarSection");
		}
		/*		
		if(theNavBlock.style.display == "none")
			alert("display none")
		else
			alert("display block");
		*/
	
		// show the navblock under which item clicked
		if(theNavBlock.style.display == "none")
		{
			theNavBlock.style.display = "block";
			swapCssClass(theNavBlockHeader, "NavBarSectionActive");	
		}
		else
		{
			theNavBlock.style.display = "none";	
			swapCssClass(theNavBlockHeader, "NavBarSection");	
		}
	}
	
	function swapCssClass(element, newclass)
	{ 
		if(document.getElementById)
			element.className = newclass;
	}

