function ToggleDiv($WhichDiv) {
	if (document.getElementById($WhichDiv).style.display == "none") {
		setOpac($WhichDiv,100); // set it to opaque (just in case)
		document.getElementById($WhichDiv).style.display = "none";
	document.getElementById('VirtualTourSessionPage').style.display='none';
	} else {
		document.getElementById($WhichDiv).style.display = "none";
	}
}

// Function used to show/hide the target div utilizing fade effects below
function FadeToggleDiv($WhichDiv) {
	if (document.getElementById($WhichDiv).style.display == "none") {
		FadeIn($WhichDiv);
	} else {
		document.getElementById('VirtualTourSession').style.display='none';
		FadeOut($WhichDiv);
	}
}

// Function used to fade "in" a div
function FadeIn($WhichDiv) {
	setOpac($WhichDiv,0); // set it to transparent
	document.getElementById($WhichDiv).style.display = "block"; // display as block just in case
	for( var i = 0 ; i <= 100 ; i++ ) 
	{
		setTimeout( 'setOpac(\''+$WhichDiv+'\',' + i + ')' , 8 * i );
	}
}

// Function used to fade "out" a div
function FadeOut($WhichDiv) {
	for( var i = 0 ; i <= 100 ; i++ ) {
		   setTimeout( 'setOpac(\''+$WhichDiv+'\',' + (30 - i) + ')' , 8 * i );
	}
	setTimeout('ToggleDiv(\''+$WhichDiv+'\')', 8 * i);
	setOpac($WhichDiv,30); // set it to opaque (just in case)
}

// Function used to set the opacity of a div (from 0 to 10)
function setOpac( $WhichDiv, value ) {
	document.getElementById($WhichDiv).style.opacity = value / 100;
	document.getElementById($WhichDiv).style.filter = 'alpha(opacity=' + value + ')';
}

function FadeOutCourse($WhichDiv) {
	for( var i = 0 ; i <= 100 ; i++ ) {
		   setTimeout( 'setOpac(\''+$WhichDiv+'\',' + (100 - i) + ')' , 8 * i );
	}
	setTimeout('toggleDivCourse(\''+$WhichDiv+'\')', 8 * i);
	setOpac($WhichDiv,100); // set it to opaque (just in case)
}
function FadeInCourse($WhichDiv) {
	setOpac($WhichDiv,0); // set it to transparent
	document.getElementById($WhichDiv).style.display = "block"; // display as block just in case
	for( var i = 0 ; i <= 100 ; i++ ) 
	{
		setTimeout( 'setOpac(\''+$WhichDiv+'\',' + i + ')' , 8 * i );
	}
}
function toggleDivCourse($WhichDiv)
{
	document.getElementById($WhichDiv).style.display="none";
	if($WhichDiv == "mpaContentmore")
		FadeInCourse('mpaContent');	
	else if($WhichDiv == "mpaContent")
		FadeInCourse('mpaContentmore');	
}
// Function used to SHRink/grow a div vertically
// JavaScript Document