﻿
// Detect Flash
		var flash;
		window.onload = function() {
			if(navigator.appName.indexOf("Microsoft") != -1) {
				flash = window.myMovie;
			}else {
				flash = window.document.myMovie;
			}
		}


// Show/Hide
        function showhide(id){
        if (document.getElementById){
        obj = document.getElementById(id);
        if (obj.style.display == "none"){
        obj.style.display = "";
        } else {
        obj.style.display = "none";
        }
        }
        }


// Tabs
		last_tab = 'tab1'; //this is the seed tab
		function show(layerName) { 
		document.getElementById(layerName).style.display = '';
		} 
		function hide(layerName) { 
		document.getElementById(layerName).style.display = 'none';
		} 
		function show_next(tab_name) {
		document.getElementById(last_tab).className = 'tab_bar';
		var curr = document.getElementById(tab_name);
		//curr.className='tab_hover';
		hide(last_tab+'_data');
		show(tab_name+'_data');
		last_tab=tab_name;
		}
		function doPlans() {
		}
		function doMap() {
		__doPostBack('doMap', 'click');
		}

		var SESSIONURL = "";
		var IMGDIR_MISC = "_img";


// Moo.fx
        function init(){
	    var stretchers = document.getElementsByClassName('box');
	    var toggles = document.getElementsByClassName('tab');
	    var myAccordion = new fx.Accordion(
		    toggles, stretchers, {opacity: true, height: true, duration: 600}
	    );
	    //hash functions
	    var found = false;
	    toggles.each(function(h3, i){
		    var div = Element.find(h3, 'nextSibling');
			    if (window.location.href.indexOf(h3.title) > 0) {
				    myAccordion.showThisHideOpen(div);
				    found = true;
			    }
		    });
		    if (!found) myAccordion.showThisHideOpen(stretchers[0]);
        }
