﻿ function GoImg2Forum(st_templ)
 {
  var list_id = new Array();
  var h_id = document.getElementById("id_img_hidd");
  if (h_id)
  {
    list_id[0] = h_id.value;
    integrforum.GetStr4Forum(list_id,st_templ,OnSucceededGoImg2Forum,OnFailedGoImg2Forum);
  }
 }

function OnSucceededGoImg2Forum(result, userContext, methodName)
{
 switch ( methodName )
 {
  case "GetStr4Forum": window.location.href=result;
      break;
  default : alert("Неизвестный метод");
      break;
 }
}

function OnFailedGoImg2Forum(error,userContext, methodName )
{
  alert("Ошибка сервера");
}

function ChangeDisplayImageSize() {
    var img_prev = document.getElementById("img4prev");
    var h_img_prev = document.getElementById("h4prevsrcimg");
    var div_prev = document.getElementById("div4previmg");

    var img_full = document.getElementById("img4full");
    var h_img_full = document.getElementById("h4fullsrcimg");
    var div_full = document.getElementById("div4fullimg");

    if (div_prev.style.display == "block") {
        div_prev.style.display = "none";
        img_full.src = h_img_full.value;
        div_full.style.display = "block";
        ImgLinksService.SetParamFS("yes");
    }
    else {
        div_full.style.display = "none";
        img_prev.src = h_img_prev.value;
        div_prev.style.display = "block";
        ImgLinksService.SetParamFS("");
    }
}

