 function show(file, width, height)
	{   file=file;
         window.open(file, "_blank", "width="+width+",height="+height+",titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
	}


	function vP(ptable, link){
		var obj = document.getElementById(ptable);
		obj.className = obj.className == 'pn' ? 'pv' : 'pn';
		link.className = link.className == 'vid' ? '' : 'vid';

	}

function clearText(el) {
  if (el != null) {
    if (el.childNodes) {
      for (var i = 0; i < el.childNodes.length; i++) {
        var childNode = el.childNodes[i];
        el.removeChild(childNode);
      }
    }
  }
}

function textCounter(field, countfield, maxlimit) {
  if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
  else
countfield.value = maxlimit - field.value.length;
}

