var a, b, kuda, carPos = 0;
var Swfplay = document.createElement('iframe');
var osn = document.write('<style type="text/css">#panel #pL {left:0px; -moz-user-select:none;}#panel #pR {right:0px; -moz-user-select:none;}#osnova {background:#000; margin:auto; width:500px; border:2px solid #333;}#panel {background:#000; width:420px; padding:0 40px 10px 40px; white-space:nowrap; position:relative; overflow:hidden; border-top:1px solid #333; text-align:left;}#player, #panel, #osnova {-moz-user-select:none;}#panel #pL, #panel #pR {background:#000; position:absolute; padding:5px; top:0px; height:40; opacity:0.9; filter:alpha(opacity=90);}#panel input {background:#000; position:relative; margin:0px 2px; padding:5px; text-decoration:none; border:1px solid #333; color:#80BF56;}#panel input:hover {background:#80BF56; color:#EFEFEF;}#playlist {position:relative; margin: auto; top:5px;}</style><div id="osnova"><div id="player"></div><div id="panel"></div><div style="background: #111; border-top:1px solid #333; font-size:7pt; text-align:center; padding:5px 0 3px 0;"><a style="color:#444; text-decoration:none;" href="http://ukrhome.tk/" target="_blank" title="Все права защищены">POWERED BY UKRhome.TK</a></div></div>');
var List = document.createElement('div');
List.id = 'playlist';
document.getElementById('panel').appendChild(List);
document.close(List);
document.getElementById('panel').innerHTML += '<div onMouseOver="Move(1)" onMouseOut="Move(0)" id="pR"><img src="right.png" alt="" /></div><div onMouseOver="Move(2)" onMouseOut="Move(0)" id="pL"><img src="left.png" alt="" /></div>';
function VkLink(num, num2, url){
var Alink = document.createElement('input');
Alink.type = 'button';
Alink.value = num2 + ' cерия';
Alink.id = 'seria-' + num;
Alink.name = url;
document.getElementById('playlist').appendChild(Alink);
var AName = document.getElementById('seria-' + num);
AName.setAttribute("onclick","Player('seria-" + num + "'); return false;");
AName.addEventListener("click", function(){AName.style.border = "0"}, false);
AName.addEventListener("click", function(){Swfplay.setAttribute('flashvars','autoStart=true');}, false);
document.close(Alink);
Player('seria-1');
}
function Player(id){
if(em = document.getElementsByTagName('embed')[0]){
em.parentNode.removeChild(em);
}
Swfplay.type = 'application/x-shockwave-flash';
Swfplay.src = 'http:'+'//vk.com/video_ext.php?oid=-' + document.getElementById(id).name;
Swfplay.setAttribute('allowfullscreen','true');
Swfplay.setAttribute('wmode','transparent');
Swfplay.height = '400px';
Swfplay.width = '500px';
document.getElementById('player').appendChild(Swfplay);
document.close(Swfplay);
if (!em){
return true;
}
}
function Move(kuda){
if (kuda == 0){
clearTimeout(a);
clearTimeout(b);
}
if (kuda == 1) {
if (carPos >= -2000) {
b = setTimeout("Move(1)", 40);
carPos = carPos -10;
document.getElementById('playlist').style.left = carPos +'px';
} else {clearTimeout(b);}
}
else if (kuda == 2) {
if (carPos <= -10) {
a = setTimeout("Move(2)", 40);
carPos = carPos +10;
document.getElementById('playlist').style.left = carPos +'px';
} else { clearTimeout(a);}
}
}
Вот это пишется в плейлист
VkLink(1,1,'19674491&id=162388693&hash=17eb886a335 0e3e2');
Задача: сделать вместо сложной прокрутки списка серий, выпадающий список с сериями