/*
	Assec 2002 ixPP  1.0  ( acesso )
 // 	
 // 
 //
 //       Coder  ppires@assec.pt
 //       file ixmenu.js( da  pagina principal)

*/
 
  function escreve_cookie(nome,valor,expires,path,domain,secure) {

 if  (!valor)
    eval('var t='+nome); 
    else t= valor;
 
 alert(valor);
 document.cookie =  
     nome + "=" + escape (t) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") + 
    ((path) ? "; path=" + path : "") + 
    ((domain) ? "; domain=" + "assec.pt" : "") + 
    ((secure) ? "; secure" : "");
    
    }
    
var stoppesquisa;
 stoppesquisa = 0;
 
function  WriteCookie(name,value,expires,path,domain,secure){
     escreve_cookie(name,value,expires,path,domain,secure);
     }
     
     
//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){
   return;
   this.pposx = pposx;
     this.pposy = pposy;
 
    
      if (document.all) {
        layer.style.left=pposx+"px"; 
        layer.style.top=pposy+"px"; 
        layer.style.visibility= "visible";

        }
      else {
          layer.left = pposx;   
          layer.top  = 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)  
            posy=  ( parseInt(document.body.clientHeight  )     - 460 )/2 -2  ;
          
         else
              posy = 0;     
      
        if (parseInt(posy) < 0  ) posy = 0;

        window.posx = posx;
        window.posy = posy;

       LayerWH(l.Layertopo, 761 ,posy+2); 
       PosicionaLayer(l.Layertopo,posx,0 );
       
       LayerWH(l.Layerlateraldir, posx ,460); 
       PosicionaLayer(l.Layerlateraldir,posx+760,0 );
       
       LayerWH(l.Layerlateral, posx ,460);
       PosicionaLayer(l.Layerlateral,0,0);
       
       LayerWH(l.Layerpes , 760 ,posy+2); 
       PosicionaLayer(l.Layerpes,posx,posy + 461);
        
        

       
      };  

         
         
  function ixredimensiona(){
  // posicionaIMGTopo();
     
       }
     
 