/**
* Cat Nav module for turboShop(r)
* Copyright(c) Digivate limited 2004
* Must always include also with this file anybrowser.js for element postion and getElement ID functions
* pAd 07/01/2004
**/

// ** global vars
var currentPopup = null; //popup that is being displayed if any

/**
* Popup a popup div using 'pop' + the given catagory code in code
* @param string parent catecode
**/
function showPopup(code)
{
 if (tsGetElementById('pop'+code))
 {
   currentPopup = tsGetElementById('pop'+code);
   currentPopup.style.left = getOffsetLeft(tsGetElementById('mi'+code))+leftOffSet;
   currentPopup.style.top = getOffsetTop(tsGetElementById('mi'+code))+topOffSet;
  	currentPopup.style.visibility = 'visible';
 }
 //else no popup user has to click on menu item to be taken to cate list
}
/**
*  Hide a given popup that is still displayed
**/
function hidePopup(code)
{
 if (tsGetElementById('pop'+code))
 {
 	currentPopup = null;
  	tsGetElementById('pop'+code).style.visibility = 'hidden';
 }
}