var topicId;

function updateNewsBlock(topicid,recnum) {
   evalExpr = 'if (ajaxData) {  document.getElementById("newsBlock").innerHTML = ajaxData; document.body.style.cursor="default"; } else { document.body.style.cursor="wait"; }';
   //evalExpr = 'if (ajaxData) { newsBlock.innerHTML = ajaxData; } else { newsBlock.innerHTML = messageWait; }';
   sendRequest('/news/?isTitle=1&recNum='+recnum+'&topicid='+topicid+'&isNaked=1','','GET');
}

function updateEnotesBlock(topicid,recnum) {
   evalExpr = 'if (ajaxData) {  document.getElementById("enotesBlock").innerHTML = ajaxData; document.body.style.cursor="default"; } else { document.body.style.cursor="wait"; }';
   //evalExpr = 'if (ajaxData) { enotesBlock.innerHTML = ajaxData; } else { enotesBlock.innerHTML = messageWait; }';
   sendRequest('/notes/?isTitle=1&recNum='+recnum+'&topicid='+topicid+'&isNaked=1','','GET');
}


function updatePubBlock(topicid,recnum) {
   evalExpr = 'if (ajaxData) {  document.getElementById("pubBlock").innerHTML = ajaxData; document.body.style.cursor="default"; } else { document.body.style.cursor="wait"; }';
   //evalExpr = 'if (ajaxData) { pubBlock.innerHTML = ajaxData; } else { pubBlock.innerHTML = messageWait; }';
   sendRequest('/publications/?isTitle=1&recNum='+recnum+'&topicid='+topicid+'&isNaked=1','','GET');
}


function goToAllNews() {
   if (!topicId) { 
      window.location='/news/?template=68';
   } else {
      window.location='/news/?template=72&topicid='+topicId;
   }
}

function goToAllEnotes() {
   if (!topicId) { 
      window.location='/notes/?template=68';
   } else {
     window.location='/notes/?template=72&topicid='+topicId;
   }
}

function goToAllPubs() {
   if (!topicId) { 
      window.location='/publications/?template=68';
   } else {
     window.location='/publications/?template=72&topicid='+topicId;
   }
}

