function showhide(id) {
	var elt = document.getElementById(id);
	var htmelt = document.getElementById(id+'_showhide');
	if (elt.style.display == "none") {
		elt.style.display="block";
		htmelt.innerHTML = "HIDE DETAILS";
	} else {
		elt.style.display="none";
		htmelt.innerHTML = "MORE DETAILS";
	}
}
  $(document).ready(function(){
    
	$('#movie1_showhide').click(function () {
	  if ($("#movie1").is(":hidden")) {  
	  	$('#movie1_showhide').html("HIDE DETAILS");
	  } else {
	  	$('#movie1_showhide').html("SHOW DETAILS");
	  }
	  $("#movie1").slideToggle("slow");
	});
	$('#movie2_showhide').click(function () {
	  if ($("#movie2").is(":hidden")) {  
	  	$('#movie2_showhide').html("HIDE DETAILS");
	  } else {
	  	$('#movie2_showhide').html("SHOW DETAILS");
	  }
      $("#movie2").slideToggle("slow");
	});
	$('#movie3_showhide').click(function () {
	  if ($("#movie3").is(":hidden")) {  
	  	$('#movie3_showhide').html("HIDE DETAILS");
	  } else {
	  	$('#movie3_showhide').html("SHOW DETAILS");
	  }
      $("#movie3").slideToggle("slow");
	});

  });
function MMM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

doclay = (document.layers)? true : false
docall = (document.all)? true : false
docget = (document.getElementById)? true : false

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 5000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var currentImg;
var total;

thisImg = 0
imgCt = 3  //total number of images -1
baseCt = 0

//add captions, put initial caption in div at bottom of this page

imageLocation = new Array()
imageLocation[0] = "images/awards1.jpg"
imageLocation[1] = "images/awards2.jpg"
imageLocation[2] = "images/awards3.jpg"
imageLocation[3] = "images/awards4.jpg"

imageNavigation = new Array()
imageNavigation[0] = ""
imageNavigation[1] = ""
imageNavigation[2] = ""
imageNavigation[3] = ""

var tss;
var iss;
var thisImg = 0;
var start = 1;

//variable is set to 1 initially so that slideshow starts when page is loaded
//vairable is set to 0 if PREVIOUS or NEXT is clicked which stops the slideshow
function StartorStop(x) {
start = x;
}

//preloads images into an array
var preLoad = new Array();
for (iss = 0; iss < imgCt+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = imageLocation[iss];}

//this function is run first so that there is a delay on the first image
//otherwise the slideshow jumps to the second image immediately
//timer is faster for this than the loop
function runSlideShowParent(){
tss = setTimeout('runSlideShow()', 2000);
}

//this is the automatic slideshow
function runSlideShow(){

	if ( start == 1 ){

		//counter is at beginning so that if user interrupts the slideshow with the PREVIOUS NEXT
		//then the slideshow won't jump ahead two images instead of just one

	navigation = imageNavigation[thisImg]

		if (thisImg >= imgCt){
		thisImg=0;
		navigation = imageNavigation[thisImg]
		} else {
		thisImg = thisImg + 1;
		navigation = imageNavigation[thisImg]
		}

		if (docall){
		document.images.slider.style.filter="blendTrans(duration=2)";
		document.images.slider.style.filter="blendTrans(duration=CrossFadeDuration)";
		document.images.slider.filters.blendTrans.Apply();}
	
	document.images.slider.src = preLoad[thisImg].src; 
	
		if (docall) document.images.slider.filters.blendTrans.Play();
		
	tss = setTimeout('runSlideShow()', SlideShowSpeed);
	}
}


//this is the user controlled slideshow
function layerWrite(id,text) {

image = imageLocation[thisImg]
navigation = imageNavigation[thisImg]

	if (thisImg > imgCt) {
	thisImg = 0
	navigation = imageNavigation[thisImg]
	}
	
	if (thisImg < baseCt) {
	thisImg = 4
	navigation = imageNavigation[thisImg]
	}

currentImg = thisImg + 1
total = imgCt + 1

	if (docget) {
		document.getElementById("slidenavigation").innerHTML = navigation;
		document.slider.src = imageLocation[thisImg]
	} else if (doclay) {

		document.layers["slidenavigation"].document.open()
		document.layers["slidenavigation"].document.write('<table border=0 cellpadding=0 cellspacing=0><tr><td>')
		document.layers["slidenavigation"].document.write('<span class=slideshow-default>')
		document.layers["slidenavigation"].document.write(navigation)
		document.layers["slidenavigation"].document.write('<\/span>')
		document.layers["slidenavigation"].document.write('<\/td><\/tr><\/table>')
		document.layers["slidenavigation"].document.close()
		document.slider.src = imageLocation[thisImg]
	} else if (docall) {
		document.all.slidenavigation.innerHTML = navigation
		document.slider.src = imageLocation[thisImg]
	}

}