var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
                parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.")) >= 0 ? 1 : 0;
var	altura   = window.screen.availHeight;
var	largura  = window.screen.availWidth;

function Mostra7Labirintos() {
  if (parent.isMinNS4) {
    win = window.open('SeteLabirintos/Curso.html', 'Labirintos', 'width=' + (parent.largura - 20) + ',height=' + (parent.altura - 30) + ',left=0,top=0,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
  } else {
    win = window.open('SeteLabirintos/Curso.html', 'Labirintos','fullscreen=yes');
  }
}

function MostraLabirinto(url) {
if (parent.isMinNS4)
  win = window.open(url, 'Labirintos', 'width=' + (parent.largura - 20) + ',height=' + (parent.altura - 30) + ',left=0,top=0,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
else
  win = window.open(url, 'Labirintos', 'fullscreen=yes');
}

function LabirintoGrupo1(url) {
if (parent.isMinNS4)
  win = window.open(url, 'Grupo1', 'width=' + (parent.largura - 20) + ',height=' + (parent.altura - 30) + ',left=0,top=0,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
else
  win = window.open(url, 'Grupo1', 'fullscreen=yes');
}

function Foto384x288(data) {
var url = 'Fotos/' + data + '/Indice.html'
if (parent.isMinNS4)
  win = window.open(url, 'Fotos', 'width=160,height=' + (parent.altura - 30) + ',left=' + ((parent.largura - 570) / 2) + ',top=0,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
else
  win = window.open(url, 'Fotos', 'width=145,height=' + (parent.altura - 30) + ',left=' + ((parent.largura - 540) / 2) + ',top=0,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
}

function FotoFrame(data) {
var url = 'Fotos/' + data + '/FrameFotos.html'
  if (parent.isMinIE4) {
    if (parent.largura > 800) {
      cantoX = (parent.largura - 787) / 2;
    } else {
      cantoX = 0;
    }
    if (parent.altura > 600) {
      cantoY = (parent.altura - 531) / 2;
    } else {
      cantoY = 0;
    }
    win = window.open(url, 'FrameFotos', 'width=787,height=531,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=no');
  } else {
    if (parent.largura > 800) {
      cantoX = (parent.largura - 782) / 2;
    } else {
      cantoX = 0;
    }
    if (parent.altura > 600) {
      cantoY = (parent.altura - 528) / 2;
    } else {
      cantoY = 0;
    }
    win = window.open(url, 'FrameFotos', 'width=782,height=528,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=no');
  }
}

function Jornal(data) {
var url = 'Jornais/' + data + '/Artigo.html'
  if (parent.isMinIE4) {
    if (parent.largura > 742) {
      cantoX = (parent.largura - 734) / 2;
    } else {
      cantoX = 0;
    }
    if (parent.altura > 442) {
      cantoY = (parent.altura - 434) / 2;
    } else {
      cantoY = 0;
    }
    win = window.open(url, 'Reportagem', 'width=734,height=434,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,title=no,resizable=no');
  } else {
    if (parent.largura > 758) {
      cantoX = (parent.largura - 750) / 2;
    } else {
      cantoX = 0;
    }
    if (parent.altura > 458) {
      cantoY = (parent.altura - 450) / 2;
    } else {
      cantoY = 0;
    }
    win = window.open(url, 'Reportagem', 'width=750,height=450,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,title=no,resizable=no');
  }
}

function Janela620x450(url) {
  if (parent.largura > 800) {
    cantoX = (parent.largura - 620) / 2;
  } else {
    cantoX = 90;
  }
  if (parent.altura > 600) {
    cantoY = ((parent.altura - 450) / 2) - 30;
  } else {
    cantoY = 45;
  }
  win = window.open(url, 'Janela660x500', 'width=620,height=450,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
}

function Janela660x500(url) {
  if (parent.largura > 800) {
    cantoX = (parent.largura - 660) / 2;
  } else {
    cantoX = 50;
  }
  if (parent.altura > 600) {
    cantoY = ((parent.altura - 500) / 2) - 30;
  } else {
    cantoY = 20;
  }
  win = window.open(url, 'Janela660x500', 'width=660,height=500,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
}

function Janela760x560(url) {
  if (parent.largura > 800) {
    cantoX = (parent.largura - 760) / 2;
  } else {
    cantoX = 40;
  }
  if (parent.altura > 600) {
    cantoY = ((parent.altura - 560) / 2) - 30;
  } else {
    cantoY = 20;
  }
  win = window.open(url, 'Janela760x560', 'width=760,height=560,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
}

function Janela(url) {
  if (parent.largura > 800) {
    cantoX = (parent.largura - 700) / 2;
  } else {
    cantoX = 50;
  }
  if (parent.altura > 600) {
    cantoY = ((parent.altura - 500) / 2) - 30;
  } else {
    cantoY = 20;
  }
  win = window.open(url, 'Janela', 'width=700,height=500,left=' + cantoX + ',top=' + cantoY + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,title=no,resizable=yes');
}
