﻿// JavaScript Document

function r(id, level) {
	scroll(0,0)
	old = document.form.prom3.value
	document.form.prom3.value = id
	document.form.level.value = level
	document.form.prom2.focus()
	document.getElementById("tdL"+id).style.backgroundColor = "#669900"
	document.getElementById("tdP"+id).style.backgroundColor = "#669900"
  if (old > 1) {
    document.getElementById("tdL"+old).style.backgroundColor = "#666666"
    document.getElementById("tdP"+old).style.backgroundColor = "#666666"
  }
	scroll(0,0)
}

function z() {
	old = document.form.prom3.value
	document.form.prom3.value = -1
  if (old > 1) {
    document.getElementById("tdL"+old).style.backgroundColor = "#666666"
    document.getElementById("tdP"+old).style.backgroundColor = "#666666"
  }
}

function s(id) {
	document.form.prom2.value = document.form.prom2.value + " :"+id+":"
	document.form.prom2.focus()
}

function menu(id) {
  for (i=1; i<id; i=i+1) {
    document.getElementById("div"+i).style.display = "none"
    document.getElementById("menu"+i).style.color = "#CCCCCC"
  }

  document.getElementById("div"+id).style.display = "block"
  document.getElementById("menu"+id).style.color = "#99CC00"  

  for (i=id+1; i<10; i=i+1) {
    document.getElementById("div"+i).style.display = "none"
    document.getElementById("menu"+i).style.color = "#CCCCCC"
  }
}