/* ######################################################################### */

function crossbrowser_return_documentobject (objectid) {
	
	if (document.getElementById) {
		return(document.getElementById(objectid));
	} else if (document.all) {
		return(document.all[objectid]);
	} else {
		return(null);
	}
	
}

/* ######################################################################### */

function toggleVisibility(destobjectid) {
	
	var obj = crossbrowser_return_documentobject(destobjectid);
	
	if (obj) {
		if (obj.style.display != 'none') {
			obj.style.display = 'none';
		} else {
			obj.style.display = '';
		}
	}

}

/* ######################################################################### */

/* 
<!-- Dynamic Version by: Nannette Thacker -->
<!-- http://www.shiningstar.net -->
<!-- Original by :  Ronnie T. Moore -->
<!-- Web Site:  The JavaScript Source -->
<!-- Limit the number of characters per textarea -->
*/

function textCounter(field,cntfield,maxlimit) {
    // if too long...trim it!
    if (field.value.length > maxlimit) {
        field.value = field.value.substring(0, maxlimit);
    } else {
        // otherwise, update 'characters left' counter
        cntfield.value = maxlimit - field.value.length;
    }
}