img_janela_off = new Image();
img_janela_off.src = "../images/janela1.gif";

img_janela_on = new Image();
img_janela_on.src = "../images/janela2.gif";


	ponto_off = new Image();
	ponto_off.src = "images/ponto_off.gif";
	ponto_on = new Image();
	ponto_on.src = "images/ponto_on.gif";

// ---------------------------------------------

function Ativa(name){
  if (document.all) document.images[name].src = eval("ponto_on.src");
  if (document.layers) document.layers["content"].document.images[name].src = eval("ponto_on.src");
}

function Desativa(name){
  if (document.all) document.images[name].src = eval("ponto_off.src");
  if (document.layers) document.layers["content"].document.images[name].src = eval("ponto_off.src");
}

// ---------------------------------------------


function troca(a,b){
if (document.all){
  document.images[b].src=eval("img_" + a + "_on.src")
}
if (document.layers){
  document.layers["navega"].document.images[b].src=eval("img_" + a + "_on.src")
}
}

function destroca(a,b){
if (document.all){
  document.images[b].src=eval("img_" + a+ "_off.src")
}
if (document.layers){
  document.layers["navega"].document.images[b].src=eval("img_" + a + "_off.src")
}
}

// ---------------------------------------------

function submete(esse) {



if (document.layers)
ofo = document.layers["content"].document.forms[0]

if (document.all)
ofo = document.forms[0]

if (esse.selectedIndex != 0) {

	valor = esse.options[esse.selectedIndex].value
	pos = valor.indexOf(",")

	ofo.item.value = valor.substring(0,pos)

	ofo.sub.value = valor.substring(pos+1, valor.length)
	ofo.submit()
}
}

// ---------------------------------------------

onload = loop
acre = 0
bot = 238
tot = 0
topog = 96

function loop() {

topog = topog - acre
bot= bot + acre
tot = tot + acre

  if (topog > 96) {
    topog=96
    bot=238
    tot=0
  }

  if (topog < 96 - (vari - 238)) {
    topog=96 - (vari - 238)
    bot=vari
    tot=vari - 238
  }

  if (document.layers) {
    layer = document.layers["navega"]
    layer.visibility = "show" 
    layer.top = topog
    layer.clip.left   = 0;
    layer.clip.top    = tot;
    layer.clip.right  = 170;
    layer.clip.bottom = bot;
  }
  if (document.all) {
    layer = document.all.navega.style
    layer.visibility = "visible"
    layer.posTop = topog
    layer.clip = 'rect(' + tot + ' ' +  170 + ' ' + bot + ' ' + 0 +')';
  }
  setTimeout("loop()",75)
}
