function PositionMenu() {
		document.getElementById("menu").style.top=document.body.scrollTop; 
	}

function InvokeMenu () {
		//alert ("I'm in");
		setInterval("PositionMenu()", 10);
	}
	
var show = true;
function qlDisplay(){
if(show){document.getElementById('ql').style.display='block';show=false;}
else {document.getElementById('ql').style.display='none';show=true;}
}

var shown = true;
function showInfo(){
if(shown){document.getElementById('specialist2').style.display='block';shown=false;}
else {document.getElementById('specialist2').style.display='none';shown=true;}
}
	
function hide() {if (document.getElementById('tip')){document.getElementById('tip').style.display = 'none';}}
function show () {if (document.getElementById('tip')){document.getElementById('tip').style.display = 'block';}}
function changeImage(el) {document.getElementById('picture').src='images/'+el+'.gif';}
function floorplan(el) {
		switch (el){
			case 1:
			  document.getElementById('picture').src='images/ground.gif';
				document.getElementById('caption').value="Ground Floor";
				document.getElementById('caption').style.display="block";
				document.getElementById('addlinks').innerHTML="<a class='inline' href='howdoi.jsp?topic=find_micro.htm'>Micromaterials</a>\n<br />\n<a class='inline' href='/articles/subject_guides/gov_docs.jsp#link_06'>Government Documents</a>\n<br />\n<a class='inline' href='/urbana'>Urban Archives</a>\n<br /><br />";
				break;
			case 2:
			  document.getElementById('picture').src='images/first.gif';
				document.getElementById('caption').value="First Floor";
				document.getElementById('caption').style.display="block";
				document.getElementById('addlinks').innerHTML="<a class='inline' href='/about/libraries/circdesk.jsp'>Circulation/Reserve</a>\n<br />\n<a class='inline' href='/about/libraries/leisure.jsp'>Leisure Reading Collection</a>\n<br /><br />";
				break;
			case 3:
			  document.getElementById('picture').src='images/mez.gif';
				document.getElementById('caption').value="Mezzanine Level";
				document.getElementById('caption').style.display="block";
				document.getElementById('addlinks').innerHTML="<a class='inline' href='/collections/special_collections'>Special Collections</a>\n<br /><br />";
				break;
			case 4:
			  document.getElementById('picture').src='images/second.gif';
				document.getElementById('caption').value="Second Floor";
				document.getElementById('caption').style.display="block";
				document.getElementById('addlinks').innerHTML="";
				break;
			case 5:
			  document.getElementById('picture').src='images/third.gif';
				document.getElementById('caption').value="Third Floor";
				document.getElementById('caption').style.display="block";
				document.getElementById('addlinks').innerHTML="<a class='inline' href='/help/howdoi/howdoi.jsp?topic=find_dissertations.htm#locate'>Dissertations/Theses</a>\n<br /><br />";
				break;
		}
}
function hideMenu() {if (document.getElementById('menu')) {document.getElementById('menu').style.display = 'none';}}
function hideMenu2() {if (document.getElementById('menu2')){document.getElementById('menu2').style.display = 'none';}}
function hideMenu_8() {if (document.getElementById('menu_8')){document.getElementById('menu_8').style.display = 'none';}}
function hideMenu2_8() {if (document.getElementById('menu2_8')){document.getElementById('menu2_8').style.display = 'none';}}

function center (el) {
  var w = document.getElementById(el).style.width;
  var h = document.getElementById(el).style.height;
  document.getElementById(el).style.top = (screen.height/2) - 240;
  document.getElementById(el).style.left = (screen.width/2) - 300;
}	
function center8 (el) {
  var w = document.getElementById(el).style.width;
  var h = document.getElementById(el).style.height;
  document.getElementById(el).style.top = (screen.height/2) - 155;
  document.getElementById(el).style.left = (screen.width/2) - 300;
}	

function popup(url)
  {
	  window.open(url,'popup','width=650,height=450,toolbars=no,scrollbars=no,menubar=no');
	}
function popup_scrollable(url)
  {
	  window.open(url,'popup_s','width=650,height=450,toolbars=no,scrollbars=yes,menubar=no');
	}

function vSearch(info){
  if (info.type.value == "" || info.type.value == null){
	  alert("Please select a Search Type before searching");
		info.type.focus();
		return false;
		}
	if(info.type.selectedIndex == 0){
    alert("Please select a Search Type.");
	  info.type.focus();
	  return false;
	}
	if(info.qt.value == null || info.qt.value==""){
    alert("Please enter a Search term.");
	  info.qt.focus();
	  return false;
	}
	else return true;
}

function suggCheck(info){
	if (info.from.value.indexOf("@") == -1 || info.from.value.indexOf(".") < 1 || info.from.value.indexOf("@") < 1 )
	{
		alert ("Please enter your e-mail address.");
		info.from.focus();
		return false;
	}
	if(feedback.comments.value == null || feedback.comments.value==""){
    alert("Please enter a suggestion or comment.");
	  return false;
	}
}

function quickSearch(el){
   if (el.query.value==null || el.query.value==""){
	   alert ("Please specify a search term.");
		 el.query.focus();
		 return false;
		 }
}

function loadFlash(el){

	var flash="";
  
	if(el=="badman"){
	 flash="<object type='application/x-shockwave-flash' id='plugoo' data='http://www.plugoo.com/plugoo.swf?go=4HZ11S6947W' width='140' height='180'>"; 
	 flash+="<param name='movie' value='http://www.plugoo.com/plugoo.swf?go=4HZ11S6947W' />"; 
	 flash+="<param name='allowScriptAccess' value='always' /> ";
	 flash+="<param name='wmode' value='transparent' /> </object>";
	 document.getElementById('widget').innerHTML = flash;
  }
	
	if(el=="devoe" ){
	  flash="<object type='application/x-shockwave-flash' id='plugoo' data='http://www.plugoo.com/plugoo.swf?go=VTR4S1FLSN0' width='140' height='180'> <param name='movie' value= 'http://www.plugoo.com/plugoo.swf?go=VTR4S1FLSN0' /> <param name='allowScriptAccess' value='always' /> <param name='wmode' value='transparent' /> </object>"; 
    document.getElementById('widget').innerHTML = flash;
  }
	
	if(el=="murray"){
	 flash="<object type='application/x-shockwave-flash' id='plugoo' data='http://www.plugoo.com/plugoo.swf?go=06K7DN0Y4CP' width='140' height='180'> <param name='movie' value='http://www.plugoo.com/plugoo.swf?go=06K7DN0Y4CP' /> <param name='allowScriptAccess' value='always' /> <param name='wmode' value='transparent' /> </object>"; 
	 document.getElementById('widget').innerHTML = flash;
  }
	
	if(el=="rowland"){
	 flash="<object type='application/x-shockwave-flash' id='plugoo' data= 'http://www.plugoo.com/plugoo.swf?go=SM9D1QN15YG' width='140' height='180'> <param name='movie' value= 'http://www.plugoo.com/plugoo.swf?go=SM9D1QN15YG' /> <param name='allowScriptAccess' value='always' /> <param name='wmode' value='transparent' /> </object>"; 
	 document.getElementById('widget').innerHTML = flash;
  }
}