	function checkButtons()
	{
		var x=0
		if(location.href.indexOf("Preview=yes")>0)
		{
			var numForms=document.forms.length
			for(var j=0;j<numForms;j++)
			{
				var numElements=document.forms(j).length
				for(var i=0;i<numElements;i++)
				{
					if(document.forms(j).item(i).type=="button" || document.forms(j).item(i).type=="submit")
					{
						document.forms(j).item(i).disabled=true
					}
				}
			}
		}
	}
	function openWin(blobID,theDate)
	{
		var newWin=window.open("/event_popup2.asp?theBlob=" + blobID + "&theDate=" + theDate,"eventDetail","scrollbars=1,width=360,height=360,resizable=1")
	}
	
	function submitForm()
	{
		var submitMonth=document.frmFind.lstMonth.options[document.frmFind.lstMonth.selectedIndex].value
		var submitDay=document.frmFind.lstDay.options[document.frmFind.lstDay.selectedIndex].value
		var submitYear=document.frmFind.lstYear.options[document.frmFind.lstYear.selectedIndex].text
		var theFormView=document.frmFind.txtTheView.value
		if(submitMonth != "Month" &&  submitDay != "Day" && submitYear!="Year")
		{
			document.frmFind.action="default.asp?theMonth=" + submitMonth + "&theDay=" + submitDay + "&theYear=" + submitYear + "&theView=" + theFormView
			document.frmFind.submit()	
		}
		if(document.frmFind.txtKeywords.value != "")
		{
			var theKeywords=document.frmFind.txtKeywords.value
			document.frmFind.action="default.asp?theMonth=" + submitMonth + "&theDay=" + submitDay + "&theYear=" + submitYear + "&theView=" + theFormView + "&theKeywords=" + theKeywords
			document.frmFind.submit()	
		}
	}
	function changeView()
	{
		if(document.frmFind.txtTheView.value=="day")
		{
			document.frmFind.txtTheView.value="week"
			submitForm()
		}
		else
		{
			document.frmFind.txtTheView.value="day"
			submitForm()
		}
	}
	function getActiveView()
	{
		if(document.frmFind.txtTheView.value=="week")
		{
			document.frmSetTheView.btnWeekView.disabled=true
			document.frmSetTheView.btnDayView.disabled=false
		}
		else
		{
			document.frmSetTheView.btnWeekView.disabled=false
			document.frmSetTheView.btnDayView.disabled=true
		}
	}