function toggleChars() {
	document.getElementById("mclickchar").className='';
	document.getElementById("mcharacters").className='hidden';
}
function toggleExcerpt(item,len) {
        for (var i=0; i<len; i++) item=item.parentNode;
	if (item.className=='item') {
		item.className='item showfull';
	} else if (item.className=='item alt') {
		item.className='item alt showfull';
	} else if (item.className=='item showfull') {
		item.className='item';
	} else if (item.className=='item alt showfull') {
		item.className='item alt';
	}
}
function changepage(link,page,type,resultid) {
  link.className='loading';
  var xmlHttp;
  try { xmlHttp=new XMLHttpRequest();}
  catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { return true; }
  }}	
  xmlHttp.onreadystatechange=function() {
  	if (xmlHttp.readyState==4) {
  		document.getElementById(resultid).innerHTML=xmlHttp.responseText;
  	}
  }
  var url="/projects/diplomatic/ajax?type="+type+"&page="+page;
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
  return false;
}
function toggleBox(id) {
	if (id=='cast') {
		document.getElementById('cast').style.display='block';
		document.getElementById('char').style.display='none';
	} else {
		document.getElementById('cast').style.display='none';
		document.getElementById('char').style.display='block';	
	}
}