/*
function getParameter(parameterName) {
    var queryString = window.top.location.search.substring(1);
    parameterName = parameterName + "=";
    if ( queryString.length > 0 ) {
        begin = queryString.indexOf ( parameterName );
        if ( begin != -1 ) {
            begin += parameterName.length;
            end = queryString.indexOf ( "&" , begin );
            if ( end == -1 ) {
                end = queryString.length
            }
            return unescape ( queryString.substring ( begin, end ) );
        }
    }
    return null;
}

function clearDefaultText() {
    var input = document.getElementById("searchValue");
    if (input.value == defaultSearchValue) {
        input.value = "";
        input.style.backgroundColor=null;
        input.style.color = "#000";
    }
}            function replaceDefaultText() {
    var input = document.getElementById("searchValue");
    if (input.value == "") {
        input.value = defaultSearchValue;
        input.style.color = "#AAA";//"#F57908";
    }
}
function focusSearch(){
    document.getElementById('searchValue').focus();
    document.getElementById('searchValue').style.backgroundColor = '#fad184';
    window.setTimeout(
        function f(){
            document.getElementById('searchValue').style.backgroundColor = '';
        }, 500);
}

function URLDecode(encodedString) {
    var plusSigns = /\+/g;
    return unescape(encodedString.replace(plusSigns, " "));
}

function ColorFader(r, g, b) {
    this.r = r;
    this.g = g;
    this.b = b;

    var deltaR = r/30.0;
    var deltaG = g/30.0;
    var deltaB = b/30.0;

    var tempR = r;
    var tempG = g;
    var tempB = b;

    function fade(element) {
        element.style.color = "rgb(" + Math.max(0, Math.round(tempR)) + "," + Math.max(0, Math.round(tempG)) + "," + Math.max(0, Math.round(tempB)) + ")";
        if ((tempR + tempG + tempB) > 0) {
            tempR -= deltaR;
            tempG -= deltaG;
            tempB -= deltaB;
            setTimeout(function() { 
                fade(element)
            }, 30);
        }
    }

    this.fadeToBlack = function(element) {
        fade(element);
    }
}

var queryStringValue = getParameter('q');

var searchInput = document.getElementById('searchValue');

if (queryStringValue == null) {
    searchInput.value = defaultSearchValue;
    searchInput.style.color = "#AAA";//"#F57908";
} else {
    searchInput.value = URLDecode(queryStringValue);
}

// Highlighting code
if (getParameter('highlight') != null) {
    var colorFader = new ColorFader(245, 121, 8);
    searchInput.style.color = "rgb(245, 121, 8)";

    setTimeout(function() {
        colorFader.fadeToBlack(searchInput)
    }, 750);
}
*/
