var table_array = new Array();
table_array[0] = '';
table_array[1] = '';
var group_array = new Array();
function buildToggle(no,btnType){
var middle_str;
var moreStr0 = 'more';
var backStr0 = 'back';
if (btnType == "more"){
middle_str = ''+moreStr0+no+moreStr1+'';
} else if (btnType == "back"){
middle_str = ''+backStr0+no+backStr1+'';
}
return middle_str;
}
function doMore (no){
var o = eval("group_"+no);
var str;
o.innerHTML = buildArea(no,"back");
}
function doBack (no){
var o = eval("group_"+no);
var str;
o.innerHTML = buildArea(no,"more");
}
function buildArea(no,btnType){
var tmpStr = "";
var j,o;
o = group_array[no];
tmpStr += table_array[0];
for (j = 0 ; j < o.length; j++) {
if (o[j].type == "link"){
var out_description = o[j].description.replace(/\"/g, '"');
tmpStr+=''+o[j].title+'';
} else if (o[j].type == "label"){
tmpStr+=o[j].title;
}
if (j>=5 && btnType=="more"){
break;
}
}
if (o.length>5){
tmpStr+=buildToggle(no,btnType);
}
tmpStr+=table_array[1];
return tmpStr;
}
function link_init(){
var str = "";
var i,j;
var total = myLink.length;
var tmp_array,tmp_type = "";
var o,tmpStr;
//先分出組數 每組要做成一個table
for(i = 0 ; i 0){
group_array.push(tmp_array);
}
for (i = 0 ; i < group_array.length ; i++) {
o = group_array[i];
tmpStr = '';
tmpStr += buildArea(i,"more");
tmpStr += '';
str+=tmpStr;
}