﻿google.load('search', '1');

function inputFocus() 
{
    document.getElementById('query-input').style['background'] = '';
}

function inputBlur()
{
    var queryInput = document.getElementById('query-input');
    if (!queryInput.value) 
    {
        queryInput.style['border'] = 'solid 0px #CCCCCC';
        queryInput.style['background'] ='white url(http://www.google.com/coop/images/' + 'google_custom_search_watermark.gif) no-repeat 0% 50%';
    }
}
function init()
{
    google.search.CustomSearchControl.attachAutoCompletion('016535612922553282665:kfcr88t3knm',document.getElementById('query-input'),'Search Engine - UA-2504586-1');
    inputBlur();
}
function submitQuery() 
{
    window.location = '/search.html?q=' + encodeURIComponent(document.getElementById('query-input').value);
    return false;
}
google.setOnLoadCallback(init);
