/*
 * date:	2002-12-13
 * info:	http://inspire.server101.com/js/xc/
 */

var xcNode = [];

function xcSet(m, c) {
	if ((document.getElementById && document.getElementById(m) != null) && document.createElement && (navigator.userAgent.indexOf('MSIE 5.2') == -1 || navigator.userAgent.indexOf('Mac') == -1)) {
	m = document.getElementById(m).getElementsByTagName('ul');
	var d, p, x, h, i, j;
	for (i = 0; i < m.length; i++) {
		d = m[i].getAttribute('id');
		if (d) {
			x = xcCtrl(d, c, 'x', '[+]', 'Show', m[i].getAttribute('title')+' (expand menu)');
			x = xcCtrl(d, c, 'c', '[-]', 'Hide', m[i].getAttribute('title')+' (collapse menu)');

			p = m[i].parentNode;
			if (h = !p.className) {
				j = 2;
				while ((h = !(d == arguments[j])) && (j++ < arguments.length));
				if (h) {
					m[i].style.display = 'none';
					x = xcNode[d+'x'];
				}
			}

			p.className = c;
			p.insertBefore(x, p.firstChild);
		}
	}
}
//Richard's tack-on to highlight Menu item when it matches h1 tag
/*m2 = 'nav2xc';
n2 = 'content';
if (document.getElementById && document.createElement) { 
m2 = document.getElementById(m2).getElementsByTagName('a');  
n2 = document.getElementById(n2).getElementsByTagName('h1');  
}
 
curH1= Trim(n2[0].innerHTML)
var i
for (i = 0; i < m2.length; i++) {
pgMnuIem = m2[i].innerHTML 
//alert(curH1.toLowerCase() + '\n'+ pgMnuIem.toLowerCase())
if (curH1.toLowerCase() == pgMnuIem.toLowerCase()){
//alert('Match')
m2[i].style.fontWeight = 'normal'}
}

*/

}


function xcShow(m) {
	xcXC(m, 'block', m+'c', m+'x');
}


function xcHide(m) {
	xcXC(m, 'none', m+'x', m+'c');
}


function xcXC(e, d, s, h) {
	e = document.getElementById(e);
	e.style.display = d;
	e.parentNode.replaceChild(xcNode[s], xcNode[h]);
	xcNode[s].firstChild.focus();
}


function xcCtrl(m, c, s, v, f, t) {
	var a = document.createElement('a');
	a.setAttribute('href', 'javascript:xc'+f+'(\''+m+'\');');
	a.setAttribute('title', t);
	
	var arrowImage = document.createElement('img');
  arrowImage.src = "/CUE/images/arrow-"+(v=="[+]" ? "green" : "grey-down")+".gif"; // Add for SBIT Design
	arrowImage.height="12";
	arrowImage.width="5";
	//a.appendChild(document.createTextNode(v)); //orignal version
	a.appendChild(arrowImage);

	var d = document.createElement('div');
	d.className = c+s;
	d.appendChild(a);

	return xcNode[m+s] = d;
}
<!-- SEND EMAIL SCRIPT -->
<!--
function sendEmail(To,Subject,HasAttachmentOption,AttachFile) {
var URL
re = /\s/gi;
Subject=Subject.replace(re, "%20");
ref = location.href
re1= /(library)/;
 ref = ref.search(re1)

if (ref > 0 ){
URL="/site/about/contacts/EmailFormLib.asp?To="+ To +"&Subject=" + Subject + "&HasAttachmentOption=" + HasAttachmentOption + "&AttachFile=" + AttachFile
}
else{
	URL="/site/about/contacts/EmailForm.asp?To="+ To +"&Subject=" + Subject + "&HasAttachmentOption=" + HasAttachmentOption + "&AttachFile=" + AttachFile
}
neWin=window.open(URL,"Email","toolbar=no,scrollbars=yes,status=no,resize=yes, width=420 left=200 top=50 height=400,menubar=yes");
}

if (parent.frames.length > 1) {
//parent.location.href = location.href;
top.location.replace(self.location)
}


function Trim(s) 
{
  // Remove leading spaces and carriage returns
  
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
  {
    s = s.substring(1,s.length);
  }

  // Remove trailing spaces and carriage returns

  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
  {
    s = s.substring(0,s.length-1);
  }
  return s;
}


//-->