function checkAll(field)
{
    for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}

function uncheckAll(field)
{
    for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}

function chHtml(oId, oHtml)
{
    if (document.getElementById || document.all)
    {
        var obj = document.getElementById? document.getElementById(oId): document.all[oId];
        if (obj && typeof obj.innerHTML != "undefined") obj.innerHTML = oHtml;
    }
}

function chForm(oId, oHtml)
{
    if (document.getElementById || document.all)
    {
        var obj = document.getElementById? document.getElementById(oId): document.all[oId];
        if (obj && typeof obj.value != "undefined") obj.value = oHtml;
    }
}

function fCounter(fldId, ctId, fMax)
{
    if (document.getElementById || document.all)
    {
        var fldObj = document.getElementById? document.getElementById(fldId): document.all[fldId];
        var ctObj = document.getElementById? document.getElementById(ctId): document.all[ctId];
        
        ctObj.value = fldObj.value.length
        
        if(fldObj.value.length >= fMax)
        {
            fldObj.value = fldObj.value.substring(0,fMax-1);
        }

        if (ctObj && typeof ctObj.value == "undefined") ctObj.value = fldObj.value.length;

    }    
}

function switchVis(obj) {
        
    myId = document.getElementById(obj).id;
    
    if (document.getElementById) { // DOM3 = IE5, NS6

        if(document.getElementById(obj).style.visibility == 'visible')
        {
            document.getElementById(obj).style.visibility = 'hidden';
            document.getElementById(obj).style.display = 'none';
        }
        else if(document.getElementById(obj).style.visibility == 'hidden')
        {
            document.getElementById(obj).style.visibility = 'visible';
            document.getElementById(obj).style.display = 'block';
        }
         else {
            document.getElementById(obj).style.visibility = 'visible';
            document.getElementById(obj).style.display = 'block';
        }
    } else {
        if (document.layers) { // Netscape 4
            if(document.obj.visibility == 'visible') {
                document.obj.visibility = 'hidden';
                document.obj.display = 'none';                
            } else if(document.obj.visibility == 'hidden') {
                document.obj.visibility = 'visible';
                document.obj.display = 'block';                
            } else {
                document.obj.visibility = 'hidden';
                document.obj.display = 'none';           
            }
        } else { // IE 4
            if(document.all.obj.style.visibility == 'visible') {
                document.all.obj.style.visibility = 'hidden';
                document.all.obj.style.display = 'none';                
            } else if(document.all.obj.style.visibility == 'hidden') {
                document.all.obj.style.visibility = 'visible';
                document.all.obj.style.display = 'block';                

            } else {
                document.all.obj.style.visibility = 'hidden';
                document.all.obj.style.display = 'none';                

            }
        }
    }
}
function displayDate() {
  var now = new Date();
  var today = now.getDate();
  var month = now.getMonth();
    var monthName = new Array(12)
      monthName[0]="January ";
      monthName[1]="February ";
      monthName[2]="March ";
      monthName[3]="April ";
      monthName[4]="May ";
      monthName[5]="June ";
      monthName[6]="July ";
      monthName[7]="August ";
      monthName[8]="September ";
      monthName[9]="October ";
      monthName[10]="November ";
      monthName[11]="December ";
  var year = now.getFullYear();

  document.write(monthName[month]+today+ ", "+year);
}

