var UA=navigator.userAgent;
if(/MSIE 6/.test(UA)){
UA="ie";
}else{
if(/Gecko/.test(UA)){
UA="gecko";
}else{
if(/MSIE 7/.test(UA)){
UA="ie7";
}else{
if(/Opera/.test(UA)){
UA="opera";
}
}
}
}
var LOADING_BAR_TIMER=null;
function isIE(){
return UA=="ie";
}
function getFlashDOM(_1){
var _2=null;
if(navigator.appName.indexOf("Microsoft")!=-1){
_2=window[_1];
}else{
_2=document[_1];
}
y_setGlobal("pagemp3",_1,_2);
return _2;
}
function y_setGlobal(_3,_4,_5){
if(typeof document[_3]=="undefined"){
document[_3]={};
}
document[_3][_4]=_5;
}
function y_getGlobal(_6,_7){
if(typeof document[_6]=="undefined"){
document[_6]={};
}
if(typeof document[_6][_7]!="undefined"){
return document[_6][_7];
}
return null;
}
function string_trim(_8){
return _8.replace(/(^\s*)|(\s*$)/g,"");
}
function show_dom(_9,_a){
var _b=$(_9);
if(_b){
_b.show();
}
var _c=$(_a);
if(_c){
_c.hide();
}
}
function getViewportSize(){
var _d=[0,0];
if(typeof window.innerWidth!="undefined"){
_d=[window.innerWidth,window.innerHeight];
}else{
if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){
_d=[document.documentElement.clientWidth,document.documentElement.clientHeight];
}else{
_d=[document.getElementsByTagName("body")[0].clientWidth,document.getElementsByTagName("body")[0].clientHeight];
}
}
return _d;
}
function getDocHeight(){
return document.body.scrollHeight>=getViewportSize()[1]?document.body.scrollHeight:getViewportSize()[1];
}
function setDivMiddle(_e){
_e.style.display="block";
var _f=_e.offsetWidth;
var _10=_e.offsetHeight;
var _11=getViewportSize();
var _12=_11[0];
var _13=_11[1];
var _14=parseInt((_12-_f)/2);
var top=getPageOffsetY()+parseInt(_13-_10)/2;
_e.style.left=_14+"px";
_e.style.top=top+"px";
_e.style.display="none";
}
function getPageOffsetY(){
var _16=0;
if(typeof pageYOffset!="undefined"){
_16=pageYOffset;
}else{
_16=document.documentElement.scrollTop;
}
return _16;
}
function for_each(_17,_18){
for(var i=0;i<_17.length;i++){
_18(_17[i]);
}
}
function showShadow(){
var _1a=$("pop_shadow");
if(!_1a){
_1a=document.createElement("div");
_1a.id="pop_shadow";
document.body.appendChild(_1a);
}
if(isIE()){
var _1b=document.getElementsByTagName("select");
for_each(_1b,function(_1c){
_1c.style.visibility="hidden";
});
}
_1a.style.position="absolute";
_1a.style.display="block";
_1a.style.opacity="0.3";
_1a.style.filter="alpha(opacity=30)";
_1a.style.background="#000";
_1a.style.zIndex="100";
var _1d=getViewportSize();
var _1e=_1d[0];
var _1f=getDocHeight();
var _20=document.body.scrollTop+document.documentElement.scrollTop;
_1a.style.top="0px";
_1a.style.left="0px";
_1a.style.width=_1e+"px";
_1a.style.height=(_1f+_20)+"px";
}
function hideShadow(){
var _21=$("pop_shadow");
if(_21){
_21.hide();
}
if(isIE()){
var _22=document.getElementsByTagName("select");
for_each(_22,function(_23){
_23.style.visibility="visible";
});
}
}
function show_loading(div){
if(LOADING_BAR_TIMER){
clearTimeout(LOADING_BAR_TIMER);
}
div=$(div);
var lb=$("tool_loadingbar");
if(div&&lb){
var top=getPos(div,"Top");
var _27=getPos(div,"Left");
var w=div.offsetWidth;
var h=div.offsetHeight;
w=Math.max(w,21);
h=Math.max(h,16);
h=Math.min(h,30);
Element.show("tool_loadingbar");
lb.style.top=(top-1)+"px";
lb.style.left=(_27-1)+"px";
lb.style.width=(w-21)+"px";
lb.style.height=(h-1)+"px";
Element.show("tool_loadingbar");
LOADING_BAR_TIMER=setTimeout(function(){
Element.hide("tool_loadingbar");
},30*1000);
}
}
function hide_loading(){
if(LOADING_BAR_TIMER){
clearTimeout(LOADING_BAR_TIMER);
}
var lb=$("tool_loadingbar");
if(lb){
Element.hide(lb);
}
}
function getPos(el,_2c){
el=$(el);
var _2d=0;
while(el!=null){
_2d+=el["offset"+_2c];
el=el.offsetParent;
}
return _2d;
}
function yobo_dom_ready(_2e){
__domReady(_2e);
}
function get_current_user(_2f){
try{
new Ajax.Request("/js/get_current_user",{asynchronous:true,evalScripts:true,onSuccess:function(_30){
var _31=_30.responseText;
}});
}
catch(e){
}
}
function __clear(_32){
clearTimeout(_32);
clearInterval(_32);
return null;
}
function __attach_event(evt,_34){
if(window.addEventListener){
window.addEventListener(evt,_34,false);
}else{
if(window.attachEvent){
window.attachEvent("on"+evt,_34);
}
}
}
function __domReady(f){
if(__domReady.done){
return f();
}
if(__domReady.timer){
__domReady.ready.push(f);
}else{
__attach_event("load",__isDOMReady);
__domReady.ready=[f];
__domReady.timer=setInterval(__isDOMReady,100);
}
}
function __isDOMReady(){
if(__domReady.done){
return false;
}
if(document&&document.getElementsByTagName&&document.getElementById&&document.body){
__clear(__domReady.timer);
__domReady.timer=null;
for(var i=0;i<__domReady.ready.length;i++){
__domReady.ready[i]();
}
__domReady.ready=null;
__domReady.done=true;
}
}
function updateCommentUserImg(_37){
$("comments_user_img").src=_37;
}
function stopDefaultAction(_38){
_38.returnValue=false;
if(typeof _38.preventDefault!="undefined"){
_38.preventDefault();
}
}
function hide_mainplayer(){
var blk=$("flashbar");
if(blk){
blk.style.visibility="hidden";
}
}
function show_mainplayer(){
var blk=$("flashbar");
if(blk){
blk.style.visibility="visible";
}
}
function closeClassicDlg(_3b){
var dom=$(_3b);
while(dom){
show_mainplayer();
if(dom.className=="yobo_floatdialog"){
dom.parentNode.style.display="none";
hideShadow();
break;
}
if(dom.parentNode){
dom=dom.parentNode;
}else{
break;
}
}
}
function submitBack(){
var _3d="\u4fe1\u606f\u63d0\u4ea4\u6210\u529f";
var _3e={title:"\u62a5\u544a\u9519\u8bef",li:[_3d],className:"success"};
show_printEdialog(_3e);
}
function song_error_submit(_3f){
show_loading(_3f);
setTimeout(function(){
submitBack();
$("song_error_dlg").style.display="none";
hide_loading();
},3000);
}
