function applyZ() {
	var zi = 1000;
	var grp = document.getElementById("primary_nav").getElementsByTagName("li");
	for(x=0;x<grp.length;x++)
	{
		grp[x].style.zIndex = zi;
		zi = zi-1;
	}
}


/*** Handy Functions ***/
function parentFormSubmit(elem)
{
  $(elem).parents('form').submit();
  return false;
}

/**
 * Create fake firebug object
 */
if (!window.console || !console.firebug)
{
  var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
  "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];

  window.console = {};
  for (var i = 0; i < names.length; ++i)
    window.console[names[i]] = function() {}
}
