
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
			document.getElementById("friends").style.display = "none";
		}else{
			el.style.display = "none";
			document.getElementById("friends").style.display = "block";
		}
	}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display="none"
}
}

function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}

if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunction

if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate


function formset() {
var oFormObject = document.forms[0];
var textFormelement = oFormObject.elements["SearchTerms"]
var bookFormelement = oFormObject.elements[2]
	textFormelement.value = "Search BOSS ..."
	bookFormelement.checked = true
}

function formcheck()
{

var oFormObject = document.forms[0];
var textFormelement = oFormObject.elements["SearchTerms"]
var bookFormelement = oFormObject.elements[2]
var artFormelement = oFormObject.elements[3]
var webFormelement = oFormObject.elements[4]
if (bookFormelement.checked) {
	textFormelement.value = "Search BOSS ..."
}
else if (artFormelement.checked) {
	textFormelement.value = "Search Articles ..."
}
else if (webFormelement.checked) {
	textFormelement.value = "Search Library Website ..."
}
}
<!--
if (document.images) {
    chatbuttonup       = new Image();
    chatbuttonup.src   = "/images/chat.gif" ;
    chatbuttondown     = new Image() ;
    chatbuttondown.src = "/images/chatOn.gif" ;

    emailbuttonup       = new Image();
    emailbuttonup.src   = "/images/email.gif" ;
    emailbuttondown     = new Image() ;
    emailbuttondown.src = "/images/emailOn.gif" ;

    phonebuttonup       = new Image();
    phonebuttonup.src   = "/images/phone.gif" ;
    phonebuttondown     = new Image() ;
    phonebuttondown.src = "/images/phoneOn.gif" ;

    helpbuttonup       = new Image();
    helpbuttonup.src   = "online1.gif" ;
    helpbuttondown     = new Image() ;
    helpbuttondown.src = "offlinegray.gif" ;

    askbuttonup       = new Image();
    askbuttonup.src   = "/images/gethelp.gif" ;
    askbuttondown     = new Image() ;
    askbuttondown.src = "/images/gethelpOn.gif" ;
}
function buttondown( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "down.src" );
    }
}
function buttonup ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "up.src" );
    }
}
// -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var maxAdNo = 18
var adNo
var myAd = new Array()

myAd[0] = '<img src="/images/splash/splash1.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[1] = '<img src="/images/splash/splash4.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[2] = '<img src="/images/splash/splash5.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[3] = '<img src="/images/splash/splash8.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[4] = '<img src="/images/splash/splash9.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[5] = '<img src="/images/splash/splash10.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[6] = '<img src="/images/splash/splash12.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[7] = '<img src="/images/splash/splash14.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[8] = '<img src="/images/splash/splash15.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[9] = '<img src="/images/splash/splash16.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[10] = '<img src="/images/splash/splash17.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[11] = '<img src="/images/splash/spring_splash1.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[12] = '<img src="/images/splash/fall_splash2.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[13] = '<img src="/images/splash/fall_splash3.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[14] = '<img src="/images/splash/fall_splash5.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[15] = '<img src="/images/splash/fall_splash6.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[16] = '<img src="/images/splash/fall_splash7.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[17] = '<img src="/images/splash/fall_splash8.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
myAd[18] = '<img src="/images/splash/fall_splash9.jpg" width="430" height="173" border="0" alt="Image of OSU Library">'
//  End -->
      
/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["/images/digital/main/e-archive.jpg", "http://e-archive.library.okstate.edu/", ""] //image with link syntax
fadeimages[1]=["/images/digital/main/coo.jpg", "http://digital.library.okstate.edu/Chronicles/index.html", ""] //image with link syntax
fadeimages[2]=["/images/digital/main/debo.jpg", "http://www.library.okstate.edu/scua/collect/debo/index.htm", ""] //image with link syntax
fadeimages[3]=["/images/digital/main/eohc.jpg", "http://digital.library.okstate.edu/encyclopedia/", ""] //image with link syntax
fadeimages[4]=["/images/digital/main/iccd.jpg", "http://digital.library.okstate.edu/icc/index.html", ""] //image with link syntax
fadeimages[5]=["/images/digital/main/indianaffairs.jpg", "http://digital.library.okstate.edu/kappler/index.htm", ""] //image with link syntax
fadeimages[6]=["/images/digital/main/wotol.jpg", "http://www.library.okstate.edu/oralhistory/wotol/index.htm", ""] //image with link syntax
fadeimages[7]=["/images/digital/main/mmc.jpg", "http://okmaps.library.okstate.edu/", ""] //image with link syntax
fadeimages[8]=["/images/digital/main/oakerhater.jpg", "http://digital.library.okstate.edu/Oakerhater/index.html", ""] //image with link syntax
fadeimages[9]=["/images/digital/main/okinvent.jpg", "http://okinventors.library.okstate.edu/index.htm", ""] //image with link syntax
fadeimages[10]=["/images/digital/main/oktoday.jpg", "http://digital.library.okstate.edu/oktoday/index.html", ""] //image with link syntax
fadeimages[11]=["/images/digital/main/poas.jpg", "http://digital.library.okstate.edu/OAS/index.html", ""] //image with link syntax
fadeimages[12]=["/images/digital/main/oos.jpg", "http://digital.library.okstate.edu/ornithology/index.html", ""] //image with link syntax
fadeimages[13]=["/images/digital/main/sftic.jpg", "http://digital.library.okstate.edu/Forestry/index.html", ""] //image with link syntax
fadeimages[14]=["/images/digital/main/pobs.jpg", "http://digital.library.okstate.edu/obs/index.html", ""] //image with link syntax
fadeimages[15]=["/images/digital/main/mcdaniel.jpg", "http://digital.library.okstate.edu/mcdaniel/index.htm", ""] //image with link syntax
fadeimages[16]=["/images/digital/main/ostate.jpg", "http://www.library.okstate.edu/oralhistory/ostate/index.htm", ""] //image with link syntax
fadeimages[17]=["/images/digital/main/plexus.jpg", "http://www.library.okstate.edu/plexus/index.htm", ""] //image with link syntax
fadeimages[18]=["/images/digital/main/et&d.jpg", "http://dc.library.okstate.edu/cdm4/results.php?CISORESTMP=results.php&CISOVIEWTMP=item_viewer.php&CISOMODE=bib&CISOGRID=thumbnail,A,1;title,A,1;subjec,A,0;descri,200,0;none,A,0;20;title,none,none,none,none&CISOBIB=title,A,1,N;creato,A,0,N;subjec,200,0,N;date,A,0,N;none,A,0,N;20;title,none,none,none,none&CISOTHUMB=20%20%284x5%29;title,none,none,none,none&CISOTITLE=20;title,none,none,none,none&CISOHIERA=20;subjec,title,none,none,none&CISOSUPPRESS=1&CISOTYPE=link&CISOOP1=any&CISOFIELD1=type&CISOBOX1=dissertation+thesis+&CISOOP2=any&CISOFIELD2=subjec&CISOBOX2=&CISOOP3=any&CISOFIELD3=descri&CISOBOX3=&CISOOP4=any&CISOFIELD4=CISOSEARCHALL&CISOBOX4=&c=any&CISOROOT=%2FDissert%2C%2Fdissert1", ""] //image with link syntax
fadeimages[19]=["/images/digital/main/pm.jpg", "http://www.library.okstate.edu/scua/collect/miller3/index.htm", ""] //image with link syntax
fadeimages[20]=["/images/digital/main/otan.jpg", "http://www.library.okstate.edu/oralhistory/radio.htm", ""] //image with link syntax
 
var fadebgcolor="transparent"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

