<!--
// the list of billboard strings to display
var aBillboardItems = new Array(
         "<B>Safety Tips from IMSARU</B>",
	"<B>Always</B> tell someone where you are <I>going</I>",
	"<B>Carry</B> water food and  extra clothing",
	"<B>Watch</B> the weather conditions",
	"<B>Carry</B> a map and compass",
	"<B>Never</B> go out unprepared"    
	);

//*** generic ************
        //"<B>Safety Tips from IMSARU</B>",
	//"<B>Always</B> tell someone where you are <I>going</I>",
	//"<B>Carry</B> water food and  extra clothing",
	//"<B>Watch</B> the weather conditions",
	//"<B>Carry</B> a map and compass",
	//"<B>Never</B> go out unprepared"

//*** Summer ***************
        //"<B>Safety Tips from IMSARU</B>",
	//"<B>Summer</B> heat will <i>dehydrate</i> you",
	//"<B>Avoid</B> heat exhaustion",
	//"<B>Carry</B> extra water",
	//"<B>Drink</B> the water you carry!"
	//"<B>IMSARU-related Events for August</B>",
	//"<B>Corn Booth</B> Aug 16-24",
	//"at the <b>Western Idaho Fair</b>",
	//"<B>See the <a href='calendar.html' class='visible'>Calendar</a> for more.</B>"
//*** Winter *****************
//                "<B>Avalanche Season is here,</B>", 
//                "<B>Stay Safe Carry A BEACON!</B>", 
//        "<B>Always</B> tell someone where you are <I>going</I>",
//        "<B>Carry</B> extra clothing, food, and a compass!"

//*** Special ***********
	//"<B>Watch NEWSMAKERS Sunday Morning at 8am</B>",
	//"<b>on <a href='http://www.6onyourside.com/' target='_top' class='visible'>KIVI TV 6</a></b>",
	//"<B>To learn more about IMSARU</B>"
//*** Hunting *****
//                "<B>Hunting Season - Safety Tips</B>",
//	"<B>Always</B> tell someone where you are <I>going</I>",
//	"<B>Carry</B> water food and  extra clothing",
//	"<B>Watch</B> the weather conditions",
//	"<B>Carry</B> a map and compass",
//	"<B>Never</B> go out unprepared"
//**special**
//        "<B>Safety Tips from IMSARU will return soon</B>",
//        "<B><a href='specialevents/sarmgrcourse03.htm' target='sarwin' class='visible'>SAR Manager Course</a></B>" ,
//        "<B><a href='specialevents/sarmgrcourse03.htm' target='sarwin' class='visible'>November 14-16</a></B>" ,
//        "<B><a href='specialevents/sarmgrcourse03.htm' target='sarwin' class='visible'>Click for more information</a></B>"   
        	
//	
// the string number to start with (0 is first)
var iCurItem = 0;
// the numbers of items to display. if this is "null" then the browser
// is really old and we should do nothing
var iNumItems = aBillboardItems.length;
// the length (in milliseconds) for which each item will be displayed
var iDelayMilliseconds = 3000;

// test to see if the browser is IE4 or above
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
var browserIE4 = ((browserName == "Microsoft Internet Explorer") && (browserVer >= 4));
// if the browser isn't IE4+ then we'll need to remove any HTML from our
// billboard strings. We can use the function stripHTML to do this
if ((!(browserIE4)) && (iNumItems != null)) {
	for (var i = 0; i < iNumItems; i++) {
		aBillboardItems[i] = stripHTML(aBillboardItems[i]);
	}
}

function stripHTML(sHTML) {
	var sOutText = "";
	var iTagStart;
	var iTagEnd = 0;
	
	// look for the start of the first tag
	iTagStart = sHTML.indexOf("<");
	// repeat until we find no more HTML opening brackets
	while (iTagStart != -1) {
		// add the text since the last tag (or the beginning) until
		// the start of this tag
		sOutText += sHTML.substring(iTagEnd, iTagStart);
		// find the end of this tag
		iTagEnd = sHTML.indexOf(">", iTagStart) + 1;
		// find the start of the next tag
		iTagStart = sHTML.indexOf("<", iTagEnd);
	}
	if (iTagEnd != 0) {
		// finish up by adding the rest of the string
		sOutText += sHTML.substring(iTagEnd, sHTML.length);
	} else {
		// no HTML was found, so just return the string we got
		sOutText = sHTML;
	}
	// return the result string
	return sOutText;
}

function showNextItem() {
	var sIEHTML;
	
	// show the text
	if (iNumItems != null) {
		if (browserIE4) {
			// IE4+ specific code that removes the TEXTAREA control
			// and displays read-only text in a table
			sIEHTML = '<TABLE WIDTH="300" BORDER="0" BGCOLOR="ffffff"><TR><TD>';
			sIEHTML += '<FONT FACE="Arial" SIZE="-1">';
			sIEHTML += aBillboardItems[iCurItem];
			sIEHTML += '</FONT></TD></TR></TABLE>';
			BillboardDiv.innerHTML = sIEHTML
		} else {
			// code for Netscape and other browsers
			document.BillboardForm.BillboardTextArea.value = aBillboardItems[iCurItem];
		}
		// set the next item, roll-over to the start of the list, if needed
		iCurItem = (iCurItem + 1) % iNumItems;
		// run this function again after a delay
		setTimeout("showNextItem()", iDelayMilliseconds);
	}
}
// -->