//
// AUTO-GENERATED FILE - DO NOT EDIT!!!
//  11:27:14, Fri Dec 11, 2009 (GMT)
//
function setDateTimeSelect(dt){var objSelect=document.getElementById("dateSelect");var strSelection="";if(objSelect!=null){strSelection=dt.getFullYear()+","+(dt.getMonth()+1)+","+dt.getDate();objSelect.value=strSelection;}objSelect=document.getElementById("timeSelect");if(objSelect!=null){strSelection=dt.getHours()+":" ;strSelection+=formatInt(dt.getMinutes(),2);objSelect.value=strSelection;}}function useGridCache(nSID){for(var n=0;n<cachedProviders.length;n++){if(nSID==cachedProviders[n]){return true;}}return false;}function getSelectListValue(strListName, boolDefault){var list=document.getElementById(strListName);if(list!=null){return list[list.selectedIndex].value;}return boolDefault;}function getSelectListIndex(strListName){var list=document.getElementById(strListName);if(list!=null){return list.selectedIndex;}return-1;}function readChannelsCookie(){rawChannelsCookie=readCookie(cookieSelectedChannels+iServiceID);if(rawChannelsCookie!=null){arSelectedChannels=rawChannelsCookie.split("|");if(arSelectedChannels.length>0){return;}}arSelectedChannels=null;optionFavChannels=false;objGenreSelect.selectedIndex=0;}function getQueryParam(strQuery, strName){var u,i;u=strQuery+"";i=u.indexOf(strName+"=",0);if(i>=0){i+=strName.length+1;var n=u.indexOf('&',i);if(n>i){return unescape(u.substring(i,n));}else if(i<u.length){return unescape(u.substring(i));}}return "";}function isSelectedChannel(iSrcID, strChannelNum){var tmpSelChan=iSrcID+"_"+strChannelNum;if(forceOptionsCreate){if(arSelectedChannels!=null){for(var n=0;n<arSelectedChannels.length;n++){var sc=arSelectedChannels[n].split('_');if(sc.length>1){if(tmpSelChan==arSelectedChannels[n]){return true;}}else{if(iSrcID==arSelectedChannels[n]){return true;}}}}return false;}else{var selList=objSelectedChannelsCombo;if(selList!=null){for(var n=iLastFilterMatch;n<selList.length;n++){var str=selList.options[n].value;var opt=str.split("|");if(tmpSelChan==(opt[colSource]+"_"+opt[colNumber])){iLastFilterMatch=n;return true;}if(n >=parseInt(opt[colSort],10)){iLastFilterMatch=n;return false;}}return false;}return false;}}function isSpecialRow(oRowData){switch(magicIDtype){case 1: if(oRowData[colNetworkID]==magicSourceID){return true;}break;default: if(oRowData[colSourceID]==magicSourceID){return true;}break;}return false;}function gotoMagicUrl(){window.open(magicLink);}function getDateStub(dt){return formatInt(dt.getMonth()+1,2)+'/'+formatInt(dt.getDate(),2);}function fixQueryString(qs){qs=qs.replace(/%3D/gi,"=");qs=qs.replace(/%26/gi,"&");return qs;}function getBooleanInt(bool){if(bool){return 1;}return 0;}function intToBool(i){if(parseInt(i,10)!=0){return true;}return false;}function setSelectByValue(strID, strValue){var o=document.getElementById(strID);if(o!=null){for(var n=0;n<o.options.length;n++){if(o.options[n].value==strValue){o.selectedIndex=n;return;}}}}function setCheckbox(strID, bChecked){var o=document.getElementById(strID);if(o!=null){o.checked=bChecked;}}function formatInt(iValue,iDigits){iValue=''+iValue;while(iValue.length<iDigits){iValue='0'+iValue;}return iValue;}function formatTime(dt){var hour=dt.getHours();var AmPm="am";if(hour==0){hour=12;}else{if(hour>=12){AmPm="pm";if(hour>12){hour-=12;}}}var mins=formatInt(dt.getMinutes(),2);return hour+":"+mins+AmPm;}function getDateFromParam(str){return new Date(parseInt(str.substring(0,4),10),parseInt(str.substring(4,6),10)-1,parseInt(str.substring(6,8),10),parseInt(str.substring(8,10),10),parseInt(str.substring(10,12),10),0);}function isOptionChecked(strOptionName, boolDefault){var chkBox=document.getElementById(strOptionName);if(chkBox!=null){return chkBox.checked;}return boolDefault;}function isOptionsVisible(){var optsDiv=document.getElementById("GridOptsDiv");if(optsDiv!=null){if(optsDiv.style.display !="none"){return true;}}optsDiv=document.getElementById("FavChansDiv");if(optsDiv !=null){if(optsDiv.style.display !="none"){return true;}}return false;}function disableSelect(obj){if(typeof obj.onselectstart!="undefined"){obj.onselectstart=function(){return false;};}else if(typeof obj.style.MozUserSelect!="undefined"){obj.style.MozUserSelect="none";}}
