function newwin1(link) {
  nw = window.open(link,'rr' ,config='height=500,width=660,scrollbars=yes');
  nw.focus();                     
}

function newwin2(link) {
  nw = window.open(link,'rr' ,config='height=220,width=350,scrollbars=no');
  nw.focus();
}

var state = false;

function change(id) {
  var div = document.getElementById(id);
  if (div)
    if(div.style.display=='none')
      div.style.display='block';
    else
      div.style.display='none';
}

//Detecting the browser type
var isNetscape = (navigator.appName == "Netscape");
var isNetscape = false;
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 );
var DHTML_Enabled = true;
var agt=navigator.userAgent.toLowerCase();
var is_gecko = (agt.indexOf('gecko') != -1);


// To hide from old browsers generate the menu
// dynamically, invisible at the beginning
function MenuCall(Content, Width, BackgrColor, MenuNumber)
{
  var MenuID=MenuNumber;
  var WidthMenu=Width;
  var Color='#00599C';
  
  if (DHTML_Enabled)
  {
    if (isNetscape)
    {
      document.write("<LAYER bgcolor="+Color+"  width="+WidthMenu+"  visibility=hidden  id="+MenuID+"   onMouseover=\"MenuActivate('"+MenuID+"')\" onMouseOut=\"MenuKill('"+MenuID+"')\">"+Content+"</LAYER>");
    }
    else
    {
      if (is_gecko)
        document.write("<DIV id="+MenuID+"  STYLE=\"position:absolute; margin-top: -10px; left:233px; visibility:hidden; background:"+Color+"\"  onMouseover=\"MenuActivate('"+MenuID+"')\" onMouseOut=\"MenuKill('"+MenuID+"')\">"+Content+"</DIV>");
      else
        document.write("<DIV id="+MenuID+"  STYLE=\"position:absolute; visibility:hidden; background:"+Color+"\"  onMouseover=\"MenuActivate('"+MenuID+"')\" onMouseOut=\"MenuKill('"+MenuID+"')\">"+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(document.getElementById(MenuNumber)!=null)
    document.getElementById(MenuNumber).style.visibility="hidden";

  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"');
  }
}
// that's all
