rem: if(height-(ypos-2)>BackGround.height) { 
add: if(height+(ypos-2)>BackGround.height) { 
context: 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;				}			}		}	}}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/c3e3ef0b951f44bb00efba1db68399ba719ad5af/lbshell.js/buggy/lbshell.js