/* Copyright (C) 2007-2008 contributors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ function showLayer(layerID) { var layer = document.getElementById(layerID); layer.style.visibility = 'visible'; } function hideLayer(layerID) { var layer = document.getElementById(layerID); layer.style.visibility = 'hidden'; } function lineTop(obj, bShow) { var tds = obj.parentNode.parentNode.getElementsByTagName("td"); var length = obj.parentNode.cellIndex; for (i=1; i -1) fileName = name; else fileName = "/?action=03&name=" + name; var popupWin = window.open(fileName ,'help_popup','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos +',scrollbars=yes,resizable=yes'); popupWin.focus(); } function show2Help(name) { showHelp(name); } function changeImage(imageOvered, newImage) { imageOvered.src = newImage } function scrollToPos(toThis) { var layer = null; var framed = false; if(parent.frames["mainFrame"] != null) { framed = true; layer = parent.frames["mainFrame"].document.getElementById("hour" + toThis); } else layer = document.getElementById("hour" + toThis); var iW = document.body.clientWidth; var iH = document.body.clientHeight; if(layer != null) { var scrolTo = layer.offsetLeft - (iW/2); if(framed) parent.frames["mainFrame"].window.scroll(scrolTo,0); else window.scroll(scrolTo,0); } else { alert("Not Found"); } } function setCookie(cookieName, cookieValue, nDays) { var today = new Date(); var expire = new Date(); if (nDays==null || nDays==0) document.cookie = cookieName+"=" + encodeURIComponent(cookieValue); else { expire.setTime(today.getTime() + 3600000*24*nDays); document.cookie = cookieName+"=" + encodeURIComponent(cookieValue) + ";expires="+expire.toGMTString(); } } function readCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return decodeURIComponent(theCookie.substring(ind+cookieName.length+1,ind1)); } function deleteCookie(cookieName) { document.cookie = cookieName + "=; expires=" + new Date(0).toGMTString(); } function tickAll() { var ticked = document.getElementById("addAll").checked; var ticks = document.getElementsByTagName("input"); for (i=0; i', '/?action=DVS83953', [" EPG", '/servlet/EpgDataRes?action=12&scrollto=-1', ['Search EPG', '/servlet/EpgDataRes?action=22'], ['Favorites', '/servlet/EpgDataRes?action=29&search=yes&flag=matched'], ['Show Now and Next', '/servlet/EpgDataRes?action=21'], ['Auto-Add List', '/servlet/EpgAutoAddDataRes?action=01'], ['Epg Match Lists', '/servlet/EpgAutoAddDataRes?action=05'], ['Refresh Favorites', '/servlet/EpgAutoAddDataRes?action=28'], ['Auto-Add Conflicts', '/servlet/EpgAutoAddDataRes?action=25'], ['Auto-Add Exclusions', '/servlet/EpgDataRes?action=30&search=yes&flag=excluded'], ['Run Auto-Add Scan', "javascript:confirmMenuAction('/servlet/EpgAutoAddDataRes?action=15')"], ['Data Source Settings', '/servlet/EpgDataRes?action=16'], ['Load Data', "javascript:confirmMenuAction('/servlet/EpgDataRes?action=03')"], ['Channel Mapping', '/servlet/EpgDataRes?action=04'], ['EPG Data Report', '/servlet/EpgDataRes?action=02'] ], [" Schedules", '/servlet/ScheduleDataRes', ['New Schedule', '/servlet/ScheduleDataRes?action=01' + '&dari=' + encodeURIComponent(window.location.href)], ['Channel Surf', '/servlet/ScheduleDataRes?action=22'], ['System Queue', '/DVS83953.html'] ], [" System", '/settings.html', ['Select Devices', '/servlet/SystemDataRes?action=04'], ['Channel Settings', '/servlet/ChannelDataRes'], ['Surf Channel Order', '/servlet/ChannelDataRes?action=14'], ['Manage Files', "/servlet/FileManagementDataRes"], ['Auto Deletable File', '/servlet/SystemDataRes?action=06'], ['System Config', '/servlet/SystemDataRes?action=02'], ['System Info', '/servlet/SystemDataRes'], ['System Logs', '/servlet/SystemDataRes?action=SystemShowLogs'], ['Network Drives', '/servlet/SystemDataRes?action=SystemShowNetworkDrives'], ['Backup and Restore', '/servlet/SystemDataRes?action=SystemBackupRestore'], ['Edit Tasks', '/servlet/SystemDataRes?action=08'], ['Active Tasks', "/servlet/TaskManagementDataRes"], ['Keyboard Interface', "/servlet/ApplyTransformRes?xml=null&xsl=kb-root"], ['Interface Theme', '/servlet/SystemDataRes?action=19'], ['Suspend Computer', "javascript:confirmMenuAction('/servlet/SystemDataRes?action=37' + '&dari=' + encodeURIComponent(window.location.href))"], ['Hibernate Computer', "javascript:confirmMenuAction('/servlet/SystemDataRes?action=38' + '&dari=' + encodeURIComponent(window.location.href))"], ['Shutdown Computer', "javascript:confirmMenuAction('/servlet/SystemDataRes?action=39' + '&dari=' + encodeURIComponent(window.location.href))"] ] ] ]; var menuConfig = [ { 'height': 24, 'width' : 24, 'firstX' : 1, 'firstY' : 1, 'hideAfter' : 250, 'css' : 'menulogo', 'trace' : true }, { 'height': 23, 'width' : 90, 'firstY' : 24, 'firstX' : 0, 'nextX' : 1, 'css' : 'menumain' }, { 'width' : 135, 'firstX' : 0, 'firstY' : 24, 'nextY' : -1 } ]; function confirmMenuAction(url) { if (confirm('Are you sure?')) window.location.href = url; } // Product title: Gurt JavaScript Menu // Product version details: 1.1, 01-25-2006 (mm-dd-yyyy) [compressed version] // Product URL: http://gurtom.com/products/menus/js // Contact info: gurt-feedback@gurtom.com (specify product title in subject line) // Notes: This script is free. Feel free to copy, use and change this script as // long as this head part remains unchanged. Visit official site for details. // Copyright: (c) 2006 by Gurtom.Com var menus=[],_m3=window.external?[' style="width:100%;height:100%"','div onclick="','div']:['','a href="javascript:','a'],_mC=document.getElementById?function(_mR){return document.getElementById(_mR)}:function(_mR){return document.all[_mR]};function menu(_m1,_mO){var _=this,i;_._m1=_m1;_._mO=_mO;_._mS='';_.id=menus.length;_._m0=[];_._m2=[];_._m4=[0,0];_._mO[-1]={'firstX':20,'firstY':20,'nextX':15,'nextY':15,'width':100,'height':22,'hideAfter':200,'target':'_self','trace':0,'css':''};for(i=0;i<_._m1.length;i++)if(_._m1[i])new _mE(0,_,_,_._m1[i]);for(i=0;i<_._m2.length;i++)_mA(_._m2[i],1);menus[_.id]=_;}function _mD(_mK){var i,a=menus[_mK]._m0;for(i=0;i=-1;i--){if(_mO[i]&&_mO[i]['nextX']!=null)nX=_mO[i]['nextX'];if(_mO[i]&&_mO[i]['nextY']!=null)nY=_mO[i]['nextY'];if(nX!=null||nY!=null)break;}_._m4=[p._m4[0]+_m9(l,_mO,'firstX')+(nX!=null?nX*c+_m9(l,_mO,'width')*c:0),p._m4[1]+_m9(l,_mO,'firstY')+(nY!=null?nY*c+_m9(l,_mO,'height')*c:0)];document.write('<',_m3[1],'_mF(',id,')" id="me',id,'" style="position:absolute;top:',_._m4[1],'px;left:',_._m4[0],'px;width:',_m9(l,_mO,'width'),'px;height:',_m9(l,_mO,'height'),'px;visibility:hidden;z-index:',l,';text-decoration:none" onmouseout="_mG(',id,')" onmouseover="_mH(',id,')">',_m1[0],'');_._m5=[_mC('me'+m.id+','+_.id),_mC('mi'+m.id+','+_.id),_m9(l,_mO,'css')];if(_m1.length>2){_._m2=[];for(i=2;i<_m1.length;i++)if(_m1[i])new _mE(l+1,_,m,_m1[i]);}}function _mA(_,_mJ){if(_._mQ==_mJ)return;_._mQ=_mJ;if(_mJ)_._m5[0].style.visibility='visible';else if(_._m8)_._m5[0].style.visibility='hidden';}function _mB(_,_mM){if(_._m5[3]==_mM)return;_._m5[3]=_mM;_._m5[1].className=_._m5[2]+_mM}function _m9(l,_mO,k){for(var i=l;i>=-1;i--)if(_mO[i]&&_mO[i][k]!=null)return _mO[i][k];} new menu (menuHierarchy, menuConfig); if (document.addEventListener) { document.addEventListener('scroll', positionMenu, false); } function positionMenu() { var menuDiv = document.getElementById("me0,0"); var offsetTop = document.body.scrollTop - menuDiv.offsetTop + 1; var offsetLeft = document.body.scrollLeft - menuDiv.offsetLeft + 1; menuDiv.style.top = document.body.scrollTop + 1; menuDiv.style.left = document.body.scrollLeft + 1; for (i=1; i<100; i++) { var subDiv = document.getElementById("me0," + i); if (subDiv == null) break; subDiv.style.top = subDiv.offsetTop + offsetTop; subDiv.style.left = subDiv.offsetLeft + offsetLeft; } //var navMenu = document.getElementById("navMenu987"); } if (document.addEventListener) { document.addEventListener('DOMContentLoaded', createHelpBalloon, false); } function createHelpBalloon() { var divHelpBalloon = document.getElementById('balloon_tooltip'); if (divHelpBalloon == null) { divHelpBalloon = document.createElement('div'); divHelpBalloon.id = "balloon_tooltip"; divHelpBalloon.setAttribute("class", "balloon_tooltip"); divHelpBalloon.style.position = "absolute"; divHelpBalloon.style.overflow = "visible"; divHelpBalloon.style.display = "none"; divHelpBalloon.style.top = "1px"; divHelpBalloon.style.left = "1px"; document.body.appendChild(divHelpBalloon); } divHelpBalloon = document.getElementById('balloon_tooltip2'); if (divHelpBalloon == null) { divHelpBalloon = document.createElement('div'); divHelpBalloon.id = "balloon_tooltip2"; divHelpBalloon.setAttribute("class", "balloon_tooltip2"); divHelpBalloon.style.position = "absolute"; divHelpBalloon.style.overflow = "visible"; divHelpBalloon.style.visibility = "hidden"; divHelpBalloon.style.top = "1px"; divHelpBalloon.style.left = "1px"; document.body.appendChild(divHelpBalloon); } divHelpBalloon = document.getElementById('balloon_loading'); if (divHelpBalloon == null) { divHelpBalloon = document.createElement('div'); divHelpBalloon.id = "balloon_loading"; divHelpBalloon.setAttribute("class", "balloon_tooltip2"); divHelpBalloon.style.position = "absolute"; divHelpBalloon.style.overflow = "visible"; divHelpBalloon.style.visibility = "hidden"; divHelpBalloon.style.top = "1px"; divHelpBalloon.style.left = "1px"; divHelpBalloon.innerHTML = ""; document.body.appendChild(divHelpBalloon); } var imgs = document.getElementsByTagName('img'); for (i=0; i -1) fileName = name; else fileName = "/?action=03&name=" + name; iframeHelpBalloon.src = fileName; } var help = null; if (iframeHelpBalloon.contentDocument) help = iframeHelpBalloon.contentDocument.getElementById('helpDescription'); else if (iframeHelpBalloon.contentWindow) help = iframeHelpBalloon.contentWindow.document.getElementById('helpDescription'); if (help != null) { if (iTimerID) window.clearTimeout(iTimerID); iTimerID = null; showTip(e, help, 0, (help == prevObj) ? false : true); } else { help = document.getElementById('balloon_loading'); showTip(e, help, 0, (help == prevObj) ? false : true); if (iTimerID) window.clearTimeout(iTimerID); iTimerID = window.setTimeout( function() { showHelpBalloon(e, name, help); }, 100 ); } } var text, obj, balloon2; var bObj = false; var prevCell = null; var posX, posY; function changeOffsetWidth(item, value) { item.style.width = (parseFloat(item.style.width) + (value - item.offsetWidth)) + 'px'; } function changeOffsetHeight(item, value) { item.style.height = (parseFloat(item.style.height) + (value - item.offsetHeight)) + 'px'; } function moveToolTip() { var body = document.body; if (balloon2.offsetWidth > (body.clientWidth - 6)) changeOffsetWidth(balloon2, body.clientWidth - 6); var leftPos = posX - balloon2.offsetWidth - 15; var topPos = posY - balloon2.offsetHeight - 15; if ( (leftPos<3) && (topPos<3) ) { topPos = 3; if ( (balloon2.offsetHeight < (body.clientHeight - 6)) && (balloon2.offsetWidth < (body.clientWidth - posX - 18)) ) { leftPos = posX + 15; } else if (posX >= (body.clientWidth - posX)) { leftPos = 3; changeOffsetWidth(balloon2, posX - 18); } else { leftPos = posX + 15; changeOffsetWidth(balloon2, body.clientWidth - posX - 18); } } else if (leftPos<3) leftPos = 3; else if (topPos<3) topPos = 3; leftPos += body.scrollLeft; topPos += body.scrollTop; obj.style.left = leftPos + 'px'; obj.style.width = balloon2.style.width; obj.style.top = topPos + 'px'; } function displayMarker(cell) { var mainDiv = document.getElementById("mainDiv"); if (mainDiv == null) return; var mainDiv0 = document.getElementById("mainDiv0"); var topPos = cell.offsetTop - mainDiv.scrollTop + mainDiv0.offsetTop; var objLineTop = document.getElementById('balloon_lineTop'); objLineTop.style.width = (mainDiv.clientWidth + 20) + 'px'; objLineTop.style.top = topPos + 'px'; if ( topPos <= mainDiv0.offsetTop ) objLineTop.style.display = 'none'; else objLineTop.style.display = 'block'; var objLineBottom = document.getElementById('balloon_lineBottom'); objLineBottom.style.width = objLineTop.style.width; objLineBottom.style.top = (topPos + cell.offsetHeight) + 'px'; if ( topPos + cell.offsetHeight >= mainDiv0.offsetTop + mainDiv.offsetHeight ) objLineBottom.style.display = 'none'; else objLineBottom.style.display = 'block'; } function showTipNow(cell) { if (bObj == false) { if (prevCell == cell) { obj.style.display = 'block'; var desc2 = cell.getAttribute('desc2'); if ((desc2) && (desc2.length > 0)) { displayMarker(cell); } moveToolTip(posX, posY); } else { obj = document.getElementById('balloon_tooltip'); balloon2 = document.getElementById('balloon_tooltip2'); var bDesc3 = false; var desc2 = cell.getAttribute('desc2'); var desc3 = cell.getAttribute('desc3'); if ((desc2) && (desc2.length > 0)) { displayMarker(cell); if (desc3 && (desc3.length > 0)) { bDesc3 = true; balloon2.innerHTML = desc2 + '
' + desc3 + '
'; } else { balloon2.innerHTML = desc2; } } else { balloon2.innerHTML = cell.innerHTML; } if (bDesc3) { var objDesc3 = document.getElementById('tDesc3'); balloon2.style.width = objDesc3.width; } else { var width = balloon2.innerHTML.length; balloon2.style.width = width + 'px'; } var width = Math.sqrt(balloon2.offsetHeight * balloon2.offsetWidth * 3); if (width < 200) balloon2.style.width = '200px'; else { balloon2.style.width = (width + 'px'); var height = balloon2.offsetHeight; for (i = 0; i < 5; i++) { var prev = balloon2.style.width; balloon2.style.width = (parseFloat(balloon2.style.width) - 50) + 'px'; if (height != balloon2.offsetHeight) { balloon2.style.width = prev; break; } } } bObj = true; prevCell = cell; moveToolTip(posX, posY); obj.innerHTML = balloon2.innerHTML; obj.style.display = 'block'; } } else { moveToolTip(posX, posY); } } var curCell = null; var iTimerID = null; function showTip(e,cell,delay,bRefresh) { posX = e.clientX; posY = e.clientY; curCell = cell; if (bRefresh) bObj = false; if (delay == 0) showTipNow(cell); else if (prevCell == cell) { showTipNow(cell); } else { prevCell = null; if (iTimerID) window.clearTimeout(iTimerID); iTimerID = window.setTimeout(showTipTimer, delay); } } function showTipTimer() { iTimerID = null; showTipNow(curCell); } function hideTip() { if (iTimerID) { window.clearTimeout(iTimerID); iTimerID = null; } document.getElementById('balloon_tooltip').style.display = 'none'; bObj = false; }