/*
	Assec 2002 ixPP  1.0  ( acesso )
 // 	
 // 
 //
 //       Coder  ppires@assec.pt
 //       file ixmenu.js( da  pagina principal)

*/
 
    
//window.captureEvents(event.RESIZE);   
window.onresize=ixredimensiona;

    
      
window.onscroll=ixscroll;
 function ixscroll(){
 // posicionaIMGTopo();
     
       }


function LayerVis(layer,modo){
   if (!layer) return;
   
 /* 
   if ((modo=='') or (modo == 'true')) var visivel = 'visible';
     else var  visivel = 'none';
*/

     if (document.all) 
         layer.style.display= modo;
      else 
          layer.display= modo;
     
}


function LayerWH(layer,w,h){
   if (!layer) return;
   
 /* 
   if ((modo=='') or (modo == 'true')) var visivel = 'visible';
     else var  visivel = 'none';
*/

   if (document.all){ 
         layer.style.width= w;
         layer.style.height= h;
         }
      else 
          layer.display= modo;
     
}

 function PosicionaLayer(layer,pposx,pposy){
     this.pposx = pposx;
     this.pposy = pposy;
    
      if (!layer) return;
     
    
      if (document.all) {
        layer.style.left=pposx+"px"; 
        layer.style.top=pposy+"px"; 
        layer.style.visibility= "visible";

        }
      else {
          layer.left = this.pposx;   
          layer.top  = this.pposy; 
          
          layer.visibility= "visible";
      
        }
                  
}

function GetHeight(layer){
        
     if (!layer) return 0;
     if (document.all) {
       if (false && layer.style.pixelHeight)
              return (layer.style.pixelHeight);
            else
               return (layer.clientHeight);
        }
      else {
            if (false && layer.style.pixelHeight)
              return (layer.style.pixelHeight);
            else
               return (layer.clientHeight);
        }
     return (-1);
      
}       

 function posicionaIMGTopo(){
     var  l= new Object ;
     var posx= 0;
     var posy= 0;
     
     
     if (document.all){ l =  document.all;  }
       else {
         l =  document;
          };
     
    
     if (document.all) {
       // posiciona  left
           if ( document.body.clientWidth > 760)
              posx= (parseInt(document.body.clientWidth ) -760)/2;
  
           }
      else {
                 
           if (window.innerWidth > 760)
              posx= (parseInt(window.innerWidth) -760)/2;
       
            }
             
    
        var posy= 0;
         if (document.all)  
            if ( parseInt(document.body.clientHeight) > 460 )
                posy=  ( parseInt(document.body.clientHeight  )    - 460 )/2    ;
          
         else
              posy = 0;     
	      
      //  alert(posy);
        if (posy < 0  ) posy = 0;
	

        window.posx = posx;
        window.posy = posy;
        
	//alert(window.innerHeight);
       LayerWH(Layertopo, posx*2 + 760,posy + 58);
       PosicionaLayer(Layertopo,0,0);
       LayerWH(Layerbarra, posx*2 + 760,16);
       PosicionaLayer(Layerbarra,0,posy + 58);
        
    //  LayerWH(Layerflash, posx*2 + 760,posy*2 + 43);
      };  

         
         
  function ixredimensiona(){
  posicionaIMGTopo();
     
       }
     
 


