/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  folk.js  site-specific functions  Original by :Michael Foster, December 8, 2000  mfoster@cybrtyme.com  http://lineoflight.com/ Modified by: kirk martinson, 2/1/2004 for UW-Madison Folklore Program http://folklore.wisc.edu*/window.onload = init;// Global CrossBrowserElement Objects: var slideMenu; var slideTitle;//-----------------------------------------------------------------------------// onLoad event handler.function init(){  slideMenu = new CrossBrowserElement('slideMenu');  slideTitle = new CrossBrowserElement('slideTitle');    if (is.nav4) {          // exclude Moz    slideMenu.setLeft(20);    slideTitle.setTop(12);    window.onresize = regen;  }  else {    slideMenu.setLeft(12);    slideTitle.setTop(4);    window.onscroll = controlSlideMenu;  }  slideTitle.setLeft(2000);  slideTitle.show();  slideTitle.xSpeed = .3;  slideTitle.slideToX(0);    slideMenu.setTop(6000);  slideMenu.show();  slideMenu.ySpeed = .4;  controlSlideMenu();  if (window.demoInit) {    demoInit();  }  window.defaultStatus = "Thanks For Visiting the Folklore Program!";}//-----------------------------------------------------------------------------// onResize event handler for NN4.// I added regen() to solve the NN4 crashing problem. This has something to do// with what NN4 does after a window resize... still unsure about this.function regen(){  window.location.reload();}//-----------------------------------------------------------------------------// Functions for the creation and operation of the listbox navigation menu.function navMenuGo(){  var _url = document.forms.navForm.navMenu.options[document.forms.navForm.navMenu.selectedIndex].value;  if ( _url != "") {    document.location.href = _url;  }}function createNavMenu(){  document.write(     "<div>                                             "    +"  <form name='navForm'>                                           "    +"    <select name='navMenu' size='1' onChange='navMenuGo();'>                              "    +"      <option selected>Choose Issue</option>"	+"      <option value='News_Events.htm'>Current News</option>                   "    +"      <option value='prognews_spr04.htm'>Spring 2004</option>                    "    +"      <option value='prognews_sum03.htm'>Summer 2003</option>                    "    +"      <option value='prognews_sp03.htm'>Spring 2003</option>                   "    +"      <option value='prognews_fall02.htm'>Fall 2002</option>                   "    +"      <option value='prognews_sp02.htm'>Spring 2002</option>                   "    +"    </select>                                                     "//    +"    <input type='button' value='Go' onclick='navMenuGo();'>       "    +"  </form>                                                         "    +"</div>                                                            "  );}//-----------------------------------------------------------------------------function createSlideTitle(){   var m = "<div id='slideTitle'>"   m += "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"    +"<tr align='right'>"    +"<td height='34' bgcolor='#000000'><a name='title'>&nbsp;</a><a href='index.htm' target='_self'><img src='folk-word.gif' border='0' width='157' height='22' align='left'></a></td>"    +"<td width='42%' bgcolor='#000000' height='34'>&nbsp;</td>"    +"<td width='33%' height='34' bgcolor='#000000'><a href='http://www.wisc.edu' target='new'><img src='uw-word.gif' border='0' width='256' height='22'></a></td>"    +"</tr></table><br><br>";   m += "</div>";   document.write(m);}function createSlideMenu(thisPage){  var m = "<div id='slideMenu' class='text0'>";//  if (thisPage == '') m += "<p align='center' class='menu'><b>Folklore Program News<br> Back Issues</b>";	//  if (thisPage == '') m += "<script type='text/javascript' language='javascript1.2'>createNavMenu();</script></p>";	       m += "<img src='menu2.gif' width='172' height='245' border='0' usemap='#Menumap'>";    m += "<map name='Menumap'>";    m += "<area shape='rect' coords='1,1,172,23' href='About.htm' target='_self' alt='About the Program'>";    m += "<area shape='rect' coords='2,24,137,45' href='News_Events.htm' target='_self' alt='News and Events'>";    m += "<area shape='rect' coords='1,46,133,71' href='Faculty.htm' target='_self' alt='Faculty and Staff'>";    m += "<area shape='rect' coords='2,73,117,94' href='Partnerships.htm' target='_self' alt='Partnerships'>";    m += "<area shape='rect' coords='3,95,103,118' href='Contactus.htm' target='_self' alt='Contact Us'>";    m += "<area shape='rect' coords='2,119,102,143' href='Collections.htm' target='_self' alt='Collections'>";    m += "<area shape='rect' coords='1,144,81,167' href='Donate.htm' target='_self' alt='Donations'>";    m += "<area shape='rect' coords='2,168,100,184' href='Courses.htm' target='_self' alt='Courses'>";    m += "<area shape='rect' coords='0,186,42,216' href='Links.htm' target='_self' alt='Links'>";	m += "<area shape='rect' coords='0,188,44,245' href='#title' target='_self' alt='Top'>";    m += "</map>";	m += "</div>";   document.write( m );} function createFooter(updateDate) {   document.write ("<div id='footer' class='text0'>"     +"<table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#000000'>"     +"<tr><td width='33%'><a href='mailto:sjziemen@wisc.edu' class='aSmall'>Accessibility questions</a></td>"    +"<td align='middle' class='small'>Last updated " + updateDate + " </td>"    +"<td align='right' width='33%' class='small'><a href='mailto:sjziemen@wisc.edu' class='aSmall'>Contact Webmaster</a>&nbsp;&nbsp;&nbsp;</td></tr></table>"    +"</div>" );   }//-----------------------------------------------------------------------------// This function is the onScroll event handler (in IE). It calculates the // slide target and calls the object's slide method.var slideMenuOffsetTop=45;function controlSlideMenu(){  var topOfClientArea = getScrollY();  slideMenu.slideToY(topOfClientArea + slideMenuOffsetTop);  if (is.nav4up || is.opera) {    setTimeout("controlSlideMenu()",250);  }}// End folk.js