/*
	Vendor Glossary Functions v 1.0
	by Matt Cannon <mcannon@epierce.com>

*/
		
function openGlossary(context, term){
	var winFeatures = "";
	if ((context != "info") || (context != "hcp")){context = "info";}
	winFeatures += "height=200,width=525,top=10,left=10,";				  //window size
	winFeatures += "scrollbars,titlebar" //which chrome?
	//winFeatures += "resizable"	
	window.open(buiContextPath+"/jsp/utils/glossary/"+context+"/glossary_term.jsp?term="+term,"glossary_win",winFeatures)
}

function termSelectedNS(term){
	document.glossary_form.term_selected.value = term;
	document.glossary_form.submit();
}

function letterSelected(letter){
	document.glossary_form.letter.value = letter;
	document.glossary_form.submit();
}

//==================================================================================
	
function getObj(id){

	var o = null;
		if (document.getElementById) {
		o = document.getElementById(id);
		}
		else if(document.all) {
		o = eval('document.all["'+id+'"]');			
		}
		else if(document.layers) {
		o = document.layers[id];		
		}	
	return o;
}

function termSelected(i) {
	if (i != 0){		
		
		var c = getObj('content_div');
		if (c != null) {setText(c,i);}	
	}
}

function setText(c,i){
	c.innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0" background="">\n'+terms[i]+'\n</table>';
}