// Email Spam hiding.
function popMail(host,user,args) {
	var acct = user +'@'+ host;
	self.location.href = 'mailto:'+ acct +'?'+ args;
}
function linkMail(host,user,cls,args) {
	document.write('<a href="javascript:popMail(\''+ host +'\',\''+ user +'\',\''+ args +'\');"');
	if (cls) {
		document.write(' class="'+ cls +'"');
	}
	document.write('>');
	showMail(host,user);
	document.write('</a>');
}
function showMail(host,user) {
	var acct = user +'@'+ host;
	document.write(acct);
}
	




	onSection = Array(0);
	t = '';
	
	function clearTo (toIdx) {
		for (i = (onSection.length - 1); i >= toIdx; i = i-1) {
			if (onSection[i]) {
				if (document.getElementById('subId'+ onSection[i])) document.getElementById('subId'+ onSection[i]).style.display = 'none';
				$('navId'+ onSection[i]).firstDescendant().removeClassName('on');
				onSection[i] = false;
			}
		}
	}
	
	function mainNav (key,idx) {
		if (t) {
			clearTimeout(t);
			t = '';
		}
		if (key == onSection[idx]) {
			clearTo(idx + 1);
		} else {
			if (onSection[idx]) {
				clearTo(idx);
			}
			if (key) { 
				if (document.getElementById('subId'+ key)) {
					
					document.getElementById('subId'+ key).style.display = 'block';
				}
				$('navId'+ key).firstDescendant().addClassName('on');
			} 
			onSection[idx] = key
		}
	
	}
	
	function pauseHide () {
		t = setTimeout("mainNav('',0)",750);
	}
	
	function moveLeft (id) {

		parentObj = getElementById(id).getParent();
		
		w = $(id).getWidth();
	
		top.alert(w +':'+ getWidth(parentObj));
	
	}




	function addOnLoadEvent(func) {

	  var oldonload = window.onload;

	  if (typeof window.onload != 'function') {

		window.onload = func;

	  } else {

	//	top.alert(oldonload)
	//	top.alert(func)

		window.onload = function() {

		  if (oldonload) {
			oldonload();
		  }
		  eval (func +'()');

		}

	  }

	}


	
function alertNewWindow (url) {
	if (top.confirm('You are about to leave CDS2 and go to a 3rd Party Site. Would you like to continue?')) {
		centerPop(url,600,500);
	}
}
