﻿var Convert = new ConvertClass();

//============================================
// ConvertClass Class.
//============================================
function ConvertClass()
{
	//==========================================
	// ToBoolean.
	//==========================================
	this.ToBoolean = function(Value)
	{
		return (Value.toLowerCase() == 'true');
	}
	
	//==========================================
	// ToInt.
	//==========================================
	this.ToInt = function(Value)
	{
		if (isNaN(Math.abs(Value)))
		{
			return 0;
		}
		else
		{
			return (Math.abs(Value));
		}
	}
	
	//==========================================
	// ToInt32.
	//==========================================
	this.ToInt32 = function(Value)
	{
		return this.ToInt(Value);
	}
	
	return;
}
