function initMaster() {
  new AjaxTiny("FooterText");

  try {
    initPage();
  }
  catch (e) { };
}

$(document).ready(function(){
   initMaster();
});

function openNews(id) {
  InpacMaster.GetNews(id, openNews2);
}

function openNews2(response) {
  $('#newstopleft').html(response.value[0]);
  if (response.value[1].length > 0) $('#newsimg').html("<img src='" + response.value[1] + "' alt='' />");
  else $('#newsimg').empty();
  $('#newstxt').html(response.value[2]);
  $('#newsdiv').css({"margin-top":0}).show("normal");
}

function openNewsAlt(id) {
  InpacMaster.GetNews(id, function(r){openNewsAlt2(id, r);});
}

function openNewsAlt2(id, response) {
  $('#newstopleft').html(response.value[0]);
  if (response.value[1].length > 0) $('#newsimg').html("<img src='" + response.value[1] + "' alt='' />");
  else $('#newsimg').empty();
  $('#newstxt').html(response.value[2]);
  var top = $("#an_" + id).offset().top-207;
  $('#newsdiv').css({"margin-top":top}).show("normal");
}
