﻿// JScript File
function redirectScript(evt)
{
    // Cancel post-back
    if(window.event != null) // IE style
    {
        event.returnValue=false;
        event.cancel=true;
    }
    else if(evt && evt.preventDefault) // Firefox style
    {
        evt.preventDefault();
    }    
    else if(evt && evt.stopPropagation) // Firefox style
    {
        evt.stopPropagation();
    }
        
    // Get query text from textbox
    var strQuery = document.getElementById('ctl00_ContentPlaceHolder1_txtSearch').value;
        
    // Base URL for redirect
    var strUrl = "Search.aspx?query=";
    //var strUrl = "http://localhost:3484/Zeeker.WebSite2/Search.aspx?query=";
        
    // Build the redirection URL
    strUrl = strUrl + escape(strQuery);
    //strUrl = strUrl + "&showAll=false";
        
    // Redirect
    window.location = strUrl;
}

function mouseScript()
{
    // Get query text from textbox
    var strQuery = document.getElementById('ctl00_ContentPlaceHolder1_txtSearch').value;
    
    // Display it in the status bar
    window.status="Search for: " + strQuery; 
    
    return true;
}

function resetStatus()
{
    // Reset the status text
    window.status="";
    
    return true;
}

function GoHome()
{
    window.location="Index.aspx";
}
