function $(id){return document.getElementById(id);}
var log;
function ShowDown(MusicName){
  log='<iframe src="/down.aspx?MusicName='+MusicName+'&downurl='+Music_url+'" width=300 height=150 frameborder=0 scrolling=no></iframe>';
  showDiv1(log,185,150);
}
function CloseDiv(){
   var my_tips=$("mytips");
   var lgbox=$("lgbox2");
   my_tips.style.display="none";
   lgbox.style.display="none";
}

function SearchDown(MusicName){
  log='<iframe src="/down.aspx?MusicName='+MusicName+'" width=300 height=150 frameborder=0 scrolling=no></iframe>';
  showDiv(log,125,200);
}

function UserLogin(){
  log='<iframe src="UserLogin.aspx" width=300 height=250 frameborder=0 scrolling=no></iframe>';
  showDiv(log,175,200);
}

function box(MusicId){
  log='<iframe src="/user/Mybox.aspx?MusicId='+MusicId+'" width=0 height=0 frameborder=0 scrolling=no></iframe>';
  showDiv1(log,185,150);
}

function UserLogin1(){
  log='<iframe src="/user/UserLogin.aspx" width=300 height=250 frameborder=0 scrolling=no></iframe>';
  var lgbox=$("lgbox2");
  lgbox.innerHTML=log;
}
function ChangeInfo(){
  log='<iframe src="ChangeInfo.aspx" width=300 height=260 frameborder=0 scrolling=no></iframe>';
  showDiv(log,180,200);
}

function exit(){
  log='<iframe src="/user/exit.aspx" width=0 height=0 frameborder=0 scrolling=no></iframe>';
  showDiv1(log,185,150);
}
function showDiv(log, leftw, toph){
  var my_tips=$("mytips");
  var lgbox=$("lgbox2");
  my_tips.style.display="";
  lgbox.style.display="";
  lgbox.innerHTML=log;
  lgbox.style.left=screen.width/2-leftw +"px";
  lgbox.style.top=screen.height/2-toph + document.documentElement.scrollTop +"px";
  my_tips.style.left=0;
  my_tips.style.top=0;
  if( document.body.scrollHeight < screen.height)
     my_tips.style.height = screen.height - 200 +"px";
  else
     my_tips.style.height=document.body.scrollHeight +"px";

}
function showDiv1(log, leftw, toph){
  var my_tips=$("mytips");
  var lgbox=$("lgbox2");
  my_tips.style.display="";
  lgbox.style.display="";
  lgbox.innerHTML=log;
  lgbox.style.left=leftw +"px";
  lgbox.style.top=toph +"px";
  my_tips.style.left=0;
  my_tips.style.top=0;
  if( document.body.scrollHeight < screen.height)
     my_tips.style.height = screen.height+"px";
  else
     my_tips.style.height=document.body.scrollHeight +"px";
}
