function MM_reloadPage(init) {
  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();
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function ShowNav() { //v6.0
  var i,obj,args=ShowNav.arguments;
  for (i=0; i<(args.length); i++) 
    if ((obj=MM_findObj(args[i]))!=null) {
      if (obj.style) {
        obj=obj.style; 
      }
      obj.display='inline';
    }
}

function HideNav() { //v6.0
  var i,obj,args=HideNav.arguments;
  for (i=0; i<(args.length); i++) 
    if ((obj=MM_findObj(args[i]))!=null) {
      if (obj.style) {
        obj=obj.style; 
      }
      obj.display='none';
    }
}


function OpenPage(id, param) {
  if (param != "")
    var file = "index.php?page=" + id + "&" + param;
  else
    var file = "index.php?page=" + id;
  self.location= file;
}


function OpenRate(id) {
  var file = "rate.php?page=" + id;
  window.open(file,'rate','width=400,height=300');
}


function OpenPrint(id, param) {
  if (param != "")
    var file = "print.php?page=" + id + "&" + param;
  else
    var file = "print.php?page=" + id;
  window.open(file,'print','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=500');
}


function posNav() {
  var object = document.getElementById("nav");
    if (document.layers) {
    var curtop = object.top;
  } else {
    var curtop = object.style.pixelTop;
  }
  var systop = document.body.scrollTop;
  object.style.top = curtop + (systop - curtop) / 4;
  setTimeout("posNav()", 100);
}
