content="";
context="";

function loadimage( photo ) {
		if (photo.substring(0,1) == "g") { 
    	document.getElementById("image").innerHTML = '<p><a target="_blank" href="'+photo+'.pdf"><img src="'+photo+'.jpg" /></a></p>';
    } else {
    	document.getElementById("image").innerHTML = '<p><img src="'+photo+'.jpg" /></p>';
    }
}

function display ( id ){
  	togglethumb( id );
  	hide( "content2" );
  	hide( "content3" );
  	hide( "content4" );
  	unhide( id );
}

function togglethumb ( id ){
  if (id == "content4") {
  	hideElement( "thumb2" );
  	unhideElement( "thumb4" );
  	loadimage('g1');
  } else {
	if (document.getElementById( "content4" ).style.display == 'block' ) {
	  	hideElement( "thumb4" );
	  	unhideElement( "thumb2" );
	  	loadimage('b1');
	}
  }
}

function unhide ( id ){
  unhideElement( id );
  if (document.getElementById( id+"-link" )) {
    document.getElementById( id+"-link" ).style.color = '#c50c1f';
  }
}

function hide ( id ){
  hideElement( id );
  if (document.getElementById( id+"-link" )) {
    document.getElementById( id+"-link" ).style.color = '#979797';
  }
}

function unhideElement ( id ){
  if (document.getElementById( id )) {
    document.getElementById( id ).style.display = 'block';
  }
}

function hideElement ( id ){
  if (document.getElementById( id )) {
    document.getElementById( id ).style.display = 'none';
  }
}

