<!-- // hides this from browsers with disabled/old javascript
// note that a single syntax error in ANY FUNCTION will cause ALL to stop working!
// what a hideous 'feature' of javascript. 
function LimitLength(textfield, count, max) 
    {
        if (textfield.value.length > max)
            textfield.value = textfield.value.substring(0, max);
        else
            count.value = max - textfield.value.length;
    }

function hideTable(theForm, tableid, field, unhide_value) 
    {
        $val = theForm.elements[field].value;
        var tab = tableid;
        if ($val == unhide_value) 
            {
                document.getElementById(tab).style.display="block";
            }
        else 
            {
                document.getElementById(tab).style.display="none";
            }
    }

function hideClass(obj, levels, classname, unhide_value) 
    {
        
        $val = obj.value;
        var target = obj;
        for(var idx=0;idx<levels;idx++) { target = target.parentNode; }

        while( target.nextSibling ) 
            {
		        if(target.nextSibling.className == classname) 
                    {
                        target = target.nextSibling;
                        if($val == unhide_value) { target.style.display = "block"; }
                        else { target.style.display = "none"; }
                    }
                else target = target.nextSibling;
	        }
    }
   
function toggle( element )
    {
        var e = document.getElementById( element );
        var i = document.getElementById( element + "_img" );
        if( e.style.display == "none" )
            {
                i.src="images/arrowDown.gif";
                e.style.display = "block";
            } 
        else 
            {
                i.src="images/arrowRight.gif";
                e.style.display = "none";
            }
    }
// -->


