/*	Name:		Scott Ash Window Resize	Type:		Object	Created:	01/10/2005	Modified:	01/10/2005	Version:	1.0	Author:		Scott A. Ash	Copyright:	Scott Ash	Functions:	set()				tell()				resize()								.init():				This sets the object width and height attributes according to the current calling window				size. This function also sets the DOM variable for the tell() function. The DOM variable 				holds a string value relating to the Document Object Model method used by the calling browser 				to determine the window size.								.update():				This function sets the current browser window to the new size specified. The call to this 				function must include both height and width or a default value of 800x600 will be used, respectively.								.tell();				This returns an array holding the width, height and finally the DOM variable described above.						Uses:		solo	Required:	This object must be initialized in the master site script or page head script before 				being used.					Settings:	None*/function sa_window_resize(){		// properties	this.wide;	this.high;	this.dom;		// methods	this.init = init;	this.update = update;	this.tell = tell;		// constructor	function init()	{		// set only legal properties of object		if(window.innerWidth)		{			this.wide = window.innerWidth;			this.high = window.innerHeight;			this.dom = "window.innerWidth/Height";		}else if(document.body)		{			this.wide = document.body.clientWidth;			this.high = document.body.clientHeight;			this.dom = "document.body.clientWidth/Height";		}else if (document.documentElement)		{			this.wide = document.documentElement.clientWidth;			this.high = document.documentElement.clientHeight;			this.dom = "document.documentElement.clientWidth/Height";		}else if (document.pageXOffset)		{			this.wide = document.pageXOffset;			this.high = document.pageYOffset;			this.dom = "document.pageX/YOffset";		}else		{			this.wide = 800;			this.high = 600;			this.dom = "Unknown. Default set at 800x600.";		}	}	function update(w,h)	{		// sets the width and height variables of the object				this.wide = parseInt(w);		this.high = parseInt(h);				if(this.wide > 0)	// resize only if received width is valid		{			if(window.innerWidth)			{				window.innerWidth = this.wide;			}else if(document.body)			{				document.body.clientWidth = this.wide;			}else if (document.documentElement)			{				document.documentElement.clientWidth = this.wide;			}else if (document.pageXOffset)			{				document.pageXOffset = this.wide;			}else			{				// unknown window sizing method			}		}				if(this.high > 0)	// resize only if received height is valid		{			if(window.innerWidth)			{				window.innerHeight = this.high;				this.dom = "window.innerWidth/Height";			}else if(document.body)			{				document.body.clientHeight = this.high;				this.dom = "document.body.clientWidth/Height";			}else if (document.documentElement)			{				document.documentElement.clientHeight = this.high;				this.dom = "document.documentElement.clientWidth/Height";			}else if (document.pageXOffset)			{				document.pageYOffset = this.high;				this.dom = "document.pageX/YOffset";			}else			{				this.dom = "Unknown. Default set at 800x600.";			}		}	}		function tell()	{		// return array with window width, height and DOM method browser uses to determine window size		myArray = new Array(this.wide, this.high, this.dom);		return myArray;	}}