/* 
 *    exploding_menu.js    
 *     
 *    Javascript DHTML Animated Menu's which appear to "expload" from their
 *    source element.
 * 
 *    Author:        Micah Carrick <email@micahcarrick.com>
 *    Date:          Nov 03, 2006
 *
 *    Version History:
 *
 *       1.0 [Nov 03, 2006] - Initial Version
*/


var tabImage1 = new Image();
var tabImage2 = new Image();
var tabImage3 = new Image();
var tabImage4 = new Image();
var tabImage5 = new Image();
var tabImage6 = new Image();
var tabImage7 = new Image();
var tabImage8 = new Image();

tabImage1.src = 'http://www.quickmedical.com/navigation/images/home-over.gif';
tabImage2.src = 'http://www.quickmedical.com/navigation/images/healthinfo-over.gif';
tabImage3.src = 'http://www.quickmedical.com/navigation/images/prosupplies-over.gif';
tabImage4.src = 'http://www.quickmedical.com/navigation/images/proequip-over.gif';
tabImage5.src = 'http://www.quickmedical.com/navigation/images/homehealth2-over.gif';
tabImage6.src = 'http://www.quickmedical.com/navigation/images/fitness-over.gif';
tabImage7.src = 'http://www.quickmedical.com/navigation/images/gsa_over.gif';
tabImage8.src = 'http://www.quickmedical.com/navigation/images/gifts-over.gif';
   
function getBodyClassName()
{
   var a = document.getElementsByTagName('body');
   if (a) return a[0].className;
   else return null;
}
   

function changeTabBackground(tab, hot)
{
   var obj;

   switch(tab)
   {
      case 'home_tab':
      
      if (getBodyClassName() == 'home') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/home-over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/home.gif')";
      }
      break;
      
      case 'healthinfo_tab':
      
      if (getBodyClassName() == 'healthinfo') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/healthinfo-over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/healthinfo.gif')";
      }
      break;
      
	   case 'prosupplies_tab':
      
      if (getBodyClassName() == 'prosupplies') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/prosupplies-over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/prosupplies.gif')";
      }
      break;
	  
	   case 'proequip_tab':
      
      if (getBodyClassName() == 'proequip') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/proequip-over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/proequip.gif')";
      }
      break;
	  
	   case 'homehealth_tab':
      
      if (getBodyClassName() == 'homehealth') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/homehealth2-over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/homehealth2.gif')";
      }
      break;
	  
	  case 'fitness_tab':
      
      if (getBodyClassName() == 'fitness') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/fitness-over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/fitness.gif')";
      }
      break;
	  
	  	  case 'specials_tab':
      
      if (getBodyClassName() == 'specials') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/gsa_over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/gsa.gif')";
      }
      break;
      
      case 'gifts_tab':
      
      if (getBodyClassName() == 'gifts') break;
      
      obj = document.getElementById(tab);
      if (obj.style)
      {
         if (hot) obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/gifts-over.gif')";
         else obj.style.backgroundImage = "url('http://www.quickmedical.com/navigation/images/gifts.gif')";
      }
      break;
   }
}



