var timeoutID;
var popupVisible = false;

function delayedPopup(title, text, style) {
	var style = (style == null) ? popupStyle : style;
	if(popupVisible==false){
		popupVisible=true;

		if(popupDelay==0){
			stm([title, text],style);
		}
		else{
			timeoutID = showPopup.delay(popupDelay);
			stm2([title, text],style);
		}
	}
}

function showPopup() {
	view=1;
	ViewTip();
}

function hidePopup() {
	htm();
	popupVisible=false;
}

function hideAndClearPopup() {
	window.clearTimeout(timeoutID);
	htm();
	popupVisible=false;
}

