
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
ge=function(id){return document.getElementById(id)}
window.onload=function(){if(!document.getElementsByTagName)return false;var lnks=document.getElementsByTagName("a");for(var i=0;i<lnks.length;i++){if(lnks[i].className=="popup"){lnks[i].onclick=function(){popUp(this.getAttribute("href"));return false;}}
if(lnks[i].className=="galleryPopup"){lnks[i].onclick=function(){popUp2(this.getAttribute("href"));return false;}}
if(lnks[i].className=="popupThreeRings"){lnks[i].onclick=function(){popUp3(this.getAttribute("href"));return false;}}
if(lnks[i].className=="timelinePopup"){lnks[i].onclick=function(){popUp4(this.getAttribute("href"));return false;}}}}
function popUp(winURL){window.open(winURL,"popup");}
function popUp2(winURL){window.open(winURL,"galleryPopup");}
function popUp3(winURL){window.open(winURL,"popupThreeRings","width=550,height=550");}
function popUp4(winURL){window.open(winURL,"timelinePopup","width=810,height=435");}
liHover=function(){if(!ge('headerNav'))return false;if(!ge('footerNav'))return false;if(ieBelowSix!=1)return false;var hdrCat=ge("headerNav").getElementsByTagName("li");var ftrCat=ge("footerNav").getElementsByTagName("li");for(var i=0;i<hdrCat.length;i++){hdrCat[i].onmouseover=function(){this.className+=" hdrhover";}
hdrCat[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" hdrhover\\b"),"");}}
for(var j=0;j<ftrCat.length;j++){ftrCat[j].onmouseover=function(){this.className+=" ftrhover";}
ftrCat[j].onmouseout=function(){this.className=this.className.replace(new RegExp(" ftrhover\\b"),"");}}}
addLoadEvent(liHover);function headerRows(){if(!document.getElementById)return false;if(!document.getElementsByTagName)return false;if(!ge('headerNav'))return false;var uls=ge('headerNav').getElementsByTagName('ul');for(var i=0;i<uls.length;i++){var rows=uls[i].getElementsByTagName('li');for(var j=0;j<rows.length;j++){if(j%2){rows[j].childNodes[0].className='row2';}else{rows[j].childNodes[0].className='row1';}}}}
addLoadEvent(headerRows);function footerRows(){if(!document.getElementById)return false;if(!document.getElementsByTagName)return false;if(!ge('footerNav'))return false;var uls=ge('footerNav').getElementsByTagName('ul');for(var i=0;i<uls.length;i++){var rows=uls[i].getElementsByTagName('li');for(var j=0;j<rows.length;j++){if(j%2){rows[j].childNodes[0].className='row2';}else{rows[j].childNodes[0].className='row1';}}}}
addLoadEvent(footerRows);function main2Rows(){if(!document.getElementById)return false;if(!document.getElementsByTagName)return false;if(!ge('main_2'))return false;var uls=ge('main_2').getElementsByTagName('ul');for(var i=0;i<uls.length;i++){var rows=uls[i].getElementsByTagName('li');for(var j=0;j<rows.length;j++){if(j%2){rows[j].className='row2';}else{rows[j].className='row1';}}}}
addLoadEvent(main2Rows);function setContentHeight(){if(!document.getElementById)return false;if(!ge('header'))return false;if(!ge('content'))return false;if(!ge('footer'))return false;hdrHght=ge('header').offsetHeight;cntHght=ge('content').offsetHeight;ftrHght=ge('footer').offsetHeight;bdyHght=document.body.offsetHeight;totHght=hdrHght+cntHght+ftrHght;if(totHght<bdyHght){difHght=bdyHght-totHght;if(difHght<70){ge('content').style.height=((cntHght+difHght)+'px');}else{ge('content').style.height=((cntHght+difHght-70)+'px');}}}
addLoadEvent(setContentHeight);function setWindowWidth(){if(!document.getElementById)return false;if(!ge('wrap'))return false;if(!ge('header'))return false;if(!ge('footer'))return false;bodyWidth=document.body.offsetWidth;if(bodyWidth<938){var mrgnLft=Math.floor((bodyWidth/2)+1);if(ge('home')!=null){ge('wrap').style.marginLeft=(mrgnLft*-1)+'px'
ge('header').style.marginLeft=(mrgnLft*-1)+'px'
ge('footer').style.marginLeft=(mrgnLft*-1)+'px'}else{ge('wrap').style.marginLeft=((mrgnLft*-1)+32)+'px'
ge('header').style.marginLeft=(mrgnLft*-1)+'px'
ge('footer').style.marginLeft=((mrgnLft*-1)+32)+'px'}}else{if(ge('home')!=null){ge('wrap').style.marginLeft='-470px'
ge('header').style.marginLeft='-470px'
ge('footer').style.marginLeft='-470px'}else{ge('wrap').style.marginLeft='-470px'
ge('header').style.marginLeft='-502px'
ge('footer').style.marginLeft='-470px'}}}
addLoadEvent(setWindowWidth);window.onresize=function(){setWindowWidth();setContentHeight();}
function showHideFaqs(){if(!ge('admissionsfaqs'))return false;questions=ge('admissionsfaqs').getElementsByTagName('h5');answers=ge('admissionsfaqs').getElementsByTagName('p');showAll=document.getElementById('showallfaq');for(var i=0;i<answers.length;i++){answers[i].style.display='none';}
for(var i=0;i<questions.length;i++){questions[i].onclick=function(){answ=getNextElement(this.nextSibling);if(answ.style.display!='block'){answ.style.display='block';}else{answ.style.display="none";}}}
toggleAll();}
addLoadEvent(showHideFaqs);function getNextElement(node){if(node.nodeType==1){return node;}
if(node.nextSibling){return getNextElement(node.nextSibling);}
return null;}
function toggleAll(){answers=ge('admissionsfaqs').getElementsByTagName('p');showAll.onclick=function(){if(showAll.innerHTML!='Hide All Answers'){for(var i=0;i<answers.length;i++){answers[i].style.display='block';}
showAll.innerHTML='Hide All Answers';}else{for(var i=0;i<answers.length;i++){answers[i].style.display='none';}
showAll.innerHTML='Show All Answers';}}}
function replaceAlign(){if(!document.getElementsByTagName)return false;if(!document.getElementsByTagName('img'))return false;var imgList=document.getElementsByTagName('img');for(var i=0;i<imgList.length;i++){var align=imgList[i].getAttribute('align');if(align){if(align=='left'){imgList[i].className='left';}
if(align=='right'){imgList[i].className='right';}
if(align=='middle'){imgList[i].className='middle';}
imgList[i].removeAttribute('align')}}}
addLoadEvent(replaceAlign);