
<!-- // JavaScript Document
/******************************************
* Find In Page Script -- Submitted/revised by Alan Koontz (alankoontz@REMOVETHISyahoo.com)
* Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
* This notice must stay intact for use
******************************************/
//  revised by Alan Koontz -- May 2003

var TRange = null;
var dupeRange = null;
var TestRange = null;
var win = null;
var nom = navigator.appName.toLowerCase();
var agt = navigator.userAgent.toLowerCase();
var is_major   = parseInt(navigator.appVersion);
var is_minor   = parseFloat(navigator.appVersion);
var is_ie      = (agt.indexOf("msie") != -1);
var is_ie4up   = (is_ie && (is_major >= 4));
var is_not_moz = (agt.indexOf('netscape')!=-1)
var is_nav     = (nom.indexOf('netscape')!=-1);
var is_nav4    = (is_nav && (is_major == 4));
var is_mac     = (agt.indexOf("mac")!=-1);
var is_gecko   = (agt.indexOf('gecko') != -1);
var is_opera   = (agt.indexOf("opera") != -1);
//  GECKO REVISION
var is_rev=0
if (is_gecko) {
temp = agt.split("rv:")
is_rev = parseFloat(temp[1])
}
var frametosearch = self;

if (typeof(findText) == "undefined")
    var findText = "Find SportsBook";
    
if (typeof(findButtonText) == "undefined")
    var findButtonText = "Find";
function testSearch(){
	//  TEST FOR IE5 FOR MAC (NO DOCUMENTATION)
	if (is_ie4up && is_mac) return;	
	//  TEST FOR NAV 6 (NO DOCUMENTATION)
	if (is_gecko && (is_rev <1)) return;	
	//  TEST FOR Opera (NO DOCUMENTATION)
	if (is_opera) return;
	//  INITIALIZATIONS FOR FIND-IN-PAGE SEARCHES
	document.getElementById('searchDiv').innerHTML = '<input type="text" name="findthis" id="findthis" size="15" title="Press \'ALT s\' after clicking submit to repeatedly search page" style="width:160px;color:#A4A4A4;" onblur="this.style.color=this.value==\'\'||this.value==\'Find SportsBook\'?\'#A4A4A4\':\'#000000\';this.value=this.value==\'\'||this.value==\'Find SportsBook\'?\'Find SportsBook\':this.value" onfocus="this.style.color=\'#000000\';this.value=this.value==\'Find SportsBook\'?\'\':this.value;" value="' + findText + '" onkeydown="if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById(\'findOnPageButton\').click();return false;}} else {return true};" > <input type="submit" id="findOnPageButton" value="' + findButtonText + '" ACCESSKEY="s" onclick="return search(frametosearch);" style="width:40px;">';
}
function search(whichframe) {
	//  TEST FOR IE5 FOR MAC (NO DOCUMENTATION)
	if (is_ie4up && is_mac) return false;	
	//  TEST FOR NAV 6 (NO DOCUMENTATION)
	if (is_gecko && (is_rev <1)) return false;	
	//  TEST FOR Opera (NO DOCUMENTATION)
	if (is_opera) return false;
	//  INITIALIZATIONS FOR FIND-IN-PAGE SEARCHES
	var tb = document.getElementById('findthis');
	if(tb.value!=null && tb.value!='') {
			str = tb.value;
			win = whichframe;
			var frameval=false;
			if(win!=self){
			   frameval=true;  // this will enable Nav7 to search child frame
			   win = parent.frames[whichframe];
			}
	} else return false;  //  i.e., no search string was entered	
	var strFound;
	//  NAVIGATOR 4 SPECIFIC CODE
	if(is_nav4 && (is_minor < 5)) {   
	  strFound=win.find(str);
	}	
	//  NAVIGATOR 7 and Mozilla rev 1+ SPECIFIC CODE (WILL NOT WORK WITH NAVIGATOR 6)
	if (is_gecko && (is_rev >= 1)) {   
		if(frameval!=false) win.focus(); // force search in specified child frame
		strFound=win.find(str, false, false, true, false, frameval, false);
		if (is_not_moz)  tb.focus();
	}	
	if (is_ie4up) {	
		// EXPLORER-SPECIFIC CODE revised 5/21/03
		if (TRange!=null) {	  
			TestRange=win.document.body.createTextRange();	
			if (dupeRange.inRange(TestRange)) {	
				TRange.collapse(false);
				strFound=TRange.findText(str);
				if (strFound) {
					//the following line added by Mike and Susan Keenan, 7 June 2003
					win.document.body.scrollTop = win.document.body.scrollTop + TRange.offsetTop;
					TRange.select();
				}
			} else {
				TRange=win.document.body.createTextRange();
				TRange.collapse(false);
				strFound=TRange.findText(str);
				if (strFound) {
					//the following line added by Mike and Susan Keenan, 7 June 2003
					win.document.body.scrollTop = TRange.offsetTop;
					TRange.select();
				}
			}	
		}	  
		if (TRange==null || strFound==0) {
		   TRange=win.document.body.createTextRange();
		   dupeRange = TRange.duplicate();
		   strFound=TRange.findText(str);
		   if (strFound) {
				//the following line added by Mike and Susan Keenan, 7 June 2003
				win.document.body.scrollTop = TRange.offsetTop;
				TRange.select();
		   }   
	   }
	}
	//if (!strFound) alert ("String '"+str+"' not found!") // string not found
	return false;   
}
// -->
