function activeButton(oButton, newButtonColor, newTextColor)
 {
  oButton.style.backgroundColor = newButtonColor
  oButton.children[0].style.color = newTextColor
 }


function clearGoogleSrc()
 {
  document.getElementById("googleSrc").value = ""
 }


function googleSrc()
 {
  var oQ = document.getElementById("googleSrc")

  if(oQ.value == "" || oQ.value == "Definire ricerca")
   {
    oQ.value = "Definire ricerca"
    setTimeout("clearGoogleSrc()", 1000)
   }
  else
   {
    top.main.location.href = "http://www.google.com/search?hl=it&btnG=&q=" + oQ.value
    setTimeout("clearGoogleSrc()", 1000)
   }
 }


function showMenu(oMenu)
 {
  for(var ctr = 0; ctr < document.all.length; ctr++)
   {
    if(document.all[ctr].tagName == "TR" && document.all[ctr].id != oMenu)
      if(document.all[ctr].id.substring(0, 4) == "menu")
        document.all[ctr].style.display = "none"
   }

  oMenu = document.getElementById(oMenu).style

  if(oMenu.display == "block")
    oMenu.display = "none"
  else
    oMenu.display = "block"
 }


function startClock(oClock)
 {
  var data = new Date()

  var sec  = data.getSeconds()
  if(sec < 10)
    sec = "0" + sec

  var min  = data.getMinutes()
  if(min < 10)
    min = "0" + min

  var hrs  = data.getHours()

  var day  = data.getDate()
  switch(data.getMonth())
   {
    case 0:
      var mon = "Gennaio"
      break
    case 1:
      var mon = "Febbraio"
      break
    case 2:
      var mon = "Marzo"
      break
    case 3:
      var mon = "Aprile"
      break
    case 4:
      var mon = "Maggio"
      break
    case 5:
      var mon = "Giugno"
      break
    case 6:
      var mon = "Luglio"
      break
    case 7:
      var mon = "Agosto"
      break
    case 8:
      var mon = "Settembre"
      break
    case 9:
      var mon = "Ottobre"
      break
    case 10:
      var mon = "Novembre"
      break
    case 11:
      var mon = "Dicembre"
   }

  var yrs  = data.getYear()

  oClock.value = day + " " + mon + " " + yrs + " - " + hrs + ":" + min + ":" + sec
 }

function bannerActPag(pag)
 {
  document.getElementById("bannerActualPage").value = pag
 }

