<!--BEGIN Toggle Div -->
var openDivs = [];
function toggleDiv ( id, level ) {
    var div = document.getElementById( id );
    if ( div.style.display == "block" )
        div.style.display = "none";
    else {
        if ( openDivs[level] ) openDivs[ level ].style.display = "none";
        openDivs[ level || 0 ] = div;
        div.style.display = "block";
    }
}
function toggleAll ( checkbox, id ) {
    var divs = document.getElementById( "containerDiv" 
).getElementsByTagName( "div" );
    var display = checkbox.checked ? "block" : "none";
    for ( var i=0; i < divs.length; i++ )
        divs[ i ].style.display = display; }
<!--END Toggle Div -->
<!--BEGIN Default Field onChange-->
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}

function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}
<!--END Default Field onChange-->

<!--BEGIN JQUERY DROPDOWN -->
$(document).ready(function() {
$("#nav1").click(function () {
      $("#nav1content").slideToggle("slow");
    });
$("#nav1close").click(function () {
      $("#nav1content").slideToggle("slow");
    });
});

$(document).ready(function() {
$("#cat1").click(function () {
      $("#cat1content").slideToggle("slow");
    });
$("#cat1close").click(function () {
      $("#cat1content").slideToggle("slow");
    });
});
<!--END JQUERY DROPDOWN -->
<!--BEGIN AJAX CONTENT -->
function ahah(url, target) {
document.getElementById(target).innerHTML = '<img src="/images/global/loading.gif">';
if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (req != undefined) {
    req.onreadystatechange = function() {ahahDone(url, target);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function ahahDone(url, target) {
  if (req.readyState == 4) { // only if req is "loaded"
    if (req.status == 200) { // only if "OK"
      document.getElementById(target).innerHTML = req.responseText;
    } else {
      document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function load(name, div) {
	ahah(name,div);
$('html, body').fadeIn('slow');
	return false;
}
<!--END AJAX CONTENT -->