/* Programmer Ng Hun Yang. Apr 2002 Revision history 10 Apr 2002 nhy First written 22 Jun 2002 nhy Moved individual pic funcs to PAEPic.txt 22 Jun 2002 nhy Moved thumbnail funcs to PAEThumb.txt 4 Sep 2002 nhy Put parameters in url */ var ThumbPicsPerRow = 3; function disp_cell(d, item, pic_list_name, idx) { var ruar = item[0]; var name = item[1]; var caption = item[2]; var pic_pw = pic_pw_ref_list[ruar & 0x3f]; var usr_color; if((ruar & gbl_ruar_mask) == 0) usr_color = uar_ref_list[gbl_user_level][3]; else usr_color = uar_ref_list[gbl_user_level][4]; d.write(""); d.write("
"); // show thumbnail if, // 1. user has pw (pic_pw != "") // 2. ruar says thumbnail is unprotected ((urar & gbl_no_pic_tn) == 0) if(pic_pw != "" || (ruar & gbl_no_pic_tn) == 0) { // link if, // 1. user has pw (pic_pw != "") // 2. ruar says pic is unprotected ((urar & gbl_no_pic) == 0) if(pic_pw != "" || (ruar & gbl_no_pic) == 0) { d.write(""); } var pic_name = name + "tn"; if((ruar & gbl_no_pic_tn) != 0) pic_name = pic_name + "-" + pic_pw; d.write(""); if(pic_pw != "" || (ruar & gbl_no_pic) == 0) d.write(""); if(caption != "") d.write("
" + caption); } else { d.write("No rights
to view
this image"); } d.write("
"); d.writeln(""); } function disp_tbl(d, full_pic_list) { //alert("w: " + w + ". w.name: " + w.name + ". w.type: " + (typeof w)); var title = full_pic_list[0]; var pic_list_name = full_pic_list[1]; var pic_list = eval(pic_list_name); d.writeln("" + title + "

"); d.writeln(""); for(var idx = 0; idx < pic_list.length; ) { d.writeln(""); for(var i = 0; i < ThumbPicsPerRow && idx < pic_list.length; ++i, ++idx) { disp_cell(d, pic_list[idx], pic_list_name, idx); } d.writeln(""); } d.writeln("
"); d.writeln("

"); d.writeln("


"); d.writeln("
-- end of page --
"); }