window.onload = function()
{
    kukacReplace();
    startList();
}

function kukacReplace()
{
    var replaces = 0;
    while(document.body.innerHTML.indexOf('##'+'kukac##') != -1 && replaces < 10000)
    {
        document.body.innerHTML = document.body.innerHTML.replace('##'+'kukac##', String.fromCharCode(64));
        replaces++;
    }
}

function blankTarget()
{
    if(!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for(var i=0; i < anchors.length; i++)
    {
        var anchor = anchors[i];
        anchor.tabindex = i;
        if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
        {
            anchor.target = "_blank";
        }
    }
}

function kereses()
{
    var hol;
    var q;

    if(document.getElementById('kereses-text').value == '') return;

    hol = document.getElementById('kereses-select').value;

    switch(hol)
    {
        case '3' : 
        {
            document.getElementById('keres').method = 'get';
            document.getElementById('keres').action = 'http://www.google.co.hu/search';
            document.getElementById('keres').target = '_blank';
        }
        break;
    }
}
