// *************
// Form Submit Function
// *************
function submit(form) {
   form.submit();
}

// *************
// Clear Fields Function
// *************

function clearFields(form) {

        var formNum = form.elements.length; // Number of form elements

        for (i = 0; i < formNum; i++) {
                var shortForm = form.elements[i] // Shortcut Reference for Form Elements
                if (shortForm.type == "text"){
                        shortForm.value = "";
                } else if (shortForm.name == "county"){
                } else if (shortForm.type == "checkbox"){
                        shortForm.checked = false;
                } else if (shortForm.type == "radio"){
                        shortForm.checked = false;
                } else if (shortForm.type == "textarea"){ // Only Clears Textareas in MSIE
                        shortForm.value = "";
                } else if (shortForm.type == "hidden"){
                } else if (shortForm.type == "password"){
                } else if (shortForm.type == "image"){
                } else if (shortForm.type == "button"){
                } else if (shortForm.type == "reset"){
                } else if (shortForm.type == "submit"){
                } else{
                        shortForm.selectedIndex = false;
                        shortForm.options[0].selected = true;
                }
        }
return false;
}



// *************
// New Window Function
// *************

function newWin(url,width,height) {
  if((width==0) && (height==0)) {
    window.open(url,"_blank","height=" + self.outerHeight + ",width=" + self.outerWidth + ",scrollbars=auto,resizable=yes");
  } else {
    window.open(url,"_blank","height=" + height + ",width=" + width + ",scrollbars=auto,resizable=yes");
  }
}

// *************
// TableData Link
// *************

function tdLink(link) {
  window.location = link;
}

// *************
// XWindowBox and Object Pointer Code
// *************
function getObject(id) {
 if (document.all) {
  return document.all[id];
 } else {
  return document.getElementById(id);
 }
}

function grow(divId) {
 var d = getObject(divId);
 d.style.display = 'block';
}

function shrink(divId) {
 var d = getObject(divId);
 d.style.display = 'none';
}