/* ======================================================================
     JavaScript Source File -- Created with NetObjects ScriptBuilder
NAME: resolutiondetect.js
AUTHOR: Jason Koelker (jkoelker@iastate.edu)
PURPOSE: Detect the clients screen resolution
====================================================================== */

var bName = navigator.appName;
if (bName == "Netscape") self.location.href = 'noframes/index.htm';

	else {

		if (self.screen) {    
			width = screen.width;
			height = screen.height;
		}
		else if (self.java) { 
		      var jkit = java.awt.Toolkit.getDefaultToolkit();
	   	   var scrsize = jkit.getScreenSize();
	      	width = scrsize.width; 
		      height = scrsize.height; }
				else{
	   	   width = height = 'x' 
		}
		if (width == 640) self.location.href = 'noframes/index.htm';
		else if (width == 800) self.location.href ='noframes/index.htm';
		else if (width == 1024) self.location.href ='1024x768/frames/index.htm';
		else if (width == 1280) location.href ='1024x768/frames/index.htm';
		else self.location.href = 'noframes/index.htm';
}