add:  function show_emailmenu() { var cur=1; /* There's nothing dynamic, so we can fiddle this here */ var emailmenu=new Emailmenu(); /* For consistency */ emailmenu.current=cur;  while(!done) { var i; var j; var ret;  /* Nothing dynamic, so we don't need to save/restore nodraw */  ret=emailmenu.getval(); if(ret==KEY_RIGHT) { if(emailmenu.items[emailmenu.current].text.substr(-2,2)==' >') ret=emailmenu.items[emailmenu.current].retval; } email: switch(ret) { case KEY_LEFT: cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true); main_left(); return; case '\b': case '\x7f': case '\x1b': cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true); return; case KEY_RIGHT: cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true); main_right(); return; case 'S': var typemenu=new Lightbar; var width=30; typemenu.xpos=emailmenu.xpos+emailmenu.items[0].text.length; typemenu.ypos=emailmenu.current+1; typemenu.lpadding="\xb3"; typemenu.rpadding="\xb3"; typemenu.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; typemenu.add(top_bar(width),undefined,undefined,"",""); typemenu.add('To |Sysop','S',width,undefined,undefined,user.compare_ars("REST S")); typemenu.add('To |Local User','L',width,undefined,undefined,user.compare_ars("REST E")); typemenu.add('To Local User with |Attachment','A',width,undefined,undefined,user.compare_ars("REST E")); typemenu.add('To |Remote User','R',width,undefined,undefined,user.compare_ars("REST E OR REST M")); typemenu.add('To Remote User with A|ttachment','T',width,undefined,undefined,user.compare_ars("REST E OR REST M")); typemenu.add(bottom_bar(width),undefined,undefined,"",""); while(1) { switch(typemenu.getval()) { case 'S': clear_screen(); bbs.email(1,WM_EMAIL,bbs.text(ReFeedback)); draw_main(true); break; case 'L': clear_screen(); console.putmsg("\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w"); str=console.getstr("",40,K_UPRLWR); if(str!=null && str!="") { if(str=="Sysop") str="1"; if(str.search(/\@/)!=-1) bbs.netmail(str); else { i=bbs.finduser(str); if(i>0) bbs.email(i,WM_EMAIL); } } draw_main(true); break; case 'A': clear_screen(); console.putmsg("\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w"); str=console.getstr("",40,K_UPRLWR); if(str!=null && str!="") { i=bbs.finduser(str); if(i>0) bbs.email(i,WM_EMAIL|WM_FILE); } draw_main(true); break; case 'R': clear_screen(); if(console.noyes("\r\nAttach a file")) i=0; else i=WM_FILE; console.putmsg(bbs.text(EnterNetMailAddress),P_SAVEATR); str=console.getstr("",60,K_LINE); if(str!=null && str !="") bbs.netmail(str,i); draw_main(true); break; case 'T': clear_screen(); console.putmsg("\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w"); str=console.getstr("",40,K_UPRLWR); if(str!=null && str!="") bbs.netmail(str,WM_FILE); draw_main(true); break; case KEY_RIGHT: cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true); cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true); main_right(); return; default: cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true); emailmenu.nodraw=true; break email; } } break; case 'R': clear_screen(); bbs.read_mail(MAIL_YOUR); console.pause(); draw_main(true); break; case 'M': clear_screen(); bbs.read_mail(MAIL_SENT); console.pause(); draw_main(true); break; } cur=emailmenu.current; } }  function show_chatmenu() { var cur=1; /* There's nothing dynamic, so we can fiddle this here */ var chatmenu=new Chatmenu(); /* For consistency */ chatmenu.current=cur;  while(!done) { var i; var j; var ret;  /* Nothing dynamic, so we don't need to save/restore nodraw */  ret=chatmenu.getval(); if(ret==KEY_RIGHT) { if(chatmenu.items[chatmenu.current].text.substr(-2,2)==' >') ret=chatmenu.items[chatmenu.current].retval; } chat: switch(ret) { case KEY_LEFT: cleararea(chatmenu.xpos,chatmenu.ypos,chatmenu.items[0].text.length,chatmenu.items.length,true); main_left(); return; case '\b': case '\x7f': case '\x1b': cleararea(chatmenu.xpos,chatmenu.ypos,chatmenu.items[0].text.length,chatmenu.items.length,true); return; case KEY_RIGHT: cleararea(chatmenu.xpos,chatmenu.ypos,chatmenu.items[0].text.length,chatmenu.items.length,true); main_right(); return; case 'J': clear_screen(); bbs.multinode_chat(); draw_main(true); break; case 'P': clear_screen(); bbs.private_chat(); draw_main(true); break; case 'C': clear_screen(); if(!bbs.page_sysop()) bbs.page_guru(); draw_main(true); break; case 'T': clear_screen(); bbs.page_guru(); draw_main(true); break; case 'F': clear_screen(); bbs.exec("?finger"); console.pause(); draw_main(true); break; case 'R': clear_screen(); write("\001n\001y\001hServer and channel: "); str="irc.synchro.net 6667 #Synchronet"; str=console.getstr(str, 50, K_EDIT|K_LINE|K_AUTODEL); if(!console.aborted) bbs.exec("?irc -a "+str); draw_main(true); break; case 'M': clear_screen(); bbs.exec("?sbbsimsg"); draw_main(true); break; case 'S': while(1) { var typemenu=new Lightbar; var width=24; if(user.chat_settings&CHAT_SPLITP) width++; typemenu.xpos=chatmenu.xpos+chatmenu.items[0].text.length; typemenu.ypos=chatmenu.current+1; typemenu.lpadding="\xb3"; typemenu.rpadding="\xb3"; typemenu.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; typemenu.add(top_bar(width),undefined,undefined,"",""); typemenu.add("Set |Split Screen Chat "+(user.chat_settings&CHAT_SPLITP?"Off":"On"),'S',width); typemenu.add("Set A|vailability "+(user.chat_settings&CHAT_NOPAGE?"On":"Off"),'V',width); typemenu.add("Set Activity |Alerts "+(user.chat_settings&CHAT_NOACT?"On":"Off"),'A',width); typemenu.add(bottom_bar(width),undefined,undefined,"",""); switch(typemenu.getval()) { case 'S': if(user.chat_settings&CHAT_SPLITP) cleararea(typemenu.xpos+typemenu.items[0].text.length-1,typemenu.ypos,1,typemenu.items.length,true); user.chat_settings ^= CHAT_SPLITP; break; case 'V': user.chat_settings ^= CHAT_NOPAGE; break; case 'A': user.chat_settings ^= CHAT_NOACT; break; case KEY_RIGHT: cleararea(chatmenu.xpos,chatmenu.ypos,chatmenu.items[0].text.length,chatmenu.items.length,true); cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true); main_right(); return; default: cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true); chatmenu.nodraw=true; break chat; } } break; } cur=chatmenu.current; } }  function show_settingsmenu() { var settingsmenu=new Settingsmenu(); while(1) { switch(settingsmenu.getval()) { case 'U': clear_screen(); var oldshell=user.command_shell; bbs.user_config(); /* Still using this shell? */ if(user.command_shell != oldshell) exit(0); draw_main(true); break; case 'B': clear_screen(); bbs.time_bank(); draw_main(true); break; case KEY_RIGHT: cleararea(settingsmenu.xpos,settingsmenu.ypos,settingsmenu.items[0].text.length,settingsmenu.items.length,true); main_right(); return; case KEY_LEFT: cleararea(settingsmenu.xpos,settingsmenu.ypos,settingsmenu.items[0].text.length,settingsmenu.items.length,true); main_left(); return; case '\b': case '\x7f': case '\x1b': cleararea(settingsmenu.xpos,settingsmenu.ypos,settingsmenu.items[0].text.length,settingsmenu.items.length,true); return; } } }  function cleararea(xpos,ypos,width,height,eol_allowed) { /* * This function "clears" an area of the screen to the * background. * eol_allowed indicates that you can clear to eol without * breaking anything. */ var x; var y;  if(use_bg) { if(ypos==1) { console.gotoxy(1,1); console.attributes=0x17; console.cleartoeol(); mainbar.draw(); ypos++; height--; } if(height-(ypos-2)>BackGround.height) { BackGround.draw(xpos,ypos,width,BackGround.height-(ypos-2),xpos-1,ypos-2); for(y=ypos+(BackGround.height-(ypos-2));y<=console.screen_rows;y++) { console.gotoxy(1,y); console.attributes=LBShell_Attr; console.cleartoeol(); } } else BackGround.draw(xpos,ypos,width,height,xpos-1,ypos-2); return; } for(y=ypos; y<ypos+height; y++) { if(eol_allowed) { if(y==1) { console.gotoxy(1,1); console.attributes=0x17; console.cleartoeol(); mainbar.draw(); } else if(y<console.screen_rows-8) { console.gotoxy(xpos,y); console.attributes=LBShell_Attr; console.cleartoeol(); } else { console.gotoxy(1,y); switch(y) { case console.screen_rows-8: console.attributes=LBShell_Attr; console.putmsg("\x01n \x01n\x01h\xdc\xdc\xdc\xdc \xdb \xdc\xdc  \xdc\xdc\xde\xdb \xdc \xdc\xdc\xdc\xdc \xdc\xdc \xdc\xdc  \xdc\xdc\xdc\xdc\xdc\xdc\xdc \x01n\x01b\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc "); break; case console.screen_rows-7: console.attributes=LBShell_Attr; console.putmsg("\x01h\x01c\x016\xdf\x01n\x01c\xdc\xdc \x01h\x016\xdf\x01n \x01h\x016\xdf\x01n \x01n\x01c\xdc \x01h\x016\xdf\x01n \x01h\x016\xdf\x01n \x01c\xdc\x01h\x016\xdf\x01n\x01c\xdc\x01h\x016\xdf\x01n\x01c\xdc\xdc\xdc\x01h\xdf \x016\xdf\x01n \x01h\x016\xdf\x01n \x01c\xdc \x01h\x016\xdf\x01n \x01h\x016\xdf\x01n\x01c\xdc\xdc \xdc\x01bgj \xdb\x01w\x014@TIME-L@ @DATE@  \x01y\x01h@BOARDNAME-L19@ \x01n "); break; case console.screen_rows-6: console.attributes=LBShell_Attr; console.putmsg("\x01n  \x01b\x01h\x014\xdf\x01n\x01b\xdd\x01h\xdf\x014\xdf\x010\xdf \x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010  \x014\xdf\x010 \x014\xdf\x01n\x01b\xdd\x01h\x014\xdf\x010 \x014\xdf\x01n\x01b\xdd\x01h\x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010   \x014\xdf\x010   \x014\x01n\x01b\xdb\x01h\x01w\x014Last On\x01k: \x01n\x014@LASTDATEON@  \x01h\x01cNode \x01k\x01n\x01c\x014@NODE-L3@ \x01wUp \x01c@UPTIME-L8@\x01n "); break; case console.screen_rows-5: console.attributes=LBShell_Attr; console.putmsg("\x01n\x01b \xdf\xdf  \xdf  \xdf \xdb\xdd\xdf\xdf\xdf\xdf \xdb\xdd  \xdb\xdb\xdf\xdf  \xdf \xdb\xdd\xdf\xdf\xdf \xdf   \xdb\x014\x01h\x01wFirstOn\x01k:\x01n\x014 @SINCE@  \x01h\x01cCalls\x01n\x01c\x014@SERVED-R4@ \x01wof\x01c @TCALLS-L7@\x01n "); break; case console.screen_rows-4: console.attributes=LBShell_Attr; console.putmsg("\x01n                                       \x01b\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf "); break; case console.screen_rows-3: console.attributes=7; console.cleartoeol(); console.putmsg(" \x01n\x01c[\x01h@GN@\x01n\x01c] @GRP@ [\x01h@SN@\x01n\x01c] @SUB@\x01n\r\n"); break; case console.screen_rows-2: console.attributes=7; console.cleartoeol(); console.putmsg(" \x01n\x01c(\x01h@LN@\x01n\x01c) @LIB@ (\x01h@DN@\x01n\x01c) @DIR@\x01n\r\n"); break; case console.screen_rows-1: console.attributes=LBShell_Attr; console.cleartoeol(); break; case console.screen_rows: console.attributes=LBShell_Attr; console.cleartoeol(); break; } } } else { /* Not allowed to clear to eol... */ /* * Right now, we're ***assuming*** that second-level menus are * never touching the bottom stuff. */ if(y==1) { console.gotoxy(1,1); console.attributes=0x17; console.cleartoeol(); mainbar.draw(); } else if(y<console.screen_rows-8) { console.attributes=LBShell_Attr; console.gotoxy(xpos,y); for(x=xpos; x<xpos+width; x++) console.write(' '); } else { console.gotoxy(1,y); switch(y) { case console.screen_rows-8: console.attributes=LBShell_Attr; console.putmsg("\x01n \x01n\x01h\xdc\xdc\xdc\xdc \xdb \xdc\xdc  \xdc\xdc\xde\xdb \xdc \xdc\xdc\xdc\xdc \xdc\xdc \xdc\xdc  \xdc\xdc\xdc\xdc\xdc\xdc\xdc \x01n\x01b\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc\xdc "); break; case console.screen_rows-7: console.attributes=LBShell_Attr; console.putmsg("\x01h\x01c\x016\xdf\x01n\x01c\xdc\xdc \x01h\x016\xdf\x01n \x01h\x016\xdf\x01n \x01n\x01c\xdc \x01h\x016\xdf\x01n \x01h\x016\xdf\x01n \x01c\xdc\x01h\x016\xdf\x01n\x01c\xdc\x01h\x016\xdf\x01n\x01c\xdc\xdc\xdc\x01h\xdf \x016\xdf\x01n \x01h\x016\xdf\x01n \x01c\xdc \x01h\x016\xdf\x01n \x01h\x016\xdf\x01n\x01c\xdc\xdc \xdc\x01bgj \xdb\x01w\x014@TIME-L@ @DATE@  \x01y\x01h@BOARDNAME-L19@ \x01n "); break; case console.screen_rows-6: console.attributes=LBShell_Attr; console.putmsg("\x01n  \x01b\x01h\x014\xdf\x01n\x01b\xdd\x01h\xdf\x014\xdf\x010\xdf \x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010  \x014\xdf\x010 \x014\xdf\x01n\x01b\xdd\x01h\x014\xdf\x010 \x014\xdf\x01n\x01b\xdd\x01h\x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010 \x014\xdf\x010   \x014\xdf\x010   \x014\x01n\x01b\xdb\x01h\x01w\x014Last On\x01k: \x01n\x014@LASTDATEON@  \x01h\x01cNode \x01k\x01n\x01c\x014@NODE-L3@ \x01wUp \x01c@UPTIME-L8@\x01n "); break; case console.screen_rows-5: console.attributes=LBShell_Attr; console.putmsg("\x01n\x01b \xdf\xdf  \xdf  \xdf \xdb\xdd\xdf\xdf\xdf\xdf \xdb\xdd  \xdb\xdb\xdf\xdf  \xdf \xdb\xdd\xdf\xdf\xdf \xdf   \xdb\x014\x01h\x01wFirstOn\x01k:\x01n\x014 @SINCE@  \x01h\x01cCalls\x01n\x01c\x014@SERVED-R4@ \x01wof\x01c @TCALLS-L7@\x01n "); break; case console.screen_rows-4: console.attributes=LBShell_Attr; console.putmsg("\x01n                                       \x01b\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf "); break; case console.screen_rows-3: console.attributes=7; console.cleartoeol(); console.putmsg(" \x01n\x01c[\x01h@GN@\x01n\x01c] @GRP@ [\x01h@SN@\x01n\x01c] @SUB@\x01n\r\n"); break; case console.screen_rows-2: console.attributes=7; console.cleartoeol(); console.putmsg(" \x01n\x01c(\x01h@LN@\x01n\x01c) @LIB@ (\x01h@DN@\x01n\x01c) @DIR@\x01n\r\n"); break; case console.screen_rows-1: console.attributes=LBShell_Attr; console.cleartoeol(); break; case console.screen_rows: console.attributes=LBShell_Attr; console.cleartoeol(); break; } } } } } 
context: function show_messagemenu(){	var cur=1;	var nd=false;	while(!done) {		var i;		var j;		var ret;		var messagemenu=new Messagemenu();		messagemenu.current=cur;		messagemenu.nodraw=nd;		ret=messagemenu.getval();		if(ret==KEY_RIGHT) {			if(messagemenu.items[messagemenu.current].text.substr(-2,2)==' >')				ret=messagemenu.items[messagemenu.current].retval;		}		message: switch(ret) {			case KEY_LEFT:				cleararea(messagemenu.xpos,messagemenu.ypos,messagemenu.items[0].text.length,messagemenu.items.length,true);				main_left();				return;			case '\b':			case '\x7f':			case '\x1b':				cleararea(messagemenu.xpos,messagemenu.ypos,messagemenu.items[0].text.length,messagemenu.items.length,true);				return;			case KEY_RIGHT:				cleararea(messagemenu.xpos,messagemenu.ypos,messagemenu.items[0].text.length,messagemenu.items.length,true);				main_right();				return;			case 'C':				clear_screen();				if(!msg_area.grp_list.length)					break;				msgjump: while(1) {					var orig_grp=bbs.curgrp;					var i=0;					var j=0;					if(msg_area.grp_list.length>1) {						if(file_exists(system.text_dir+"menu/grps.*"))							bbs.menu("grps");						else {							console.putmsg(bbs.text(CfgGrpLstHdr),P_SAVEATR);							for(i=0; i<msg_area.grp_list.length; i++) {								if(i==bbs.curgrp)									console.putmsg('*',P_SAVEATR);								else									console.putmsg(' ',P_SAVEATR);								if(i<9)									console.putmsg(' ',P_SAVEATR);								if(i<99)									console.putmsg(' ',P_SAVEATR);								// We use console.putmsg to expand ^A, @, etc								console.putmsg(format(bbs.text(CfgGrpLstFmt),i+1,msg_area.grp_list[i].description),P_SAVEATR);							}						}						console.mnemonics(format(bbs.text(JoinWhichGrp),bbs.curgrp+1));						j=console.getnum(msg_area.grp_list.length);						if(j<0)							break msgjump;						if(!j)							j=bbs.curgrp;						else							j--;					}					bbs.curgrp=j;					if(file_exists(system.text_dir+"menu/subs"+(bbs.curgrp+1)))						bbs.menu("subs"+(bbs.curgrp+1));					else {						console.clear();						console.putmsg(format(bbs.text(SubLstHdr), msg_area.grp_list[j].description),P_SAVEATR);						for(i=0; i<msg_area.grp_list[j].sub_list.length; i++) {							var msgbase=new MsgBase(msg_area.grp_list[j].sub_list[i].code);							if(msgbase==undefined)								continue;							if(!msgbase.open())								continue;							if(i==bbs.cursub)								console.putmsg('*',P_SAVEATR);							else								console.putmsg(' ',P_SAVEATR);							if(i<9)								console.putmsg(' ',P_SAVEATR);							if(i<99)								console.putmsg(' ',P_SAVEATR);							console.putmsg(format(bbs.text(SubLstFmt),i+1, msg_area.grp_list[j].sub_list[i].description,"",msgbase.total_msgs),P_SAVEATR);							msgbase.close();						}					}					console.mnemonics(format(bbs.text(JoinWhichSub),bbs.cursub+1));					i=console.getnum(msg_area.grp_list[j].sub_list.length);					if(i==-1) {						if(msg_area.grp_list.length==1) {							bbs.curgrp=orig_grp;							break msgjump;						}						continue;					}					if(!i)						i=bbs.cursub;					else						i--;					bbs.cursub=i;					break;				}				draw_main(true);				break;			case 'R':				clear_screen();				bbs.scan_posts();				draw_main(true);				break;			case 'N':				var typemenu=new Lightbar;				var width=23;				if(width<8+msg_area.grp_list[bbs.curgrp].name.length)					width=8+msg_area.grp_list[bbs.curgrp].name.length;				if(width<6+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length)					width=6+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length;				typemenu.xpos=messagemenu.xpos+messagemenu.items[0].text.length;				typemenu.ypos=messagemenu.current+1;				typemenu.lpadding="\xb3";				typemenu.rpadding="\xb3";				typemenu.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b";				typemenu.add(top_bar(width),undefined,undefined,"","");				typemenu.add('|All Message Areas','A',width);				typemenu.add("|Group ("+msg_area.grp_list[bbs.curgrp].name+")",'G',width);				typemenu.add('|Sub ('+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name+')','S',width);				typemenu.add('Change New Scan |Configuration','C',width);				typemenu.add('Change New Scan |Pointers','P',width);				typemenu.add('|Reset New Scan Pointers','R',width);				typemenu.add(bottom_bar(width),undefined,undefined,"","");				while(1) {					switch(typemenu.getval()) {						case 'A':							clear_screen();							console.putmsg("\r\n\x01c\x01hNew Message Scan\r\n");							bbs.scan_subs(SCAN_NEW);							draw_main(true);							messagemenu.draw();							break;						case 'G':							clear_screen();							console.putmsg("\r\n\x01c\x01hNew Message Scan\r\n");							for(i=0; i<msg_area.grp_list[bbs.curgrp].sub_list.length; i++)								bbs.scan_posts(msg_area.grp_list[bbs.curgrp].sub_list[i].number, SCAN_NEW);							draw_main(true);							messagemenu.draw();							break;						case 'S':							clear_screen();							console.putmsg("\r\n\x01c\x01hNew Message Scan\r\n");							bbs.scan_posts(msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].number, SCAN_NEW);							draw_main(true);							messagemenu.draw();							break;						case 'C':							clear_screen();							bbs.cfg_msg_scan(SCAN_CFG_NEW);							draw_main(true);							messagemenu.draw();							break;						case 'P':							clear_screen();							bbs.cfg_msg_ptrs(SCAN_CFG_NEW);							draw_main(true);							messagemenu.draw();							break;						case 'R':							bbs.reinit_msg_ptrs()							break;						case KEY_RIGHT:							cleararea(messagemenu.xpos,messagemenu.ypos,messagemenu.items[0].text.length,messagemenu.items.length,true);							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							main_right();							return;						default:							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							messagemenu.nodraw=true;							break message;					}				}				break;			case 'Y':				var typemenu=new Lightbar;				var width=30;				if(width<8+msg_area.grp_list[bbs.curgrp].name.length)					width=8+msg_area.grp_list[bbs.curgrp].name.length;				if(width<6+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length)					width=6+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length;				typemenu.xpos=messagemenu.xpos+messagemenu.items[0].text.length;				typemenu.ypos=messagemenu.current+1;				typemenu.lpadding="\xb3";				typemenu.rpadding="\xb3";				typemenu.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b";				typemenu.add(top_bar(width),undefined,undefined,"","");				typemenu.add('|All Message Areas','A',width);				typemenu.add("|Group ("+msg_area.grp_list[bbs.curgrp].name+")",'G',width);				typemenu.add('|Sub ('+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name+')','S',width);				typemenu.add('Change Your Scan |Configuration','C',width);				typemenu.add(bottom_bar(width),undefined,undefined,"","");				while(1) {					switch(typemenu.getval()) {						case 'A':							clear_screen();							console.putmsg("\r\n\x01c\x01hYour Message Scan\r\n");							bbs.scan_subs(SCAN_TOYOU);							draw_main(true);							messagemenu.draw();							break;						case 'G':							clear_screen();							console.putmsg("\r\n\x01c\x01hYour Message Scan\r\n");							for(i=0; i<msg_area.grp_list[bbs.curgrp].sub_list.length; i++)								bbs.scan_posts(msg_area.grp_list[bbs.curgrp].sub_list[i].number, SCAN_TOYOU);							draw_main(true);							messagemenu.draw();							break;						case 'S':							clear_screen();							console.putmsg("\r\n\x01c\x01hYour Message Scan\r\n");							bbs.scan_posts(msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].number, SCAN_TOYOU);							draw_main(true);							messagemenu.draw();							break;						case 'C':							clear_screen();							bbs.cfg_msg_scan(SCAN_CFG_TOYOU);							draw_main(true);							messagemenu.draw();							break;						case KEY_RIGHT:							cleararea(messagemenu.xpos,messagemenu.ypos,messagemenu.items[0].text.length,messagemenu.items.length,true);							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							main_right();							return;						default:							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							messagemenu.nodraw=true;							break message;					}				}				break;			case 'T':				var typemenu=new Lightbar;				var width=17;				if(width<8+msg_area.grp_list[bbs.curgrp].name.length)					width=8+msg_area.grp_list[bbs.curgrp].name.length;				if(width<6+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length)					width=6+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length;				typemenu.xpos=messagemenu.xpos+messagemenu.items[0].text.length;				typemenu.ypos=messagemenu.current+1;				typemenu.lpadding="\xb3";				typemenu.rpadding="\xb3";				typemenu.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b";				typemenu.add(top_bar(width),undefined,undefined,"","");				typemenu.add('|All Message Areas','A',width);				typemenu.add("|Group ("+msg_area.grp_list[bbs.curgrp].name+")",'G',width);				typemenu.add('|Sub ('+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name+')','S',width);				typemenu.add(bottom_bar(width),undefined,undefined,"","");				while(1) {					switch(typemenu.getval()) {						case 'A':							clear_screen();							console.putmsg("\r\n\x01c\x01hMessage Search\r\n");							console.putmsg(bbs.text(SearchStringPrompt));							str=console.getstr("",40,K_LINE|K_UPPER);							for(i=0; i<msg_area.grp_list.length; i++) {								for(j=0; j<msg_area.grp_list[i].sub_list.length; j++) {									bbs.scan_posts(msg_area.grp_list[i].sub_list[j].number, SCAN_FIND, str);								}							}							draw_main(true);							messagemenu.draw();							break;						case 'G':							clear_screen();							console.putmsg("\r\n\x01c\x01hMessage Search\r\n");							str=console.getstr("",40,K_LINE|K_UPPER);							for(i=0; i<msg_area.grp_list[bbs.curgrp].sub_list.length; i++)								bbs.scan_posts(msg_area.grp_list[bbs.curgrp].sub_list[i].number, SCAN_FIND, str);							draw_main(true);							messagemenu.draw();							break;						case 'S':							clear_screen();							console.putmsg("\r\n\x01c\x01hMessage Search\r\n");							str=console.getstr("",40,K_LINE|K_UPPER);							bbs.scan_posts(msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].number, SCAN_FIND, str);							draw_main(true);							messagemenu.draw();							break;						case KEY_RIGHT:							cleararea(messagemenu.xpos,messagemenu.ypos,messagemenu.items[0].text.length,messagemenu.items.length,true);							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							main_right();							return;						default:							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							messagemenu.nodraw=true;							break message;					}				}				break;			case 'P':				clear_screen();				bbs.post_msg();				draw_main(true);				break;			case 'A':				clear_screen();				bbs.auto_msg();				draw_main(true);				break;			case 'Q':				clear_screen();				bbs.qwk_sec();				draw_main(true);				break;		}		cur=messagemenu.current;		nd=messagemenu.nodraw;	}}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/ce7a8de4d1bd1e89f40f502e77b9ca73733a95d3/lbshell.js/buggy/lbshell.js