// JavaScript Document
var topx = 0;
topout = false;
topin = false;
var bottomx = 0;
bottomout = false;
bottomin = false;
left = 0;

 /*if (navigator.appName=="Netscape") {
  winW = window.innerWidth;
  winH = window.innerHeight;
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {
  winW = document.body.offsetWidth;
  winH = document.body.offsetHeight;
 }
var myWidth = 0, myHeight = 0;
myWidth = document.documentElement.clientWidth;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  
if(winW >= 801) {
left = (winW/2) - 400.5 + 249 + 37;
}
else {
left = 400.5 + 249 + 37;
}*/
topleft = left;
bottomleft = left;
function startShow(id)
{
	if(id == 1) {
	if(!topout)
	{
		topin = false;
		topout = true;
		showTab(1);
	}
	}
	if(id == 2) {
	if(!bottomout)
	{
		bottomin = false;
		bottomout = true;
		showTab(2);
	}
	}
}
function stopShow(id)
{
	if(id == 1) {
	if(!topin)
	{
		topout = false;
		topin = true;
		hideTab(1);
	}
	}
	if(id == 2) {
	if(!bottomin)
	{
		bottomout = false;
		bottomin = true;
		hideTab(2);
	}
	}
}
function showTab(id)
{
	if(id == 1) {
	var obj = document.getElementById('toptab');
	var objimg = document.getElementById('alImg1');
	//var objtext = document.getElementById('topinner');
	if(topout) {
	if(topx < 464)
	{
	topx+=16;
	topleft = left + topx;
	setTimeout('showTab(1)', 5);
	}
	else
	{
	topx = 464;
	topleft = left + topx;
	
	//objtext.style.visibility = 'visible';
	obj.innerHTML = '<div onMouseOver="MM_swapImage(\'clinicians\',\'\',\'<?php echo \'/templates/\' .$GLOBALS[\'cur_template\']. \'/\'; ?>images/clinicians_on.png\',1),startShow(1)" id="topinner" style="width: 80%;padding-left: 25px; padding-top: 10px; padding-right: 5px;"><img onMouseOver="MM_swapImage(\'clinicians\',\'\',\'<?php echo \'/templates/\' .$GLOBALS[\'cur_template\']. \'/\'; ?>images/clinicians_on.png\',1),startShow(1)" src="/images/tabbuttons.png" border="0" usemap="#Maptop"><br /><div onMouseOver="MM_swapImage(\'clinicians\',\'\',\'<?php echo \'/templates/\' .$GLOBALS[\'cur_template\']. \'/\'; ?>images/clinicians_on.png\',1),startShow(1)" style="width: 400px;; font-weight: bold; color:#FFFFFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">The NC AIDS  Education & Training Center offers clinicians intensive training opportunities and one-on-one assistance with clinical decision-making for individual patients. Our mission is to educate clinicians about HIV infection including prevention, diagnosis, training, treatment, and psychological issues.</div></div>';
	topout = false;
	}
	}
	obj.style.width = topx+'px';
	objimg.style.left = topleft+'px';
	//objtext.style.width = topx+'px';
	}
	if(id == 2) {
	var obj = document.getElementById('bottomtab');
	var objimg = document.getElementById('alImg2');
	var objtext = document.getElementById('bottominner');
	if(bottomout) {
	if(bottomx < 464)
	{
	bottomx+=16;
	bottomleft = left + bottomx;
	setTimeout('showTab(2)', 5);
	}
	else
	{
	bottomx = 464;
	bottomleft = left + bottomx;
	//objtext.style.visibility = 'visible';
	obj.innerHTML = '<div id="bottominner" onMouseOut="MM_swapImgRestore(), stopShow(2)" onMouseOver="MM_swapImage(\'communities\',\'\',\'<?php echo \'/templates/\' .$GLOBALS[\'cur_template\']. \'/\'; ?>images/communities_on.png\',1), startShow(2)" style="width: 80%;padding-left: 25px; padding-top: 10px; padding-right: 5px;"><img src="/images/tabbuttons.png" border="0" usemap="#Map2"><br /><div style="width: 400px;; font-weight: bold; color:#FFFFFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">We understand that in order to meet the whole needs of an HIV patient, his health care team is comprised of more than the medical staff.  Therefore, we occasionally offer training for social workers, mental health and substance abuse professionals, health educators, peer educators and other members of the health care team. </div></div>';
	bottomout = false;
	}
	}
	obj.style.width = bottomx+'px';
	objimg.style.left = bottomleft+'px';
	objtext.style.width = topx+'px';
	}
}

function hideTab(id)
{
	if(id == 1) {
	var obj = document.getElementById('toptab');
	var objimg = document.getElementById('alImg1');
	var objtext = document.getElementById('topinner');
	if(topin) {
	if(topx > 0)
	{
	topx-=16;
	if(topx < 400)
	{
	//objtext.style.visibility = 'hidden';
	obj.innerHTML = '';
	}
	topleft = left + topx;
	setTimeout('hideTab(1)', 5);
	}
	else
	{
	topx = 0;
	topleft = left + topx;
	topin = false;
	}
	}
	obj.style.width = topx+'px';
	objimg.style.left = topleft+'px';
	//objtext.style.width = topx+'px';
	}
	if(id == 2) {
	var obj = document.getElementById('bottomtab');
	var objimg = document.getElementById('alImg2');
	var objtext = document.getElementById('bottominner');
	if(bottomin) {
	if(bottomx > 0)
	{
	bottomx-=16;
	if(bottomx < 400)
	{
	//objtext.style.visibility = 'hidden';
	obj.innerHTML = '';
	}
	bottomleft = left + bottomx;
	setTimeout('hideTab(2)', 5);
	}
	else
	{
	bottomx = 0;
	bottomleft = left + bottomx;
	bottomin = false;
	}
	}
	obj.style.width = bottomx+'px';
	objimg.style.left = bottomleft+'px';
	objtext.style.width = topx+'px';
	}
	
}