<\/div>';
document.documentElement.appendChild(create_audio)
var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
var iOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;
//if(isMobile){document.documentElement.style.WebkitUserSelect = 'none'; document.documentElement.style.WebkitTapHighlightColor ='transparent'; document.body.style.WebkitUserSelect = 'none'; document.body.style.WebkitTapHighlightColor ='transparent'}
function the_timer()
{//red progress bar
document.getElementById('timer').style.paddingLeft=100*player.getCurrentTime()/player.getDuration()+'%';
}
function check_time()
{/*allows indicating time on mousemove, see below: onmousemove="if(!isMobile){check_time()}*/
var time_hover=(player.getDuration()*((event.pageX-document.getElementById('audio').offsetLeft)/document.getElementById('audio').clientWidth)-0); player.getCurrentTime()==time_hover; var the_date = new Date(null);the_date.setSeconds(time_hover);var utc_time=the_date.toUTCString();var time_indic=utc_time.substr(utc_time.indexOf(':')- 2, 8);var time_indic = the_date.getUTCHours() + ':' + the_date.getUTCMinutes() + ':' + the_date.getUTCSeconds();var time_indic = the_date.toISOString().substr(11, 8); document.getElementById('check_time').innerHTML=time_indic; document.getElementById('check_time').style.left=event.pageX-document.getElementById('audio').offsetLeft+'px'; if(event.pageX-document.getElementById('audio').offsetLeft>document.getElementById('audio').clientWidth-80){document.getElementById('check_time').style.left=document.getElementById('audio').clientWidth-80+'px'}
}
function seek()
{
if(player.getPlayerState() === 1 && iOS){alert('You can\'t jump to another part of the music unless you pause the music first')}
if(player.getPlayerState() === 2 && iOS){player.seekTo(((player.getDuration()-0) * (event.pageX -document.getElementById('audio').offsetLeft) / document.getElementById('audio').clientWidth*1 )-0)};
if(!iOS){player.seekTo(((player.getDuration()-0) * (event.pageX -document.getElementById('audio').offsetLeft) / document.getElementById('audio').clientWidth*1 )-0)};
}
function hide_check()
{
document.getElementById('check_time').innerHTML = ' '
}
function current()
{//needed for indicating the current time
var date_current = new Date(null);
date_current.setSeconds(player.getCurrentTime());
// retrieve time ignoring the browser timezone - returns hh:mm:ss
var utc_current = date_current.toUTCString();
// negative start index in substr does not work in IE 8 and earlier
var time_current = utc_current.substr(utc_current.indexOf(':') - 2, 8)
// retrieve each value individually - returns h:m:s
var time_current = date_current.getUTCHours() + ':' + date_current.getUTCMinutes() + ':' + date_current.getUTCSeconds();
// does not work in IE8 and below - returns hh:mm:ss
var time_current = date_current.toISOString().substr(11, 8);
// not recommended - only if seconds number includes timezone difference
//var time = date.toTimeString().substr(0, 8);
document.getElementById('current_time').innerHTML=time_current
}
function displ_duration() {
// needed for indicating the duration
var date_duration = new Date(null);
date_duration.setSeconds(player.getDuration());
// retrieve time ignoring the browser timezone - returns hh:mm:ss
var utc_duration = date_duration.toUTCString();
// negative start index in substr does not work in IE 8 and earlier
var time_duration = utc_duration.substr(utc_duration.indexOf(':') - 2, 8)
// retrieve each value individually - returns h:m:s
var time_duration = date_duration.getUTCHours() + ':' + date_duration.getUTCMinutes() + ':' + date_duration.getUTCSeconds();
// does not work in IE8 and below - returns hh:mm:ss
var time_duration = date_duration.toISOString().substr(11, 8);
// not recommended - only if seconds number includes timezone difference
//var time = date.toTimeString().substr(0, 8);
document.getElementById('duration').innerHTML=time_duration
}
var time_in_lists = setInterval('displ_duration() ', 500)
function loading()
{
var loading=setInterval(" if(player.getPlayerState()===3){document.getElementById('state').innerHTML= '

'; } else {document.getElementById('state').innerHTML = ''; clearInterval(loading)}; ", 500)
}
function show_hide_playbutton()
{
document.getElementById('playbutton').style.transition='0s';
document.getElementById('playbutton').style.opacity=0;
var highlight=setInterval(" if(player.getPlayerState()===5 || (player.getPlayerState()!==1 )){document.getElementById('playbutton').style.opacity=1; document.getElementById('playbutton').style.transition='2s'} ", 5);
setInterval(" if(player.getPlayerState()===1 ){ document.getElementById('playbutton').style.opacity=0; document.getElementById('playbutton').style.transition='0s'} ", 5)
}
//show_hide_playbutton()
function chopped()
{
if(llist==undefined || llist.length < 11)
{
setTimeout('if(player.getCurrentTime() < the_start ){player.seekTo(the_start); }',0);
setTimeout('if(player.getCurrentTime() > the_end ){player.seekTo(the_start); player.pauseVideo()}',0);
document.getElementById('prev').style.opacity = 0.6;
document.getElementById('next').style.opacity = 0.6;
}
if(llist.length >= 11)
{
document.getElementById('prev').style.opacity = 1;
document.getElementById('next').style.opacity = 1;
}
}
/* The interval for chopped_video must not be too small */
var infobox = document.createElement('div');
infobox.innerHTML = "
";
document.documentElement.appendChild(infobox);
function loadVideo(id, starts_at, ends_at, list)
{
if(list){list = id + ',' + list};
if(list){list = list.split(/\s/).join('')};
loading();
if(document.getElementById('info_inner')){document.getElementById('info_inner').innerHTML = '
X
'+'No information'+'
'};
llist=list;
delete the_start; delete the_end;
the_start=starts_at;
the_end=ends_at;
hide_check();
document.getElementById('container').innerHTML = "
";
show_hide_playbutton();
}
function info(video_info)
{
document.getElementById('info').innerHTML = '
';
}
document.getElementById('info').onclick=function(e){
this.style.textShadow=null;
s = window.getSelection();
var range = s.getRangeAt(0);
var node = s.anchorNode;
while(range.toString().indexOf(' ') != 0) {
range.setStart(node,(range.startOffset -1));
}
range.setStart(node, range.startOffset +1);
do{range.setEnd(node,range.endOffset + 1);
}
while(range.toString().indexOf(' ') == -1 && range.toString().trim() != '');
var str = range.toString().trim(); //hh:mm:ss
if(!isNaN(parseFloat(str))==true)var p = str.split(':'), s = 0, m = 1;
while (p.length > 0) {
s += m * parseInt(p.pop(), 10);
m *= 60;
}
player.seekTo(s);
}
function detect_scrollbar_width()
{
// see https://davidwalsh.name/detect-scrollbar-width
// create node for measuring scrollbar width
var scrollDiv = document.createElement("div");
scrollDiv.style.overflow="scroll";
document.body.appendChild(scrollDiv);
// get scrollbar width
var scrollbar_width = scrollDiv.offsetWidth - scrollDiv.clientWidth;
//alert(scrollbar_width)
// delete the DIV used for measuring the scrollbar's width
document.body.removeChild(scrollDiv)
//alert(document.getElementById('scrollable').offsetWidth - document.getElementById('scrollable').clientWidth)
//if(document.body.offsetWidth - document.body.clientWidth > 0){document.getElementById('the_header').style.width=window.innerWidth-scrollbar_width-0+'px'; }
//if(document.body.offsetWidth - document.body.clientWidth == 0){document.getElementById('alphabet').style.right=scrollbar_width+0+'px'}
document.getElementById('alphabet').style.right=scrollbar_width+0+'px'
}
window.addEventListener('load', function (){setTimeout('detect_scrollbar_width()',50)}, false);
window.addEventListener('DOMContentLoaded', function (){setTimeout('detect_scrollbar_width()',50)}, false);
window.addEventListener('resize', function (){setTimeout('detect_scrollbar_width()',50)}, false);