
function subtxt(txt,mydiv){
if(txt.msg.value != "" && txt.msg.value != txt.msg.defaultValue){
document.getElementById(mydiv).style.visibility = "hidden";
return (true);
} else {
return (false);
 }
}

function clearfield(comm){
if(comm.value == comm.defaultValue)
comm.value="";
}

function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else 
countfield.value = maxlimit - field.value.length;
}

var activeSObj = null;
var siTO = null;

function showLayer(LAYRID) {
var div = document.getElementById(LAYRID);

   if (LAYRID != activeSObj) {
	  clearTimeout(siTO);
      div.style.display = 'block';
      div.style.left = parseInt(mousex + 1) + 'px';
      div.style.top = parseInt(mousey - 180) + 'px';
	  div.style.visibility = 'visible';
      activeSObj = LAYRID;
      siTO = setTimeout('hideLayer('+LAYRID+')', 3000);
 }
}

function hideLayer(LAYRID) {
   clearTimeout(siTO);
   LAYRID.style.visibility = 'hidden';
   activeSObj = null;
}
