 var tooltip_window = null;
  function tooltip(mensaje, pw, ph,status)
  {

      if(status != 0)
      {
        if(tooltip != null) tooltip.focus();
        else
        {
          var tooltip = open('', 'IMAGE', 'width='+ pw + ',height='+ ph + ',top=25,left=25');
          tooltip_window = tooltip;
          tooltip.document.open();
          tooltip.document.writeln('<html><head><title>MEP Engineering</title></head><body text=black bottomMargin=0 leftMargin=0 rightMargin=0 topMargin=0 marginwidth="0" marginheight="0" bgcolor="#FFFFFF">');
          tooltip.document.writeln('<CENTER><img src=' + mensaje + ' border=0></CENTER>');
          tooltip.document.writeln('</body></html>');
          tooltip.document.close();

        }
      }
      else
      {
        if(tooltip_window != null) tooltip_window.close();
      }

  }


function openwindow(imageName,imageWidth,imageHeight) {
	imageHeightWin=imageHeight;
	posLeft=25;
	posTop=25;
	alt="MEP Engineering.";
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeightWin+",left="+posLeft+",scrollbars=yes, top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><style>	BODY {	BORDER-LEFT: 0px; BORDER-BOTTOM: 0px;	SCROLLBAR-TRACK-COLOR: #FFFFFF; 	SCROLLBAR-FACE-COLOR: #FFFFFF;	SCROLLBAR-HIGHLIGHT-COLOR: #FFFFFF; 	SCROLLBAR-DARKSHADOW-COLOR: #FFFFFF; 	SCROLLBAR-SHADOW-COLOR: 888888; 	SCROLLBAR-3DLIGHT-COLOR: 888888; 	SCROLLBAR-ARROW-COLOR: 888888; 	SCROLLBAR-BASE-COLOR: 888888;}	</style><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src='+imageName+' alt='+alt+'>'); 
	newWindow.document.write('</center></body></html>');
	newWindow.document.close();
	newWindow.focus();
}


var isNetscape = ((navigator.appName == "Netscape")&&(navigator.appCodeName=="Mozilla"));
var isMacIE = ( (navigator.userAgent.indexOf("IE 4")  > -1) && (navigator.userAgent.indexOf("Mac")  > -1) );
var layerRef = (isNetscape) ? "document" : "document.all";
var styleRef = (isNetscape) ? "" : ".style";
var DHTML_Enabled = ( (document.layers || document.all) && !isMacIE );

// To hide from old browsers generate the menu
// dynamically, invisible at the beginning
function MenuCall(Content, Width, BackgrColor, Spasename, MenuNumber) 
  {
      MenuID=MenuNumber;
      WidthMenu=Width;
      Color=BackgrColor;

          if (DHTML_Enabled) 
         {
            if (isNetscape) 
               { 

                 document.write("<LAYER    bgcolor="+Color+"  width="+WidthMenu+"  visibility=hidden  id="+MenuID+" >"+Content+"</LAYER>");	
               } 
            else 
               {  
	           document.write("<DIV  id="+MenuID+"  STYLE=\"  position:absolute; visibility:hidden; background:"+Color+"\">"+Content+"</DIV>");
		     eval(layerRef + '["'+MenuID+'"]'+ styleRef + '.width ='+WidthMenu);
	          }
        }

  }

// To activate a menu just change the visibility parameter
function MenuActivate(MenuNumber) 
  {
         MenuID=MenuNumber;

         if (DHTML_Enabled) 
            { 
               if (isNetscape) 
                  { 
                      MenuIDPlace=MenuID+"Place"
                      MenuIDPicture=MenuID+"Picture"
                      // alert ( "MenuIDPicture="+MenuIDPicture)
                      CoordX=document.anchors[MenuIDPlace].x+document.images[MenuIDPicture].width;
                      CoordY=document.anchors[MenuIDPlace].y;
                      eval(layerRef + '["'+MenuID+'"]' + styleRef + '.top = '+CoordY);
                      eval(layerRef + '["'+MenuID+'"]' + styleRef + '.left = '+CoordX);
                      eval(layerRef + '["'+MenuID+'"]' + styleRef + '.visibility = "visible"');                     
                                   
                  } 
               else 
                  {
                      eval(layerRef + '["'+MenuID+'"]' + styleRef + '.visibility = "visible"');
                  }
        }
   }
// To de-activate a menu just change the visibility parameter
function MenuKill(MenuNumber) 
   { 
      MenuID=MenuNumber;
      if (DHTML_Enabled) 
           {
//But first fixing a bug in IE4
	     if (  (!isNetscape)&&(window.event.toElement.tagName== 'A') )
	         {
	           return;
	         }  
	     if (  (!isNetscape)&&(window.event.toElement.tagName== 'DIV') )
	         {
	           return;
	         } 
// Now changing the visibility parameter
            eval(layerRef + '["'+MenuID+'"]' + styleRef + '.visibility = "hidden"');

		
		}
   }
