	
	
	var reloadPageOnClose = false;
	
	function doReloadOnClose()
	{
		reloadPageOnClose = true;
	}
	
	function closeThickbox()
	{
		if (reloadPageOnClose)
			reloadPage();
		tb_remove();
		return false;
	}
	
	function ask_to_verify_language(baseHref, suspectedLanguageCode, inputIdForChosenLanguageCode)
	{
		var tbVars = "TB_iframe=true&height=200&width=350&modal=true";
		tb_show("Choose Language", baseHref + (baseHref.charAt(baseHref.length-1) == "/" ? "" : "/") + "choose_language.php?s=" + suspectedLanguageCode + "&id=" + inputIdForChosenLanguageCode + "&" + tbVars, null);
	}
	
	function language_verified(languageCode, inputIdForChosenLanguageCode)
	{
		closeThickbox();
		$("#" + inputIdForChosenLanguageCode).val(languageCode);
		$("#" + inputIdForChosenLanguageCode)[0].form.submit();
	}
	
/**
	
	IMPORTANT:  thickbox.js was altered to call the below function to return the string
		to append to the bottom of the <body> when clicking thickbox.
		
	
	This line (line 43):
		$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
	
	Was replaced with this:
		$("body").append("<div id='TB_overlay'></div>" + getCustomThickbox());
	
	I also added two functions:
	
		function getTBWindowId();
		function getTBContentId();
	
	Which are called to get the window id (for the div that the stylesheet is styling), and the
	content id (for the div that content will be appended to).  These functions are defined in
	this file.
	
	Therefore, the getCustomThickbox() function MUST return a div with each of these ids being defined,
	where the outermost div should have the window id, and the innermost (likely) will have the content id.
	
	
	
	I also changed:
	
		function tb_position() {
		$("#" + getTBWindowId()).css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
		    if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
		        $("#" + getTBWindowId()).css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
		    }
		}
		
		
		
	to:
	
		function tb_position() {
		$("#" + getTBWindowId()).css({marginLeft: '-' + parseInt(((TB_WIDTH + getCustomWidthDifferential()) / 2),10) + 'px', width: (TB_WIDTH + getCustomWidthDifferential()) + 'px'});
		    if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
		        $("#" + getTBWindowId()).css({marginTop: '-' + parseInt(((TB_HEIGHT + getCustomHeightDifferential()) / 2),10) + 'px'});
		    }
		}
	
	
	
*/


	// I have changed the thickbox.css stylesheet to style a div with id TB_cityspeek instead of TB_window,
	function getTBWindowId() { return "TB_cityspeek"; }
	
	//this is the id for the dom object that we append content to
	function getTBContentId() { return "TB_window"; }
	
	
	
	
	
	function getCustomThickbox()
	{
		
		return '' +
			'<div id="TB_cityspeek">' +
				'<table class="thin_white_border_grey_bg_transparent" cellpadding="0" cellspacing="0" border="0">' +
				    '<tr>' +
				        '<td class="top_left"></td>' +
				        '<td class="top"></td>' +
				        '<td class="top_right"><a href="" onclick="return closeThickbox();" style="display: block; width: 56px; height: 48px;"></a></td>' +
				    '</tr>' +
				    '<tr>' +
				        '<td class="left"></td>' +
				        '<td class="main_cell">' +
				        	'<div class="border_padding">' +
				        		'<div id="TB_window"></div>' +
				            '</div>' +
				        '</td>' +
				        '<td class="right"></td>' +
				    '</tr>' +
				    '<tr>' +
				        '<td class="bottom_left"></td>' +
				        '<td class="bottom"></td>' +
				        '<td class="bottom_right"></td>' +
				    '</tr>' +
				'</table>' +
			'</div>';
		
	}
	
	
    function getCustomWidthDifferential() { return (55 + 56); }
    function getCustomHeightDifferential() { return (41 + 48); }