// JavaScript Document
function charsCount(theField, numChars) {
	   strLen = theField.value.length;
	   if (strLen > numChars ) {
	      theField.value = theField.value.substring(0, numChars);
		  charsLeft = 0;
	   }
	   else {
	      charsLeft = numChars - strLen;
	   }
	   document.form1.messageLength.value = charsLeft;
	}
function LP_enableform() {
	if (document.forms[0].from.value != '') {
		  document.forms[0].vaia.disabled = false;
	} 
}
function LP_popup(w,h,url){
	var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
	window.open(url,"popup","height="+h+",width="+w+",menubar=0,resizable=no,scrollbars=no,status=0,titlebar=0,toolbar=0,left="+winl+",top="+wint);
}
function LP_caption(caption){
	if(caption == "") { caption = "&nbsp;" }
	document.getElementById("caption").innerHTML = caption;
}
function uncheckall() {
  void(d=document);
  void(el=d.getElementsByTagName('INPUT'));
  for(i=0;i<el.length;i++) {
    void(el[i].checked=0);
  }
}

function checkall() {
  void(d=document);
  void(el=d.getElementsByTagName('INPUT'));
  for(i=0;i<el.length;i++) {
    void(el[i].checked=1);
  }
}
