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]]['media:group']; var v_id=item['media:player']['url'].match(/=.*/); var vId=v_id[0].substr(1,11); var vTtlSec=parseInt(item['yt:duration']['seconds']); var vMin=Math.floor(vTtlSec/60); var vSec=vTtlSec-vMin*60; this.html=''; this.html+=''; this.html+='
'; this.html+=((item['media:title']['_content'].length>30)?(item['media:title']['_content'].substr(0,27)+'...'):item['media:title']['_content']); this.html+='('+vMin+':'+('00'+vSec).substr(-2,2)+')'; this.html+='

'; this.html+=this.postfix; }, makeFlvObject:function(w,h,vId) { return G2Box.makeFlvObject(w,h,vId); }, setPostfix:function() { var i=0; for (var item in this.items){ if ((i'; this.postfix+=''; this.postfix+=''; i++; } } this.postfix+='
'; }, showLargeMovie:function() { var item=this.items[this.v_id[this.m_id]]['media:group']; var v_id=item['media:player']['url'].match(/=.*/); var vId=v_id[0].substr(1,11); var vTtlSec=parseInt(item['yt:duration']['seconds']); var vMin=Math.floor(vTtlSec/60); var vSec=vTtlSec-vMin*60; var title=((item['media:title']['_content'].length>30)?(item['media:title']['_content'].substr(0,27)+'...'):item['media:title']['_content'])+'('+vMin+':'+('00'+vSec).substr(-2,2)+')'; G2Box.initialize(); //append overlay and display none G2Box.setLargeU2B(title,vId); G2Box.observe('u2b_overlay','click',G2Box.remove,false); G2Box.observe('u2b_movie_close','click',G2Box.remove,false); G2Box.show() }, putAds:function() { } } var __id='u2b_small_ads'; var __affiliateID='stingshomepag-22/'; include('script',{type:'text/javascript',src:'http://www.got2do.com/api/awsearch.js'}); include ('link', {type:'text/css',href:'http://www.got2do.com/api/U2Bplayer.css',rel:'stylesheet'}); var afterLoaded=setInterval(function(){ try { var aws=new AWSearch('08YSHVED3BV6DH6PNKR2','http://www.got2do.com/api/awsearch.xsl'); aws.options.onCreate=function(){ document.getElementById(__id).innerHTML='Loading...'; }; aws.options.onSuccess=function(result){ try { var item=result.items[Math.floor(Math.random()*result.items.length)]; var url='http://www.amazon.co.jp/exec/obidos/ASIN/' + item.asin + '/ref%3Dnosim/' + __affiliateID; var title=(item.title.length>25)?item.title.substr(0,25)+'...':item.title; var img=''; var link=''; var html='
'+link+img+''+link+title+'
'; } catch(e) { html=''; } document.getElementById(__id).innerHTML=html; }; aws.options.mode='dvd-jp'; playU2B.prototype.putAds=function(){ var item=this.items[this.v_id[this.m_id]]['media:group']; var tags=item['media:keywords'].split(' '); var terms=item['media:description']['_content'].split(' '); var keys=new Array(); var key=tags[0]; var num=0; for (var i=0; inum) { num=keys[tags[i]]; key=tags[i]; } } aws.search(key); }; clearInterval(afterLoaded); }catch(e){ throw('Still can not load the js file.'); } },1000); var G2Box={ initialize:function(){ var size=this._getPageSize(); this._append('body','div',{"id":"u2b_overlay","height":(size.y)+'px',"display":"none"},''); }, setBox:function(x,y,args,html){ this.boxId=args.id; var size=this._getPageSize(); args['display']='none'; args['left']=((size.w-x)/2)+'px'; args['top']=((size.t+(size.h-y)/2))+'px'; args['width']=x+'px'; args['height']=y+'px'; this._append('body','div',args,html); }, setLargeU2B:function(title,vId){ var html=''; html+='
'+title+'
'; html+='
'; html+=this.makeFlvObject(425,350,vId); html+='
'; html+='
'; html+='[Powered by TEDDY-G] '; html+='>Youtube '; html+='>Download '; html+='[x]Close'; this.setBox(435,400,{id:'u2b_movie_large'},html); }, makeFlvObject:function(w,h,vId) { var html=''; html+=''; html+=''; html+=''; html+=''; html+=''; html+=''; return html; }, show:function(){ this._setStyle('u2b_overlay',{'display':'block'}); this._setStyle(this.boxId,{'display':'block'}); }, remove:function(){ var parent=document.getElementsByTagName("body")[0]; parent.removeChild(document.getElementById('u2b_overlay')); parent.removeChild(document.getElementById(G2Box.boxId)); }, observe:function(elementname,name,observer,useCapture){ if (typeof elementname=='string'){ element=document.getElementById(elementname)||document.getElementsByTagName(elementname)[0]; } else { element=elementname; } if (element.addEventListener){ element.addEventListener(name,observer,useCapture); }else if(element.attachEvent){ element.attachEvent('on'+name,observer); } }, _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}); }, _append:function(parentTag,tag,args,html){ var child=document.createElement(tag); child.setAttribute('id',args.id); child.innerHTML=html; var parent=document.getElementById(parentTag)||document.getElementsByTagName(parentTag)[0]; parent.appendChild(child); this._setStyle(args.id,args); }, _setStyle:function(element,style){ element = document.getElementById(element); for (var name in style) { var value = style[name]; /* if(name == 'opacity') { if (value == 1) { value = (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0; if(/MSIE/.test(navigator.userAgent) && !window.opera) element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); } else if(value == '') { if(/MSIE/.test(navigator.userAgent) && !window.opera) element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); } else { if(value < 0.00001) value = 0; if(/MSIE/.test(navigator.userAgent) && !window.opera) element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + 'alpha(opacity='+value*100+')'; } } else if ((name=='float')||(name='cssFloat')) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat'; */ //alert(name!='id //alert(name.replace(/-([a-z])/g,function($0,$1){return $1.toUpperCase})) element.style[name.replace(/-([a-z])/g,function($0,$1){return $1.toUpperCase})] = value; } return element; } } G2Box.observe(window,'load',function(){ var _A=document.getElementsByTagName('a'); var a; for (a in _A){ try { if (_A[a].href.match(/youtube\.com\/watch\?v=([\w-]+)/ig)) { var vId=RegExp.$1; var title=_A[a].innerHTML; G2Box.observe(_A[a],'click',showLinkToU2B(vId,title)); } }catch(e){} } }); var showLinkToU2B=function(vId,title){ return function(e){ G2Box.initialize(); G2Box.setLargeU2B(title,vId); G2Box.observe('u2b_overlay','click',G2Box.remove,false); G2Box.observe('u2b_movie_close','click',G2Box.remove,false); G2Box.show(); if (e && e.preventDefault) e.preventDefault(); return false; } } document.write('
Loading...
powered by TEDDY-G
'); include('script',{type:'text/javascript',src:'http://www.got2do.com/api/proxyRESTAPI.php?json:jsonU2B.onload:http://gdata.youtube.com/feeds/users/billie2006/favorites'});