function firstFocus()	// causes cursor focus on first field in a form
{
   if (document.forms.length > 0)
   {
      var TForm = document.forms[0];
      for (i=0;i<TForm.length;i++)
      {
         if ((TForm.elements[i].type=="text")||
		   (TForm.elements[i].type=="password")||
           (TForm.elements[i].type=="textarea")||
           (TForm.elements[i].type.toString().charAt(0)=="s"))
         {
            document.forms[0].elements[i].focus();
            break;
         }
      }
   }
}

function strImgTags() {
	
}

function popWindow(filename){
		popup = window.open(filename,"myWindow",
		"height=500,width=700,left=50,top=50,scrollbars=yes,scrollable=yes,resizable=1");
	}

function popAvailability(config){
		var filename;
		filename = "availability.cfm?config=" + config;
		popup = window.open(filename,"myWindow",
		"height=250,width=400,left=150,top=100,scrollbars=yes,scrollable=yes,resizable=1");
	}

function pickWindow(filename){
		popup = window.open(filename,"pickWindow",
		"height=500,width=700,left=100,top=100,scrollbars=yes,scrollable=yes,resizable=1");
	}

	
function SetChecked(val,thisname) {
	dml=document.myForm;
	len = dml.elements.length;
	var i=0;
	for( i=0 ; i<len ; i++) {
	if (thisname=='') {
	dml.elements[i].checked=val;
	}
	else {
	if (dml.elements[i].name==thisname) {
	dml.elements[i].checked=val;
	}
	}
	}
	}
	
function woodslodgeBirds()
	{
	   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="20" height="25" id="splash_intro" align="middle">\n');
	   document.write('<param name="movie" value="/flash/bird_sounds.swf" />\n');
	   document.write('<param name="quality" value="high" />\n');
	   document.write('<param name="loop" value="true" />\n');
	   document.write('<embed src="/flash/bird_sounds.swf" quality="high" width="20" height="25" name="bird_sounds" loop="true" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" />\n');
	   document.write('</object>\n');
	}

function ToggleTbl( sTblID ) {
     var oTbl= document.getElementById( sTblID );
     if ( oTbl.style.display == "none" )  {
	 		oTbl.style.display= "inline";
			document.searchForm.myButton.value = "Hide";
		}
     else {                                    
		oTbl.style.display="none";
		document.searchForm.myButton.value = "Advanced";
		// uncheck all checkboxes if not displaying
		dml=document.searchForm;
		len = dml.elements.length;
		var i=0;
		for( i=0 ; i<len ; i++) {
			dml.elements[i].checked=0;
			}
		}
}



function isIE() {
	return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}

