function someFunction() {
	// this function just displays a message to say it worked
	alert("This worked!");
	}

function addJSLink(elementId, onClickFunction, linkText) {
	// check for DOM support
	if (!document.getElementById(elementId)) { return; }
	// get the element we want to add the link to
	var element = document.getElementById(elementId);
	// create the link
	var link = document.createElement("a");
	// create the text for the link
	var linkText = document.createTextNode(linkText);
	// add the text to the link
	link.appendChild(linkText);
	// add the function to the onClick method of the link
	link.onclick = onClickFunction;
	// make the href of the link the element we are using
	link.href="#"+elementId;
	// add a space to the end of the quote containing element
	var space = document.createTextNode(" ");
	element.appendChild(space);
	// add the link to the end of the quote containing element
	element.appendChild(link);
	}

// load the function when the DOM has loaded
window.onload = load;

function load()
{
	// when the window loads we call the above function
	// with the parameters randomQuote, the id of the 
	// paragraph we have the quotes in, someFunction
	// which is the function you can see at the top, and "New Quote!"
	// the link text that will be displayed.
	addJSLink('randomQuote',someFunction,'New Quote!');
}