//------------------------------------------------------------------------------ //------------------------------------------------------------------------------ function init() { if (document.getElementsByTagName) { var allCells = document.getElementsByTagName('td'); for (var i = 0; i < allCells.length; i++) { if (allCells.item(i).className == 'mi' || allCells.item(i).className == 'mia') { var currClass = allCells.item(i).className; eval('allCells.item(i).onmouseover = function() { this.className = \'' + currClass + 'a\' }'); eval('allCells.item(i).onmouseout = function() { this.className = \'' + currClass + '\' }'); } } } } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ function switch_img(img, state) { // state: 1 - on; 0 - off url = img.src.slice(0, -4); if(!state) url = url.slice(0, -1); else url += "_"; img.src = url + img.src.substr(img.src.length - 4); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ function show_img(img, title) { window.open('http://telesputnik.lv//photo.php?img='+img+'&title='+title, '_blank', 'width=1,height=1'); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ function open_dialog(url, w, h) { if(!w) w = 1000; if(!h) h = 670; // t=Math.ceil((screen.height-h)/2); // l=Math.ceil((screen.width-w)/2); window.open("https://telesputnik.lv/telesputnik/" + url,"_blank","width="+w+",height="+h+ ",status=yes,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no"); }