function setlink()
{
	var linklist = document.forms("infoDelete").findInfo;
	var linkselect = linklist.options[linklist.selectedIndex].value;
	
	document.getElementById("infoLink").value = linkselect;

}
function setlink2()
{
	var linklist = document.forms("editevent").monthselect;
	var linkselect = linklist.options[linklist.selectedIndex].value;
	
	document.getElementById("infoLink").value = linkselect;
	
	
	
	

	
	
	var radiolink = document.forms("editevent").yearselect;
	for(var i = 0; i < radiolink.length; i++) {
		if(radiolink[i].checked) {
			var yrselect =  radiolink[i].value;
		}
	}
	if (yrselect == "") { alert("You must select a year."); return; }
	document.getElementById("selectyear").value = yrselect;

}
function edititem(recid)
{
	var idname=document.getElementById("bm"+ recid).value;
	var url;
	//idname = idname.replace("&","and");
	url = "edit_infoDetail.asp?id=" + idname;
	//url = url 
	location.href = url;
	
}
function setpaid(recid)
{
	var infopaid = document.getElementById("infopaid" + recid);
	
	if (infopaid.checked == true)
	{
		document.getElementById("infocheck2" + recid).value = 1;
	}
	else
	{
		document.getElementById("infocheck2" + recid).value = 0;
	}
}
function showinfo_instruct()
{
	var infomark = document.getElementById("infomark");
	infomark.style.display = "block";
}
function showinfo_instructclose()
{
	var infomark = document.getElementById("infomark");
	infomark.style.display = "none";
}
function showmaps(imglink,image,address)
{
	
	
	//this.popUpWindowMap(20,100,450,500,street,city,state,zip);
	var left = 20;
	var top = 25;
	var width =650;
	var height = 650;
	
	var popUpWin=0;
	var urlstr;
	urlstr = "showmap.asp?id=" + imglink + "&aid=" + image + "&aad=" + address;
	
 if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(urlstr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	
}



function showinfo(recid)
{
	this.popUpWindow("eventinfo.asp",20,100,450,500,recid);
}
function closeinfo()
{
	window.close();

}

function showpicture(image)
{
	this.popUpWindow2("recpict.asp",20,100,500,500,image);
}


function popUpWindow2(URLStr, left, top, width, height, image)
{
	var popUpWin=0;
	switch (image)
	{
		case "golf" :
			imglink = "images/golf_img.gif";
			image = "Rolling Prairie Golf Course";
			break;
		case "sportclub" :
			imglink = "images/sportclub_img.gif";
			image = "Jones County Sportsman Club";
			break;
		case "swimpool" :
			imglink = "images/swimpool_img.gif";
			image = "Murdo Swimming Pool";
			break;
		case "tenbask" :
			imglink = "images/tenbask_img.gif";
			image = "Murdo Outdoor Tennis, Basketball Courts";
			break;
		case "soft" :
			imglink = "images/softball_img.gif";
			image = "Murdo Baseball, Softball Field";
			break;
		case "park" :
			imglink = "images/park_img.gif";
			image = "Murdo City Park and Playground";
			break;
	}
	URLStr = URLStr + "?id=" + imglink + "&aid=" + image;
	
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function popUpWindow(URLStr, left, top, width, height, recid)
{
	var popUpWin=0;
	URLStr = URLStr + "?recid=" + recid;
	
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function showpicture2(image)
{
	this.popUpWindow2("buspict.asp",20,100,600,500,image);
}

function showpicture3(image,img2)
{
	this.popUpWindow3("infopict.asp",20,100,650,500,image,img2);
}
function popUpWindow3(URLStr, left, top, width, height, image, img2)
{
	var popUpWin=0;
	
	URLStr = URLStr + "?id=" + image + "&iid=" + img2;
	
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpWindow2(URLStr, left, top, width, height, image)
{
	var popUpWin=0;
	switch (image)
	{
		case "golf" :
			imglink = "images/golf_img.gif";
			image = "Rolling Prairie Golf Course";
			break;
		case "sportclub" :
			imglink = "images/sportclub_img.gif";
			image = "Jones County Sportsman Club";
			break;
		case "swimpool" :
			imglink = "images/swimpool_img.gif";
			image = "Murdo Swimming Pool";
			break;
		case "tenbask" :
			imglink = "images/tenbask_img.gif";
			image = "Murdo Outdoor Tennis, Basketball Courts";
			break;
		case "soft" :
			imglink = "images/softball_img.gif";
			image = "Murdo Baseball, Softball Field";
			break;
		case "park" :
			imglink = "images/park_img.gif";
			image = "Murdo City Park and Playground";
			break;
		case "wce" :
			imglink = "images/wce_img.gif";
			image = "West Central Electric";
			break;
		case "wrlj" :
			imglink = "images/wrlj_img.gif";
			image = "West River Lyman/Jones Rural Water System";
			break;
		case "gw" :
			imglink = "images/gw_img.gif";
			image = "Golden West Telecommunications";
			break;
		case "airport" :
			imglink = "images/airport_img.gif";
			image = "Murdo Airport";
			break;
		
	}
	URLStr = URLStr + "?id=" + imglink + "&aid=" + image;
	
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function flipflop()
{
	if (ff=="flip")
	{
		var wd = document.getElementById("murdosd").getAttribute("width");
		wd = wd - inc;
		
		document.getElementById("murdosd").setAttribute("width",wd);
		if (wd == wdmin)
		{
			document.getElementById("murdosd").setAttribute("src","images/murdosd1.gif");
			inc=-inc;
		}
		if (wd == wdmax)
		{
				
				ff="flop";
				inc = -inc;
				setTimeout("flipflop()",pause);
		}
		else
		{
			setTimeout("flipflop()",rate);
		}
	}
	else
	{
		var ht=document.getElementById("murdosd").getAttribute("height");
		ht = ht - htinc;
		
		document.getElementById("murdosd").setAttribute("height",ht);
		if ( ht == htmin )
		{
			document.getElementById("murdosd").setAttribute("src","images/murdosd.gif");
			htinc = -htinc;
		}
		if (ht == htmax)
		{
			ff="flip";
			htinc = -htinc;
			setTimeout("flipflop()",pause);
		}
		else
		{
			setTimeout("flipflop()",rate);
		}
	}
}

function closemurdomay()
{
	document.getElementById("murdoinmay").style.display="none";
}
function openmurdomay()
{
	document.getElementById("murdoinmay").style.display="block";
}

function validateSearch()
{
 var checkentry;
 checkentry = document.getElementById("search1").value;
 alert(checkentry);
 
 

}