function imgHeight()
{
    var height = document.getElementById('main').clientHeight;
    document.getElementById('sidebar').style.height = height+'px';

    alert ("HEIGHT = " + height);

}
function inputFocus() {
    document.getElementById('query-input').style['background'] = '';
}

function inputBlur() {
    var queryInput = document.getElementById('query-input');
    if (!queryInput.value) {
        queryInput.style['background'] = 'white url(http://www.google.com/coop/images/google_custom_search_watermark.gif) no-repeat 0% 50%';
    }
}

function inputClear() {
    var queryInput = document.getElementById('query-input');
    queryInput.style['background'] = 'white url(http://www.google.com/coop/images/google_custom_search_watermark.gif) no-repeat 0% 50%';

}

function OnSubmitForm() {
    if ( document.gsearch.q.value == '' ) {
        inputClear();
        return false;
    }
    return true;
}

function noBG (divID) {
    alert ("NO DIV: "+divID);
}
function preload(divID) {

    //var d = jQuery(divID);

    var el = document.getElementById(divID);
    if(el==null) {
        noBG(divID);
        return;
    }

    //var height = imgHeight();
    var img = new Image();

    el.css("border","3px solid red");
    el.css("background-image","/img/background.jpg");
    el.css("height",570);


    //d.css({
    //    'background-image':'url("/img/background.jpg")'
    //});
    //d.css({
    //   'height':height
    //});
 
    img.src = "/img/background.jpg";
}

function onLoad() {
    inputBlur();
    //imgHeight();

    //preload('sidebar');

}


