  function isChecked(formField) {
  	alert(document.getElementById("contact[]").length);
  	checked = false;
  	if (formField.length > 0) {
    	for (var i = 0; i < formField.length; i++) {
      	if (formField[i].checked) {
        	checked = true;
        }
      }
    }
  	return checked;
  }
			
	function validate(theForm) {
		var objForm = document.forms[0];
    var el = document.getElementsByName('contact[]')
    for(i=0;i<el.length;i++){
    	if(el[i].checked){
      	return true;
      }
    }
    alert("You must select at least one firm to contact.");
    return false;
	}
	
	function newWindow(url,title,w,h) {
		window.open(url,title,'width='+w+',height='+h+',resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no,menubar=yes');
	}
	
	function ismaxlength(obj){
  	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
    if (obj.getAttribute && obj.value.length>mlength)
    	obj.value=obj.value.substring(0,mlength)
  }
	
	function countchars(obj) {
		document.getElementById('count_display').value = 200 - obj.value.length;
	}