// JavaScript Document
// Extra Ling 390a functions
// Christopher Potts. Last update: 2007-09-01.


function randomImages(){
		img_count = 5;
		var rand = Math.floor(Math.random() * img_count)
		if (rand == 0) {
			document.getElementById("rightColumn").innerHTML = "<img src='images/1984-eyes.jpg' alt='Sinister glance' width='250' height='204' />";
		}
		else if (rand == 1) { 
			document.getElementById("rightColumn").innerHTML = "<img src='images/grice-covershot.jpg' alt='H. Paul Grice musing' width='250' height='317' />";
		}
		else if (rand == 2) {
			document.getElementById("rightColumn").innerHTML = "<a href='http://rockridgeinstitute.org/'><img src='images/elephant-title.jpg' alt='Don't think of an elephant!' width='315' height='77' /></a>"; 
		}
		else if (rand == 3) {
			document.getElementById("rightColumn").innerHTML = "<a href='http://languageandlaw.org/'><img src='images/speaking-of-crime.jpg' alt='Speaking of Crime, by Solan and Tiersma' width='150' height='226' /></a>"; 
		}
		else { //if (rand == 4) {
			document.getElementById("rightColumn").innerHTML = "<a href='http://languageandlaw.org/'><img src='images/legal-language.jpg' alt='Legal Language, by Tiersma' width='150' height='226' /></a>"; 
		}
}

// Hide or reveal a block.
function hideReveal(id) {
	if ( document.getElementById(id).style.display == "block" ) {
    document.getElementById(id).style.display = "none"
  }
  else {
    document.getElementById(id).style.display = "block"
  }
}