function FCx()
{
  var x = 'http://www.google.com/search?q=' + document.SEARCHBOX.q.value;
  var min=15; // minimum minutes between interstitials (needs to be >15)
  if(x.indexOf('get.media')>0)
  {
    x=unescape(x.substring(x.indexOf('&url=')+5,x.length));
  }
  else
  {
    if(document.cookie.indexOf('CxIC=1')<=0)
	{
      x='http://media.fastclick.net/w/get.media?sid=6312&m=5&url='+escape(x);
      var date_ob=new Date();
      date_ob.setTime(date_ob.getTime()+min*1000*60);
      document.cookie='FCxIC=1; path=/; expires='+date_ob.toGMTString();
    }
  }
  return x;
}


function searchBox(szText)
	{
	document.writeln('<TABLE BGCOLOR="#EEEEEE" id="borders" BORDER="0" CELLSPACING="0" CELLPADDING="3">');
	document.writeln('<FORM NAME="SEARCHBOX" ACTION="http://www.google.com/search" METHOD="GET" TARGET="_top">'); //target can be _blank
	document.writeln('<tr><td align=center colspan=2><strong>Additional Internet Resources</strong></td></tr>');
	document.writeln('<TR>');
	document.writeln('<TD ALIGN="center">');
	document.writeln('<B>Search the Internet</B>');
	document.writeln('</TD>');
	document.writeln('<TD ALIGN="left" HEIGHT="15">');
	document.writeln('<INPUT TYPE=TEXT maxlength="255" NAME="q" SIZE=25 VALUE="' + szText + '">'); //google
    document.writeln('<input type=image src="http://www.imt.net/~mele/images/search_sm.gif" onClick="this.href=FCx;" align="absmiddle" name="Submit" alt="Find It!" border=0>');
	document.writeln('<A HREF="http://www.google.com/search" onClick="this.href=FCx();return false;">');
//	document.writeln('<IMG SRC="http://www.imt.net/~mele/images/search_sm.gif" align="absmiddle" alt="Find It!" border=0>');
//    document.writeln('<input type="submit" name="sa" value="Search">');
//    document.writeln('<input type="hidden" name="client" value="pub-5768314136465320">');
    document.writeln('<input type="hidden" name="forid" value="1">');
    document.writeln('<input type="hidden" name="ie" value="ISO-8859-1">');
    document.writeln('<input type="hidden" name="oe" value="ISO-8859-1">');
    document.writeln('<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;">');
    document.writeln('<input type="hidden" name="hl" value="en">');
//	document.writeln('</A>');
	document.writeln('</TD>');
	document.writeln('</TR>');
//	if(szCategory == 'rifle')
	{
	  document.writeln('<tr>');
	  document.writeln('<td><strong>Shopping Categories</strong></td>');
	  document.writeln('<td>');
	  document.writeln('<a href="results.htm?searchTerm=Rifle+Scopes" class="menu">Rifle Scopes</a>&nbsp;&nbsp');
 	  document.writeln('<a href="results.htm?searchTerm=Rifle+Accessories" class="menu">Rifle Accessories</a>&nbsp;&nbsp');
 	  document.writeln('<a href="results.htm?searchTerm=Shooting+Supplies" class="menu">Shooting Supplies</a>&nbsp;&nbsp');
 	  document.writeln('<a href="results.htm?searchTerm=rifle+cases" class="menu">Rifle Cases</a>&nbsp;&nbsp');
	  document.writeln('</td></tr>')
	}
	document.writeln('</FORM>');
	document.writeln('</TABLE>'); 

/*
	document.writeln('<!-- Search Google -->');
    document.writeln('<center>');
	document.writeln('<form method="get" action="http://www.google.com/custom" target="google_window">');
	document.writeln('<table bgcolor="#cccccc">')
	document.writeln('<tr><td nowrap="nowrap" valign="top" align="left" height="32">');
	document.writeln('<input type="text" name="q" size="25" maxlength="255" value="' + szText + '"></input>');
	document.writeln('<input type="submit" name="sa" value="Google Search"></input>');
	document.writeln('<input type="hidden" name="client" value="pub-5768314136465320"></input>');
	document.writeln('<input type="hidden" name="forid" value="1"></input>');
	document.writeln('<input type="hidden" name="ie" value="ISO-8859-1"></input>');
	document.writeln('<input type="hidden" name="oe" value="ISO-8859-1"></input>');
	document.writeln('<input type="hidden" name="cof" value="GALT:#660033;GL:1;DIV:#66CC00;VLC:66FF00;AH:center;BGC:669900;LBGC:214A00;ALC:000000;LC:000000;T:330033;GFNT:330033;GIMP:330033;FORID:1;"></input>');
	document.writeln('<input type="hidden" name="hl" value="en"></input>');
	document.writeln('</td></tr></table>');
	document.writeln('</form>');
	document.writeln('</center>');
	document.writeln('<!-- Search Google -->');
*/
	}
