<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Favorite Sites Search" 
    title_url="http://kkgadgets.googlepages.com"  
directory_title="Google Favorite Sites Search"
             description="A convenient tool which can google search your favorite sites. Define upto 10 favorite sites in the settings. Pick a site from your favorites list and hit search ! You will see google results only for the selected site."
             render_inline="optional"
             author="KK"
             author_link="http://kkgadgets.googlepages.com"
             author_email="kkjkkj@gmail.com"
             screenshot="http://kkgadgets.googlepages.com/favorite_site_search_screenshot.JPG"
             thumbnail="http://kkgadgets.googlepages.com/favorite_site_search_thumbnail.JPG"
             category="tools"              
             height="90"
             width="290"
>
<Require feature="analytics" />
</ModulePrefs>

<UserPref name="Site1" display_name="Site #1 URL" default_value="wikipedia.org"/>
<UserPref name="Site2" display_name="Site #2 URL"/>
<UserPref name="Site3" display_name="Site #3 URL"/>
<UserPref name="Site4" display_name="Site #4 URL"/>
<UserPref name="Site5" display_name="Site #5 URL"/>
<UserPref name="Site6" display_name="Site #6 URL"/>
<UserPref name="Site7" display_name="Site #7 URL"/>
<UserPref name="Site8" display_name="Site #8 URL"/>
<UserPref name="Site9" display_name="Site #9 URL"/>
<UserPref name="Site10" display_name="Site #10 URL"/>
<Content type="html">
  <![CDATA[  
  <script>
// Track this gadget using Google Analytics.
_IG_Analytics("UA-2718908-1", "/favorite_site_search");
</script>
       <table>
         <tr>
           <td colspan="2">
             <select name="site">
                 <option value="">0) Entire web</option>               
                 <option value="__UP_Site1__">1) __UP_Site1__</option>
                 <option value="__UP_Site2__">2) __UP_Site2__</option>
                 <option value="__UP_Site3__">3) __UP_Site3__</option>
                 <option value="__UP_Site4__">4) __UP_Site4__</option>
                 <option value="__UP_Site5__">5) __UP_Site5__</option>
                 <option value="__UP_Site6__">6) __UP_Site6__</option>
                 <option value="__UP_Site7__">7) __UP_Site7__</option>
                 <option value="__UP_Site8__">8) __UP_Site8__</option>
                 <option value="__UP_Site9__">9) __UP_Site9__</option>
                 <option value="__UP_Site10__">10) __UP_Site10__</option>
             </select>
           </td>
         </tr>         
         </table>
         <table width="290">
         <tr>
           <td>
               <input type="text" name="query" size="31" onkeypress="handleKeyPress(event)"/>               
           </td>
           <td>
               <input type="button" value="Search" onclick="myhandler()"/>                            
           </td>
         </tr>
         <tr>  
           <td align="left">
             <font face="verdana" size="1">
               <b>Tip:</b> Define your favorite sites using "Edit Settings" menu (top-right corner)
             </font>
           </td>      
           <td align="right">
               <div style="font-size: 9px; font-weight: bolder; color: rgb(0, 0, 0);">powered by</div> <img src="http://www.google.com/images/poweredby/poweredby_FFFFFF.gif">
           </td>
       </table>

<!-- Google search code -->

<div style="display:none">
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="placeholder.com"></input>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
</td></tr>
<tr>
<td>&nbsp;</td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"></input>
<label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="" checked id="ss1"></input>
<label for="ss1" title=""><font size="-1" color="#000000"></font></label></td>
</tr>
</table>
<input type="hidden" name="client" value="pub-9125730399501689"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="0497683071"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<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;LH:32;LW:75;L:http://www.google.com/logos/Logo_25wht.gif;S:http://www.google.com;LP:1;FORID:1"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
</div>

<script>
function myhandler()
{
        _IG_Analytics('UA-2718908-1', '/favorite_site_search/click');
	document.getElementsByName("q")[0].value = document.getElementsByName("query")[0].value;
	document.getElementsByName("domains")[0].value = document.getElementsByName("site")[0].value;
	document.getElementsByName("sitesearch")[1].value = document.getElementsByName("site")[0].value;
	document.forms[0].submit();
}
function handleKeyPress(e){
var key=e.keyCode || e.which;
if (key==13){
myhandler();
}
}
</script>
]]></Content>
</Module>
