
/* javascript for drop down menus */

function toggleDrop(hideshow, menuid)
	{
	
	var menu = document.getElementById(menuid);
	
	if (hideshow == "hide"){
		menu.style.display = "none";
		
	} else {
		menu.style.display = "block";
	}

}

/* javascript for tab interface */

function toggletab(name, tablink)
	{
	
	var tab1 = document.getElementById("tab1");
	var tab2 = document.getElementById("tab2");
	var tab3 = document.getElementById("tab3");
	var tabLink1 = document.getElementById("tabLink1");
	var tabLink2 = document.getElementById("tabLink2");
	var tabLink3 = document.getElementById("tabLink3");
	var showtab = document.getElementById(name);	
	var changetab = document.getElementById(tablink);

	tab1.style.display = "none";
	tab2.style.display = "none";
	tab3.style.display = "none";
	
	tabLink1.className="tab";
	tabLink2.className="tab";
	tabLink3.className="tab";	
	
	showtab.style.display = "block";
	changetab.className="tabActive";
	
	return false;

}

/* javascript for executive interface */

function toggleExec(id)
	{
	
	var exec = document.getElementById(id);
	
	var execmain = document.getElementById("execmain");
	var exec1 = document.getElementById("exec1");
	var exec2 = document.getElementById("exec2");
	var exec3 = document.getElementById("exec3");	
	var exec4 = document.getElementById("exec4");
	var exec5 = document.getElementById("exec5");
	var exec6 = document.getElementById("exec6");
	var exec7 = document.getElementById("exec7");
	
	execmain.style.display = "none";
	
	exec1.style.display = "none";
	exec2.style.display = "none";
	exec3.style.display = "none";
	exec4.style.display = "none";
	exec5.style.display = "none";
	exec6.style.display = "none";
	exec7.style.display = "none";
	
	exec.style.display = "block";
	
	return false;

}

/* javascript for pop-up windows */


function popUp(URL)
	{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=290,left = 690,top = 325');");
}


/* jquery for location overviews and specials */

$(document).ready(function(){
	
	$('.overview_expand').hide();
	$('.exceptions').hide();

	// events
	$("#link1").click(function(){ $('#e1').toggle(); return false; }); 
	$("#link2").click(function(){ $('#e2').toggle(); return false; });
	$("#link3").click(function(){ $('#e3').toggle(); return false; });
	$("#link4").click(function(){ $('#e4').toggle(); return false; });
	$("#link5").click(function(){ $('#e5').toggle(); return false; });
	$("#link6").click(function(){ $('#e6').toggle(); return false; });
	$("#link7").click(function(){ $('#e7').toggle(); return false; });
	$("#link8").click(function(){ $('#e8').toggle(); return false; });
	$("#link9").click(function(){ $('#e9').toggle(); return false; });
	$("#link10").click(function(){ $('#e10').toggle(); return false; });
		
	$('#link1').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link2').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link3').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link4').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link5').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link6').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link7').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link8').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link9').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});
	$('#link10').toggle(function () {$(this).text('Hide Exceptions')}, function () {$(this).text('View Exceptions');});

	
	$("#link_all").click(function(){
			$('#specials_colorado').show();						   
			$('#specials_florida').show();
			$('#specials_nevada').show();
			return false;
		});
		
	$("#link_colorado").click(function(){
			$('#specials_colorado').show();						   
			$('#specials_florida').hide();
			$('#specials_nevada').hide();
			return false;
		});
	
	$("#link_nevada").click(function(){
			$('#specials_colorado').hide();						   
			$('#specials_florida').hide();
			$('#specials_nevada').show();
			return false;
		});
	
	$("#link_pennsylvania").click(function(){
			$('#specials_colorado').hide();						   
			$('#specials_florida').hide();
			$('#specials_nevada').hide();
			$('#specials_pennsylvania').show();
			return false;
		});
	
	$("#link_florida").click(function(){
			$('#specials_colorado').hide();						   
			$('#specials_florida').show();
			$('#specials_nevada').hide();
			return false;
		});

	$("#link_newjersey").click(function(){
			return false;
		});

	// events
	$(".overview_btn").click(function(){
		$('.overview_expand').toggle();
 		return false;
	}); 
			
	$('li.overview a').toggle(
      function () {
	$(this).text('Show Less...')
      },
	  function () {
	$(this).text('Show More...');
      });
	
});


