/* -------------------------------------------------------------
   DHTML para a Modo Novo
   -------------------------------------------------------------
   Criado por DGoulart
   ------------------------------------------------------------- */

//Roda os logos do Informa na página corpo.html

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this

// to add more images, just continue
// the pattern, adding to the array below

//Pic[0] = 'images/fam_screen2.gif'
//Pic[1] = 'images/ibe_screen2.gif'
//Pic[2] = 'images/iol_screen2.gif'
Pic[0] = 'images/infw_screen4.gif'
Pic[1] = 'images/pes_screen2.gif'
//Pic[4] = 'images/studio_screen2.gif'

// do not edit anything below this line

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runBGSlideShow(){

   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }

   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runBGSlideShow()', slideShowSpeed)
}


//Roda os logos do Informa na página fam2000.html

// Set slideShowSpeed (milliseconds)
var slideShowSpeed1 = 3000

// Duration of crossfade (seconds)
var crossFadeDuration1 = 3

// Specify the image files
var Pict = new Array() // don't touch this

// to add more images, just continue
// the pattern, adding to the array below

Pict[0] = 'images/fam2000_pq.gif'
Pict[1] = 'images/ibe.gif'
Pict[2] = 'images/iol2000.gif'

// do not edit anything below this line

var t1
var j1 = 0
var p1 = Pict.length

var preLoad1 = new Array()
for (i = 0; i < p1; i++){
   preLoad1[i] = new Image()
   preLoad1[i].src = Pict[i]
}

function runBGSlideShow1(){

   if (document.all){
      document.images.SlideShow1.style.filter="blendTrans(duration=2)"
      document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration1)"
      document.images.SlideShow1.filters.blendTrans.Apply()
   }
   document.images.SlideShow1.src = preLoad1[j1].src
   if (document.all){
      document.images.SlideShow1.filters.blendTrans.Play()
   }

   j1 = j1 + 1
   if (j1 > (p1-1)) j1=0
   t1 = setTimeout('runBGSlideShow1()', slideShowSpeed1)
}



//Faz o menu andar
//Navigation_Portable Menu

function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
   }
}
function checkLocation() {
object="Layer1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}




//Verifica campos preenchidos Form Cadastro

function checkFields() {
missinginfo = "";
if (document.mailing.UserName.value == "") {
missinginfo += "\n     -  Nome";
}
if (document.mailing.InstNome.value == "") {
missinginfo += "\n     -  Instituição";
}
if (document.mailing.UserCargo.value == "") {
missinginfo += "\n     -  Cargo";
}
if (document.mailing.InstEnd.value == "") {
missinginfo += "\n     -  Endereço";
}
if (document.mailing.InstCidade.value == "") {
missinginfo += "\n     -  Cidade";
}
if (document.mailing.InstUF.value == "") {
missinginfo += "\n     -  UF";
}
if (document.mailing.InstCEP.value == "") {
missinginfo += "\n     -  CEP";
}
if (document.mailing.InstBairro.value == "") {
missinginfo += "\n     -  Bairro";
}
if (document.mailing.InstFone.value == "") {
missinginfo += "\n     -  Telefone";
}
if (document.mailing.Versao.value == "") {
missinginfo += "\n     -  Versão dos Softwares";
}
if (document.mailing.Versao.value == "Selecione") {
missinginfo += "\n     -  Versão dos Softwares";
}
if (missinginfo != "") {
missinginfo ="______________________________________\n" +
"Você não preencheu corretamente os campos:\n" +
missinginfo + "\n______________________________________" +
"\nPor favor preencha e envie novamente!";
alert(missinginfo);
return false;
}
else return true;
}

function checkFieldsIW() {
missinginfo = "";
if (document.mailing.UserName.value == "") {
missinginfo += "\n     -  Nome";
}
if (document.mailing.InstNome.value == "") {
missinginfo += "\n     -  Instituição";
}
if (document.mailing.UserCargo.value == "") {
missinginfo += "\n     -  Cargo";
}
if (document.mailing.InstEnd.value == "") {
missinginfo += "\n     -  Endereço";
}
if (document.mailing.InstCidade.value == "") {
missinginfo += "\n     -  Cidade";
}
if (document.mailing.InstUF.value == "") {
missinginfo += "\n     -  UF";
}
if (document.mailing.InstCEP.value == "") {
missinginfo += "\n     -  CEP";
}
if (document.mailing.InstBairro.value == "") {
missinginfo += "\n     -  Bairro";
}
if (document.mailing.InstEmail.value == "") {
missinginfo += "\n     -  E-mail";
}
if (document.mailing.InstFone.value == "") {
missinginfo += "\n     -  Telefone";
}
if (document.mailing.Versao.value == "") {
missinginfo += "\n     -  Versão dos Softwares";
}
if (document.mailing.tipoAqui.value == "") {
missinginfo += "\n     -  Tipo de Aquisição";
}
if (missinginfo != "") {
missinginfo ="______________________________________\n" +
"Você não preencheu corretamente os campos:\n" +
missinginfo + "\n______________________________________" +
"\nPor favor preencha e envie novamente!";
alert(missinginfo);
return false;
}
else return true;
}

//Pull down da página mapa.html
var refer=true;
function combo() {
if (refer) {
  document.all.contents.style.visibility="visible";
  refer=false;
}
else {
  document.all.contents.style.visibility="hidden";
  refer=true;
}
}

//Aumenta as imagens do Studio e do Pessoal
function abreFoto(img){
  foto1= new Image();
  foto1.src=(img);
 	controlaImg(img);
}
function controlaImg(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    verFoto(img);
  }
  else{
    funcao="controlaImg('"+img+"')";
    intervalo=setTimeout(funcao,20);
  }
}
function verFoto(img){
  largura=foto1.width+20;
  altura=foto1.height+20;
  linha="width="+largura+",height="+altura+",top=50, left=50";
  janela=window.open(img,"",linha);
//  janela.document.write("<br><br>"+"<font face='Verdana' size=1 color='#006699'><a href='#' onClick='window.close(); return false;'><b>|X| Fechar</b></font></a></p>");
}


// Variáveis
var statusMsg=" "


//Funções
function goToURL() { window.location = "#top"; }
function goToURLh() { window.location = "#hist"; }
function goToURLmp(local) { window.location = local; }

//abre nova página com tamanho determinado
function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=700,height=500");
}


