

function CommonOnload() {
	mail_protect_links();
	//mail_protect_text();
}


/***********************************************
 * Drop Down Menu (for any link)
 * Modified by gianpompilio.com
 * Original idea found at www.dynamicdrive.com
 ***********************************************/

//Contents for menu 1
var menu1=new Array()
// menu1[0]='<a href="/AboutUs/MembershipInformation.shtml" title="Membership Info">Membership Info</a>'
menu1[0]='<a href="/AboutUs/StrategicPartners.shtml" title="Strategic Partners">Strategic Partners</a>'
menu1[1]='<a href="/AboutUs/StaffBios.shtml" title="Staff Biographies">Staff Biographies</a>'
menu1[2]='<a href="/AboutUs/BoardOfDirectors.shtml" title="Board of Directors">Board of Directors</a>'
menu1[3]='<a href="/AboutUs/AnnualReports.shtml" title="Annual Reports">Annual Reports</a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="/OurMembers/index.shtml#Principal" title="Founding Principal Members">Principal Members</a>'
//menu2[1]='<a href="/OurMembers/index.shtml#FoundingMembers" title="Founding Members">Founding Members</a>'
menu2[1]='<a href="/OurMembers/index.shtml#AssociateMembers" title="Associate Members">Associate Members</a>'
menu2[2]='<a href="/OurMembers/index.shtml#IndividualMembers" title="Individual Members">Individual Members</a>'
menu2[3]='<a href="/OurMembers/index.shtml#Affiliates" title="Affiliates">Affiliates</a>'

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="/OurLabs/index.shtml#DalhousieINWKLab" title="Dalhousie INWK Lab">Dalhousie INWK Lab</a>'
menu3[1]='<a href="/OurLabs/index.shtml#InternetworkingLab" title="Internetworking Lab">Internetworking Lab</a>'
menu3[2]='<a href="/OurLabs/index.shtml#TelephonyLab" title="Telephony Lab">Telephony Lab</a>'

//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="/Financing/investment.shtml" title="Investment">Investment</a>'
menu4[1]='<a href="/Financing/Scholarships.shtml" title="Scholarships">Scholarships</a>'

//Contents for menu 5
var menu5=new Array()
menu5[0]='<a href="/STF/philosophy.shtml" title="Philosophy">Philosophy</a>'
//menu5[1]='<a href="/STF/people.shtml" title="People">Our People</a>'
menu5[1]='<a href="/STF/executive_team.shtml" title="Executive Team">Executive Team</a>'
menu5[2]='<a href="/STF/board_of_directors.shtml" title="Board of Directors">Board of Directors</a>'
menu5[3]='<a href="/STF/disclaimer.shtml" title="STF Disclaimer">Disclaimer</a>'
//menu5[3]='<a href="/STF/fund.shtml" title="The Fund">The Fund</a>'

//Contents for menu 6
var menu6=new Array()
menu6[0]='<a href="/Events.shtml" title="Link not yet setup">Events</a>'
menu6[1]='<a href="#" title="Link not yet setup">News</a>'

		
var menuwidth='150px' 		//default menu width
var menubgcolor='#68696D;'  //menu bgcolor
var disappeardelay=250  	//menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" 	//hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu



/***********************************************
 * Lightweight method for inserting Flash
 * Includes browswer detection and MM_Express_Intall
 * Modified by gianpompilio.com
 * SWFObject v1.4.2: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 ***********************************************/

if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i=0; i < objects.length; i++) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = null;
			}
		}
	}
}
/*
if (typeof window.onunload == 'function') {
	var oldunload = window.onunload;
		window.onunload = function() {
		deconcept.SWFObjectUtil.cleanupSWFs();
		oldunload();
	}
} else {
	window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
}
*/
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;


/*********************************************************
 * EMAIL SCRAMBLER: PART 1 (link HREFs) 
 * Copyright gianpompilio.com
 * 
 * DESCRIPTION:
 * Encrypts email links, hiding them from harvesters/spammers
 * Easy to implement and cross-browser compatible (when javascript is enabled)
 * 
 * TO IMPLEMENT:
 * Change "mailto:text@site.ca" to "mailto:text[at]site.ca"
 *********************************************************/

function mail_protect_links(){
	var mailDivider="[at]" 				// choose a divider to divide your email address' i.e. [at] in place of @
	var mailDividerEncoded="%5Bat%5D";	// contribute ascii equivalent to above [at]

	for (i=0; i<=(document.links.length-1); i++){  // index all links on this page
		if (document.links[i].href.indexOf(mailDivider)!=-1)  // if link does not have a divider ignore it, otherwise render it as a valid mailto:
			document.links[i].href=document.links[i].href.split(mailDivider)[0]+"@"+document.links[i].href.split(mailDivider)[1];
		else if (document.links[i].href.indexOf(mailDividerEncoded)!=-1)  // if link does not have an encoded divider ignore it, otherwise render it as a valid mailto:
			document.links[i].href=document.links[i].href.split(mailDividerEncoded)[0]+"@"+document.links[i].href.split(mailDividerEncoded)[1];
	}	
	
	for (i=0; i<=(document.links.length-1); i++){  // index all links on this page
		if (document.links[i].innerHTML.indexOf(mailDivider)!=-1)  // if link does not have a divider ignore it, otherwise render it as a valid mailto:
			document.links[i].innerHTML=document.links[i].innerHTML.split(mailDivider)[0]+"@"+document.links[i].innerHTML.split(mailDivider)[1];
		else if (document.links[i].innerHTML.indexOf(mailDividerEncoded)!=-1)  // if link does not have an encoded divider ignore it, otherwise render it as a valid mailto:
			document.links[i].innerHTML=document.links[i].innerHTML.split(mailDividerEncoded)[0]+"@"+document.links[i].innerHTML.split(mailDividerEncoded)[1];
	}

	
}	

/*********************************************************
 * EMAIL SCRAMBLER: PART 2 (text inside <body> tag)
 * Copyright gianpompilio.com
 * 
 * DESCRIPTION: 
 * Encrypts email links, hiding them from harvesters/spammers
 * Easy to implement and cross-browser compatible (when javascript is enabled)
 * 
 * TO IMPLEMENT:
 * Change "text@site.ca" to "text[at]site.ca"
 *********************************************************/

function mail_protect_text(){

//	var highlightStartTag = "<span style='color:blue; background-color:yellow;'>";
//	var highlightEndTag = "</span>";
	var replacementText = "[at]";	// string to be replaced
	var replaceWith = "@";			// string to be substituted
	var i = -1;
	var emailFlag = false;			// is there an email address present on the page?
	var newText = "";				// newly formated content
	var bodyText = document.body.innerHTML;	// original content
	
	while (bodyText.length > 0) {	// look through content
		i = bodyText.indexOf(replacementText, i+1); // find the position of the first (or next) occurrence

		if (i > 0) {
//			newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, replacementText.length) + highlightEndTag;
			newText += bodyText.substr(0, i + replacementText.length);	// store content up to, and including, first occurrence in newText
			bodyText = bodyText.substr(i + replacementText.length);		// remove stored content from origial content
			newText = newText.replace(replacementText,replaceWith);		// replace appropriate string with the new string
			emailFlag = true;
			i = -1;
		}		
		else {						// if there are no occurrences
			newText += bodyText;	// render orginal content
			bodyText = "";
		}
	}
	
	if (emailFlag) document.body.innerHTML = newText;	// render adjusted content

}
/*
function mail_protect_text(){

//	var highlightStartTag = "<span style='color:blue; background-color:yellow;'>";
//	var highlightEndTag = "</span>";
	var replacementText = "[at]";	// string to be replaced
	var replaceWith = "@";			// string to be substituted
	var i = -1;
	var emailFlag = false;			// is there an email address present on the page?
	var newText = "";				// newly formated content
	var bodyText = document.getElementById('contentArea').innerHTML;	// original content
	
	while (bodyText.length > 0) {	// look through content
		i = bodyText.indexOf(replacementText, i+1); // find the position of the first (or next) occurrence

		if (i > 0) {
//			newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, replacementText.length) + highlightEndTag;
			newText += bodyText.substr(0, i + replacementText.length);	// store content up to, and including, first occurrence in newText
			bodyText = bodyText.substr(i + replacementText.length);		// remove stored content from origial content
			newText = newText.replace(replacementText,replaceWith);		// replace appropriate string with the new string
			emailFlag = true;
			i = -1;
		}		
		else {						// if there are no occurrences
			newText += bodyText;	// render orginal content
			bodyText = "";
		}
	}
	
	if (emailFlag) document.getElementById('contentArea').innerHTML = newText;	// render adjusted content

}
*/




/*********************************************************
 * IMAGE SWAP
 * Copyright gianpompilio.com
 *********************************************************/

if(document.images) {
pics = new Array(); 
pics[1] = new Image();
pics[1].src = "../images/b.jpg"; 
pics[2] = new Image();
pics[2].src = "../images/a.jpg";
}

function swap(from,to) {
if(document.images) {
document.images[from].src = pics[to].src;
}
}

/*
document.wayne.src='../img/bio_wayne.gif';this.className='biograybg';
*/





/***********************************************
* Pop-it menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var popupHover = new Array ()		//mini ads
var defaultMenuWidth="161px" 	//set default menu width.
var defaultMenuHeight="161px" 	//set default menu height.

popupHover[0]  = '<p><a href="http://maps.google.ca/maps?f=q&hl=en&q=5562+Sackville+Street+Halifax+Nova+Scotia+Canada&ie=UTF8&om=1" target="_blank"><img src="../img/map-over.jpg" alt="Location on a map" width="161" height="161" border="0" /></a><p>'



////No need to edit beyond here

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidepopmenu();" onMouseout="dynamicpophide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidepopmenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.style.height=defaultMenuHeight	// added
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidepopmenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamicpophide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidepopmenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidepopmenu()
}

function delayhidepopmenu(){
delaypophide=setTimeout("hidepopmenu()",500)
}

function clearhidepopmenu(){
if (window.delaypophide)
clearTimeout(delaypophide)
}

//displays proper miniAd in grid
function defaultDisplay(x){
	document.write(popupHover[x]);
}

if (ie5||ns6)
document.onclick=hidepopmenu









/*********************************************************
 * BREADCRUMBS
 * Copyright gianpompilio.com
 * 
 * DESCRIPTION: 
 * Creates breadcrumbs by checking URL path
 *********************************************************/

function breadcrumbs(){
  sURL = new String;
  bits = new Object;
  var x = 0;
  var stop = 0;
//  var output = "<a href=\"/\">TARA</a>  >  ";
  var output = "";
  sURL = location.href;
  sURL = sURL.slice(8,sURL.length);
  chunkStart = sURL.indexOf("/");
  sURL = sURL.slice(chunkStart+1,sURL.length)
  while(!stop){
    chunkStart = sURL.indexOf("/");
    if (chunkStart != -1){
      bits[x] = sURL.slice(0,chunkStart)
      sURL = sURL.slice(chunkStart+1,sURL.length);
    }else{
      stop = 1;
    }
    x++;
  }
  
 for(var i in bits){
    output += "<a href=\"";
    for(y=1;y<x-i;y++){
      output += "../";
 }
 
 //Check the link before printing it
 //var nURL = checkName(bits[i]);
 //var lURL = bits[i];
 
 //Do not print > if its the last link

  output +=  bits[i] + "/\">" + checkName(bits[i]) + "</a>  > ";

 }
 
  document.write(output.substring(0,output.length-2));
}


function checkName(URL){

	if(URL.toLowerCase() == "tararedesign"){
   	URL = "";
	}
	if(URL.toLowerCase() == "aboutus"){
   	URL = "About Us";
	}
	if(URL.toLowerCase() == "contactus"){
	URL = "Contact Us";
	}
	if(URL.toLowerCase() == "financing"){
	URL = "Financing";
	}
	if(URL.toLowerCase() == "ourlabs"){
	URL = "Our Labs";
	}
	if(URL.toLowerCase() == "ourmembers"){
	URL = "Our Members";
	}
	if(URL.toLowerCase() == "research"){
	URL = "Research";
	}
	if(URL.toLowerCase() == "stf"){
	URL = "STF";
	}
 return URL;
}




function openWindow(page) {
	popUpWindow = window.open(page, "adminControl", "height=500, width=610, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no");
	popUpWindow.focus();
}


function intLab(selection) {
	popUpWindow = window.open(selection, "intLabWin", "height=230, width=400, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no");
	popUpWindow.focus();
}


function dalLab(selection) {
	popUpWindow = window.open(selection, "dalLabWin", "height=230, width=400, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no");
	popUpWindow.focus();
}


function devLab(selection) {
	popUpWindow = window.open(selection, "devLabWin", "height=230, width=450, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no");
	popUpWindow.focus();
}

function telLab(selection) {
	popUpWindow = window.open(selection, "telLabWin", "height=250, width=400, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no");
	popUpWindow.focus();
}