/* author: Andy Kale */ /* buzzmedia - www.buzzmedia.ca */ /* creation date: 9/6/03 */ var ns4=(document.layers)? true:false; var ie4=(document.all)? true:false; var ns6=(document.getElementById && !document.all)? true:false; function changeBg(layerName,swapColor) { if (ns4) { document.layers[layerName].bgColor = swapColor; } if (ie4) { document.all[layerName].style.backgroundColor = swapColor; } if (ns6) { document.getElementById(layerName).style.backgroundColor = swapColor; } } function printDate() { time_today = new Date(); if (time_today.getMonth() == 0) { document.write("January "); } if (time_today.getMonth() == 1) { document.write("February "); } if (time_today.getMonth() == 2) { document.write("March "); } if (time_today.getMonth() == 3) { document.write("April "); } if (time_today.getMonth() == 4) { document.write("May "); } if (time_today.getMonth() == 5) { document.write("June "); } if (time_today.getMonth() == 6) { document.write("July "); } if (time_today.getMonth() == 7) { document.write("August "); } if (time_today.getMonth() == 8) { document.write("September "); } if (time_today.getMonth() == 9) { document.write("October "); } if (time_today.getMonth() == 10) { document.write("November "); } if (time_today.getMonth() == 11) { document.write("December "); } document.write(time_today.getDate() + ", " + time_today.getFullYear()); } function displayBC(pagename,linker) { document.write("pagename"); } // This is where the text for the news items on the home page go. For instructions to add a new item, refer to XXXXXXX: var newsItem = new Array(); newsItem[0]="" newsItem[1]="" var current=0; // This is the actual function that displays the message. It works for Netscape 4+, IE 4+, and Netscape 6 // Do not alter any of the code below (except where noted to change the delay time) function changeContent() { if (ns4) { document.layers["newsLayer"].document.write("
"); document.layers["newsLayer"].document.write(newsItem[current]); document.layers["newsLayer"].document.write("
"); document.layers["newsLayer"].document.close(); } else if (ie4) { document.all.newsLayer.innerHTML=newsItem[current]; } else if (ns6) { document.getElementById("newsLayer").innerHTML = newsItem[current]; } if (current==1) { current=0 } else { current++ } // You can change the amount of time each message is displayed by changing the number below...by default it is set at 10000 setTimeout("changeContent()", 10000); } function randomImage() { var photo = new Array() photo[0] = 'img/cfsw_main.jpg' photo[1] = 'img/cfsw_main2.jpg' photo[2] = 'img/cfsw_main4.jpg' var j = 0 var p = photo.length; var preBuffer = new Array() for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = photo[i] } var whichImage = Math.round(Math.random()*(p-1)); document.write(''); }