var tbLoading = "http://www.udea.edu.co/javascript/ext/loading.html"
var thickX = "", thickY = ""

function closeThickbox(){
	tb_remove()
	window.scrollTo(thickX, thickY)
}

function showThickbox(){ openThickbox(tbLoading, 40, 250) }

function openThickbox(url, h, w){
	if(url.indexOf("?") < 0)url+="?"
	else url+="&"

	getThickXY()
	tb_show("", url+"placeValuesBeforeTB_=savedValues&amp;TB_iframe=true&amp;height="+h+"&amp;width="+w+"&amp;modal=true", false);
	window.scrollTo(0, 0)
}

function getThickXY(){
	thickX = (document.all) ? document.body.scrollLeft : window.pageXOffset;
	thickY = (document.all) ? document.body.scrollTop : window.pageYOffset;
}

function closeTB(){ closeThickbox() }

function showTB(){ showThickbox () }

function openTB(url, h, w){ openThickbox(url, h, w) }

function openTBLoadingWindow(w){ window.open(tbLoading, w) }
