<!--
var bV = parseInt(navigator.appVersion);
var NN4 = document.layers ? true : false;
var IE4 = document.all && bV >= 4 ? true : false;
var downloadID = 0;
var downloadHash = '';
var showClickprogress = 100;
var NowDown=0;

function showTip(msg)
{
 var obj = 'TipBox';
 if (showClickprogress < 100) return;

 if (typeof(hideTimeOut) != 'undefined') clearTimeout(hideTimeOut);
 if (NN4)
 {
 if (document.layers[obj].visibility != 'visible')
 {
 with (document[obj].document)
 {
 open();
 write('<layer id=TipBox bgColor=#ffffee style="width: 600px; border: 1px solid #000000" onMouseover="keepTip()" onMousewheel="keepTip()" onMouseout="hideTip()">' + msg + '</layer>');
 close();
 }
 var objp = document.layers.TipBox;
 objp.moveTo(100, e.y + 6);
 }
 document.layers[obj].visibility = 'visible';
 }
 else if(IE4)
 {
 if (document.all[obj].style.visibility != 'visible')
 {
 document.all[obj].innerHTML = msg;
 var x = event.x;
 var y = event.y;
 var objp = document.all.TipBox.style;
 //var yy = document.body.scrollTop + y + 6;
 objp.pixelLeft = x;
 objp.pixelTop =document.body.scrollTop + y-10;
 }
 document.all[obj].style.visibility = 'visible';
 }
}
function keepTip()
{
 var obj = 'TipBox';
 if (showClickprogress < 100) return;

 if (typeof(hideTimeOut) != 'undefined') clearTimeout(hideTimeOut);
 if (NN4)
 document.layers[obj].visibility = 'visible';
 else if(IE4)
 document.all[obj].style.visibility = 'visible';
}
function hideTip(){
 var obj = 'TipBox';

 moveFlag=false;
 if(NN4){
 if(document.layers[obj] != null) document.layers[obj].visibility = 'hidden';
 }else if(IE4)
 document.all[obj].style.visibility = 'hidden';
}

function setReload()
{
 window.location.reload();
}
function showDetail(info_hash)
{
 var url = info_hash == '' ? 'viewgraph.php' : 'detail.php?info_hash=' + info_hash;
 window.open(url, 'detailview', 'scrollbars=yes, width=500, height=300');
}
function GetTorrent()
{
 torrentdir = Math.floor(downloadID / 2000);
 document.location.href = downloadHash
 NowDown=0;
}
function displayClickAD()
{
 showClickprogress = 0;
 ClickADref = document.all.ClickAD;

 var scroll_top = document.body.scrollTop;
 var docwidth = document.body.clientWidth;
 var docheight = document.body.clientHeight;
 var ClickADwidth = ClickADref.offsetWidth;
 var ClickADheight = ClickADref.offsetHeight;
 ClickADref.style.left = docwidth / 2 - ClickADwidth / 2;
 ClickADref.style.top = scroll_top + docheight / 2 - ClickADheight / 2;

 ClickADscroll = setInterval('staticClickADbox()', 50);
 ProgressBar = setInterval('controlledhideClickAD()', 400);
 ClickADref.style.visibility = "visible";
}
function staticClickADbox()
{
 var scroll_top = document.body.scrollTop;
 var docheight = document.body.clientHeight;
 var ClickADheight = ClickADref.offsetHeight;
 ClickADref.style.top = scroll_top + docheight / 2 - ClickADheight / 2;
}
function hideClickADbox()
{
 ClickADref.style.visibility = 'hidden';
 if (typeof(ClickADscroll) != 'undefined') clearInterval(ClickADscroll);
 if (typeof(ProgressBar) != 'undefined') clearInterval(ProgressBar);
 document.all.Progress.innerHTML = '<table align=left><tr><td height=5></td></tr></table>';
 GetTorrent();
}
function controlledhideClickAD()
{
 showClickprogress += 50;
 document.all.Progress.innerHTML = '<table width=' + showClickprogress + ' align=left bgColor=green><tr><td height=5><div align=center>正在下载中…</div></td></tr></table>';
 if (showClickprogress > 400) hideClickADbox();
}
function DownLoad(id, hash)
{
if (NowDown==0){
 NowDown=1;
 downloadID = id;
 downloadHash = hash;
 hideTip();
 IE4 ? displayClickAD() : GetTorrent();
 }
}

-->