function addFile(mode) {
    var div = document.createElement('div');
    div.setAttribute('class', 'left');

    if (mode == 'new') {
        /*div.innerHTML = '<input class="left" type="text" name="colName[]" value=""/>\n\
                        <input style="color:white;width: 320px;" class="left" type="file" name="filScr[]" />\n\
                        <input type="checkbox"  value="del" name="deletePic[]"/>';
        */
        div.innerHTML = '<div class="left" style="padding:5px;border-bottom: 1px solid #F36F21; width:98%;">\n\
                            <span class="left">CZ:</span><input class="left" type="text" name="colNameN[]" value=""/>\n\
                            <span class="left" style="width: 525px;">&nbsp;</span>\n\
                            <span class="left">EN:</span><input class="left" type="text" name="colNameEnN[]" value=""/>\n\
                            <span class="left">Obrázek:</span><input style="color:white;width: 280px;"class="left" type="file" name="filScrN[]"/>\n\
                            <input type="hidden" name="newpic[]" value="">\n\
                        </div>'
    } else {
        div.innerHTML = '<div class="left" style="padding:5px;border-bottom: 1px solid #F36F21; width:98%;">\n\
                            <span class="left">CZ:</span><input class="left" type="text" name="colNameN[]" value=""/>\n\
                            <span class="left" style="width: 510px;">&nbsp;</span>\n\
                            <span class="left">EN:</span><input class="left" type="text" name="colNameEnN[]" value=""/>\n\
                            <span class="left">Obrázek:</span><input style="color:white;width: 280px;"class="left" type="file" name="filScrN[]"/>\n\
                            <input type="hidden" name="newpic[]" value="">\n\
                        </div>';
    }
    document.getElementById('files-root').appendChild(div);
}


function mySelect(x,id)
{
    window.location.href = "/showproduct.php?id="  +
    x.options[x.selectedIndex].value;
}

/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=1

timerLeft=""
timerRight=""

function scrollDivLeft(id){
    clearTimeout(timerRight)
    document.getElementById(id).scrollLeft+=scrollStep
    timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
    clearTimeout(timerLeft)
    document.getElementById(id).scrollLeft-=scrollStep
    timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function stopMe(){
    clearTimeout(timerRight)
    clearTimeout(timerLeft)
}

function lmactive(id) {
    document.getElementById('lm'+id).setAttribute('class', 'lm'+ id +' lmactive'+ id);
    document.getElementById('lm'+id).setAttribute('className', 'lm'+ id +' lmactive'+ id);
}

function tmactive(id) {
    document.getElementById('tm'+id).setAttribute('class', 'topMenu tmactive');
    document.getElementById('tm'+id).setAttribute('className', 'topMenu tmactive');
}


function showdiv(id) {
    //safe function to show an element with a specified id

    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'block';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'block';
        }
        else { // IE 4
            document.all.id.style.display = 'block';
        }
    }
}

function hidediv(id) {
    //safe function to hide an element with a specified id

    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'none';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'none';
        }
        else { // IE 4
            document.all.id.style.display = 'none';
        }
    }
}




