/******************************************************************************/

function formOnSubmit(formObject) {
  return true;
}

/******************************************************************************/

function formOnReset(formObject) {
  return confirm('Do you want to clear all fields?');
}

/*******************************************************************************
IMK: the getArgs() function is from the book "JavaScript: The definitive Guide"
     by David Flanagan, published by O'Reilly, ISBN 0-596-00048-0
     page 214
*******************************************************************************/

/*
 * This function parses comma-separated name=value argument pairs from
 * the query string of the URL. It stores the name=value pairs in 
 * properties of an object and returns that object.
 */
function getArgs() {
    var args = new Object();
    var query = location.search.substring(1);     // Get query string.
    var pairs = query.split(",");                 // Break at comma.
    for(var i = 0; i < pairs.length; i++) {
	var pos = pairs[i].indexOf('=');          // Look for "name=value".
	if (pos == -1) continue;                  // If not found, skip.
	var argname = pairs[i].substring(0,pos);  // Extract the name.
	var value = pairs[i].substring(pos+1);    // Extract the value.
	args[argname] = unescape(value);          // Store as a property.
	// In JavaScript 1.5, use decodeURIComponent() instead of escape()
    }
    return args;                                  // Return the object.
}

/*******************************************************************************
IMK: the kadabra() function is from the book "CSS Cookbook"
     by Christopher Schmitt, published by O'Reilly, ISBN 0-596-00576-8
     page 79
*******************************************************************************/

function kadabra(zap) {
  if (document.getElementById) {
    var abra = document.getElementById(zap).style;
    if (abra.display == "block") {
      abra.display = "none";
    } else {
      abra.display = "block"
    }
    return false
  } else {
    return true
  }
}
