﻿var tWidth='765px';                  // width (in pixels)
var tHeight='25px';                  // height (in pixels)
var tcolour='#ffffff';               // background colour:
var moStop=true;                     // pause on mouseover (true or false)
var fontfamily = 'BPdotsMinusRegular, arial, sans-serif'; // font for content
//var fontfamily = 'Courier New, Courier, monospace'; // font for content
//var fontfamily = 'arial,sans-serif'; // font for content
var tSpeed=3;                        // scroll speed (1 = slow, 5 = fast)

// enter your ticker content here (use \/ and \' in place of / and ' respectively)
//calendar
//var content='<a href="http:\/\/host7.evanced.info\/millburn\/evanced\/eventcalendar.asp"><i>Eyes of the Wild <\/i>&nbsp; &nbsp; &nbsp; Thursday, June 10th 4-5PM <i><em>&nbsp; &nbsp; &nbsp; When Animals Attack.<\/em><\/i><\/a>';
//facebook
//var content='<a href="http:\/\/www.facebook.com/pages\/Millburn-Free-Public-Library\/114504121919034">Follow us on Facebook<\/a>';
//DAB
//var content='<a href="\/onlineRes\/DAB.htm"> When the weather is bad - think about downloading an audiobook or an eBook.</a>';
//var content='Friends of the Library Book Sale &mdash; Starting 9:30 AM Saturday 4\/2 and 1:00 PM Sunday 4\/3';
//SRC
//var content='<a href="http:\/\/host7.evanced.info\/millburn\/sr\/homepage.asp">Summer Reading Club is here!<\/a>'
//var content = 'A  few Storytime places are still open. You can register online, by phone or in person.'
//calendar
//var content='<a href="http:\/\/host7.evanced.info\/millburn\/evanced\/eventcalendar.asp">See our calendar for many upcoming events.<\/a>';
//var content='Note our Holiday Hours - Wednesday, Nov. 23rd Closing at 5:15PM - Thursday, Nov. 24 CLOSED.  Happy Thanksgiving.'
//var content='Too busy to stop in? Download an ebook or an audiobook.'
//
//link=DAB
//var content='<a href="\/onlineRes\/DAB.htm">Too busy to stop in? Download an ebook or an audiobook.</a>';
//calendar
//var content='<a href="http:\/\/host7.evanced.info\/millburn\/evanced\/eventcalendar.asp"><em>Film Festival Final Flick</em> &mdash; North by Northwest Friday 7PM<\/a>';
//var content='Can\'t telecommute? You can still download an audiobook or ebook from home.'
//var content='Disregard previous telegram.'
//
var content='The Library will be closed Monday, January 16th in observance of Martin Luther King Jr. Day'
// Simple Marquee / Ticker Script
// copyright 3rd January 2006, Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the below code in this script (including this
// comment) is used without any alteration
var cps=tSpeed; var aw, mq; var fsz = parseInt(tHeight) - 6; 
function startticker(){
	if (document.getElementById) {
		var tick = '<div style="position:relative;width:'+tWidth+';height:'+tHeight+';overflow:hidden;background-color:'+tcolour+'"'; 
		if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"'; 
		tick +='><div id="mq" style="position:absolute;left:0px;top:2px;font-family:'+fontfamily+';font-size:'+fsz+'px;white-space:nowrap;"><\/div><\/div>';
		 document.getElementById('ticker').innerHTML = tick; mq = document.getElementById("mq"); 
		 mq.style.left=(parseInt(tWidth)+10)+"px"; 
		 mq.innerHTML='<span id="tx">'+content+'<\/span>'; 
		 aw = document.getElementById("tx").offsetWidth; 
		 lefttime=setInterval("scrollticker()",50);}
	} 
function scrollticker(){
		mq.style.left = (parseInt(mq.style.left)>(-10 - aw)) ?parseInt(mq.style.left)-cps+"px" : parseInt(tWidth)+10+"px";} 
	window.onload=startticker;
                  
