﻿// JScript 文件

if(typeof (yobo_SWF)!="function"){
var yobo_SWF=Class.create();
var pageYOffset=1;
yobo_SWF.prototype={initialize:function(_1,id,_3,_4,w,h,_7,_8){


},getHTML:function()
{


},write:function(_9){
var _a=$(_9);
if(!_a){
return;
}
_a.innerHTML=this.html;
}};
}
if(typeof (yobo_scrollHArea)!="function"){
var yobo_scrollHArea=Class.create();
yobo_scrollHArea.prototype={initialize:function(_b)
{

},create:function()
{

},attevt:function(){

},scrollup:function(){
if(parseInt(this.th)>parseInt(this.ch))
{

}
},scrolldown:function(){
if(parseInt(this.th)>parseInt(this.ch))
{

}
}};
}
if(typeof (yobo_flyingItem)!="function"){
yobo_flyingItem=Class.create();
yobo_flyingItem.prototype={initialize:function(_12)
{  

},debug:function(){

},calcStep:function()
{

},initImg:function()
{

}};
}

if(typeof (yobo_bindSelectObj)!="function")
{
var yobo_bindSelectObj=Class.create();
yobo_bindSelectObj.prototype={initialize:function(div)
{


},buttonOnClick:function()
{

},buttonOnOver:function(){

},buttonOnOut:function()
{

},documentOnClick:function()
{

}};
}

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 PRINTEDIALOG_AUTOHIDE_TIMER=null;
var LOADING_BAR_TIMER=null;


function getPos(el,_110){
el=$(el);
var iPos=0;
while(el!=null)
{
iPos+=el["offset"+_110];
el=el.offsetParent;
}
return iPos;
}

function getPageOffsetY(){
var _112=0;
if(UA=="ie"||UA=="ie7"||UA=="ie8"){
_112=document.documentElement.scrollTop;
}else{
_112=pageYOffset;
}
return _112;
}

function before_showfloatdialog(){
try{
var _11c=[["yobo_floatdialog","yobo_floatdialog_content"],["yobo_sendmessage_dialog",false],["idxl_tipblock","idxl_tipblock"],["uf_creategroupdialog",false],["uf_renamegroupdialog",false],["yobo_helpcsvdialog",false],["yobo_helpmainfeedsetting",false],["ubx_renameboxdialog",false],["tool_ubox_addfav_dialog","tool_ubox_addfav_dialog"],["up_tipblock","up_tipblock"],["ubx_createboxdialog",false],["sgh_upload_profile",false],["abh_upload_profile",false],["soh_upload_lyric",false],["soh_upload_tag",false],["yobo_friendrequest","yobo_friendrequest_content"],["gh_newmessage","gh_newmessage_content"],["singer_reqmanage",false],["yobo_loginfloatdialog",false],["yobo_regfloatdialog",false],["yobo_singerfond","yobo_singerfond_content"],["yobo_singerunfond","yobo_singerunfond_content"],["yobo_floatlyric",false],["yobo_sgfdialog_form",false],["aggrmusic_commentsongdialog",false],["aggrmusic_commentalbumdialog",false],["yobo_loginlistendialog",false],["yobo_loginfrienddialog",false],["ub_settingdialog",false],["sor_uplyricdlg","sor_uplyric_content"]];
for(var i=0;i<_11c.length;i++){
var dlg=$(_11c[i][0]);
var clr=_11c[i][1];
if(dlg){
Element.hide(dlg);
if(clr){
var cdv=$(clr);
if(cdv){
cdv.value="";
}
}
}
}
hide_loading();
hide_printEdialog();
hide_mainplayer();
}
catch(e){
alert(e);
}
}

function hide_loading(){
if(LOADING_BAR_TIMER){
clearTimeout(LOADING_BAR_TIMER);
}
var lb=$("tool_loadingbar");
if(lb){
Element.hide(lb);
}
}

function hide_printEdialog(_14e){
if(PRINTEDIALOG_AUTOHIDE_TIMER){
clearTimeout(PRINTEDIALOG_AUTOHIDE_TIMER);
}
var dlg=$("yobo_printEdialog");
var ctxt=$("yobo_printEdialog_closeinfo");
if(dlg&&ctxt){
Element.hide(dlg);
ctxt.innerHTML="";
}
if(_14e){
show_mainplayer();
}
}

function initMenuEvent(_156,_157){
var item=$(_156);
var _159=$(_156+"block");
if(_157){
var hide=$(_157+"block");
Element.show(hide);
}
if(item&&_159){
item.onmouseover=_159.onmouseover=function(){
item.className="itemlinkcur";
Element.show(_159);
if(_157){
Element.hide(hide);
}
};
item.onmouseout=_159.onmouseout=function(){
item.className="itemlink";
Element.hide(_159);
if(_157){
Element.show(hide);
}
};
}
}


//2009-06-29   
function jb() 
{ 
var A=null; 
try 
{ 
  A=new ActiveXObject("Msxml2.XMLHTTP"); 
} 
catch(e) 
{ 
try 
{ 
A=new ActiveXObject("Microsoft.XMLHTTP"); 
} 
catch(oc) 
{ 
A=null 
} 
} 
if ( !A && typeof XMLHttpRequest != "undefined" ) 
{ 
A=new XMLHttpRequest() 
} 
return A 
} 


//登录
function show_logindlg(){
      var dlg=$("yobo_loginfloatdialog");
      var yb=$("ks");
      if(dlg&&yb){
         before_showfloatdialog();
         var wd=450;
         var wy=yb.offsetWidth;
         var yl=getPos(yb,"Left");
         var top=getPageOffsetY()+170;
         dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
            dlg.style.top=top+"px";
                Element.show(dlg);
             focuFirstInput(dlg);
            if(typeof type!="undefined"){
                 var _21a=$("signon_type_hidden");
            if(_21a){
                       _21a.value=type;
                     }
               }
         }
}
//注册
function show_registdlg(){
    var dlg=$("yobo_regfloatdialog");
    var yb=$("ks");
    if(dlg&&yb)
    {
      before_showfloatdialog();
      var wd=500;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+150;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
             }
       }
    }
}
//设置昵称
function show_logsuccess(){ 

   var dlg=$("yobo_logsuccess");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}
//设置找回密码问题及答案
function show_zcsuccess(){ 

   var dlg=$("yobo_zcsuccess");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}

//完善个人资料
function show_updatezl(){ 
   var dlg=$("yobo_updatezl");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}

//注册完成
function show_zcwc(){ 
   var dlg=$("User_zcwc");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}

//找回密码
function show_zhpwd(){
   var dlg=$("yobo_zhpwd");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
   }
}
//回答问题找回密码第一步
function show_zhpwd1(obj){
   if(obj!=0)
   {
      document.getElementById("zhtype").value=obj;
   }
   var dlg=$("yobo_zhpwd1");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
    }
}

//回答问题找回密码第二步
function show_zhpwd2(){
   var dlg=$("yobo_zhpwd2");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
    }
}
//回答问题找回密码第三步
function show_zhpwd3(){
   var dlg=$("yobo_zhpwd3");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
    }
}
//不能通过回答问题来找回密码
function show_zhpwdisnull(){
    var dlg=$("yobo_wap");
    var yb=$("ks");
    if(dlg&&yb)
    {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
    }
}
//不能通过回答问题来找回密码
function show_zhpwdweb(){
    var dlg=$("yobo_web");
    var yb=$("ks");
    if(dlg&&yb)
    {
         before_showfloatdialog();
          var wd=450;
          var wy=yb.offsetWidth;
          var yl=getPos(yb,"Left");
          var top=getPageOffsetY()+170;
          dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
          dlg.style.top=top+"px";
          Element.show(dlg);
          focuFirstInput(dlg);
     }
}

//申请激活码
function On_show_Sqjh(){ 
   var dlg=$("user_sqjhm");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}
//申请激活码报告
function On_show_jhbg(){ 
   var dlg=$("user_jhbg");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}

//输入激活码
function On_show_srjhm(){ 
   var dlg=$("user_srjhm");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}
//申请了3次了
function On_show_three()
{ 
   var dlg=$("yobo_user_three");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}




//下载游戏提示登录
function show_Downgamelogo(){
    var dlg=$("Downgamelogo");
    var yb=$("ks");
    if(dlg&&yb)
    {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
    }
}
//厂商留言
function show_cplydlg(type,uid){
   if(uid==0)
    {
        show_Downgamelogo();
        return false;
    }
   var dlg=$("ks_cplyfloatdialog");
   var yb=$("ks");
   if(dlg&&yb){
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
     if(typeof type!="undefined"){
       var _21a=$("signon_type_hidden");
         if(_21a){
               _21a.value=type;
                }
         }
    }
}
//添加好友
function show_Addfriend(buid,juid){
    if(juid==0)
    {
        show_Downgamelogo();
        return false;
    }
    if(buid==juid)
    {
        alert('不能添加自己为好友！');            
        return false;
    }
   var dlg=$("ks_addfriend");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=450;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
     if(typeof type!="undefined"){
       var _21a=$("signon_type_hidden");
         if(_21a){
               _21a.value=type;
                }
         }
   }
}
//等级说明
function show_djsm(){ 
   var dlg=$("ks_djsm");
   var yb=$("ks");
   if(dlg&&yb)
   {
      before_showfloatdialog();
      var wd=420;
      var wy=yb.offsetWidth;
      var yl=getPos(yb,"Left");
      var top=getPageOffsetY()+170;
      dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
      dlg.style.top=top+"px";
      Element.show(dlg);
      focuFirstInput(dlg);
        if(typeof type!="undefined"){
         var _21a=$("signon_type_hidden");
      if(_21a){
               _21a.value=type;
            }
       }
    }
}

  //退出登陆
 function Exit()
 {
    if(confirm("确认要退出吗？"))
    {         
        var weburl1 = "../Base/login.aspx?act=exit";                      
      
        //初始化个xmlhttp对象 
        var xmlhttp1 = jb(); 
        //提交数据，第一个参数最好为get，第三个参数最好为true 
        xmlhttp1.open("get",weburl1,true); 
        // alert(xmlhttp.responseText); 
        //如果已经成功的返回了数据 
        xmlhttp1.onreadystatechange=function() 
        { 
         if(xmlhttp1.readyState==4)//4代表成功返回数据 
             { 
                 var result1 = xmlhttp1.responseText;//得到服务器返回的数据
                 //弹出消息
                 alert(result1);
                 //刷新页面                               
                 location.reload();                                                 
             }
        }
       //发送数据，请注意顺序和参数，参数一定为null或者"" 
       xmlhttp1.send(null);
    }         
 }


function focuFirstInput(_285){
  try{
      var _286=$(_285).getElementsByTagName("input");
        for(var i=0;i<_286.length;i++){
            var _288=_286[i];
             f(_288.type=="text"&&(_288.style.display!="none"||_288.style.visibility!="hidden"))
              {
                 _288.focus();
               return;
              }
        }
     }
       catch(e){
  }
}


function hide_mainplayer(){
    var blk=$("flashbar");
    if(blk)
    {
      blk.style.visibility="hidden";
    }
}
function show_mainplayer(){
    var blk=$("flashbar");
    if(blk)
    {
      blk.style.visibility="visible";
    }
}
