﻿function onlytitle(all_count){
    for(i=1;i<=all_count;i++){
        var obj_id = "A"+i;
        document.getElementById(obj_id).style.display='none';
    }
}
function allshow(all_count){
    for(i=1;i<=all_count;i++){
        var obj_id = "A"+i;
        document.getElementById(obj_id).style.display='block';
    }
}
/*
function pageshow(fir_num,last_num,all_count){
    for(i=1;i<=all_count;i++){
        if(i<fir_num||i>last_num){
            var obj_id = "P"+i;
            document.getElementById(obj_id).style.display='none';
        }
        for(n=fir_num;n<=last_num;n++){
            var obj_id2 = "P"+n;
            document.getElementById(obj_id2).style.display='block';
        }
    }
}
*/

function showtop5(page_count,all_count){
    for(i=all_count;i>=1;i--){
	    var obj_id = "P"+i;	
	    if(i>(all_count-page_count)){
		    document.getElementById(obj_id).style.display='block';
		}
	}
}
//function pageshow2(fir_num,last_num,all_count,link_num){
function pageshow2(fir_num,last_num,all_count){
    //alert(link_num);
    //var link = document.getElementById(link_num);
    //alert(link.href);
    //document.getElementById("link_num").style.fontWeight='bold'; 
    var from = (all_count+1)-fir_num;
    var to = from-(last_num-fir_num);
    for(i=all_count;i>=1;i--){
       if(i>from||i<to){
           var obj_id = "P"+i;
           document.getElementById(obj_id).style.display='none';
       }
    }
    for(n=from;n>=to;n--){
            var obj_id2 = "P"+n;
            document.getElementById(obj_id2).style.display='block';
    }
}


