function findTab()
{
	var activeTab = location.hash
	//console.log(tabView.getTabIndex('Tab inNewHaven'));
	
	if (activeTab === '#articles')
	{
		if (tabView.getTabIndex('Tab articlesData') !== null)
		{
			tabView.set('activeIndex', tabView.getTabIndex('Tab articlesData'));
			document.getElementById('articleDiv').style.display = 'none';
			document.getElementById('physicianDiv').style.display = 'block';
		}
	}
	else if (activeTab === '#programService')
	{
		if (tabView.getTabIndex('Tab program') !== null)
		{
			tabView.set('activeIndex', tabView.getTabIndex('Tab program'));
		}
	}
	else if (activeTab === '#physician')
	{
		if (tabView.getTabIndex('Tab physicianData') !== null)
		{
			tabView.set('activeIndex', tabView.getTabIndex('Tab physicianData'));
		}
	}
	else if (activeTab === '#specialty')
	{
		if (tabView.getTabIndex('Tab specialtyData') !== null)
		{
			tabView.set('activeIndex', tabView.getTabIndex('Tab specialtyData'));
		}
	}
	else if (activeTab === '#inNewHaven')
	{
		if (tabView.getTabIndex('Tab inNewHaven') !== null)
		{
			tabView.set('activeIndex', tabView.getTabIndex('Tab inNewHaven'));
		}
	}
	else if (activeTab === '#outNewHaven')
	{
		if (tabView.getTabIndex('Tab notNewHaven') !== null)
		{
			tabView.set('activeIndex', tabView.getTabIndex('Tab notNewHaven'));
		}
	}
}

function Show_Insurances(Click_Menu)
// Function that will swap the display/no display for
// all content within span tags
{
	var el = document.getElementById(Click_Menu)
	if (el.style.display == "none")
	{
		el.style.display = "inline";
		document.getElementById(Click_Menu + 'More').style.display = 'none';
		document.getElementById(Click_Menu + 'Less').style.display = 'inline';
		document.getElementById(Click_Menu + 'Plus').style.display = 'none';
		document.getElementById(Click_Menu + 'Minus').style.display = 'inline';
	}
	else
	{
		el.style.display = "none";
		document.getElementById(Click_Menu + 'More').style.display = 'inline';
		document.getElementById(Click_Menu + 'Less').style.display = 'none';
		document.getElementById(Click_Menu + 'Plus').style.display = 'inline';
		document.getElementById(Click_Menu + 'Minus').style.display = 'none';
	}
}

function Show_Organizations(orgType, orgCode, orgID)
// Function that will swap the display/no display for
// all content within span tags
{
    var sUrl;
    var handleSuccess = function(o) {
        if(o.responseText !== undefined) {
            document.getElementById(orgID + 'Div').innerHTML = o.responseText;
            
			var el = document.getElementById(orgID + 'Div')
			if (el.style.display == "none")
			{
				el.style.display = "block";
				document.getElementById(orgCode + 'Plus').style.display = 'none';
				document.getElementById(orgCode + 'Minus').style.display = 'inline';
			}
			else
			{
				el.style.display = "none";
				document.getElementById(orgCode + 'Plus').style.display = 'inline';
				document.getElementById(orgCode + 'Minus').style.display = 'none';
			}
        }
    }
    var handleFailure = function(o) {
        if(o.responseText !== undefined) {
            alert(o.responseText);
        }
    }
    var callback = {
        success: handleSuccess,
        failure: handleFailure
    }
    sUrl = "/YMG/directory/public/orgs.asp?orgtype=" + orgType +"&orgCode=" + orgCode +"&orgid=" + orgID
    var request = YAHOO.util.Connect.asyncRequest('Get', sUrl, callback);


}


function submitForm(formID)
{
	if (document.getElementById(formID).keyword.value === 'Enter a disease, condition, treatment, etc.'){document.getElementById(formID).keyword.value = '';}
	document.getElementById(formID).submit();
}

function resetForm(formID)
{
	document.getElementById().reset();
}

function enableEnterKey(e)
{
     var key;

     if(window.event)
          key = window.event.keyCode;     //IE
     else
          key = e.which;     //firefox

     if(key == 13)
          submitForm('searchForm');
}