function go(linka) { document.location.href = linka; } function change(myObj,myColor) { if (myColor == '') myColor = 'transparent'; document.getElementById(myObj).style.background = myColor; } function popup(linka,myWidth,myHeight) { winid = window.open( linka ,'Inverpopup','status=yes,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no,directories=no,width='+ myWidth +',height='+ myHeight +', top=5, left=5'); } function change_in_winid( myID, myValue, myIDforClose) { var myObj, myClose; if (!winid.closed) { myObj = winid.document.getElementById(myID); myObj.value = myValue; if( myIDforClose) { myClose = document.getElementById(myIDforClose); if( myClose.checked) myclose(); } } } function myclose() { window.close(); if( winid) winid.window.focus(); } function ChodNaLinku(ID) { if (!winid.closed) { winid.location.href = ID; } else { winid = window.open( ID ,'Inverpopup','status=yes,scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,location=yes,directories=yes,width='+screen.availWidth+',height='+screen.availHeight+', top=5, left=5'); } } winid = opener; function disable( myObj, testObj) { var myID = document.getElementById(myObj), testID = document.getElementById(testObj); if (testID.checked) { myID.disabled = 1; myID.style.background = '#FFCCCC'; } else { myID.disabled = 0; myID.style.background = '#FFFFFF'; } } //pouzitie changeTD() // function changeTD( myAction, myRow, myRowNum, myDefaultColor, myOverColor, myClickColor) { var myCells = null; // Prehliadac nevie pracovat s TR tabulky -> exit if ( typeof(myRow.style) == 'undefined') { return false; } // Prehliadac zoberie aktualny riadok (TD) prip. exit ak nevie if ( typeof(document.getElementsByTagName) != 'undefined') { myCells = myRow.getElementsByTagName('td'); } else if ( typeof(myRow.cells) != 'undefined') { myCells = myRow.cells; } else { return false; } // Zistime si aktualnu farbu riadku... var rowCellsCnt = myCells.length, domDetect = null, currentColor = null, myColor = null; // ... DOM kompatibilne prehliadace okrem Opera, ktora nevracia pomocou // "getAttribute" pouzitelne vysledky if ( typeof(window.opera) == 'undefined' && typeof(myCells[0].getAttribute) != 'undefined') { currentColor = myCells[0].getAttribute('bgcolor'); domDetect = true; } // ... ostatne prehliadace else { currentColor = myCells[0].style.backgroundColor; domDetect = false; } // Vyberieme si, aka ma byt nova farba if ( currentColor.toUpperCase() != myClickColor.toUpperCase()) { if (myAction == 'click') myColor = myClickColor; if (myAction == 'over') myColor = myOverColor; if (myAction == 'out') myColor = myDefaultColor; } else { if (myAction == 'click') myColor = myOverColor; } // Nastavime novu farbu ... if (myColor) { var cell = null; // ... DOM kompatibilne prehliadace okrem Opera if (domDetect) { for (cell = 0; cell < rowCellsCnt; cell++) { myCells[cell].setAttribute('bgcolor', myColor, 0); } // end for } // ... ostatne prehliadace else { for (cell = 0; cell < rowCellsCnt; cell++) { myCells[cell].style.backgroundColor = myColor; } } } return true; }