//Runs "Block" and "Unblock" Buttons: 

function ajaxPublicationsRights(PMID)
  {
  var xmlHttp;
  try{
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
  }
  catch (e){
    // Internet Explorer
    try{
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e){
      try{
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e){
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function(){
      if(xmlHttp.readyState==4){
		button = document.getElementById(PMID).value
		if (button === 'Block'){
         		document.getElementById(PMID).value="Unblock";
			document.getElementById(PMID).style.border="1px solid #820b0b";
			document.getElementById(PMID).style.color="#820b0b";
			document.getElementById(PMID).style.background="#ffaaaa";
 		}
		else{
			document.getElementById(PMID).value="Block";
 			document.getElementById(PMID).style.border="1px solid #084e05";
			document.getElementById(PMID).style.color="#084e05";
			document.getElementById(PMID).style.background="#acc9ab"; 
		}
	}
      } 
    file = "/~zuurman/extensions/externalWikiSettings.php?PMID="+PMID;
    xmlHttp.open("GET", file ,true);
    xmlHttp.send(null);
  }
function showQuarters(year){
	document.getElementById(year).style.visibility="visible";
}
function hideQuarters(year){
	document.getElementById(year).style.visibility="hidden";
}
  

