/**
 * shared.js
 * 
 * A JavaScript Document
 * by BlackSpiderWebs.com
 * Copyright 2006, All Rights Reserved.
 */ 

function element(id) {
	//returns the html element with the given id
	return document.getElementById(id);
}

function isset(object) {
	//return true if the object is not NULL (or is a boolean set to true)
	return (object ? true : false);
}

function doTrace(message) {
	//when debugging, you may print debugging messages in one location
	//when not debugging, remove all elements with id "debug"
	var el = element("debug");
	if (isset(el))	{
		el.innerHTML += ",  " + message;
	}
}

//removes the element with id from the page
function removeElement(id) {
	var object=element(id);
	if (isset(object))
		object.parentNode.removeChild(object);
}

var spacer_path = "./images/spacer.gif";
function spacer(width, height) {
	document.write("<img src=\"" + spacer_path + "\" width=\"" + width + "\" height=\"" + height + "\" />");
}
