function getDimensions() { 
var Dimensions = ""; 
var scrwidth; 
var scrheight; 
// Get the dimensions; IE uses .clientWidth/Height 
// and Netscape (all versions) as well as Opera use .innerWidth/Height 
if ((navigator.userAgent.indexOf('MSIE') > -1) && (navigator.userAgent.indexOf('Opera') == -1)) { 
Dimensions = document.body.clientWidth + " x " + document.body.clientHeight; 
scrwidth = document.body.clientWidth - 50; 
scrheight = document.body.clientHeight - 250; 
} else { 
Dimensions = window.innerWidth + " x " + window.innerHeight; 
// give some space for headers and footers maybe. 
scrwidth = window.innerWidth - 50; 
scrheight = window.innerHeight - 250; 
} 
// Get the current resolution, which is a browser independant value 
var ScreenRes = screen.width + " x " + screen.height; 
// Return the dimensions 
//return "<B>Browser:</B>" + Dimensions + "<B>Display:</B>" + ScreenRes; 
if ((scrwidth > 1060) || (scrheight > 900)) {    
return "<applet code=IRCApplet.class codebase=\"" archive=\"irc.jar, pixx.jar\" width=" + scrwidth + " height=" + scrheight + ">"; 
} else { 
   return "<applet code=IRCApplet.class codebase=\"" archive=\"irc.jar, pixx.jar\" width=750 height=350>"; 
} 
} 