
function isTagFoundInPage(tag) {
	return (document.getElementById(tag) 
			&& document.getElementById(tag).style);
}

function show(content) {
	if(isTagFoundInPage(content)){ 
		var style2 = document.getElementById(content).style;
		style2.display = "block";
	}
}


function hide(content) {
	if(isTagFoundInPage(content)) {
		var style2 = document.getElementById(content).style;
		style2.display = "none";
	}
}


function showHideDESC(tag){
	if(isTagFoundInPage(tag)) {
	var style2 = document.getElementById(tag).style;
	style2.display = (style2.display == "block") ? "none": "block";
	}
}

function toggleMore(tag, moreTag){
	showHideDESC(tag);
	shoeHideDESC(moreTag);
}

/* show the first tag, turn off the rest ... of 3 buttons */
function radioButtonShow3(on,off1,off2){
	hide(off1);
	hide(off2);
	show(on);
}	



/* **** OPEN IN NEW WINDOW **** */

var aNewWindow;

function openArticleWindow(absPath){
		window.open(absPath,'name','height=520,width=420,left=20, top=40,resizable=no,scrollbars=yes,toolbar=no,status=yes');
	}

function openSpeakerWindow(speaker){
	var speakerPage = 'Content/speakers/'+speaker+'.html';
		aNewWindow=window.open(speakerPage,'name','height=400,width=360,left=0, top=40,resizable=no,scrollbars=yes,toolbar=no,status=yes');
	}

function openKeynoteWindow(speaker){
	var speakerPage = 'Content/Key-speakers/'+speaker+'.html';
		aNewWindow=window.open(speakerPage,'name','height=580,width=590,left=32, top=20,resizable=no,scrollbars=yes,toolbar=no,status=yes');
		}


/* **** Handle Overview Page's Toggling of sections **** */

function reduceLinkStyle(tag){
	if(isTagFoundInPage(tag)) {
		document.getElementById(tag).className="reducedLink";

	}
}

function makeProminentStyle(tag){
	if(isTagFoundInPage(tag)) {
		var style4 = document.getElementById(tag).className="prominentLink";
	}

}

function showFirstTimers(){
	hide('returning'); reduceLinkStyle('returningLink');
	hide('letter'); reduceLinkStyle('letterLink');
	show('firstTimers'); makeProminentStyle('firstTimersLink');
}

function showReturning(){
	hide('firstTimers'); reduceLinkStyle('firstTimersLink');
	hide('letter'); reduceLinkStyle('letterLink');
	show('returning'); makeProminentStyle('returningLink');
}

function showLetter(){
	hide('firstTimers'); reduceLinkStyle('firstTimersLink');
	hide('returning'); reduceLinkStyle('returningLink');
	show('letter'); makeProminentStyle('letterLink');
}
