//this function insert new data in some object (div or td)
function updateInnerData_TextObj(id,text){
	var textObj = document.getElementById(id);
	textObj.innerHTML = text;
}

function textEmpty(textObj){
  var testObj = textObj;
  if ((testObj.value == null)  || (testObj.value == "")){
        return false;}
  return true;
}

function validateText(obj){                   // this function remove all forbidden expressions
	var testObj = obj;

	while ( testObj.value.search("script") != -1 ){               //remove word script
        testObj.value = testObj.value.replace("script","");
	}
	while ( testObj.value.search(">") != -1 ){                   //remove ">" char
        testObj.value = testObj.value.replace(">","");
	}
	  while ( testObj.value.search("<") != -1 ){
        testObj.value = testObj.value.replace("<","");
	}
	return testObj.value;
}

function clearText(thisObj){                    // clear text from the field
    var textObj = thisObj;
    textObj.value = "";
}

