<!doctype html>
<html>
<head data-live-domain="api.jquery.com">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">


<meta name="author" content=g"jQuery Foundation - jquery.org">
<meta name="description" content="jQuery: The Write Less, Do More, JavaScript Library">

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!--link rel="shortcut icon" href="//api.jquery.com/jquery-wp-content/themes/api.jquery.com/i/favicon.ico"-->

<link rel="stylesheet" href="//api.jquery.com/jquery-wp-content/themes/jquery/css/base.css?v=1">
<link rel="stylesheet" href="//api.jquery.com/jquery-wp-content/themes/api.jquery.com/style.css">
<link rel="pingback" href="//api.jquery.com/xmlrpc.php" />
<!--[if lt IE 7]><link rel="stylesheet" href="css/font-awesome-ie7.min.css"><![endif]-->

<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/modernizr.custom.2.6.2.min.js"></script>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write(unescape('%3Cscript src="//api.jquery.com/jquery-wp-content/themes/jquery/js/jquery-1.9.1.min.js"%3E%3C/script%3E'))</script>

<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/plugins.js"></script>
<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/main.js"></script>

<script src="//use.typekit.net/wde1aof.js"></script>
<script>try{Typekit.load();}catch(e){}</script>

<script type='text/javascript' src='//api.jquery.com/wp-includes/js/comment-reply.min.js?ver=3.8'></script>
<script type='text/javascript' src='//www.rjmprogramming.com.au/ytaudioonly.js'></script>

<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<title>Karaoke via YouTube API - RJM Programming - September, 2016</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >
<script type='text/javascript' src='keep_parent_background.js'></script>
<style>
body {
background-color: lightblue;
padding-top: 20px;
background: -webkit-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: -o-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: -moz-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: linear-gradient(180deg, rgb(255, 255, 0), rgb(0, 255, 255)); /* linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent */
}
input { z-index: 5; }

summary { background-color: #f0f0f0; }

/* #### Tablets and Phones Portrait or Landscape ... thanks to http://www.javascriptkit.com/dhtmltutors/cssmediaqueries2.shtml #### */
@media screen and (min-device-width: 320px) and (max-device-width: 1024px){
input[type=button] { display: inline-block !important; }
}

#i0::placeholder { content: "Can ; separate time to flag Just Audio"; }


.emoji { border: 8px solid white; font-size: 20px; }
#youtubeid { width:300px; }
</style>
<script type='text/javascript' id=bigscript>
var capto=null, captonum=1, checkthesum='', prestartv='', ssconto=null, sscontomonitor=null, nextwo=null, nextwocmd='', nextwoin='0';
var docURL=document.URL;
var ingif='', ingifstyle='filter: none;', ingifint=0, ingifchosen=false, gduration=0, ismobileplaylist=false, aminnonyt=false;
var lastw1='', lastw2='', lastw3='', lastnextwoin=0;

var prefx='';
var stimes=[], etimes=[], timesubtitles=[], cursubi=-1, xhr=null, cursecselapsed=-1.0, enforcedtimeis=-1.0, isnotplaying=true, createdlh='', ggstr='';
if (window.parent) {
if (parent.document.getElementById('youtubeid') && parent.document.getElementById('srt') && (('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#/g,'') == '' || ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').indexOf('#srt=WEBVTT') != -1)) {
if (parent.document.getElementById('youtubeid').value != '') {
//alert(45);
if (parent.document.getElementById('srt').value.indexOf('WEBVTT') == 0 && parent.document.getElementById('srt').value.indexOf('1~') != -1) {
//location.hash='#srt=1' + encodeURIComponent('' + String.fromCharCode(10) + parent.document.getElementById('srt').value.split('1~')[1].replace(/\~/g, String.fromCharCode(10)));
//alert(56);
prefx='=1' + encodeURIComponent('' + String.fromCharCode(10) + parent.document.getElementById('srt').value.split('1~')[1].replace(/\~/g, String.fromCharCode(10)) + String.fromCharCode(10)) + '&';
//alert(decodeURIComponent(prefx));
} else {
location.hash='#srt=' + encodeURIComponent(parent.document.getElementById('srt').value.replace(/\~/g, String.fromCharCode(10)));
}
}
}
}
var gsrt=( ('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).indexOf('=1' + encodeURIComponent(String.fromCharCode(10))) != -1 ? processsrt('1' + encodeURIComponent(String.fromCharCode(10)) + ('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).split('=1' + encodeURIComponent(String.fromCharCode(10))[1].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split('&?')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) ).replace(/\+/g, ' ') : (('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).toLowerCase().replace(encodeURIComponent('.') + 'vtt',encodeURIComponent('.') + 'srt').indexOf(encodeURIComponent('.') + 'srt') != -1 ? processsrt(('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).replace(encodeURIComponent('.') + 'SRT','SRT' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'vtt','vtt' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'VTT','VTT' + encodeURIComponent('.') + 'srt').split(encodeURIComponent('.') + 'srt')[0].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) : ''));
var passthislhon=(gsrt != '' ? lhme('#' + (gsrt.split('#')[eval(-1 + gsrt.split('#').length)].indexOf('=') != -1 ? (gsrt.split('#')[eval(-1 + gsrt.split('#').length)].replace(/^\#/g,'').split('=')[0] + '=' + encodeURIComponent(gsrt.split('#')[eval(-1 + gsrt.split('#').length)].replace(/^\#/g,'').replace(gsrt.split('#')[eval(-1 + gsrt.split('#').length)].replace(/^\#/g,'').split('=')[0] + '=', ''))) : encodeURIComponent(gsrt.split('#')[eval(-1 + gsrt.split('#').length)].replace(/^\#/g,'')))) : '');
if (document.URL.indexOf('youtubeid=') != -1) {
if (document.URL.indexOf('youtubeid=&') == -1) {
if (('' + window.localStorage.getItem('capsub_' + document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0])).replace(/^undefined/g, '').replace(/^null/g, '') != '') {
passthislhon='' + window.localStorage.getItem('capsub_' + document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0]);
//alert(passthislhon);
if (document.URL.indexOf('srt=WEBVTT') == -1) {
location.hash='' + window.localStorage.getItem('capsub_' + document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0]);
}
}
}
}

var gsandc='Subtitle and caption';
if (window.parent) {
if (parent.document.URL.indexOf('/video_commentary.htm') != -1) {
gsandc='Commentary notes';
} else if (parent.document.URL.indexOf('/song_lyric_faux_pas.htm') == -1) {
if (parent.document.getElementById('conceptsubject')) {
gsandc=parent.document.getElementById('conceptsubject').value;
}
}
}

function getnextwo() {
return nextwo;
}

function twozeroesclose() {
if (document.getElementById('j' + nextwoin).value.indexOf('.00') != -1) {
//document.getElementById('j' + nextwoin).value=document.getElementById('j' + nextwoin).value.split('.00')[0];
setTimeout(function(){ document.getElementById('j' + nextwoin).value=document.getElementById('j' + nextwoin).value.split('.00')[0]; }, 1800);
document.getElementById('radioif').style.position='relative';
document.getElementById('radioif').style.top='' + document.getElementById('radioif').getAttribute('data-top') + 'px';
document.getElementById('radioif').style.left='0px';
document.getElementById('radioif').style.width='' + document.getElementById('radioif').getAttribute('data-width') + 'px';
document.getElementById('radioif').style.height='' + document.getElementById('radioif').getAttribute('data-height') + 'px';
document.getElementById('radioif').style.zIndex='-999';
document.getElementById('radioif').style.display='none';
document.getElementById('radioif').title='Closed';
if (nextwo) {
if (!nextwo.closed) {
nextwo.close();
nextwo=null;
} else {
nextwo=null;
}
}
} else {
setTimeout(twozeroesclose, 800);
}
}

function nonytopen(ividis, compduris, comptitleis) {
//document.title=(comptitleis + ' ... ' + compduris + ' ... ' + lastw1);
if (lastw1 != '') {
nextwoin=lastnextwoin;
document.getElementById('xx' + nextwoin).style.backgroundColor='palegreen';
document.getElementById('radioif').style.zIndex='999';
document.getElementById('radioif').style.display='block';
nextwo=windowopen(lastw1,lastw2,lastw3);
lastw1='';
} else {
alert('when does this happen');
document.getElementById('radioif').style.zIndex='999';
document.getElementById('radioif').style.display='block';
}
}

function windowopen(w1,w2,w3) {
if (('' + document.getElementById('radioif').getAttribute('data-height')) == '0') {
document.getElementById('radioif').setAttribute('data-height', '' + document.getElementById('tablenmup').getBoundingClientRect().top);
document.getElementById('radioif').setAttribute('data-width', '' + screen.width);
document.getElementById('radioif').setAttribute('data-top', '' + document.getElementById('tablenmup').getBoundingClientRect().top);
}
if (document.getElementById('xx' + nextwoin).outerHTML.indexOf('green') != -1) {
document.getElementById('radioif').style.position='absolute';
document.getElementById('radioif').style.top='0px';
document.getElementById('radioif').style.left='0px';
document.getElementById('radioif').style.width='' + document.getElementById('radioif').getAttribute('data-width') + 'px';
document.getElementById('radioif').style.height='' + document.getElementById('radioif').getAttribute('data-height') + 'px';
document.getElementById('radioif').style.zIndex='999';
document.getElementById('radioif').style.display='block';
document.getElementById('radioif').title='Opened';
} else {
document.getElementById('radioif').style.zIndex='-999';
document.getElementById('radioif').style.display='none';
document.getElementById('radioif').title='Closed';
lastw1=w1;
lastw2=w2;
lastw3=w3;
lastnextwoin=nextwoin;
if (nextwo) {
if (!nextwo.closed) {
nextwo.close();
nextwo=null;
} else {
nextwo=null;
}
}
}
if (w1.indexOf('&rand=') != -1) {
w1=w1.replace('&rand=', '&rand=' + Math.floor(Math.random() * 9));
} else if (w1.indexOf('#') != -1) {
w1=w1.replace('#', '&rand=' + Math.floor(Math.random() * 129) + '#');
}
if (w1.indexOf('&tbox=') != -1) {
w1=w1.replace('&tbox=' + w1.split('&tbox=')[1].split('&')[0].split('#')[0], '&tbox=' + nextwoin);
} else if (w1.indexOf('&') != -1) {
w1=w1.replace('&', '&tbox=' + nextwoin + '&');
}
if (nextwo) {
if (!nextwo.closed) {
nextwo.close();
nextwo=null;
}
}
// if (document.getElementById('myiframe')) {
// //document.getElementById('myiframe').title='No more ';
// ismobileplaylist=true;
// }
return window.open(w1,"radioif");
}

function getdocurl() {
return '' + docURL;
}

function prefd(bvalis) {
ismobileplaylist=bvalis;
}

function lhme(lhwhat) {
if (lhwhat.indexOf('#') == 0 && ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').indexOf(lhwhat) == -1) {
if (ggstr != '') {
if (lhwhat.indexOf(ggstr) != -1) {
location.hash=lhwhat;
} else {
lhwhat+=ggstr;
location.hash=lhwhat;
ggstr='';
}
} else {
location.hash=lhwhat;
}
passthislhon=lhwhat;
}
return lhwhat;
}

function getlh() {
return ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'');
}

function writeoutsubtitle() {
var newsubi=-1, ithings=0;
//console.log('call ' + enforcedtimeis + ' ' + cursecselapsed);
if (enforcedtimeis >= 0.0) {
cursecselapsed=enforcedtimeis;
}
if (cursecselapsed >= 0.0 && cursubi >= 0 && eval('' + etimes.length) > 0 && eval('' + stimes.length) > 0 && eval('' + timesubtitles.length) > 0) {
if (enforcedtimeis < 0.0) {
cursecselapsed+=0.1;
}
//console.log('' + cursecselapsed);
if (eval(cursecselapsed) >= eval(stimes[cursubi]) && eval(cursecselapsed) <= eval(etimes[cursubi])) {
if (document.getElementById('subtitlegoeshere').innerHTML == '' && eval('' + timesubtitles.length) > cursubi) {
//console.log('found for ' + cursubi);
document.getElementById('subtitlegoeshere').innerHTML=timesubtitles[cursubi];
}
} else {
for (ithings=0; ithings<stimes.length; ithings++) {
if (eval(cursecselapsed) >= eval(stimes[ithings]) && eval(cursecselapsed) <= eval(etimes[ithings])) {
newsubi=ithings;
//alert('yes ' + ithings);
}
}
if (eval(newsubi) >= 0 && eval(cursubi) >= 0 && eval(newsubi) != eval(cursubi)) {
//alert('' + timesubtitles.length + ' needs to be bigger than ' + newsubi);
if (eval('' + timesubtitles.length) > eval(newsubi)) {
cursubi=newsubi;
console.log('Found for ' + cursubi);
if (('' + timesubtitles[cursubi]).replace(/^undefined$/g,'').replace('WEBVTT FILE', '') != '') {
document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
if (window.parent) {
if (parent.document.getElementById('subtitlegoeshere')) {
parent.document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
}
}
}
}
} else if (eval(newsubi) >= 0 && eval(cursubi) >= 0 && document.getElementById('subtitlegoeshere').innerHTML == '') {
console.log('Found For ' + cursubi);
if (('' + timesubtitles[cursubi]).replace(/^undefined$/g,'').replace('WEBVTT FILE', '') != '') {
document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
if (window.parent) {
if (parent.document.getElementById('subtitlegoeshere')) {
parent.document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
}
}
}
}
}
}
if (!isnotplaying) { enforcedtimeis=-1.0; }
}

function convertSrtToText(srt) { // thanks to https://medium.com/@backlinkss.info/convert-srt-to-text-regex-javascript-9660964ee3f0
// Use a expressão regular para remover os números de linha e as marcas de tempo
return srt.replace(/^\d+\n([\d:,.]+ --> [\d:,.]+\n)/gm, '');
}

function tosecs(fromthistimestamp) {
//alert('fromthistimestamp=' + fromthistimestamp);
var outsecs=0.0, cola=[], cfactor=1.0, icf=0;
if (fromthistimestamp.replace('.',',').indexOf(',') != -1) {
outsecs+=eval(eval('' + fromthistimestamp.replace('.',',').split(',')[1]) / Math.pow(10.0, eval('' + fromthistimestamp.replace('.',',').split(',')[1].length)));
fromthistimestamp=fromthistimestamp.replace('.',',').split(',')[0];
}
cola=fromthistimestamp.split(':');
for (icf=eval(-1 + cola.length); icf>=0; icf--) {
outsecs+=eval(eval('' + cola[icf]) * cfactor);
cfactor*=60.0;
}
return outsecs;
}

function stateChanged() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (xhr.response.indexOf(String.fromCharCode(10)) != -1) {
gsrt=xhr.response;
stimes=[];
etimes=[];
timesubtitles=[];
processsrt('');
}
}
}
}

function processsrt(instis) {
var it=0, interimsrt=[];
if (instis != '') {
gsrt=decodeURIComponent(instis).replace(/\+/g,' ');
//alert('0:' + gsrt);
if (gsrt != '' && gsrt.indexOf(String.fromCharCode(10)) == -1 && gsrt.indexOf('=') != -1) {
gsrt=gsrt.split('=')[eval(-1 + gsrt.split('=').length)] + '.srt';
ggstr=encodeURIComponent('.srt');
}
if (gsrt.toLowerCase().trim() != gsrt.toLowerCase().trim().replace(/\.srt$/g,'')) {
xhr = new XMLHttpRequest();
xhr.onreadystatechange=stateChanged;
createdlh='#srt=' + encodeURIComponent(gsrt.replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt'));
xhr.open('get',gsrt.replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt'),true);
xhr.send(null);
gsrt='';
return decodeURIComponent(instis).replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt');
}
//gsrt='';
//return decodeURIComponent(instis).replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt');
}
if (gsrt != '') {
//alert('1:' + gsrt);
if (gsrt.indexOf('=WEBVTT FILE') != -1) {
gsrt='WEBVTT FILE' + gsrt.split('=WEBVTT FILE')[eval(-1 + gsrt.split('=WEBVTT FILE').length)];
}
if (gsrt.indexOf('1' + String.fromCharCode(10) + '0') > 0) {
gsrt='1' + String.fromCharCode(10) + '0' + gsrt.substring(gsrt.indexOf('1' + String.fromCharCode(10) + ' 0'));
} else if (gsrt.indexOf('1' + String.fromCharCode(10)) > 0) {
gsrt='1' + String.fromCharCode(10) + gsrt.substring(gsrt.indexOf('1' + String.fromCharCode(10) + ' '));
}
if (gsrt.indexOf('&?') != -1) {
while (gsrt.indexOf('&?') != -1) {
gsrt=gsrt.replace('&?' + gsrt.split('&?')[1].split(String.fromCharCode(10))[0], '');
}
}
//alert('x:' + gsrt);
if (gsrt.indexOf('=1' + String.fromCharCode(10)) != -1) {
gsrt='1' + String.fromCharCode(10) + gsrt.split('=1' + String.fromCharCode(10))[1];
}
gsrt=gsrt.replace(/\~/g, String.fromCharCode(10));
//alert('z:' + gsrt);
interimsrt=gsrt.split(' --> ');
timesubtitles=convertSrtToText(gsrt).split(String.fromCharCode(10) + String.fromCharCode(10));
//alert('z:' + timesubtitles[0] + ' ... ' + eval('' + interimsrt.length) + ' --- ' + eval('' + timesubtitles.length));
// 1\n00:00:10,500 --> 00:00:13,000\nhuh\n\n2\n00:00:13,000 --> 00:00:23,000\nhuhagain
//alert(timesubtitles[0] + ' ... ' + timesubtitles.length + ' --- ' + timesubtitles.length + ' vs ' + interimsrt.length);
if (eval('' + interimsrt.length) <= eval('' + timesubtitles.length)) {
stimes.push(0.0);
etimes.push(0.0);
} else {
createdlh='';
//alert(678);
instis='WEBVTT FILE' + String.fromCharCode(10) + String.fromCharCode(10) + gsrt;
//alert(1678);
location.hash='#srt=' + encodeURIComponent(decodeURIComponent(instis).replace(/\+/g,' '));
//alert(2678);
}
for (it=1; it<interimsrt.length; it++) {
stimes.push(tosecs(interimsrt[eval(-1 + it)].split(String.fromCharCode(10))[eval(-1 + interimsrt[eval(-1 + it)].split(String.fromCharCode(10)).length)]));
etimes.push(tosecs(interimsrt[eval(0 + it)].split(String.fromCharCode(10))[0]));
}
//alert('' + stimes.length + '/' + etimes.length + '/' + timesubtitles.length + ' ... ' + stimes[0] + ' to ' + etimes[0] + ' for ' + timesubtitles[0]);
if (eval('' + etimes.length) > 0) {
cursubi=0;
//alert('start');
setInterval(writeoutsubtitle, 100);
}
}
if (createdlh == '') {
createdlh='#srt=' + encodeURIComponent(decodeURIComponent(instis).replace(/\+/g,' ').replace(/\~/g,String.fromCharCode(10)));
} //else {
// alert('huh');
//}
//alert('' + stimes.length + '/' + etimes.length + '/' + timesubtitles.length);
//console.log(stimes);
//console.log(etimes);
//console.log(timesubtitles);
return decodeURIComponent(instis);
}

function prefetch(whatgifmaybe) { // thanks to https://stackoverflow.com/questions/69564118/how-to-get-duration-of-gif-image-in-javascript#:~:text=Mainly%20use%20parseGIF()%20%2C%20then,duration%20of%20a%20GIF%20image.
if ((whatgifmaybe.toLowerCase().trim().split('#')[0] + '?').indexOf('.gif?') != -1 || whatgifmaybe.indexOf('data:image/gif') != -1 || whatgifmaybe.indexOf('gif;base64,') == 0) {
ingif=whatgifmaybe;
//document.body.style.cursor='progress';
fetch(whatgifmaybe)
.then(res => res.arrayBuffer())
.then(ab => isGifAnimated(new Uint8Array(ab)))
.then(console.log);
}
}


/** @param {Uint8Array} uint8 */
function isGifAnimated (uint8) { // thanks to https://stackoverflow.com/questions/69564118/how-to-get-duration-of-gif-image-in-javascript#:~:text=Mainly%20use%20parseGIF()%20%2C%20then,duration%20of%20a%20GIF%20image.
let myduration = 0;
for (let xi = 0, len = uint8.length; xi < len; xi++) {
if (uint8[xi] == 0x21
&& uint8[xi + 1] == 0xF9
&& uint8[xi + 2] == 0x04
&& uint8[xi + 7] == 0x00)
{
const xdelay = (uint8[xi + 5] << 8) | (uint8[xi + 4] & 0xFF);
myduration += xdelay < 2 ? 10 : xdelay;
}
}
if (eval(myduration / 100) > 0.11) {
gduration=eval(myduration / 100);
return eval(myduration / 100);
}
gduration=0;
return 0;
}

var loopcall=false;
var gi=0;
var defidea='text-align:center; width: 100%;', hashidea='', newartwo=false;
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?feedoffurl=%2e%2e%2fPHP%2fspeech%5fsupervisor%2ephp%3fmode%3d9%26csneg%3d%2d&youtubeid=7v6t3N8YI8g&youtube_duration=180.0&email=&email=&emoji=on&c0=on&i0=92&j0=94&i1=244&j1=246&i2=171&j2=174&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=
//7v6t3N8YI8g 1:32 1:34 2:24-2:26 2:51-2:54
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?feedoffurl=%2e%2e%2fPHP%2fspeech%5fsupervisor%2ephp%3fmode%3d9%26csneg%3d%2d&youtubeid=Q0Dn5k_MtZM&youtube_duration=30.021&email=&email=&emoji=on&c0=on&i0=11&j0=14&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=
var lfb='<br>', lfends='', documentURL=document.URL, tpcontainer='';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || 1 == 1) { lfb=" "; lfends='<br>'; }
var bitatstart='', bitatend='';
if (('' + location.hash).indexOf('details') != -1) { bitatstart='<details open><summary></summary>'; bitatend='</details></td></TR>'; }
var paridis=location.search.split('paridis=')[1] ? decodeURIComponent(location.search.split('paridis=')[1].split('&')[0]) : '';
var onlyaudios=location.search.split('audioonlys=')[1] ? decodeURIComponent(location.search.split('audioonlys=')[1].split('&')[0]) : '0';
if (onlyaudios.trim() == '') {
onlyaudios='1';
} else if (onlyaudios.substring(0,1) < '0' || onlyaudios.substring(0,1) > '0') {
onlyaudios='5';
}
var ptddp=location.search.split('tdd=')[1] ? decodeURIComponent(location.search.split('tdd=')[1].split('&')[0]) : '';
var czzyes=location.search.split('ezj=')[1] ? decodeURIComponent(location.search.split('ezj=')[1].split('&')[0]) : '';
var czzis=location.search.split('c0=')[1] ? decodeURIComponent(location.search.split('c0=')[1].split('&')[0]) : 'on';
var otheriframeoh=location.search.split('feedoffurl=')[1] ? '<iframe style="vertical-align:top;width:100%;height:1200px;transform:scale(0.55);" src=' + decodeURIComponent(location.search.split('feedoffurl=')[1].split('&')[0]).replace(/\+/g,' ') + '></iframe>' : '';
if ((otheriframeoh != '' || (document.URL.indexOf('?') == -1 && document.URL.indexOf('localhost') == -1)) && document.URL.indexOf('http:') == 0) { location.href=document.URL.replace('http://rjm','https://www.rjm').replace('http:','https:'); }
var lastgetytlist=''; // store and compare against the last YouTube (perhaps search functionality) query (if the same, do not repeat)
var amwaiting=null; // variable for a setInterval call dampening down the YouTube request rate ... via the control of ...
var allowable=true; // if true, you are clear to request from YouTube, else false
var additionalask=[''];
var sstr='';
var firstrepeat=true;
var lastdet='';
var optonclick=';';
var myvtableoh='';
var pausecount=0;
var csajaxs='x';
var gsecs=-1, ggsecs=-1;
var lastttqqbits='';
var forcemix=-1;
var bigc=1;
var notallowed=0;

var arwo=null, prearwo=null, acount=0, wzero=0, wone=1, lhwo=null, gthisg='', arwotwo=null;
var zaconto=null, zwaconto=null;
var yaconto=null, ywaconto=null;
var waconto=null, wwaconto=null;

var honev='', myformv='', spanv='', ddejkaraokev='visible', dothjerurl='';
var rep='';
var looping=false, waslooping=false, lastj='';
var bigo=null;
var bx=[], by=[];
var ourmto=false, courmto='';
var pgiveprefix='';
var biggesturl='', biggerurl='';
var emojisuffix='ej';
var firstsuffix="&playtime=0&start=0";
var firstprefix="";
var snippet=-1;
var ourvid=location.search.split('vid=')[1] ? decodeURIComponent(location.search.split('vid=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var ourvids=ourvid.split('!||!');
if (ourvids.length == 1) {
ourvids=ourvid.split('|!!|');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('|!|!');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('!|!|');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('!!||');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('||!!');
}
var doemoji=location.search.split('emoji=')[1] ? location.search.split('emoji=')[1].split('&')[0] : 'on';
var doemj=false, ech='';
if (doemoji == 'on') {
doemj=true;
ech='checked';
}

var ndt=null;
var gcue='', ismobileplaylist=false, lastyturlis='';
var interesting=true;
var espo=null, espw=null;
var plo=null;
var ajaxclist='', ajaxoncnt=0, ajaxf='';
var ajaxsih='';
var offtop='';
var iofftop=[];
var givefactor=0;
var sgive=false;
var pgive=false;
var givefifteen=-1;
var lastajaxs='';
var thisonetodo=0;
var onestodoprefix='';
var onestodoprefix=location.search.split('andthen=')[1] ? ('&andthen=' + decodeURIComponent(location.search.split('andthen=')[1].split('&')[0])).substring(0,9) : '';
var onestodosuffix=location.search.split('andthen=')[1] ? decodeURIComponent(location.search.split('andthen=')[1].split('&')[0]) : '';
var prevonestodosuffix=onestodosuffix;
var onestodo=[];
var onestododur=[];
var morethanone=false;
var preselc='';
var tdt='';
var defval='0';
var next=0;
var nextthing='mytbody';
var lastfinish=-1;
var next_thing='xx0';
var mbmode=false;
var bigdocbod='';
var ifsa=[];
var jfsa=0;
var nine=29;
var cumd=-1.0;
var bcol='#f0f0f0';
var nextdelay=-1;
var lastokn='';
var okn='';
var lastconto=[];
var morechanges=true;
var lastwo='';
var woi=null;
var oko=null;
var fromddd=' ...', toddd=' ...';


var isendof=false, wascomingurl='', comingurl='', ieo=true, recallsel='', recallurl='', nextismedia=false, browsebut='', bbaswell='', browsejs='';
if (document.URL.indexOf('youtubeid=') != -1) {
browsebut=' <a style=display:inline-block;text-decoration:n one;cursor:pointer; title="Browse locally for media files ..." onclick=" newartwo=true; actbb(); setTimeout(function(){ newartwo=false; }, 5000);">📂</a> ';
//bbaswell='<div id=myaudios></div><div id=myvideos></div>';
}

var elev='', maxva=0, relifid='', sumo=null;
var repeatz='199';
var karaz='99';

var asuffis='';
var bsuffis='';
var aaconto=null, aaset=false, ibn=0, bnvs=[], waaconto=null;
var ouraidis=location.search.split('theaid=')[1] ? location.search.split('theaid=')[1].split('&')[0] : 'aja';
var ouriframeidis=location.search.split('theiframeid=')[1] ? location.search.split('theiframeid=')[1].split('&')[0] : 'myja';
var ourytaudioonlyofinterestidis='youllneverfindthis';
ourytaudioonlyofinterestidis=location.search.split('youtubeid=')[1] ? (location.search.split('theaid=')[1] ? location.search.split('youtubeid=')[1].split('&')[0] : '7XMW6Z_Oq38') : 'youllneverfindthis';
var oursupwording='';
var ourbuttonwording=location.search.split('thebuttonwording=')[1] ? decodeURIComponent(location.search.split('thebuttonwording=')[1].split('&')[0]).replace(/\+/g,' ') : (String.fromCodePoint(128276) + String.fromCodePoint(128276));
if (ourbuttonwording.indexOf(' <sup') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
oursupwording=' <sup' + ourbuttonwording.split(' <sup')[1];
ourbuttonwording=ourbuttonwording.split(' <sup')[0];
oursupwording='';
} else if (ourbuttonwording.indexOf('<sup') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
oursupwording=' <sup' + ourbuttonwording.split(' <sup')[1];
ourbuttonwording=ourbuttonwording.split(' <sup')[0];
oursupwording='';
} else if (ourbuttonwording.indexOf('<sup') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
oursupwording='<sup' + ourbuttonwording.split('<sup')[1];
ourbuttonwording=ourbuttonwording.split('<sup')[0];
oursupwording='';
}
if (ourbuttonwording.trim() != '') {
if (ourbuttonwording.trim().replace(/\,/g,'').replace(/\./g,'').replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
if (ourbuttonwording.trim().substring(0,1).replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
bnvs=ourbuttonwording.trim().replace(/\./g,',').split(',');
ourbuttonwording='';
if (eval('' + bnvs.length) == 1) {
ourbuttonwording=String.fromCodePoint(eval('' + bnvs[0]));
}
for (ibn=1; ibn<bnvs.length; ibn++) {
if (eval('' + bnvs[ibn]) != eval('' + bnvs[eval(-1 + ibn)])) {
ourbuttonwording+=String.fromCodePoint(eval('' + bnvs[eval(-1 + ibn)]), eval('' + bnvs[ibn]));
} else {
if (ourbuttonwording == '') { ourbuttonwording+=String.fromCodePoint(eval('' + bnvs[eval(-1 + ibn)])); }
ourbuttonwording+=String.fromCodePoint(eval('' + bnvs[ibn]));
}
}
}
}

}

//alert(ourbuttonwording + ' ... ' + location.search);
if (('#' + location.hash).indexOf('#inp') != -1) {
hashidea='&#' + 'inp' + ('#' + location.hash).split('#inp')[1];
}

if (window.top) {
if (document.URL.indexOf('youtubeid=' + ourytaudioonlyofinterestidis + '&') != -1 && document.URL.indexOf('c0=off') != -1 && (document.URL.indexOf('thebuttonwording=') != -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i))) {
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
hashidea='&#' + 'inp' + ouraidis + '_' + ouriframeidis;
}
//alert('1:' + hashidea);
if (parent.document.getElementById(ouraidis) && ourbuttonwording.trim() != '') {
if (oursupwording != '') {
parent.document.getElementById(ouraidis).innerHTML=ourbuttonwording + oursupwording;
} else {
parent.document.getElementById(ouraidis).innerHTML=ourbuttonwording;
}
}
} else if (document.URL.indexOf('youtubeid=' + ourytaudioonlyofinterestidis + '&') != -1 && document.URL.indexOf('c0=on') != -1 && (document.URL.indexOf('thebuttonwording=') != -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i))) {
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
hashidea='&#' + 'inp' + ouraidis + '_' + ouriframeidis;
}
//alert('2:' + hashidea);
defidea='text-align:left; width: 90%;';
honev='opacity:0.0;';
//myformv='opacity:0.0;';
spanv='opacity:0.0;';
ddejkaraokev='hidden';
dotherurl=' style=height:200px; ';
setTimeout(function(){
repeatz='199';
karaz='99';
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
repeatz='99';
karaz='199';
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('1 ' + ('' + document.referrer) + ' ' + document.URL);
}
setTimeout(function(){
if (document.getElementById('myrepeat')) {
document.getElementById('youtube_duration').title=' ';
}
document.getElementById('youtube_duration').value='22223.000';
}, 1000);
setTimeout(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11);
}
if (document.getElementById('audioejkaraoke') || document.getElementById('repeat')) {
if (document.getElementById('audioejkaraoke')) {
document.getElementById('audioejkaraoke').title=' ' + document.getElementById('audioejkaraoke').title;
if (ourbuttonwording.indexOf('<') == -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('audioejkaraoke').value=ourbuttonwording; //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('audioejkaraoke').style.position='absolute';
document.getElementById('audioejkaraoke').style.left='0px';
document.getElementById('audioejkaraoke').style.top='0px';
document.getElementById('audioejkaraoke').style.backgroundColor='transparent';
document.getElementById('audioejkaraoke').style.zIndex=karaz;
//document.getElementById('audioejkaraoke').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('audioejkaraoke').ontouchstart=function(event){ parent.onmaybesupclick(event); };
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('111 ' + ourbuttonwording);
}
if (!document.getElementById('myrepeat') || 111 == 111) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('1111 ' + ourbuttonwording);
}
if (ourbuttonwording.indexOf('<') != -1) {
//alert(document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording);
if (!window.parent) {
document.body.innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording;
document.body.style.width='' + eval(50 + eval('' + document.getElementById('myrepeat').getBoundingClientRect().right)) + 'px';
} else if (parent.document.URL.indexOf('/select_palette.') != -1) {
//alert(ourbuttonwording);
//alert(document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording);
//document.getElementById('mybuttons').innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording;
var twobitis=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording;
var onebitis=document.body.innerHTML;
//var wwoo=window.open('','_blank');
//wwoo.document.write('<html><body>' + twobitis + '</body></html>');
document.body.innerHTML=onebitis + twobitis.replace('-10px;','0px;');
//alert('done');
if (document.getElementById('myrepeat')) {
document.body.style.width='' + eval(50 + eval('' + document.getElementById('myrepeat').getBoundingClientRect().right)) + 'px';
}
} else {
document.body.innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' id=',' id=myrepeat data-id=').replace(' type=',' data-type=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>' + oursupwording;
document.body.style.width='' + eval(50 + eval('' + document.getElementById('myrepeat').getBoundingClientRect().right)) + 'px';
}
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (parent.document.getElementById(ouraidis) && 1 == 7) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
//alert(parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
} else {
document.getElementById('repeat').value=nocaret(ourbuttonwording); //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('repeat').style.position='absolute';
document.getElementById('repeat').style.left='0px';
document.getElementById('repeat').style.top='0px';
document.getElementById('repeat').style.backgroundColor='transparent';
document.getElementById('repeat').style.border='0px solid transparent';
document.getElementById('repeat').style.zIndex=repeatz;
//document.getElementById('repeat').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('repeat').ontouchstart=function(event){ parent.onmaybesupclick(event); };
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (parent.document.getElementById(ouraidis) && 1 == 7) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
//alert(parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
}

if (parent.document.getElementById(ouraidis)) {
// Make the button look like the nesting a or div or span or p
var divelem=parent.document.getElementById(ouraidis);
var output=document.getElementById('repeat');
if (output) {
divelem.style.fontFamily = window.getComputedStyle(output,null).fontFamily || output.style.fontFamily || output.currentStyle.getCurrentProperty('font-family');
divelem.style.fontSize = window.getComputedStyle(output,null).fontSize || output.style.fontSize || output.currentStyle.getCurrentProperty('font-size');
divelem.style.fontWeight = window.getComputedStyle(output,null).fontWeight || output.style.fontWeight || output.currentStyle.getCurrentProperty('font-weight');
divelem.style.border = window.getComputedStyle(output,null).border || output.style.border || output.currentStyle.getCurrentProperty('border');
divelem.style.padding = window.getComputedStyle(output,null).padding || output.style.padding || output.currentStyle.getCurrentProperty('padding');
divelem.style.margin = window.getComputedStyle(output,null).margin || output.style.margin || output.currentStyle.getCurrentProperty('margin');
divelem.style.overflow = window.getComputedStyle(output,null).overflow || output.style.overflow || output.currentStyle.getCurrentProperty('overflow');
divelem.style.padding = window.getComputedStyle(output,null).padding || output.style.padding || output.currentStyle.getCurrentProperty('padding');
divelem.style.color = window.getComputedStyle(output,null).color || output.style.color || output.currentStyle.getCurrentProperty('color');
}
}

}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11111); // alert('11111 ' + document.URL); //
}
if (document.getElementById('myiframe')) {
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
//document.getElementById('myiframe').title='';
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
//document.getElementById('myiframe').style.backgroundColor='transparent';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
document.getElementById('myiframe').style.opacity='0.0';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11117);
}
} else {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11111); //alert('411111 ' + document.URL); //console.warn(11111);
}
setInterval(function(){
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title).trim() == ('' + document.getElementById('myiframe').title)) {
document.getElementById('myiframe').title=('' + document.getElementById('myiframe').title) + ' ';
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
//document.getElementById('myiframe').style.backgroundColor='transparent';
}
}
}, 6000);
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(11119);
}
if (aaconto) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(122221);
}
aaconto.getElementById('player').style.opacity='0.0';
} else {
aaset=true;
}
document.body.style.backgroundColor='transparent';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(111);
}
} else {
setInterval(function(){
if (interesting) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(21);
}
if (document.getElementById('audioejkaraoke') || document.getElementById('repeat')) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(221);
}
if (document.getElementById('audioejkaraoke')) {
if (('' + document.getElementById('audioejkaraoke').title + ' ').substring(0,1) != ' ') {
document.getElementById('audioejkaraoke').title=' ' + document.getElementById('audioejkaraoke').title;
if (ourbuttonwording.indexOf('<') == -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('audioejkaraoke').value=ourbuttonwording; //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('audioejkaraoke').style.position='absolute';
document.getElementById('audioejkaraoke').style.left='0px';
document.getElementById('audioejkaraoke').style.top='0px';
document.getElementById('audioejkaraoke').style.backgroundColor='transparent';
document.getElementById('audioejkaraoke').style.zIndex=karaz;
//document.getElementById('audioejkaraoke').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('audioejkaraoke').ontouchstart=function(event){ parent.onmaybesupclick(event); };
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(2221);
}
if (!document.getElementById('myrepeat')) {
if (ourbuttonwording.indexOf('<') != -1) {
if (!window.parent) {
document.body.innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' type=',' data-type=').replace(' id=',' id=myrepeat data-id=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>';
} else if (parent.document.URL.indexOf('/select_palette.') != -1) {
document.body.innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' type=',' data-type=').replace(' id=',' id=myrepeat data-id=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>';
} else {
document.body.innerHTML+=document.getElementById('repeat').outerHTML.split('/>')[0].split('>')[0].replace(' onclick=',' data-onclick=').replace(' type=',' data-type=').replace(' id=',' id=myrepeat data-id=').replace('<input','<button onmousedown=parent.onmaybesupclick(event); ontouchstart=parent.onmaybesupclick(event); data-ident="but' + ouraidis + '_' + ouriframeidis + '" ').replace(' style="', ' style="position:absolute;left:0px;top:-10px;background-color:transparent;z-index:' + eval(1 + eval('' + repeatz)) + ';') + '>' + ourbuttonwording + '</button>';
}
document.body.style.width='' + eval(50 + eval('' + document.getElementById('myrepeat').getBoundingClientRect().right)) + 'px';
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (parent.document.getElementById(ouraidis) && 1 == 7) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
alert(parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
if (document.getElementById('myiframe')) {
if (document.getElementById('myiframe').outerHTML.split('>')[0].indexOf('absolute') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(22221);
}
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
//document.getElementById('myiframe').style.backgroundColor='transparent';
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
document.getElementById('myiframe').style.opacity='0.0';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
interesting=false;
}
}
} else {
document.getElementById('repeat').value=nocaret(ourbuttonwording); //String.fromCodePoint(128276) + String.fromCodePoint(128276);
document.getElementById('repeat').style.position='absolute';
document.getElementById('repeat').style.left='0px';
document.getElementById('repeat').style.top='0px';
document.getElementById('repeat').style.backgroundColor='transparent';
document.getElementById('repeat').style.border='0px solid transparent';
document.getElementById('repeat').style.zIndex=repeatz;
//document.getElementById('repeat').onmousedown=function(event){ parent.onmaybesupclick(event); };
//document.getElementById('repeat').ontouchstart=function(event){ parent.onmaybesupclick(event); };
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
if (parent.document.getElementById(ouraidis) && 1 == 7) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.position='absolute';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.left='' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.top='' + eval(0 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().top)) + 'px';
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.zIndex='699';
document.getElementById('myiframe').style.width=eval(100 + eval('' + eval(-50 + eval('' + parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).getBoundingClientRect().right)))) + 'px';
//alert(parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).outerHTML);
}
}
interesting=false;
}
}
if (document.getElementById('myiframe')) {
if (document.getElementById('myiframe').outerHTML.split('>')[0].indexOf('absolute') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(22221);
}
document.getElementById('myiframe').style.position='absolute';
document.getElementById('myiframe').style.left='-100px';
document.getElementById('myiframe').style.top='-100px';
document.getElementById('myiframe').style.zIndex='299';
//document.getElementById('myiframe').style.backgroundColor='transparent';
//document.getElementById('myiframe').src=document.getElementById('myiframe').src;
document.getElementById('myiframe').style.opacity='0.0';
if (1 == 7) {
document.body.onmousedown=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
document.body.ontouchstart=function(event){ setTimeout(function(){
if (parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis)) {
parent.document.getElementById('inp' + ouraidis + '_' + ouriframeidis).style.display='inline-block';
} else {
alert('oops');
}
}, 2000);
};
}
interesting=false;
}
}
if (aaconto) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn(2222221);
}
aaconto.getElementById('player').style.opacity='0.0';
} else {
aaset=true;
}
document.body.style.backgroundColor='transparent';
}
} else {
interesting=false;
}
}
}, 1000);
}
if (parent.document.getElementById(ouraidis) || parent.document.getElementById(ouriframeidis)) {
if (parent.document.getElementById(ouraidis)) {
var boxis=parent.document.getElementById(ouraidis).getBoundingClientRect();
//alert('boxis.left=' + boxis.left + ' ' + top.document.getElementById('aja').innerHTML);
if (parent.document.getElementById(ouraidis).innerHTML.indexOf('<iframe') == -1) {
//alert('Boxis.left=' + boxis.left);
if (document.URL.indexOf('thebuttonwording=') != -1) {
document.body.style.width='' + eval(2 * boxis.width) + 'px';
}
if (document.getElementById('myrepeat')) {
parent.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().width)) + 'px';
parent.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().height)) + 'px';
} else if (document.getElementById('repeat')) {
parent.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().width)) + 'px';
parent.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
} else {
parent.document.getElementById(ouriframeidis).style.width='' + eval(2 * boxis.width) + 'px';
parent.document.getElementById(ouriframeidis).style.height='' + eval(1 * boxis.height) + 'px';
}
setTimeout(function(){
if (parent.document.getElementById(ouraidis).outerHTML.indexOf('<div') != -1) {
//if (parent.document.getElementById(ouriframeidis).outerHTML.indexOf('/About_Us.html')) {
//alert(parent.document.getElementById(ouraidis).title.trim());
//}
if (parent.document.getElementById(ouraidis).innerHTML.indexOf('<iframe') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('09:' + parent.document.getElementById(ouraidis).innerHTML);
}
parent.document.getElementById(ouraidis).innerHTML=parent.document.getElementById(ouriframeidis).outerHTML.replace('/About_Us.html',parent.document.getElementById(ouraidis).title.trim()).replace('justaudio','jusJUNKtauJUNKdio').replace(' onload=',' data-onload=').replace(' id=',' data-id=').replace(' name=',' data-name=').replace('none;','inline-block;').replace('NONE;','inline-block;').replace('NONE;','inline-block;').replace('hidden;','visible;');
} else {
console.warn('9:' + parent.document.getElementById(ouraidis).innerHTML);
}
} else {
if (parent.document.getElementById(ouraidis).innerHTML.indexOf('<iframe') == -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.warn('099:' + parent.document.getElementById(ouraidis).innerHTML);
}
parent.document.getElementById(ouraidis).innerHTML=parent.document.getElementById(ouriframeidis).outerHTML.replace('/About_Us.html',parent.document.getElementById(ouraidis).href).replace('justaudio','jusJUNKtauJUNKdio').replace(' onload=',' data-onload=').replace(' id=',' data-id=').replace(' name=',' data-name=').replace('none;','inline-block;').replace('NONE;','inline-block;').replace('NONE;','inline-block;').replace('hidden;','visible;');
} else {
console.warn('99:' + parent.document.getElementById(ouraidis).innerHTML);
}
}
if (parent.document.getElementById('idivf' + ouraidis)) {
parent.document.getElementById('idivf' + ouraidis).innerHTML='';
//alert(398);
} else if (1 == 1) {
if (document.getElementById('ejkaraokeshare')) {
document.getElementById('ejkaraokeshare').style.opacity='0.0';
}
if (document.getElementById('ddejkaraoke')) {
document.getElementById('ddejkaraoke').style.visibility='hidden';
}
if (document.getElementById('myrepeat')) {
document.getElementById('repeat').style.opacity='0.0';
if (document.getElementById('repeat')) { alert('huh'); }
} else if (document.getElementById('repeat')) {
document.getElementById('repeat').style.opacity='0.0';
//alert('twohuh');
}
if (1 == 5) {
if (document.getElementById('myrepeat')) {
//alert(98);
parent.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().width)) + 'px';
parent.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('myrepeat').getBoundingClientRect().height)) + 'px';
} else if (document.getElementById('repeat')) {
//alert('298 ' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)));
parent.document.getElementById(ouraidis).style.overflowY='hidden';
parent.document.getElementById(ouriframeidis).style.overflowY='hidden';
parent.document.getElementById(ouraidis).style.width='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().width)) + 'px';
parent.document.getElementById(ouraidis).style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
parent.document.getElementById(ouriframeidis).style.width='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().width)) + 'px';
parent.document.getElementById(ouriframeidis).style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
//alert('298a ' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)));
document.getElementById('myh1').style.display='none';
document.getElementById('myform').style.visibility='hidden';
//alert('298b ' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)));
//document.body.style.height='' + eval(1 * eval('' + document.getElementById('repeat').getBoundingClientRect().height)) + 'px';
}
}
}
}, 8000); // vs 2000
}
} else if (3 == 4) {
parent.document.getElementById(ouriframeidis).style.position='absolute';
parent.document.getElementById(ouriframeidis).style.left='' + boxis.left + 'px';
parent.document.getElementById(ouriframeidis).style.top='' + boxis.top + 'px';
parent.document.getElementById(ouriframeidis).style.width='' + boxis.width + 'px';
parent.document.getElementById(ouriframeidis).style.height='' + boxis.height + 'px';
parent.document.getElementById(ouriframeidis).style.display='block';
parent.document.getElementById(ouriframeidis).style.zIndex='99';
//top.document.getElementById('aja').innerHTML='  ';
}
}
}, 1000);

}, 8000);
}
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
if (top.document.title.indexOf(' justaudio ') != -1) {
asuffis='&justaudio=&';
bsuffis=' name=justaudio ';
}
}
//alert(parent.ajaxsih);
}

var cbut="<br><div style='" + defidea + "'><div id='ddkaraoke' style='display:inline; visibility: hidden; '><input onclick=\"if (document.URL.indexOf('i0=') != -1) { location.href=document.URL; } \" id='repeat' type='button' style='background-color:red;' value='Replay Karaoke Style YouTube Above'></input><br><input onclick=clickto(); id=karaokeshare value='Email Share to ' type='button'></input> <input style=width:60%; onblur=doto(this.value); type=text name=email id=karaokeemail value=></input></div><div id='dkaraoke' style='display:inline; visibility: hidden; '><input id='mousej' type='button' style='background-color:#f0f0f0; display:inline; visibility: hidden;' onclick=' mousebelowj(this);' value='Fill Table Below via Mouse Video Pauses Starting with '></input> <input id='mousei' type='button' style='background-color:#f5f5f5; display:inline; visibility: hidden;' onclick=' mousebelowi(this);' value='Fill Table Starting with 0 cell'></input> <input id='karaoke' onclick=\" mbmode=false; document.getElementById('ddkaraoke').style.visibility='visible'; if (document.URL.indexOf('i0=') != -1) { next=0; } queuenext();\" type='submit' style='background-color:orange;' value='Play Karaoke Style YouTube Via Entries Below'></input></div><div id='dkaraoke' style='display:inline; visibility: hidden; '></div></div>";
var cbutl="<div style='" + defidea + " height: 60px;'><div style=' " + defidea + " height: 60px;'><div id='dkaraoke' style=' display:inline; visibility: hidden; '><div style='" + defidea + "'><div style='" + defidea + "'><input id='karaoke' onclick=\" mbmode=false; document.getElementById('ddkaraoke').style.visibility='visible'; if (document.URL.indexOf('i0=') != -1) { next=0; } queuenext();\" type='submit' style='background-color:orange;' value='Play Karaoke Style YouTube Via Entries Below'></input></div></div></div><br><div id='ddkaraoke' style='margin-top:-100px; visibility: hidden; " + defidea + " '><div style='" + defidea + "'><div style='" + defidea + "'><input onclick=\"if (document.URL.indexOf('i0=') != -1) { location.href=document.URL; } \" id='repeat' type='button' style='background-color:red;' value='Replay Karaoke Style YouTube Above'></input><br><input onclick=clickto(); id=karaokeshare value='Email Share to ' type='button'></input><input onblur=doto(this.value); type=text name=email id=karaokeemail value=></input></div></div></div></div></div><br><br>✔ (<a onclick=\" prearwo=window.open(this.getAttribute('data-href'),'_blank','top=' + eval(-400 + screen.height) + ',left=' + eval(-1050 + screen.width) + ',width=500,height=400'); setInterval(arwoaudioablook, 5000); }, 1500);\" data-target=_blank id=arecord title='Thanks to https://online-voice-recorder.com/#google_vignette ... if it works for your browser. If not, you can consider using a desktop microphone recorder app such as Mac OS X QuickTime Player as an alternative perhaps.' data-href='https://online-voice-recorder.com/#google_vignette'>Record</a> own parts? <input type=hidden id=justaudio" + bsuffis + " value=''></input><input style=visibility:hidden; onchanged='dorecord=!dorecord;' type=checkbox name=recown id=recown value='Record own parts?'></input>) ";
var cbutm="<div style='" + defidea + " height: 60px;'><div id='dkaraokem' style='display:inline; visibility: hidden; '><input id='mousei' type='button' style='background-color:#f5f5f5; display:inline; visibility: hidden;' onclick=' mousebelowi(this);' value='Fill Table Below via Mouse Video Pauses'></input></div></div><br>Start time in seconds <span id=nm style='display:none;'>(negative means you will be singing or Prefix by Audio file URL or YouTube ID delimited by :)</span>";
var cbutr="<div style='" + defidea + " height: 60px;'><div id='dkaraoker' style='display:inline; visibility: hidden; '>        <input id='mousej' type='button' style=' background-color:#f0f0f0; display:inline; visibility: hidden;' onclick=' mousebelowj(this);' value='Fill Table Starting with '></input></div></div><br><span style=text-align:right;width:100%;>Finish</span>";
var zeroplay=-1;
var ylastokn='';
var yokn='';
var validst=true;
var yoko=null;
var donef=false;
var huhaudiow=false;
var audiow=null;
var audiof='';
var audioi=0;
var audioask=false;
var dorecord=false;
var ourrec=location.search.split('recown=')[1] ? location.search.split('recown=')[1].split('&')[0] : 'off';
var ioffset=0;
var domin=false;
var wowowo=null, lhqw=[], ijg=0;

var ipbit='';

var cdow=-1, thistprefix='', tp='';


if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html
// ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License
String.fromCodePoint = function fromCodePoint () {
var chars = [], point, offset, units, i;
for (i = 0; i < arguments.length; ++i) {
point = arguments[i];
offset = point - 0x10000;
units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point];
chars.push(String.fromCharCode.apply(null, units));
}
return chars.join("");
}
}

var audiobut='';
if ((documentURL + '&' + asuffis).indexOf('justaudio=&') != -1 && (documentURL.indexOf('youtube_duration=&') == -1 && documentURL.indexOf('youtube_duration=') != -1) && documentURL.indexOf('youtubeid=') != -1 && documentURL.indexOf('emoji=') != -1) {
audiobut=('<input class="emoji" id="audioejkaraoke" onclick=" document.getElementById(`myiframe`).style.marginTop=`0px`; document.getElementById(`myiframe`).style.opacity=`1`; document.getElementById(`myiframe`).style.filter="invert(0)"; this.style.display=`none`; " type="submit" style="background-color: orange; visibility: visible;" value="' + String.fromCodePoint(128249) + ' Play Video as below" title="Play Karaoke Style YouTube Video Via Entries Below">').replace(/\`/g,"'");
} else {
audiobut=('<input class="emoji" id="audioejkaraoke" onclick=" document.getElementById(`justaudio`).name=`justaudio`; mbmode=false; document.getElementById(`ddejkaraoke`).style.visibility=`visible`; if (document.URL.indexOf(`i0=`) != -1) { next=0; } isendof=ieo; queuenext(); " type="submit" style="background-color: orange; visibility: visible;" value="' + String.fromCodePoint(128483) + ' Play Audio as below" title="Play Karaoke Style YouTube Audio Via Entries Below">').replace(/\`/g,"'");
}

function yesesp() {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) { return true; }
return false;
}

function setforcemix(towh) {
forcemix=towh;
}

function nocaret(inx) {
if (inx.indexOf('<') != -1) {
var xv, vx, mbits=inx.replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').replace('"','').split(','), outx='';
xv=mbits[0].split('</a>');
vx=xv[0].split('>');
outx=vx[eval(-1 + vx.length)];
xv=mbits[1].split('</a>');
vx=xv[0].split('>');
outx+=',' + vx[eval(-1 + vx.length)];
return outx;
} else {
return inx;
}
}

function zatogglevalue() {
var ione=0, theval=zaconto.getElementById('i0').value;
//alert('theval=' + theval);
while (zaconto.getElementById('i' + ione)) {
if (theval == '') {
zaconto.getElementById('i' + ione).value='' + zaconto.getElementById('i' + ione).getAttribute('data-value');
} else {
zaconto.getElementById('i' + ione).value='';
}
ione++;
}
}

function usethis(iois) {
if (iois.src.indexOf('client_browsing.htm') != -1) {
yaconto = (iois.contentWindow || iois.contentDocument);
if (yaconto != null) {
ywaconto=yaconto;
if (yaconto.document) { yaconto = yaconto.document; }
}
}
}

function usethistwo(iois) {
if (iois.src.indexOf('client_browsing.htm') != -1) {
waconto = (iois.contentWindow || iois.contentDocument);
if (waconto != null) {
wwaconto=waconto;
if (waconto.document) { waconto = waconto.document; }
}
}
}

function checkzz(iois) {
var ione=1;
if (iois.src.indexOf('karaoke_youtube_api.htm') != -1) {
zaconto = (iois.contentWindow || iois.contentDocument);
if (zaconto != null) {
zwaconto=zaconto;
if (zaconto.document) { zaconto = zaconto.document; }
if (document.URL.indexOf('#http') != -1) {
if (zaconto.getElementById('myh1')) {
setTimeout(function(){
zaconto.getElementById('i0').placeholder='' + zaconto.getElementById('myh1').innerHTML + ' ... double click or right click or spread/pinch to play now ...';
zaconto.getElementById('i0').title='' + zaconto.getElementById('myh1').innerHTML + ' ... double click or right click or spread/pinch to play now ...';
zaconto.getElementById('i0').setAttribute('data-index', '0');
zaconto.getElementById('i0').setAttribute('data-value', '' + zaconto.getElementById('i0').value);
zaconto.getElementById('i0').ondblclick=function(event){ location.href=document.getElementById('iflist').src; };
zaconto.getElementById('i0').oncontextmenu=function(event){ location.href=document.getElementById('iflist').src; };
zaconto.getElementById('i0').ontouchend=function(event){ location.href=document.getElementById('iflist').src; };
while (zaconto.getElementById('i' + ione)) {
zaconto.getElementById('i' + ione).setAttribute('data-value', '' + zaconto.getElementById('i' + ione).value);
zaconto.getElementById('i' + ione).placeholder=zaconto.getElementById('i' + ione).title;
ione++;
}
//alert('1:' + zaconto.getElementById('myh1').innerHTML);
}, 5000);
setInterval(zatogglevalue, 8000);
}
} else {
if (zaconto.getElementById('myh1')) {
setTimeout(function(){
//alert('2:' + zaconto.getElementById('myh1').innerHTML);
zaconto.getElementById('i0').placeholder='' + zaconto.getElementById('myh1').innerHTML + ' ... double click or right click or spread/pinch to play now ...';
//alert('21:' + zaconto.getElementById('myh1').innerHTML);
zaconto.getElementById('i0').title='' + zaconto.getElementById('myh1').innerHTML + ' ... double click or right click or spread/pinch to play now ...';
//alert('22:' + zaconto.getElementById('myh1').innerHTML);
zaconto.getElementById('i0').setAttribute('data-value', '' + zaconto.getElementById('i0').value);
zaconto.getElementById('i0').setAttribute('data-index', '0');
//alert('23:' + zaconto.getElementById('myh1').innerHTML);
zaconto.getElementById('i0').ondblclick=function(event){ location.href=document.getElementById('iflist').src; };
//alert('24:' + zaconto.getElementById('myh1').innerHTML);
zaconto.getElementById('i0').oncontextmenu=function(event){ location.href=document.getElementById('iflist').src; };
//alert('25:' + zaconto.getElementById('myh1').innerHTML);
zaconto.getElementById('i0').ontouchend=function(event){ location.href=document.getElementById('iflist').src; };
//alert('26:' + zaconto.getElementById('myh1').innerHTML);
while (zaconto.getElementById('i' + ione)) {
zaconto.getElementById('i' + ione).setAttribute('data-value', '' + zaconto.getElementById('i' + ione).value);
zaconto.getElementById('i' + ione).placeholder=zaconto.getElementById('i' + ione).title;
ione++;
}
}, 5000);
setInterval(zatogglevalue, 8000);
}
}
}
}
}

function checkss(iois) {
if (iois == null) {
aaconto = (iois.contentWindow || iois.contentDocument);
if (aaconto != null) {
waaconto=aaconto;
if (aaconto.document) { aaconto = aaconto.document; }
if (aaset) {
aaset=false;
aaconto.getElementById('player').style.opacity='0.0';
if (document.URL.indexOf('&startagain=') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
setTimeout(function(){ waaconto.sagain(); waaconto.playVideo(); }, 5000);
}
}
}
} else {
ssconto = (iois.contentWindow || iois.contentDocument);
if (4 == 5) {
sscontomonitor=ssconto.monitorplh;
console.warn('document.URL=' + document.URL);
console.warn('parent.document.URL=' + parent.document.URL);
}
//if (('' + document.URL + 's').replace(/\#https/g,'') != ('' + document.URL + 's') || ('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
//alert('Here Opening');
//}
}
}


function checkip(iois) {
if (iois == null) {
if (ipbit != '') {
return ipbit;
}
} else if (iois.src.indexOf('signature_signature.php') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body.innerHTML.indexOf('<p>') == 0) {
ipbit=aconto.body.innerHTML.split('<p>')[1].split('<')[0];
}
}
}
return '';
}

function mintoajax() {
var postpc='2';
var pc='';
if (document.getElementById('ominpossible')) {
document.getElementById('ominpossible').innerHTML='📹';
}
if (1 == 1) {
if (('' + document.getElementById('ajaxs').style.left) != '0px') {
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
pc='26'; //'5';
postpc='';
}
//alert(parent.ajaxsih);
}
document.getElementById('ajaxs').style.position='absolute';
document.getElementById('ajaxs').style.left='0px';
document.getElementById('ajaxs').style.top='' + pc + postpc + 'px';
if (document.getElementById('stz')) {
document.getElementById('stz').scrollIntoView();
}
}
} else {
var rect=document.getElementById('ajaxs').getBoundingClientRect();
window.scrollTo(eval(('' + rect.left).replace('px','').split('.')[0]), eval(('' + rect.top).replace('px','').split('.')[0]));
}
}

function closelastdet() {
var readie=false;
if (lastdet != '') {
var dets=document.getElementsByTagName('details');
for (var idets=0; idets<dets.length; idets++) {
if (('' + dets[idets].id) == lastdet) {
dets[idets].removeAttribute('open');
readie=true;
} else if (readie) {
readie=false;
ets[idets].setAttribute('open', true);
lastdet=('' + dets[idets].id);
}
}
if (readie) {
lastdet='dt1';
document.getElementById(lastdet).setAttribute('open', true);
}
}
}

function audioanal() {
var lhnew='';
var audsz=document.getElementsByTagName('audio');
for (var startw=0; startw<audsz.length; startw++) {
if (('' + audsz[startw].id).indexOf('ab') == 0) {
if (lhnew == '') { lhnew='#'; }
lhnew+=encodeURIComponent('&c' + startw + '=on&j' + startw + '=' + encodeURIComponent(audsz[startw].getAttribute('data-duration')) + '&i' + startw + '=' + encodeURIComponent(audsz[startw].src));
}
}
audsz=document.getElementsByTagName('video');
for (var startw=0; startw<audsz.length; startw++) {
if (('' + audsz[startw].id).indexOf('vb') == 0) {
if (lhnew == '') { lhnew='#'; }
lhnew+=encodeURIComponent('&c' + startw + '=on&j' + startw + '=' + encodeURIComponent(audsz[startw].getAttribute('data-duration')) + '&i' + startw + '=' + encodeURIComponent(audsz[startw].src));
}
}
audsz=document.getElementsByTagName('img');
for (var startw=0; startw<audsz.length; startw++) {
if (('' + audsz[startw].id).indexOf('gb') == 0) {
if (lhnew == '') { lhnew='#'; }
lhnew+=encodeURIComponent('&c' + startw + '=on&j' + startw + '=' + encodeURIComponent(audsz[startw].getAttribute('data-duration')) + '&i' + startw + '=' + encodeURIComponent(audsz[startw].src));
}
}
if (lhnew != '') {
if (!lhwo) {
if (browsebut == '') {
lhwo=window.open('//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?rand=' + Math.floor(Math.random() * 1989786) + lhnew, '_blank', 'top=10,left=' + eval(-800 + screen.width) + ',width=800,height=600');
}
} else {
if (browsebut == '') {
lhwo.location.href='//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?rand=' + Math.floor(Math.random() * 1989786) + lhnew;
}
}
}
}

function putdrback() {
var swz=0;
while (document.getElementById('i' + swz)) {
if (document.getElementById('i' + swz).outerHTML.indexOf(' data-realvalue') != -1) {
document.getElementById('i' + swz).value=document.getElementById('i' + swz).getAttribute('data-realvalue');
}
swz++;
}
}

function lookatmultiple(newsc) {
var startw=0, lhnew='', ormaybe=false, gormaybe=false, thispre='';
if (newartwo) { newartwo=false; return false; }
if (('' + newsc) != '2') {
if (('' + newsc) == '1') {
//alert('Here');
if (document.getElementById('i' + startw)) {
while (document.getElementById('j' + startw)) {
document.getElementById('j' + startw).disabled=false;
startw++;
}
startw=0;
if (document.getElementById('c' + startw).checked) {
ormaybe=false;
if (document.getElementById('i' + eval(1 + startw))) {
if (document.getElementById('c' + eval(1 + startw)).checked) {
if (document.getElementById('i' + eval(1 + startw)).value.indexOf('data:') != -1) {
ormaybe=true;
gormaybe=true;
//alert('here now');
}
}
}
//alert('gormaybe=' + gormaybe);
if (document.getElementById('i' + startw).value.indexOf('data:') != -1 || ormaybe) {
if (document.getElementById('i' + startw).value.indexOf('data:') == -1) { startw++; }
while (document.getElementById('i' + startw).value.indexOf('data:') != -1 && document.getElementById('c' + startw).checked) {
if (lhnew == '') { lhnew='#'; }
thispre='';
if (gormaybe) { thispre=document.getElementById('i' + startw).value.split('data:')[0]; document.getElementById('i' + startw).setAttribute('data-realvalue', document.getElementById('i' + startw).value); }
if (document.getElementById('i' + startw).value.indexOf('data:image/svg') != -1) {
lhnew+=encodeURIComponent('&c' + startw + '=on&i' + startw + '=' + encodeURIComponent(document.getElementById('i' + startw).value.split('data:')[0] + 'data:' + document.getElementById('i' + startw).value.split('data:')[1]) + '&j' + startw + '=' + encodeURIComponent(document.getElementById('j' + startw).value));
} else {
lhnew+=encodeURIComponent('&c' + startw + '=on&i' + startw + '=' + encodeURIComponent(document.getElementById('i' + startw).value.split('data:')[0] + 'data:' + document.getElementById('i' + startw).value.split('data:')[1].substring(0,Math.min(5000,eval('' + document.getElementById('i' + startw).value.length)))) + '&j' + startw + '=' + encodeURIComponent(document.getElementById('j' + startw).value));
}
if (gormaybe) { document.getElementById('i' + startw).value=thispre + 'data'; }
startw++;
ormaybe=false;
if (document.getElementById('i' + eval(1 + startw))) {
if (document.getElementById('c' + eval(1 + startw)).checked) {
if (document.getElementById('i' + eval(1 + startw)).value.indexOf('data:') != -1 && document.getElementById('i' + startw).value.indexOf('data:') == -1) {
ormaybe=true;
startw++;
}
}
}
}
}
}
}
if (lhnew != '') {
//alert('yes!');
document.getElementById('myform').action=document.getElementById('myform').action.split('#')[0] + lhnew;
}
}
if (gormaybe) {
setTimeout(putdrback, 2000);
}
if (document.getElementById('ajaxs')) { return true; }
}
if (!document.getElementById('ajaxs')) { return true; }
var vidtitles='';
var newdefc=0, hvis=[];
var aot,jaot=0,aotfactor=1.0,iaot,aotdur=0.0,faot=[60.0,60.0,24.0];
var sin=document.getElementById('ajaxs');
//alert('' + sin.id);
var zero=0, lone=1, tod='', iickk;
var spareanyt='//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=&youtube_duration=&email=&email=&emoji=on&c0=on&i0=0&j0=&rand=' + Math.floor(Math.random() * 1989786);
for (var ii=0; ii<sin.options.length; ii++) {
if (sin.options[ii].selected) { // && sin.options[ii].text.indexOf(String.fromCodePoint(10004)) != -1) {
if (sin.options[ii].value != '') {
//alert(sin.options[ii].value);
aotdur=0.0;
aotfactor=1.0;
jaot=0;
if (vidtitles == '') {
vidtitles='&vidtitles=' + encodeURIComponent(sin.options[ii].text.split(String.fromCodePoint(10004))[0].trim());
} else {
vidtitles+=encodeURIComponent(String.fromCodePoint(10004) + sin.options[ii].text.split(String.fromCodePoint(10004))[0].trim());
}
aot=sin.options[ii].text.split('(')[eval(-1 + sin.options[ii].text.replace(')',' ').split('(').length)].replace(')',' ').split(':');
if (aot.length == 1 && aot[0].replace(' second ',',').replace(' seconds ',',').indexOf(',') != -1) {
hvis=aot[0].split(' hour');
if (hvis.length != 1) { console.log(hvis[0]); aotdur+=eval(eval('' + hvis[0]) * 60 * 60); aot[0]=aot[0].replace(' hours,',' hour').replace(' hour,',' hour').split(' hour')[1]; }
hvis=aot[0].split(' minute');
if (hvis.length != 1) { console.log(hvis[0]); aotdur+=eval(eval('' + hvis[0]) * 60); aot[0]=aot[0].replace(' minutes,',' minute').replace(' minute,',' minute').split(' minute')[1]; }
hvis=aot[0].split(' second');
if (hvis.length != 1) { console.log(hvis[0]); aotdur+=eval(eval('' + hvis[0]) * 1); }
} else {
for (iaot=eval(-1 + aot.length); iaot>=0; iaot--) {
aotdur+=eval(aotfactor * aot[iaot]);
jaot++;
aotfactor *= faot[jaot];
}
}
if (aotdur > 0.0) {
if (spareanyt.indexOf('youtubeid=&') != -1) {
spareanyt=spareanyt.replace('youtubeid=&', 'youtubeid=' + sin.options[ii].value + '&').replace('youtube_duration=&', 'youtube_duration=' + encodeURIComponent(Math.ceil(eval('' + aotdur)) + '.000') + '&').replace('j0=', 'j0=' + Math.ceil(eval('' + aotdur)) + '');
} else {
spareanyt+='&c' + lone + '=on&i' + lone + '=0|' + sin.options[ii].value + '&j' + lone + '=' + Math.ceil(eval('' + aotdur));
lone++;
tod=' ';
}
newdefc++;
//alert('' + newdefc + ': ' + spareanyt);
}
}
}
}
if (newdefc > 1) {
for (iickk=lone; iickk<=29; iickk++) {
spareanyt+='&c' + iickk + '=off&i' + iickk + '=&j' + iickk + '=';
}
//alert(spareanyt + tod.replace(' ','#' + encodeURIComponent(document.URL.split(':')[0] + ':' + spareanyt + '&loop=y')).trim());
if (newsc == 0 || newsc == 2) {
document.getElementById('myform').target='_blank';
//document.getElementById('myform').action=document.getElementById('myform').action.split('#')[0] + '#' + encodeURIComponent(document.URL.split(':')[0] + ':' + spareanyt + '&loop=y');
document.getElementById('sumlist').innerHTML=document.getElementById('youtubeid').value.trim();
document.getElementById('iflist').src=spareanyt + tod.replace(' ','#' + encodeURIComponent(document.URL.split(':')[0] + ':' + spareanyt + '&loop=y' + vidtitles)).trim();
document.getElementById('detlist').style.display='block';
setTimeout(function(){ document.getElementById('detlist').scrollIntoView(); }, 2000); //location.href='#detlist';
} else if (1 == 1) {
document.getElementById('myform').target='_blank';
document.getElementById('myform').action=document.getElementById('myform').action.split('#')[0] + '#' + encodeURIComponent(document.URL.split(':')[0] + ':' + spareanyt + '&loop=y');
} else {
wowowo=window.open(spareanyt + tod.replace(' ','#' + encodeURIComponent(document.URL.split(':')[0] + ':' + spareanyt + '&loop=y')).trim(), '_blank'); //, 'top=100,left=100,width=1000,height=800');
}
}
return true;
}

function oncntapp(sva,svatl,sov) {
var comma='';
rep+='T';
// var ajaxclist='', ajaxoncnt=0;
//var thismulti=document.getElementById('cajaxs').checked;
if ((eval('' + sva.trim().length) == 34 || eval('' + sva.trim().length) == 22) && sva.trim().indexOf(' ') == -1) {
if (plo) {
if (!plo.closed) {
try {
plo.close();
} catch(ert) {
}
}
plo=null;
}
if (eval('' + sva.trim().length) == 34) {
plo=window.open('//www.youtube.com/watch?v=&index=1&list=' + sva, '_blank', 'width=600,height=600,top=0,left=' + eval(-600 + eval('' + screen.width)));
} else if (eval('' + sva.trim().length) == 22) {
plo=window.open('//open.spotify.com/playlist/' + sva, '_blank', 'width=600,height=600,top=0,left=' + eval(-600 + eval('' + screen.width)));
}
} else if (eval('' + sva.trim().length) == 11 && sva.trim().indexOf(' ') == -1) {
ajaxoncnt++;
if (ajaxclist == '') {
ajaxclist=sva.trim();
ajaxf=svatl.split('(')[0];
sov.style.backgroundColor='lightgreen';
} else if ((',' + ajaxclist + ',').indexOf(',' + sva.trim() + ',') != -1 && firstrepeat) {
firstrepeat=false;
if (ajaxclist.indexOf(sva.trim()) == 0) {
ajaxclist=ajaxclist.replace(sva.trim() + ',', '').replace(sva.trim() + '', '');
} else {
ajaxclist=ajaxclist.replace(',' + sva.trim() + '', '');
}
ajaxoncnt=eval('' + ajaxclist.split(',').length);
sov.style.backgroundColor='white';
} else if ((',' + ajaxclist + ',').indexOf(',' + sva.trim() + ',') != -1 && !firstrepeat) {
ajaxclist+=',' + sva.trim();
sov.style.backgroundColor='lightgreen';
} else {
ajaxclist+=',' + sva.trim();
sov.style.backgroundColor='lightgreen';
}
} else if (sva.trim() == '') {
ajaxclist='';
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('why1');
//}
ajaxoncnt=0;
ajaxf='';
}

//document.title='ajaxclist=' + ajaxclist + ' and ajaxoncnt=' + ajaxoncnt;
var tickis=' ' + String.fromCodePoint(10004);
var defc=0;
var sin=document.getElementById('ajaxs');
for (var ii=0; ii<sin.options.length; ii++) {
if (sin.options[ii].selected) {
if (sin.options[ii].value != '') { defc++; }
}
}

if (eval('' + defc) <= eval('' + ajaxoncnt) && eval('' + ajaxoncnt) >= 1 && eval('' + defc) > 1) {
ajaxoncnt=0;
ajaxclist='';
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('why2');
//}
ajaxf='';
for (var iiijk=0; iiijk<sin.options.length; iiijk++) {
if (sin.options[iiijk].selected) {
ajaxoncnt++;
ajaxclist+=comma + sin.options[iiijk].value.trim();
comma=',';
if (sin.options[iiijk].innerText.indexOf(tickis) == -1) {
sin.options[iiijk].innerText+=tickis;
} else {
sin.options[iiijk].innerText=sin.options[iiijk].innerText.split(tickis)[0] + tickis;
}
} else {
sin.options[iiijk].style.backgroundColor='white';
if (sin.options[iiij //alert(3);
location.hash='#srt=' + encodeURIComponent(washgrip);
hgrip='';
}
}
}

function nextfauxdef() {
if (fauxpas_w) {
if ((eval(fauxdefcnt % 2) == 1 || lastfauxdef != '') || fauxdefcnt == 0) {
lastfauxdef='';
return ' ';
}
lastfauxdef=fauxdef;
return fauxdef;
}
return '';
}

function getlh() {
return ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'');
}

function maybedet(inid) {
if (document.getElementById('detdiv' + inid)) {
return 'detdiv' + inid;
} else if (document.getElementById(inid)) {
if (document.getElementById(inid).innerHTML == '') {
if (window.parent) {
if (window.parent.parent) {
//alert('3:' + parent.parent.document.URL);
if (parent.parent.document.URL.indexOf('/video_commentary.htm')) {
ggsandc='Commentary note';
ggsoc=parent.parent.docomcheck;
} else if (parent.parent.document.URL.indexOf('/song_lyric_faux_pas.htm') == -1) {
if (parent.parent.document.getElementById('conceptsubject')) {
ggsandc=parent.parent.document.getElementById('conceptsubject').value;
ggsoc=parent.parent.docomcheck;
}
}
} else {
ggsandc=ggsandc;
}
} else {
ggsandc=ggsandc;
}
document.getElementById(inid).innerHTML='<details id="det' + inid + '" open><summary id="sum' + inid + '">' + ggsandc + ' ...</summary><div id="detdiv' + inid + '"></div></details>';
return 'detdiv' + inid;
}
}
return inid;
}

function writeoutsubtitle() {
var newsubi=-1, ithings=0;
//console.log('cAll ' + enforcedtimeis + ' ' + cursecselapsed);
if (enforcedtimeis >= 0.0) {
cursecselapsed=enforcedtimeis;
}
if (cursecselapsed >= 0.0 && cursubi >= 0 && eval('' + etimes.length) > 0 && eval('' + stimes.length) > 0 && eval('' + timesubtitles.length) > 0) {
if (enforcedtimeis < 0.0) {
cursecselapsed+=0.1;
}
//console.log('' + cursecselapsed);
if (eval(cursecselapsed) >= eval(stimes[cursubi]) && eval(cursecselapsed) <= eval(etimes[cursubi])) {
if (document.getElementById('subtitlegoeshere').innerHTML == '' && eval('' + timesubtitles.length) > cursubi) {
console.log('found for ' + cursubi);
document.getElementById(maybedet('subtitlegoeshere')).innerHTML=whichone(timesubtitles[cursubi]);
if (('' + document.getElementById('subtitlegoeshere').title) == ('' + document.getElementById('subtitlegoeshere').title).trim()) {
document.getElementById('subtitlegoeshere').title+=' ';
}
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
if (('' + parent.document.getElementById('preareyousinging').title) == '') {
parent.document.getElementById('preareyousinging').title='Captions and subtitles ';
if (wpwp) {
//alert(8);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
} else if (!wpp) {
//alert(1);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
} else {
//alert(11);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
}
}
parent.document.getElementById('preareyousinging').style.backgroundColor='orange';
parent.document.getElementById(parent.maybedetstart('preareyousinging', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('preareyousinging').title=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
} else if (parent.document.getElementById('subtitlegoeshere')) {
if (('' + parent.document.getElementById('subtitlegoeshere').title) == ('' + parent.document.getElementById('subtitlegoeshere').title).trim()) {
parent.document.getElementById('subtitlegoeshere').title+=' ';
}
parent.document.getElementById(parent.maybedetstart('subtitlegoeshere', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('subtitlegoeshere').title=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
} else {
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
}
} else {
for (ithings=0; ithings<stimes.length; ithings++) {
if (eval(cursecselapsed) >= eval(stimes[ithings]) && eval(cursecselapsed) <= eval(etimes[ithings])) {
newsubi=ithings;
//alert('yes ' + ithings);
}
}
if (eval(newsubi) < 0) {
document.getElementById('subtitlegoeshere').innerHTML=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.trim(), '').replace(/\ /g,' ');
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById(parent.maybedet('preareyousinging')).innerHTML=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.trim(), '').replace(/\ /g,' ');
} else if (parent.document.getElementById('subtitlegoeshere')) {
parent.document.getElementById(parent.maybedet('subtitlegoeshere')).innerHTML=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.trim(), '').replace(/\ /g,' ');
}
}
}
if (eval(newsubi) >= 0 && eval(cursubi) >= 0 && eval(newsubi) != eval(cursubi)) {
//alert('' + timesubtitles.length + ' needs to be bigger than ' + newsubi);
if (eval('' + timesubtitles.length) > eval(newsubi)) {
cursubi=newsubi;
console.log('Found for ' + cursubi);
if (('' + timesubtitles[cursubi]).replace(/^undefined$/g,'').replace('WEBVTT FILE', '') != '') {
document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
if (('' + parent.document.getElementById('preareyousinging').title) == '') {
parent.document.getElementById('preareyousinging').title='Captions and subtitles ';
if (wpwp) {
//alert(88);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
} else if (!wpp) {
//alert(111);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
} else {
//alert(1111);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
}
}
parent.document.getElementById('preareyousinging').style.backgroundColor='orange';
parent.document.getElementById(parent.maybedetstart('preareyousinging', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('preareyousinging').title=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
} else if (parent.document.getElementById('subtitlegoeshere')) {
if (('' + parent.document.getElementById('subtitlegoeshere').title) == ('' + parent.document.getElementById('subtitlegoeshere').title).trim()) {
parent.document.getElementById('subtitlegoeshere').title+=' ';
}
parent.document.getElementById(parent.maybedetstart('subtitlegoeshere', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('subtitlegoeshere').title=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
} else {
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
}
}
} else if (eval(newsubi) >= 0 && eval(cursubi) >= 0 && document.getElementById('subtitlegoeshere').innerHTML == '') {
console.log('Found For ' + cursubi);
if (('' + timesubtitles[cursubi]).replace(/^undefined$/g,'').replace('WEBVTT FILE', '') != '') {
document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById(parent.maybedet('preareyousinging')).style.backgroundColor='orange';
parent.document.getElementById(parent.maybedetstart('preareyousinging', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('preareyousinging').title=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
} else if (parent.document.getElementById('subtitlegoeshere')) {
parent.document.getElementById(parent.maybedetstart('subtitlegoeshere',whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('subtitlegoeshere').title=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
} else {
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
}
}
}
}
if (!isnotplaying) { enforcedtimeis=-1.0; }
}

function convertSrtToText(srt) { // thanks to https://medium.com/@backlinkss.info/convert-srt-to-text-regex-javascript-9660964ee3f0
// Use a expressão regular para remover os números de linha e as marcas de tempo
return srt.replace(/^\d+\n([\d:,.]+ --> [\d:,.]+\n)/gm, '');
}

function fromsecs(outsecs) {
var fromthistimestamp=''; // 21.681 becomes 00:00:02.681
var hrs=Math.floor(eval(outsecs / 3600.0));
var mns=Math.floor(eval(eval(outsecs - hrs * 3600.0) / 60.0));
var scs=Math.floor(eval(eval(outsecs - hrs * 3600.0 - mns * 60.0) / 1.0));
var msc=('' + ('' + (eval(eval(outsecs - hrs * 3600.0 - mns * 60.0 - scs) / 1.0)) + '.').split('.')[1] + '000').substring(0,3);
fromthistimestamp=('0' + ('' + hrs)).slice(-2) + ':' + ('0' + ('' + mns)).slice(-2) + ':' + ('0' + ('' + scs)).slice(-2) + ',' + msc;
//alert('' + outsecs + ' becomes ' + fromthistimestamp);
return ('' + fromthistimestamp).replace(/00\:\00\:00\,000/g, '00:00:00,001').replace(/00\:\00\:00\.000/g, '00:00:00.001');
}

function tosecs(fromthistimestamp) {
//alert('fromthistimestamp=' + fromthistimestamp);
var outsecs=0.0, cola=[], cfactor=1.0, icf=0;
if (fromthistimestamp.replace('.',',').indexOf(',') != -1) {
outsecs+=eval(eval('' + fromthistimestamp.replace('.',',').split(',')[1]) / Math.pow(10.0, eval('' + fromthistimestamp.replace('.',',').split(',')[1].length)));
fromthistimestamp=fromthistimestamp.replace('.',',').split(',')[0];
}
cola=fromthistimestamp.split(':');
for (icf=eval(-1 + cola.length); icf>=0; icf--) {
if (('' + cola[icf]).replace(/0/g,'') != '') {
outsecs+=eval(eval(('' + cola[icf]).replace(/^0/g,'')) * cfactor);
}
//if (fromthistimestamp.indexOf(':01:') != -1) {
//alert('cola[icf]=' + cola[icf] + ' cfactor=' + cfactor + ' outsecs=' + outsecs + ' via ' + fromthistimestamp);
//}
cfactor*=60.0;
}
return outsecs;
}

function stateChanged() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (xhr.response.indexOf(String.fromCharCode(10)) != -1) {
gsrt=xhr.response;
stimes=[];
etimes=[];
timesubtitles=[];
processsrt('');
}
}
}
}

function processsrt(instis) {
var it=0, interimsrt=[];
if (instis != '') {
//alert('instis=' + instis);
gsrt=decodeURIComponent(decodeURIComponent(instis).replace(/\ \+/g,' %2b').replace(/\+/g,' '));
if (gsrt != '' && gsrt.indexOf(String.fromCharCode(10)) == -1 && gsrt.indexOf('=') != -1) {
gsrt=gsrt.split('=')[eval(-1 + gsrt.split('=').length)] + '.srt';
}
if (gsrt.toLowerCase().trim() != gsrt.toLowerCase().trim().replace(/\.srt$/g,'').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt')) {
xhr = new XMLHttpRequest();
xhr.onreadystatechange=stateChanged;
createdlh='#srt=' + encodeURIComponent(gsrt.replace(/SRT\.srt$/g, '.SRT'));
xhr.open('get',gsrt.replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt'),true);
xhr.send(null);
gsrt='';
return decodeURIComponent(instis).replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt');
}
//gsrt='';
//return decodeURIComponent(instis).replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt');
}
if (gsrt != '') {
//alert('gsrt=' + gsrt);
if (gsrt.indexOf('=WEBVTT FILE') != -1) {
gsrt='WEBVTT FILE' + gsrt.split('=WEBVTT FILE')[eval(-1 + gsrt.split('=WEBVTT FILE').length)];
} else if (gsrt.indexOf('WEBVTT FILE') != -1) {
gsrt='WEBVTT FILE' + gsrt.split('WEBVTT FILE')[eval(-1 + gsrt.split('WEBVTT FILE').length)];
}
if (gsrt.indexOf('1' + String.fromCharCode(10) + '0') > 0) {
gsrt='1' + String.fromCharCode(10) + '0' + gsrt.substring(gsrt.indexOf('1' + String.fromCharCode(10) + ' 0'));
} else if (gsrt.indexOf('1' + String.fromCharCode(10)) > 0) {
gsrt='1' + String.fromCharCode(10) + gsrt.substring(gsrt.indexOf('1' + String.fromCharCode(10) + ' '));
}
//alert('GSRT=' + gsrt.replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)));
gsrt=gsrt.replace(/\~/g, String.fromCharCode(10));
stimes=[];
etimes=[];
stimesf=[];
etimesf=[];
alttimesubtitles=[];
interimsrt=gsrt.split(' --> ');
timesubtitles=convertSrtToText(gsrt).split(String.fromCharCode(10) + String.fromCharCode(10));
for (it=0; it<timesubtitles.length; it++) {
alttimesubtitles.push('');
}
var what='';
for (it=1; it<timesubtitles.length; it++) {
if (timesubtitles[it].trim().slice(-1) == '}' && timesubtitles[it].trim().indexOf('{') > 0) {
alttimesubtitles[it]=timesubtitles[it].trim().split('{')[1].split('}')[0].split('": "')[eval(-1 + timesubtitles[it].trim().split('{')[1].split('}')[0].split('": "').length)].split('"')[0].replace(/\+/g,'%20').replace(/\%2b/g,'+');
timesubtitles[it]=timesubtitles[it].split('{')[0];
}
what+=' ' + timesubtitles[it];
while (what.indexOf(String.fromCharCode(10)) != -1) {
what=what.replace(String.fromCharCode(10), ' ');
}
//window.open('HTTP://localhost:8888/macos_say_record.php?andsoonclose=y&docronwork=say%20' + encodeURIComponent(what), 'sayif', 'top=50,left=50,width=500,height=500');
//what='';
}
//alert(what);
console.log(timesubtitles);
// 1\n00:00:10,500 --> 00:00:13,000\nhuh\n\n2\n00:00:13,000 --> 00:00:23,000\nhuhagain
stimes.push(0.0);
etimes.push(0.0);
stimesf.push('00:00:00.000');
etimesf.push('00:00:00.000');
for (it=1; it<interimsrt.length; it++) {
stimesf.push(('' + (interimsrt[eval(-1 + it)].split(String.fromCharCode(10))[eval(-1 + interimsrt[eval(-1 + it)].split(String.fromCharCode(10)).length)])).replace(',','.'));
etimesf.push(('' + (interimsrt[eval(0 + it)].split(String.fromCharCode(10))[0])).replace(',','.'));
stimes.push(tosecs(interimsrt[eval(-1 + it)].split(String.fromCharCode(10))[eval(-1 + interimsrt[eval(-1 + it)].split(String.fromCharCode(10)).length)]));
etimes.push(tosecs(interimsrt[eval(0 + it)].split(String.fromCharCode(10))[0]));
}
//alert('' + stimes.length + '/' + etimes.length + '/' + timesubtitles.length);
//console.warn(stimes);
//console.warn(etimes);
//console.warn(timesubtitles);

if (!document.getElementById('mysubrip')) {
if (eval('' + etimes.length) > 0) {
cursubi=0;
//alert('yes');
setInterval(writeoutsubtitle, 100);
}
}
}
if (!document.getElementById('mysubrip')) {
if (createdlh == '') {
createdlh='#srt=' + encodeURIComponent(decodeURIComponent(instis).replace(/\+/g,' '));
}
}
//alert('' + stimes.length + '/' + etimes.length + '/' + timesubtitles.length);
//console.log(stimes);
//console.log(etimes);
//console.log(timesubtitles);
return decodeURIComponent(instis);
}

function checkip(iois) {
if (iois.src.indexOf('signature_signature.php') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body.innerHTML.indexOf('<p>') == 0) {
ipbit=aconto.body.innerHTML.split('<p>')[1].split('<')[0];
}
}
}
}

function sendoff() {
if (urlis != '') {
//alert(urlis);
document.getElementById('fgrid').submit();
//location.href=urlis;
//urlis='';
}
}


function iframemode(inoup) {
// ?total=9&tag=div&period=4000&from=%3ciframe src%3d%22hb11.jpg%22%3e%3c/iframe%3e&to=%3ciframe src%3d%22bb11.jpg%22%3e%3c/iframe%3e
urlis='';
var suff='?', total=0;
retval=inoup;
vidarr=inoup.split(',');
for (var jk=0; jk<9; jk+=1) { //2) {
if (jk < vidarr.length) {
total++;
} else {
total++;
document.getElementById('p' + eval(eval(jk + 1) / 1)).value='?total=9&tag=div&period=4' + eval(eval(jk + 1) / 1) + '00&from=&to=';
}
}
for (var ik=0; ik<9; ik+=1) { //2) {
if (ik < vidarr.length) {
//if (urlis == '') urlis='http://www.rjmprogramming.com.au/HTMLCSS/reveal_div.php';
if (urlis == '') urlis='//www.rjmprogramming.com.au/HTMLCSS/reveal_div.php';
if (eval(10 + ik) < vidarr.length) {
document.getElementById('p' + eval(eval(ik + 1) / 1)).value='?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[eval(10 + ik)];
urlis+=suff + 'p' + + eval(eval(ik + 1) / 1) + '=' + encodeURIComponent('?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[eval(10 + ik)]);
suff='&';
retval=retval.replace(vidarr[ik] + ',' + vidarr[eval(1 + ik)], '');
} else {
document.getElementById('p' + eval(eval(ik + 1) / 1)).value='?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[ik];
urlis+=suff + 'p' + + eval(eval(ik + 1) / 1) + '=' + encodeURIComponent('?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[ik]);
suff='&';
retval=retval.replace(vidarr[ik], '');
}
if (retval != '') {
if (retval.substring(0,1) == ',') {
retval=retval.replace(',','');
}
}
}
}
if (retval != inoup) {
if (retval == '') {
setTimeout(sendoff,500);
//document.getElementById('fgrid').submit();
} else {
setTimeout(sendoff,500);
document.getElementById('fgrid').target='_blank';
//document.getElementById('fgrid').submit();
}
} else {
urlis='';
}
return retval;
}

function force_next() {
if (nexturl == '') {
if (prevurl.indexOf('this=') != -1) {
pgtn="Go to previous Video on the list";
if (("" + prevvid).length > ('cGdz3GNhEQ4').length) pgtn="Go to previous Playlist on the list";
return "<br><a target='_self' href='" + prevurl + "' title='Go to previous'>" + pgtn + "</a>";
}
return "<br><a target='_self' href='" + drhuh(document.referrer) + "' title='Go to previous'>Go to previous</a>";
}
gtn="Go to next Video on the list";
if (("" + nextvid).length > ('cGdz3GNhEQ4').length) gtn="Go to next Playlist on the list";
if (prevurl.indexOf('this=') != -1) {
pgtn="Go to previous Video on the list";
if (("" + prevvid).length > ('cGdz3GNhEQ4').length) pgtn="Go to previous Playlist on the list";
return "<br><a target='_self' href='" + prevurl + "' title='Go to previous'>" + pgtn + "</a>" + "<br><a target='_self' href='" + nexturl + "' title='Go to next'>" + gtn + "</a>";
}
if (document.referrer.indexOf('this=') != -1) {
return "<br><a target='_self' href='" + drhuh(document.referrer) + "' title='Go to previous'>Go to previous</a>" + "<br><a target='_self' href='" + nexturl + "' title='Go to next'>" + gtn + "</a>";
}
return "<br><a target='_self' href='" + nexturl + "' title='Go to next'>" + gtn + "</a>";
}

function etc_quality() {
return "<br>Quality <select id=iqty onchange=' event.target.setPlaybackQuality(this.value); '><option value='highres'>highres</option><option value='hd1080'>hd1080</option><option value='hd720'>hd720</option><option value='large'>large</option><option value='medium' selected>medium</option><option value='small'>small</option><option value='unknown'>unknown</option></select>" + force_next();
}

function etc_playbackrate() {
return "<br>Playback Rate <select id=ipbr onchange=' event.target.setPlaybackRate(this.value); '><option value='0.25'>x 0.25</option><option value='0.5'>x 0.5</option><option value='1.5'>x 1.5</option><option value='1' selected>x 1</option><option value='2'>x 2</option></select>" + etc_quality();
}

function etc_volume() {
return "<br>Volume <input id=ivol onchange=' event.target.setVolume(this.value); ' type=number min=0 max=100 step=1 value=0></input>" + etc_playbackrate();
}

function postprompt(inp) {
var tp=10, lp=10;
if (inp == null) return "";
if (inp == '') return "";
var qs=inp.split(',');
if (eval('' + qs.length) > 1) {
for (var iqs=1; iqs<qs.length; iqs++) {
window.open(document.URL.split('?')[0].split('#')[0] + '?isnextanswer=' + encodeURIComponent(qs[iqs]), '_blank', 'top=' + tp + ',left=' + lp + ',width=600,height=600');
tp+=20;
lp+=20;
}
inp=qs[0];
}
if (inp.toLowerCase().indexOf('cannotenda2# ') != -1) {
pvid='cannotenda2# ' + inp.split('cannotenda2# ')[1].split(',')[0];
//alert('inp=' + inp);
thesewords=inp.split('cannotenda2# ')[1].split(',')[0].split(' ');
if (eval('' + thesewords.length) > 2) {
thistt=pvid.replace(' ' + thesewords[eval(-1 + thesewords.length)], '').split('cannotenda2# ')[1];
}
relh+='#' + encodeURIComponent(pvid.split('#')[1])
}
if (inp.indexOf('+') != -1) iframegridmode=true;
var oup=inp;
while (oup.indexOf('+') != -1) {
oup=oup.replace('+','');
}
while (oup.indexOf(' ') != -1) {
oup=oup.replace(' ','');
}
if (oup.indexOf(';') != -1) {
var ous=oup.split(';');
oup=ous[eval(-1 + ous.length)];
if (ous[0].indexOf(',') != -1) {
var ouss=ous[0].split(',');
vwidth=eval(ouss[0].replace('[','').replace(']',''));
vheight=eval(ouss[1].replace('[','').replace(']',''));
if (vwidth != 640 || vheight != 390) hone=0;
} else {
vwidth=eval(ous[0].replace('[','').replace(']',''));
if (ous.length >= 3) vheight=eval(ous[1].replace('[','').replace(']',''));
if (vwidth != 640 || vheight != 390) hone=0;
}
}
if (iframegridmode) {
oup=iframemode(oup);
}
return oup;
}

function offerform() {
offerdform(hm);
}

function offerdform(howmany) {
var iid="id=i2 onblur=\"document.getElementById('vid').value=this.value;\""; // used to not be commented out below
//alert(createdlh);
var odivc="<form id='oform' target='_self' action='./stop_start_youtube.html" + createdlh + "' method='GET'><input type='hidden' value='2' name='this'></input><input type='hidden' value='-1' name='playtime'></input><input type='hidden' value='" + vidarr[0] + "' id='vid' name='vid'></input><input id='bsubmit' type='submit' value='Play' style='display:none;'></input><br>Current Video Playing 1 of " + howmany + " <input type='text' readonly value='" + vid + "' name='next'></input> ... and then ...";
for (var ij=2; ij<=howmany; ij++) {
odivc+="<br>Video to Play Later " + ij + " of " + howmany + " <input " + iid + " type='text' value='" + vidarr[eval(-1 + ij)] + "' name='next" + ij + "'></input>";
iid='';
}
odivc+="</form>";
document.getElementById('dform').innerHTML = odivc;
tobechecked=document.getElementById('i2');
}

function updatesc() {
cnt+=one;
cntpause+=onepause;
if (toggle == 0) secscnt+=one;
var ours="00" + eval(secscnt % 60);
var ourm="00" + eval((secscnt - ours) / 60);
suffix="#t=" + ourm.substring(eval(ourm.length - 2)) + "m" + ours.substring(eval(ours.length - 2)) + "s";
if (presuffix != "") presuffix=suffix;
if (eval(eval(cnt) - eval(cntpause)) >= duration && eval(duration) > 0) { // && eval(playtime) < 0) {
if (tobechecked != null) {
if (tobechecked.value != '') {
document.getElementById('oform').submit();
}
} else if (nexturl != '') {
console.warn('9875');
if (urlis == '') location.href=nexturl;
} else {
secscnt=cnt;
if (('' + parent.document.URL + 's').replace(/\#https/g,'') == ('' + parent.document.URL + 's')) {
stopVideo();
}
}
}
if (window.parent) {
if (parent.document.getElementById('i0')) {
if (('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
//top.document.title='x';
if (('' + parent.document.getElementById('i0').title + ' ').indexOf('#') == 0 || ('' + top.window.sessionStorage.getItem('ssytemp')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
//top.document.title='z';
//alert(5643);
monitorplh();
}
}
}
if (parent.document.getElementById('an_i_thingo')) {
if (parent.document.getElementById('an_i_thingo').value != '') {
parent.document.getElementById('an_i_thingo').value='';
//top.document.title='w';
//alert(5643);
monitorplh();
}
}
}
}

function dolaterthis() {
if (onestodourl != '') {
console.warn('9877');
parent.location.href=onestodourl;
onestodourl='';
}
}

function premonitor(iois) {
var mconto = (iois.contentWindow || iois.contentDocument);
var lastrelcount='' + relcount;
if (mconto != null) {
if (mconto.document) { mconto = mconto.document; }
if (iois.src.indexOf('an_i_thingo=&which_i_thingo=&') != -1) {
//top.document.title='0';
console.warn('count follows ...');
if (mconto.body.innerHTML.indexOf('<span>') != -1) {
var thisrelcount='' + mconto.body.innerHTML.split('<span>')[1].split('<')[0];
console.warn('' + thisrelcount);
//top.document.title+=thisrelcount;
if (thisrelcount != lastrelcount) { relcount=eval('' + thisrelcount); if (relcount > 0) { monitorplh(); } }
}
}
//setInterval(ajaxit, 8000);
}
}

function monitorplh() {
//setTimeout(monitorplh, 13000);
var plhis='';
//try {
//plhis=('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'');
//} catch (ghjfjh) {
//plhis='';
//}
xblanks+=' ';

if (67 == 87) {
if (plhis.trim() == '' || plhis.replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
plhis=('' + top.window.sessionStorage.getItem('ssytemp')).replace(/^undefined/g,'').replace(/^null/g,'');
if (plhis.replace(/\#http$/g,'') != '') {
top.window.sessionStorage.removeItem('ssytemp');
if (parent.document.getElementById('i0')) {
if (('' + parent.document.getElementById('i0').title + ' ').substring(0,1) == '#') {
parent.document.getElementById('i0').title='';
}
}
}
} else if (('' + parent.document.getElementById('i0').title + ' ').substring(0,1) == '#') {
plhis=('' + parent.document.getElementById('i0').title);
if (parent.document.getElementById('i0')) {
parent.document.getElementById('i0').title='';
}
}
}
//parent.document.getElementById('myh1').innerHTML=wasmlh + xblanks.length + ' VS ' + parent.document.getElementById('i0').title + ' vs ' + top.document.getElementById('plhxxx').innerHTML + ' Vs ' + ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'');
// plhis=top.document.getElementById('plhxxx').innerHTML;
//if (parent.document.getElementById('plhxxx').innerHTML != '' && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
// plhis=parent.document.getElementById('plhxxx').innerHTML;
//} else if (top.document.getElementById('plhxxx').innerHTML != '' && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
// plhis=top.document.getElementById('plhxxx').innerHTML;
//} else if (top.document.title != '' && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
// plhis=top.document.title;
//}
//if (parent.document.getElementById('i0').title.indexOf('#http') != -1 && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
//alert(56);
//if (parent.document.getElementById('i0').title.replace(/\#http$/g,'') != wasmlh.replace(/\#http$/g,'')) {
//alert(256);
//plhis=parent.document.getElementById('i0').title;
//alert('yes');
//}
//}
if (plhis.replace(/\#http$/g,'') != wasmlh.replace(/\#http$/g,'')) {
if (wasmlh.replace(/\#http$/g,'') == '') {
//alert('0:' + plhis);
wasmlh=plhis.replace(/\#http$/g,'');
stageone(plhis);
} else if (plhis.indexOf(wasmlh.replace(/\#http$/g,'')) == 0) {
//alert('1:' + plhis.split(wasmlh)[1]);
stageone(plhis.split(wasmlh)[1]);
wasmlh=plhis.replace(/\#http$/g,'');
} else if (plhis.indexOf(wasmlh.replace(/\#http$/g,'')) != -1) {
//alert('2:' + plhis.split(wasmlh)[0]);
stageone(plhis.split(wasmlh)[0]);
wasmlh=plhis.replace(/\#http$/g,'');
} else {
//alert('6:' + plhis);
wasmlh=plhis.replace(/\#http$/g,'');
stageone(plhis);
console.warn('it changed');
}
//} else if (wasmlh.replace(/\#http$/g,'') != '') {
// alert(plhis);
}
//if (player == window.self) {
//}
}

function dothislater(afterhowlong, nexturlisthistime) {
onestodourl=nexturlisthistime;
setTimeout(dolaterthis, Math.floor(eval(1000 * eval(onespause + eval('' + afterhowlong)))));
}

function drhuh(indr) {
var outdr=indr;
if (onestodosuffix != '') {
var drhbits=outdr.split('&andthen=')[0].split('#')[0];
if (prevonestodosuffix != onestodosuffix) {
return drhbits[0] + '&andthen=' + prevonestodosuffix;
} else {
var nexties=onestodosuffix.split(';');
var nextdetails=nexties[1].split(',');
if (onestodosuffix.replace(nexties[0] + ";" + nextdetails[0],"") == '') return outdr;
return drhbits[0] + '&andthen=' + onestodosuffix.replace(nexties[0] + ";" + nextdetails[0],"");
}
}
return outdr;
}

function fauxit(insecs) {
if (fauxpas_w) {
//alert(1987);
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(1887);
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(1787);
fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value='' + insecs;
} else {
var sofararr=fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value.split(',');
var farsoarr=fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value.split(',');
if (eval('' + sofararr.length) > eval('' + farsoarr.length) || fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
if (fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value='' + insecs;
} else {
fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value+=',' + insecs;
}
} else {
fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value+=',' + insecs;
}
}
}
}
return insecs;
}

function vslfd(inida) {
if (inida.trim() != '') {
//alert('0:' + fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value);
var sofararr=fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value.split(',');
var arrsofar=fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ');
if (fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value != '') {
//alert('1:' + fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value);
if (inida.split('#')[0] != fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ')[eval(-1 + fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ').length)].split('#')[0]) {
//alert('2:' + eval('' + arrsofar.length) + ' < ' + eval('' + sofararr.length) + ' ?');
lastfauxdef=inida;
if (eval('' + arrsofar.length) == eval('' + sofararr.length) && fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value != '') {
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
if (inida.indexOf('#') != -1) {
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
}
}
while (eval('' + arrsofar.length) < eval('' + sofararr.length)) {
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
arrsofar=fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ');
}
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[0];
if (inida.indexOf('#') != -1) {
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[1];
}
}
} else {
//alert('2:' + fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value);
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[0];
if (inida.indexOf('#') != -1) {
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[1];
}
}
}
//alert(inida);
return inida;
}

function lfmcs() {
var thisvolume=-1, sofarmaxvol=0;
if (ttt.title == lastlfmcs && ttt.title.indexOf(' mute control') != -1) {
try {
thisvolume=eval('' + event.target.getVolume());
if (lastvolume == 0) { lastvolume=-1; }
} catch(thyu) {
thisvolume=-1;
}
if (thisvolume > 0 && ttt.title.indexOf(' mute control') != -1) {
if (ttt.title.indexOf('maxvol:') == -1) {
ttt.title=ttt.title.replace(' mute control', ' maxvol:' + thisvolume + ' mute control');
lastlfmcs=ttt.title;
} else {
sofarmaxvol=eval(ttt.title.split('maxvol:')[1].split(' mute control')[0]);
if (sofarmaxvol < thisvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + thisvolume);
lastlfmcs=ttt.title;
}
}
}
} else if (ttt.title != lastlfmcs) {
lastlfmcs=ttt.title;
if (lastvolume <= 0) {
try {
lastvolume=eval('' + event.target.getVolume());
if (lastvolume == 0) { lastvolume=-1; }
} catch(thyu) {
lastvolume=-1;
}
if (lastvolume > 0 && ttt.title.indexOf(' mute control') != -1) {
if (ttt.title.indexOf('maxvol:') == -1) {
ttt.title=ttt.title.replace(' mute control', ' maxvol:' + lastvolume + ' mute control');
lastlfmcs=ttt.title;
} else {
sofarmaxvol=eval(ttt.title.split('maxvol:')[1].split(' mute control')[0]);
if (sofarmaxvol < lastvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + lastvolume);
lastlfmcs=ttt.title;
}
}
}
}
if (ttt.title.indexOf('maxvol:') != -1) {
maxvolume=eval(ttt.title.split('maxvol:')[1].split(' mute control')[0]);
}
if (lastlfmcs.indexOf('volume:') != -1) {
if (lastlfmcs.split('volume:')[1].toLowerCase().trim().replace(/^0\%/g,'mute').replace(/^100\%/g,'unmute').indexOf('unmute') == 0) {
if (lastvolume > 0) {
try {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay to unmute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(lastvolume);
//if (eval('' + lastvolume) == 0) { alert('OoPS'); }
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(lastvolume);
}
} catch(thyu) {
}
}
} else if (lastlfmcs.split('volume:')[1].toLowerCase().trim().replace(/^0\%/g,'mute').replace(/^100\%/g,'unmute').indexOf('mute') == 0) {
setTimeout(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay to mute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(0);
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(0);
}
}, 200);
} else if (('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').replace(/^1/g,'0').replace(/^2/g,'0').replace(/^3/g,'0').replace(/^4/g,'0').replace(/^5/g,'0').replace(/^6/g,'0').replace(/^7/g,'0').replace(/^8/g,'0').replace(/^9/g,'0')).indexOf('%') != -1) {
if (('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0]) > 0) {
if (maxvolume > 0) {
lastvolume=eval(eval(eval('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0].split('%')[0]) / 100.0) * eval('' + maxvolume));
if (maxvolume < lastvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + lastvolume);
lastlfmcs=ttt.title;
maxvolume=lastvolume;
}
try {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay to try unmute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(lastvolume);
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(lastvolume);
}
} catch(thyu) {
}
}
} else if (eval('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0].split('%')[0]) > 0) {
lastvolume=eval('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0].split('%')[0]);
if (maxvolume < lastvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + lastvolume);
lastlfmcs=ttt.title;
maxvolume=lastvolume;
}
try {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay if we try unmute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(lastvolume);
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(lastvolume);
}
} catch(thyu) {
}
}
}
}
}
}

function followup() {
var lb='', ilb=2, prevtext=' ', theon='on', thispdu='';

var hgx='';
if (window.parent) {
//alert(parent.document.URL);
if ((parent.document.URL + '~').indexOf('srt=~') != -1 || (parent.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
hgx='srt=';
}
}
if (window.top && hgx == '') {
//alert(parent.document.URL);
if ((top.document.URL + '~').indexOf('srt=~') != -1 || (top.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
hgx='srt=';
}
}
if (document.URL.slice(-4) == 'srt=' || hgx == 'srt=' || ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/srt\=$/g, '') != ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'') && ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^#/g,'') != '') {
if (document.getElementById('subripcommentary')) {
if (document.getElementById('subripcommentary').innerHTML == '') {
document.getElementById('subripcommentary').innerHTML='Awaiting pause for SubRip subtitles <div id=divcbi style=display:inline-block;><iframe class="spag" scrolling="no" data-accept="text/*" id="cbi" frameborder="0" style="display:inline-block;width:173px;height:218px;margin-top:-200px;" src="/HTMLCSS/client_browsing.htm?typeJUNKhastobe=text&straightJUNKtext=y&wordJUNKing=Allimages%20images%2E%20"></iframe></div><br><textarea onblur="hgrip=massage(this.value,hgrip);" id=mysubrip></textarea>';
if (sdivcbi == '') { sdivcbi=document.getElementById('divcbi').innerHTML; }
setInterval(subripize, 1000);
}
}
}

if (window.parent) {
thispdu=parent.document.URL.replace(/^undefined/g,'').replace(/^null/g,'');
if (thispdu.indexOf('#') == -1 && thispdu.indexOf('stop_start_youtube.htm') != -1) {
thispdu+=parent.getlh();
}
midpre='';
if (('' + thispdu).indexOf('WEBVTT%20FILE%0A%0A') != -1) {
midpre='WEBVTT%20FILE%0A%0A';
}
gsrt=( ('' + thispdu).indexOf('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))) != -1 ? processsrt(midpre + '1' + encodeURIComponent(String.fromCharCode(10)) + ('' + thispdu).split('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))[1].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) ).replace(/\+/g, ' ') : (('' + thispdu).toLowerCase().replace(encodeURIComponent('.') + 'vtt',encodeURIComponent('.') + 'srt').indexOf(encodeURIComponent('.') + 'srt') != -1 ? processsrt(('' + thispdu).replace(encodeURIComponent('.') + 'SRT','SRT' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'vtt','vtt' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'VTT','VTT' + encodeURIComponent('.') + 'srt').split(encodeURIComponent('.') + 'srt')[0].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) : ''));
delay=13; // new idea
if (typeof (window.parent.yesesp) == 'function') {
yes_esp=window.parent.yesesp();
} else if (parent.parent.document.URL) {
if (('' + parent.parent.document.URL).indexOf('/esp_ornot_esp.') != -1) {
yes_esp=true;
}
}
}

setTimeout(function(){
if (!document.getElementById('srcif')) {
if (window.parent) {
if (typeof(parent.checkip) == 'function') {
ipbit=parent.checkip(null);
}
}
}
}, 5000);

if (ttt.title.indexOf(' mute control') != -1) {
setInterval(lfmcs, 2000);
}
if (ttt.title.replace(' !important ;', ' !important;').indexOf(' ; ') != -1) {
if (ttt.title.indexOf('!important') == -1) {
if (4 == 5) { alert("toP.document.title=" + ttt.title); }
}
} else if (onestodoprefix != "") { // multiple dropdown selections
console.log('11: onestodoprefix=' + onestodoprefix + ' onestodosuffix=' + onestodosuffix);
//var nexties=["",""], nextdetails=["",""];
//if (onestodosuffix.indexOf(';') != -1) {
//try {
var nexties=onestodosuffix.split(';');
var nextdetails=nexties[1].split(',');
//} catch(hjgfjh) {
//nexties=["",""];
//nextdetails=["",""];
//}
//}
onestodosuffix=onestodosuffix.replace(nexties[0] + ";" + nextdetails[0] + ",","");
if (onestodosuffix == "") onestodoprefix="";
prevonestodosuffix=onestodosuffix;
theon='on';
if (window.parent) {
if (parent.document.URL.indexOf('c0=on') == -1) { theon='off&ezj=1'; }
}
dothislater(nexties[0], document.referrer.split('?')[0].split('#')[0] + "?youtubeid=" + nextdetails[0] + "&youtube_duration=" + nextdetails[1] + "&email=&email=&emoji=on&c0=" + theon + "&i0=0&j0=" + nextdetails[1] + "&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=" + onestodoprefix + encodeURIComponent(onestodosuffix));
}
if (kpi == -9) {
//alert(99);
if (document.URL.indexOf('start=') != -1 && document.URL.indexOf('playtime=') != -1) {
//alert(990);
//parent.document.getElementById('myh1').innerHTML='zxkpi' + document.URL;
if (document.URL.indexOf('start=0') == -1 || document.URL.indexOf('playtime=0') == -1) {
//alert(9900);
kpi=-8;
kpi=0; //event.target.getCurrentTime();
setTimeout(keepParentInformed,1000);
}
}
}
thistext=location.search.split('this=')[1] ? location.search.split('this=')[1].split('&')[0] : '';
if (thistext != '') {
of = ' ' + thistext + ' of ';
nexttext=eval(1 + eval(thistext));
if (nexttext >= 2) prevtext=eval(-1 + eval(thistext));
if (("" + prevtext) == "1") prevtext="";
} else if (document.URL.indexOf('next2=') != -1) {
of = ' 1 of ';
nexttext=2;
}
nextvid=location.search.split('next' + nexttext + '=')[1] ? location.search.split('next' + nexttext + '=')[1].split('&')[0] : '';
if (nextvid != '') {
//alert(nextvid + " " + 'vid=' + vid + " NEWvid=" + nextvid + " " + document.URL);
nexturl=document.URL.replace('this=' + thistext + '&', 'this=' + nexttext + '&').replace('vid=' + vid + play_list_id, 'vid=' + nextvid);
//alert(nexturl);
}
if (prevtext != ' ') {
prevvid=location.search.split('next' + prevtext + '=')[1] ? location.search.split('next' + prevtext + '=')[1].split('&')[0] : '';
if (prevvid != '') {
prevurl=document.URL.replace('this=' + thistext + '&', 'this=' + prevtext + '&').replace('vid=' + vid + play_list_id, 'vid=' + prevvid);
}
}
//alert(nexttext + '=nexttext nextvid=' + nextvid + ' nexturl=' + nexturl);
if (document.URL.indexOf('next2=') != -1) {
while (document.URL.indexOf('next' + ilb + '=') != -1) {
ilb++;
}
lb=eval(ilb - 1);
of+=lb + ' ';
}
}

function analyzemaybe(playing, paused, isdone) {
if (document.URL.indexOf('start=') != -1 && document.URL.indexOf('playtime=') != -1) {
if (document.URL.indexOf('start=0') == -1 || document.URL.indexOf('playtime=0') == -1) {
if (paused != 0) {
var urp=parent.document.getElementById('updatethisplease');
if (urp) {
if (urp.value != '') {
var urpvalue=urp.value;
try {
parent.document.getElementById(urpvalue).value=eval(event.target.getCurrentTime()).toFixed(3);
} catch(hgfd) {
parent.document.getElementById(urpvalue).value=eval(player.getCurrentTime()).toFixed(3);
}
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
// alert('6:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
try {
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} catch(hgfhjgf) {
wpwp.document.getElementById('curct').innerHTML='' + eval(player.getCurrentTime()).toFixed(3);
}
} }
if (urpvalue.indexOf('i') == 0) {
urpvalue=urpvalue.replace('i','j');
parent.document.getElementById('updatethisplease').value=urpvalue;
} else {
urpvalue=urpvalue.replace('j','');
urpvalue=eval(1 + eval(urpvalue));
urpvalue='i' + urpvalue;
if (parent.document.getElementById(urpvalue).value == "") {
parent.document.getElementById(urpvalue.replace('i','c')).checked=true;
}
parent.document.getElementById('updatethisplease').value=urpvalue;
}
//alert(urpvalue);
}
}
}
}
}
}

function yeswell() {

var ismedia=checkforaudio(true);
if (ismedia) {
//alert('IVID=' + ivid + ' and vid=' + vid + ' and endcnt=' + endcnt + ' and urL=' + document.URL);
return '';
}

if (eval('' + endcnt) == 1) {
endcnt=5;
var sufx='';
var capitalloop=top.document.getElementById('listeleven').getAttribute('data-title');
if ((capitalloop + 'a').substring(0,1) == 'X') {
sufx='^' + top.document.getElementById('listeleven').innerHTML.split('^')[0].replace('  ','').replace(' ','').trim();
}
if (top.document.getElementById('listeleven').innerHTML.indexOf('^') != -1) {
window.top.focus();
sufx='';
//alert('pre 1');
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '^','') + sufx; //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
//alert('1:' + top.document.getElementById('listeleven').innerHTML);
//ttt.title+=' ' + top.document.getElementById('listeleven').innerHTML.toUpperCase() + ' ';
//if (sufx != '') { alert(top.document.getElementById('listeleven').innerHTML); }
//ttt.title+=' 4';
} else {
window.top.focus();
//alert('pre 2');
var capitalloopx=top.document.getElementById('listeleven').getAttribute('data-title');
sufx=top.document.getElementById('listeleven').title; //sufx.replace('^','');
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '','') + sufx; //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
//alert('2:' + top.document.getElementById('listeleven').innerHTML);
//ttt.title+=' ' + top.document.getElementById('listeleven').innerHTML.toLowerCase() + ' ';
if ((capitalloopx + 'a').substring(0,1) == 'X') {
if (top.document.emojirestart) {
top.document.emojirestart();
} else {
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
if (itop != -1) { topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1234567); }
}
//ttt.title+=' 1';
top.document.getElementById('myh1').style.marginLeft='1px';
//ttt.title+='2';
window.top.scrollTo(0,0);
//ttt.title+='3';
}
}
}
}
}

function consolelog(inm) {
if (window.top) {
//alert(1);
if (top.document.getElementById('postlist') && top.document.URL.indexOf('debug=') != -1) {
//alert(101);
top.document.getElementById('postlist').style.display='block';
top.document.getElementById('postlist').innerHTML+='<br>' + inm;
} else if (('' + typeof window.top.consolelog) == 'function' && top.document.URL.indexOf('debug=') != -1) {
//alert(201);
window.top.consolelog(inm);
} else {
//alert('11 ' + typeof window.top.consolelog);
console.log(inm);
}
} else {
//alert(111);
console.log(inm);
}
}

</script>
</head>
<body onload=' followup(); setInterval(updatesc,1000);' style='background-color: transparent;'>
<form id='fgrid' method='POST' target='_self' action='//www.rjmprogramming.com.au/HTMLCSS/reveal_div.php'>
<input style='display:none' type='submit' value='Show in Grid' id='bgrid'></input>
<input type='hidden' value='' id='p1' name='p1'></input>
<input type='hidden' value='' id='p2' name='p2'></input>
<input type='hidden' value='' id='p3' name='p3'></input>
<input type='hidden' value='' id='p4' name='p4'></input>
<input type='hidden' value='' id='p5' name='p5'></input>
<input type='hidden' value='' id='p6' name='p6'></input>
<input type='hidden' value='' id='p7' name='p7'></input>
<input type='hidden' value='' id='p8' name='p8'></input>
<input type='hidden' value='' id='p9' name='p9'></input>
</form>
<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
<div id="player"></div>

<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');

tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

vwidth=location.search.split('width=')[1] ? eval(location.search.split('width=')[1].split('&')[0]) : vwidth;
vheight=location.search.split('height=')[1] ? eval(location.search.split('height=')[1].split('&')[0]) : vheight;


// 3. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
//var player;
if (document.URL.indexOf('vid=') != -1) {
thistt='';
vid=location.search.split('vid=')[1] ? location.search.split('vid=')[1].split('&')[0] : postprompt((isnextanswer != '' ? isnextanswer : prompt('Please enter YouTube video id or playlist id (or a comma separated list of these, that can include a + to have up to 18 of them occur in a parent iframe grid), and optionally prefix by [640;][390;] which is [width;][height;] ... a special answer of cannotenda2 (optionally appended by hash and then, an optional space beginning and ending title but more crucially, a media data URI or absolute media URL) will play non YouTube content Eg. ' + String.fromCharCode(10) + 'cannotenda2# My Audio Example /Mac/iPad/slide1.m4a', previd)));
if (vid.trim() != '') {
//alert('vID=' + vid);
if (thistt != '') {
relh='#' + encodeURIComponent(pvid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=pvid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2#') != -1) {
relh='#' + encodeURIComponent(vid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=vid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2') == 0) {
if (relh != '') {
//alert('0:' + relh);
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
//alert(location.hash);
} else if (('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace('#http','') == '') {
//alert('XZ=' + relh + ' ... ' + parent.location.hash);
relh='#' + encodeURIComponent(' School Activities Video /school_activities_vd.mp4');
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
}
}
if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}

//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}

if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}

if (('' + parent.document.URL).replace(/\%23http$/g,'#http').replace(/\#http$/g,'') == ('' + parent.document.URL)) {
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
startagain=true;
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim().toLowerCase() != 'y') {
lastokn=eval( ('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() );
}
if (1 == 1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,''))) {
setInterval(retry, 5000);
}
}
}
}
}
vidarr=vid.split(',');
var splaytime="";
if (vid.indexOf(',') != -1) {
vid=vidarr[0];

if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}

//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}

if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}

splaytime=eval(-vidarr.length);
} else if (urlis != '' && document.URL.indexOf('playtime=') == -1) {
//location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000';
splaytime="-1";
oknow=false;
setTimeout(sendoff,2000);
} else if (vid.length > ('cGdz3GNhEQ4').length && document.URL.indexOf('playtime=') == -1) {
if (urlis == '') location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000' + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + ('' + relh);
splaytime="-1";
oknow=false;
} else if (document.URL.indexOf('start=') != -1) {
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
splaytime='-1';
} else {
if (isnextanswer != '' || yeslook) {
splaytime=(playtime / 1000);
} else {
splaytime=location.search.split('playtime=')[1] ? eval(1000.0 * eval(location.search.split('playtime=')[1].split('&')[0])) : prompt('Please enter YouTube video ' + vid + ' playtime snippets in seconds (-1 to play whole video in one session, -2 (or -n) to play whole video and perhaps more (n in total) to follow in one session). Append # and a SubRip subtitles/captions *.srt or *.vtt filename to read and process such captioning. Append #srt= to prompt for the creation of a SubRip subtitle or caption file data.', playtime / 1000);
}
}
if (splaytime == null) { splaytime=''; }
if (('' + splaytime + '~').indexOf('#srt=~') != -1) {
location.hash='#srt=';
splaytime=splaytime.split('#')[0];
} else if (('' + splaytime).indexOf('#') != -1) {
location.hash='#captionis=' + encodeURIComponent(splaytime.split('#')[1]);
splaytime=splaytime.split('#')[0];
}
} else {
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
splaytime='-1';
} else {
if (isnextanswer != '' || yeslook) {
splaytime=(playtime / 1000);
} else {
splaytime=location.search.split('playtime=')[1] ? location.search.split('playtime=')[1].split('&')[0] : prompt('Please enter YouTube video ' + vid + ' playtime snippets in seconds (-1 to play whole video in one session, -2 (or -n) to play whole video and perhaps more (n in total) to follow in one session). Append # and a SubRip subtitles/captions *.srt or *.vtt filename to read and process such captioning. Append #srt= to prompt for the creation of a SubRip subtitle or caption file data.', playtime / 1000);
}
}
if (splaytime == null) { splaytime=''; }
if (('' + splaytime + '~').indexOf('#srt=~') != -1) {
location.hash='#srt=';
splaytime=splaytime.split('#')[0];
} else if (('' + splaytime).indexOf('#') != -1) {
location.hash='#captionis=' + encodeURIComponent(splaytime.split('#')[1]);
splaytime=splaytime.split('#')[0];
}
}
if (document.URL.indexOf('playtime=') != -1) {
playtime=eval(eval("" + splaytime) * 1);
} else if (("" + splaytime) != "-1" && ("" + splaytime).indexOf("-") == 0) {
playtime=eval(-1 * 1000);
hm=eval(("" + splaytime).replace('-',''))
of=' 1 of up to ' + hm + ' ';
if (oknow) setTimeout(offerform,2000);
} else {
playtime=eval(eval("" + splaytime) * 1000);
}
} else {
thistt='';
vid=location.search.split('vid=')[1] ? location.search.split('vid=')[1].split('&')[0] : postprompt((isnextanswer != '' ? isnextanswer : prompt('Please enter YouTube video id or playlist id (or a comma separated list of these, that can include a + to have up to 18 of them occur in a parent iframe grid), and optionally prefix by [640;][390;] which is [width;][height;] ... a special answer of cannotenda2 (optionally appended by hash and then, an optional space beginning and ending title but more crucially, a media data URI or absolute media URL) will play non YouTube content Eg. ' + String.fromCharCode(10) + 'cannotenda2# My Audio Example /Mac/iPad/slide1.m4a', previd)));
if (vid.trim() != '') {
//alert('vId=' + vid + ' and pvid=' + pvid + ' and thistt=' + thistt);
if (thistt != '') {
relh='#' + encodeURIComponent(pvid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=pvid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2#') != -1) {
relh='#' + encodeURIComponent(vid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=vid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2') == 0) {
if (relh != '') {
//alert('xz=' + relh);
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
} else if (('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace('#http','') == '') {
//alert('xZ=' + relh);
relh='#' + encodeURIComponent(' School Activities Video /school_activities_vd.mp4');
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
}
}
if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}

//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}

if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}

if (('' + parent.document.URL).replace(/\%23http$/g,'#http').replace(/\#http$/g,'') == ('' + parent.document.URL)) {
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
startagain=true;
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim().toLowerCase() != 'y') {
lastokn=eval( ('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() );
}
if (1 == 1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,''))) {
setInterval(retry, 5000);
}
}
}
}
}
vidarr=vid.split(',');
var ssplaytime="";
if (vid.indexOf(',') != -1) {
vid=vidarr[0];

if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}

//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}

if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}

ssplaytime=eval(-vidarr.length);
} else if (urlis != '' && document.URL.indexOf('playtime=') == -1) {
//location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000';
ssplaytime="-1";
oknow=false;
setTimeout(sendoff,2000);
} else if (vid.length > ('cGdz3GNhEQ4').length && document.URL.indexOf('playtime=') == -1) {
if (urlis == '') location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000' + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + relh;
ssplaytime="-1";
oknow=false;
} else {
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
ssplaytime='-1';
} else {
if (isnextanswer != '' || yeslook) {
ssplaytime=(playtime / 1000);
} else {
ssplaytime=location.search.split('playtime=')[1] ? location.search.split('playtime=')[1].split('&')[0] : prompt('Please enter YouTube video ' + vid + ' playtime snippets in seconds (-1 to play whole video in one session, -2 (or -n) to play whole video and perhaps more (n in total) to follow in one session). Append # and a SubRip subtitles/captions *.srt or *.vtt filename to read and process such captioning. Append #srt= to prompt for the creation of a SubRip subtitle or caption file data.', playtime / 1000);
}
}
if (ssplaytime == null) { ssplaytime=''; }
if (('' + ssplaytime + '~').indexOf('#srt=~') != -1) {
location.hash='#srt=';
ssplaytime=ssplaytime.split('#')[0];
} else if (('' + ssplaytime).indexOf('#') != -1) {
location.hash='#captionis=' + encodeURIComponent(('' + ssplaytime).split('#')[1]);
ssplaytime=('' + ssplaytime).split('#')[0];
}
}
if (document.URL.indexOf('playtime=') != -1) {
playtime=eval(eval("" + ssplaytime) * 1);
} else if (("" + ssplaytime) != "-1" && ("" + ssplaytime).indexOf("-") == 0) {
playtime=eval(-1 * 1000);
hm=eval(("" + ssplaytime).replace('-',''))
if (hm > hone) {
anymore='&this=&width=' + vwidth + '&height=' + vheight + '&next=' + vid;
for (var iu=2; iu<=hm; iu++) {
anymore+='&next' + iu + '=' + vidarr[eval(-1 + iu)];
}
}
of=' 1 of up to ' + hm + ' ';
//alert(vid + " " + ssplaytime + " " + ("" + ssplaytime).indexOf("-") + " " + hm);
if (oknow) setTimeout(offerform,2000);
} else if (hone == 0) {
anymore='&this=&width=' + vwidth + '&height=' + vheight + '&next=' + vid;
playtime=eval(eval("" + ssplaytime) * 1000);
} else {
playtime=eval(eval("" + ssplaytime) * 1000);
}
if (urlis == '' && ((vid != previd && vid.indexOf(',') == -1) || vwidth != 640 || vheight != 390)) location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=' + playtime + anymore + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + relh;
}

function pretrylater(inv) {
curcont=inv;
trylater();
}

function trylater() {
//alert('there');
if (document.getElementById('rhcell')) {
document.getElementById('lhcell').style.display='none';
document.getElementById('rhcell').style.display='table-cell';
document.getElementById('rhcell').innerHTML=contprefixes[curcont].replace('>',' width="640" height="390">') + conturls[curcont] + contsuffixes[curcont];
} else {
if (document.getElementById(lastplayer)) {
document.body.innerHTML=document.body.innerHTML.replace(document.getElementById(lastplayer).outerHTML, '<table style="width:100%;margin:0 0 0 0;padding:0 0 0 0;"><tr><td id=lhcell style=display:none;>' + document.getElementById(lastplayer).outerHTML + '</td><td id=rhcell style=display:table-cell;>' + contprefixes[curcont].replace('>',' width="640" height="390">') + conturls[curcont] + contsuffixes[curcont] + '</td></tr></table>'); // '<iframe id="player" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="your wish has been granted" width="640" height="390" src="https://www.youtube.com/embed/7o9wvYXR3n0?enablejsapi=1&origin=http%3A%2F%2Flocalhost%3A8888&widgetid=1&forigin=http%3A%2F%2Flocalhost%3A8888%2FHTMLCSS%2Fstop_start_youtube.html&aoriginsup=1&vf=6"></iframe>');
if (conttitle[curcont] != '') { document.getElementsByTagName('h1')[0].innerHTML=conttitle[curcont]; }
if (contprefixes[curcont].indexOf('vcont' + curcont) != -1) {
lastplayer='vcont' + curcont;
} else if (contprefixes[curcont].indexOf('acont' + curcont) != -1) {
lastplayer='acont' + curcont;
} else {
lastplayer='cont' + curcont;
}
curcont++;
//alert('where');
}
}
}

function onYouTubeIframeAPIReady() {
if (window.parent) {
if ((('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's') || ('' + parent.document.URL).toLowerCase().indexOf('cannotenda2') != -1 || (('' + parent.document.URL).indexOf('i1=') != -1 && ('' + parent.document.URL).indexOf('i1=&') == -1))) {
if (!document.getElementById('rhcell')) {
wasmlh=('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'');
//alert(wasmlh);
try {
top.window.sessionStorage.removeItem('ssytemp');
} catch (jhghfgkh) {
}
setTimeout(monitorplh, 3000);
if (document.getElementById(lastplayer)) {
document.body.innerHTML=document.body.innerHTML.replace(document.getElementById(lastplayer).outerHTML, '<table style="width:100%;margin:0 0 0 0;padding:0 0 0 0;"><tr><td id=lhcell style=display:table-cell;>' + document.getElementById(lastplayer).outerHTML + '</td><td id=rhcell style=display:none;></td></tr></table>'); // '<iframe id="player" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="your wish has been granted" width="640" height="390" src="https://www.youtube.com/embed/7o9wvYXR3n0?enablejsapi=1&origin=http%3A%2F%2Flocalhost%3A8888&widgetid=1&forigin=http%3A%2F%2Flocalhost%3A8888%2FHTMLCSS%2Fstop_start_youtube.html&aoriginsup=1&vf=6"></iframe>');
}
}
}
}
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
if (1 == 5 && eval('' + contprefixes.length) > 0) {
altplayer=player;
player=window.self;
}
if (document.getElementById('rhcell')) {
document.getElementById('lhcell').style.display='none';
document.getElementById('rhcell').style.display='table-cell';
document.getElementById('rhcell').innerHTML=contprefixes[eval(-1 + contprefixes.length)].replace('>',' width="640" height="390">') + conturls[eval(-1 + contprefixes.length)] + contsuffixes[eval(-1 + contprefixes.length)];
} else {
//alert('lastplayer=' + lastplayer);
//alert(document.getElementById(lastplayer).outerHTML);
if (curcont < 0) {
yeslook=stageone('');
stagetwo('');
if (window.parent) {
if (parent.document.getElementById('myh1') && thistt != '') {
parent.document.getElementById('myh1').innerHTML='' + thistt;
} else if (parent.document.getElementById('myh1') && conttitle[0] != '') {
parent.document.getElementById('myh1').innerHTML='' + conttitle[0];
}
}
}
//alert('curcont=' + curcont);
//alert(contprefixes[curcont]);
if (!document.getElementById(lastplayer)) {
//alert('here');
setTimeout(trylater, 2000);
} else {
document.body.innerHTML=document.body.innerHTML.replace(document.getElementById(lastplayer).outerHTML, '<table style="width:100%;margin:0 0 0 0;padding:0 0 0 0;"><tr><td id=lhcell style=display:none;>' + document.getElementById(lastplayer).outerHTML + '</td><td id=rhcell style=display:table-cell;>' + contprefixes[curcont].replace('>',' width="640" height="390">') + conturls[curcont] + contsuffixes[curcont] + '</td></tr></table>'); // '<iframe id="player" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="your wish has been granted" width="640" height="390" src="https://www.youtube.com/embed/7o9wvYXR3n0?enablejsapi=1&origin=http%3A%2F%2Flocalhost%3A8888&widgetid=1&forigin=http%3A%2F%2Flocalhost%3A8888%2FHTMLCSS%2Fstop_start_youtube.html&aoriginsup=1&vf=6"></iframe>');
if (conttitle[curcont] != '') { document.getElementsByTagName('h1')[0].innerHTML=conttitle[curcont]; }
}
if (contprefixes[curcont].indexOf('vcont' + curcont) != -1) {
lastplayer='vcont' + curcont;
} else if (contprefixes[curcont].indexOf('acont' + curcont) != -1) {
lastplayer='acont' + curcont;
} else {
lastplayer='cont' + curcont;
}
curcont++;
//return '';
}
} else if (vid.length > ('cGdz3GNhEQ4').length) {
if (document.getElementById('rhcell')) {
document.getElementById('rhcell').style.display='none';
document.getElementById('lhcell').style.display='table-cell';
}
play_list_id=vid;
vid='';
player = new YT.Player('player', {
width: vwidth,
height: vheight,
playerVars:
{
listType: 'playlist',
list: play_list_id,
index: 0
},
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
//event.target.playVideoAt(0);
} else {
if (document.getElementById('rhcell')) {
document.getElementById('rhcell').style.display='none';
document.getElementById('lhcell').style.display='table-cell';
}
console.log('' + ('' + new Date()) + ' ViD=' + vid + ' ivid=' + ivid + ' referrer=' + document.referrer + ' uRl=' + document.URL);

var ismedia=false;
ismedia=checkforaudio(false);

if (!ismedia) {
player = new YT.Player('player', {
height: vheight,
width: vwidth,
videoId: vid,
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
console.log('Parent is ' + parent.document.URL);
dovidarrv();

}
}


if (document.URL.indexOf('negpos=') != -1) {
setTimeout(function(){
if (3 == 5) {
document.body.width='200px';
document.body.style.overflowX='visible';
document.getElementsByTagName('iframe')[0].style.zIndex='999';
document.getElementsByTagName('iframe')[0].style.overflowX='visible';
}
document.getElementsByTagName('iframe')[0].style.position='absolute';
//document.body.style.zIndex='-999';
//document.getElementsByTagName('iframe')[0].style.zIndex='-999';
//parent.document.getElementById('ifhost').style.zIndex='-999';
parent.document.getElementById('ifhost').style.marginLeft='-200px';
document.body.onmousemove=function(event){ parent.omd(event); };
document.body.onmouseover=function(event){ parent.omd(event); };
document.body.onmouseout=function(event){ parent.omd(event); };
document.body.ontouchmove=function(event){ parent.otd(event); };
document.getElementsByTagName('iframe')[0].onmousemove=function(event){ parent.omd(event); };
document.getElementsByTagName('iframe')[0].onmouseover=function(event){ parent.omd(event); };
document.getElementsByTagName('iframe')[0].onmouseout=function(event){ parent.omd(event); };
document.getElementsByTagName('iframe')[0].ontouchmove=function(event){ parent.otd(event); };
}, 5000);
}
}

function butellipsis(owhat) {
var theval='', tv=0;
if (owhat.indexOf('image/svg') != -1) { return owhat.replace(/\+/g,' ').replace('image/svg xml','image/svg+xml'); }
if ((7 == 7 || owhat.indexOf('data:') != -1)) { // && encodeURIComponent(owhat).toLowerCase().indexOf('%e2%80%a6') != -1) {
//alert(owhat);
//alert(parent.document.getElementById('urlbig').value);
if (('' + parent.document.getElementById('spareurlbig').value).indexOf('data:') != -1) {
theval='data:' + parent.document.getElementById('spareurlbig').value.split('data:')[1];
for (tv=1; tv<=10; tv++) {
if (parent.document.getElementById('spareurlbig' + eval(tv % 10))) {
if (parent.document.getElementById('spareurlbig' + eval(tv % 10)).value == theval) {
parent.document.getElementById('spareurlbig' + eval(tv % 10)).value='';
if (parent.document.getElementById('spareurlbig' + eval(eval(1 + tv) % 10))) {
parent.document.getElementById('spareurlbig').value=parent.document.getElementById('spareurlbig' + eval(eval(1 + tv) % 10)).value;
return theval;
}
}
}
}
return theval;
}
return 'data:' + parent.document.getElementById('urlbig').value.split('data:')[1];
} else if (owhat.indexOf('data:') != -1) {
return 'data:' + owhat.split('data:')[1];
}
return owhat;
}

function checkforaudio(atend) {
var etype='audio';
var newa=null, newv=null;
var ismedia=false;
var jvid=-1, numreldata=0, thisnumreldata=0, lhd='', lhds=[];
var jv=0;
thispt='0';
if (document.URL.indexOf('&playtime=') != -1) {
thispt=('' + decodeURIComponent(document.URL.split('&playtime=')[1].split('&')[0].split('#')[0]));
//alert(thispt + ' ' + duration);
while (parent.document.getElementById('j' + jv)) {
if (parent.document.getElementById('j' + jv).value == thispt) {
if (jvid == -1) {
if (parent.document.getElementById('i' + jv).value.indexOf('data') == 0) {
jvid=jv;
thisnumreldata=numreldata;
}
} else {
//alert('OoPs');
jvid=-2;
}
}
if (parent.document.URL.indexOf(encodeURIComponent('i' + jv + '=data')) != -1 && (parent.document.URL.indexOf(encodeURIComponent('i' + jv + '=data&')) == -1 && parent.document.URL.indexOf(encodeURIComponent('i' + jv + '=data#')) == -1)) {
numreldata++;
} else if (parent.document.URL.indexOf('i' + jv + '=data') != -1 && (parent.document.URL.indexOf('i' + jv + '=data&') == -1 && parent.document.URL.indexOf('i' + jv + '=data#') == -1)) {
numreldata++;
}
jv++;
}
if (jvid >= 0) {
//alert('Yes ' + atend + ' ' + jvid + ' thispt=' + thispt);
if ((parent.document.URL.indexOf('i' + jvid + '=data') != -1 || parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data')) != -1)) {
//alert('audio ');
if (parent.document.URL.indexOf('c' + jvid + '=on') != -1 || parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
//alert('auDio ');

if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('video') != -1) {
etype='video';
} else if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf('c' + jvid + '=on') != -1) {
if (parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0].indexOf('video') != -1) {
etype='video';
} else if (parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('video') != -1) {
etype='video';
} else if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf('c' + jvid + '=on') != -1) {
if (parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
}
newa=document.createElement(etype);
if (etype == 'img') {
newa.onload=function(event){
etg=event.target;
if (parent.document.URL.indexOf(encodeURIComponent('c' + eval(1 + jvid) + '=on')) != -1 || parent.document.URL.indexOf(('c' + eval(1 + jvid) + '=on')) != -1) {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
if (parent.document.getElementById('loopchk')) {
if (parent.document.getElementById('loopchk').checked) {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
} else {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
}
};
} else {
newa.onloadedmetadata=function(event){
etg=event.target;
if (parent.document.URL.indexOf(encodeURIComponent('c' + eval(1 + jvid) + '=on')) != -1 || parent.document.URL.indexOf(('c' + eval(1 + jvid) + '=on')) != -1) {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
if (parent.document.getElementById('loopchk')) {
if (parent.document.getElementById('loopchk').checked) {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
} else {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
}
//alert('played');
};
}
//newa.onload=function(event){
// etg=event.target;
// setTimeout(function(){ etg.play(); alert(564); }, 900);
//};
//if (parent.document.URL.indexOf('#') != -1) {
// alert(parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data')));
// alert(parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data&')));
// alert(parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data#')));
//}

if (parent.document.URL.indexOf('#') != -1 && parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data')) != -1 && (parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data&')) == -1 && parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data#') == -1))) {
lhd=decodeURIComponent(decodeURIComponent(parent.document.URL.split('#')[1])).replace(/\ /g,'+');
lhds=lhd.split('data:');
//alert('lhds.length=' + lhds.length + ' and thisnumreldata=' + thisnumreldata);
if (eval('' + lhds.length) >= eval(1 + eval('' + thisnumreldata))) {
//alert('AuDiO ' + atend + ' data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
ismedia=true;
//alert('1a:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
//alert('1b:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0].slice(-20));
newa.src=butellipsis('data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
parent.document.getElementById('i' + jvid).value=newa.src;
duration=eval('' + thispt);
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('987:' + duration);
//}
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById('preareyousinging').innerHTML+='<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype.replace('img','image') + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0].split('+')[0] + ' src="' + newa.src + ('" controls></' + etype).replace('" controls></img','"></img') + '><br>';
//pwo=parent.window.open('','_blank','top=50,left=50,width=600,height=600');
//pwo.document.write('<html><body>' + '<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0] + ' src="' + newa.src + '" controls></' + etype + '><br>' + '</body></html>');
}
}
} else if (parent.document.URL.indexOf('#') != -1 && parent.document.URL.indexOf('i' + jvid + '=data') != -1 && (parent.document.URL.indexOf('i' + jvid + '=data&') == -1 && parent.document.URL.indexOf('i' + jvid + '=data#') == -1)) {
//alert(11);
lhd=decodeURIComponent(parent.document.URL.split('#')[1]).replace(/\ /g,'+');
lhds=lhd.split('data:');
//alert('lHds.length=' + lhds.length + ' and thisnumreldata=' + thisnumreldata);
if (eval('' + lhds.length) >= eval(1 + eval('' + thisnumreldata))) {
//alert('AudiO ' + 'data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
ismedia=true;
newa.src=butellipsis('data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
parent.document.getElementById('i' + jvid).value=newa.src;
duration=eval('' + thispt);
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('1987:' + duration);
//}
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById('preareyousinging').innerHTML+='<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype.replace('img','image') + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0].split('+')[0] + ' src="' + newa.src + ('" controls></' + etype).replace('" controls></img','"></img') + '><br>';
//pwo=parent.window.open('','_blank','top=50,left=50,width=600,height=600');
//pwo.document.write('<html><body>' + '<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0] + ' src="' + newa.src + '" controls></' + etype + '><br>' + '</body></html>');
}
}
} else if (decodeURIComponent(parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+') != 'data') {
//alert(111);
//alert('Audio ' + decodeURIComponent(parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+'));
ismedia=true;
newa.src=butellipsis(decodeURIComponent(parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+'));
parent.document.getElementById('i' + jvid).value=newa.src;
duration=eval('' + thispt);
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('2987:' + duration);
//}
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById('preareyousinging').innerHTML+='<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype.replace('img','image') + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0].split('+')[0] + ' src="' + newa.src + ('" controls></' + etype).replace('" controls></img','"></img') + '><br>';
//pwo=parent.window.open('','_blank','top=50,left=50,width=600,height=600');
//pwo.document.write('<html><body>' + '<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0] + ' src="' + newa.src + '" controls></' + etype + '><br>' + '</body></html>');
}
}
}
}
}
}

return ismedia;
}

function kkpize() {
if (iload < eval('' + kkpil.length)) {
kkp=kkpil[iload];
parent.document.getElementById('i' + kkp).value='0|' + vidarrv[kkp] + '#' + decodeURIComponent(parent.document.URL.split('&kk' + kkp + '=')[1].substring(11).split('&')[0].split('#')[0]);
//alert('2:' + decodeURIComponent(parent.document.URL.split('&kk' + kkp + '=')[1].substring(11).split('&')[0].split('#')[0]));
parent.checkval(parent.document.getElementById('i' + kkp));
iload++;
}
}

function dovidarrv() {
var precontc=0, interimidea='-1';
if (parent.document.URL.replace(/\%23http$/g,'#http').indexOf('#http') != -1 && (!lookedat || eval('' + vidarrv.length) == 0)) {
//alert('yes1' + parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur='));
//alert(decodeURIComponent(parent.document.URL.split('#')[1]).replace('&kundur=','&unknowndur=').split('&unknowndur=')[0].split('&loop')[0].split('&name')[0].split('//')[1]);
lookedat=true;
if (parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur=').indexOf('&unknowndur=y') != -1 || parent.document.URL.split('#')[0].split('//')[1].replace('&kundur=','&unknowndur=').split('&unknowndur=')[0] == decodeURIComponent(parent.document.URL.split('#')[1]).replace('&kundur=','&unknowndur=').split('&unknowndur=')[0].split('&loop')[0].split('&name')[0].split('//')[1]) {
//alert('yes2');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur=').indexOf('&unknowndur=y') != -1) {
//alert('yes3');
comeval=parent.getcomingurl();
if (comeval == '' && parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur=').indexOf('&unknowndur=y') != -1) {
comeval=parent.document.URL;
}
if (comeval != '') {
//alert('yes4 ' + parent.document.URL.split('&i0=')[1]);
//alert(1);
if (prepurd == purld || 2 == 2) { parent.unsetieo(); } else { parent.justunsetieo(); }
//alert(11);
firstdelay=eval(eval(parent.document.URL.split('&j0=')[1].split('&')[0].split('#')[0]) - eval(parent.document.URL.split('&i0=')[1].split('|')[0].split(';')[0].split('&')[0].split('#')[0]));
//alert(firstdelay);
ivid=0;
if (('' + parent.document.URL + 's').replace('%23http','#http').replace(/\#https/g,'') == ('' + parent.document.URL.replace('%23http','#http') + 's')) {
if (prepurd == purld || 1 == 1) { ismobileplaylistplay=true; } //else { alert('agree'); }
}
// vidarr=[], vidstarts=[], viddurs=[], viddos=[]
//setTimeout(function(){
precontc=contc;
contc=0;
//alert('yes5');
for (var iipp=0; iipp<=29; iipp++) {
if (('' + top.document.URL).indexOf('isradio=') != -1) {
if (iipp == 0 && 6 == 5) {
if (('' + top.document.getElementById('navig'))) {
if (('' + top.document.getElementById('navig').title) == '') {
top.document.getElementById('navig').title=' ';
setTimeout(lookfortopnavig, 1000);
}
}
}
if (parent.document.getElementById('i' + iipp)) {
if (parent.document.getElementById('i' + iipp).outerHTML.indexOf(' oncontextmmenu=') == -1) {
parent.document.getElementById('i' + iipp).oncontextmenu=function(event){ parent.obsessabout(event); };
parent.document.getElementById('i' + iipp).ontouchmove=function(event){ parent.obsessabout(event); };
if (istitles.indexOf(iipp) == -1) {
istitles.push(iipp);
}
if (iipp == 0) {
setTimeout(function(){
for (var jipp=0; jipp<istitles.length; jipp++) {
if (('' + parent.document.getElementById('i' + jipp).title) == '') {
parent.document.getElementById('i' + jipp).title+=' Right click or touch move to toggle the looping, or not, of just this video';
} else {
parent.document.getElementById('i' + jipp).title+=' and right click or touch move to toggle the looping, or not, of just this video';
}
}
}, 8000);
}
}
}
}
if (parent.document.URL.indexOf('youtubeid=') != -1 && iipp == 0) { // && ('' + parent.document.URL + 's').replace(/\#https/g,'') == ('' + parent.document.URL + 's')) {
vidarrv.push(parent.document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0]);
console.log(vidarrv);
if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase().replace('0gz_7am23rk','cannotenda2').substring(0,11) == 'cannotenda2') {
if (parent.document.URL.indexOf('&kk' + iiipp + '=') != -1) {
vidarrv[eval(-1 + vidarrv.length)]=parent.document.URL.split('&kk' + iiipp + '=')[1].substring(0,11);
//alert('1:' + decodeURIComponent(parent.document.URL.split('&kk' + iiipp + '=')[1].substring(11).split('&')[0].split('#')[0]));
parent.document.getElementById('i' + iiipp).value='0|' + vidarrv[eval(-1 + vidarrv.length)] + '#' + decodeURIComponent(parent.document.URL.split('&kk' + iiipp + '=')[1].substring(11).split('&')[0].split('#')[0]);
parent.dvalit(true);
//kkp=iiipp;
kkpil.push(iipp);
setTimeout(kkpize, eightthous);
eightthous+=38000;
parent.checkval(parent.document.getElementById('i' + iiipp));
} else {
//alert('' + conttitle.length + 'foUnd ' + parent.document.getElementById('i' + iiipp).value);
parent.checkval(parent.document.getElementById('i' + iiipp));
}
contc=variants.indexOf(vidarrv[eval(-1 + vidarrv.length)]);
if (eval('' + conttitle.length) > contc) {
if (conttitle[contc] == '') {
vidtitle.push('Nonyt ' + contc);
} else {
vidtitle.push(conttitle[contc]);
}
contc++;
} else {
vidtitle.push('');
}
} else {
vidtitle.push('');
}
vidstarts.push(parent.neweval(parent.document.URL.split('&i' + iipp + '=')[1].split('&')[0].split('#')[0]));
if (parent.document.URL.indexOf('&c' + iipp + '=on') != -1) {
viddos.push(true);
} else if (parent.document.URL.indexOf('&c' + iipp + '=off') != -1) {
viddos.push(false);
} else {
viddos.push(false);
}
viddurs.push(parent.document.URL.split('&j' + iipp + '=')[1].split('&')[0].split('#')[0]);
if (1 == 4) {
event.target.cueVideoById(
vidarrv[eval(-1 + vidarrv.length)],
eval('' + vidstarts[eval(-1 + vidstarts.length)]),
eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])),
"medium");
}
if (parent.document.URL.indexOf('&unknowndur=') != -1 && document.URL.indexOf('&playtime=0') == -1) {
setTimeout(function(){ if (document.URL.indexOf('&playtime=0') == -1) { nextvidi=1; } }, 5000);
}
} else if (parent.document.URL.indexOf('&i' + iipp + '=') != -1 && parent.document.URL.indexOf('&i' + iipp + '=&') == -1 && parent.document.URL.indexOf('&i' + iipp + '=#') == -1) {
//if (parent.document.URL.indexOf('&unknowndur=') != -1) {
// alert('huh9=');
//}
if (parent.document.URL.indexOf('&unknowndur=') != -1 || parent.document.URL.indexOf('&kundur=') != -1) {
//alert(986);
ivid=0; // was 0
setTimeout(function(){ if (document.URL.indexOf('&playtime=0') == -1) { nextvidi=1; } }, 5000);
} else {
//alert(9486);
ivid=1;
}
if (('' + parent.document.URL).indexOf('kunJUNKdur=') == -1 && ('' + parent.document.URL + 's').replace(/\%23https$/g,'#https').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
if (iipp == 1) {
//alert(29486);
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('ismobileplaylistplay=' + ismobileplaylistplay);
//top.document.title='x';
//}
precontc=contc;
contc=0;
for (var iiipp=iipp; iiipp<30; iiipp++) {
if (parent.document.URL.indexOf('&i' + iiipp + '=') != -1 && parent.document.URL.indexOf('&j' + iiipp + '=') != -1 && parent.document.URL.indexOf('&c' + iiipp + '=') != -1) {
if (parent.document.URL.indexOf('&i' + iiipp + '=&') == -1 && parent.document.URL.indexOf('&j' + iiipp + '=&') == -1 && parent.document.URL.indexOf('&c' + iiipp + '=&') == -1) {
vidstarts.push(decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|')[0]);
if (decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|')[eval(-1 + decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|').length)] == '0Gz_7am23rk') { interimidea='' + vidarrv.length; }
vidarrv.push(decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|')[eval(-1 + decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|').length)]);
//if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase() == 'cannotenda2') {
if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase().replace('0gz_7am23rk','cannotenda2').substring(0,11) == 'cannotenda2') {
if (parent.document.URL.indexOf('&kk' + iiipp + '=') != -1) {
vidarrv[eval(-1 + vidarrv.length)]=parent.document.URL.split('&kk' + iiipp + '=')[1].substring(0,11);
parent.dvalit(true);
//kkp=iiipp;
kkpil.push(iiipp);
setTimeout(kkpize, eightthous);
eightthous+=38000;
parent.checkval(parent.document.getElementById('i' + iiipp));
} else {
//alert('' + conttitle.length + 'foUnD ' + parent.document.getElementById('i' + iiipp).value);
parent.checkval(parent.document.getElementById('i' + iiipp));
}
//alert('' + conttitle.length + 'found ' + parent.document.getElementById('i' + iiipp).value);
//parent.checkval(parent.document.getElementById('i' + iiipp));
contc=variants.indexOf(vidarrv[eval(-1 + vidarrv.length)]);
if (eval('' + conttitle.length) > contc) {
if (conttitle[contc] == '') {
vidtitle.push('Nonyt ' + contc);
} else {
vidtitle.push(conttitle[contc]);
}
contc++;
} else {
vidtitle.push('');
}
} else {
vidtitle.push('');
}
if (parent.document.URL.indexOf('&c' + iiipp + '=on') != -1) {
viddos.push(true);
} else if (parent.document.URL.indexOf('&c' + iiipp + '=off') != -1) {
viddos.push(false);
} else {
viddos.push(false);
}
viddurs.push(parent.document.URL.split('&j' + iiipp + '=')[1].split('&')[0].split('#')[0]);
}
}
}
contc=precontc;
if (eval('' + viddurs.length) > 0) {
duration='' + viddurs[0];
}
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt', top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
setTimeout(function(){ ivid=0; nextvidi=0; setTimeout(function(){ nextvidi=1; }, 5000); if (!inplaying) { inplaying=true; preplayingvideo(); setTimeout(playingvideo, 1000); } }, 1200); // used to be 1000 not 3000
//alert('iipp=' + iipp + ' where vidstarts.length=' + vidstarts.length);
}
} else {
vidstarts.push(parent.neweval(parent.document.URL.split('&i' + iipp + '=')[1].split('&')[0].split('#')[0]));
//alert(vidstarts[eval(-1 + vidstarts.length)]);
vidarrv.push(parent.newereval(parent.document.URL.split('&i' + iipp + '=')[1].split('&')[0].split('#')[0]));
if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase().replace('0gz_7am23rk','cannotenda2').substring(0,11) == 'cannotenda2') {
if (parent.document.URL.indexOf('&kk' + iiipp + '=') != -1) {
vidarrv[eval(-1 + vidarrv.length)]=parent.document.URL.split('&kk' + iipp + '=')[1].substring(0,11);
//alert('3:' + decodeURIComponent(parent.document.URL.split('&kk' + iipp + '=')[1].substring(11).split('&')[0].split('#')[0]));
parent.document.getElementById('i' + iipp).value='0|' + vidarrv[eval(-1 + vidarrv.length)] + '#' + decodeURIComponent(parent.document.URL.split('&kk' + iiipp + '=')[1].substring(11).split('&')[0].split('#')[0]);
parent.dvalit(true);
//kkp=iiipp;
kkpil.push(iipp);
setTimeout(kkpize, eightthous);
eightthous+=38000;
parent.checkval(parent.document.getElementById('i' + iipp));
} else {
//alert('' + conttitle.length + 'fOUnD ' + parent.document.getElementById('i' + iiipp).value);
parent.checkval(parent.document.getElementById('i' + iipp));
}
contc=variants.indexOf(vidarrv[eval(-1 + vidarrv.length)]);
if (eval('' + conttitle.length) > contc) {
if (conttitle[contc] == '') {
vidtitle.push('Nonyt ' + contc);
} else {
vidtitle.push(conttitle[contc]);
}
contc++;
} else {
vidtitle.push('');
}
} else {
vidtitle.push('');
}
console.log(vidarrv);
if (parent.document.URL.indexOf('&c' + iipp + '=on') != -1) {
viddos.push(true);
} else if (parent.document.URL.indexOf('&c' + iipp + '=off') != -1) {
viddos.push(false);
} else {
viddos.push(false);
}
viddurs.push(parent.document.URL.split('&j' + iipp + '=')[1].split('&')[0].split('#')[0]);
}
//alert(viddurs[eval(-1 + viddurs.length)]);
if (viddos[eval(-1 + viddos.length)] && viddurs[eval(-1 + viddurs.length)].replace(/^0/g,'') != '') {
//alert('event.target.cueVideoById(' + vidarrv[eval(-1 + vidarrv.length)] + ',' + eval('' + vidstarts[eval(-1 + vidstarts.length)]) + ',' + eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])) + ');');
if (1 == 4) {
try {
event.target.cueVideoById(
vidarrv[eval(-1 + vidarrv.length)],
eval('' + vidstarts[eval(-1 + vidstarts.length)]),
eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])),
"medium");
} catch(errsd) { alert(errsd.message); }
}
//alert('event.target.cueVideoById(' + vidarrv[eval(-1 + vidarrv.length)] + ',' + eval('' + vidstarts[eval(-1 + vidstarts.length)]) + ',' + eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])) + ');');
}

}
}
var theididx=eval(-1 + eval( '' + vidarrv.length));
if (eval('' + vidarrv.length) > 1) {
if (('' + interimidea).indexOf('-') == -1 && 5 == 7) {
vidarrv[eval('' + interimidea)]=vidarrv[0] + ' ';
viddurs[eval('' + interimidea)]=viddurs[0];
vidstarts[eval('' + interimidea)]=vidstarts[0];
vidtitle[eval('' + interimidea)]=vidtitle[0];
if (('' + parent.document.URL).indexOf('kundur=') == -1) {
setTimeout(function(){
parent.document.getElementById('i' + eval('' + interimidea)).value=parent.document.getElementById('i0').value + ' '; //='' + vidstarts[eval('' + interimidea)] + '|' + vidarrv[eval('' + interimidea)] + '#' + vidtitle[eval('' + interimidea)];
parent.document.getElementById('j' + eval('' + interimidea)).value=('' + parent.document.getElementById('j0').value).split('.')[0] + '.1'; //='' + viddurs[eval('' + interimidea)];
}, 4000);
}
} else if (vidarrv[eval(-1 + eval( '' + vidarrv.length))] == '0Gz_7JUNKam23rk') {
vidarrv[eval(-1 + eval( '' + vidarrv.length))]=vidarrv[0] + ' ';
viddurs[eval(-1 + eval( '' + vidarrv.length))]=viddurs[0];
vidstarts[eval(-1 + eval( '' + vidarrv.length))]=vidstarts[0];
vidtitle[eval(-1 + eval( '' + vidarrv.length))]=vidtitle[0];
if (('' + parent.document.URL).indexOf('kundur=') == -1) {
setTimeout(function(){
parent.document.getElementById('i' + eval(-1 + eval( '' + vidarrv.length))).value=parent.document.getElementById('i0').value + ' '; //='' + vidstarts[eval(-1 + eval( '' + vidarrv.length))] + '|' + vidarrv[eval(-1 + eval( '' + vidarrv.length))] + '#' + vidtitle[eval(-1 + eval( '' + vidarrv.length))];
parent.document.getElementById('j' + eval(-1 + eval( '' + vidarrv.length))).value=('' + parent.document.getElementById('j0').value).split('.')[0] + '.1'; //('' + viddurs[eval(-1 + eval( '' + vidarrv.length))].split('.')[0] + '.1';
}, 4000);
}
}
}
contc=0;
//alert('vidarrv.length=' + vidarrv.length);
//alert('found! looping ' + parent.getlooping());
setInterval(lookforparentcues, 100);
//}, 4000);
}
}
}
}
}

function halfway(givid,gvid,gviddurs,gtitle) {
var iivid=givid, ggvid=gvid, retval='', bmaybe=true, gggvid=gvid;
var kkk=0;
console.warn('halfway ');
if (parent.document.getElementById('myiframe')) {
parent.document.getElementById('myiframe').title='No more';
}
while (parent.document.getElementById('i' + kkk)) {
if (parent.document.getElementById('c' + kkk).checked) {
if (kkk == 0) { parent.document.getElementById('xx0').style.backgroundColor='lightgreen'; }
if (bettervalue(kkk,parent.document.getElementById('i' + kkk).value).indexOf(gvid) != -1) {
if (kkk == 0 && ('' + parent.document.getElementById('i' + eval(0 + kkk)).title).indexOf(' tap/click ') == -1) {
setTimeout(function(){
//alert('0:' + parent.document.getElementById('myh1').innerHTML);
parent.document.getElementById('i0').title=placeholderis(0, '' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this');
}, 4000);
}
if (kkk > 1 && parent.document.getElementById('c1')) {
if (parent.document.getElementById('c1').checked && parent.document.getElementById('i1').value.replace(',','|').replace('!','|').replace('@','|').replace('#','|').indexOf('|') != -1) {
if (parent.document.getElementById('j1').value.indexOf('2222') == -1 && (parent.document.getElementById('j1').value + '0').substring(0,1) != '0') {
if (parent.document.getElementById('i1').title.indexOf(' tap/click ') != -1) {
if (window.parent && 1 == 1) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
parent.window.opener.setvurl(parent.document.getElementById('i1').value.substring(2).slice(-11), parent.document.getElementById('i1').title.split(' ...')[0], parent.document.getElementById('j1').value);
}
} else if (typeof top.setdurl == 'function') {
top.setdurl(parent.document.getElementById('i1').value.substring(2).slice(-11), parent.document.getElementById('i1').title.split(' ...')[0], parent.document.getElementById('j1').value);
}



}
}
}
}
}
iivid=kkk;
setTimeout(function(){
if (parent.document.getElementById('i' + eval(-1 + iivid))) {
//parent.document.getElementById('youtubeid').value='' + gvid;
//parent.document.getElementById('youtube_duration').value='' + gviddurs;
vidtitle[iivid]=gtitle;
parent.document.getElementById('i' + eval(-1 + iivid)).placeholder='' + gtitle;
parent.document.getElementById('j' + eval(-1 + iivid)).value=gviddurs;
parent.document.getElementById('i' + eval(-1 + iivid)).title=placeholderis(eval(-1 + iivid), '' + gtitle.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this');
parent.document.getElementById('i' + eval(-1 + iivid)).setAttribute('data-index', '' + eval(-1 + iivid));
parent.document.getElementById('i' + eval(-1 + iivid)).setAttribute('data-title', '' + gtitle);
parent.document.getElementById('i' + eval(-1 + iivid)).ondblclick=function(event){ parent.setforcemix(event.target.getAttribute('data-index')); parent.mixitup(parentdocumentURL,true); ttt.title=event.target.getAttribute('data-title'); };
if (parent.document.getElementById('xx' + eval(-1 + iivid))) {
console.warn('halfwaY ' + eval(-1 + iivid));
parent.document.getElementById('xx' + eval(-1 + iivid)).style.backgroundColor='lightgreen';
}
}
try {
var xds='' + player.getDuration();
stduration=eval(xds);
if (xds != 'undefined') {
parent.document.getElementById('j' + eval(-1 + iivid)).value='' + xds;
viddurs[eval(-1 + iivid)]='' + xds;
parent.document.getElementById('youtube_duration').value='' + xds;
//alert(xds);
if (parent.document.getElementById('youtubeid').value == gvid) {
parent.document.getElementById('youtube_duration').value='' + xds;
}
parentdocumentURL=parentdocumentURL.replace('&j' + eval(-1 + iivid) + '=22221', '&j' + eval(-1 + iivid) + '=' + xds).replace(encodeURIComponent('&j' + eval(-1 + iivid) + '=22221'), encodeURIComponent('&j' + eval(-1 + iivid) + '=' + xds));
if (window.parent && 1 == 1) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
parent.window.opener.setvurl(gvid, gtitle, xds);
}
} else if (typeof top.setdurl == 'function') {
top.setdurl(gvid, gtitle, xds);
}
}
}
} catch(ghtr) { }
}, 5000);
} else if (kkk == 0 && bettervalue(kkk,parent.document.getElementById('i' + eval(0 + kkk)).value).replace(',','|').replace('!','|').replace('@','|').replace('#','|').indexOf('|') != -1) {
ggvid=parent.document.URL.split('youtubeid=')[1].split('&')[0];
if (('' + parent.document.getElementById('i' + eval(0 + kkk)).title).indexOf(' tap/click ') == -1) {
setTimeout(function(){
//alert('0:' + parent.document.getElementById('myh1').innerHTML);
parent.document.getElementById('i0').title='' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this';
}, 4000);
parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-index', '0');
//parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-title', '' + gtitle);
if (parent.document.URL.indexOf('#http') != -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ parent.location.href=parentdocumentURL; };
} else {
console.warn('9870');
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ if (parent.window.opener.document.getElementById('awowowo')) { parent.window.opener.document.getElementById('awowowo').click(); parent.location.href=parent.document.URL.split('?')[0].split('#')[0]; } else { parentdocumentURL='' + document.URL.split(':')[0] + ':' + decodeURIComponent(parent.document.URL.split('#http')[1]).replace(/^s\:/g,'').replace(/^\:/g,'').split('&loop')[0] + '#http' + parent.document.URL.split('#http')[1]; parent.location.href=parentdocumentURL; } };
}
} else {
console.warn('98701');
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ if (parent.window.opener.document.getElementById('awowowo')) { parent.window.opener.document.getElementById('awowowo').click(); parent.location.href=parent.document.URL.split('?')[0].split('#')[0]; } else { parent.location.href=parentdocumentURL; } };
}
}

if (window.parent && 1 == 1) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
parent.window.opener.setvurl(ggvid, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}
} else if (typeof top.setdurl == 'function') {
top.setdurl(ggvid, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}
}

var kkkk=kkk;
kkkk++;
while (parent.document.getElementById('i' + eval(0 + kkkk))) {
if (('' + parent.document.getElementById('i' + eval(0 + kkkk)).title).indexOf(' tap/click ') == -1 && bettervalue(kkkk,parent.document.getElementById('i' + eval(0 + kkkk)).value).replace(',','|').replace('!','|').replace('@','|').replace('#','|').indexOf('|') != -1) {
gggvid=bettervalue(kkkk,parent.document.getElementById('i' + eval(0 + kkkk)).value).substring(2).slice(-11);
if (window.parent) {
if (parent.window.opener) {
if (typeof parent.window.opener.getvresults == 'function') {
retval=('' + parent.window.opener.getvresults(gggvid)).replace('||','');
if (retval.trim().indexOf('|') != -1) {
parent.document.getElementById('j' + eval(0 + kkkk)).value='' + retval.trim().split('|')[0];
parent.document.getElementById('i' + eval(0 + kkkk)).title=placeholderis(eval(0 + kkkk),'' + retval.split(retval.split('|')[0] + '|' + retval.split('|')[1] + '|')[1].replace(/\&\;/g,'&') + ' ... double tap/click to jump to this');
parent.document.getElementById('i' + eval(0 + kkkk)).setAttribute('data-index', '' + eval(0 + kkkk));
parent.document.getElementById('i' + eval(0 + kkkk)).setAttribute('data-title', '' + retval.split(retval.split('|')[0] + '|' + retval.split('|')[1] + '|')[1]);
parent.document.getElementById('i' + eval(0 + kkkk)).ondblclick=function(event){ parent.setforcemix(event.target.getAttribute('data-index')); parent.mixitup(parentdocumentURL,true); ttt.title=event.target.getAttribute('data-title'); };
}
}
}
}
}
kkkk++;
}


} else if (bettervalue(kkk,parent.document.getElementById('i' + eval(0 + kkk)).value).replace(',','|').replace('!','|').replace('@','|').replace('#','|').indexOf('|') != -1) {
ggvid=bettervalue(kkk,parent.document.getElementById('i' + eval(0 + kkk)).value).substring(2).slice(-11);
bmaybe=true;
if (('' + parent.document.getElementById('i' + eval(0 + kkk)).title).indexOf(' tap/click ') == -1) {
if (window.parent) {
if (parent.window.opener) {
if (typeof parent.window.opener.getvresults == 'function') {
retval=('' + parent.window.opener.getvresults(ggvid)).replace('||','');
if (retval.trim().indexOf('|') != -1) {
parent.document.getElementById('j' + eval(0 + kkk)).value='' + retval.trim().split('|')[0];
parent.document.getElementById('i' + eval(0 + kkk)).title=placeholderis(eval(0 + kkk),'' + retval.split(retval.split('|')[0] + '|' + retval.split('|')[1] + '|')[1].replace(/\&\;/g,'&') + ' ... double tap/click to jump to this');
parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-index', '' + eval(0 + kkk));
parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-title', '' + retval.split(retval.split('|')[0] + '|' + retval.split('|')[1] + '|')[1]);
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ parent.setforcemix(event.target.getAttribute('data-index')); parent.mixitup(parentdocumentURL,true); ttt.title=event.target.getAttribute('data-title'); };
bmaybe=false;
}
}
}
}
if (bmaybe && prepurd == purld) {
//alert('wow');
parent.document.getElementById('i' + eval(0 + kkk)).title=placeholderis(eval(0 + kkk), 'YouTube video ' + ggvid + ' ... double click/tap to jump to this');
parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-index', '' + eval(0 + kkk));
//parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-title', '' + gtitle);
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ parent.setforcemix(event.target.getAttribute('data-index')); parent.mixitup(parentdocumentURL,true); };
}
}
}
}
kkk++;
}
if (eval('' + vidarrv.length) > 0) {
if (parent.document.getElementById('i' + eval(-1 + vidarrv.length))) {
if (parent.document.getElementById('i' + eval(-1 + vidarrv.length)).outerHTML.indexOf(' data-value') != -1) {
if (parent.document.getElementById('i' + eval(-1 + vidarrv.length)).outerHTML.indexOf(' data-done') == -1) {
parent.document.getElementById('i' + eval(-1 + vidarrv.length)).setAttribute('data-done', 'y');
setInterval(togglevalue, 8000);
}
}
}
}
return gtitle;
}

function togglevalue() {
for (var iig=0; iig<vidarrv.length; iig++) {
if (parent.document.getElementById('i' + eval(-1 + vidarrv.length)).value == '') {
if (iig == 0 && ('' + parent.document.getElementById('i' + iig).getAttribute('data-value')).replace(/^null/g,'').replace(/^undefined/g,'') == '') {
parent.document.getElementById('i' + iig).setAttribute('data-value', '0');
parent.document.getElementById('i0').placeholder=parent.document.getElementById('i0').title;
}
if (('' + parent.document.URL + 's').replace(/\#https/g,'') == ('' + parent.document.URL + 's')) {
parent.document.getElementById('i' + iig).value=parent.document.getElementById('i' + iig).getAttribute('data-value');
}
} else {
if (('' + parent.document.URL + 's').replace(/\#https/g,'') == ('' + parent.document.URL + 's')) {
parent.document.getElementById('i' + iig).value='';
}
}
}
}

function bettervalue(isuffix, valuemaps) {
var altvmaps='';
if (valuemaps == '' && parent.document.getElementById('i' + isuffix)) {
altvmaps=('' + parent.document.getElementById('i' + isuffix).getAttribute('data-value')).replace(/^undefined/g,'').replace(/^null/g,'');
if (altvmaps != '') { return altvmaps; }
}
return valuemaps;
}

function placeholderis(isuffix, titlemaps) {
if (parent.document.getElementById('i' + isuffix)) {
parent.document.getElementById('i' + isuffix).placeholder=titlemaps;
}
if (parent.document.getElementById('i' + isuffix).outerHTML.indexOf(' data-value') == -1) {
//if (parent.document.getElementById('i' + eval(-1 + vidarrv.length)).outerHTML.indexOf(' data-done') != -1) {
// alert('whY with ' + '' + bettervalue(isuffix,parent.document.getElementById('i' + isuffix).value));
//}
parent.document.getElementById('i' + isuffix).setAttribute('data-value', '' + bettervalue(isuffix,parent.document.getElementById('i' + isuffix).value));
} else if (('' + parent.document.getElementById('i' + isuffix).getAttribute('data-value')) != ('' + parent.document.getElementById('i' + isuffix).value)) {
//if (parent.document.getElementById('i' + eval(-1 + vidarrv.length)).outerHTML.indexOf(' data-done') != -1) {
// alert('why with ' + '' + bettervalue(isuffix,parent.document.getElementById('i' + isuffix).value));
//}
var bv=bettervalue(isuffix,parent.document.getElementById('i' + isuffix).value);
parent.document.getElementById('i' + isuffix).removeAttribute('data-value');
parent.document.getElementById('i' + isuffix).setAttribute('data-value', '' + bv);
}
if (isuffix > 0) {
if (parent.document.getElementById('i0').outerHTML.indexOf(' data-value') == -1) {
if (parent.document.getElementById('i0').title.indexOf('click') != -1 && parent.document.getElementById('i0').title.indexOf('tap') != -1) {
placeholderis(0, parent.document.getElementById('i0').title);
}
}
}
return titlemaps;
}

function preparentlook() {
return '';
firstdelay=-1;
if (ivid < eval('' + vidarrv.length)) {
//alert('0:' + ivid);
if (oktoivid) {
while (!parent.document.getElementById('c' + ivid).checked) {
//if (parent.document.URL.indexOf('&unknowndur=') != -1) {
// alert('huh1=');
//}
ivid++;
if (ivid >= eval('' + vidarrv.length)) {
if (!parent.document.getElementById('loopchk')) {
ivid=-1;
} else if (parent.document.getElementById('loopchk').checked) {
ivid=0;
} else {
ivid=-1;
}
}
}
}
//alert('00:' + ivid);
if (ivid >= 0) {
//alert('000:' + ivid + ' ' + vidarrv[ivid]);
event.target.cueVideoById(vidarrv[ivid], eval('' + vidstarts[ivid]), eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid])), "medium");
if (firstdelay < 0) {
firststdone=false;
firstdelay=eval(eval('' + viddurs[eval(eval(1 + ivid) % viddurs.length)]) - eval('' + vidstarts[eval(eval(1 + ivid) % vidstarts.length)]));
}
event.target.playVideo();
}
//if (parent.document.URL.indexOf('&unknowndur=') != -1) {
// alert('huh2=');
//}
ivid++;
if (ivid >= eval('' + vidarrv.length)) {
ivid=0;
}
if (ivid < eval('' + vidarrv.length)) {
//alert(eval(1000 * eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]))));
if ('sadnews' == 'sadnews') {
if (firstdelay < 0) {
firststdone=false;
firstdelay=eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]));
}
} else {
setTimeout(preparentlook, eval(1000 * eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]))));
}
}
}
}

function dowpwo() {
if (window.parent && 1 == 1) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
parent.window.opener.setvurl(parent.document.getElementById('youtubeid').value, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}
} else if (typeof top.setdurl == 'function') {
top.setdurl(parent.document.getElementById('youtubeid').value, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}
}
}

function lookforparentcues() {
return '';
var thisorder=parent.getcue();
if (thisorder != '') {
parent.setcue('');
if (thisorder == 'startagain') {
for (var iipp=0; iipp<vidarrv.length; iipp++) {
if (ipp == 0) {
event.target.cueVideoById(vidarr[ipp], eval('' + vidstarts[0]), eval(eval('' + viddurs[ipp]) - eval('' + vidstarts[ipp])), "medium");
} else {
event.target.cueVideoById(vidarr[ipp], eval('' + vidstarts[ipp]), eval(eval('' + viddurs[ipp]) - eval('' + vidstarts[ipp])), "medium");
}
}
}
event.target.playVideo();
}
}

// 4. The API will call this function when the video player is ready.
function onPlayerReady(event) {
var oktoplay=true;
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('apr');
//}

if (1 == 1) {
if (window.parent) {
if (parent.document.getElementById('youtube_duration')) {
if (parent.document.getElementById('youtube_duration').value == '22234.0') { // || prepurd != purld
event.target.mute();
event.target.playVideo();
player.mute();
//setTimeout(function(){ var adur=player.getDuration(); player.stopVideo(); player.unMute(); parent.document.getElementById('youtube_duration').value='' + adur; parent.document.getElementById('j0').value='' + adur; player.seekTo(0); }, 10);
//setTimeout(function(){
//if (parent.document.getElementById('youtube_duration').value == '22234.0') {
var adur=player.getDuration();
var jtitl=player.getVideoData().title;
player.stopVideo();
parent.document.getElementById('youtube_duration').value='' + adur;
parent.document.getElementById('j0').value='' + adur;
//player.seekTo(0);
if (window.top) {
if (!top.document.getElementById('divtitles')) {
top.document.body.innerHTML+='<div id=divtitles style=display:none;></div>';
}
}
if (top.document.getElementById('divtitles')) {
if (top.document.getElementById('divtitles').innerHTML.indexOf('|' + parent.document.getElementById('youtubeid').value + '#') == -1) {
if (('' + typeof window.top.mod_gtdzero) == 'function') {
top.mod_gtdzero(parent.document.getElementById('youtubeid').value, parent.document.getElementById('youtube_duration').value, jtitl.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and '));
}
top.document.getElementById('divtitles').innerHTML+='<span>' + parent.document.getElementById('youtube_duration').value + '</span><span>0|' + parent.document.getElementById('youtubeid').value + '#' + jtitl.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + '</span>';
}
}
//}
//}, 1000);
} else if (parent.document.URL.replace(/\#http$/g,'') != parent.document.URL) {
if (parent.document.getElementById('myiframe')) {
parent.document.getElementById('myiframe').title='No more';
}
}
}
}
}


if (document.URL.indexOf('start=0') != -1 && document.URL.indexOf('playtime=0') != -1) {
if (parent.document.getElementById('youtube_duration')) {
if (parent.document.getElementById('youtube_duration').value != "") {
if (parent.document.getElementById('myh1')) {
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('apr not ok');
//}
parent.document.getElementById('youtubeid').value='' + vid; // new
parent.document.getElementById('myh1').innerHTML=halfway(ivid,vid,parent.document.getElementById('youtube_duration').value,event.target.getVideoData().title);
oktoplay=false;
}
}
}
}
if (oktoplay) {
if (doseek != 0) {
console.warn('Here at non 0');
//event.target.playVideo();
console.warn('Here at non 00');
event.target.mute();
event.target.seekTo(eval('' + doseek));
console.warn('Here at non 000');
setTimeout(function(){
player.unMute();
player.playVideo();
}, 1100);
console.warn('Here at non 0000');
doseek=0;
} else {
event.target.playVideo();
}
toggle=eval(1 - toggle);
if (window.parent) {
if (parent.document.getElementById('youtube_duration')) {
if (parent.document.getElementById('youtube_duration').value.indexOf("22222.") == 0) { // || ('' + top.document.URL).indexOf('/select_palette.') != -1) { // new loosening
if (('' + parent.document.getElementById('youtube_duration').title) == '') {
parent.document.getElementById('youtube_duration').title=vid;
parent.document.getElementById('youtube_duration').setAttribute('data-vid', '' + vid);
if (document.URL.indexOf('but=y') == -1) {
try {
event.target.mute();
} catch(hjgfjhg) {
player.mute();
}
mletter='M';
uletter='u';
} else {
try {
event.target.unMute();
} catch(hjgfjhg) {
player.unMute();
}
mletter='m';
uletter='U';
}
//setTimeout(function(){ event.target.unMute(); }, 2000);
parent.document.getElementById('youtube_duration').value="22222.0100";
//event.target.stopVideo();
//alert('245 ' + parent.document.getElementById('youtube_duration').title + '?');
} else {
event.target.unMute();
}
}
}
}
if (play_list_id != '' && play_list_id.length > ('cGdz3GNhEQ4').length && document.URL.indexOf('playtime=') != -1) {
//window.open('./stop_start_youtube.html','_blank');
//location.href=event.target.getVideoUrl();
var yturlis=event.target.getVideoUrl();
if (document.URL.indexOf('nowo=') == -1 && urlis == '') window.open(yturlis,'_blank','top=50,left=650,width=700,height=800');
}
}
}

// 5. The API calls this function when the player's state changes.
// The function indicates that when playing a video (state=1),
// the player should play for six seconds and then stop.
var done = false;
function onPlayerStateChange(event) {
var sgoes=0, previvid=0;
one=0;
onepause=0;
if (window.top) {
if (top.document.getElementById('listeleven') && eval('' + vid.trim().length) == 11 || ismobileplaylistplay) {
if (top.document.getElementById('listeleven').innerHTML != '' || ismobileplaylistplay) {
if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') != -1 || ismobileplaylistplay) {
if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') < 11 || ismobileplaylistplay) {
if (event.data == YT.PlayerState.PLAYING) {
if (wpwp) { if (88 == 88 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('269:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
isnotplaying=false;
if (wpp) {
if (wpp.document.getElementById('diaudiov')) {
if (wpp.document.getElementById('diaudiov').outerHTML.indexOf(' class="') != -1) {
wpp.document.getElementById('diaudio').innerHTML=wpp.document.getElementById('diaudiov').outerHTML.replace(' class="loop autoplay"', '').replace('hidden;','visible;display:inline-block;');
wpp.document.getElementById('diaudio').style.display='inline-block';
}
}
}
if (enforcedtimeis < 0.0) { enforcedtimeis=0.0; }
var okt=true;
previvid=ivid;
if (ismobileplaylistplay) {
if (firstdelay < 0) {
firstdelay=eval(eval(parent.document.URL.split('&j0=')[1].split('&')[0].split('#')[0]) - eval(parent.document.URL.split('&i0=')[1].split(';')[0].split('&')[0].split('#')[0]));
}
if (!firststdone) {
if (('' + parent.document.getElementById('i0').title).indexOf(' tap/click ') == -1) {
setTimeout(function(){
parent.document.getElementById('i0').title=placeholderis(0, '' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this');
parent.document.title='' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'&');
}, 4000);
}
//if (parent.document.URL.indexOf('&unknowndur=') != -1) {
// alert('firstdelay=' + firstdelay);
//}
firststdone=true;
setTimeout(preparentlook, eval(1000 * firstdelay));




if (parent.document.getElementById('shufflechk') && !firstshuffle) {
if (parent.document.getElementById('shufflechk').checked) {
console.log('1:' + lastshuffle + ' ' + vidarrv.length);
console.log(11);
dovidarrv();
if (oktoivid) {
firstshuffle=true;
ivid=eval(Math.floor(Math.random() * 198675643) % Math.max(1,eval('' + vidarrv.length)));
console.log('ivid=' + ivid);
sgoes=0;
while (!parent.document.getElementById('c' + ivid).checked || ivid == lastshuffle) {
ivid=eval(Math.floor(Math.random() * 198675643) % Math.max(1,eval('' + vidarrv.length)));
console.log('IVID=' + ivid);
sgoes++;
if (sgoes > 100) { lastshuffle=-1; }
}
lastshuffle=ivid;
}
console.log('lastshuffle=' + lastshuffle);
}
}

//}


console.log('034:' + ' nextvidi=' + nextvidi);
if (nextvidi >= 0) { ivid=nextvidi; nextvidi=-2; } //else { alert('oops=' + nextvidi); }
//if (('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) { // new if
// alert('nextvidi=' + nextvidi + ' and lastnext=' + lastnext);
//}
console.log('IviD=' + ivid);
console.log('134:' + lastshuffle + ' previvid=' + previvid + ' nextvidi=' + nextvidi);
if (ivid != 0 || lastshuffle == 0) {
if (lastshuffle == 0 && ivid == 0) {
if (previvid == 0) {
if (parent.document.getElementById('j0').value.indexOf('2222') != 0 && ismobileplaylistplay) {
if (parent.window.opener.document.getElementById('awowowo')) {
atnextend=true; //parent.window.opener.document.getElementById('awowowo').click();
}
}
}
parent.document.getElementById('xx0').style.backgroundColor='lightgreen';
vid=vidarrv[ivid];
secscnt='' + eval('' + vidstarts[ivid]);
enforcedtimeis=eval('' + vidstarts[ivid]);
vidarr=vid.split(',');
playtime=eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]));
if (previvid != 0 && oktoivid) {
//alert('Why1 ' + ivid);
vid=vidarrv[ivid]; // new
event.target.loadVideoById(vidarrv[ivid], eval('' + vidstarts[ivid]), eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid])));
lastnext=ivid;
} else if (atnextend) {
//alert('66:' + vidarrv[ivid] + ' vs ' + vidarrv[8]);
//alert('Why2 ' + eval(-1 + vidarrv.length));
vid=vidarrv[eval(-1 + vidarrv.length)]; // new
event.target.loadVideoById(vidarrv[eval(-1 + vidarrv.length)], eval('' + vidstarts[eval(-1 + vidarrv.length)]), eval(eval('' + viddurs[eval(-1 + vidarrv.length)]) - eval('' + vidstarts[eval(-1 + vidarrv.length)])));
lastnext=eval(-1 + vidarrv.length);
setTimeout(function(){ placeholderis(eval(-1 + vidarrv.length), parent.document.getElementById('myh1').innerHTML + ' ... double tap/click to jump to this'); console.warn('halFwaY ' + eval(-1 + vidarrv.length)); parent.document.getElementById('xx' + eval(-1 + vidarrv.length)).style.backgroundColor='lightgreen'; }, 3000);
}
oktoivid=false;
if (atnextend) {
setTimeout(function(){ oktoivid=true; }, 7900);
parent.document.getElementById('youtubeid').value=vidarrv[eval(-1 + vidarrv.length)];
parent.document.getElementById('youtube_duration').value='' + viddurs[eval(-1 + vidarrv.length)];
//alert('6:' + vid + ' of ' + vidarrv.length);
} else {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
setTimeout(function(){ oktoivid=true; }, 29900);
} else {
setTimeout(function(){ oktoivid=true; }, 8900); // was 1900
}
parent.document.getElementById('youtubeid').value=vid;
parent.document.getElementById('youtube_duration').value='' + viddurs[ivid];
}
setTimeout(function(){
if (atnextend) {
//alert('ThERE');
parent.document.getElementById('youtube_duration').value='' + player.getDuration();
parent.document.getElementById('j' + eval(-1 + vidarrv.length)).value=parent.document.getElementById('youtube_duration').value;
parent.document.getElementById('i' + eval(-1 + vidarrv.length)).title='' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this';
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML='' + event.target.getVideoData().title;
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt', top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
dowpwo();
} else {
//alert('thERE');
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML=halfway(ivid,vid,viddurs[ivid],event.target.getVideoData().title);
ttt.title=event.target.getVideoData().title;
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
}
}, 6000);
} else {
//setTimeout(function(){
vid=vidarrv[ivid];
secscnt='' + eval('' + vidstarts[ivid]);
enforcedtimeis=eval('' + vidstarts[ivid]);
vidarr=vid.split(',');
playtime=eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]));
if (oktoivid) {
//alert('Why3 ' + ivid);
vid=vidarrv[ivid]; // new
event.target.loadVideoById(vidarrv[ivid], eval('' + vidstarts[ivid]), eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid])));
lastnext=ivid;
}
oktoivid=false;
setTimeout(function(){ oktoivid=true; }, 8900); // was 1900
//if (atnextend) {
//alert('7:' + vid);
//}
// parent.document.getElementById('youtubeid').value=vid;
// parent.document.getElementById('youtube_duration').value='' + viddurs[ivid];
parent.document.getElementById('youtubeid').value=vid; // new
setTimeout(function(){ parent.document.getElementById('myh1').innerHTML=halfway(ivid,vid,viddurs[ivid],event.target.getVideoData().title); ttt.title=event.target.getVideoData().title; }, 2000);
//}, 3000);
}
}
}
}
if (eval('' + endcnt) <= 0) { endcnt=1; }
consolelog('playing event.data=' + event.data + ' was=' + top.document.getElementById('listeleven').innerHTML);
//if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 0) {
top.document.getElementById('listeleven').innerHTML=' ' + top.document.getElementById('listeleven').innerHTML.replace(' ',' ').trim();
consolelog('Playing event.data=' + event.data + ' is=' + top.document.getElementById('listeleven').innerHTML);
//} else if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 2) {
// top.document.getElementById('listeleven').innerHTML=' ' + top.document.getElementById('listeleven').innerHTML.trim();
//}
if (lastshuffle < 0) { lastshuffle=ivid; }
} else if (event.data == YT.PlayerState.PAUSED) {
if (wpwp) { if (8 == 8 || wpwp.document.getElementById('curct').innerHTML == '') {
wpwp.document.getElementById('curct').title='';
//alert('169:' + ' ' + eval(event.target.getCurrentTime()).toFixed(3) + ' to ' + wpwp.document.getElementById('curct').innerHTML);
} }
isnotplaying=true;
//alert('Why');
consolelog('paused event.data=' + event.data + ' was=' + top.document.getElementById('listeleven').innerHTML);
endcnt=2;
//alert('paused event.data=' + event.data);
//if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 0) {
top.document.getElementById('listeleven').innerHTML='  ' + top.document.getElementById('listeleven').innerHTML.replace(' ',' ').trim();
consolelog('Paused event.data=' + event.data + ' is=' + top.document.getElementById('listeleven').innerHTML);
//} else if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 1) {
// top.document.getElementById('listeleven').innerHTML=' ' + top.document.getElementById('listeleven').innerHTML.trim();
//}
//alert(document.URL);
var hgx='';
if (window.parent) {
//alert(parent.document.URL);
if ((parent.document.URL + '~').indexOf('srt=~') != -1 || (parent.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
hgx='srt=';
}
}
if (window.top && hgx == '') {
//alert(parent.document.URL);
if ((top.document.URL + '~').indexOf('srt=~') != -1 || (top.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
hgx='srt=';
}
}
if (document.URL.slice(-4) == 'srt=' || hgx == 'srt=' || ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/srt\=$/g, '') != ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'') && ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^#/g,'') != '') {
if (document.getElementById('subripcommentary')) {
if (document.getElementById('subripcommentary').innerHTML == '') {
document.getElementById('subripcommentary').innerHTML='Awaiting pause for SubRip subtitles <div id=divcbi style=display:inline-block;><iframe class="spag" scrolling="no" data-accept="text/*" id="cbi" frameborder="0" style="display:inline-block;width:173px;height:218px;margin-top:-200px;" src="/HTMLCSS/client_browsing.htm?typeJUNKhastobe=text&straightJUNKtext=y&wordJUNKing=Allimages%20images%2E%20"></iframe></div><br><textarea onblur="hgrip=massage(this.value,hgrip);" id=mysubrip></textarea>';
if (sdivcbi == '') { sdivcbi=document.getElementById('divcbi').innerHTML; }
setInterval(subripize, 1000);
}
}
hgans='';
var xsecscnt=fauxit(eval(event.target.getCurrentTime()).toFixed(3));
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('66:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
// hgrip='', lasthgriprec='';
if (hgrip == '') {
if (window.opener) {

//alert(4);
if (window.opener.window.opener) {
//alert(5);
if (window.opener.document.URL.indexOf('/karaoke_') != -1 && ('' + window.opener.document.URL + '~').indexOf('srt=~') != -1) {
//alert(51);
if (window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(52);
fauxpas_w=window.opener.window.opener; //alert('yEs FounD');
} else if (window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=window.opener.window.opener; //alert('yes FounD');
}
}
}

if (window.opener.document.getElementById('stduration')) {
window.opener.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
}
}
if (window.top) {
//alert('Top');
if (top.document.getElementById('stduration')) {
top.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
} else if (window.parent) {
//alert('ParenT');
if (parent.document.getElementById('stduration')) {
parent.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
}
}
} else if (window.parent) {
//alert('Parent');
if (window.parent) {
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
if (parent.window.opener) {
if (parent.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=parent.window.opener; //alert('Found');
} else if (parent.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener; //alert('yes FounD');
}
}
}
}
if (parent.document.getElementById('stduration')) {
parent.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
}
}
document.getElementById('subtitlegoeshere').title='Captions and subtitles';
hgans=prompt('Enter optional from ' + fromsecs(0.0) + ' to now caption (and if used, delimited by ~~~~) to ' + fromsecs(xsecscnt) + ' and a caption for from this point until your next pause ... where ~~ represents a line feed. Idea can be to enter all captions (delimited by ~~~~) now and do several pause(s) to time them.' + fauxmore, nextfauxdef());
if (hgans == null) {
hgans='';
}
if (hgans.trim() != '') {
fauxdef=hgans;
} else {
fauxdefcnt++;
}
if (hgans.indexOf('~~~~') != -1) {
if (fauxpas_w) {
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value)) {
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value != '') {
fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value=fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value;
fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value='0.001,' + fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value;
}
}
}
fauxdef=vslfd(hgans.split('~~~~')[0]);
//alert(fauxdef);
fauxdef=vslfd(hgans.split('~~~~')[1]);
//alert(fauxdef);
fauxdefcnt+=2;
if (fauxpas_w) {
//alert(987);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
}
}
}
hgrip='WEBVTT FILE' + String.fromCharCode(10) + String.fromCharCode(10) + '1' + String.fromCharCode(10) + fromsecs(0.0) + ' --> ' + fromsecs(xsecscnt) + String.fromCharCode(10) + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + String.fromCharCode(10) + String.fromCharCode(10) + '2' + String.fromCharCode(10) + fromsecs(xsecscnt) + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[1].replace(/\~\~/g, String.fromCharCode(10));
//alert('10:' + hgrip);
if (eval('' + hgans.split('~~~~').length) > 2) {
hgcnt=3;
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[2].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>start</strong> where you next pause.';
for (var jjarrhg=2; jjarrhg<hgans.split('~~~~').length; jjarrhg++) {
fauxdefcnt++;
hgrip+='' + String.fromCharCode(10) + String.fromCharCode(10) + hgcnt + String.fromCharCode(10) + 'youllneverfindthis' + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[jjarrhg].replace(/\~\~/g, String.fromCharCode(10));
hgcnt++;
}
} else {
hgcnt=3;
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[1].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
}
} else if (hgans != '') {
//fauxdef=vslfd(hgans);
fauxdef=vslfd(hgans);
fauxdefcnt++;
if (fauxpas_w) {
//alert(1987);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(1887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(1787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
}
}
}
hgrip='WEBVTT FILE' + String.fromCharCode(10) + String.fromCharCode(10) + '1' + String.fromCharCode(10) + fromsecs(xsecscnt) + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10));
//alert('11:' + hgrip);
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
hgcnt=2;
}
} else {
if (eval('' + hgrip.split('youllneverfindthis').length) > 2) {
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(xsecscnt));
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(xsecscnt));
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgrip.split('youllneverfindthis' + String.fromCharCode(10))[1].split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
} else {
hgans=prompt('Enter caption for period from ' + fromsecs(xsecscnt) + ' until your next pause ... where ~~ represents a line feed. As required more than the one caption (delimited by ~~~~) can be entered here then do several pause(s) to time them. Entering nothing and clicking OK finishes up.' + fauxmore, nextfauxdef());
if (hgans == null) {
hgans='';
fauxdefcnt++;
} else if (hgans == '') {
fauxdefcnt++;
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(xsecscnt));
if (eval('' + hgrip.split('youllneverfindthis').length) == 1) { // Entering nothing and clicking OK finishes up.
endgame();
}
}
if (hgans != '') {
//fauxdef=vslfd(hgans);
fauxdef=vslfd(hgans);
fauxdefcnt++;
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(xsecscnt));
//alert('12:' + hgrip);
hgrip+='' + String.fromCharCode(10) + String.fromCharCode(10) + hgcnt + String.fromCharCode(10) + fromsecs(xsecscnt) + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10));
//alert('13:' + hgrip);
hgcnt++;
if (eval('' + hgans.split('~~~~').length) >= 2) {
for (var jjjarrhg=1; jjjarrhg<hgans.split('~~~~').length; jjjarrhg++) {
fauxdefcnt++;
hgrip+='' + String.fromCharCode(10) + String.fromCharCode(10) + hgcnt + String.fromCharCode(10) + 'youllneverfindthis' + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[jjjarrhg].replace(/\~\~/g, String.fromCharCode(10));
hgcnt++;
}
} else {
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
}
}
}
}
}
} else if (event.data == YT.PlayerState.ENDED) {
if (hgans.trim() != '' && hgrip != '') {
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(eval(event.target.getCurrentTime())));
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('666:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
hgans='';
if (window.opener) {

if (window.opener.window.opener) {
if (window.opener.document.URL.indexOf('/karaoke_') != -1 && ('' + window.opener.document.URL + '~').indexOf('srt=~') != -1) {
if (window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=window.opener.window.opener; //alert('yes FoUnD');
} else if (window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=window.opener.window.opener; //alert('yes FounD');
}
}
}

if (window.opener.document.URL.indexOf('/karaoke_') != -1) {
location.hash='#srt=' + encodeURIComponent(hgrip);
if (window.opener.document.URL.indexOf('youtubeid=') == -1) {
console.warn('987a');
window.opener.location.href=window.opener.document.URL.split('#')[0].replace('srt=','').replace('?','?youtubeid=' + vid + '&') + '#srt=' + encodeURIComponent(hgrip);
hgrip='';
} else {
console.warn('987b');
window.opener.location.href=window.opener.document.URL.split('#')[0].replace('srt=','').replace('?','?rand=' + Math.floor(Math.random() * 3456) + '&') + '#srt=' + encodeURIComponent(hgrip);
hgrip='';
}
}
}
if (window.parent) {
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
if (parent.window.opener) {
if (parent.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=parent.window.opener; //alert('founD');
} else if (parent.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener; //alert('yes FounD');
}
}
}

if (parent.document.URL.indexOf('/karaoke_') != -1) {
location.hash='#srt=' + encodeURIComponent(hgrip);
console.warn('987d');
parent.location.href=parent.document.URL.split('#')[0].replace('srt=','').replace('?','?rand=' + Math.floor(Math.random() * 3456) + '&') + '#srt=' + encodeURIComponent(hgrip);
hgrip='';
} else if (parent.document.URL.indexOf('/stop_start') != -1) {
console.warn('987e');
parent.location.href=parent.document.URL.split('?')[0].split('#')[0].replace('srt=','').replace('.html','.html?vid=' + vid + ('&playtime=' + stduration).replace('&playtime=undefined','&playtime=' + duration)) + '#srt=' + encodeURIComponent(hgrip) + relh;
hgrip='';
}
} else {
location.hash='#srt=' + encodeURIComponent(hgrip);
hgrip='';
}
}
isnotplaying=true;
//alert('prehere');
//alert('ivid=' + ivid + ' vid=' + vid);
if (atnextend) {
if (parent.window.opener.document.getElementById('awowowo')) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
ivid=0; //parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ parent.location.href=parentdocumentURL; };
lastshuffle=0;
oktoivid=false;
okt=false;
for (var opi=1; opi<vidarrv.length; opi++) {
if (parent.document.getElementById('xx' + opi)) {
parent.document.getElementById('xx' + opi).style.background='pink';
}
}
setTimeout(function(){ oktoivid=true; }, 7900);
} else {
parent.window.opener.document.getElementById('awowowo').click();
console.warn('987g');
parent.location.href=parent.document.URL.split('?')[0].split('#')[0];
}
}
}
oktoivid=okt;
if (ismobileplaylistplay) {
//alert('here');
firstdelay=-1;
if (parent.document.getElementById('shufflechk')) {
if (parent.document.getElementById('shufflechk').checked) {
if (nextvidi >= 0) { nextvidi=-3; }
if (oktoivid) {
firstshuffle=true;
//for (var iuy=0; iuy<20; iuy++) {
ivid=eval(Math.floor(Math.random() * 198675643) % Math.max(1,eval('' + vidarrv.length)));
console.log('lastshuffle=' + lastshuffle + ' and pre0:' + ivid);
//}
sgoes=0;
while (!parent.document.getElementById('c' + ivid).checked || ivid == lastshuffle) {
console.log('was no good ' + ivid);
ivid=eval(Math.floor(Math.random() * 198675643) % Math.max(1,eval('' + vidarrv.length)));
sgoes++;
if (sgoes > 100) { lastshuffle=-1; }
}
lastshuffle=ivid;
}
}
}
if (ivid < eval('' + vidarrv.length)) {
console.log('0:' + ivid);
if (oktoivid) {
while (!parent.document.getElementById('c' + ivid).checked) {
//if (parent.document.URL.indexOf('&unknowndur=') != -1) {
// alert('huh3=');
//}
ivid++;
if (ivid >= eval('' + vidarrv.length)) {
if (!parent.document.getElementById('loopchk')) {
ivid=-1;
} else if (parent.document.getElementById('loopchk').checked) {
ivid=0;
if (parent.window.opener.document.getElementById('awowowo') && !navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
parent.window.opener.document.getElementById('awowowo').click();
}
} else {
ivid=-1;
}
}
}
}
console.log('00:' + ivid);
if (ivid >= 0) {
console.log('000:' + ivid + ' ' + vidarrv[ivid]);
if (1 == 1) {
ivid=ivid;
} else {
event.target.cueVideoById(vidarrv[ivid], eval('' + vidstarts[ivid]), eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid])), "medium");
}
if (firstdelay < 0) {
firststdone=false;
firstdelay=eval(eval('' + viddurs[eval(eval(1 + ivid) % viddurs.length)]) - eval('' + vidstarts[eval(eval(1 + ivid) % vidstarts.length)]));
}
if (1 == 1) {
if (parent.document.URL.indexOf('&unknowndur=') != -1) {
//alert('ivId=' + ivid);
if (ivid == 0 && okt) { ivid++; } else if (ivid == 0 && !okt) { atnextend=false; }
if (nextvidi >= 0) { ivid=nextvidi; console.log('ivid now =' + ivid); nextvidi=-4; console.log(vidarrv); console.log(vidstarts); console.log(viddurs); }
}
vid=vidarrv[ivid];
secscnt='' + eval('' + vidstarts[ivid]);
enforcedtimeis=eval('' + vidstarts[ivid]);
if (('' + vid).indexOf(',') != -1) { vidarr=vid.split(','); }
playtime=eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]));
oktoivid=false;
setTimeout(function(){ oktoivid=true; }, 5000);
//alert('Why5 ' + ivid);
vid=vidarrv[ivid]; // new
event.target.loadVideoById(vidarrv[ivid], eval('' + vidstarts[ivid]), eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid])));
lastnext=ivid;
//if (atnextend) {
// alert('8:' + vid + ' ivid=' + ivid + ' ' + event.target.getDuration());
//}
parent.document.getElementById('youtubeid').value=vid;
parent.document.getElementById('youtube_duration').value='' + viddurs[ivid];
setTimeout(function(){ parent.document.getElementById('myh1').innerHTML=halfway(ivid,vid,viddurs[ivid],event.target.getVideoData().title); ttt.title=event.target.getVideoData().title; }, 2000);
} else {
event.target.playVideo();
}
}
if (parent.document.URL.indexOf('&unknowndur=') != -1) {
//alert('huh4=' + ivid + ' ' + vidarrv.length);
if (eval('' + vidarrv.length) <= 1) { dovidarrv(); }

//ttt.title=('huh44=' + ivid + ' ' + vidarrv.length);
}
ivid++;
if (ivid >= eval('' + vidarrv.length)) {
ivid=0;
//ttt.title=('why');
}
if (ivid < eval('' + vidarrv.length)) {
console.log(eval(1000 * eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]))));
if ('sadnews' == 'sadnews') {
if (firstdelay < 0) {
firststdone=false;
firstdelay=eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]));
}
} else {
setTimeout(preparentlook, eval(1000 * eval(eval('' + viddurs[ivid]) - eval('' + vidstarts[ivid]))));
}
}
}


}

consolelog('ended event.data=' + event.data + ' was=' + top.document.getElementById('listeleven').innerHTML);
if (eval('' + endcnt) < 5) {
//alert('ended event.data=' + event.data);
endcnt=3;
var sufx='';
var capitalloop=top.document.getElementById('listeleven').getAttribute('data-title');
if ((capitalloop + 'a').substring(0,1) == 'X') {
sufx='^' + top.document.getElementById('listeleven').innerHTML.split('^')[0].replace('  ','').replace(' ','').trim();
}
if (top.document.getElementById('listeleven').innerHTML.indexOf('^') != -1) {
window.top.focus();
sufx='';
//alert('pre 1');
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '^','') + sufx; //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
//alert('1:' + top.document.getElementById('listeleven').innerHTML);
//ttt.title+=' ' + top.document.getElementById('listeleven').innerHTML.toUpperCase() + ' ';
//if (sufx != '') { alert(top.document.getElementById('listeleven').innerHTML); }
//ttt.title+=' 4';
} else {
window.top.focus();
//alert('pre 2');
var capitalloopx=top.document.getElementById('listeleven').getAttribute('data-title');
sufx=top.document.getElementById('listeleven').title; //sufx.replace('^','');
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '','') + sufx; //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
//alert('2:' + top.document.getElementById('listeleven').innerHTML);
//ttt.title+=' ' + top.document.getElementById('listeleven').innerHTML.toLowerCase() + ' ';
if ((capitalloopx + 'a').substring(0,1) == 'X') {
if (top.document.emojirestart) {
top.document.emojirestart();
} else {
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
if (itop != -1) { topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1234567); }
}
//ttt.title+=' 1';
top.document.getElementById('myh1').style.marginLeft='1px';
//ttt.title+='2';
window.top.scrollTo(0,0);
//ttt.title+='3';
}
}
}
consolelog('Ended event.data=' + event.data + ' is=' + top.document.getElementById('listeleven').innerHTML);
}
//} else {
//alert('event.data=' + event.data);
}
}
}
}
}
}
if (event.data == YT.PlayerState.PLAYING) {
isnotplaying=false;
if (wpwp) { if (8 == 8 || wpwp.document.getElementById('curct').innerHTML == '') {
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
wpwp.document.getElementById('curct').title=wpwp.document.getElementById('curct').innerHTML;
//alert('169:' + ' ' + eval(event.target.getCurrentTime()).toFixed(3) + ' to ' + wpwp.document.getElementById('curct').innerHTML);
} }
if (wpp) {
if (wpp.document.getElementById('diaudiov')) {
if (wpp.document.getElementById('diaudiov').outerHTML.indexOf(' class="') != -1) {
wpp.document.getElementById('diaudio').innerHTML=wpp.document.getElementById('diaudiov').outerHTML.replace(' class="loop autostart"', '').replace('hidden;','visible;display:inline-block;');
wpp.document.getElementById('diaudio').style.display='inline-block';
}
}
}
if (enforcedtimeis < 0.0) { enforcedtimeis=0.0; }
if (ismobileplaylistplay) {
if (firstdelay < 0) {
firstdelay=eval(eval(parent.document.URL.split('&j0=')[1].split('&')[0].split('#')[0]) - eval(parent.document.URL.split('&i0=')[1].split(';')[0].split('&')[0].split('#')[0]));
}
if (!firststdone) { firststdone=true; setTimeout(preparentlook, eval(1000 * firstdelay)); }
}
}
if (event.data == YT.PlayerState.PLAYING) { one=1; isnotplaying=false; }
if (event.data == YT.PlayerState.ENDED) {
if (hgans.trim() != '' && hgrip != '') {
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(eval(event.target.getCurrentTime())));
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('64:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
hgans='';
if (window.opener) {
if (window.opener.document.URL.indexOf('/karaoke_') != -1) {

if (window.opener.window.opener) {
if (window.opener.document.URL.indexOf('/karaoke_') != -1 && ('' + window.opener.document.URL + '~').indexOf('srt=~') != -1) {
if (window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=window.opener.window.opener; //alert('yes founD');
} else if (window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=window.opener.window.opener; //alert('yes FounD');
}
}
}

location.hash='#srt=' + encodeURIComponent(hgrip);
if (window.opener.document.URL.indexOf('youtubeid=') == -1) {
console.warn('987h');
window.opener.location.href=window.opener.document.URL.split('#')[0].replace('srt=','').replace('?','?youtubeid=' + vid + '&') + '#srt=' + encodeURIComponent(hgrip);
hgrip='';
} else {
console.warn('987j');
window.opener.location.href=window.opener.document.URL.split('#')[0].replace('srt=','').replace('?','?rand=' + Math.floor(Math.random() * 3456) + '&') + '#srt=' + encodeURIComponent(hgrip);
hgrip='';
}
}
}
if (window.parent) {
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
if (parent.window.opener) {
if (parent.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=parent.window.opener; //alert('foUnd');
} else if (parent.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener; //alert('yes FounD');
}
}
}

if (parent.document.URL.indexOf('/karaoke_') != -1) {
location.hash='#srt=' + encodeURIComponent(hgrip);
console.warn('987k');
parent.location.href=parent.document.URL.split('#')[0].replace('srt=','').replace('?','?rand=' + Math.floor(Math.random() * 3456) + '&') + '#srt=' + encodeURIComponent(hgrip);
hgrip='';
} else if (parent.document.URL.indexOf('/stop_start') != -1) {
console.warn('987m');
parent.location.href=parent.document.URL.split('?')[0].split('#')[0].replace('srt=','').replace('.html','.html?vid=' + vid + ('&playtime=' + stduration).replace('&playtime=undefined','&playtime=' + duration)) + '#srt=' + encodeURIComponent(hgrip) + relh;
hgrip='';
}
} else {
location.hash='#srt=' + encodeURIComponent(hgrip);
hgrip='';
}
}
}
if (event.data == YT.PlayerState.PAUSED) {
if (wpwp) { if (88 == 88 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('61:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').title='';
} }
onepause=1;
isnotplaying=true;
//alert(document.URL);
var zhgx='';
if (window.parent) {
//alert('2:' + parent.document.URL);
if ((parent.document.URL + '~').indexOf('srt=~') != -1 || (parent.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
zhgx='srt=';
//alert('22:' + parent.document.URL);
}
}
if (window.top && zhgx == '') {
//alert('2:' + parent.document.URL);
if ((top.document.URL + '~').indexOf('srt=~') != -1 || (top.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
zhgx='srt=';
//alert('22:' + parent.document.URL);
}
}
if (document.URL.slice(-4) == 'srt=' || zhgx == 'srt=' || ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/srt\=$/g, '') != ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'') && ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^#/g,'') != '') {
//alert('2:' + document.URL);
if (document.getElementById('subripcommentary')) {
if (document.getElementById('subripcommentary').innerHTML == '') {
document.getElementById('subripcommentary').innerHTML='Awaiting pause for SubRip subtitles <div id=divcbi style=display:inline-block;><iframe class="spag" scrolling="no" data-accept="text/*" id="cbi" frameborder="0" style="display:inline-block;width:173px;height:218px;margin-top:-200px;" src="/HTMLCSS/client_browsing.htm?typeJUNKhastobe=text&straightJUNKtext=y&wordJUNKing=Allimages%20images%2E%20"></iframe></div><br><textarea onblur="hgrip=massage(this.value,hgrip);" id=mysubrip></textarea>';
if (sdivcbi == '') { sdivcbi=document.getElementById('divcbi').innerHTML; }
setInterval(subripize, 1000);
}
}
hgans='';
// hgrip='', lasthgriprec='';
var zsecscnt=fauxit(eval(event.target.getCurrentTime()).toFixed(3));
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
alert('61:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
if (hgrip == '') {
if (window.opener) {

if (window.opener.window.opener) {
if (window.opener.document.URL.indexOf('/karaoke_') != -1 && ('' + window.opener.document.URL + '~').indexOf('srt=~') != -1) {
if (window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=window.opener.window.opener; //alert('yes FouND'); // here it is
} else if (window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=window.opener.window.opener; //alert('yes FounD');
}
}
}

if (window.opener.document.getElementById('stduration')) {
window.opener.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
}
}
if (window.top) {
//alert('top');
if (top.document.getElementById('stduration')) {
top.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
} else if (window.parent) {
//alert('paReNt');
if (parent.document.getElementById('stduration')) {
parent.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
}
//alert('981 ' + top.document.URL);
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}
}
} else if (window.parent) {
//alert('paRent');
if (window.parent) {
//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}
}

if (parent.document.getElementById('stduration')) {
parent.document.getElementById('stduration').innerHTML='' + fromsecs(stduration) + '#' + vid;
}
}
//alert('3:' + document.URL);
//hgans=prompt('Enter optional from ' + fromsecs(0.0) + ' to now caption (and if used, delimited by ~~~~) to ' + fromsecs(zsecscnt) + ' and a caption for from this point until your next pause ... where ~~ represents a line feed.', '');
document.getElementById('subtitlegoeshere').title='Captions and subtitles';
hgans=prompt('Enter optional from ' + fromsecs(0.0) + ' to now caption (and if used, delimited by ~~~~) to ' + fromsecs(zsecscnt) + ' and a caption for from this point until your next pause ... where ~~ represents a line feed. Idea can be to enter all captions (delimited by ~~~~) now and do several pause(s) to time them.' + fauxmore, nextfauxdef());
if (hgans == null) { hgans=''; }
var arrhg=hgans.split('~~~~');
if (hgans.indexOf('~~~~') != -1) {
//fauxdef=vslfd(hgans.split('~~~~')[0]);
//fauxdef=vslfd(hgans.split('~~~~')[1]);
fauxdef=vslfd(hgans.split('~~~~')[0]);
fauxdef=vslfd(hgans.split('~~~~')[1]);
if (fauxpas_w) {
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value)) {
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value != '') {
fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value=fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value;
fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value='0.001,' + fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value;
}
}
}
fauxdefcnt+=2;
if (fauxpas_w) {
//alert(987);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
}
}
}
hgrip='WEBVTT FILE' + String.fromCharCode(10) + String.fromCharCode(10) + '1' + String.fromCharCode(10) + fromsecs(0.0) + ' --> ' + fromsecs(zsecscnt) + String.fromCharCode(10) + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + String.fromCharCode(10) + String.fromCharCode(10) + '2' + String.fromCharCode(10) + fromsecs(zsecscnt) + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[1].replace(/\~\~/g, String.fromCharCode(10));
//alert('20:' + hgrip);
if (eval('' + arrhg.length) > 2) {
hgcnt=3;
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[2].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>start</strong> where you next pause.';
for (var jarrhg=2; jarrhg<arrhg.length; jarrhg++) {
hgrip+='' + String.fromCharCode(10) + String.fromCharCode(10) + hgcnt + String.fromCharCode(10) + 'youllneverfindthis' + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[jarrhg].replace(/\~\~/g, String.fromCharCode(10));
hgcnt++;
}
} else {
hgcnt=3;
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[1].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
}
} else if (hgans != '') {
fauxdefcnt++;
//fauxdef=vslfd(hgans);
fauxdef=vslfd(hgans);
if (fauxpas_w) {
//alert(987);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
}
}
}
hgrip='WEBVTT FILE' + String.fromCharCode(10) + String.fromCharCode(10) + '1' + String.fromCharCode(10) + fromsecs(zsecscnt) + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10));
// alert('21:' + hgrip);
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
hgcnt=2;
} else {
fauxdefcnt++;
}
} else {
//alert('4:' + document.URL);
if (eval('' + hgrip.split('youllneverfindthis').length) > 2) {
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(zsecscnt));
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(zsecscnt));
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgrip.split('youllneverfindthis' + String.fromCharCode(10))[1].split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
} else {
hgans=prompt('Enter caption for period from ' + fromsecs(zsecscnt) + ' until your next pause ... where ~~ represents a line feed. As required more than the one caption (delimited by ~~~~) can be entered here then do several pause(s) to time them. Entering nothing and clicking OK finishes up.' + fauxmore, nextfauxdef());
if (hgans == null) {
hgans='';
} else if (hgans == '') {
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(zsecscnt));
if (eval('' + hgrip.split('youllneverfindthis').length) == 1) { // Entering nothing and clicking OK finishes up.
endgame();
}
}
if (hgans != '') {
fauxdef=vslfd(hgans);
hgrip=hgrip.replace('youllneverfindthis', '' + fromsecs(zsecscnt));
//alert('22:' + hgrip);
hgrip+='' + String.fromCharCode(10) + String.fromCharCode(10) + hgcnt + String.fromCharCode(10) + fromsecs(zsecscnt) + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10));
//alert('23:' + hgrip);
hgcnt++;
if (eval('' + hgans.split('~~~~').length) >= 2) {
for (var jjjjarrhg=1; jjjjarrhg<hgans.split('~~~~').length; jjjjarrhg++) {
hgrip+='' + String.fromCharCode(10) + String.fromCharCode(10) + hgcnt + String.fromCharCode(10) + 'youllneverfindthis' + ' --> youllneverfindthis' + String.fromCharCode(10) + hgans.split('~~~~')[jjjjarrhg].replace(/\~\~/g, String.fromCharCode(10));
hgcnt++;
}
} else {
document.getElementById('subtitlegoeshere').title='Captions and subtitles ... "<strong>' + hgans.split('~~~~')[0].replace(/\~\~/g, String.fromCharCode(10)) + '</strong>" should <strong>end</strong> where you next pause or get video to finish.';
}
}
}
}
}
}
analyzemaybe(one, onepause, done);
if (event.data == YT.PlayerState.PLAYING && !done) {
if (wpwp) { if (88 == 88 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('269:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
if (wpp) {
if (wpp.document.getElementById('diaudiov')) {
if (wpp.document.getElementById('diaudiov').outerHTML.indexOf(' class="') != -1) {
wpp.document.getElementById('diaudio').innerHTML=wpp.document.getElementById('diaudiov').outerHTML.replace(' class="loop autostart"', '').replace('hidden;','visible;display:inline-block;');
wpp.document.getElementById('diaudio').style.display='inline-block';
}
}
}
isnotplaying=false;
try {
duration=event.target.getDuration();
if (ivid == 0 && eval('' + viddurs.length) > 0) { viddurs[0]='' + duration; }
if (ivid != 0 && eval('' + viddurs.length) > eval('' + ivid)) {
if (('' + viddurs[ivid]).indexOf('22234') == 0) {
viddurs[ivid]='' + duration;
parent.document.getElementById('youtube_duration').value='' + duration;
parent.document.getElementById('j' + ivid).value='' + duration;
}
}
if (lastuvis.indexOf(ivid) != -1) { viddurs[ivid]='' + duration; }
} catch(hfgdg) {
duration=player.getDuration();
if (ivid == 0 && eval('' + viddurs.length) > 0) { viddurs[0]='' + duration; }
if (ivid != 0 && eval('' + viddurs.length) > eval('' + ivid)) {
if (('' + viddurs[ivid]).indexOf('22234') == 0) {
viddurs[ivid]='' + duration;
parent.document.getElementById('youtube_duration').value='' + duration;
parent.document.getElementById('j' + ivid).value='' + duration;
}
}
if (lastuvis.indexOf(ivid) != -1) { viddurs[ivid]='' + duration; }
}
if (typeof top.setdurl == 'function') {
setTimeout(function(){
top.setdurl(parent.document.getElementById('youtubeid').value, parent.document.getElementById('myh1').innerHTML, '' + duration);
}, 2000);
}
stduration=eval('' + duration);
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('4987:' + duration);
//}
if (parent.document.getElementById('youtube_duration') && ('' + duration) != 'undefined') {
if (parent.document.getElementById('youtube_duration').value.indexOf('22221') == 0) {
parent.document.getElementById('youtube_duration').value='' + duration;
if (parent.document.getElementById('j0')) {
if (parent.document.getElementById('j0').value == '22221') {
parent.document.getElementById('j0').value='' + duration;
if (window.parent) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
setTimeout(function(){
parent.window.opener.setvurl(parent.document.getElementById('youtubeid').value, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}, 2000);
}
} else if (typeof top.setdurl == 'function') {
setTimeout(function(){
top.setdurl(parent.document.getElementById('youtubeid').value, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}, 2000);
}
}

}

}
}
}
if (('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/\#/g,'') != '' && ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/\#/g,'').indexOf('captionis=') == -1) {
if (('' + parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).getAttribute('data-mute')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
event.target.mute();
}
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,''))) {
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).style.fontSize='7px';
enforcedtimeis=secscnt;
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder='' + secscnt + '/' + duration + ' ... ' + 'P=pause/play S=stop M=mute U=unmute Y=YouTube G=Google W=Wikipedia L=loop ';
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).style.textShadow='-0.5px 0.5px 0.5px red';
if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).outerHTML.indexOf('<textarea ') != -1) {
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).outerHTML.split('<textarea ')[1].split('</')[0].indexOf('display:none') != -1) {
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).outerHTML.split('<textarea ')[1].split('</')[0].indexOf(' id="') != -1) {
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).style.display='inline-block';
}
//} else if (parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).outerHTML.split('<textarea ')[1].split('</')[0].indexOf('inline-block') == -1) {
// alert(parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).outerHTML);
}
}
}
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).setAttribute('data-duration', '' + duration);
if (lastokn > 0) {
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).value='' + lastokn;
}
if (!inplaying) { inplaying=true; setTimeout(playingvideo, 1000); } // used to be 1000
if (('' + parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).getAttribute('data-loop')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
startagain=true;
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).setAttribute('data-loop', '');
}
psuf='';
if (startagain) {
psuf=' ' + String.fromCodePoint(10004);
}
}
}
endcnt=0;
setTimeout(yeswell, eval(eval(10 + eval('' + duration)) * 1000));
console.log('0:' + (new Date()) + ' duration=' + duration);
if (document.URL.indexOf('start=') != -1 && document.URL.indexOf('playtime=') != -1) parent.document.getElementById('myh1').innerHTML=halfway(ivid,vid,duration,event.target.getVideoData().title);
if (document.URL.indexOf('start=0') != -1 && document.URL.indexOf('playtime=0') != -1) {
//alert(duration);
oursecscnt=-1;
setTimeout(stopVideo, 10);
console.log('00:' + (new Date()) + ' duration=' + duration);
if (parent.document.getElementById('youtube_duration').value.indexOf("22222.") != 0) {
parent.document.getElementById('youtube_duration').value='' + duration;
}
if (window.top) {
if (top.document.getElementById('list_eleven')) {
top.document.getElementById('list_eleven').title='' + duration;
//try {
//top.document.getElementById('list_eleven').title+='|' + event.target.getVideoData().title;
//} catch(errt) {
//top.document.getElementById('list_eleven').title='' + duration;
//}
}
}
//parent.document.getElementById('myh1').innerHTML=event.target.getVideoData().title;
if (kpi == -9) {
//alert(99);
if (document.URL.indexOf('start=') != -1 && document.URL.indexOf('playtime=') != -1) {
//alert(990);
if (document.URL.indexOf('start=0') == -1 || document.URL.indexOf('playtime=0') == -1) {
//alert(9900);
kpi=-8;
kpi=event.target.getCurrentTime();
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
alert('67:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
if (('' + kpi) == 'undefined') {
alert('iViD=' + ivid + ' vid=' + vid + ' url=' + document.URL);
}
keepParentInformed();
}
}
}
//stopVideo();
return;
} else {
if (playtime < 0) { playtime=duration * 1000; }
enforcedtimeis=eval(playtime / 1000);
isnotplaying=false;
document.title='Playing YouTube ' + vid + of + ' for ' + playtime / 1000 + ' seconds ... is ' + duration + ' seconds altogether.';
if (yes_esp) {
if (parent.parent.document.getElementById('progress_' + vid)) {
parent.parent.document.getElementById('progress_' + vid).style.visibility='visible';
parent.parent.document.getElementById('progress_' + vid).max='' + duration;
parent.parent.document.getElementById('progress_' + vid).value='0';
parent.parent.document.getElementById('progress_' + vid).title='At 0 of ' + duration + ' seconds of ' + parent.parent.document.getElementById('myh1').innerText;
} else {
//parent.parent.document.getElementsByTagName('h4')[0].style.visibility='visible';
parent.parent.document.getElementsByTagName('h4')[0].title=document.title;
//parent.parent.document.getElementsByTagName('h4')[0].innerHTML=document.title;
}
}
enforcedtimeis=eval(playtime / 1000);
isnotplaying=false;
document.getElementById('ptitle').innerHTML='Playing YouTube ' + vid + of + ' for ' + playtime / 1000 + ' seconds ... is ' + duration + ' seconds altogether.' + etc_volume();
document.getElementById('ivol').value=event.target.getVolume();
document.getElementById('ipbr').value=event.target.getPlaybackRate();
document.getElementById('iqty').value=event.target.getPlaybackQuality();
setTimeout(stopVideo, playtime + delay);
done = true;
eventtarget=event.target;
if (eval(oursecscnt) > 0) {
enforcedtimeis=eval('' + oursecscnt);
isnotplaying=false;
document.getElementById('ptitle').innerHTML='Playing YouTube ' + vid + ' starting at ' + oursecscnt + ' seconds ' + of + ' for ' + playtime / 1000 + ' seconds ... is ' + duration + ' seconds altogether.' + etc_volume();
document.title='Playing YouTube ' + vid + ' starting at ' + oursecscnt + ' seconds ' + of + ' for ' + playtime / 1000 + ' seconds ... is ' + duration + ' seconds altogether.';
if (yes_esp) {
if (parent.parent.document.getElementById('progress_' + vid)) {
parent.parent.document.getElementById('progress_' + vid).style.visibility='visible';
parent.parent.document.getElementById('progress_' + vid).max='' + duration;
parent.parent.document.getElementById('progress_' + vid).value='' + oursecscnt;
parent.parent.document.getElementById('progress_' + vid).title='At ' + oursecscnt + ' of ' + duration + ' seconds of ' + parent.parent.getlastreltitle(); //parent.getElementById('myh1').innerHTML;
if (parent.parent.document.getElementById('progress' + vid)) {
parent.parent.document.getElementById('progress' + vid).title=parent.parent.document.getElementById('progress_' + vid).title;
}
} else {
//parent.parent.document.getElementsByTagName('h4')[0].style.visibility='visible';
parent.parent.document.getElementsByTagName('h4')[0].title=document.title;
//parent.parent.document.getElementsByTagName('h4')[0].innerHTML=document.title;
}
}
if (kpi == -9) {
//alert(909);
if (document.URL.indexOf('start=') != -1 && document.URL.indexOf('playtime=') != -1) {
//alert(90900);
if (document.URL.indexOf('start=0') == -1 || document.URL.indexOf('playtime=0') == -1) {
//alert(909000);
kpi=-8;
kpi=event.target.getCurrentTime();
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('68:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
if (('' + kpi) == 'undefined') {
alert('iVID=' + ivid + ' vid=' + vid + ' url=' + document.URL);
}
//alert(kpi);
keepParentInformed();
}
}
}
//alert("+" + oursecscnt + ' ... ' + playtime);
event.target.cueVideoById(vid, eval('' + oursecscnt), eval('' + oursecscnt) + eval(eval('' + playtime) / 1000.0), "medium");
oursecscnt=-1;
}
}
}
}

function mpp(wht, vd) {
if (yes_esp) {
if (parent.parent.document.getElementById('progress_' + vd)) {
if (('' + wht).indexOf('-') == 0) {
parent.parent.document.getElementById('progress_' + vd).style.visibility='hidden';
if (parent.parent.document.getElementById('progress_' + vd).title.indexOf('At ') == 0) {
parent.parent.document.getElementById('progress_' + vd).title=parent.parent.document.getElementById('progress_' + vd).title.replace('At ' + parent.parent.document.getElementById('progress_' + vd).title.substring(3).split(' ')[0] + ' ','At end ');
}
if (parent.parent.document.getElementById('progress' + vid)) {
parent.parent.document.getElementById('progress' + vid).title=parent.parent.document.getElementById('progress_' + vid).title;
}
} else if (('' + wht).indexOf(' ') == -1) {
parent.parent.document.getElementById('progress_' + vd).value='' + wht;
if (parent.parent.document.getElementById('progress_' + vd).title == '') {
//alert(56);
//alert('' + parent.parent.document.getElementById('progress_' + vd).max);
parent.parent.document.getElementById('progress_' + vd).title='At 0 of ' + parent.parent.document.getElementById('progress_' + vd).max + ' seconds of ' + parent.parent.getlastreltitle(); //parent.getElementById('myh1').innerHTML;
//alert(356);
}
if (parent.parent.document.getElementById('progress_' + vd).title.indexOf('At ') == 0) {
parent.parent.document.getElementById('progress_' + vd).title=parent.parent.document.getElementById('progress_' + vd).title.replace('At ' + parent.parent.document.getElementById('progress_' + vd).title.substring(3).split(' ')[0] + ' ','At ' + wht + ' ');
}
if (parent.parent.document.getElementById('progress' + vid)) {
parent.parent.document.getElementById('progress' + vid).title=parent.parent.document.getElementById('progress_' + vid).title;
}
}
} else {
//parent.parent.document.getElementsByTagName('h4')[0].style.visibility='visible';
parent.parent.document.getElementsByTagName('h4')[0].title='' + wht;
//parent.parent.document.getElementsByTagName('h4')[0].innerHTML=wht;
}
}
return wht;
}

function keepParentInformed() {
if (aminytnon) {
setTimeout(keepParentInformed, 600);
return '';
}
var xkpi='';
if (ismobileplaylistplay) { return ''; }
if (vid.toLowerCase() == 'cannotenda2' && (('' + kpi).indexOf('-999') != -1 || eval('' + duration) > -9999)) {
curvaridx=variants.indexOf(vid);
duration=-9999;
kpi="0";
aminytnon=false;
//alert('herE');
playingvideo();
setTimeout(keepParentInformed, 1600);
return '';
}
console.log('vid=' + vid + ' and ivid=' + ivid + ' and kpi=' + kpi + ' ' + ('' + new Date()));
if (('' + kpi) == 'undefined') {
kpi=0;
console.log('vid=' + vid + ' and ivid=' + ivid + ' And kpi=' + kpi + ' ' + ('' + new Date()));
}
if (eval(kpi) < 0) {
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('691:' + '' + mpp(kpi, vid));
wpwp.document.getElementById('curct').innerHTML='' + mpp(kpi, vid);
} }
parent.document.getElementById('conduit').value=mpp(kpi, vid);
} else {
try {
xkpi=event.target.getCurrentTime();
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('69:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} }
} catch(ryy) {
//if (eval('' + vid.length) != 11) {
//alert('vid=' + vid);
//}
try {
xkpi=player.getCurrentTime();
} catch(jthrfhg) {
}
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('69:' + '' + eval(player.getCurrentTime()).toFixed(3));
wpwp.document.getElementById('curct').innerHTML='' + eval(player.getCurrentTime()).toFixed(3);
} }
}
//ttt.title=xkpi;
if (('' + xkpi).indexOf('undefined') == -1) kpi=eval(xkpi);
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
//alert('6912:' + '' + mpp(kpi, vid));
wpwp.document.getElementById('curct').innerHTML='' + mpp(kpi, vid);
}
}
parent.document.getElementById('conduit').value=mpp(kpi, vid);
//parent.document.getElementById('myh1').innerHTML+=' ' + kpi;
}
if (eval(kpi) != -1) {
//alert(kpi);
setTimeout(keepParentInformed, 600);
} //else {
//alert('why is kpi=' + kpi);
//}
}

function sagain() {
startagain=true;
if (('' + parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).getAttribute('data-val')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).setAttribute('data-loop','y');
}
}

function sanitycheck() {
console.warn('sanitycheck ' + ('' + new Date()));
if (numericalssamecount >= 10) {
numericals=parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).value;
if (numericals.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').trim() == '') {
if (eval(numericals) >= 0 && eval(numericals) <= eval('' + duration)) {
console.warn('Sanitycheck ' + ('' + new Date()));
try {
event.target.seekTo(eval(numericals.trim()));
} catch(hgfdg) {
player.seekTo(eval(numericals.trim()));
}
console.warn('SanityCheck ' + ('' + new Date()));
if (wpwp) { if (88 == 88 || wpwp.document.getElementById('curct').innerHTML == '') {
wpwp.document.getElementById('curct').innerHTML='' + eval(numericals.trim());
wpwp.document.getElementById('curct').title='';
} }
enforcedtimeis=eval(numericals.trim());
isnotplaying=false;
if (cursecselapsed >= 0.0) { cursubi=0; }
}
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).value='';
numericals='';
numericalssamecount=0;
//ttt.title='Zero';
} else {
ytsearch(parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).value);
numericals='';
numericalssamecount=0;
//ttt.title='zero';
}
}
}

function ytsearch(intysidea) {
var afternums='', isanum=true, beforenums='', wasph='';
for (var ihj=0; ihj<intysidea.length; ihj++) {
if (isanum) {
if (intysidea.substring(ihj).substring(0,1) < '0' || intysidea.substring(ihj).substring(0,1) > '9') {
isanum=false;
if (intysidea.substring(ihj).substring(0,1) != ' ') {
afternums+=intysidea.substring(ihj).substring(0,1);
}
} else {
beforenums+=intysidea.substring(ihj).substring(0,1);
}
} else {
afternums+=intysidea.substring(ihj).substring(0,1);
}
}
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).value='';
if (afternums.trim() != '') {
if (parent.parent.document.getElementById('yts' + location.hash.replace(/\#/g,'').substring(3).split('_')[0])) {
wasph=parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder;
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder='';
console.warn('kara call');
parent.parent.document.getElementById('yts' + location.hash.replace(/\#/g,'').substring(3).split('_')[0]).src='//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=++++++++++++' + encodeURIComponent(afternums) + '&audioonlys=' + (beforenums.trim() == '' ? '5' : beforenums) + '&paridis=' + ouraidis + '&wasph=' + encodeURIComponent(wasph) + '#tonlyaudios';
parent.parent.document.getElementById('' + location.hash.replace(/\#/g,'').substring(3).split('_')[0]).scrollIntoView();
} else if (top.document.getElementById('ldi' + location.hash.replace(/\#/g,'').substring(3).split('_')[0])) {
wasph=parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder;
console.warn('kaRa call');
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder='';
parent.parent.document.getElementById('ldi' + location.hash.replace(/\#/g,'').substring(3).split('_')[0]).innerHTML+='<iframe style=height:250px; id="yts' + + ouraidis + '" src="' + '//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=++++++++++++' + encodeURIComponent(afternums) + '&audioonlys=' + (beforenums.trim() == '' ? '5' : beforenums) + '&paridis=' + ouraidis + '&wasph=' + encodeURIComponent(wasph) + '#tonlyaudios"></iframe>';
parent.parent.document.getElementById('' + location.hash.replace(/\#/g,'').substring(3).split('_')[0]).scrollIntoView();
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder=wasph;
} else {
wasph=parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder;
console.warn('kaRA call');
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder='';
parent.parent.document.getElementById('' + location.hash.replace(/\#/g,'').substring(3).split('_')[0]).innerHTML+='<iframe style=height:250px; id="yts' + + ouraidis + '" src="' + '//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=++++++++++++' + encodeURIComponent(afternums) + '&audioonlys=' + (beforenums.trim() == '' ? '5' : beforenums) + '&paridis=' + ouraidis + '&wasph=' + encodeURIComponent(wasph) + '#tonlyaudios"></iframe>';
parent.parent.document.getElementById('' + location.hash.replace(/\#/g,'').substring(3).split('_')[0]).scrollIntoView();
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).placeholder=wasph;
}
}
}

function preplayingvideo() {
if (top.document.getElementById('divtitles')) {
//alert('Yes');
if (parent.document.getElementById('i0')) {
//alert('Yes2');
for (var ibv=0; ibv<vidarrv.length; ibv++) {
if (parent.document.getElementById('i' + ibv)) {
if (top.document.getElementById('divtitles').innerHTML.indexOf('|' + vidarrv[ibv] + '#') != -1) {
//alert('suss');
if (parent.document.getElementById('i' + ibv).value.indexOf('|') == -1) {
parent.document.getElementById('i' + ibv).value+='|' + vidarrv[ibv] + '#' + top.document.getElementById('divtitles').innerHTML.split('|' + vidarrv[ibv] + '#')[1].split('</')[0];
} else if (parent.document.getElementById('i' + ibv).value.indexOf('#') == -1) {
//alert('should be here');
parent.document.getElementById('i' + ibv).value+='#' + top.document.getElementById('divtitles').innerHTML.split('|' + vidarrv[ibv] + '#')[1].split('</')[0];
}
}
}
}
parent.dvalit(true);
}
}
}

function pretoolater() {
if (aminytnon) {
aminytnon=false;
}
}

function toolater() {
if (aminytnon) {
player.loadVideoById(('0Gz_7am23rk' == '' ? vidarrv[nextvidi] : '0Gz_7am23rk'), eval('' + vidstarts[nextvidi]), "large");
} //else {
//nextvidi++;
//if (nextvidi >= eval('' + viddurs.length)) { nextvidi=0; }
//player.loadVideoById(('0Gz_7am23rk' == '' ? vidarrv[nextvidi] : '0Gz_7am23rk'), eval('' + vidstarts[nextvidi]), "large");
//}
}


function rezero(inz) {
var isok=false;
if (inz == 0) {
isok=true;
var iipo=0;
while (parent.document.getElementById('xx' + iipo)) {
parent.document.getElementById('xx' + iipo).style.backgroundColor='pink';
iipo++;
}
} else if (eval(1 + eval('' + inz)) >= eval('' + viddurs.length)) {
isok=true;
}
if (window.parent && isok) {
if (parent.document.getElementById('shufflechk')) {
if (!parent.document.getElementById('shufflechk').checked) {
parent.document.getElementById('shufflechk').checked=true;
}
}
}
return inz;
}

function comparevs() {
var oklast=['A','E','I','M','Q','U','Y','c','g','k','o','s','w','0','4','8'];
var inum=0, fromch='youllneverfindthis', toch='youllneverfindthis';
while (parent.document.getElementById('i' + inum) && eval('' + vidarrv.length) > inum) {
if (eval('' + parent.document.getElementById('i' + inum).value.split('|')[eval(-1 + parent.document.getElementById('i' + inum).value.split('|').length)].split('#')[0].length) == 11 && parent.document.getElementById('i' + inum).value.indexOf(vidarrv[inum]) == -1) {
if (oklast.indexOf(parent.document.getElementById('i' + inum).value.split('|')[eval(-1 + parent.document.getElementById('i' + inum).value.split('|').length)].split('#')[0].slice(-1)) != -1) {
if (('' + parent.document.getElementById('i' + inum).getAttribute('data-value')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
fromch=parent.document.getElementById('i' + inum).getAttribute('data-value').split('|')[eval(-1 + parent.document.getElementById('i' + inum).getAttribute('data-value').split('|').length)].split('#')[0];
}
vidarrv[inum]=parent.document.getElementById('i' + inum).value.split('|')[eval(-1 + parent.document.getElementById('i' + inum).value.split('|').length)].split('#')[0];
toch=vidarrv[inum];
if (parent.document.getElementById('i' + inum).value.indexOf('|') != -1) {
vidstarts[inum]=parent.document.getElementById('i' + inum).value.split('|')[0];
} else {
vidstarts[inum]='0';
}
if (parent.document.getElementById('i' + inum).value.indexOf('#') != -1) {
vidtitle[inum]=parent.document.getElementById('i' + inum).value.split('#')[1];
} else {
vidtitle[inum]='';
}
viddurs[inum]='-1';
lastuvis.push(inum);
if (fromch.replace('youllneverfindthis','') != '') {
if (('' + typeof window.top.mod_docurl) == 'function') {
var gdis=window.top.get_docurl();
window.top.mod_docurl(gdis, gdis.replace(fromch, toch));
}
}
}
}
inum++;
}
for (var ij=1; ij<lastuvis.length; ij++) {
if (parent.document.getElementById('i' + lastuvis[ij])) {
//alert(4);
if (parent.document.getElementById('i' + lastuvis[ij]).value.indexOf('#') != -1) {
//alert(44);
if (vidtitle[eval('' + lastuvis[ij])] == '') {
//alert(444);
vidtitle[eval('' + lastuvis[ij])]=parent.document.getElementById('i' + lastuvis[ij]).value.split('#')[1];
}
}
}
if (parent.document.getElementById('j' + lastuvis[ij]).value.indexOf('.') != -1) {
//alert(5);
viddurs[eval('' + lastuvis[ij])]='' + parent.document.getElementById('j' + lastuvis[ij]).value;
}
}
setTimeout(comparevs, 7000);
}

function playingvideo() {
var aswellas=0, xvcen='', noret=false, ourdur=22234;
console.warn('playingvideo 0 ... ' + parent.document.URL);
if (('' + duration) == '22234') {
console.warn('not starting');
try {
ourdur='' + player.getDuration();
duration=ourdur;
if (ivid == 0 && eval('' + viddurs.length) > 0) { viddurs[0]='' + duration; }
if (ivid != 0 && eval('' + viddurs.length) > eval('' + ivid)) {
if (('' + viddurs[ivid]).indexOf('22234') == 0) {
viddurs[ivid]='' + duration;
parent.document.getElementById('youtube_duration').value='' + duration;
parent.document.getElementById('j' + ivid).value='' + duration;
}
}
} catch(fhftgdhg) { }
console.warn('trying to start regarding ' + duration);
}
if (('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's') && !comparestarted) {
comparestarted=true;
comparevs();
}
if (aminytnon) {
wasaminytnon=true;
console.warn('playingvideo aminytnon=t');
if (6 == 9) {
if (2 == 2) {
player.pauseVideo();
} else {
player.mute();
player.seekTo(0);
}
}
setTimeout(playingvideo, 1000);
console.warn('playingvideo 5');
return '';
} else if (wasaminytnon) {
console.warn('playingvideo wasaminytnon=t');
wasaminytnon=false;
duration='' + player.getDuration();
// new below
if (ivid == 0 && eval('' + viddurs.length) > 0) { viddurs[0]='' + duration; }
if (ivid != 0 && eval('' + viddurs.length) > eval('' + ivid)) {
if (('' + viddurs[ivid]).indexOf('22234') == 0) {
viddurs[ivid]='' + duration;
parent.document.getElementById('youtube_duration').value='' + duration;
parent.document.getElementById('j' + ivid).value='' + duration;
}
}
//aswellas=999999;
xvcen='0';
if (6 == 9) {
player.playVideo();
player.unMute();
} else {
duration=-9999.0;
//alert('year');
var huhi=vidarrv.indexOf(variants[playingvaridx]); //curvaridx]); // 'cannotenda2'
if (huhi >= 0) {
nextvidi=huhi;
nextvidi++;
if (nextvidi >= eval('' + viddurs.length)) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
}
ivid=nextvidi;
//alert('1:' + vidarrv[nextvidi].trim());


if (vidarrv[nextvidi].toLowerCase() == 'cannotenda2') {
if (('' + nextvidi) == ('' + lastnx)) {
//alert(3);
lastnx=-1;
nextvidi=eval(1 + eval('' + nextvidi));
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
lastnx=nextvidi;
}
}
if (vidarrv[nextvidi].toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vidarrv[nextvidi]);
var fgdz=unjzero('0Gz_7am23rk');
//alert('3:' + viddurs[nextvidi]);
setTimeout(pretoolater, Math.ceil(eval(1000 * eval('' + viddurs[nextvidi]))));
//alert('HeRe');
ivid=nextvidi;
aminytnon=feedoff(true, viddurs[nextvidi], vidtitle[nextvidi]);
if (window.parent) {
if (parent.document.getElementById('xx' + nextvidi).outerHTML.indexOf('green') != -1) {
noret=true;
}
}
nextvidi=eval(1 + ivid);
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
playingvaridx=variants.indexOf(vidarrv[nextvidi]);
//alert('4:' + nextvidi + ';' + lastnx + ' curvaridX=' + curvaridx + ' VS playingvAridx=' + playingvaridx);
vid='0Gz_7am23rk'; // new
player.loadVideoById(('0Gz_7am23rk' == '' ? vidarrv[nextvidi] : unjzero('0Gz_7am23rk')), eval('' + vidstarts[nextvidi]), "large");
setTimeout(toolater, 200000);
//setTimeout(function(){ player.pauseVideo(); player.mute(); }, 800);
} else {
ivid=nextvidi;
duration='' + viddurs[nextvidi];
// next maybe here
console.warn(vidarrv);
vid=vidarrv[nextvidi].trim(); // new
player.loadVideoById(('0Gz_7am23rk' == '0Gz_7am23rk' ? vidarrv[nextvidi].trim() : '0Gz_7am23rk'), eval('' + vidstarts[nextvidi]), "large");
}
parent.document.getElementById('xx' + nextvidi).style.backgroundColor='palegreen';
if (vidtitle[nextvidi] != '') {
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML=vidtitle[nextvidi];
}
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
nextvidi++;
if (nextvidi >= eval('' + viddurs.length)) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
duration=-1;
//alert('' + player.getDuration());
//setTimeout(function(){ player.pauseVideo(); player.mute(); }, 800);
}
if (6 == 6) {
setTimeout(playingvideo, 1000);
console.warn('playingvideo 1');
return '';
}
}
var mytos='', onethous=1000;
sparedur=-1;
beenbefore=true;
if (('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
console.warn('playingvideo 2 ' + duration);
if (('' + duration) == '22234') {
console.warn('Not starting');
try {
ourdur='' + player.getDuration();
duration=ourdur;
if (ivid == 0 && eval('' + viddurs.length) > 0) { viddurs[0]='' + duration; }
if (ivid != 0 && eval('' + viddurs.length) > eval('' + ivid)) {
if (('' + viddurs[ivid]).indexOf('22234') == 0) {
viddurs[ivid]='' + duration;
parent.document.getElementById('youtube_duration').value='' + duration;
parent.document.getElementById('j' + ivid).value='' + duration;
}
}
} catch(xfhftgdhg) { }
console.warn('Trying to start regarding ' + duration);
}

if (parent.document.getElementById('youtube_duration').value != '' + parent.document.getElementById('j' + ivid).value) {
parent.document.getElementById('youtube_duration').value='' + parent.document.getElementById('j' + ivid).value;
}
while (eval('' + vidtitle.length) < ivid) {
vidtitle.push('');
}
if (vidtitle[ivid] != '' && parent.document.getElementById('myh1').innerHTML != vidtitle[ivid]) {
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML='' + vidtitle[ivid];
parent.document.getElementById('youtube_duration').value='' + viddurs[ivid];
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
} else {
try {
if (vidtitle[ivid] != '') {
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML='' + vidtitle[ivid];
} else {
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML='' + event.target.getVideoData().title;
if (lastuvis.indexOf(ivid) != -1) {
viddurs[ivid]='' + event.target.getDuration();
alert('new duration ' + viddurs[ivid]);
}
while (eval('' + vidtitle.length) < ivid) {
vidtitle.push('');
}
vidtitle[ivid]='' + event.target.getVideoData().title;
parent.document.getElementById('youtube_duration').value='' + viddurs[ivid];
}
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
} catch(ghffh) {
if (vidtitle[ivid] != '') {
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML='' + vidtitle[ivid];
} else {
parent.document.getElementById('youtubeid').value=vid; // new
try {
var fgd='' + player.getVideoData().title;
parent.document.getElementById('myh1').innerHTML='' + fgd;
} catch(gfdhgf) { }
while (eval('' + vidtitle.length) < ivid) {
vidtitle.push('');
}
try {
var xfgd='' + player.getVideoData().title;
vidtitle[ivid]='' + xfgd;
} catch(xgfdhgf) { }
parent.document.getElementById('youtube_duration').value='' + viddurs[ivid];
}
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
}
}
console.warn('playingvideo 9');
//setTimeout(playingvideo, onethous);
xvcen='';
if (eval('' + duration) <= 0) {
if (eval('' + duration) < -9000) {
duration='' + player.getDuration();
// new again here
if (ivid == 0 && eval('' + viddurs.length) > 0) { viddurs[0]='' + duration; }
if (ivid != 0 && eval('' + viddurs.length) > eval('' + ivid)) {
if (('' + viddurs[ivid]).indexOf('22234') == 0) {
viddurs[ivid]='' + duration;
parent.document.getElementById('youtube_duration').value='' + duration;
parent.document.getElementById('j' + ivid).value='' + duration;
}
}
if (lastuvis.indexOf(ivid) != -1) { viddurs[ivid]='' + duration; }
//aswellas=999999;
xvcen='0';
if (6 == 9) {
player.playVideo();
player.unMute();
} else {
ivid=nextvidi;
//alert('2:' + vidarrv[nextvidi].trim());
console.warn(vidarrv);
vid=vidarrv[nextvidi].trim(); // new
player.loadVideoById(('0Gz_7am23rk' == '0Gz_7am23rk' ? vidarrv[nextvidi].trim() : '0Gz_7am23rk'), eval('' + vidstarts[nextvidi]), "large");
parent.document.getElementById('xx' + nextvidi).style.backgroundColor='palegreen';
if (vidtitle[nextvidi] != '') {
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML=vidtitle[nextvidi];
}
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
//setTimeout(function(){ player.pauseVideo(); player.mute(); }, 800);
nextvidi++;
if (nextvidi >= eval('' + viddurs.length)) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
duration=-1;
}
if (6 == 6) {
setTimeout(playingvideo, 1000);
console.warn('playingvideo 7');
return '';
}

if (vidarrv[nextvidi].toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
var fgdx=unjzero('0Gz_7am23rk');
//alert(viddurs[nextvidi]);
setTimeout(pretoolater, Math.ceil(eval(1000 * eval(10 + eval('' + viddurs[nextvidi])))));
//alert('HeRe');
ivid=nextvidi;
aminytnon=feedoff(true, viddurs[nextvidi], vidtitle[nextvidi]);
playingvaridx=variants.indexOf(vidarrv[nextvidi]);
if (window.parent) {
if (parent.document.getElementById('xx' + nextvidi).outerHTML.indexOf('green') != -1) {
noret=true;
}
}
nextvidi=eval(1 + ivid);
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
//alert('5:' + nextvidi + ' curvaridX=' + curvaridx + ' VS playingvaridx=' + playingvaridx);
vid='0Gz_7am23rk'; // new
player.loadVideoById(('0Gz_7am23rk' == '' ? vidarrv[nextvidi] : unjzero('0Gz_7am23rk')), eval('' + vidstarts[nextvidi]), "large");
setTimeout(toolater, 200000);
//setTimeout(function(){ player.pauseVideo(); player.mute(); }, 800);
} else {
ivid=nextvidi;
duration='' + viddurs[nextvidi];
// suss place
console.warn(vidarrv);
vid=vidarrv[nextvidi].trim(); // new
player.loadVideoById(vidarrv[nextvidi].trim(), eval('' + vidstarts[nextvidi]), "large");
}
setTimeout(function(){
lastnext=ivid;
if (window.top) {
if (top.document.getElementById('td0001')) {
//top.document.getElementById('td0001').alt='Playing ... ' + parent.document.getElementById('myh1').innerHTML;
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}

}, 4000);
if (!noret) {
console.warn('playingvideo 6');
setTimeout(playingvideo, onethous);
} else {
console.warn('playingvideo ouch');
}
return '';
}
var wasdur='' + duration;
var wastwodur=wasdur;
try {
wastwodur='' + event.target.getDuration();
duration='' + wastwodur;
// newest new here
if (ivid == 0 && eval('' + viddurs.length) > 0) { viddurs[0]='' + duration; }
if (ivid != 0 && eval('' + viddurs.length) > eval('' + ivid)) {
if (('' + viddurs[ivid]).indexOf('22234') == 0) {
viddurs[ivid]='' + duration;
parent.document.getElementById('youtube_duration').value='' + duration;
parent.document.getElementById('j' + ivid).value='' + duration;
}
}
parent.document.getElementById('youtubeid').value=vid; // new
parent.document.getElementById('myh1').innerHTML='' + event.target.getVideoData().title;
setTimeout(function(){
parent.document.getElementById('youtube_duration').value='' + parent.document.getElementById('j' + ivid).value; // duration
}, 2000);
onethous=2500;
if (parent.document.getElementById('mytopspan')) { // && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
mytos=parent.document.getElementById('mytopspan').innerHTML;
if (parent.document.getElementById('mytopspan').innerHTML.indexOf(' unmute ') == -1) {
if (('' + top.document.URL).indexOf('isradio=') != -1 && ('' + top.document.URL).indexOf('audioyoutube=') != -1 && nextvidi == 1) {
parent.document.getElementById('mytopspan').innerHTML='<font color=red>Please unmute within 30 seconds ... </font>' + mytos;
setTimeout(function(){
parent.document.getElementById('mytopspan').innerHTML=parent.document.getElementById('mytopspan').innerHTML.replace(' within 30 seconds ', ' as you require ').replace(' color="red"', ' color="blue"');
}, 30000);
} else {
parent.document.getElementById('mytopspan').innerHTML='<font color=blue>Please unmute as required ... </font>' + mytos;
}
}
}
} catch(xfghgf) {
try {
wastwodur='' + player.getDuration();
duration='' + wastwodur;
} catch(hgfhfggh) {
duration='' + wasdur;
}
setTimeout(function(){
try {
parent.document.getElementById('myh1').innerHTML='' + player.getVideoData().title;
parent.document.getElementById('youtubeid').value=vid; // new
} catch(tertr) {
if (parent.document.getElementById('i' + ivid).value.indexOf('#') != -1) {
parent.document.getElementById('myh1').innerHTML='' + parent.document.getElementById('i' + ivid).value.split('#')[1];
parent.document.getElementById('youtubeid').value=vid; // new
}
}
parent.document.getElementById('youtube_duration').value='' + '' + parent.document.getElementById('j' + ivid).value; // duration;
}, 2000);
onethous=2500;
if (parent.document.getElementById('mytopspan')) { // && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
mytos=parent.document.getElementById('mytopspan').innerHTML;
if (parent.document.getElementById('mytopspan').innerHTML.indexOf(' unmute ') == -1) {
if (('' + top.document.URL).indexOf('isradio=') != -1 && ('' + top.document.URL).indexOf('audioyoutube=') != -1 && nextvidi == 1) {
parent.document.getElementById('mytopspan').innerHTML='<font color=red>Please unmute within 30 seconds ... </font>' + mytos;
setTimeout(function(){
parent.document.getElementById('mytopspan').innerHTML=parent.document.getElementById('mytopspan').innerHTML.replace(' within 30 seconds ', ' as you require ').replace(' color="red"', ' color="blue"');
}, 30000);
} else {
parent.document.getElementById('mytopspan').innerHTML='<font color=blue>Please unmute as required ... </font>' + mytos;
}
}
}
}
}
if (eval('' + aswellas) > 999998) {
aswellas=999999;
xvcen='0';
duration=-1;
//alert('here');
} else {
aswellas=0;
try {
xvcen='' + event.target.getCurrentTime();
} catch(xfghgf) {
try {
xvcen='' + player.getCurrentTime();
} catch(hgfhg) {
aswellas=999999;
xvcen='0';
//alert('new here');
}
}
}
if (parent.document.getElementById('c' + ivid)) {
if (!parent.document.getElementById('c' + ivid).checked) {
aswellas=eval(1 + eval('' + duration));
}
}
var ipo=0;
var theone=1;
if (8 == 8 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
theone=2;
}
var xxcen=eval(aswellas + eval('' + xvcen));
if (eval(theone + xxcen) >= eval('' + duration)) {
if (window.parent) {
if (parent.document.URL.replace(/\#http$/g,'') != parent.document.URL) {
if (parent.document.getElementById('myiframe')) {
ismobileplaylist=true; //parent.document.getElementById('myiframe').title='No more';
}
}
}
//alert('here RE ' + duration + ' stduration=' + stduration);
if (nextvidi >= 0) {
if (parent.document.getElementById('c' + nextvidi)) {
if (!parent.document.getElementById('c' + nextvidi).checked) {
ipo=0;
while (parent.document.getElementById('xx' + ipo)) {
parent.document.getElementById('xx' + ipo).style.backgroundColor='pink';
ipo++;
}

var btries=0;
while (!parent.document.getElementById('c' + nextvidi).checked) {
if (parent.document.getElementById('shufflechk')) {
if (!parent.document.getElementById('shufflechk').checked) {
nextvidi++;
btries++;


if (eval(-1 + btries) > eval('' + viddurs.length)) {
parent.document.getElementById('c0').checked=true;
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}


//top.document.title+='1';
if (eval('' + viddurs.length) <= nextvidi) {
if (parent.document.getElementById('loopchk')) {
if (!parent.document.getElementById('loopchk').checked) {
nextvidi--;
player.stopVideo();
} else {
nextvidi=rezero(0);
}
} else {
nextvidi=rezero(0);
}
}
} else {
btries++;
nextvidi=butnotzero(Math.floor(Math.random() * eval('' + viddurs.length)));

if (!parent.document.getElementById('c' + nextvidi).checked && eval(-1 + btries) > eval(5 * eval('' + viddurs.length))) {
parent.document.getElementById('c0').checked=true;
nextvidi=rezero(0);
}

}
} else {
nextvidi++;
btries++;

if (eval(-1 + btries) > eval('' + viddurs.length)) {
parent.document.getElementById('c0').checked=true;
nextvidi=rerzero(0);
}

//top.document.title+='2';
if (eval('' + viddurs.length) <= nextvidi) {
if (parent.document.getElementById('loopchk')) {
if (!parent.document.getElementById('loopchk').checked) {
nextvidi--;
player.stopVideo();
} else {
nextvidi=rezero(0);
}
} else {
nextvidi=rezero(0);
}
}
}
}
}
}
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
ipo=0;
while (parent.document.getElementById('xx' + ipo)) {
parent.document.getElementById('xx' + ipo).style.backgroundColor='pink';
ipo++;
}
if (parent.document.getElementById('xx' + nextvidi)) {
parent.document.getElementById('xx' + nextvidi).style.backgroundColor='lightgreen';
}
} else if (parent.document.getElementById('xx' + nextvidi)) {
if (parent.document.getElementById('shufflechk')) {
if (parent.document.getElementById('shufflechk').checked) {
ipo=0;
while (parent.document.getElementById('xx' + ipo)) {
parent.document.getElementById('xx' + ipo).style.backgroundColor='pink';
ipo++;
}
}
}
//alert('near');
parent.document.getElementById('xx' + nextvidi).style.backgroundColor='lightgreen';
}
duration=-1;
wasno=('' + nextvidi);
wasdur=('' + viddurs[nextvidi]);
wasvid='' + vidarrv[nextvidi];
wasstart=('' + vidstarts[nextvidi]);
wasdos=viddos[nextvidi];
newdos=viddos[nextvidi];
newno=('' + nextvidi);
newdur=('' + viddurs[nextvidi]);
newvid='' + vidarrv[nextvidi];
newstart=('' + vidstarts[nextvidi]);
wastitle='';
newtitle='';
if (parent.document.getElementById('i' + nextvidi)) {
//alert(1);
if (eval('' + ('' + parent.document.getElementById('i' + nextvidi).value).length) >= 11 && parent.document.getElementById('i' + nextvidi).value.indexOf('' + vidarrv[nextvidi]) == -1) {
beenbefore=false;
//alert(11);
if (parent.document.getElementById('i' + nextvidi).value.indexOf('|') != -1) {
newstart=parent.document.getElementById('i' + nextvidi).value.split('|')[0];
vidstarts[nextvidi]='' + newstart;
newvid=parent.document.getElementById('i' + nextvidi).value.split('|')[1].split('#')[0];
vidarrv[nextvidi]='' + newvid;
} else {
newstart='0';
vidstarts[nextvidi]='' + newstart;
newvid=parent.document.getElementById('i' + nextvidi).value.split('#')[0];
vidarrv[nextvidi]='' + newvid;
}
if (parent.document.getElementById('c' + nextvidi)) {
if (parent.document.getElementById('c' + nextvidi).checked) {
newdos=true;
viddos[nextvidi]=true;
} else {
newdos=false;
viddos[nextvidi]=false;
}
}
}
}
if (top.document.getElementById('divtitles')) {
if (top.document.getElementById('divtitles').innerHTML.indexOf('|' + vidarrv[nextvidi] + '') == -1) {
//alert(111);
beenbefore=false;
}
}
//alert('1111 ' + viddurs[nextvidi] + ' beenbefore=' + beenbefore);
//if (('' + viddurs[nextvidi]) == '' || eval('0' + viddurs[nextvidi]) <= 0 || !beenbefore) {
//alert('changed');
//} else {
//alert('not changed');
//}
if (('' + viddurs[nextvidi]) == '' || eval(('' + viddurs[nextvidi] + '0').replace(/^null/g,'').replace(/^undefined/g,'')) <= 0 || !beenbefore) {
if (top.document.getElementById('divtitles')) {
if (top.document.getElementById('divtitles').innerHTML.indexOf('|' + viddurs[nextvidi] + '') != -1) {
if (top.document.getElementById('divtitles').innerHTML.indexOf('|' + viddurs[nextvidi] + '#') != -1) {
wastitle=top.document.getElementById('divtitles').innerHTML.split('|' + viddurs[nextvidi] + '#')[1].split('</')[0];
newtitle=wastitle;
}
}
}
//alert('Why6 ' + nextvidi);
ivid=nextvidi;
if (altplayer) {
player=altplayer;
altplayer=null;
}
if (vidarrv[nextvidi].toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
var fgd=unjzero('0Gz_7am23rk');
viddurs[nextvidi]=parent.document.getElementById('j' + nextvidi).value.split('.00')[0];
//alert('2:' + viddurs[nextvidi]);
setTimeout(pretoolater, Math.ceil(eval(1000 * eval(10 + eval('' + viddurs[nextvidi])))));
//alert('HeRe');
ivid=nextvidi;
aminytnon=feedoff(true, viddurs[nextvidi], vidtitle[nextvidi]);
playingvaridx=variants.indexOf(vidarrv[nextvidi]);
if (window.parent) {
if (parent.document.getElementById('xx' + nextvidi).outerHTML.indexOf('green') != -1) {
noret=true;
}
}
nextvidi=eval(1 + ivid);
if (eval('' + viddurs.length) <= nextvidi) {
ipo=0;
while (parent.document.getElementById('xx' + ipo)) {
parent.document.getElementById('xx' + ipo).style.backgroundColor='pink';
ipo++;
}
nextvidi=0;
}
//alert('6:' + nextvidi + ' curvaridX=' + curvaridx + ' VS Playingvaridx=' + playingvaridx);
vid='0Gz_7am23rk'; // new
player.loadVideoById(('0Gz_7am23rk' == '' ? vidarrv[nextvidi].trim() : unjzero('0Gz_7am23rk')), eval('' + vidstarts[nextvidi]), "large");
setTimeout(toolater, 200000);
//setTimeout(function(){ player.pauseVideo(); player.mute(); }, 800);
} else {
ivid=nextvidi;
duration='' + viddurs[nextvidi];
console.warn(vidarrv);
vid=vidarrv[nextvidi].trim(); // new
player.loadVideoById(vidarrv[nextvidi].trim(), eval('' + vidstarts[nextvidi]), "large");
}
setTimeout(function(){
lastnext=ivid;
if (window.top) {
if (top.document.getElementById('td0001')) {
//top.document.getElementById('td0001').alt='Playing ... ' + parent.document.getElementById('myh1').innerHTML;
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}

}, 4000);
try {
ivid=nextvidi;
sparedur='' + event.target.getDuration();
//alert('3:' + sparedur);
viddurs[ivid]='' + sparedur;
newdur='' + viddurs[ivid];
setTimeout(function(){
parent.document.getElementById('myh1').innerHTML='' + event.target.getVideoData().title;
parent.document.getElementById('youtubeid').value=vid; // new
newtitle='' + event.target.getVideoData().title;
if (!beenbefore) {
top.document.getElementById('divtitles').innerHTML+='<span>' + sparedur + '</span><span>' + newstart + '|' + newvid + '#' + newtitle.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + '</span>';
parent.fixdoc('' + ivid, '' + ('' + newdos).replace('false','off').replace('true','on') + '#' + newstart + '|' + newvid + '#' + newdur + '#' + newtitle);
} else if (newstart != wasstart || newvid != wasvid || newtitle != wastitle) {
top.document.getElementById('divtitles').innerHTML=top.document.getElementById('divtitles').innerHTML.replace(wasvid, 'cannotenda2');
top.document.getElementById('divtitles').innerHTML+='<span>' + sparedur + '</span><span>' + newstart + '|' + newvid + '#' + newtitle.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + '</span>';
parent.fixdoc('' + ivid, '' + ('' + newdos).replace('false','off').replace('true','on') + '#' + newstart + '|' + newvid + '#' + newdur + '#' + newtitle);
}
parent.document.getElementById('youtube_duration').value='' + parent.document.getElementById('j' + ivid).value; // duration
}, 2000);
onethous=2500;
if (parent.document.getElementById('mytopspan')) { // && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
mytos=parent.document.getElementById('mytopspan').innerHTML;
if (parent.document.getElementById('mytopspan').innerHTML.indexOf(' unmute ') == -1) {
if (('' + top.document.URL).indexOf('isradio=') != -1 && ('' + top.document.URL).indexOf('audioyoutube=') != -1 && nextvidi == 1) {
parent.document.getElementById('mytopspan').innerHTML='<font color=red>Please unmute within 30 seconds ... </font>' + mytos;
setTimeout(function(){
parent.document.getElementById('mytopspan').innerHTML=parent.document.getElementById('mytopspan').innerHTML.replace(' within 30 seconds ', ' as you require ').replace(' color="red"', ' color="blue"');
}, 30000);
} else {
parent.document.getElementById('mytopspan').innerHTML='<font color=blue>Please unmute as required ... </font>' + mytos;
}
}
}
} catch(xfghgf) {
ivid=nextvidi;
setTimeout(function(){
sparedur='' + player.getDuration();
viddurs[ivid]='' + sparedur; //duration;
newdur='' + viddurs[ivid]
parent.document.getElementById('youtube_duration').value='' + '' + parent.document.getElementById('j' + ivid).value; // duration;
parent.document.getElementById('myh1').innerHTML='' + player.getVideoData().title;
parent.document.getElementById('youtubeid').value=vid; // new
newtitle='' + parent.document.getElementById('myh1').innerHTML;
//alert('4:' + sparedur + ' newtitle=' + newtitle + ' beenbefore=' + beenbefore);
if (!beenbefore) {
top.document.getElementById('divtitles').innerHTML+='<span>' + sparedur + '</span><span>' + newstart + '|' + newvid + '#' + newtitle.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + '</span>';
parent.fixdoc('' + ivid, '' + ('' + newdos).replace('false','off').replace('true','on') + '#' + newstart + '|' + newvid + '#' + newdur + '#' + newtitle);
} else if (newstart != wasstart || newvid != wasvid || newtitle != wastitle) {
top.document.getElementById('divtitles').innerHTML=top.document.getElementById('divtitles').innerHTML.replace(wasvid, 'cannotenda2');
top.document.getElementById('divtitles').innerHTML+='<span>' + sparedur + '</span><span>' + newstart + '|' + newvid + '#' + newtitle.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + '</span>';
parent.fixdoc('' + ivid, '' + ('' + newdos).replace('false','off').replace('true','on') + '#' + newstart + '|' + newvid + '#' + newdur + '#' + newtitle);
}
}, 2000);
onethous=2500;
if (parent.document.getElementById('mytopspan')) { // && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
mytos=parent.document.getElementById('mytopspan').innerHTML;
if (parent.document.getElementById('mytopspan').innerHTML.indexOf(' unmute ') == -1) {
if (('' + top.document.URL).indexOf('isradio=') != -1 && ('' + top.document.URL).indexOf('audioyoutube=') != -1 && nextvidi == 1) {
parent.document.getElementById('mytopspan').innerHTML='<font color=red>Please unmute within 30 seconds ... </font>' + mytos;
setTimeout(function(){
parent.document.getElementById('mytopspan').innerHTML=parent.document.getElementById('mytopspan').innerHTML.replace(' within 30 seconds ', ' as you require ').replace(' color="red"', ' color="blue"');
}, 30000);
} else {
parent.document.getElementById('mytopspan').innerHTML='<font color=blue>Please unmute as required ... </font>' + mytos;
}
}
}
}
} else {

var atries=0;
if (lastnext == -1) { lastnext=0; }
if (2 == 2 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (parent.document.getElementById('shufflechk')) {
if (!parent.document.getElementById('shufflechk').checked) {
if (lastnext >= 0 && (nextvidi == lastnext || nextvidi > eval(1 + lastnext))) {
//alert('lastnext=' + lastnext + '.' + eval(1 + lastnext) + ' and nextvidi=' + nextvidi);
if (nextvidi == lastnext) {
nextvidi++;
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
atries=0;
while (!parent.document.getElementById('c' + nextvidi).checked) {
nextvidi++;
atries++;
//if (nextvidi == lastnext) { nextvidi++; }
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}

if (eval(-1 + atries) > eval('' + viddurs.length)) {
parent.document.getElementById('c0').checked=true;
nextvidi=rezero(0);
}

}
}
//alert('2:lastnext=' + lastnext + '.' + eval(1 + lastnext) + ' and nextvidi=' + nextvidi);
while (nextvidi > eval(1 + lastnext)) {
nextvidi--;
}
//alert('3:lastnext=' + lastnext + '.' + eval(1 + lastnext) + ' and nextvidi=' + nextvidi);
atries=0;
while (!parent.document.getElementById('c' + nextvidi).checked) {
nextvidi++;
atries++;
//if (nextvidi == lastnext) { nextvidi++; }
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}

if (eval(-1 + atries) > eval('' + viddurs.length)) {
parent.document.getElementById('c0').checked=true;
nextvidi=rezero(0);
}

}
}
ivid=nextvidi;
console.log('4:lastnext=' + lastnext + '.' + eval(1 + lastnext) + ' and nextvidi=' + nextvidi);
}
}
}

//alert('Why7 ' + nextvidi + ' and lastnext=' + lastnext);
ivid=nextvidi;
if (parent.document.getElementById('shufflechk')) {
if (!parent.document.getElementById('shufflechk').checked) {
//alert('gear');
parent.document.getElementById('xx' + ivid).style.backgroundColor='lightgreen';
}
}
if (altplayer) {
player=altplayer;
altplayer=null;
}
if (vidarrv[nextvidi].toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
var fgdz=unjzero('0Gz_7am23rk');
//alert('3:' + viddurs[nextvidi]);
setTimeout(pretoolater, Math.ceil(eval(1000 * eval('' + viddurs[nextvidi]))));
//alert('HeRe');
ivid=nextvidi;
lastnx=nextvidi;
aminytnon=feedoff(true, viddurs[nextvidi], vidtitle[nextvidi]);
if (window.parent) {
if (parent.document.getElementById('xx' + nextvidi).outerHTML.indexOf('green') != -1) {
noret=true;
}
}
nextvidi=eval(1 + ivid);
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
playingvaridx=variants.indexOf(vidarrv[nextvidi]);
//alert(':' + nextvidi + ' curvaridX=' + curvaridx + ' VS playingvAridx=' + playingvaridx);
vid='0Gz_7am23rk'; // new
player.loadVideoById(('0Gz_7am23rk' == '' ? vidarrv[nextvidi] : unjzero('0Gz_7am23rk')), eval('' + vidstarts[nextvidi]), "large");
setTimeout(toolater, 200000);
//setTimeout(function(){ player.pauseVideo(); player.mute(); }, 800);
} else {
ivid=nextvidi;
duration='' + viddurs[nextvidi];
console.warn(vidarrv);
vid=vidarrv[nextvidi].trim(); // new
player.loadVideoById(vidarrv[nextvidi].trim(), eval('' + vidstarts[nextvidi]), eval(eval('' + viddurs[nextvidi]) - eval('' + vidstarts[nextvidi])));
}
setTimeout(function(){
lastnext=ivid;
if (window.top) {
if (top.document.getElementById('td0001')) {
//top.document.getElementById('td0001').alt='Playing ... ' + parent.document.getElementById('myh1').innerHTML;
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-vid', ' ' + parent.document.getElementById('youtubeid').value + ' ');
top.document.getElementById('td0001').setAttribute('data-alt',top.getcura(parent.document.getElementById('myh1')) + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}

}, 4000);
}
ivid=nextvidi;

if (parent.document.getElementById('shufflechk')) {
if (!parent.document.getElementById('shufflechk').checked) {
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || okone == 1) {
nextvidi+=okone;
if (nextvidi == lastnext) { nextvidi++; }
while (nextvidi > eval(1 + lastnext)) {
nextvidi--;
}
//top.document.title+='3';
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
}

if (2 == 4 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
okone=0;
setTimeout(function(){ okone=1; }, 6000);
}

}
} else {
nextvidi=butnotzero(Math.floor(Math.random() * eval('' + viddurs.length)));
}
} else {
nextvidi++;
if (nextvidi == lastnext) { nextvidi++; }
while (nextvid > eval(1 + lastnext)) {
nextvidi--;
}
//top.document.title+='4';
if (eval('' + viddurs.length) <= nextvidi) {
nextvidi=rezero(0);
} else {
rezero(nextvidi);
}
}


}
}
if (!noret) {
console.warn('playingvideo 70');
setTimeout(playingvideo, onethous);
} else {
if (swin) { setTimeout(function(){ restoreis(swin); swin=null; isis=[]; jsis=[]; }, 3000); } //alert('WhEre');
console.warn('playingvideo 71');
setTimeout(playingvideo, onethous);
}
console.warn('playingvideo 72');
return '';
}
inplaying=true;
if (thatisit) { inplaying=false; console.warn('playingvideo 81'); return ''; }
psuf='';
if (startagain) {
if (1 == 6 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
psuf=' via button reclick ' + String.fromCodePoint(10004);
} else {
psuf=' ' + String.fromCodePoint(10004);
}
}
if (('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/\#/g,'') != '') {
if (eval('' + duration) == 0 && Math.round(player.getCurrentTime()) < 1) { // used to be event.target.getCurrentTime
if (one == 1 || onepause != 1) {
if (1 == 4) { event.target.pauseVideo(); }
} else {
event.target.playVideo();
}
if (!inplaying) { inplaying=true; setTimeout(playingvideo, 1