Online TV
Online Radio Rambler
Автор: LambaDa
<DIV align=center><IMG alt="" src="http://tv.ne7.eu/telek.jpeg" border=0></DIV>
<DIV align=center><SELECT name=href onchange="sel(this.value);"> <OPTION value="" selected>Переключатиль каналов
<OPTION value=http://music.rtvi.ru/bin/asx.pl?br=medium>RTVI Муз ТВ
<OPTION value=mms://38.99.140.151/rtd/brt/ch10.asf>РЕН-ТВ
<OPTION value=mms://video.rfn.ru/rtr-planeta>РТР Планета
<OPTION value=http://www.rambler-audio.ru/asx/video/special/eurosportnews/eurosport.asx>EuroSportRu
<OPTION value=mms://tv.gldn.net/A1>A-ONE
<OPTION value=http://www.webtelek.com/media/mirtv300.asx>МИР ТВ
<OPTION value=mms://194.135.105.209/tv1>WIM1
<OPTION value=mms://194.135.105.209/tv2>WIM2
<OPTION value=mms://194.135.105.209/tv3>WIM3
<OPTION value=mms://194.135.105.209/tv4>WIM4
<OPTION value=mms://video.rfn.ru/vesti_24>Вести
<OPTION value=http://www.kulturatv.kiev.ua/Kultura-EU.asx>Культура ТВ
<OPTION value=http://live.1internet.tv/live-efir?wmbitrate=500000>ОРТ ТВ
<OPTION value=mms://195.244.137.207:81>ПБК Музыкальный
<OPTION value=mms://213.232.226.11/MIRTV_300>Мир ТВ
<OPTION value=mms://www.sgatv.muh.ru/sgutv>СГУ ТВ
<OPTION value=mms://194.58.79.189/PublishingPoint%20wTv>W-TV
<OPTION value=mms://38.100.138.222/max-online>МАКС ТВ
<OPTION value=mms://video.corbina.tv/live>"Живое ТВ"
<OPTION value=mms://mms.amtv.ru/BizOne>Бизнес ТВ
<OPTION value=mms://stream.grafton.lv/live_tv5>TV5 Латвия
<OPTION value=http://on-tv.ru/asx/tv_id642.asx>Первый документальный
<OPTION value=mms://media.stv.lv/stvsport>STV Sport
<OPTION value=mms://media.stv.lv/stvclip2>STV Music
<OPTION value=http://webteleradio.com/tv/one.wpl>Первый музыкальный
<OPTION value=http://video.rutube.ru/online/698129.flv>Шансон ТВ
<OPTION value=http://www.disco80.ru/discotv.php>Дискотека 80-х
<OPTION value=http://media.wnet.ua/lists/24.asx>24-й канал
<OPTION value=http://www.tvr.by/liveair/btv.asx>Беларусь ТВ
<OPTION value=http://www.1tv.ru/owa/win/ort6_itv.asx_file_z?p_ch=1tvsport&p_bt=100>Спорт на Первом
<OPTION value=http://cluster.quantumart.ru/broadcast/default.aspx?media=rutv>RU ТV
<OPTION value=http://www.mtk-twins.ru/intensiv/at0/BAR.wmv>Интенсивное обучение
<OPTION value=http://www.1tv.ru/owa/win/ort6_itv.asx_file_z?p_ch=1tvbest&p_bt=500>Лучшее на Первом
<OPTION value=http://www.1tv.ru/owa/win/ort6_itv.asx_file_z?p_ch=fz&p_bt=500>Фабрика звёзд
<OPTION value=mms://212.1.238.70/ts_tv1>Твой Строй ТВ
<OPTION value=http://video.rutube.ru/online/618784.flv>Союз
<OPTION value=http://tv.sr.ru/testtv.asx>Центр
<OPTION value=http://www.tvr.by/liveair/btv.asx>СРТВ
<OPTION value=mms://63.218.83.51/MaksTv>МаксТВ
<OPTION value=mms://194.58.79.189/PublishingPoint wTv>ВТВ
<OPTION value=http://video.rutube.ru/online/157933.flv>ТДК
<OPTION value=mms://81.13.20.10/sr_video>Специальное Радио
<OPTION value=mms://media.caucasus.net/station7>Детский мир
<OPTION value=mms://media.caucasus.net/station5>Наше новое кино
<OPTION value=http://on-tv.ru/asx/tv_id10.asx>Муз ТВ
</OPTION></SELECT> </DIV>
<DIV id=mus align=center></DIV><script>
function sel(href){
if(href=='') mus.innerHTML="";
else mus.innerHTML="<EMBED type=application/x-mplayer2 src="+href+" width=452 height=388>";
}
sel('');
</script>
<DIV align=center><SELECT name=href onchange="sel(this.value);"> <OPTION value="" selected>Переключатиль каналов
<OPTION value=http://music.rtvi.ru/bin/asx.pl?br=medium>RTVI Муз ТВ
<OPTION value=mms://38.99.140.151/rtd/brt/ch10.asf>РЕН-ТВ
<OPTION value=mms://video.rfn.ru/rtr-planeta>РТР Планета
<OPTION value=http://www.rambler-audio.ru/asx/video/special/eurosportnews/eurosport.asx>EuroSportRu
<OPTION value=mms://tv.gldn.net/A1>A-ONE
<OPTION value=http://www.webtelek.com/media/mirtv300.asx>МИР ТВ
<OPTION value=mms://194.135.105.209/tv1>WIM1
<OPTION value=mms://194.135.105.209/tv2>WIM2
<OPTION value=mms://194.135.105.209/tv3>WIM3
<OPTION value=mms://194.135.105.209/tv4>WIM4
<OPTION value=mms://video.rfn.ru/vesti_24>Вести
<OPTION value=http://www.kulturatv.kiev.ua/Kultura-EU.asx>Культура ТВ
<OPTION value=http://live.1internet.tv/live-efir?wmbitrate=500000>ОРТ ТВ
<OPTION value=mms://195.244.137.207:81>ПБК Музыкальный
<OPTION value=mms://213.232.226.11/MIRTV_300>Мир ТВ
<OPTION value=mms://www.sgatv.muh.ru/sgutv>СГУ ТВ
<OPTION value=mms://194.58.79.189/PublishingPoint%20wTv>W-TV
<OPTION value=mms://38.100.138.222/max-online>МАКС ТВ
<OPTION value=mms://video.corbina.tv/live>"Живое ТВ"
<OPTION value=mms://mms.amtv.ru/BizOne>Бизнес ТВ
<OPTION value=mms://stream.grafton.lv/live_tv5>TV5 Латвия
<OPTION value=http://on-tv.ru/asx/tv_id642.asx>Первый документальный
<OPTION value=mms://media.stv.lv/stvsport>STV Sport
<OPTION value=mms://media.stv.lv/stvclip2>STV Music
<OPTION value=http://webteleradio.com/tv/one.wpl>Первый музыкальный
<OPTION value=http://video.rutube.ru/online/698129.flv>Шансон ТВ
<OPTION value=http://www.disco80.ru/discotv.php>Дискотека 80-х
<OPTION value=http://media.wnet.ua/lists/24.asx>24-й канал
<OPTION value=http://www.tvr.by/liveair/btv.asx>Беларусь ТВ
<OPTION value=http://www.1tv.ru/owa/win/ort6_itv.asx_file_z?p_ch=1tvsport&p_bt=100>Спорт на Первом
<OPTION value=http://cluster.quantumart.ru/broadcast/default.aspx?media=rutv>RU ТV
<OPTION value=http://www.mtk-twins.ru/intensiv/at0/BAR.wmv>Интенсивное обучение
<OPTION value=http://www.1tv.ru/owa/win/ort6_itv.asx_file_z?p_ch=1tvbest&p_bt=500>Лучшее на Первом
<OPTION value=http://www.1tv.ru/owa/win/ort6_itv.asx_file_z?p_ch=fz&p_bt=500>Фабрика звёзд
<OPTION value=mms://212.1.238.70/ts_tv1>Твой Строй ТВ
<OPTION value=http://video.rutube.ru/online/618784.flv>Союз
<OPTION value=http://tv.sr.ru/testtv.asx>Центр
<OPTION value=http://www.tvr.by/liveair/btv.asx>СРТВ
<OPTION value=mms://63.218.83.51/MaksTv>МаксТВ
<OPTION value=mms://194.58.79.189/PublishingPoint wTv>ВТВ
<OPTION value=http://video.rutube.ru/online/157933.flv>ТДК
<OPTION value=mms://81.13.20.10/sr_video>Специальное Радио
<OPTION value=mms://media.caucasus.net/station7>Детский мир
<OPTION value=mms://media.caucasus.net/station5>Наше новое кино
<OPTION value=http://on-tv.ru/asx/tv_id10.asx>Муз ТВ
</OPTION></SELECT> </DIV>
<DIV id=mus align=center></DIV><script>
function sel(href){
if(href=='') mus.innerHTML="";
else mus.innerHTML="<EMBED type=application/x-mplayer2 src="+href+" width=452 height=388>";
}
sel('');
</script>
Online Radio Rambler
<DIV align=center><IMG alt="" src="http://ne7.eu/templates/x40/images/radio22.jpg" border=0></DIV>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Rambler Audio</title>
<link rel="stylesheet" type="text/css" media="all" href="http://audio.rambler.ru/i/player/radio.css">
<meta http-equiv=Content-Type content="text/html; charset=win-1251">
<script type="text/javascript">if(escape('а')!='%u0430') { var cs_i2=new Image; cs_i2.src='http://err.rambler.ru/cs/'; }function globalCsChErr(a,b,c) {var i=new Image; i.src='http://err.rambler.ru/js/?'+escape(a)+','+escape(b)+','+escape(c)+'/'; return true;}window.onerror=globalCsChErr;</script>
<script type="text/javascript" src="http://audio.rambler.ru/i/js/evnt_wth.js"></script>
<script type="text/javascript" src="http://audio.rambler.ru/i/js/radioplayer.js?v=1"></script>
<script type="text/javascript">
function resizeOnLoad() {
var t = document.body.getElementsByTagName('DIV')[0],
h = typeof innerHeight != 'undefined'? innerHeight: document.documentElement.clientHeight;
//изменяем высоту попап окна,
//если оно ожидаемой высоты (для защиты от изменения размера не попап окна браузера)
// t.offsetHeight >= h && (
h < 300 && window.resizeBy(0, t.offsetHeight - h + 6)
}
</script>
<style id="not4Simple" disabled="true">
.not4Simple {display:none;}
</style>
</head>
<body scroll="no" onload="resizeOnLoad()">
<div>
<div id="logo" class="horizontalBg">
<div class="help">
<!-- a href="http://icq.rambler.ru/notes/184/" target="_blank">Помощь</a -->
</div>
<a class=""
href=""
target="_blank"
title="Rambler-Аудио"
onclick="window[window.opener? 'opener': 'top'].open(this.href, this.target); return false"
></a>
</div>
<div class="imgs prevButton"><div class="imgs" title="Назад"></div></div>
<div class="imgs nextButton"><div class="imgs" title="Вперед"></div></div>
<div id="radioList" class="horizontalBg">
<div class="box">
<ul>
<li></li>
</ul>
</div>
</div>
<div id="panel" class="horizontalBg">
<div class="imgs leftBg"></div>
<div class="imgs rightBg"></div>
<div class="horizontalBg label">В эфире</div>
<div id="radioName"></div>
<div id="playButton" class="imgs control disable"></div>
<div class="horizontalBg delimiter not4Simple"></div>
<div class="imgs volume not4Simple"><div class="imgs" style="margin-left:50%"></div></div>
<div class="horizontalBg delimiter"></div>
<div class="statusBar"><span id="playerState"></span></div>
</div>
</div>
<script>
var radioPlayer,
radioPlayerClass = ( function (listItem) {
var timeCounter, timerId, k, prots;
function closure(obj, bitrate, listItem) {
return function(){
obj.myBitrate = bitrate;
obj.playFromItem(listItem)
}
}
function timeToStr(n) {
var s = '', t = {
'h': Math.floor(n / 3600),
'm': Math.floor(n % 3600 / 60),
's': Math.floor(n % 60)
};
if (t.h) {
s += t.h + ':'
}
t.m < 10 && (s += '0');
s += t.m + ':';
t.s < 10 && (s += '0');
s += t.s;
return s
}
function myPlayerClass(myBitrate) {
this.myBitrate = myBitrate || 64;
}
myPlayerClass.prototype = new GA.WMPlayerClass;
prots = {
'drawListItem': function(listItem) {
var t = 0, k, c, o, n =document.createElement('DIV'), classNode, valueNode;
n.className = 'quality';
n.innerHTML = ' <div class="another"> <div class="imgs topRightAngle"></div> <div class="imgs topLeftAngle"></div> <div class="qualityValue">64KB</div> </div>';
classNode = n.getElementsByTagName('DIV')[0];
valueNode = classNode.getElementsByTagName('DIV')[2];
o = document.getElementById('panel');
c = o.lastChild;
do {
k = c.previousSibling;
if (c.nodeType == 1 && c.className == 'quality') {
o.removeChild(c)
}
c = k
} while (c)
for (k in listItem.bitrates) {
if (k-0 >= this.myBitrate-0) {
t = k;
break
}
}
t == 0 && (t = k);
c = null;
for (k in listItem.bitrates) {
valueNode.innerHTML = k+'KB';
if (k == t) {
classNode.className = 'current';
c = o.insertBefore(n.cloneNode(true), c);
classNode.className = 'another'
} else {
c = o.insertBefore(n.cloneNode(true), c);
c.onclick = closure(this, k ,listItem)
}
}
o = document.getElementById('radioName');
o.innerHTML = listItem.name;
return t
},
'showTime': function() {
var n = document.getElementById('playerState');
if (!n) return;
n.innerHTML = timeToStr(this.playerObject.controls.currentPosition)
},
'showTimeSimple': function() {
var n = document.getElementById('playerState');
timeCounter++;
if (!n) return;
n.innerHTML = timeToStr(timeCounter)
},
'setSimpleMode': function(url) {
GA.WMPlayerClass.prototype.setSimpleMode.call(this, url);
myPlayerClass.prototype.showTime = myPlayerClass.prototype.showTimeSimple;
document.getElementById('not4Simple').disabled = false;
},
'playStateChange': function(NewState) {
var n = document.getElementById('playerState');
if(n) {
n.innerHTML = [
'Неопределенно',
'Стоп',
'Пауза',
'Воспроизведение',
'Вперед',
'Назад',
'Загрузка',
'Ожидание',
'Закончено',
'Соединение',
'Готово',
'Перезагрузка'
][NewState];//'d>];
this.state = NewState;
}
if (typeof timerId != 'undefined') {
window.clearInterval(timerId)
}
n = document.getElementById('playButton');
if (NewState == 3) {
timeCounter = 0;
timerId = window.setInterval((function(obj){return function(){obj.showTime()}})(this), 1000);
n && (n.className = n.className.replace(/(^|s)(?:play|disable)(s|$)/, '$1pause$2'))
} else {
n && (n.className = n.className.replace(/(^|s)(?:pause|disable)(s|$)/, '$1play$2'))
}
},
'playFromItem': function(listItem) {
var t, v='http://audio.rambler.ru/?from=', url = listItem.bitrates[
this.drawListItem(listItem)
];
this.playFromURL(url);
v+=(
window.location.host.indexOf('assist')!=-1?
'assist':
window.location.search.indexOf('bld=')!=-1?
'icq':
'audio'
)+'&station='+listItem.id;
(new Image).src=v;
this.saveCookie(this.myBitrate, 3, /(d+)$/.exec(url)[1]);
},
'saveCookie': function (bitrate, state, urlId) {
var t = new Date();
t.setDate(365);
urlId && (this.lastUrlId = urlId);
t ='current_radio='+this.lastUrlId+'|'+bitrate+
'|'+state+
'; expires='+ t.toGMTString()+
'; domain='+window.location.hostname;
document.cookie = t;
}
};
for (k in prots) {
myPlayerClass.prototype[k] = prots[k]
}
return myPlayerClass;
} )();
(function(){
function closure(obj, methodName, removeMethod,pm) {
return function(){
if (removeMethod) {
this[removeMethod] = null
}
obj[methodName](this,pm||0)
}
}
/**
* вычислитель растояний промотки
* @param {GA.Dynamic} t
* @param {HTMLElement} o елемент хранящий прокручиваемые блоки
* @param {Boolean|Number} p
* <b>true</b>:промотать на один елемент вперет,<br>
* <b>false</b>:назат,<br>
* иначе промотать в центр болк с заданным <b>порядковым номером</b>
*/
function c(t,o,p){
var a=o.getElementsByTagName('LI'),k,w=a.length-1,i=p?0:w,d='offsetWidth',s='offsetLeft';
if(typeof p == 'undefined'){p=0}
if(p===!0||p===!1){
if(p==!0)
while(i<w && a[i][s]-t.to<=0){i++}
else
while(i && a[i][s]-t.to>=0){i--};
p=a[i][s];
}else{
p=a[p][s]-((o[d]-a[p][d])>>1);
p<0&&(p=0)
}
t.from=o.scrollLeft;
k=a[w][d]+a[w][s]-o[d];
t.to=(k>0&&p>k)?k:p;
if (t.to<k) {
!/(?:^|s)active(?:s|$)/.test(t.oNextButton.className) &&
(t.oNextButton.className += ' active')
} else {
t.oNextButton.className = t.oNextButton.className.replace(/(^|s)active(?:s|$)/, '$1')
}
if (t.to>0) {
!/(?:^|s)active(?:s|$)/.test(t.oPrevButton.className) &&
(t.oPrevButton.className += ' active')
} else {
t.oPrevButton.className = t.oPrevButton.className.replace(/(^|s)active(?:s|$)/, '$1')
}
t.playBack=!1;
delete t.current;
t.play()
}
GA.Dynamic=function(){};
GA.Dynamic.closure=(function(c){
return function(o,a,b){
c!==!1&&clearTimeout(c);
t=0;
function f(){
var d=20,l=b-a;
o[o.methodName](o.current=(a+o.type(t/o.duration)*l));
if(t<o.duration){
t+=(d=((l=(o.duration-t))<d?l:d));
c=setTimeout(f,d)
}else{
o.playBack=!o.playBack;
delete o.current;
c=!1
}
};
return f
}
})(!1);
GA.Dynamic.prototype.play=function(){
var t=this,f=GA.Dynamic.closure,a=['from','to'];
if(t.playBack){a=a.reverse()}
a[0]=t[a[0]];a[1]=t[a[1]];
if(typeof t.current=='undefined'){
(f(t,a[0],a[1]))()
}else{
t.playBack=!t.playBack;(f(t,t.current,a[0]))()
}
};
var volume = new GA.eventWatcherClass(['mouseover', 'mousedown', 'mouseup'], '.volume', 'onOver', 'onOut')
volume.onOver = function(node, pos, e) {
var x = 0, t = node;
if(!radioPlayer.playerObject) return
if (e.type == 'mousedown') {
this._mousePressed = node;
}
if (this._mousePressed == node) {
if (document.selection) {
document.selection.empty()
}
while (t && t != document.body) {
x += t.offsetLeft;
t = t.offsetParent
}
x = pos.x-x-7;
x < 0 && (x = 0);
x > 50 && (x = 50);
radioPlayer.setVolume(Math.floor(x * 100 / 50));
node.getElementsByTagName('DIV')[0].style.marginLeft = (x-5)+'px'
}
if (e.type == 'mouseup') {
delete this._mousePressed;
}
};
volume.onOut = function(pos, e) {
if (e.type == 'mouseup') {
delete this._mousePressed;
}
};
/**
* класс_работы_с_горизонтально_прокручиваемым_списком_блоков.
* @param {Object} containerId
*/
GA.listClass = function(containerId, aList) {
if (typeof aList[0] == 'undefined') return;
this.aList = aList;
GA.runMethodWhenNodeExist(this, 'init', 'document.getElementById("'+containerId+'")', []);
}
GA.listClass.prototype = {
'init': function(oNode) {
var evs = {'DOMMouseScroll':{}, 'mousewheel':{}},
o = document.cookie.split(';'), k, t, c={}, i;
//this.currentItem = 0;
while (o.length) {
t = o[o.length-1];
t = t.substr(t.charAt(0)==' '? 1: 0).split('=');
o.length--;
c[t[0]] = t.slice(1).join('')
}
k=document.location.search.slice(1).split('&');
for(i=k.length;i--;){
k[i]=k[i].split('=');
if(k[i][0]=='id'){
i=k[i][1];
break
}
}
o=[typeof c.current_radio != 'undefined',0];
if (o[0] || i!=-1) {
o[0] && (o = c.current_radio.split('|'));
if (i !=-1){
for(k=this.aList.length;k--;){
if(this.aList[k].id==i){
this.currentItem=k;
o[2]=3;
break
}
}
}else{
currentItemFinded:
for (i = this.aList.length; i--; ) {
c = this.aList[i].bitrates;
for (k in c) {
if ((t = /(d+)$/.exec(c[k])) && t[1] == o[0]) {
this.currentItem = i;
break currentItemFinded
}
}
}
}
}
radioPlayer = new radioPlayerClass(
o[1]
);
if (typeof this.currentItem != 'undefined') {
if (typeof o[2] != 'undefined' && o[2] == 3) {
radioPlayer.playFromItem(this.aList[this.currentItem]);
} else {
radioPlayer.drawListItem(this.aList[this.currentItem]);
radioPlayer.playStateChange(1)
}
} else {
// this.currentItem=0
}
radioPlayer.lastUrlId = t[1];
this.oContainer = oNode.getElementsByTagName('UL')[0];
while (
(oNode=oNode.previousSibling) &&
!(
oNode.nodeType == 1 &&
/(?:^|s)nextButton(?:s|$)/.test(oNode.className)
)
);
this.oNextButton = oNode.getElementsByTagName('DIV')[0];
while (
(oNode=oNode.previousSibling) &&
!(
oNode.nodeType == 1 &&
/(?:^|s)prevButton(?:s|$)/.test(oNode.className)
)
);
this.oPrevButton = oNode.getElementsByTagName('DIV')[0];
t=this.oPrevButton;
t.ondblclick=t.onclick = closure(this, 'scrollPrev');
t=this.oNextButton;
t.ondblclick=t.onclick = closure(this, 'scrollNext');
try{
document.links[0].focus();
document.links[0].blur();
}catch(e){}
this.showBlocks();
this.methodIntoEventProcessing('watchMouseScroll', 'mouseover', this.oContainer, evs);
this.methodIntoEventProcessing('unwatchMouseScroll', 'mouseout', this.oContainer, evs);
this.methodIntoEventProcessing('showBlocks', 'resize', window);
GA.eventWatcherClass.call(this, ['click'], '[@id=playButton]', 'clickPlayPause');
/**/
},
'play':GA.Dynamic.prototype.play,
'type':function(p){return 1-Math.sin(Math.acos(p))},
'draw':function(pos){
this.oContainer.parentNode.scrollLeft=Math.round(pos)
},
'duration':110,
'to':0,
'methodName':'draw',
'showBlocks': function() {
var lineTopOffset,
endPosition,
t,
n,
im,
i = 0;
if (!this.oListItemTemplate) {
t = this.oContainer.getElementsByTagName('LI')[0];
this.oListItemTemplate = this.oContainer.removeChild(t);
this.aListItems = [];
for (i = 0, n = this.aList.length; i < n; i++) {
t = this.oListItemTemplate.cloneNode(true);
t.className += ' listItem'+i;
t.title = this.aList[i].name;
im=new Image();
im.alt=this.aList[i].name;
t.appendChild(im);
this.aListItems[i] = this.oContainer.appendChild(t);
this.aListItems[i].onclick = closure(this, 'clickOnListItem');
im.onload = closure(this, 'correctWidth');
im.onerror = closure(this, 'correctWidth');
im.src=this.aList[i].icon;
}
this.correctWidth();
if(typeof this.currentItem != 'undefined'){
this.aListItems[this.currentItem].className += ' current horizontalBg';
c(this,this.oContainer.parentNode,this.currentItem)
}
}
},
'correctWidth':function(){
var a=this.oContainer.getElementsByTagName('LI'),i,s=0;
for(i=a.length;i--;){
s+=a[i].offsetWidth
}
this.oContainer.style.width=s+'px';
c(this,this.oContainer.parentNode,this.currentItem)
},
'scrollPrev': function() {
c(this,this.oContainer.parentNode,!1)
},
'scrollNext': function() {
c(this,this.oContainer.parentNode,!0)
},
'clickOnListItem': function(oNode) {
var n, i='';
if (oNode) {
i = /(?:^|s)listItem(d+)(?:s|$)/.exec(oNode.className)[1];
if (
typeof this.currentItem != 'undefined' &&
i == this.currentItem
) return;
if (typeof this.currentItem != 'undefined' && oNode) {
n = this.aListItems[this.currentItem];
n.className = n.className.replace(/(^|s)current horizontalBg(?:s|$)/, '$1')
}
this.currentItem = i;
!/(?:^|s)current horizontalBg(?:s|$)/.test(oNode.className) &&
(oNode.className += ' current horizontalBg')
}
radioPlayer.playFromItem(this.aList[this.currentItem]);
c(this,this.oContainer.parentNode,this.currentItem)
},
'clickPlayPause': function(oNode, pos, e, evs) {
if(/(?:^|s)disable(?:s|$)/.test(oNode.className))return;
if(!radioPlayer.playerObject) {
typeof this.currentItem != 'undefined' && this.clickOnListItem()
} else {
radioPlayer.playPause();
radioPlayer.saveCookie(
radioPlayer.myBitrate,
(radioPlayer.state==1 || radioPlayer.state==2)? 1: 3
)
}
},
'onMouseScroll': function(oNode, pos, e, evs) {
var delta = e.wheelDelta || -e.detail;
for (var k in evs) {
if (e.type != k) {
GA.eventWatcherClass.removeEventProcessing(k, evs[k], document);
delete evs[k]
}
}
this[delta > 0 ? 'scrollPrev': 'scrollNext']();
},
'watchMouseScroll': function(oNode, pos, e, evs) {
for (var k in evs) {
evs[k] = this.methodIntoEventProcessing(
'onMouseScroll', k, document, evs
);
}
},
'unwatchMouseScroll': function(oNode, pos, e, evs) {
for (var k in evs) {
GA.eventWatcherClass.removeEventProcessing(k, evs[k], document)
}
}
};
for (var k in GA.eventWatcherClass.prototype) {
if (!GA.listClass.prototype[k]) {
GA.listClass.prototype[k] = GA.eventWatcherClass.prototype[k]
}
}
// new GA.listClass('radioList', [])
})();
</script>
<script type="text/javascript" charset="utf-8" src="http://audio.rambler.ru/ajax/stations.js"></script>
<span class="counter"><!-- assist counter --><!-- begin of Top100 code --><script type="text/javascript" src="http://counter.rambler.ru/top100.jcn?215197"></script><noscript><img src="http://counter.rambler.ru/top100.cnt?215197" alt="Rambler's Top100 Service" width="1" height="1" border="0" /></noscript><!-- end of Top100 code --><img src="http://www.tns-counter.ru/V13a****rambler_ru/ru/CP1251/tmsec=rambler_audio/" width="1" height="1" alt=""/><br>
</span>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Rambler Audio</title>
<link rel="stylesheet" type="text/css" media="all" href="http://audio.rambler.ru/i/player/radio.css">
<meta http-equiv=Content-Type content="text/html; charset=win-1251">
<script type="text/javascript">if(escape('а')!='%u0430') { var cs_i2=new Image; cs_i2.src='http://err.rambler.ru/cs/'; }function globalCsChErr(a,b,c) {var i=new Image; i.src='http://err.rambler.ru/js/?'+escape(a)+','+escape(b)+','+escape(c)+'/'; return true;}window.onerror=globalCsChErr;</script>
<script type="text/javascript" src="http://audio.rambler.ru/i/js/evnt_wth.js"></script>
<script type="text/javascript" src="http://audio.rambler.ru/i/js/radioplayer.js?v=1"></script>
<script type="text/javascript">
function resizeOnLoad() {
var t = document.body.getElementsByTagName('DIV')[0],
h = typeof innerHeight != 'undefined'? innerHeight: document.documentElement.clientHeight;
//изменяем высоту попап окна,
//если оно ожидаемой высоты (для защиты от изменения размера не попап окна браузера)
// t.offsetHeight >= h && (
h < 300 && window.resizeBy(0, t.offsetHeight - h + 6)
}
</script>
<style id="not4Simple" disabled="true">
.not4Simple {display:none;}
</style>
</head>
<body scroll="no" onload="resizeOnLoad()">
<div>
<div id="logo" class="horizontalBg">
<div class="help">
<!-- a href="http://icq.rambler.ru/notes/184/" target="_blank">Помощь</a -->
</div>
<a class=""
href=""
target="_blank"
title="Rambler-Аудио"
onclick="window[window.opener? 'opener': 'top'].open(this.href, this.target); return false"
></a>
</div>
<div class="imgs prevButton"><div class="imgs" title="Назад"></div></div>
<div class="imgs nextButton"><div class="imgs" title="Вперед"></div></div>
<div id="radioList" class="horizontalBg">
<div class="box">
<ul>
<li></li>
</ul>
</div>
</div>
<div id="panel" class="horizontalBg">
<div class="imgs leftBg"></div>
<div class="imgs rightBg"></div>
<div class="horizontalBg label">В эфире</div>
<div id="radioName"></div>
<div id="playButton" class="imgs control disable"></div>
<div class="horizontalBg delimiter not4Simple"></div>
<div class="imgs volume not4Simple"><div class="imgs" style="margin-left:50%"></div></div>
<div class="horizontalBg delimiter"></div>
<div class="statusBar"><span id="playerState"></span></div>
</div>
</div>
<script>
var radioPlayer,
radioPlayerClass = ( function (listItem) {
var timeCounter, timerId, k, prots;
function closure(obj, bitrate, listItem) {
return function(){
obj.myBitrate = bitrate;
obj.playFromItem(listItem)
}
}
function timeToStr(n) {
var s = '', t = {
'h': Math.floor(n / 3600),
'm': Math.floor(n % 3600 / 60),
's': Math.floor(n % 60)
};
if (t.h) {
s += t.h + ':'
}
t.m < 10 && (s += '0');
s += t.m + ':';
t.s < 10 && (s += '0');
s += t.s;
return s
}
function myPlayerClass(myBitrate) {
this.myBitrate = myBitrate || 64;
}
myPlayerClass.prototype = new GA.WMPlayerClass;
prots = {
'drawListItem': function(listItem) {
var t = 0, k, c, o, n =document.createElement('DIV'), classNode, valueNode;
n.className = 'quality';
n.innerHTML = ' <div class="another"> <div class="imgs topRightAngle"></div> <div class="imgs topLeftAngle"></div> <div class="qualityValue">64KB</div> </div>';
classNode = n.getElementsByTagName('DIV')[0];
valueNode = classNode.getElementsByTagName('DIV')[2];
o = document.getElementById('panel');
c = o.lastChild;
do {
k = c.previousSibling;
if (c.nodeType == 1 && c.className == 'quality') {
o.removeChild(c)
}
c = k
} while (c)
for (k in listItem.bitrates) {
if (k-0 >= this.myBitrate-0) {
t = k;
break
}
}
t == 0 && (t = k);
c = null;
for (k in listItem.bitrates) {
valueNode.innerHTML = k+'KB';
if (k == t) {
classNode.className = 'current';
c = o.insertBefore(n.cloneNode(true), c);
classNode.className = 'another'
} else {
c = o.insertBefore(n.cloneNode(true), c);
c.onclick = closure(this, k ,listItem)
}
}
o = document.getElementById('radioName');
o.innerHTML = listItem.name;
return t
},
'showTime': function() {
var n = document.getElementById('playerState');
if (!n) return;
n.innerHTML = timeToStr(this.playerObject.controls.currentPosition)
},
'showTimeSimple': function() {
var n = document.getElementById('playerState');
timeCounter++;
if (!n) return;
n.innerHTML = timeToStr(timeCounter)
},
'setSimpleMode': function(url) {
GA.WMPlayerClass.prototype.setSimpleMode.call(this, url);
myPlayerClass.prototype.showTime = myPlayerClass.prototype.showTimeSimple;
document.getElementById('not4Simple').disabled = false;
},
'playStateChange': function(NewState) {
var n = document.getElementById('playerState');
if(n) {
n.innerHTML = [
'Неопределенно',
'Стоп',
'Пауза',
'Воспроизведение',
'Вперед',
'Назад',
'Загрузка',
'Ожидание',
'Закончено',
'Соединение',
'Готово',
'Перезагрузка'
][NewState];//'d>];
this.state = NewState;
}
if (typeof timerId != 'undefined') {
window.clearInterval(timerId)
}
n = document.getElementById('playButton');
if (NewState == 3) {
timeCounter = 0;
timerId = window.setInterval((function(obj){return function(){obj.showTime()}})(this), 1000);
n && (n.className = n.className.replace(/(^|s)(?:play|disable)(s|$)/, '$1pause$2'))
} else {
n && (n.className = n.className.replace(/(^|s)(?:pause|disable)(s|$)/, '$1play$2'))
}
},
'playFromItem': function(listItem) {
var t, v='http://audio.rambler.ru/?from=', url = listItem.bitrates[
this.drawListItem(listItem)
];
this.playFromURL(url);
v+=(
window.location.host.indexOf('assist')!=-1?
'assist':
window.location.search.indexOf('bld=')!=-1?
'icq':
'audio'
)+'&station='+listItem.id;
(new Image).src=v;
this.saveCookie(this.myBitrate, 3, /(d+)$/.exec(url)[1]);
},
'saveCookie': function (bitrate, state, urlId) {
var t = new Date();
t.setDate(365);
urlId && (this.lastUrlId = urlId);
t ='current_radio='+this.lastUrlId+'|'+bitrate+
'|'+state+
'; expires='+ t.toGMTString()+
'; domain='+window.location.hostname;
document.cookie = t;
}
};
for (k in prots) {
myPlayerClass.prototype[k] = prots[k]
}
return myPlayerClass;
} )();
(function(){
function closure(obj, methodName, removeMethod,pm) {
return function(){
if (removeMethod) {
this[removeMethod] = null
}
obj[methodName](this,pm||0)
}
}
/**
* вычислитель растояний промотки
* @param {GA.Dynamic} t
* @param {HTMLElement} o елемент хранящий прокручиваемые блоки
* @param {Boolean|Number} p
* <b>true</b>:промотать на один елемент вперет,<br>
* <b>false</b>:назат,<br>
* иначе промотать в центр болк с заданным <b>порядковым номером</b>
*/
function c(t,o,p){
var a=o.getElementsByTagName('LI'),k,w=a.length-1,i=p?0:w,d='offsetWidth',s='offsetLeft';
if(typeof p == 'undefined'){p=0}
if(p===!0||p===!1){
if(p==!0)
while(i<w && a[i][s]-t.to<=0){i++}
else
while(i && a[i][s]-t.to>=0){i--};
p=a[i][s];
}else{
p=a[p][s]-((o[d]-a[p][d])>>1);
p<0&&(p=0)
}
t.from=o.scrollLeft;
k=a[w][d]+a[w][s]-o[d];
t.to=(k>0&&p>k)?k:p;
if (t.to<k) {
!/(?:^|s)active(?:s|$)/.test(t.oNextButton.className) &&
(t.oNextButton.className += ' active')
} else {
t.oNextButton.className = t.oNextButton.className.replace(/(^|s)active(?:s|$)/, '$1')
}
if (t.to>0) {
!/(?:^|s)active(?:s|$)/.test(t.oPrevButton.className) &&
(t.oPrevButton.className += ' active')
} else {
t.oPrevButton.className = t.oPrevButton.className.replace(/(^|s)active(?:s|$)/, '$1')
}
t.playBack=!1;
delete t.current;
t.play()
}
GA.Dynamic=function(){};
GA.Dynamic.closure=(function(c){
return function(o,a,b){
c!==!1&&clearTimeout(c);
t=0;
function f(){
var d=20,l=b-a;
o[o.methodName](o.current=(a+o.type(t/o.duration)*l));
if(t<o.duration){
t+=(d=((l=(o.duration-t))<d?l:d));
c=setTimeout(f,d)
}else{
o.playBack=!o.playBack;
delete o.current;
c=!1
}
};
return f
}
})(!1);
GA.Dynamic.prototype.play=function(){
var t=this,f=GA.Dynamic.closure,a=['from','to'];
if(t.playBack){a=a.reverse()}
a[0]=t[a[0]];a[1]=t[a[1]];
if(typeof t.current=='undefined'){
(f(t,a[0],a[1]))()
}else{
t.playBack=!t.playBack;(f(t,t.current,a[0]))()
}
};
var volume = new GA.eventWatcherClass(['mouseover', 'mousedown', 'mouseup'], '.volume', 'onOver', 'onOut')
volume.onOver = function(node, pos, e) {
var x = 0, t = node;
if(!radioPlayer.playerObject) return
if (e.type == 'mousedown') {
this._mousePressed = node;
}
if (this._mousePressed == node) {
if (document.selection) {
document.selection.empty()
}
while (t && t != document.body) {
x += t.offsetLeft;
t = t.offsetParent
}
x = pos.x-x-7;
x < 0 && (x = 0);
x > 50 && (x = 50);
radioPlayer.setVolume(Math.floor(x * 100 / 50));
node.getElementsByTagName('DIV')[0].style.marginLeft = (x-5)+'px'
}
if (e.type == 'mouseup') {
delete this._mousePressed;
}
};
volume.onOut = function(pos, e) {
if (e.type == 'mouseup') {
delete this._mousePressed;
}
};
/**
* класс_работы_с_горизонтально_прокручиваемым_списком_блоков.
* @param {Object} containerId
*/
GA.listClass = function(containerId, aList) {
if (typeof aList[0] == 'undefined') return;
this.aList = aList;
GA.runMethodWhenNodeExist(this, 'init', 'document.getElementById("'+containerId+'")', []);
}
GA.listClass.prototype = {
'init': function(oNode) {
var evs = {'DOMMouseScroll':{}, 'mousewheel':{}},
o = document.cookie.split(';'), k, t, c={}, i;
//this.currentItem = 0;
while (o.length) {
t = o[o.length-1];
t = t.substr(t.charAt(0)==' '? 1: 0).split('=');
o.length--;
c[t[0]] = t.slice(1).join('')
}
k=document.location.search.slice(1).split('&');
for(i=k.length;i--;){
k[i]=k[i].split('=');
if(k[i][0]=='id'){
i=k[i][1];
break
}
}
o=[typeof c.current_radio != 'undefined',0];
if (o[0] || i!=-1) {
o[0] && (o = c.current_radio.split('|'));
if (i !=-1){
for(k=this.aList.length;k--;){
if(this.aList[k].id==i){
this.currentItem=k;
o[2]=3;
break
}
}
}else{
currentItemFinded:
for (i = this.aList.length; i--; ) {
c = this.aList[i].bitrates;
for (k in c) {
if ((t = /(d+)$/.exec(c[k])) && t[1] == o[0]) {
this.currentItem = i;
break currentItemFinded
}
}
}
}
}
radioPlayer = new radioPlayerClass(
o[1]
);
if (typeof this.currentItem != 'undefined') {
if (typeof o[2] != 'undefined' && o[2] == 3) {
radioPlayer.playFromItem(this.aList[this.currentItem]);
} else {
radioPlayer.drawListItem(this.aList[this.currentItem]);
radioPlayer.playStateChange(1)
}
} else {
// this.currentItem=0
}
radioPlayer.lastUrlId = t[1];
this.oContainer = oNode.getElementsByTagName('UL')[0];
while (
(oNode=oNode.previousSibling) &&
!(
oNode.nodeType == 1 &&
/(?:^|s)nextButton(?:s|$)/.test(oNode.className)
)
);
this.oNextButton = oNode.getElementsByTagName('DIV')[0];
while (
(oNode=oNode.previousSibling) &&
!(
oNode.nodeType == 1 &&
/(?:^|s)prevButton(?:s|$)/.test(oNode.className)
)
);
this.oPrevButton = oNode.getElementsByTagName('DIV')[0];
t=this.oPrevButton;
t.ondblclick=t.onclick = closure(this, 'scrollPrev');
t=this.oNextButton;
t.ondblclick=t.onclick = closure(this, 'scrollNext');
try{
document.links[0].focus();
document.links[0].blur();
}catch(e){}
this.showBlocks();
this.methodIntoEventProcessing('watchMouseScroll', 'mouseover', this.oContainer, evs);
this.methodIntoEventProcessing('unwatchMouseScroll', 'mouseout', this.oContainer, evs);
this.methodIntoEventProcessing('showBlocks', 'resize', window);
GA.eventWatcherClass.call(this, ['click'], '[@id=playButton]', 'clickPlayPause');
/**/
},
'play':GA.Dynamic.prototype.play,
'type':function(p){return 1-Math.sin(Math.acos(p))},
'draw':function(pos){
this.oContainer.parentNode.scrollLeft=Math.round(pos)
},
'duration':110,
'to':0,
'methodName':'draw',
'showBlocks': function() {
var lineTopOffset,
endPosition,
t,
n,
im,
i = 0;
if (!this.oListItemTemplate) {
t = this.oContainer.getElementsByTagName('LI')[0];
this.oListItemTemplate = this.oContainer.removeChild(t);
this.aListItems = [];
for (i = 0, n = this.aList.length; i < n; i++) {
t = this.oListItemTemplate.cloneNode(true);
t.className += ' listItem'+i;
t.title = this.aList[i].name;
im=new Image();
im.alt=this.aList[i].name;
t.appendChild(im);
this.aListItems[i] = this.oContainer.appendChild(t);
this.aListItems[i].onclick = closure(this, 'clickOnListItem');
im.onload = closure(this, 'correctWidth');
im.onerror = closure(this, 'correctWidth');
im.src=this.aList[i].icon;
}
this.correctWidth();
if(typeof this.currentItem != 'undefined'){
this.aListItems[this.currentItem].className += ' current horizontalBg';
c(this,this.oContainer.parentNode,this.currentItem)
}
}
},
'correctWidth':function(){
var a=this.oContainer.getElementsByTagName('LI'),i,s=0;
for(i=a.length;i--;){
s+=a[i].offsetWidth
}
this.oContainer.style.width=s+'px';
c(this,this.oContainer.parentNode,this.currentItem)
},
'scrollPrev': function() {
c(this,this.oContainer.parentNode,!1)
},
'scrollNext': function() {
c(this,this.oContainer.parentNode,!0)
},
'clickOnListItem': function(oNode) {
var n, i='';
if (oNode) {
i = /(?:^|s)listItem(d+)(?:s|$)/.exec(oNode.className)[1];
if (
typeof this.currentItem != 'undefined' &&
i == this.currentItem
) return;
if (typeof this.currentItem != 'undefined' && oNode) {
n = this.aListItems[this.currentItem];
n.className = n.className.replace(/(^|s)current horizontalBg(?:s|$)/, '$1')
}
this.currentItem = i;
!/(?:^|s)current horizontalBg(?:s|$)/.test(oNode.className) &&
(oNode.className += ' current horizontalBg')
}
radioPlayer.playFromItem(this.aList[this.currentItem]);
c(this,this.oContainer.parentNode,this.currentItem)
},
'clickPlayPause': function(oNode, pos, e, evs) {
if(/(?:^|s)disable(?:s|$)/.test(oNode.className))return;
if(!radioPlayer.playerObject) {
typeof this.currentItem != 'undefined' && this.clickOnListItem()
} else {
radioPlayer.playPause();
radioPlayer.saveCookie(
radioPlayer.myBitrate,
(radioPlayer.state==1 || radioPlayer.state==2)? 1: 3
)
}
},
'onMouseScroll': function(oNode, pos, e, evs) {
var delta = e.wheelDelta || -e.detail;
for (var k in evs) {
if (e.type != k) {
GA.eventWatcherClass.removeEventProcessing(k, evs[k], document);
delete evs[k]
}
}
this[delta > 0 ? 'scrollPrev': 'scrollNext']();
},
'watchMouseScroll': function(oNode, pos, e, evs) {
for (var k in evs) {
evs[k] = this.methodIntoEventProcessing(
'onMouseScroll', k, document, evs
);
}
},
'unwatchMouseScroll': function(oNode, pos, e, evs) {
for (var k in evs) {
GA.eventWatcherClass.removeEventProcessing(k, evs[k], document)
}
}
};
for (var k in GA.eventWatcherClass.prototype) {
if (!GA.listClass.prototype[k]) {
GA.listClass.prototype[k] = GA.eventWatcherClass.prototype[k]
}
}
// new GA.listClass('radioList', [])
})();
</script>
<script type="text/javascript" charset="utf-8" src="http://audio.rambler.ru/ajax/stations.js"></script>
<span class="counter"><!-- assist counter --><!-- begin of Top100 code --><script type="text/javascript" src="http://counter.rambler.ru/top100.jcn?215197"></script><noscript><img src="http://counter.rambler.ru/top100.cnt?215197" alt="Rambler's Top100 Service" width="1" height="1" border="0" /></noscript><!-- end of Top100 code --><img src="http://www.tns-counter.ru/V13a****rambler_ru/ru/CP1251/tmsec=rambler_audio/" width="1" height="1" alt=""/><br>
</span>
</body>
</html>
Автор: LambaDa