var lyrTO = setTimeout('cleanUp()',300);
clearTimeout(lyrTO);

function timerStart() {
	lyrTO = setTimeout('cleanUp()',300);
}
function timerStop() {
	clearTimeout(lyrTO);
}

function cleanUp() {
	tmt_showhideAll('hidden');	
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function MM_showHideLayers() { //v3.0A Modified by Al Sparber and Massimo Foti for NN6 Compatibility
  var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }}
}

function tmt_showhideAll(c){
	var v = (document.layers) ? ".visibility" : ".style.visibility";
	var arr = (document.layers) ? document.layers : (document.all) ? document.all.tags("DIV") : document.getElementsByTagName("DIV");
	for(var i=0;i<arr.length;i++){
		if (eval("arr["+i+"].id") != 'dyknow') {
			eval("arr["+i+"]"+v+"='"+c+"'");
		}
	}
}

function getLayerRef(layerName) {
	var objectRef = document.getElementById?document.getElementById(layerName):(!document.layers)?layerName + ".style":"window.document.timerLayer.document." + layerName;
	return objectRef;
}


function writeToLayer(name,message) {
	var lyrObj = eval(getLayerRef(name));
    if (document.layers) {
		//var lyrObj = eval(document.layers[name])
        lyrObj.document.close();
        lyrObj.document.write(message);
        lyrObj.document.close();
    } else {
        if (document.all) {
		  		document.all[name].innerHTML='\n';
		  		document.all[name].innerHTML=message+'\n';
        } else {
            lyrObj.innerHTML = '';
            lyrObj.innerHTML = message;
        }
    }

}


function dorandom ()

{
dyk= new Array();

dyk[0]='The first lighthouse ever to be lighted by natural gas (1829) still stands at Barcelona Harbor on Lake Erie. It is the oldest lighthouse on the Great Lakes.';
dyk[1]='The French Creek Watershed, designated as one of the "Last Great Places" by the Nature Conservatory, includes the 90 acre French Creek Preserve. French Creek is the most biologically diverse riverine system in the Northeast, and includes twelve globally rare species.';
dyk[2]='The Alton Sylor Memorial Bridge, which crosses the Joncy Gorge in Angelica, contains the longest clear span timber arch in the nation. The total bridge length is 274.10 feet (3 span).';
dyk[3]='Lilly Dale is the largest Spiritualist community in the world.';
dyk[4]='Grace Bedell, a young Westfield Resident, wrote a letter to President Abraham Lincoln suggesting he grow whiskers. One year later he stopped by Westfield while on a campaign trip. He asked if Grace was in the crowd, she was and he showed off his new whiskers to her.';
dyk[5]='The Genesee River is one of only five rivers in the world to flow north.';
dyk[6]='Gabby Hayes, the sidekick of Roy Rogers was born in Wellsville.';
dyk[7]='President Theodore Roosevelt once said that Chautauqua County was "the most American place in America."';
dyk[8]='The first incense factory in the world was started in Jamestown.';
dyk[9]='The Constitution of the United States and the resulting government was largely based on the government structure and constitution of the Seneca Indian Nation.';
dyk[10]='Roger Tory Peterson, the 20th century naturalist and author of the Peterson\'s Field Guides, was a native of Jamestown.';
dyk[11]='Allegany State Park is the largest state park in New York.';
dyk[12]='The Chautauqua Literary and Scientific Circle is the oldest continuous book club in America.';
dyk[13]='The Gerry Rodeo is the longest continuous running rodeo east of the Mississippi.';
dyk[14]='Cliffstar, headquartered in Dunkirk, is the largest private label juice manufacturer in the world.';
dyk[15]='Stride Tool, headquartered in Ellicottville, was on the 1998 Inc. 500 list of fastest growing companies in America.';
dyk[16]='The first Grange (No.1) was chartered in Fredonia.';
dyk[17]='Southwest New York boasts over 1500 miles of snowmobile trails.';
dyk[18]='Holimont is the largest private ski resort in North America.';
dyk[19]='Holiday Valley is the largest ski resort in New York State.';
dyk[20]='Ellicottville is often referred to as the "Aspen of the East".';
dyk[21]='George Gershwin composed his "Concerto in F" at Chautauqua Institution in 1925.';
dyk[22]='There are over 150 farm markets in Southwest New York.';
dyk[23]='The Women\'s Christian Temperance Union, the eventual force behind prohibition, was organized in 1873 in Fredonia.';
dyk[24]='Golf Digest ranks Jamestown as "The Best Little Golf Town in America" in its November, 2002 edition.';
dyk[25]='1 in 3 businesses in Chautauqua County are women owned; in Cattaraugus County it is 1 in 4.';
dyk[26]='Field and Stream magazine ranked Chautauqua Lake #1 on their list of Top Picks for Walleye Fishing in the June, 2003 edition.';
dyk[27]='There are over 480 child care facilities in Southwest New York.';
dyk[28]='New York is the largest grape producing state in America. 20,000 acres of vineyards are in Chautauqua County alone, the largest such number for any county in America outside of California.';
dyk[29]='Nine US Presidents have visited Chautauqua Institution, including most recently Bill Clinton.';
dyk[30]='In its June 25, 2004 edition, USA Today listed Allegany State Park as one of the "10 Great Places to Pitch a Pup Tent."';
dyk[31]='The first shot in the War of 1812 was fired in Dunkirk at what is the present day location of the lighthouse.';
dyk[32]='South Dayton has been invaded by Hollywood twice as "The Natural" and "Planes, Trains, and Automobiles" were both partially filmed in the quaint Village.';

//return Math.random()*dyk.length;
writeToLayer("dyknow",dyk[Math.round(Math.random()*dyk.length)]);
}
