function checkCart()
{
    // je vybrana doprava
    if (!dopravaVybrana) {
        alert("Zvolte prosím způsob dopravy.");
        return false;
    }
    // je vybrana doprava
    if (!platbaVybrana) {
        alert("Zvolte prosím způsob platby.");
        return false;
    }    
}


function doprava(popis, cena)
{
    var doprava_popis = document.getElementById('doprava_popis');
    var doprava_cena = document.getElementById('doprava_cena');
    var suma = document.getElementById('suma');

    dopravaVybrana = true;
    cenaDopravy = cena;

    doprava_popis.innerHTML = popis;
    doprava_cena.innerHTML = cena;
    
    suma.innerHTML = cenaZbozi + cenaDopravy;
}
function dopravaNepocitat(popis)
{
    var doprava_popis = document.getElementById('doprava_popis');

    dopravaVybrana = true;
    doprava_popis.innerHTML = popis;
    suma.innerHTML = cenaZbozi + cenaDopravy;
}

function pp()
{
    platbaVybrana = true;
}

/**



*/
var marked_row = new Array;
var highlight_row = new Array;
var theDefaultColor = "#F2F2F4";
var thePointerColor = "#C1D1E1";
var theMarkColor = "#D1E9F0";

function setPointer(theRow, theRowNum, theAction) {

    if ( (typeof(theRow.style) == 'undefined')
    || (typeof(document.getElementsByTagName) == 'undefined') ) {
            return false;
    }

    var theCells = null;
    theCells = theRow.getElementsByTagName('td');
    var rowCellsCnt = theCells.length;
    var newColor = null;

    if( theAction == 'over' ) {
        if ( (typeof(highlight_row[theRowNum]) == 'undefined') || (!highlight_row[theRowNum]) ) {
            newColor = thePointerColor;
        }
        highlight_row[theRowNum] = true;
    }

    if( theAction == 'out' ) {
        if ( highlight_row[theRowNum] ) {
            if ( marked_row[theRowNum] ) {
                newColor = theMarkColor;
            } else {
                newColor = theDefaultColor;
            }
        }
        highlight_row[theRowNum] = null;
    }

    if( theAction == 'click' ) {
        if ( marked_row[theRowNum] ) {
            marked_row[theRowNum] = null;
            newColor = thePointerColor;
        } else {
            marked_row[theRowNum] = true;
        newColor = theMarkColor;
        }
    }

    if (newColor) {
        var c = null;
        for (c = 0; c < rowCellsCnt; c++) {
            theCells[c].setAttribute('bgcolor', newColor, 0);
        }
    }
}

