// Functions //-------------------- // Function include() // usage: // include (tagname, arguments(JSON)) var include = function(_tag, _args){ var tag=document.createElement(_tag); for (attr in _args) { tag.setAttribute(attr, _args[attr]); } var list=document.documentElement.getElementsByTagName("*"); for(var i=0; i0)?-1:+19; this.play(); }, play:function() { this.make(); document.getElementById(this.id).innerHTML=this.html; }, make:function() { var item=this.items[this.v_id[this.m_id]]; var v_id=item.url.match(/=.*/); var vId=v_id[0].substr(1,11); var vMin=Math.floor(parseInt(item.length_seconds)/60); var vSec=parseInt(item.length_seconds)-vMin*60; this.html=''; this.html+=this.makeFlvObject(160,120,vId); this.html+='
Play Video on Large Screen!
'; this.html+=this.postfix; //this.html+=vMin+'Min '+vSec+'Sec'; }, makeFlvObject:function(w,h,vId) { var html=''; html+=''; html+=''; html+=''; html+=''; html+=''; html+=''; return html; }, setPostfix:function() { var i=0; this.postfix='
' for (var item in this.items){ if ((i'; this.postfix+=''; this.postfix+=''; this.postfix+=''; i++; } } this.postfix+='
'; this.postfix+=this.items[i].title; this.postfix+='
'; }, getPageSize:function() { var de = document.documentElement; var w = self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; if (window.innerHeight && window.scrollMaxY) { var y = window.innerHeight + window.scrollMaxY; }else if (document.body.scrollHeight > document.body.offsetHeight){ var y = document.body.scrollHeight; } else { var y = document.body.offsetHeight; } if (self.pageYOffset) { var t = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop){ var t = document.documentElement.scrollTop; } else if (document.body) { var t = document.body.scrollTop; } return ({"w":w,"h":h,"y":y,"t":t}); }, showLargeMovie:function() { }, putAds:function() { } } var play=function(JSON){ var artist=JSON.artist; var favorite; var count=0; var music; favorite=artist[Math.floor(Math.random()*artist.length)].name; document.getElementById('last2b_title').innerHTML=''+favorite+''; objAmazon.search(favorite); var urlTube='http://www.got2do.com/api/proxyJSON.php?name_f=jsonL2B.onload&uri_xml=http://www.youtube.com/api2_rest&dev_id=VgOesuy66VU&method=youtube.videos.list_by_tag&tag='+favorite; include('script',{type:'text/javascript',src:urlTube}); } //Global Variables var objAmazon; // instance of AWsearch var __l2bAds_id='Last2b_small_ads'; var __l2b_affiliateID='got2do05-22/'; var L2B={}; var jsonL2B={}; jsonL2B.onload=function(arrayL2B) { try{ L2B=new playL2B(arrayL2B,'last2b_movie'); L2B.play(); }catch(e){ document.getElementById('last2b_movie').innerHTML=''; } } // main document.write('
Loading Video...
powered by TEDDY-G
'); if (!isIncluded('script','awsearch.js')) include('script',{'type':'text/javascript','src':'http://www.got2do.com/api/awsearch.js'}); if (!isIncluded('script','jquery.js')) include('script',{type:'text/javascript',src:'http://www.got2do.com/api/jquery.js'}); if (!isIncluded('link','U2Bplayer.css')) include ('link', {type:'text/css',href:'http://www.got2do.com/api/U2Bplayer.css',rel:'stylesheet'}); var L2Btimer=setInterval(function(){ try{ // add method to playL2B playL2B.prototype.showLargeMovie=function(){ var item=this.items[this.v_id[this.m_id]]; var v_id=item.url.match(/=.*/); var vId=v_id[0].substr(1,11); var vMin=Math.floor(parseInt(item.length_seconds)/60); var vSec=parseInt(item.length_seconds)-vMin*60; var title=((item.title.length>30)?(item.title.substr(0,27)+'...'):item.title)+'('+vMin+':'+('00'+vSec).substr(-2,2)+')'; var html=''; //html+='
'; //html+='
' html+='
'+title+'
'; html+='
'; html+=this.makeFlvObject(425,350,vId); html+='
'; html+='
'; html+='>Youtube '; html+='>Download '; html+='[x]Close'; var size=this.getPageSize(); $('body').append('
'+html+'
'); $('#u2b_overlay').css({height:(size.y)+'px'}); $('#u2b_movie_large').css({"left":((size.w-435)/2)+'px',"top":((size.t+(size.h-400)/2))+'px'}); $('#u2b_overlay').click(function(){$('#u2b_movie_large').innerHTML='';$('#u2b_overlay').remove();$('#u2b_movie_large').remove();}); $('#u2b_movie_close').click(function(){$('#u2b_movie_large').innerHTML='';$('#u2b_overlay').remove();$('#u2b_movie_large').remove();}); $('#u2b_overlay').show(); $('#u2b_movie_large').show(); }; //search amazon objAmazon=new AWSearch('08YSHVED3BV6DH6PNKR2','http://www.got2do.com/api/awsearch.xsl'); objAmazon.options.onCreate=function(){document.getElementById(__l2bAds_id).innerHTML='Loading...';}; objAmazon.options.onSuccess=function(result){ var html='Advertisements by Amazon'; try { for (var i=0;i25)?item.title.substr(0,25)+'...':item.title; var img=''; var link=''; html+='
'+link+img+''+link+title+'
'; } } catch(e) { html=''; } document.getElementById(__l2bAds_id).innerHTML=html; }; objAmazon.options.mode='music-jp'; var urlLastFm='http://www.got2do.com/api/proxyJSON.php?uri_xml=http://ws.audioscrobbler.com/1.0/user/yzgd/weeklyartistchart.xml&name_f=play'; include('script',{type:'text/javascript',src:urlLastFm}); clearInterval(L2Btimer); }catch(e){ throw(e); } },1000);