function readCookie(name) {  var nameEQ = name + "=";  var ca = document.cookie.split(';');  for(var i=0;i < ca.length;i++) {    var c = ca[i];    while (c.charAt(0)==' ') c = c.substring(1,c.length);    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  }  return null;}var cookie = readCookie("journal_lang");if (!cookie) { 	// here is where we take action if cookie is not set.	var eng_footer = "<div id='footer'><p class='bodygrey'>Post your comments, reactions, and responses to the pieces in the <a href='http://hemi.nyu.edu/bb/phpBB2/viewforum.php?f=18&sid=b50b20e9ee1fd87c68cfce0b9c983774'><i>e-misf&eacute;rica</i> forum</a>. You can also post general questions about the e-journal</p></div>";			document.write(eng_footer);	} else {		if (cookie == 'eng') {		var eng_footer = "<div id='footer'><p class='bodygrey'>Post your comments, reactions, and responses to the pieces in the <a href='http://hemi.nyu.edu/bb/phpBB2/viewforum.php?f=18&sid=b50b20e9ee1fd87c68cfce0b9c983774'><i>e-misf&eacute;rica</i> forum</a>. You can also post general questions about the e-journal.</p></div>";			document.write(eng_footer);			} else {				if (cookie == 'esp') {					var esp_footer = "<div id='footer'><p class='bodygrey'>Publica tus comentarios en respuesta a los materiales de la revista en <a href='http://hemi.nyu.edu/bb/phpBB2/viewforum.php?f=18&sid=b50b20e9ee1fd87c68cfce0b9c983774'>el foro de <i>e-misf&eacute;rica</i> </a>. También aceptamos tus preguntas generales acerca de la revista. </p></div>";			document.write(esp_footer);				} else { 			if (cookie == 'por') {						var por_footer = "<div id='footer'><p class='bodygrey'>Escreva e coloque seus comentários, respostas e reações às matérias no  <a href='http://hemi.nyu.edu/bb/phpBB2/viewforum.php?f=18&sid=b50b20e9ee1fd87c68cfce0b9c983774'>forum de discussões da <i>e-misf&eacute;rica</i> </a>. Você também poderá enviar e colocar perguntas gerais sobre o e-jornal.  </p></div>";			document.write(por_footer);					} else {					alert ('error');					}		}	}}