/**@param obj oggetto da testare
 * @return true se l'oggetto non è definito
 */
function isUndefined(obj)
{
	return ((obj != "undefined")
		&& ("" + obj == "undefined"));
}

/**
 */
function isExplorer()
{
	return (navigator.appName.indexOf("Explorer") >= 0);
}

/**
 */
function isNetscape()
{
	return (navigator.appName.indexOf("Netscape") >= 0);
}

/**Arrotonda un numero
 * @param dValue il numero da arrotondare
 * @param iCyph numero di cifre dopo la virgola desiderate
 *		(sono possibili numeri negativi per arrotondare alle
 *		decine, centinaia, etc.)
 * @return il valore arrotondato
 */
function round(dValue, iCyph)
{
	var dShift = Math.pow(10, iCyph);
	dValue *= dShift;
	dValue = Math.round(dValue);
	dValue /= dShift;
	return dValue;
}

/**Controlla se il parametro è un intero.
 * @param s una stringa
 * @return true se s rappresenta un numero
 */
function isInteger(s)
{
	if (isNaN(s))
		return false;
	var num = eval(s);
	return (Math.round(num) == num);
}

