function show_dropdown(id, isbn)
{
	setup_dropdown_box(id, isbn);
}

addEvent(document, "click", dropdown_check_click);

function dropdown_check_click()
{
	if (option_dropdown)
	{
		if (option_dropdown.style.display=='' && ignore_click!='true')
		{
			option_dropdown.style.display = 'none';
		}
	}

	ignore_click = 'false';
}

option_dropdown = document.createElement("div");
if (document.getElementById('page_container'))
{
	document.getElementById('page_container').appendChild(option_dropdown);
}
else
{
	document.body.appendChild(option_dropdown);
}
ignore_click = 'true';

function setup_dropdown_box(id, isbn)
{
	x_offset = calculateOffsetLeft(document.getElementById(id));
	y_offset = calculateOffsetTop(document.getElementById(id));
	dropdown_width = 115;

	var dropdown_html;

	dropdown_html = '<ul class="option_dropdown_list"><li title="header=[] body=[Add a note to this book that only you will see]" onclick="display_book_note_editor(' + isbn + ');">+ Personal Note</li>';
	dropdown_html += '<li title="header=[] body=[Add this book to your Books I\'ve Read (BIR) list]" onclick="add_read(' + isbn + ');">+ Books I\'ve Read</li>';
	dropdown_html += '<li title="header=[] body=[Add this to your list of books to read]" onclick="add_to_tbr_pile(' + isbn + ', \'\');">+ To Be Read Pile</li>';
	dropdown_html += '<li title="header=[] body=[Add this to one of your Book Lists]" onclick="add_to_book_list(' + isbn + ', \'\');">+ Book List</li>';
	dropdown_html += '<li title="header=[] body=[Have an account with LibraryThing.com? Add this book to your list!]" onclick=window.open("http://www.librarything.com/addbooks.php?search=' + isbn + '")>+ LibraryThing</li>';
	dropdown_html += '<li title="header=[] body=[Let others know what you thought about this book]" onclick="write_review(' + isbn + ');">Write Review</li>';
	dropdown_html += '<li title="header=[] body=[Tell a friend about this book via email]" onclick="show_pop(\'e\',' + isbn + ');">Email Book</li>';
	dropdown_html += '<li title="header=[] body=[If you see missing or inaccurate information about this book, let us know!]" onclick="self.location.href = \'/volunteers/book_edits/submit_edits.php?isbn=' + isbn + '\';">Edit Book Data</li>';
	dropdown_html += '<li title="header=[] body=[Suggest this to one of you PaperBackSwap Friends]" onclick="recommend_book('+isbn+')">Suggest this Book</li></ul>';

	option_dropdown.innerHTML = dropdown_html;
// saving this for the list above
//<li onclick=window.open("http://books.google.com/books?vid=ISBN' + isbn + '")>Preview on Google</li>

	option_dropdown.style.position='absolute';
	option_dropdown.style.display='';
	option_dropdown.style.width=dropdown_width+'px';
	option_dropdown.style.fontFamily='arial';
	option_dropdown.className = 'option_dropdown';
	option_dropdown.style.right = (140-dropdown_width)+'px';
//	option_dropdown.style.left = (x_offset+22-dropdown_width)+'px';
	option_dropdown.style.top = (y_offset+20)+'px';

	ignore_click = 'true';
}