//
// global variables
//
var isMozilla;
var objDiv = null;
var originalDivHTML = "";
var DivID = "";
var over = false;

// dynamically add a div to dim the page
function buildDimmerDiv()
{
  document.write('<div id="dimmer" class="dimmer" style="width:'+ window.screen.width + 'px; height:' + window.screen.height +'px"></div>');
}

function displayFloatingDiv(divId, title, width, height, left, top) 
{
	DivID = divId;
  //alert(document.getElementById("BioContent").innerHTML);
	document.getElementById('dimmer').style.visibility = "visible";

  document.getElementById(divId).style.width = width + 'px';
  //document.getElementById(divId).style.height = height + 'px';
  document.getElementById(divId).style.left = left + 'px';
  document.getElementById(divId).style.top = top + 'px';
	
	var addHeader;
	
	if (originalDivHTML == "")
	    originalDivHTML = document.getElementById(divId).innerHTML;
	
	addHeader = '<table style="width:' + width + 'px" class="floatingHeader">' +
	            '<tr><td style="cursor:pointer;height:18px">' + title + '</td>' + 
	            '<td align="right"><a style="text-decoration: none;" href="javascript:hideFloatingDiv(\'' + divId + '\');">' + 
	            'Click on this window to close...</a></td></tr></table>';
	

  // add a header to your div	
	document.getElementById(divId).innerHTML = addHeader + originalDivHTML;
	document.getElementById(divId).className = 'dimming';
	document.getElementById(divId).style.visibility = "visible";
}

function hideFloatingDiv(divId) 
{
	document.getElementById(divId).innerHTML = originalDivHTML;
	document.getElementById(divId).style.visibility='hidden';
	document.getElementById('dimmer').style.visibility = 'hidden';
	DivID = "";
 	document.getElementById("flashlogo").style.visibility = '';
  window.scrollTo(PosLeft, PosTop);
  document.getElementById(divId).innerHTML = OrigBioContent;
  originalDivHTML = "";
}

function init()
{
  // add the div
  // used to dim the page
	buildDimmerDiv();

}

// call init
init();
