function thClick2()
{
   large_obj = document.getElementById("display_box");
   if (large_obj)
   {
      large_obj.style.backgroundImage = 'url('+large_list[thumbsObj.PicID]+')';
   }
}

function prevPicture()
{
   _PicID   = thumbsObj.PicID - 1;
   _ThumbID = thumbsObj.ThumbID - 1;
   if (_PicID >= 0)
   {
      large_obj = document.getElementById("display_box");
      if (large_obj)
      {
         large_obj.style.backgroundImage = 'url('+large_list[_PicID]+')';
         if (_ThumbID == 0)
         {
            thumbsObj.Prev();
            _ThumbID = thumbsObj.thumbCount;
         }
         thumbsObj.Selected = _ThumbID;
         thumbsObj.Select();
      }
   }
}

function nextPicture()
{
   _PicID   = thumbsObj.PicID + 1;
   _ThumbID = thumbsObj.ThumbID + 1;
   if (_PicID < thumbsObj.PicList.length)
   {
      large_obj = document.getElementById("display_box");
      if (large_obj)
      {
         large_obj.style.backgroundImage = 'url('+large_list[_PicID]+')';
         if (thumbsObj.thumbCount < _ThumbID)
         {
            thumbsObj.Next();
            _ThumbID = _ThumbID - thumbsObj.thumbCount;
         }
         thumbsObj.Selected = _ThumbID;
         thumbsObj.Select();
      }
   }
}

function firstSelect(_ThumbID)
{
   if (_ThumbID > thumbsObj.thumbCount)
   {
      _newPage    = Math.ceil(_ThumbID / thumbsObj.thumbCount);
      _newThumbID = _ThumbID - ((_newPage-1) * thumbsObj.thumbCount);
      thumbsObj.GoTo(_newPage);
      thumbsObj.Selected = _newThumbID;
      thumbsObj.Select();
   }
   else
   {
      thumbsObj.Selected = _ThumbID;
      thumbsObj.Select();
   }
}


function run()
{
   swf_viewer_obj = document.getElementById("swf_viewer");
   if (swf_viewer_obj)
   {
   var _swf_viewer= new SWFObject(swf_viewer_obj.innerHTML, "swf_viewer", "300", "300", "8");
   _swf_viewer.addParam("wmode", "transparent");
   _swf_viewer.addParam("menu", "false");
   _swf_viewer.write("swf_viewer");
   }
}

function zoom(_url, _zoom_param, _addClassName)
{
   advAJAX.get(
   {
       url: _url+"zoom,"+_zoom_param+"/get_zoom,show/",
       onSuccess:
             function(obj)
             {   //window.prompt( obj.url);
                 new_size = obj.responseText;
                 if ((new_size>=0) && (new_size < 6))
                 {
                    _article_content = document.getElementById("article_content");
                    if (_article_content)
                        _article_content.className = "article_content "+_addClassName+" article_content_size_"+new_size;

                    _comment = document.getElementById("comments");

                    if (_comment.childNodes.length > 0)
                    {
                       for (i = 0; i < _comment.childNodes.length; i++)
                       {
                           if ((typeof _comment.childNodes[i].tagName == 'string')&&(_comment.childNodes[i].tagName.toLowerCase() == 'li'))
                           {
                              _li = _comment.childNodes[i];
                              if (_li.childNodes.length > 0)
                              {
                                  for (j = 0; j < _li.childNodes.length; j++)
                                  {
                                      if ((typeof _li.childNodes[j].className == 'string')&&(_li.childNodes[j].className.indexOf('comment_content')>=0))
                                      {
                                          _cm_content = _li.childNodes[j];
                                          _cm_content.className = "comment_content article_content_size_"+new_size;

                                      }
                                  }
                              }
                           }
                       }
                    }
                 }
             },
       onError:
             function(obj)
             {
                 alert( 'Error: ' + obj.status );
             }
   });
}
