/**
 * Utopiste core javascript library
 * $Id: core.js,v 1.2 2005/07/15 16:31:15 Yoyo Exp $
 */

// Common function
function suppr() {
  return confirm('Supprimer ?');
}

function retour() {
  history.back();
}

function clearInput(input) {
  if (input.value == input.defaultValue) {
    input.value = '';
  }
}

function get(id) {
	return document.getElementById(id);
}
function getByName(name, parent) {
	if (!parent) {
		parent = document;
	}
	return parent.getElementsByName(name);
}
function getByTag(tag, parent) {
	if (!parent) {
		parent = document;
	}
	return parent.getElementsByTagName(tag);
}