// CREDITS:// Messagebox with fading Background// By Peter Gehrig// Copyright (c) 2004 Peter Gehrig. All rights reserved.// Permission given to use the script provided that this notice remains as is.// Additional scripts can be found at http://www.24fun.com// info@24fun.com// 1/08/2004// IMPORTANT:// If you add this script to a script-library or script-archive// you have to add a highly visible link to// http://www.24fun.com on the webpage// where this script will be featured// set your messages. Add as many as you like (you may add additional HTML-tags)var text=new Array();text[0]="<font size=4px color=blue weight=bold><center>2012 Season Registration opens June 1st!</center></font><hr>\Registration for the 2012 Season opens June 1st. \<BR>You can download a registration form and mail it to the address \noted on it or register online.\<BR>Register by November 1st, 2011 to take advantage of our significant early registration discount.";text[1]="<font size=4px color=blue weight=bold>\<center>All Star Game</center></font><hr>\<center><bold>May 28th 9:30am @ the Boys and Girls club</bold></center></font><hr> \<br>Come support your All Stars.";text[2]="<font size=4px color=blue weight=bold>\<center>BGSA would like to thank all of our sponsors</center></font><hr>\Please support them as they support us.";text[3]="<font size=4px color=blue weight=bold><center>Umpires Needed!</center></font><hr> \The Billerica Girls Softball Association is actively seeking Umpires for the 2012 season. \<br>Positions are paid. \<br>Experience not required - will train! \<br>Must be over 18 and out of High School. \<br>Interested people should contact \<a href=mailto:umpire@billericagirlssoftball.com>Bob Coughlan, Umpire-in-Chief.</A> ";//text[4]="<font size=4px color=blue weight=bold>\//<center>Don't miss the 2010 Banquets!</center></font><hr>\//<br>Monday, Sept. 20, Senior League Banquet\//<br>Tuesday, Sept. 21, Middle League Banquet\//<br>Monday, Sept. 27, Junior League Banquet\//<br>Elks Hall, Webb Brook Rd., 6:30pm (Doors open at 6:00).";// text[3]="<font size=4px color=black weight=bold><center>Coaches Needed!</center></font><hr>\// The Billerica Girls Softball Association is actively seeking Instructional League Coaches for the 2008 season. \// <br>Experience not required. - Volunteer now, teams are waiting \// <br> Must be over 18 and out of High School. \// <br>Interested people should contact \// <a href=mailto:bgsa@geocities.com>Becky McKie - Instructional League Commissioner</A>";// text[5]="<font size=4px color=blue weight=bold>\// <center>Instructional League Awards Day</center></font><hr>\// The 2009 Instructional League Awards Day was held June 7.\// <br>Thanks to everyone who helped make this day a success!";text[4]="<font size=4px color=blue weight=bold>\<center>Summer Softball League</center></font><hr> \The BGSA is not affliliated with the Middle Essex Summer Softball League. \<br>Anyone desiring more information can click here to contact \<a href=mailto:mehappy34@verizon.net>Ron DiOrio</A> or go to \<br>www.billericafastpitchsoftball.org or \<br>www.sportsmanager.us/billericafastpitchsoftball.htm";// set the corresponding links // If you don't want to link a message just add a "#" instead of an URLvar textlink=new Array();textlink[0]="https://www.sportsmanager.us/links/BillericaGirlsSoftball/OnlineRegistration.asp";textlink[1]="#";textlink[2]="#";textlink[3]="#";// textlink[3]="mailto:umpire@billericagirlssoftball.com";textlink[4]="#";textlink[5]="#";textlink[6]="#";textlink[7]="#";// set the corresponding targets // Acceptable values are "_blank", "_self", "_top" or the name of any framevar texttarget=new Array();texttarget[0]="_blank";texttarget[1]="_self";texttarget[2]="_self";texttarget[3]="_self";texttarget[4]="_self";texttarget[5]="_self";texttarget[6]="_self";texttarget[7]="_self";// set the font of the messagesvar textfont="Verdana, Comic Sans MS, Arial, Helvetica, sans-serif";// set the font-color of the messagesvar textfontcolor="black";// set the rollover-fontcolor of the messagesvar textfontcolorrollover="#990000";// set the font-size of the messages (CSS-values)var textfontsize=12;// set the font-size for Netscape 4x (HTML-values)var textfontsizeHTML=4;// set the font backgroundcolor of the textboxvar textbgcolor="#00CC00";// set the textweight (normal or bold)var textweight="normal";// set the fontstyle (normal or italic)var textitalic="normal";// set the width of the textbox (pixels)var textwidth=700;// set the height of the textbox (pixels)var textheight=150;// set the pause (seconds)var textpause=5;// set the width of the bordervar textborder=3;// set the color of the bordervar textbordercolor="#990000";// set the horizontal alignment of the messages (center, left, right)var textalign="center";// set the vertical alignment of the messages (middle, top, bottom)var textvalign="middle";// do not edit below this linevar textdecoration="none";var textweightA="<b>";var textweightB="</b>";var textitalicA="";var textitalicB="";var transparency=100;var transparencystep=2;var x_pos=0;var y_pos=0;var i_text=0;var textsplit="";var i_textsplit=0;var i_mark=0;var tickercontent;var pausefade=30;textpause*=1000;var oneloopfinished=false;var browserinfos=navigator.userAgent;var ie=document.all&&!browserinfos.match(/Opera/);var ns4=document.layers;var ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/);var opera=browserinfos.match(/Opera/);var browserok=ie||ns4||ns6||opera;function changecontent() {	getcontent();	i_text++;	if (i_text>=text.length) {i_text=0}		if (ie) {		ticker.innerHTML=content;		fadeout();	}	if (opera || ns6) {		document.getElementById('ticker').innerHTML=content;		var texttimer=setTimeout("changecontent()",2*textpause);	}	if (ns4) {		document.roof.document.ticker.document.write(content);		document.roof.document.ticker.document.close();		var texttimer=setTimeout("changecontent()",textpause);	}	}function fadein() {	if (transparency<100){		transparency+=transparencystep;		if (ie) {			document.all.tickerbg.filters.alpha.opacity=transparency;		}		var fadetimer=setTimeout("fadein()",pausefade);	}	else {		clearTimeout(fadetimer);		setTimeout("changecontent()",1000);	}}function fadeout() {	if (transparency>0){		transparency-=transparencystep;		if (ie) {			document.all.tickerbg.filters.alpha.opacity=transparency;		}		if (ns6) {			document.getElementById('tickerbg').style.MozOpacity=transparency/100;		}		var fadetimer=setTimeout("fadeout()",pausefade);	}	else {		clearTimeout(fadetimer);		setTimeout("fadein()",textpause);	}}getcontent();function getcontent() {	if (ie || opera) {		var tablewidth=textwidth-2*textborder;		var tableheight=textheight-2*textborder;	}	else {		var tablewidth=textwidth;		var tableheight=textheight;	}	if (ie || ns6) {			var padding=parseInt(textborder)+3;		content="<table width="+tablewidth+" height="+tableheight+" cellpadding="+padding+" cellspacing=0 border=0><tr valign="+textvalign+"><td align="+textalign+">";		content+="<a href=\""+textlink[i_text]+"\" target=\""+texttarget[i_text]+"\" style=\"position:relative;font-family:\'"+textfont+"\';font-size:"+textfontsize+"px;font-weight:"+textweight+";text-decoration:"+textdecoration+";color:"+textfontcolor+";font-style:"+textitalic+";\" onMouseOver=\"this.style.color=\'"+textfontcolorrollover+"\'\" onMouseOut=\"this.style.color=\'"+textfontcolor+"\'\">";		content+=text[i_text];		content+="</a></td></tr></table>";	}	else {			content="<table width="+tablewidth+" height="+tableheight+" cellpadding="+textborder+" cellspacing=0><tr valign="+textvalign+"><td align="+textalign+">";		content+="<a href=\""+textlink[i_text]+"\" target=\""+texttarget[i_text]+"\" style=\"position:relative;font-family:\'"+textfont+"\';font-size:"+textfontsize+"px;font-weight:"+textweight+";text-decoration:"+textdecoration+";color:"+textfontcolor+";font-style:"+textitalic+";\">";		content+=text[i_text];		content+="</a></td></tr></table>";		framecontent="<table width="+tablewidth+" height="+tableheight+" cellpadding=0 cellspacing=0 border="+textborder+"><tr><td>";		framecontent+="<font color=\""+textbgcolor+"\">";		framecontent+=".";		framecontent+="</font>";		framecontent+="</td></tr></table>";	}}if (ie || ns6 || opera) {	if (ns6) {		textwidth-=2*textborder;		textheight-=2*textborder;	}	document.write("<div id=\"roof\" style=\"position:relative;width:"+textwidth+"px;height:"+textheight+"px;font-family:\'"+textfont+"\';border-style:solid;border-color:"+textbordercolor+";border-width:"+textborder+"px;background-color:"+textbgcolor+";\">");		if (!opera && !ns6 ) {		document.write("<div id=\"tickerbg\" style=\"position:absolute;top:"+-textborder+"px;left:"+-textborder+"px;width:"+textwidth+"px;height:"+textheight+"px;font-family:\'"+textfont+"\';font-size:"+textfontsize+"px;font-weight:"+textweight+";font-style:"+textitalic+";border-style:solid;border-color:"+textbordercolor+";border-width:"+textborder+"px;background-color:"+textfontcolor+";overflow:hidden\;filter:alpha(opacity=100)\">");		document.write("</div>");	}		document.write("<div id=\"ticker\" style=\"position:absolute;top:"+-textborder+"px;left:"+-textborder+"px;width:"+textwidth+"px;height:"+textheight+"px;font-family:\'"+textfont+"\';font-size:"+textfontsize+"px;font-weight:"+textweight+";font-style:"+textitalic+";border-style:solid;border-color:"+textbordercolor+";border-width:"+textborder+"px;overflow:hidden\;\">");	document.write("</div></div>");	window.onload=changecontent;}else if (ns4) {	document.write("<ilayer name=\"roof\" width="+textwidth+" height="+textheight+">");		document.write("<layer name=\"tickerframe\" width="+textwidth+" height="+textheight+" top=0 left=0 bgcolor="+textbgcolor+">");		document.write(framecontent);		document.write("</layer>");		document.write("<layer name=\"ticker\" width="+textwidth+" height="+textheight+" top=0 left=0>");		document.write();		document.write("</layer>");	document.write("</ilayer>");	window.onload=changecontent;}
