function checkSession() {
	if (sessvars.x == "hidden") {
		document.getElementById("parachutes").style.display = "none";
	}
	else {
		checkBrowser();
	}
}
function checkBrowser () {
	
	var browserName = navigator.appName;

	if (browserName.indexOf("Microsoft") >= 0)
	{
		var browserVersion = navigator.appVersion;
		var findIndex = browserVersion.indexOf("MSIE") + 5;
		var browserVersion = parseInt(browserVersion.substring(findIndex,findIndex + 1));
		
		if(browserVersion >= 6)
		{
			playParachutes();
		}
		else
		{
			document.getElementById("parachutes").style.display = "none";
		}
	}
	else
	{
		playParachutes();
	}
}

function playParachutes(){
								
	var pageHeight;
	var pageWidth;
	
	  //Detect IE6+
	  if(typeof(document.documentElement.clientHeight) == "number") 
	  {
		pageHeight = document.documentElement.clientHeight;
		pageWidth = document.documentElement.clientWidth;
	  }
	  //All other browsers
	  else if(typeof(window.innerWidth) == "number")
	  {
		pageHeight = window.innerHeight;
		pageWidth = window.innerWidth;
	  }
	  //If browser still not recognized, use screen height and width
	  else
	  {
		pageHeight = screen.availHeight; // 1200;
		pageWidth = screen.availWidth; //1000;
	  }
	
  pageHeight = pageHeight + 18; // compensate for status bar
  animateHeight = pageHeight + 10;
  animateHeight = animateHeight + "px";
  pageHeight = pageHeight + "px";
  
  centerPosition = pageWidth / 2;
  
  document.getElementById("divParachute0").style.left = (centerPosition - 125) + "px"; //Woody
  document.getElementById("divParachute1").style.left = (centerPosition + 75) + "px"; //Emile
  document.getElementById("divParachute2").style.left = (centerPosition - 275) + "px"; //Flash
  document.getElementById("divParachute3").style.left = (centerPosition + 200) + "px"; //Tiana
  document.getElementById("divParachute4").style.left = (centerPosition - 450) + "px"; //Buzz
  
  document.getElementById("parachutes").style.visibility = "visible";

  //Speed(duration) and timing of individual parachute animations and fade-out of "hide parachutes" button		
  setTimeout(function() {$("#divParachute0").animate({top: animateHeight}, 18000, 'linear')},0); //Woody
  setTimeout(function() {$("#divParachute1").animate({top: animateHeight}, 19000, 'linear')},2000); //Emile
  setTimeout(function() {$("#divParachute2").animate({top: animateHeight}, 11000, 'linear')},3500); //Flash
  setTimeout(function() {$("#divParachute3").animate({top: animateHeight}, 15000, 'linear')},5000); //Tiana
  setTimeout(function() {$("#divParachute4").animate({top: animateHeight}, 14000, 'linear')},4000); //Buzz
  setTimeout(function() {document.getElementById("parachutes").style.display = "none"},21000);
  clearTimeout;

  }

function hideParachutes()
{
  document.getElementById("parachutes").style.display = "none";
  sessvars.x = "hidden";
}

