//
//
var IW= 0;
var IH= 0;
var PX= 0;
var PY= 0;
var brand= null;
var IMGW= 18;
var IMGH= 18;
var LSAFETY= 12;
var TSAFETY= 36;
var off_image= "pijl.gif";
var on_image= "pijl_.gif";
var gandalf= 0;

//var ourLays= new Array();
var alldivs= new Array();

function BrandInit()
{
   if( brand != null ) 
      return;
   else 
   { 
//      ID_CHECK:  
      for( i=0 ; i<alldivs.length && gandalf==0 ; i++ )
      {
         if( (gandalf==0) && (alldivs(i).id=="TopBranding") )
         {
            gandalf= 1;
            brand= alldivs(i);
//            continue ID_CHECK;
         }
//         if(gandalf==1)
//         {
//            if(alldivs(i).id== "nh1")
//            {
//               pop_menu= alldivs(i);
//               continue ID_CHECK;
//            }
//            ourLays[ourLays.length]= alldivs(i);
//         }
      }
   }
   brand.onmouseover= neat_mouseover;
   brand.onmouseout= neat_mouseout;
}
               
function neat_mouseover()
{
   window.status= "omhoog";
   window.document.all.TopBrandingPic.src= on_image;
   return true;
}
                  
function neat_mouseout()
{
   window.status= "";
   window.document.all.TopBrandingPic.src= off_image;
   return true;
}
                     
function BrandPosition()
{
   if( brand != null )
   {
      IH= document.body.clientHeight;
      IW= document.body.clientWidth;
      PX= document.body.scrollLeft;  
      PY= document.body.scrollTop;  
      brand.style.top= (IH+PY-(IMGH+TSAFETY));
      brand.style.left=(IW+PX-(IMGW+LSAFETY));  
      for (i=0; i<alldivs.length; i++)
      {
         if (alldivs(i).style.zIndex > brand.style.zindex)
            brand.style.zindex= (alldivs(i).style.zIndex + 1);  
      }
   }  
}

function BrandShow(toggle)
{
   if( brand != null )
      brand.style.display= toggle;
}
      
function Branding()
{
   if(navigator.appVersion.indexOf("Mac") == -1)
   {  
      oldIW= IW;  
      oldIH= IH;  
      oldPX= PX;  
      oldPY= PY;
      if( (document.body.clientHeight!=oldIH)||(document.body.clientWidth!=oldIW)||
          (document.body.scrollLeft!=oldPX)  ||(document.body.scrollTop!=oldPY))
      {
         BrandInit();
         BrandShow("none");
         BrandPosition();
         BrandShow("");
      }
   }
}

if (document.images)
{
   bVer= parseInt(navigator.appVersion);
   if( bVer >= 4 )
   {
//      alert(navigator.appVersion);
      alldivs= document.all.tags("DIV");

      document.write( '<DIV CLASS="TopBranding" ID="TopBranding" ' );
      document.write( 'STYLE="position:absolute;top:1;display:none;" ALIGN="right">' );
      document.write( '<a HREF="#top" TARGET="_self">' );
      document.write( '<img NAME="TopBrandingPic" SRC="'+off_image+'" BORDER="0" ALT="omhoog" WIDTH="24" HEIGHT="23">' );
      document.write( '</a><br>' );
      document.write( '</DIV>' );

      setInterval("Branding()",100);
   }
}


