var longRef = "document.forms.form";


function displayOrHideFormSection(formSection)
{
	if (document.getElementById(formSection).style.display == 'block')
	{
		hideFormSection(formSection);
	}
	else
	{
		displayFormSection(formSection);
	}
}

	
function displayOrHideFormRow(formRow)
{
	var curDate = new Date();
	var currentTimestamp = curDate.getTime();
	if ( (currentTimestamp - lastTimestamp) > 400)
	{
		if ((document.getElementById(formRow).style.display == 'table-row')||(document.getElementById(formRow).style.display == ''))
		{
			hideFormRow(formRow);
		}
		else
		{
			displayFormRow(formRow);
		}
		lastTimestamp = currentTimestamp;
	}
}


function changeRow(nameRow, bioRow)
{
	if (document.getElementById(nameRow).style.display == 'block')
	{
		hideFormRow(nameRow);
		displayFormRow(bioRow);
	}
	if (document.getElementById(nameRow).style.display == 'none')
	{
		hideFormRow(bioRow);
		displayFormRow(nameRow);
	}
}


function displayFormSection(formSection)
{
	document.getElementById(formSection).style.display = 'block';
}


function displayFormRow(formRow)
{   
    // set to default for browser.
    // Mozilla will interpret this as 'table-row'
    // IE will interpret this as block 
    // (IE does not support 'table-row' as a display value)
	document.getElementById(formRow).style.display = '';
	document.getElementById(formRow).style.border = '0px solid red';
}


function hideFormSection(formSection)
{
	document.getElementById(formSection).style.display = 'none';
}
	
	
function hideFormRow(formRow)
{
	document.getElementById(formRow).style.display = 'none';
}


function displayOrHideBorderRow(formCell)
{
	if (document.getElementById(formCell).style.borderBottomWidth == '0px')
	{
		displayBorderRow(formCell);
	}
	else
	{
		hideBorderRow(formCell);
	}
}


function displayBorderRow(formCell)
{
	document.getElementById(formCell).style.borderBottomWidth='1px';
	document.getElementById(formCell).style.borderBottomStyle='dotted';
	document.getElementById(formCell).style.borderBottomColor='#D6D6D6';
}


function hideBorderRow(formCell)
{
	document.getElementById(formCell).style.borderBottomWidth='0px';
}


var searchStr = 'Search This Site';


function cleanSASearch() 
{
	document.search.query.onfocus = function() {if (this.value == searchStr) this.value = ''};
	document.search.query.onblur = function() {if (this.value == '') this.value = searchStr};
}


var searchStr = 'Search This Site';
	
addEvent(window, "load", cleanSearch, false);
addEvent(window, "load", function() {enableDropdown('utilities')}, false);
addEvent(window, "load", function() {enableDropdown('nav')}, false);


function changeRsvpBtn(formSection, img_id)
{
	if (document.getElementById(formSection).style.display == 'block')
	{
		
	    document.getElementById(img_id).src = '/epubs/preview/brademas/web/images/btn.rsvp.active.gif';
	}
	else
	{
	    document.getElementById(img_id).src = '/epubs/preview/brademas/web/images/btn.rsvp.inactive.gif';
	}
}



// ------------------- For Summer 2008 Homepage Sunburst Nav --------------- //
// PRELOAD IMAGES
Image0 = new Image(384,239)
Image0.src = "./images/homeNavOff.gif"

Image1 = new Image(384,239)
Image1.src = "./images/homeNav01.gif"

Image2 = new Image(384,239)
Image2.src = "./images/homeNav02.gif"

Image3 = new Image(384,239)
Image3.src = "./images/homeNav03.gif"


// SWAPPING IMAGE FUNCTIONS
function greenwich() {
document.Map.src = Image1.src; return true;
}

function highSchool() {
document.Map.src = Image2.src; return true;
}

function studyAbroad() {
document.Map.src = Image3.src; return true;
}

function original() {
document.Map.src = Image0.src; return true;
}
// -------------------------------------------------------------------------- //
