//Update with the full path to the images folder
var url = 'http://webapps.jhu.edu/jhuniverse/includes/explorer_bar/images/';

if(jhuBar_config.jhuBarCSS != false){
	//document.write('<link rel="stylesheet" href="'+ url +'/css/explorer_bar.css" type="text/css" media="screen" title="Explorer Bar" charset="utf-8" />');
	document.write('<style type="text/css">');
document.write('#explorer_barJHU {font-family: Arial, Helvetica, sans-serif; height: 30px; padding:0; margin:0; background:#5091cc url('+url+'JHU279.png) no-repeat 100% 0; position:relative; top:0; z-index:9999;}');
document.write('#explorer_barJHU.jhu279{background:#5091cc url('+url+'JHU279.png) no-repeat 100% 0;}');
document.write('#explorer_barJHU.jhuBlack288{background:#000 url('+url+'JHUBlack288.png) no-repeat 100% 0;}');
document.write('#explorer_barJHU.jhuBlack279{background:#000 url('+url+'JHUBlack279.png) no-repeat 100% 0;}');
document.write('#explorer_barJHU.jhuBlack{background:#000 url('+url+'JHUBlack.png) no-repeat 100% 0;}');
document.write('#explorer_barJHU.jhuWhite{background:#FFF url('+url+'JHUWhite.png) no-repeat 100% 0;}');
document.write('#explorer_barJHU.jhu288279{background:#033883 url('+url+'JHU288-279.png) no-repeat 100% 0;}');
document.write('#explorer_barJHU.wseBlue{background:#060f18 url('+url+'WSEBlue.png) no-repeat 100% 0;}');

document.write('#explorer_btnJHU {position:absolute; right:44px; top:9px; cursor: pointer;}');
document.write('#explorer_barJHU ul{margin:0;}');
document.write('#JHUDrop {position:absolute; height: 28px; list-style: none outside none; right: 0; width: 290px;}');
document.write('#JHUClick{position:absolute; display:block; height:30px; width:255px; text-indent:-9999px}');
document.write('#dropdownJHU {width: 226px; position:absolute; top:-3000px; margin-left:17px; border:2px solid #fff; background:#B7B5A8 url('+url+'bg_dropdown.jpg) repeat-x 0 0;}');
document.write('#dropdownJHU.hover{top:30px;}');
document.write('#dropdown_innerJHU {padding:12px;}');
document.write('#dropdownJHU .label {font-size:11px;}');
document.write('#dropdownJHU .text_field {width: 163px;padding:1px; margin-top:4px; float:left;}');
document.write('#dropdownJHU .btn_search {float:right; padding-left:7px; margin-top: 3px;}');
document.write('#dropdownJHU ul {border-left: 1px solid #8fb0cc; padding-left:12px; margin-top:17px;}');
document.write('#dropdownJHU li {list-style:none; color: #065197; font-size:13px; line-height:17px;}');
document.write('#dropdownJHU li a {font-size:11px;color: #363636;text-decoration:none;}');
document.write('#dropdownJHU li a:hover {color:#003663;text-decoration:underline;}');
document.write('#dropdownJHU li a:focus {background:none;}');
document.write('</style>');

document.write('<!--[if IE 7]>');
document.write('<style type="text/css">');
document.write('#dropdownJHU ul { margin-left:0px;}');
document.write('#dropdown_innerJHU, #dropdownJHU ul {min-height:1%}');
document.write('</style>');
document.write('<![endif]-->');

document.write('<!--[if IE 6]>');
document.write('<style type="text/css">');
document.write('#dropdownJHU ul { margin-left:0px;}');
document.write('#dropdown_innerJHU, #dropdownJHU ul{zoom:1}');
document.write('</style>');
document.write('<![endif]-->');
}

document.write('<div id="explorer_barJHU" class="'+jhuBar_config.jhuBarColor+'" style="width:'+jhuBar_config.jhuBarWidth+'; margin:'+jhuBar_config.jhuBarMargin+'">');
document.write('<ul>');
document.write('<li id="JHUDrop"><a href="#" id="JHUClick"></a>');
document.write('<div id="dropdownJHU">');
document.write('<div id="dropdown_innerJHU">');
document.write('<form name="search" method="post" action="http://webapps.jhu.edu/searchformhandler.cfm">');
document.write('<input type="radio" name="mode" value="topic" style="vertical-align:middle;padding:0;" checked /> <span class="label">Topics</span>');
document.write('<input type="radio" name="mode" value="person" style="vertical-align:middle;padding:0;" /> <span class="label">People</span><br />');
document.write('<input name="searchstring" type="text" class="text_field" />');
document.write('<input type="image" src="'+url+'btn_search.jpg" class="btn_search" width="24" height="24" border="0" />');
document.write('</form>');
document.write('<div style="clear:both"><!--do not remove--></div>');
document.write('<ul>');
document.write('<li>Related JHU Links</li>');
document.write('<li><a href="http://www.jhu.edu/">Johns Hopkins University</a></li>');
document.write('<li><a href="http://webapps.jhu.edu/jhuniverse/admissions/">Admissions</a></li>');
document.write('<li><a href="http://www.hopkinsmedicine.org/">School of Medicine</a></li>');
document.write('<li><a href="http://www.jhsph.edu/">Bloomberg School of Public Health</a></li>');
document.write('<li><a href="http://carey.jhu.edu/">Carey Business School</a></li>');
document.write('<li><a href="http://krieger.jhu.edu/">Krieger School of Arts & Sciences</a></li>');
document.write('<li><a href="http://www.sais-jhu.edu/">Nitze School of Advanced International Studies (SAIS)</a></li>');
document.write('<li><a href="http://peabody.jhu.edu/">Peabody Conservatory of Music</a></li>');
document.write('<li><a href="http://education.jhu.edu/">School of Education</a></li>');
document.write('<li><a href="http://nursing.jhu.edu/">School of Nursing</a></li>');
document.write('<li><a href="http://www.library.jhu.edu/">Sheridan Libraries/Museums</a></li>');
document.write('<li><a href="http://engineering.jhu.edu/">Whiting School of Engineering</a></li>');
document.write('</ul>');
document.write('</div>');
document.write('</div>');
document.write('</li>');
document.write('</ul>');
document.write('</div>');


function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function dropDown(){
	var clickIt = document.getElementById('JHUClick');
	var dropdownJHU = document.getElementById('dropdownJHU');
	clickIt.onclick = function(){
		if(dropdownJHU.className == 'hover'){
			dropdownJHU.setAttribute('class','');
			dropdownJHU.setAttribute('className','');
		}else{
			dropdownJHU.setAttribute('class','hover');
			dropdownJHU.setAttribute('className','hover');
		}
		return false;
	}
}

addLoadEvent(dropDown);



