var timeout	= 1;
var closetimer	= 0;
var ddmenuitem	= 0;
// open hidden layer
function mopen(id)
{	
	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';
	


}
// close showed layer
function mclose()
{
	if(ddmenuitem) {
		$(ddmenuitem).css("visibility", "hidden");
		/* .parent().css("background-image", "none"); */
		/*	ddmenuitem.style.visibility = 'hidden';
			$(ddmenuitem).parent().css("visibility", "hidden");
		*/
	}
}


function clinicinformationshowtab(){ 
document.getElementById('link1').style.color = '#000';
document.getElementById('id1').style.visibility = 'visible';
document.getElementById('id3').style.visibility = 'visible';
document.getElementById('id2').style.backgroundImage = "url(images/nav/mainnav-tab-center.png)";


}

function ourteamshowtab(){
	document.getElementById('link2').style.color = '#000';
document.getElementById('id4').style.visibility = 'visible';
document.getElementById('id6').style.visibility = 'visible';
document.getElementById('id5').style.backgroundImage = "url(images/nav/mainnav-tab-center.png)";
	
	}
function resourceshowtab(){
	document.getElementById('link3').style.color = '#000';
document.getElementById('id7').style.visibility = 'visible';
document.getElementById('id9').style.visibility = 'visible';
document.getElementById('id8').style.backgroundImage = "url(images/nav/mainnav-tab-center.png)";
	
	}
	
function faqshowtab(){
	document.getElementById('link4').style.color = '#000';
document.getElementById('id10').style.visibility = 'visible';
document.getElementById('id12').style.visibility = 'visible';
document.getElementById('id11').style.backgroundImage = "url(images/nav/mainnav-tab-center.png)";
	
	}
	
function announceshowtab(){
	document.getElementById('link5').style.color = '#000';
	document.getElementById('id13').style.visibility = 'visible';
	document.getElementById('id15').style.visibility = 'visible';
	document.getElementById('id14').style.backgroundImage = "url(images/nav/mainnav-tab-center.png)";
	
	}

function contactshowtab(){
	
	document.getElementById('link6').style.color = '#000';
	document.getElementById('id16').style.visibility = 'visible';
	document.getElementById('id18').style.visibility = 'visible';
	document.getElementById('id17').style.backgroundImage = "url(images/nav/mainnav-tab-center.png)";
	
	}
	
	



function clinicinformationhidetab(){
	document.getElementById('id1').style.visibility = 'hidden';
document.getElementById('id3').style.visibility = 'hidden';
document.getElementById('id2').style.backgroundImage = "none";
document.getElementById('link1').style.color = '#FFFFFF';
	
	}
	
function ourteamhidetab(){
	document.getElementById('id4').style.visibility = 'hidden';
document.getElementById('id6').style.visibility = 'hidden';
document.getElementById('id5').style.backgroundImage = "none";
document.getElementById('link2').style.color = '#FFFFFF';
	
	
	}
function resourcehidetab(){
	document.getElementById('id7').style.visibility = 'hidden';
document.getElementById('id9').style.visibility = 'hidden';
document.getElementById('id8').style.backgroundImage = "none";
document.getElementById('link3').style.color = '#FFFFFF';
	
	
	}
function faqhidetab(){
	document.getElementById('id10').style.visibility = 'hidden';
document.getElementById('id12').style.visibility = 'hidden';
document.getElementById('id11').style.backgroundImage = "none";
document.getElementById('link4').style.color = '#FFFFFF';
	
	
	}
function announcehidetab(){
	document.getElementById('id13').style.visibility = 'hidden';
document.getElementById('id15').style.visibility = 'hidden';
document.getElementById('id14').style.backgroundImage = "none";
document.getElementById('link5').style.color = '#FFFFFF';
	
	}
	
function contacthidetab(){
document.getElementById('id16').style.visibility = 'hidden';
document.getElementById('id18').style.visibility = 'hidden';
document.getElementById('id17').style.backgroundImage = "none";
document.getElementById('link6').style.color = '#FFFFFF';
	
	}	




// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}
// close layer when click-out
/* document.onclick = mclose; */
