
var  mt = setTimeout("vis()",300);
/******************************************************************************/

function globalLeft(eElement)
{
   if (!eElement && this)                    // if argument is invalid
   {                                         // (not specified, is null or is 0)
      eElement = this;                       // and function is a method
   }                                         // identify the element as the method owner

   var DL_bIE = document.all ? true : false; // initialize var to identify IE

   var nLeftPos = eElement.offsetLeft;       // initialize var to store calculations
   var eParElement = eElement.offsetParent;  // identify first offset parent element

   while (eParElement != null)
   {                                         // move up through element hierarchy

      if(DL_bIE)                             // if browser is IE, then...
      {
         if( (eParElement.tagName != "TABLE") && (eParElement.tagName != "BODY") )
         {                                   // if parent is not a table or the body, then...
            nLeftPos += eParElement.clientLeft; // append cell border width to calcs
         }
      }
      else                                   // if browser is Gecko, then...
      {
         if(eParElement.tagName == "TABLE")  // if parent is a table, then...
         {                                   // get its border as a number
            var nParBorder = parseInt(eParElement.border);
            if(isNaN(nParBorder))            // if no valid border attribute, then...
            {                                // check the table's frame attribute
               var nParFrame = eParElement.getAttribute('frame');
               if(nParFrame != null)         // if frame has ANY value, then...
               {
                  nLeftPos += 1;             // append one pixel to counter
               }
            }
            else if(nParBorder > 0)          // if a border width is specified, then...
            {
               nLeftPos += nParBorder;       // append the border width to counter
            }
         }
      }
      nLeftPos += eParElement.offsetLeft;    // append left offset of parent
      eParElement = eParElement.offsetParent; // and move up the element hierarchy
   }                                         // until no more offset parents exist
   return nLeftPos;                          // return the number calculated
}

function Sp() //show hide sp - div
{
 var sp = document.getElementById("sp");
 if (!sp)
  return;
 else
  {
   var cild = sp.childNodes;
  for (var i=0; i<cild.length; i++)
  {
   var c1 = cild[i].childNodes;
   //alert(c1.length);
   }
  }  
}

/******************************************************************************/
function globalTop(eElement)
{
   
   if (!eElement && this)                    // if argument is invalid
   {                                         // (not specified, is null or is 0)
      eElement = this;                       // and function is a method
   }                                         // identify the element as the method owner

   var DL_bIE = document.all ? true : false; // initialize var to identify IE
      
   var nTopPos = eElement.offsetTop;         // initialize var to store calculations
   var eParElement = eElement.offsetParent;  // identify first offset parent element

   while (eParElement != null)
   {                                         // move up through element hierarchy
      if(DL_bIE)                             // if browser is IE, then...
      {
         if( (eParElement.tagName != "TABLE") && (eParElement.tagName != "BODY") )
         {                                   // if parent a table cell, then...
            nTopPos += eParElement.clientTop; // append cell border width to calcs
         }
      }
      else                                   // if browser is Gecko, then...
      {
         if(eParElement.tagName == "TABLE")  // if parent is a table, then...
         {                                   // get its border as a number
            var nParBorder = parseInt(eParElement.border);
            if(isNaN(nParBorder))            // if no valid border attribute, then...
            {                                // check the table's frame attribute
               var nParFrame = eParElement.getAttribute('frame');
               if(nParFrame != null)         // if frame has ANY value, then...
               {
                  nTopPos += 1;              // append one pixel to counter
               }
            }
            else if(nParBorder > 0)          // if a border width is specified, then...
            {
               nTopPos += nParBorder;        // append the border width to counter
            }
         }
      }

      nTopPos += eParElement.offsetTop;      // append top offset of parent
      
      eParElement = eParElement.offsetParent; // and move up the element hierarchy
   }                                         // until no more offset parents exist
   return nTopPos;                           // return the number calculated
}


function vis(){
 s1 = document.getElementById("sub1");
 s2 = document.getElementById("sub2");
 s3 = document.getElementById("sub3");
 s4 = document.getElementById("sub4");
 s5 = document.getElementById("sub5");
 s6 = document.getElementById("sub6");
if(s1){ s1.style.visibility = "hidden"; s1.style.display='none';}
if(s2){ s2.style.visibility = "hidden"; s2.style.display='none';}
if(s3){ s3.style.visibility = "hidden"; s3.style.display='none';}
if(s4){ s4.style.visibility = "hidden"; s4.style.display='none';}
if(s5){ s5.style.visibility = "hidden"; s5.style.display='none';}
if(s6){ s6.style.visibility = "hidden"; s6.style.display='none';}
}

function sett (p_id,c_id)
 { 
  mt = setTimeout("vis();",300);
 }
 
function stopt(){clearTimeout(mt);}

function v(p_id,c_id){
 clearTimeout(mt); 
 vis(c_id);
 s = document.getElementById(c_id);
 p = document.getElementById(p_id);
if (s && p){
 s.style.left = globalLeft(p)+130;
 s.style.top = globalTop(p)-40;
 s.style.display='inline';
 s.style.visibility='visible';
 }
}

function setColor()
{
return 0;
s = document.getElementById("sp");
_th = s.getElementsByTagName("th");

SC = setTimeout("setColor();",200);

if (_th[0].style.color == "rgb(255,0,0)")
 {_th[0].style.color = "rgb(255,64,64)"; return;}
if (_th[0].style.color == "rgb(255,64,64)")
 {_th[0].style.color = "rgb(255,128,128)"; return;}
if (_th[0].style.color == "rgb(255,128,128)")
 {_th[0].style.color = "rgb(255,192,192)"; return;}
if (_th[0].style.color == "rgb(255,192,192)")
 {_th[0].style.color = "rgb(255,255,255)"; return;}
if (_th[0].style.color == "rgb(255,255,255)")
 {_th[0].style.color = "rgb(255,0,0)"; return;}
_th[0].style.color = "rgb(255,0,0)";
}
