window.addEvent('domready', function(){   
    
    init_ishuman($$('form')); 

});

function init_ishuman(elem) // Ставим всем формам невидимое поле для того чтобы потом скриптом проверять его наличие чтоб определять что это был человек а не бот
  {
  var inputElement;
  elem.each(function(element) {
          if (element.getAttribute('action') !== false && !element.getAttribute('action').contains('http://') && !element.getAttribute('action').contains('https://')) // Если отправляется не наружу
            {
            inputElement = new Element('input', {id: 'ishuman', 'type':'hidden', 'name':'ishuman','value':'1'});
           element.adopt(inputElement);
           }
    });
  }

function show_code(id)
  {
  document.getElementById('code'+id).style.display = 'block';
  }

function $(id)
    {
    return document.getElementById(id);
    }

  function show_art_func(id)
    {
    for (var i=0;i<50;i++)
      {
      if ($('container'+i))
        {
        $('container'+i).style.display = 'none';
        $('artlink'+i).className = 'artlink';
        }
      }
    $('container'+id).style.display = 'block';
    $('artlink'+id).className = 'artlinksel';
    }
