

function codeImgPopup()
{
  if (!document.getElementsByTagName) return false;
  var links = document.getElementsByTagName("a");
  for (var i=0; i < links.length; i++)
  {
    if (links[i].className.match("popup"))
    {
      links[i].onclick = function()
      {
        window.open(this.href, "", "top=40,left=40,width=620,height=420");
        return false;
      }
    }
  }
}

function searchButtonClicked()
{
  var iFind = document.getElementsByTagName("input");
  for(var n=0; n < iFind.length; n++)
  {
    if(iFind[n].type == 'checkbox' && (iFind[n].parentNode.className == 'searchBlock' || iFind[n].parentNode.className == 'searchBlockChecked'))
    {
      iFind[n].onclick = function()
      {
        if(this.parentNode.className == 'searchBlock')
        {
          this.parentNode.className = 'searchBlockChecked';
        }
        else if(this.parentNode.className == 'searchBlockChecked')
        {
          this.parentNode.className = 'searchBlock';
        }
        return true;
      }
    }
  }
}

window.onload = function()
{
  codeImgPopup();
  searchButtonClicked();
}



