			var navState = 0;
			var sheetState = 0;
			function navDeactivate() {
				//Set all divs to inactive
				$('#nav-vatech-active ').attr("id",'nav-vatech');
				$('#nav-needinfo-active').attr("id",'nav-needinfo');
				$('#nav-news-active').attr("id",'nav-news');
				$('#nav-providers-active').attr("id",'nav-providers');
				$('#nav-victims-active').attr("id",'nav-victims');
				$('#nav-grants-active').attr("id",'nav-grants');
				$('#nav-library-active').attr("id",'nav-library');
				$('#nav-victimsrights-active ').attr("id",'nav-victimsrights');
				$('#nav-public-active ').attr("id",'nav-public');
				$('#nav-about-active ').attr("id",'nav-about');
			};
			function navOpen() {
					$("#sheetHolder").slideDown(700);
			}
			function navClose() {
					$("#sheetHolder").slideUp(200);
					navDeactivate();
			}
			function innerSheetClose(){
					$(".sheet").slideUp(600);
			}
			function navCalculator(nav,sheet,msg) {
					var totalNav = nav+sheet;
					if ((totalNav)==0) { 
						} else { 
							navOpen();
					}

					
					if (nav=='' && sheet=='') {
						var t=setTimeout("navClose()",100);
					}
				
				
				
			}
			$(document).ready(function() {
				$('#nav').mouseleave(function(event){
					var yVal = event.pageY;

						var navState=0;
						var sheetState=0;
						var allState=navState+sheetState;

					if (yVal < 125 ) { navClose(); }

				
				});

				$('#sheetHolder').mouseenter(function(){
						var sheetState=1;
						var t=setTimeout("navCalculator("+navState+","+sheetState+",'enteredsheetHolder')",0);
				});	

				$('#nav .tabs li a').bind( "hover", function(){										 
					var navState=1;
					var allState=navState+sheetState;
					var t=setTimeout("navCalculator("+navState+","+sheetState+",'nav')",0);			

					var thisId = $(this).attr('id');

	

					var myExp = /-active/;
					var sString = thisId.search(myExp);

	if(sString != -1) {
		} else { $(".sheet").slideUp(600); }				
				
					var thisIdFormatted = "#"+thisId;
					var thisIdActive = thisId+"-active";
					navDeactivate();
					$(thisIdFormatted).attr("id",thisIdActive);
					$("#sheet-"+thisId.substring(4)).fadeTo(200, 1).slideDown(700);
				});
			
	
				$("#sheetHolder").mouseleave(function(event){
					var yVal = event.pageY;
					var xVal = event.pageX;


					var sheetState=0;
					var allState=navState+sheetState;


					if (yVal > 400 ) {	var t=setTimeout("navCalculator("+navState+","+sheetState+",'sheetHolder')",0);	}
			
			
					var thisId = $(this).attr('id');
					thisId = thisId.replace(/sheet/,'nav');
					var thisIdFormatted = "#"+thisId;
					var thisIdFormattedActive = "#"+thisId+"-active";
					$(thisIdFormattedActive).attr("id",thisId);
				});
			});

