var initMenu = 0;

function whichBrs() {
  var agt=navigator.userAgent.toLowerCase();
  if (agt.indexOf("opera") != -1) return 'Opera';
  if (agt.indexOf("staroffice") != -1) return 'Star Office';
  if (agt.indexOf("beonex") != -1) return 'Beonex';
  if (agt.indexOf("chimera") != -1) return 'Chimera';
  if (agt.indexOf("netpositive") != -1) return 'NetPositive';
  if (agt.indexOf("phoenix") != -1) return 'Phoenix';
  if (agt.indexOf("firefox") != -1) return 'Firefox';
  if (agt.indexOf("safari") != -1) return 'Safari';
  if (agt.indexOf("skipstone") != -1) return 'SkipStone';
  if (agt.indexOf("msie") != -1) return 'Internet Explorer';
  if (agt.indexOf("netscape") != -1) return 'Netscape';
  if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
  if (agt.indexOf('\/') != -1) {
  if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
  return navigator.userAgent.substr(0,agt.indexOf('\/'));}
  else return 'Netscape';} else if (agt.indexOf(' ') != -1)
  return navigator.userAgent.substr(0,agt.indexOf(' '));
  else return navigator.userAgent;
}

if (parseInt(navigator.appVersion.substring(0,1))>=4)
{
  top1 = new Image (); top1.src ="images/buttons/topmenu01.gif";
  top1o = new Image (); top1o.src ="images/buttons/topmenu01_.gif"; 
}

function change(image1,image2)
{
  document.images[image1].src = eval (image2 + ".src");
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
if (initMenu) {
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
  if (documentOffset < 0) documentOffset = 20;
  LayerMenu01_ = LayerMenu01.style;
  LayerMenu02_ = LayerMenu02.style;
  LayerMenu03_ = LayerMenu03.style;
  LayerMenu04_ = LayerMenu04.style;
  LayerMenu01_.left = 7 + documentOffset;
  LayerMenu02_.left = 141 + documentOffset;
  LayerMenu03_.left = 288 + documentOffset;  
  LayerMenu04_.left = 402 + documentOffset;
  var browser=whichBrs();
  if (browser=='Firefox') {
    LayerMenu01_.top = 221;
    LayerMenu02_.top = 221;
    LayerMenu03_.top = 221;
    LayerMenu04_.top = 221;
  }
}
}
	
function _init()
{
  documentOffset = (document.body.offsetWidth - 776) / 2;
  initMenu = 1;
}

function WinOpen(url,x,y) {
var options = "toolbar=no,menubar=no,scrollbars=no,resizable=no,width=" + x + ",height=" + y;
msgWindow=window.open(url,"WinOpen",options);
}
