

//专辑图片自动缩略
var flag=false;  
function DrawImage(ImgD){  
   var image=new Image();  
   image.src=ImgD.src;  
   if(image.width>0 && image.height>0){  
    flag=true;  
    if(image.width/image.height>=200/200){  
     if(image.width>200){    
     ImgD.width=200;  
     ImgD.height=(image.height*200)/image.width;  
     }else{  
     ImgD.width=image.width;    
     ImgD.height=image.height;  
     }  
     }  
    else{  
     if(image.height>200){    
     ImgD.height=200;  
     ImgD.width=(image.width*200)/image.height;       
     }else{  
     ImgD.width=image.width;    
     ImgD.height=image.height;  
     }  
     }  
    }  
   }   

//歌手专辑列表图片自动缩略
var flag=false;  
function Albumlistpic(ImgD){  
   var image=new Image();  
   image.src=ImgD.src;  
   if(image.width>0 && image.height>0){  
    flag=true;  
    if(image.width/image.height>=74/74){  
     if(image.width>74){    
     ImgD.width=74;  
     ImgD.height=(image.height*74)/image.width;  
     }else{  
     ImgD.width=image.width;    
     ImgD.height=image.height;  
     }  
     }  
    else{  
     if(image.height>74){    
     ImgD.height=74;  
     ImgD.width=(image.width*74)/image.height;       
     }else{  
     ImgD.width=image.width;    
     ImgD.height=image.height;  
     }  
     }  
    }  
   }  
function playit(id)
{
window.open('?mod=play&urlid='+id,'showmov','scrollbars=no,resizable=no,width=444,height=418,left=200,top=10');
}

function list()
{
window.open("about:blank","RainWeiList","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=320,height=300,left=200,top=120");
}
function CheckOthers(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
//		if (e.name != 'chkall')
			if (e.checked==false)
			{
				e.checked = true;// form.chkall.checked;
			}
			else
			{
				e.checked = false;
			}
	}
}

function CheckAll(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
//		if (e.name != 'chkall')
			e.checked = true// form.chkall.checked;
	}
}


 //关于鼠标事件的图片隐出

function showtip(text)  //显示链接的说明
{
	if (document.all&&document.readyState=="complete")//针对IE
	{
		 //显示跑马灯,内容就是提示框的内容
		document.all.tooltip.innerHTML="<div vAlign=center><font SIZE=2>"+text+"</font></div>";
		document.all.tooltip.style.pixelLeft=event.clientX+document.body.scrollLeft+2;
		document.all.tooltip.style.pixelTop=event.clientY+document.body.scrollTop+5;
//		document.all.tooltip.style.pixelLeft=event.clientX+5;
//		document.all.tooltip.style.pixelTop=event.clientY+5;
		 if (event.clientX>800)
		{
			//document.all.tooltip.style.pixelLeft=680;
			//document.all.tooltip.style.pixelTop=event.clientY+document.body.scrollTop+5;
		}
			//document.all.tooltip.style.visibility="visible";
	}
			document.all.tooltip.style.visibility="visible";
}

document.write("<div id=\"tooltip\" style=\"position:absolute;visibility:hidden; padding:1px;border:1px solid #C0C0C0;background-color:#000000; height: 19px; left:77;top: 96px;z-index:10;\"></div>");

function hidetip()  //隐藏链接的说明
{
	if (document.all)
	document.all.tooltip.style.visibility="hidden";
}


 //页面载入缓冲说明
function loadBar(fl)
//fl is show/hide flag
{
  var x,y;
  if (self.innerHeight)
  {// all except Explorer
    x = self.innerWidth;
    y = self.innerHeight;
  }
  else 
  if (document.documentElement && document.documentElement.clientHeight)
  {// Explorer 6 Strict Mode
   x = document.documentElement.clientWidth;
   y = document.documentElement.clientHeight;
  }
  else
  if (document.body)
  {// other Explorers
   x = document.body.clientWidth;
   y = document.body.clientHeight;
  }

    var el=document.getElementById('loader');
        if(null!=el)
        {
                var top = (y/2) - 50;
                var left = (x/2) - 150;
                if( left<=0 ) left = 10;
                el.style.visibility = (fl==1)?'visible':'hidden';
                el.style.display = (fl==1)?'block':'none';
                el.style.left = left + "px"
                el.style.top = top + "px";
                el.style.zIndex = 2;
        }
}