var ajaxTimeout = 800;
var tipTimeout = 1000;

// A script to cover core part of rendering HelpMe bubble
ajaxAnywhere.showLoadingMessage = function() {}
ajaxAnywhere.handleException = function(type, details) {
	sweetTitles.tipOut(); 
	window.clearTimeout(tID);
	window.clearTimeout(tWT);
	window.clearTimeout(ajax);
}
ajaxAnywhere.handleHttpErrorCode = function(code) {
	sweetTitles.tipOut(); 
	window.clearTimeout(tID); 
	window.clearTimeout(tWT);
	window.clearTimeout(ajax);
}
ajaxAnywhere.handlePrevousRequestAborted = function() {
	sweetTitles.tipOut(); 
	window.clearTimeout(tID); 
	window.clearTimeout(tWT);
	window.clearTimeout(ajax);
}

// Javascript used to render help bubbles.
function showTitleCore (event, helpType, helpCode, oraLang)
{
	//Draw the div at the correct location.
	sweetTitles.tipDraw(event);

	//After delay lookup the HTML for the div.		
	/* WAS change requested 
	 * url = "/nihmc/helpmechoose?type=" + helpType + "&code=" + helpCode + "&lang=" + oraLang;
	 */
	url = "http://" + document.location.hostname + "/nihmc/helpmechoose?type=" + helpType + "&code=" + helpCode + "&lang=" + oraLang;
	ajax = window.setTimeout("ajaxAnywhere.getAJAX('" + url + "')", ajaxTimeout);

	//delay delay before drawing the div.
	tID = window.setTimeout("sweetTitles.tipShow()", tipTimeout);

}
