var obj_zakl_show = new Object();
obj_zakl_show.id = "zakl_show"; //zakl_show_id
obj_zakl_show.body_id = "zakl_body";

var obj_zakl_hide = new Object();
obj_zakl_hide.id = "zakl_hide"; //zakl_hide_id
obj_zakl_hide.body_id = "zakl_hide";

var zakls_body = "zakls_body";

obj_zakl_hide.body_value = '' +
'<a onclick="javascript:ZaklShow();" style="text-decoration:none;"><img src="http://obozrevatel.com/_site/css/img/zakl/press.gif" alt="Íàøè Ïðîýêòû"/></a>' +
'';

obj_zakl_show.body_value = '<div id="zakl_obozproject" class="zakl_obozproject">' +
'<!--ÓàÏîðòàë -->' +
'<a href="http://uaportal.com/" rel="nofollow" target="_blank" class="menu_link"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/ua.gif" />ÓàÏîðòàë</a><br />' +
'<!--ÎÁÎÇ.ua -->' +
'<!--a href="http://oboz.ua/" target="_blank" class="menu_link"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/oboz.gif" />ÎÁÎÇ.ua</a><br /-->' +
'<!--ÑïîðòÎáîç -->' +
'<a href="http://sport.oboz.ua/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/sport.gif" />ÑïîðòÎáîç</a><br />' +
'<!--ÀâòîÎáîç -->' +
'<a href="http://auto.oboz.ua/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/auto.gif" />ÀâòîÎáîç</a><br />' +
'<!--ÔîòîÎáîç -->' +
'<a href="http://photo.oboz.ua/" target="_blank" rel="nofollow"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/foto.png" />ÔîòîÎáîç</a><br />' +
'<!--ÊèíîÎáîç -->' +
'<a href="http://kino.oboz.ua/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/kino.gif" />ÊèíîÎáîç</a><br />' +
'<!--ÌóçÎáîç -->' +
'<a href="http://muz.oboz.ua/" target="_blank" rel="nofollow"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/muz.png" />ÌóçÎáîç</a><br />' +
'<!--ÐåñòÎáîç -->' +
'<!--ÂèäåîÎáîç -->' +
'<a href="http://video.oboz.ua/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/video.gif" />ÂèäåîÎáîç</a><br />' +
'<!--ÔàéëÎáîç -->' +
'<a href="http://file.oboz.ua/" target="_blank" rel="nofollow"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/file.png" />ÔàéëÎáîç</a><br />' +
'<!--Ìîáèëüíèê -->' +
'<a href="http://mobilnik.ua/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/mob.gif" />Ìîáèëüíèê</a><br />' +
'<!--Êèÿíè -->' +
'<a href="http://forum.obozrevatel.com/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/favicon.gif" />Ôîðóìû</a><br />' +
'<!--Êèåâ-2000 -->' +
'<a href="http://kiev2000.com/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/kiev2000.gif" />Êèåâ-2000</a><br />' +
'<!--Ðàáîòà -->' +
'<a href="http://job.uaportal.com/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/job.gif" />Ðàáîòà</a><br />' +
'<!--Àóêöèîí -->' +
'<a href="http://auction.uaportal.com/" target="_blank"><img style="position: relative; top: 3px; right: 3px;" src="/_site/_pic/light/icons/auction.png" />Àóêöèîí</a><br />' +
'<!--Ìàãàçèí -->' +
'<a href="http://shop.oboz.ua/" target="_blank" rel="nofollow"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/shop.gif" />Ìàãàçèí</a><br />' +
'<!--Áëîãè -->' +
'<a href="http://blogs.oboz.ua/" target="_blank"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/blogs.png" />Áëîãè</a><br />' +
'<!--SMS -->' +
'<a href="http://mobilnik.ua/sms/" target="_blank" rel="nofollow"><img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/sms.gif" />SMS</a><br />' +
'</div>';

var obj_memu_obozprojects_footer = new Object();
obj_memu_obozprojects_footer.id = "memu_obozprojects_footer";
obj_memu_obozprojects_footer.body = '' +
'      <table cellspacing="0" cellpadding="0" width="100%" border="0">' +
'        <tr align="left">' +
'          <td>' +
'            <img src="/_site/_pic/light/pixel.gif" style="width: 20px; height: 1px" />' +
'          </td>' +
'          <!--ÎÁÎÇ.ua -->' +
'          <td >' +
'            <a href="http://oboz.ua/" target="_blank" class="menu_link">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/oboz.gif" />ÎÁÎÇ.ua</a>' +
'          </td>' +
'          <!--ÑïîðòÎáîç -->' +
'          <td >' +
'            <a href="http://sport.oboz.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/sport.gif" />ÑïîðòÎáîç</a>' +
'          </td>' +
'          <!--ÀâòîÎáîç -->' +
'          <td >' +
'            <a href="http://auto.oboz.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/auto.gif" />ÀâòîÎáîç</a>' +
'          </td>' +
'          <!--ÔîòîÎáîç -->' +
'          <td>' +
'            <a href="http://photo.oboz.ua/" target="_blank" rel="nofollow">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/foto.png" />ÔîòîÎáîç</a>' +
'          </td>' +
'          <!--ÊèíîÎáîç -->' +
'          <td >' +
'            <a href="http://kino.oboz.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/kino.gif" />ÊèíîÎáîç</a>' +
'          </td>' +
'          <!--ÌóçÎáîç -->' +
'          <td >' +
'            <a href="http://muz.oboz.ua/" target="_blank" rel="nofollow">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/muz.png" />ÌóçÎáîç</a>' +
'          </td>' +
'          <!--ÐåñòÎáîç -->' +
'          <td >' +
'            <a href="http://rest.oboz.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/rest.png" />ÐåñòÎáîç</a>' +
'          </td>' +
'          <!--ÂèäåîÎáîç -->' +
'          <td >' +
'            <a href="http://video.oboz.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/video.gif" />ÂèäåîÎáîç</a>' +
'          </td>' +
'          <!--ÔàéëÎáîç -->' +
'          <td>' +
'            <a href="http://file.oboz.ua/" target="_blank" rel="nofollow">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/file.png" />ÔàéëÎáîç</a>' +
'          </td>' +
'        </tr>' +
'        <tr align="left">' +
'          <td>' +
'          </td>' +
'          <!--ÓàÏîðòàë -->' +
'          <td>' +
'            <a href="http://uaportal.com/" rel="nofollow" target="_blank" class="menu_link">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/ua.gif" />ÓàÏîðòàë</a>' +
'          </td>' +
'          <!--Ìîáèëüíèê -->' +
'          <td>' +
'            <a href="http://mobilnik.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/mob.gif" />Ìîáèëüíèê</a>' +
'          </td>' +
'          <!--Êèÿíè -->' +
'          <td>' +
'            <!--a href="http://kiyany.obozrevatel.com/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/kiyani2.gif" />Êèÿíè</a-->' +
'            <a href="http://forum.obozrevatel.com/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/favicon.gif" />Ôîðóìû</a> ' +
'          </td>' +
'          <!--Êèåâ-2000 -->' +
'          <td>' +
'            <a href="http://kiev2000.com/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/kiev2000.gif" />Êèåâ-2000</a>' +
'          </td>' +
'          <!--Ðàáîòà -->' +
'          <td>' +
'            <a href="http://job.uaportal.com/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/job.gif" />Ðàáîòà</a>' +
'          </td>' +
'          <!--Àóêöèîí -->' +
'          <td>' +
'            <a href="http://auction.oboz.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px;" src="/_site/_pic/light/icons/auction.png" />Àóêöèîí</a>' +
'          </td>' +
'          <!--Ìàãàçèí -->' +
'          <td>' +
'            <a href="http://shop.oboz.ua/" target="_blank" rel="nofollow">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/shop.gif" />Ìàãàçèí</a>' +
'          </td>' +
'          <!--Áëîãè -->' +
'          <td width="10%">' +
'            <a href="http://blogs.oboz.ua/" target="_blank">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/blogs.png" />Áëîãè</a>' +
'          </td>' +
'          <!--SMS -->' +
'          <td>' +
'            <a href="http://mobilnik.ua/sms/" target="_blank" rel="nofollow">' +
'              <img style="position: relative; top: 3px; right: 3px" src="/_site/_pic/light/icons/sms.gif" />SMS</a>' +
'          </td>' +
'        </tr>' +
'      </table>' +
'';

var obj_zakl_current_show = new Object();
obj_zakl_current_show.id = obj_zakl_hide.id;
obj_zakl_current_show.body_id = obj_zakl_hide.body_id;
obj_zakl_current_show.body_value = obj_zakl_hide.body_value;

function GetInsideWindowHeight() {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (isCSS1Compat) {
    return document.documentElement.clientHeight;
  } else {
    return document.body.clientHeight;
  }
}

function GetInsideWindowWidth() {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (isCSS1Compat) {
    return document.documentElement.clientWidth;
  } else {
    return document.body.clientWidth;
  }
}

function GetObjectHeight(obj) {
  var result = 0;
  if (obj) {
    if (obj.offsetHeight) {
      result = obj.offsetHeight;
    } else if (obj.clip && obj.clip.height) {
      result = obj.clip.height;
    } else if (obj.style && obj.style.pixelHeigth) {
      result = obj.style.pixelHeigth;
    }
  }
  return parseInt(result);
}

window.onload = function() {
  if ((isIE && version > 7) || (isFf) || (isCh) || (isOp)) {
    //zakl_obozproject_value = zakl_obozproject_value_temp;
    DisplayNone(document.getElementById(obj_memu_obozprojects_footer.id));
    Show(document.getElementById(zakls_body));
    ShowCurZakl();
  } else {
    //memu_obozprojects_footer = memu_obozprojects_footer_temp;
    //var obj = document.getElementById(obj_memu_obozprojects_footer.id);
    //SetInnerHTML(obj, obj_memu_obozprojects_footer.body);
    //Show(obj);
  }
}

window.onresize = function() {
  var obj = document.getElementById(obj_zakl_current_show.id);
  PositionOnWindow(obj);
}

function ZaklHide() {
  HideCurZakl();
  obj_zakl_current_show.id = obj_zakl_hide.id;
  obj_zakl_current_show.body_id = obj_zakl_hide.body_id;
  obj_zakl_current_show.body_value = obj_zakl_hide.body_value;
  ShowCurZakl();
}

function ZaklShow() {
  HideCurZakl();
  obj_zakl_current_show.id = obj_zakl_show.id;
  obj_zakl_current_show.body_id = obj_zakl_show.body_id;
  obj_zakl_current_show.body_value = obj_zakl_show.body_value;
  ShowCurZakl();
}
function HideCurZakl() {
  var obj = document.getElementById(obj_zakl_current_show.id);
  var obj_body = document.getElementById(obj_zakl_current_show.body_id);
  CleanInnerHTML(obj_body);
  Hide(obj);
}

function ShowCurZakl() {
  var obj = document.getElementById(obj_zakl_current_show.id);
  var obj_body = document.getElementById(obj_zakl_current_show.body_id);
  SetInnerHTML(obj_body, obj_zakl_current_show.body_value);
  PositionOnWindow(obj);
  Show(obj);
}

function HideArray(array) {
  if (Array.prototype.isPrototypeOf(array)) {
    for (var i = 0; i < array.length; i++) {
      var obj = document.getElementById(array[i]);
      Hide(obj);
    }
  }
}

function ShowArray(array) {
  if (Array.prototype.isPrototypeOf(array)) {
    for (var i = 0; i < array.length; i++) {
      var obj = document.getElementById(array[i]);
      Show(obj);
    }
  }
}

function CleanInnerHTML(obj) {
  SetInnerHTML(obj, " ");
}

function SetInnerHTML(obj, value) {
  if (obj /* && obj.innerHTML */)
    obj.innerHTML = value;
}

function Hide(obj) {
  if (obj && obj.style)
    obj.style.visibility = "hidden";
}

function Show(obj) {
  if (obj && obj.style)
    obj.style.visibility = "visible";
}

function DisplayNone(obj) {
  Display(obj, "none");
}

function Display(obj, value) {
  if (obj && obj.style)
    obj.style.display = value;
}

function PositionOnWindow(obj) {
  var scrollX = 0, scrollY = 0;
  var x = 0; Math.round(GetInsideWindowWidth());
  var y = Math.round(GetInsideWindowHeight()) - GetObjectHeight(obj);
  ShiftTo(obj, x, y);
}

function ShiftTo(obj, x, y) {
  if (obj && obj.style) {
    var units = (typeof obj.style.left == "string") ? "px" : 0;
    obj.style.left = x + units;
    obj.style.top = y + units;
  }
}
