function Is() {
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.win = (agent.indexOf('win') != -1);
	this.mac = (agent.indexOf('mac') != -1);
	this.aol = (agent.indexOf('aol') != -1);
	this.ns = ((agent.indexOf('mozilla') != -1) && (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera') == -1) && (agent.indexOf('webtv') == -1));
	this.ns2 = (this.ns && (this.major == 2));
	this.ns3 = (this.ns && (this.major == 3));
	this.ns4 = (this.ns && (this.major == 4));
	this.ns6 = (this.ns && (this.major >= 5));
	this.ie = (agent.indexOf("msie") != -1);
	this.ie3 = (this.ie && (this.major < 4));
	this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0")   == -1));
	this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0") != -1));
	this.ieX = (this.ie && !this.ie3 && !this.ie4);
}
var is = new Is();

function NET_goTo( url ) {
	window.location.href = url;
}

function NET_goTomain( url ) {
	//window.location.href = url;
	parent.main.location.href = url;
}

function NET_goTohome( url ) {
	parent.home.location.href = url;
}

function NET_goTobull( url ) {
	parent.bull.location.href = url;
}

//Validate Numbers
function checkNumeric(objName,minval, maxval,comma,period,hyphen)
{
	var numberfield = objName;
	if (chkNumeric(objName,minval,maxval,comma,period,hyphen) == false)
	{
		numberfield.select();
		numberfield.focus();
		return false;
	}
	else
	{
		return true;
	}
}
function chkNumeric(objName,minval,maxval,comma,period,hyphen)
{
	// only allow 0-9 be entered, plus any values passed
	// (can be in any order, and don't have to be comma, period, or hyphen)
	// if all numbers allow commas, periods, hyphens or whatever,
	// just hard code it here and take out the passed parameters
	var checkOK = "0123456789" + comma + period + hyphen;
	var checkStr = objName;
	var allValid = true;
	var decPoints = 0;
	var allNum = "";

for (i = 0;  i < checkStr.value.length;  i++)
{
	ch = checkStr.value.charAt(i);
	for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
		break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
		if (ch != ",")
		allNum += ch;
	}
	if (!allValid)
	{	
		alertsay = "Please enter only these values \""
		alertsay = alertsay + checkOK + "\" in the \"" + checkStr.name + "\" field."
		alert(alertsay);
		return (false);
	}

	// set the minimum and maximum - Nao que aceitar .5 sem o zero
//	var chkVal = allNum;
//	var prsVal = parseInt(allNum);
//	if (chkVal != "" && !(prsVal >= minval && prsVal <= maxval))
//	{
//		alertsay = "Please enter a value greater than or "
//		alertsay = alertsay + "equal to \"" + minval + "\" and less than or "
//		alertsay = alertsay + "equal to \"" + maxval + "\" in the \"" + checkStr.name + "\" field. For numbers between -1 and +1, you must type 0 in addition to the decimal (ie 0.5 or -0.5)"
//		alert(alertsay);
//		return (false);
//	}
}