/*
	Copyright (C) 2008 - Juan Ferrer Toribio

	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 2.1 of the License, or (at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this program; if not, write to the Free
	Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
	02111-1307 USA.
*/

function getPageYOffset ()
{
	return window.pageYOffset;
}

function getPageXOffset ()
{
	return window.pageXOffset;
}

function getInnerHeight ()
{
	return window.innerHeight;
}

function getInnerWidth ()
{
	return window.innerWidth;
}
	
function createRadio (uid)
{
	var radio = document.createElement ('input');
	radio.type = 'radio';
	radio.name = uid;
	return radio;
}

function setInputTypeNumber (input)
{
	input.type = 'number';
}

/*
// Browser Detector

n = -1;
var BROWSER_FIREFOX	= ++n;
var BROWSER_WEBKIT	= ++n;
var BROWSER_IE		= ++n;
var BROWSER_DEFAULT	= ++n;

var tmp;
var browser;
var agent = new String (navigator.userAgent);

tmp = new Array (
	 'Firefox'
	,'WebKit'
	,'MSIE'
);

for (n = 0; n < tmp.length; n++)
{
	if (agent.indexOf (tmp[n]) > -1)
	{
		browser = n;
		break;
	}
}

if (n == tmp.length)
	browser = BROWSER_DEFAULT;
*/


