/*********************************************** * Memory Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ var memorywidth="450px" //scroller width var memoryheight="15px" //scroller height var memorybgcolor="" //scroller background var memorypadding="2px" //padding applied to the scroller. 0 for non. var borderCSS="" //Border CSS, applied to scroller to give border. var memoryspeed=3 //Scroller speed (larger is faster 1-10) var pauseit=0 //Pause scroller onMousever (0=no. 1=yes)? var persistlastviewedmsg=1 //should scroller's position persist after users navigate away (1=yes, 0=no)? var persistmsgbehavior="onload" //set to "onload" or "onclick". //Specify the scroller's content (don't delete tag) //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great): var memorycontent='2012 Season is over. Good Luck to the Seniors!' ////NO NEED TO EDIT BELOW THIS LINE//////////// var combinedcssTable="width:"+(parseInt(memorywidth)+6)+"px;background-color:"+memorybgcolor+";padding:"+memorypadding+";"+borderCSS+";" var combinedcss="width:"+memorywidth+";height:"+memoryheight+";" var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : '' memoryspeed=(document.all)? memoryspeed : Math.max(1, memoryspeed-1) //slow speed down by 1 for NS var copyspeed=memoryspeed var pausespeed=(pauseit==0)? copyspeed: 0 var iedom=document.all||document.getElementById if (iedom) document.write('') var actualwidth='' var memoryscroller if (window.addEventListener) window.addEventListener("load", populatescroller, false) else if (window.attachEvent) window.attachEvent("onload", populatescroller) else if (document.all || document.getElementById) window.onload=populatescroller function populatescroller(){ memoryscroller=document.getElementById? document.getElementById("memoryscroller") : document.all.memoryscroller memoryscroller.style.left=parseInt(memorywidth)+8+"px" if (persistlastviewedmsg && get_cookie("lastscrollerpos")!="") revivelastmsg() memoryscroller.innerHTML=memorycontent actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth lefttime=setInterval("scrollmarquee()",20) } 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 savelastmsg(){ document.cookie="lastscrollerpos="+memoryscroller.style.left } function revivelastmsg(){ lastscrollerpos=parseInt(get_cookie("lastscrollerpos")) memoryscroller.style.left=parseInt(lastscrollerpos)+"px" } if (persistlastviewedmsg && persistmsgbehavior=="onload") window.onunload=savelastmsg function scrollmarquee(){ if (parseInt(memoryscroller.style.left)>(actualwidth*(-1)+8)) memoryscroller.style.left=parseInt(memoryscroller.style.left)-copyspeed+"px" else memoryscroller.style.left=parseInt(memorywidth)+8+"px" } if (iedom){ with (document){ document.write('
') write('
') write('
') write('
') document.write('
') } } function SDMenu(id) { if (!document.getElementById || !document.getElementsByTagName) return false; this.menu = document.getElementById(id); this.submenus = this.menu.getElementsByTagName("div"); this.remember = true; this.speed = 3; this.markCurrent = true; this.oneSmOnly = false; } SDMenu.prototype.init = function() { var mainInstance = this; for (var i = 0; i < this.submenus.length; i++) this.submenus[i].getElementsByTagName("span")[0].onclick = function() { mainInstance.toggleMenu(this.parentNode); }; if (this.markCurrent) { var links = this.menu.getElementsByTagName("a"); for (var i = 0; i < links.length; i++) if (links[i].href == document.location.href) { links[i].className = "current"; break; } } if (this.remember) { var regex = new RegExp("sdmenu_" + encodeURIComponent(this.menu.id) + "=([01]+)"); var match = regex.exec(document.cookie); if (match) { var states = match[1].split(""); for (var i = 0; i < states.length; i++) this.submenus[i].className = (states[i] == 0 ? "collapsed" : ""); } } }; SDMenu.prototype.toggleMenu = function(submenu) { if (submenu.className == "collapsed") this.expandMenu(submenu); else this.collapseMenu(submenu); }; SDMenu.prototype.expandMenu = function(submenu) { var fullHeight = submenu.getElementsByTagName("span")[0].offsetHeight; var links = submenu.getElementsByTagName("a"); for (var i = 0; i < links.length; i++) fullHeight += links[i].offsetHeight; var moveBy = Math.round(this.speed * links.length); var mainInstance = this; var intId = setInterval(function() { var curHeight = submenu.offsetHeight; var newHeight = curHeight + moveBy; if (newHeight < fullHeight) submenu.style.height = newHeight + "px"; else { clearInterval(intId); submenu.style.height = ""; submenu.className = ""; mainInstance.memorize(); } }, 30); this.collapseOthers(submenu); }; SDMenu.prototype.collapseMenu = function(submenu) { var minHeight = submenu.getElementsByTagName("span")[0].offsetHeight; var moveBy = Math.round(this.speed * submenu.getElementsByTagName("a").length); var mainInstance = this; var intId = setInterval(function() { var curHeight = submenu.offsetHeight; var newHeight = curHeight - moveBy; if (newHeight > minHeight) submenu.style.height = newHeight + "px"; else { clearInterval(intId); submenu.style.height = ""; submenu.className = "collapsed"; mainInstance.memorize(); } }, 30); }; SDMenu.prototype.collapseOthers = function(submenu) { if (this.oneSmOnly) { for (var i = 0; i < this.submenus.length; i++) if (this.submenus[i] != submenu && this.submenus[i].className != "collapsed") this.collapseMenu(this.submenus[i]); } }; SDMenu.prototype.expandAll = function() { var oldOneSmOnly = this.oneSmOnly; this.oneSmOnly = false; for (var i = 0; i < this.submenus.length; i++) if (this.submenus[i].className == "collapsed") this.expandMenu(this.submenus[i]); this.oneSmOnly = oldOneSmOnly; }; SDMenu.prototype.collapseAll = function() { for (var i = 0; i < this.submenus.length; i++) if (this.submenus[i].className != "collapsed") this.collapseMenu(this.submenus[i]); }; SDMenu.prototype.memorize = function() { if (this.remember) { var states = new Array(); for (var i = 0; i < this.submenus.length; i++) states.push(this.submenus[i].className == "collapsed" ? 0 : 1); var d = new Date(); d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000)); document.cookie = "sdmenu_" + encodeURIComponent(this.menu.id) + "=" + states.join("") + "; expires=" + d.toGMTString() + "; path=/"; } }; //Change Log: //* Updated: July 11th, 07: Fixed bug with persistence not working. Doh. //* Updated: July 9th, 07: Added session only persistence to tabs (set "enabletabpersistence" var below). Only .js file changed. //* Updated Nov 8th, 06. Ability to select a tab dynamically, by calling a method (ie: via a link). Only .js file changed. var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no) var loadstatustext=" Requesting content..." var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered (1=yes, 0=no)? ////NO NEED TO EDIT BELOW//////////////////////// var loadedobjects="" var defaultcontentarray=new Object() var bustcacheparameter="" function ajaxpage(url, containerid, targetobj){ var page_request = false if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc page_request = new XMLHttpRequest() else if (window.ActiveXObject){ // if IE try { page_request = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ page_request = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){} } } else return false var ullist=targetobj.parentNode.parentNode.getElementsByTagName("li") for (var i=0; i