// Navigation:
// This script compensates for IE's lack of ability to handle :hover actions.
// It works by scanning through the site map list and attaches a on mouse over and out function to each list item.
// This function causes the class of the LI to be changed to .over if a mouse over occures.


startList = function() {
if (document.all&&document.getElementById) {
  //  Level One list item scan
  navRoot = document.getElementById("leftNav");
  for (i=0; i<navRoot.childNodes.length; i++) {
    LevelOneNode = navRoot.childNodes[i];
    //  Level Two list item scan
	if (LevelOneNode.childNodes.length>0){
		for (x=0; x<LevelOneNode.childNodes.length; x++) {
			LevelTwoOption = LevelOneNode.childNodes[x];
			if (LevelTwoOption.nodeName=="UL") {
				LevelTwoUL=LevelTwoOption;
				for (y=0; y<LevelTwoUL.childNodes.length; y++) {
					LevelTwoNode=LevelTwoUL.childNodes[y];
					if (LevelTwoNode.nodeName=="LI") {
						// Level Three list item scan
						    if (LevelTwoNode.childNodes.length>0){
								for (z=0; z<LevelTwoNode.childNodes.length; z++) {
									LevelThreeOption = LevelTwoNode.childNodes[z];
									if (LevelThreeOption.nodeName=="UL"){
										LevelThreeUL = LevelThreeOption;
										for (A=0; A<LevelThreeUL.childNodes.length; A++){
											LevelThreeNode=LevelThreeUL.childNodes[A];
												if (LevelThreeNode.nodeName=="LI") {
													LevelThreeNode.onmouseover=function() {
														this.className+="over";
													}
													LevelThreeNode.onmouseout=function() {
														this.className=this.className.replace("over","");
													}	
												}
										}	
									}
								}
								
							}
						// Level Three End
						LevelTwoNode.onmouseover=function() {
							this.className+="over";
						}
						LevelTwoNode.onmouseout=function() {
							this.className=this.className.replace("over","");
						}
					}
				}
			}
		}
	}
	// Level Two End
    if (LevelOneNode.nodeName=="LI") {
      LevelOneNode.onmouseover=function() {
		  this.className+="over";
      }
      LevelOneNode.onmouseout=function() {
		  this.className=this.className.replace("over","");
      }
    }
   }
   // Level One End
  }
}




// --------------------- Article Summary Javascript ---------------------


function initArticleSummary(){
  if(document.getElementById("article_1")){
         document.getElementById("article_1").className="displayedArticle";
  }
}

function displayArticle(articleID,count){
  for(i=1; i<count+1; i++){
    currentArticle=document.getElementById("article_"+i);
    if(currentArticle.className=="displayedArticle"){
      break;
    }
  }
  currentArticle.className="hiddenArticle";
  document.getElementById(articleID).className="displayedArticle";
}