var timer=new Array()

function ShowDiv(TheLayer,TheHref)
{

	if(document.getElementById(TheLayer)==null)
		return

	if(document.getElementById(TheLayer).offsetHeight<10)
		return

	if(document.getElementById(TheLayer).style.visibility=="visible")
		return false

	TheWidth = TheHref.offsetWidth
	if(TheHref.offsetParent)
	{
    	for( var posX = -1, posY = -10; TheHref.offsetParent; TheHref = TheHref.offsetParent )
		{
			posX += TheHref.offsetLeft;
			posY += TheHref.offsetTop;
	    }
	}

	posX=posX-20;
	if(TheLayer.indexOf("_")==-1)
		document.getElementById(TheLayer).style.left=posX+"px"
	else
		document.getElementById(TheLayer).style.left=posX+TheWidth+"px"
		
	TheAdj=12
	TheAdjtop=26
		
	if(navigator.appVersion.indexOf("MSIE")!=-1)
	{
		TheAdj=26
		TheAdjtop=26
	}
	
	
	if(TheLayer.indexOf("_")==-1)
		document.getElementById(TheLayer).style.top=posY+TheAdj+"px"
	else
		document.getElementById(TheLayer).style.top=posY+TheAdjtop+"px"
		
	document.getElementById(TheLayer).style.top=posY+TheAdjtop+"px"
	
	document.getElementById(TheLayer).style.visibility="visible"

	MainLayer=TheLayer.replace(/_\d+$/,"")
	HideExcept(MainLayer,TheLayer)
	StopTimer(TheLayer)
}
function HideDiv(TheLayer,TheI)
{
	MainLayer=TheLayer.replace(/_(\d+)/g,"")
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf(MainLayer)!=-1)
		{
			TheDivs[i].style.visibility="hidden"		
			TheDivs[i].style.left="0px"
			TheDivs[i].style.top="0px"
			clearInterval(timer[TheDivs[i].id])
		}
	}
}

function StartTimer(TheLayer)
{

	timer[TheLayer]=setInterval("HideDiv('"+TheLayer+"')",50)
	if(TheLayer.indexOf("_")!=-1)
	{
		StartTimer(TheLayer.replace(/_\d+$/,""))
	}
	
}

function StopTimer(TheLayer)
{
	MainLayer=TheLayer.replace(/_(\d+)/g,"")
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf(MainLayer)!=-1)
		{
			clearInterval(timer[TheDivs[i].id])
			timer[TheDivs[i].id]=""
		}
	}
}
function Goto(ThePage)
{
	//alert(ThePage)
	location.href=ThePage
	

}
function HideExcept(TheLayer,TheChild)
{
	SubTrees=TheLayer+"_"
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf(SubTrees)!=-1 && TheDivs[i].id!=TheChild && TheDivs[i].id.indexOf("_")!=-1)
		{
			if(TheDivs[i].id.indexOf(TheChild)==-1 || TheChild=="")
			{
				TheDivs[i].style.visibility="hidden"
				TheDivs[i].style.left="0px"
				TheDivs[i].style.top="0px"
				clearInterval(timer[TheDivs[i].id])
			}
		}
	}
}
function HideAll()
{
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf("Layer")!=-1)
		{
			TheDivs[i].style.visibility="hidden"
			clearInterval(timer[TheDivs[i].id])
			timer[TheDivs[i].id]=""
		}
	}
}





document.write("<div id='Layer1' style='position:absolute; left:10px; top:0px; width:155px; z-index:10;visibility:hidden;  border: 1px none #DDE4FB;' onMouseOver='StopTimer(this.id)' onMouseOut='StartTimer(this.id);return false;'>");
document.write("<table cellpadding='2' bgcolor='#cc99ff'  width='135' cellspacing='0' border='0' align='center'>");
document.write("<tr><td width='140' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt' class='menutxt' onclick=document.location.href='teachr_training_program.html' align='center' >Teacher Training Program</td></tr>");
document.write("<tr><td width='140' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt'   class='menutxt' onclick=document.location.href='Therapist_Training_Program.html' align='center' >Therapist Training Program");
document.write("</td></tr>");
document.write("</table></div>");

document.write("<div id='Layer2' style='position:absolute; left:10px; top:0px; width:155px; z-index:10;visibility:hidden;  border: 1px none #DDE4FB;' onMouseOver='StopTimer(this.id)' onMouseOut='StartTimer(this.id);return false;'>");
document.write("<table cellpadding='2' bgcolor='#cc99ff'  width='135' cellspacing='0' border='0' align='center'>");
document.write("<tr><td width='140' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt' class='menutxt' onclick=document.location.href='newsletterfeb2012.html' align='center' >February 2012</td></tr>");
document.write("<tr><td width='140' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt'   class='menutxt' onclick=document.location.href='newsletter.html' align='center' >January 2012");
document.write("</td></tr>");
document.write("</table></div>");

TheDivs=window.document.getElementsByTagName('Div')
 
	
