/*
   Copyright (c) Cristalink Limited, 2004-2006. All rights reserved.
*/

/* Reload in the top frame */
if( parent.location.href != location.href )
{
   window.top.location.replace(location.href);
}

g_IsHover = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || 
  ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))); 
  
function preloadImage(img)
{ 
   var a = new Image(); 
   a.src = img; 
   return a; 
} 

function checkOutline(el)
{
   return (el.tagName == "DIV") && (el.className == "expand");
}

function findOutline2(el)
{
   if(el == null) return null;
   for(var s = el; s != null; s = s.nextSibling)
   {
      if(checkOutline(s)) return s;
      var c = findOutline2(s.firstChild);
      if(c != null) return c;
   }
   return null;
}

function findOutline(el)
{
   if(el == null) return null;
   var r = findOutline2(el);
   for(var p = el; r == null; )
   {
      p = p.parentNode;
      if(p == null) return null;
      r = findOutline2(p.nextSibling);
   }
   return r;
}

function outline(ref)
{
   var el = findOutline(ref);
   if(el == null) return; 
   if( (el.style.display=='none') || (el.style.display=='') )
   {
      el.style.display = 'block';
      APreImage = el.getElementsByTagName("img");
      for (i = 0; i < APreImage.length; i++)
      {
         if( !APreImage[i].complete )
         {
            APreImage[i].src = APreImage[i].src;
         }
      }
   }
   else
   {
      el.style.display = 'none';
   }
}
