');
parent.frames["data"].document.write(''+key+'
');
parent.frames["data"].document.write('mode: collapse
');
}
else if (((readCookie("netobjects_bbs_collapse_mode") == "no")|| (readCookie("netobjects_bbs_collapse_mode") == "")) && (key == "Thread")){
parent.frames["data"].document.write('');
parent.frames["data"].document.write(''+key+'
');
parent.frames["data"].document.write('mode: expand
');
}
else {
parent.frames["data"].document.write('');
parent.frames["data"].document.write(''+key+'
');
}
for(var j=0; j < lgth; j++){
//bug on Javascript for file:// portocol's, can't handle location.pathname correct
if (!((temp.data.father == "0") && (readCookie("netobjects_bbs_collapse_mode") == "yes") && (key == "Thread"))){
if (temp.data.father == "0" && key == "Thread"){
parent.frames["data"].document.write('');
}
if (location.pathname.lastIndexOf("index.html") == -1){
path = location.pathname;
}
else {
path = location.pathname.substring(0,location.pathname.lastIndexOf("index.html"));
}
parent.frames["data"].document.write("\n");
if (temp.data.subject != ""){
parent.frames["data"].document.write(""+temp.data.subject+"\n");
}
else {
parent.frames["data"].document.write("no subject\n");
}
parent.frames["data"].document.write("-"+temp.data.author+"-\n");
if (key == "Time"){
parent.frames["data"].document.write("
"+temp.data.realTime+"\n");
}
parent.frames["data"].document.write("\n\n");
if (temp.data.father == "0" && key == "Thread"){
parent.frames["data"].document.write("
");
}
else {
parent.frames["data"].document.write("
");
}
}
temp = temp.child;
}
parent.frames["data"].document.close();
}
function getParentSubject(searchId){
var current = bbsArray.child;
var previous = null;
var path = location.pathname.substring(0,location.pathname.lastIndexOf("index.html"));
for(var j=0; j< lgth; j++){
if(current.data.thread == searchId){
return current.data.subject;
}
previous = current;
current = current.child;
}
return "";
}
function returnNgbr(searchId,mode){
var current = bbsArray.child;
var previous = null;
for(var j=0; j < lgth; j++){
if(current.data.id == searchId){
if(mode == "Prev"){
if(previous != null){
return myPath + "message/"+previous.data.id+".html";
}
break;
} else if (mode == "Next"){
if(current.child != null){
return myPath + "message/"+current.child.data.id+".html";
}
break;
}
}
previous = current;
current = current.child;
}
return myPath+"message/"+searchId+".html";
}
function goNgbr(searchId,mode){
var current = bbsArray.child;
var previous = null;
var path = location.pathname.substring(0,location.pathname.lastIndexOf("index.html"));
for(var j=0; j < lgth; j++){
if(current.data.id == searchId){
if(mode == "Prev"){
if(previous != null){
parent.frames['message'].open(location.protocol+"//"+location.hostname+":"+location.port+path+"message/"+previous.data.id+".html","message");
}
break;
} else if (mode == "Next"){
if(current.child != null){
parent.frames['message'].open(location.protocol+"//"+location.hostname+path+"message/"+current.child.data.id+".html","message");
}
break;
}
}
previous = current;
current = current.child;
}
}
var bbsArray = new pbbsArray();
// -->