<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Search.ascx.vb" Inherits="Controls_Search" %>
<script language="javascript" type="text/javascript">
function fnCheck(id)
    {
        var obj;
        obj = document.getElementById(id.replace("btnSite","txtSite"));
        if (obj != "undefined")
        {
            if(obj.value.length == 0)
                {
                    return false;
                }
        }                        
        //for search functionality
        var t = /_/g; 
        id = id.replace(t, "$");
        id = id.replace("btnSite","txtSite"); 
        //document.forms[0].elements["ctl00$cphTop$ucHeader$ucSearch$hdnSearchString"].value = document.forms[0].elements[id].value; 
        //alert(document.forms[0].elements["ctl00$cphTop$ucHeader$ucSearch$hdnSearchString"].value);
        return true;
    }
    
    function fnSiteAgain(id)
    {
        //for search functionality
        var t = /_/g; 
        id = id.replace(t, "$");
        id = id.replace("btnSiteAgain","txtSiteAgain");
        //document.forms[0].elements["ctl00$cphTop$ucHeader$ucSearch$hdnSearchString"].value = document.forms[0].elements[id].value;
        //alert(document.forms[0].elements["ctl00$cphTop$ucHeader$ucSearch$hdnSearchString"].value);
        return true;
    }
</script>

<asp:Panel ID="pnlSite" runat="server" DefaultButton="btnSite" >
    <input type="hidden" runat="server" name="hdnSearchString" id="hdnSearchString" value="" />
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td>Search this site:</td>
			<td><asp:TextBox  ID="txtSite" runat="server" Columns="24" /></td>
			<td><asp:ImageButton ID="btnSite" OnClientClick="javascript:return fnCheck(this.id);" runat="server" CssClass="imageButton" ImageUrl="../Images/but_search.gif" AlternateText="Search this site" /></td>
		</tr>
	</table>
</asp:Panel>

<asp:Panel ID="pnlSiteAgain" runat="server" DefaultButton="btnSiteAgain">
	Search again:
	<asp:TextBox ID="txtSiteAgain" runat="server" Columns="50" />
	<asp:Button ID="btnSiteAgain" runat="server" Text="Search" OnClientClick="javascript:return fnSiteAgain(this.id);"/>
</asp:Panel>

<asp:Panel ID="pnlSupport" runat="server" DefaultButton="btnSupport">
	<table id="rightTabComponent" cellspacing="0">
		<tr>
			<td>
				<p style="font-size:12px;font-weight:500;">Search Support:</p>
				<table cellpadding="0" cellspacing="0">
					<tr>
						<td><asp:TextBox ID="txtSupport" runat="server" Columns="22" /></td>
						<td><asp:ImageButton ID="btnSupport" runat="server" CssClass="imageButton" ImageUrl="../Images/but_goSearch.gif"  /></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</asp:Panel>

<asp:Panel ID="pnlSupportAgain" runat="server" DefaultButton="btnSupportAgain">
	Search Support again:
	<asp:TextBox ID="txtSupportAgain" runat="server" Columns="50" />
	<asp:Button ID="btnSupportAgain" runat="server" Text="Search" />
</asp:Panel>
