function IsNumeric(strString)
{
   var strValidChars = "0123456789.-";
   var strChar;
   var i;
   if (strString.length == 0) return false;


    //  test strString consists of valid characters listed above
	for ( i = 0; i < strString.length ; i++)
	{
		strChar = strString.charAt(i);
		//alert('Index is = '+strValidChars.indexOf(strChar));
		if (strValidChars.indexOf(strChar) == -1)
		{
			return false;
		}
    }
	return true;
}
function GetNum(strString)
{
   var strValidChars = "0123456789.-";
   var strChar;
   var result = "";
   var i;
   if (strString.length == 0) return result;


    //  test strString consists of valid characters listed above
	for ( i = 0; i < strString.length ; i++)
	{
		strChar = strString.charAt(i);
		//alert('Index is = '+strValidChars.indexOf(strChar));
		if (strValidChars.indexOf(strChar) == -1)
		{
			result = result;
		}
		else
		{
			result =result +strChar; 
		}
    }
	return result;
}

function hideLayer(id) {
	// hide the given layer
	
    if (document.layers) {
        document.layers[id].visibility = 'hidden';
    }
    else if (document.all) {
     
        document.all(id).style.visibility = 'hidden';
    }
   
}

function showLayers(id,x,y) {
	

	// Simply show the layer
    if (document.layers) {
		// NE
        document.layers[id].visibility = 'visible';
        document.layers[id].left = x;
        document.layers[id].top = y;
    }
    else if (document.all) {
		// MS-IE
        document.all[id].style.visibility = 'visible';
        document.all[id].style.posLeft = x;
        document.all[id].style.posTop = y;
       
    }
    //alert(Validator_Name);
    //tmt_DivOnTop(id);
}
function showLayerOnly(id) {
	// Simply show the layer
	
	if (document.layers) {
		// NE
        document.layers[id].visibility = 'visible';
    }
    else if (document.all) {
		// MS-IE
        document.all[id].style.visibility = 'visible';
    }
}

var divs = new Array();
var da = document.all;
var start;

//CONFIGUER THESE VARS!!!!!!
//speed of pulsing
var speed = 50;

function initVars(){
if (!document.all)
return;

//Extend of shrink the below list all you want
//put an "addDiv(1,"2",3,4); for each div you made, 
//1)'id' of div
//2)color or glow(name or hex)(in quotes!!!)
//3)minimum strength
//4)maximum strength

addDiv(hi,"lime",2,11);
addDiv(welcome,"red",4,9);
addDiv(message,"purple",2,4);
addDiv(msg2,"orange",15,17);
addDiv(msg3,"blue",1,3);

//NO MORE EDITING!!!!!!



startGlow();
}

function addDiv(id,color,min,max)
{
var j = divs.length;
divs[j] = new Array(5);
divs[j][0] = id;
divs[j][1] = color;
divs[j][2] = min;
divs[j][3] = max;
divs[j][4] = true;
}

function startGlow()
{
	if (!document.all)
		return 0;

	for(var i=0;i<divs.length;i++)
	{
		divs[i][0].style.filter = "Glow(Color=" + divs[i][1] + ", Strength=" + divs[i][2] + ")";
		divs[i][0].style.width = "100%";
	}

	start = setInterval('update()',speed);
}

function update()
{
	for (var i=0;i<divs.length;i++)
	{
		if (divs[i][4])
		{
			divs[i][0].filters.Glow.Strength++;
			if (divs[i][0].filters.Glow.Strength == divs[i][3])
				divs[i][4] = false;
		}
	
		if (!divs[i][4])
		{
			divs[i][0].filters.Glow.Strength--;
			if (divs[i][0].filters.Glow.Strength == divs[i][2])
				divs[i][4] = true;
		}
	}
}


