function eventAdder(objAttrib,handler,addFunction){
   if ((!document.all)&&(document.getElementById)){
       objAttrib.setAttribute(handler,addFunction);
   }    
   //workaround for IE 5.x
   if ((document.all)&&(document.getElementById)){
       objAttrib[handler]=new Function(addFunction);
   }
}

// alias do document.getElementByid
function getID(id) {
	return document.getElementById(id);
}
function isNumeric(str) {
	   var ValidChars = "0123456789.";
	   var strChar;
	   var blnResult = true;
		var ilek=0;
	   if (str.length == 0) return false;

	   //  test strString consists of valid characters listed above
		for (var i = 0; i < str.length && blnResult == true; i++) {
		strChar = str.charAt(i);
			if (strChar==".") ilek++;
			if (ValidChars.indexOf(strChar) == -1) {
				blnResult = false;
				break;
			}
		}
		if (ilek>1) blnResult=false;
	   return blnResult;
}

function trim(str) {
	return str.replace(/^\s+|\s+$/g,"");
}
