function journal(theFrm) {
   var xmlhttp=false;
   /*@cc_on @*/
     /*@if (@_jscript_version >= 5)
       // JScript gives us Conditional compilation, we can cope with old IE versions.
     // and security blocked creation of the objects.
     try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (e) {
	try {
	   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
	   xmlhttp = false;
	}
     }
   @end @*/
     if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
	   xmlhttp = new XMLHttpRequest();
	} catch (e) {
	   xmlhttp=false;
	}
     }
   if (!xmlhttp && window.createRequest) {
      try {
	 xmlhttp = window.createRequest();
      } catch (e) {
	 xmlhttp=false;
      }
   }
   
   var bad = false;
   theObjects = theFrm.getElementsByTagName("input");
   var params = "";
   for (var i = 0; i < theObjects.length; i++) {
      if (theObjects[i].type == 'text') {
	 if (theObjects[i].value == '') {
	    theObjects[i].style.backgroundColor = 'red';
	    bad = true;
	 } else {
	    theObjects[i].style.backgroundColor = 'white';
	    params = params +"&"+theObjects[i].name+"="+theObjects[i].value;
	 }	 
      }      
   }
   if (bad) {
      return 0;
   }  	
   var theurl = "journalist.php";
   /*var params = "test=1&test1=2";*/
   xmlhttp.open("POST", theurl, true);
   xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
   xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState==4) {
	 var rtext =  xmlhttp.responseText;
	 theObjects = theFrm.getElementsByTagName("input");
	 if (rtext == 'GOOD') {
	    for (var i = 0; i < theObjects.length; i++) {
	       if (theObjects[i].type == 'text') {
		  if (theObjects[i].value != '') {
		     theObjects[i].value = '';
		  }	 
	       }      
	    }
	    /*document.getElementById('hiddentd').appendChild(document.createTextNode("Thank you !"));*/
	      document.getElementById('errortext').innerHTML = 'Thank you !';
	    for (var z = 0; i < theObjects.length; z++) {
	       if (theObjects[i].type == 'text') {
		  theObjects[i].value = '';
	       }      
	    }
	 } else {
	    document.getElementById('errortext').innerHTML = 'Sorry, an error has occured!';
	 }	 
      }
   }
   xmlhttp.send(params);
}

