   <!--//--><![CDATA[//><!--
    activateMenu = function(nav) {
		if(document.all && document.getElementById(nav).currentStyle){
	        // only MSIE supports document.all
            var navroot = document.getElementById(nav);
			
            /* Get all the list items within the menu */
            var lis=navroot.getElementsByTagName("LI");
            for(i=0;i<lis.length;i++){
                /* If the LI has another menu level */
                if(lis[i].lastChild.tagName=="UL"){
                    /* assign the function to the LI */
                   
                  lis[i].onmouseover=function(){
	                        /* display the inner menu */
							  this.lastChild.style.display="block";
							  
					}
                    lis[i].onmouseout=function(){
                        this.lastChild.style.display="none";
                    }
                }
            }
        }
    }
    window.onload=function(){
        // pass the function the id of the top level UL
        // remove one, when only using one menu
        activateMenu('dmenu');
    }
   //--><!]]>

   

function theOnMouseEvent(theDiv, theImage){
	var theTarget = document.getElementById(theDiv+"_level1");
	if(document.getElementById(theDiv).sectionID != theSection) {
		document.getElementById(theDiv).style.backgroundImage="url(http://blogs.targetx.com/whartonunplugged/img/"+theImage+")";
		theTarget.style.display == "block" ? theTarget.style.display = "none" : theTarget.style.display = "block";
	} else {
		theTarget.style.display = "none";
	}
}


  
/*function displayChildren(theParent, theLevel) {
	var childrenArr = getChildren(theParent, theLevel);
	for(x in childrenArr) {
		document.writeln(theLevel + " " + childrenArr[x]+'<br>');
		displayChildren(childrenArr[x], theLevel+1);
	}
}*/


function indent(theLevel) {
	if(theLevel) {
		for(i=1;i<=theLevel;i++){
			document.writeln("&nbsp;&nbsp;");	
		}
	}
}


function createSideNav(theParent, theLevel) {
	var childrenArr = getChildren(theParent, theLevel);
	for(x in childrenArr) {
		var tempArr = childrenArr[x];
		indent(tempArr[2]);
		
		if(pageName != tempArr[0]) {
			document.writeln("<a href='"+tempArr[1]+"'");
			tempArr[2] > 1 ? document.writeln(" style='text-transform: none;'") : document.writeln("");
			document.writeln(">");
			tempArr[2] > 1 ? document.writeln("> ")  : document.writeln("");
			document.writeln(tempArr[0]+'</a> <br>');
		} else {
			document.writeln("<b");
			tempArr[2] > 1 ? document.writeln(" style='text-transform: none;'") : document.writeln("");
			document.writeln(">"+pageName+"</b><br>");
			
		}
		
		createSideNav(tempArr[0], theLevel+1);
	}
}


function getChildren(theParent, theLevel) {
	var childrenArr = new Array();
	var linkArray = new Array();
	var levelArr = new Array(); 
	for(i=0;i<navArray.length;i++) {
		if(navArray[i]['parent'][0]==theParent) {
			childrenArr[i] = new Array(navArray[i]['child'][0], navArray[i]['child'][1], theLevel);
		}
	}
	return childrenArr;
}

breadCrumbArr = new Array();
var pageInfo = new Array(pageName, "");
breadCrumbArr.push (pageInfo); 

function  createBreadcrumbTrail(pageTitle) {
	for(i=0;i<navArray.length;i++) {
		if(navArray[i]['child'][0]== pageTitle) {
			theParent = navArray[i]['parent'][0];
			theParentFile = navArray[i]['parent'][1];
			var tempArray = new Array(theParent, theParentFile);
			breadCrumbArr.push(tempArray);
		}
	}
	
	if(theParent != "Home") {
		createBreadcrumbTrail(theParent);
	} else {
		for(i=breadCrumbArr.length-1;i>=0;i--) {
			var tempPageTitle = breadCrumbArr[i][0];
			var tempPageURL = breadCrumbArr[i][1];
			pageName==tempPageTitle ? document.writeln('<b>'+tempPageTitle+'</b>') : document.writeln('<a href="'+tempPageURL +'">'+tempPageTitle+'</a>');
			i != 0 ? document.writeln(" >") : document.writeln(""); 
		}
	}
}

function setColors(sectionColor, theSectionID) {
	document.getElementById('pageTitle').style.color = sectionColor;
	document.getElementById('introParagraph').style.color = sectionColor;
	document.getElementById('sideNav').style.background = "url(http://blogs.targetx.com/whartonunplugged/img/sideNavBG_c96118.gif)";
	//document.getElementById('sideNav').style.backgroundColor = sectionColor;
	document.getElementById('sideNav').style.background = "url(http://blogs.targetx.com/whartonunplugged/img/sideNavBG_"+theSectionID+".gif)";
	document.writeln('<style>');
	document.writeln('#subContent p.subTitle { color:'+sectionColor+';}');
	document.writeln('#subContent p.subTitle_hr { color:'+sectionColor+'; border-color:'+sectionColor+';}');
	document.writeln('#teaser { color: '+sectionColor+';}');
	document.writeln('</style>');
}

function writeNote(theMessage, theWidth) {
	theWidth = theWidth || 300;
	document.writeln('<div style="font: normal 11px verdana, arial; width:'+theWidth+'px; border: solid #ff9600; border-width: thin; background-color:#fdfca7; padding: 10px 10px 20px 10px; margin: 20px 0px 20px 0px;"><p style="color:#ff9600; font-size: 12px;"><b>Note:</b></p>'+theMessage+'</div>');
}



var revert = new Array();
var inames = new Array('nav_sectionbg_theExperience', 'nav_sectionbg_theKnowledge', 'nav_sectionbg_theLife', 'nav_sectionbg_theFuture', 'nav_sectionbg_theNextStep', 'bt_whartonHome', 'bt_homeLink');

// Preload
if (document.images) {
var flipped = new Array();
  for(i=0; i< inames.length; i++) {
    flipped[i] = new Image();
	flipped[i].src = "http://blogs.targetx.com/whartonunplugged/img/"+inames[i]+"_over.gif";
	}
}

function over(num) {
	if(document.images) {
		revert[num] = document.images[inames[num]].src;
    		document.images[inames[num]].src = flipped[num].src;
	}
}

function out(num) {
  if(document.images) document.images[inames[num]].src = revert[num];
}
