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('/enotes/?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('/public/?isTitle=1&recNum='+recnum+'&topicid='+topicid+'&isNaked=1','','GET');
}


function goToAllNews() {
   if (!topicId) { 
      window.location='/news/?template=25';
   } else {
      window.location='/news/?template=29&topicid='+topicId;
   }
}

function goToAllEnotes() {
   if (!topicId) { 
      window.location='/enotes/?template=25';
   } else {
     window.location='/enotes/?template=29&topicid='+topicId;
   }
}

function goToAllPubs() {
   if (!topicId) { 
      window.location='/public/?template=25';
   } else {
     window.location='/public/?template=29&topicid='+topicId;
   }
}

