<!--
function Jet_GetElementsByClassName(classname)
{
    var a = [];
    var re = new RegExp('\\b' + classname + '\\b');
    var els = document.getElementsByTagName("*");
    for(var i=0,j=els.length; i<j; i++)
    {
       if(re.test(els[i].className))
       {
         a.push(els[i]);
         //alert(els[i]);
       }
    }
    return a;
}

function serverc() 
{
        var server_type=document.getElementById("auth_form_server");
        value = server_type.options[server_type.selectedIndex].text;
        if (value=="livejournal.com")
	{
        	document.getElementById("auth_form_login").className = "livejournal";
	}
        if (value=="liveinternet.ru")
	{
        	document.getElementById("auth_form_login").className = "liveinternet";
	}
        if (value=="yandex.ru")
	{
        	document.getElementById("auth_form_login").className = "yandex";
	}
        if (value=="openid")
	{
        	document.getElementById("auth_form_login").className = "openid";
	}
}

function delete_confirm()
{
      if (confirm('Удалить?'))
      {
         return true;
      }
      else
      {
         return false;
      }
}

function approve_confirm()
{
      if (confirm('Утвердить?'))
      {
         return true;
      }
      else
      {
         return false;
      }
}

function unapprove_confirm()
{
      if (confirm('Отключить?'))
      {
         return true;
      }
      else
      {
         return false;
      }
}

function add_comment_form(id)
{
   var base_url='http://rumol.ru';

   form_data='<form action="' + base_url + '/addcomment/'+ id +'" method="post"><p class="input_comment">Заголовок:</p><input type="text" class="input_text" name="post_title"/><p class="input_comment">Текст:</p><textarea class="input_textarea" name="post_text"></textarea><input type="submit" value="Отправить" style="margin-top: 3px; margin-bottom: 10px;"/></form>';

   elem=document.getElementById("reply"+id);
   elem.style.display = "block";
   elem.innerHTML=form_data;
}


function add_reply_form(id)
{
   elems=Jet_GetElementsByClassName('reply_div');
   for(i=0; i<elems.length; i++)
   {
     elems[i].style.display="none";
   }

   var base_url='http://rumol.ru';

   allowed='&lt;a&gt; &lt;b&gt; &lt;br&gt; &lt;div&gt; &lt;em&gt; &lt;embed&gt; &lt;i&gt; &lt;img&gt; &lt;li&gt; &lt;object&gt; &lt;ol&gt; &lt;s&gt; &lt;span&gt; &lt;strike&gt; &lt;strong&gt; &lt;table&gt; &lt;td&gt; &lt;tr&gt; &lt;u&gt; &lt;ul&gt;';
   form_data='<form action="' + base_url + '/addcomment/'+ id +'" method="post"><p class="input_comment"><!--p class="input_comment">Текст:</p--><textarea class="input_textarea" name="post_text" id="textarea' + id + '"></textarea><p style="font-size: 9px; color: #999999; padding-left: 0px; margin-bottom: 4px;"><a style="color: #999999;" href="' + base_url +'/content/blog/allowed_tags">разрешенные теги</a></p><input type="submit" value="Отправить" style="margin-top: 3px; margin-bottom: 10px;"/></form>';

   elem=document.getElementById("reply"+id);
   elem.style.display = "block";
   elem.innerHTML=form_data;

   textarea=document.getElementById("textarea"+id);
   width=(textarea.parentNode.offsetWidth-10);
   textarea.style.width=width+'px';
}

function open_cabinet_edit_form()
{
   elem=document.getElementById('cabinet_edit_form');
   elem.style.display = "block";
   elem=document.getElementById('cabinet_edit_link');
   elem.style.display = "none";
}

function add_upload_form()
{
   elem=document.getElementById('form_upload');
   childs=elem.childNodes;
   count=childs.length;
   select = elem.childNodes[0];
   newSelect = select.cloneNode(true);
   cloned=elem.appendChild(newSelect);
   cloned.childNodes[0].setAttribute('name', 'upload['+count+']');
   cloned.childNodes[0].value='';
}

function check_upload_form(elem)
{

   par=document.getElementById('form_upload');
   childs=par.childNodes;
   count=childs.length;
   elem_name=elem.name;
   elem_name=elem_name.replace('upload[', '');
   elem_name=elem_name.replace(']', '');
   if (elem_name==(count-1) && elem.value!='')
   {
      add_upload_form();
   }
}

function popup_photo(n)
{   
   var base_url='http://rumol.ru';
   window.open(base_url+'/photo/'+n,'','Toolbar=0,Location=0,Directories=0,Status=1,Menubar=0,Scrollbars=0,Resizable=1,Width=800,Height=600');
   return false;
}
-->