//
// AUTO-GENERATED FILE - DO NOT EDIT!!!
//  9:11:07, Tue Oct 20, 2009 (GMT)
//
function setGridStart(nValue){var obj=document.getElementById("selStartTime");if(obj!=null){switch(nValue){case 0:{optionGridStart="-1";if(obj!=null){obj.disabled=true;}obj=document.getElementById("defGridStartFixed");if(obj!=null){obj.checked=false;}break;}case 1:{if(obj!=null){obj.disabled=false;optionGridStart=obj[obj.selectedIndex].value;obj=document.getElementById("defGridStartLocal");if(obj!=null){obj.checked=false;}}break;}}setOptionsChanged();}}function addfav(favImage){var nChan=favImage.id.replace(/^cc/,"");if(favImage.src.indexOf('heart-off')>0){favImage.src=favImage.src.replace(/off/i,"on");var selList=availChannels;if(selList!=null){for(var n=0;n<selList.length;n++){if(nChan==selList[n].value){selList.selectedIndex=n;moveOneChannel(1)}}if(selectChannels.options.length==1){tabHiLite(iCurrentTab);}}}else{favImage.src=favImage.src.replace(/on/i,"off");var selList=selectChannels;if(selList!=null){for(var n=0;n<selList.length;n++){if(nChan==selList[n].value){selList.selectedIndex=n;moveOneChannel(0)}}if(selectChannels.options.length<=0){tabHiLite(iCurrentTab);}}}setChannelsCookie(selectChannels);}function addch(theCheckbox){var nChan=theCheckbox.id.replace(/^cc/,"");if(theCheckbox.checked){var selList=availChannels;if(selList!=null){for(var n=0;n<selList.length;n++){if(nChan==selList[n].value){selList.selectedIndex=n;moveOneChannel(1)}}}}else{var selList=selectChannels;if(selList!=null){for(var n=0;n<selList.length;n++){if(nChan==selList[n].value){selList.selectedIndex=n;moveOneChannel(0)}}}}setChannelsCookie(selectChannels);}function closeOptions(nOpt){objGenreSelect.value=iLastGenreValue;doOptionsTab(nOpt);if(bOptionsChanged){var oldMusic=optionShowMusic;optionShowMusic=isOptionChecked("chkShowMusic", optionShowMusic);if(optionShowMusic){paramSuppressMusic=0;}else{paramSuppressMusic=1;}var oldPPV=optionShowPPV;optionShowPPV=isOptionChecked("chkShowPPV", optionShowPPV);if(optionShowPPV){paramSuppressPPV=0;}else{paramSuppressPPV=1;}var old24Hour=optionShow24Hour;optionShow24Hour=isOptionChecked("chkShow24Hour", optionShow24Hour);if(optionShow24Hour){paramSuppress24Hour=0;}else{paramSuppress24Hour=1;}optionEnableGridSelect=isOptionChecked("chkEnableGridSelect", optionEnableGridSelect);optionTruncateText=isOptionChecked("chkTruncateText", optionTruncateText);optionHideIcons=isOptionChecked("chkHideIcons", optionHideIcons);optionTimebarRepeat=getSelectListValue("selTimebarRepeat", optionTimebarRepeat);optionDisableFlyovers=isOptionChecked("chkDisableFlyovers", optionDisableFlyovers);optionPopNewWindows=isOptionChecked("chkPopNewWindows", optionPopNewWindows);optionDontUseGoButton=isOptionChecked("chkDontUseGoButton", optionDontUseGoButton);toggleGoButton(optionDontUseGoButton);if(isOptionChecked("gridExpand", !optionScrollGrid)){optionScrollGrid=false;iGridScrollTop=-1;}else{optionScrollGrid=true;var gridHeightPx=document.getElementById("selGridHeightPx");if(gridHeightPx!=null){optionGridHeightPx=gridHeightPx.value;}}var selChans=objSelectedChannelsCombo;if(selChans.length>0){if(bFilterChanged){optionFavChannels=true;bFilterChanged=false;optionGenreFilter=0;iLastGenreValue=1;}setChannelsCookie(selChans);}else{optionFavChannels=false;deleteCookie(cookieSelectedChannels+iServiceID);}showLoadingScreen();optionGridMinutes=getSelectListValue("timespanSelect", iGridSpanMinutes);if((optionGridMinutes!=iGridSpanMinutes)||(oldMusic!=optionShowMusic)||(oldPPV!=optionShowPPV)||(old24Hour!=optionShow24Hour)){paramGridMins=optionGridMinutes;saveCookieOptions();if(iCurrentTab!=7){reloadGrid();}}else{saveCookieOptions();if(iCurrentTab!=7){setTimeout("drawListings()", 1);}}}}function setOptionsChanged(){bOptionsChanged=true;}function moveOneChannel(iDirection){var source=null;var target=null;switch(iDirection){case 0: source=selectChannels;target=availChannels;break;case 1: source=availChannels;target=selectChannels;break;}if(!((source!=null)&&(target!=null))){alert("Error: Source or Target is NULL");}var index=source.selectedIndex;if(index<0){alert('nothing selected!');return false;}var newIndex=index;for(index;index<source.length;index++){if(source.options[index].selected==true){var added=false;var iLastIndex=target.length;var newElem=document.createElement("OPTION");newElem.text=source.options[index].text;newElem.value=source.options[index].value;var n=0;for(n=0;n<target.length;n++){if(parseInt(newElem.value,10)< parseInt(target[n].value,10)){if(isIE){target.options.add(newElem, n);}else{target.add(newElem, target.options[n]);}n=target.length+1;added=true;}}if(!added){if(isIE){target.options.add(newElem);}else{target.add(newElem, null);}}source.remove(index);newIndex=index;if(index>=0){index--;}}}if(newIndex<source.length){source.selectedIndex=newIndex;}else{source.selectedIndex=source.length-1;}setOptionsChanged();bFilterChanged=true;return false;}function moveAllChannels(iDirection){var source=null;switch(iDirection){case 0: source=selectChannels;break;case 1: source=availChannels;break;}if(source.length>0){if(iDirection==0){if(!confirm("Are you sure you want to clear all your selected channels? This action is not reversible! If you choose OK, you will need to re-select your preferred channels again.")){return false;}}source.selectedIndex=source.length-1;while(source.length>0){moveOneChannel(iDirection);source.selectedIndex=source.length-1;}}return false;}function xmlPrefsDataEvent(){if(xmlPrefsData.readyState==4 || xmlPrefsData.readyState=="complete"){}}
