/*
	XPDOM Cross-Platform DOM 
	Compatibility Wrapper for Web Scripting with W3C DOM
	using  W3C Java DOM interfaces.
	http://xpdom.sourceforge.net
	http://www.sourceforge.net/projects/xpdom

	(c) 2000-2002, José María Arranz Santamaría
	mailto:jmarranz@users.sourceforge.net
	mailto:jmarranz@eresmas.com
	(Spanish citizen)
 
	Copyright of this library is covered with GNU General Public License (GPL) v2
	(see file COPYING)

	Comercial use at commercial web sites is forbidden without a license
	of the author.
*/

// The W3C DOM (Java) based Implementations
// These functions suppose a valid W3C ECMAScript DOM to set a W3C Java DOM like layer
//*************************************************************************************

// AbstractView Interface (Window)
// **************************************
function xpdom_dom_AbstractViewImpl()
{
	// Bind functions
	this.toString = toString; 

	this.getDocument = getDocument;

	// These methods aren't W3C DOM (Java), but they are very useful properties in NS6 and NN4
	this.getInnerWidth =  getInnerWidth;
	this.getInnerHeight = getInnerHeight;
	this.getScrollX = getScrollX;
	this.getScrollY = getScrollY;

	// Implementation

	function toString()
	{
		return "[object Window]";
	}

	function getDocument()
	{
		return this.native_object.document.getDOMWrapper();
	}

	function getInnerWidth()
	{
		 return this.native_object.innerWidth;
	}

	function getInnerHeight()
	{
		 return this.native_object.innerHeight;
	}

	function getScrollX()
	{
		return this.native_object.pageXOffset; // In NS6 scrollX is a Alternative
	}

	function getScrollY()
	{
		return this.native_object.pageYOffset; // In NS6 scrollY is a Alternative
	}
}


// DocumentView Interface
// **************************************
function xpdom_dom_DocumentView()
{
	this.getDefaultView = getDefaultView;

	function getDefaultView()
	{
		return this.wrap_window;
	}

}

