var bubble_tip = {};

bubble_tip.show = function(html,top,left, width, height, bubbleimg, bubbleshadowimg, tipclass) {
	bubble_tip.box = document.createElement("div");
	bubble_tip.box.className = tipclass;  // either "bubble_tip" or "member_tip"
	bubble_tip.box.innerHTML = html;
	if(navigator.userAgent.indexOf('MSIE') >= 0) {
		bubble_tip.shadow = document.createElement("div");
		bubble_tip.shadow.style.cssText = "width: "+ width + "px; height: " + height + "px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='" + bubbleshadowimg + "', sizingMethod='scale')";
		bubble_tip.box.style.cssText = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='" + bubbleimg + "', sizingMethod='scale')";
	}else{
		bubble_tip.shadow = document.createElement("img");
		bubble_tip.shadow.src = bubbleshadowimg;
		bubble_tip.box.style.cssText = "background: transparent url(" + bubbleimg + ") no-repeat scroll 0%;";
	}
	bubble_tip.box.style.top = top + "px";
	bubble_tip.box.style.left = left + "px";
	bubble_tip.shadow.style.position = "absolute";
	bubble_tip.shadow.style.top = (parseFloat(bubble_tip.box.style.top) + 10) + "px";
	bubble_tip.shadow.style.left = (parseFloat(bubble_tip.box.style.left) + 5) + "px";
	document.body.appendChild(bubble_tip.shadow);
	document.body.appendChild(bubble_tip.box);
}

bubble_tip.hide = function() {
	if(bubble_tip.shadow) document.body.removeChild(bubble_tip.shadow);
	if(bubble_tip.box) document.body.removeChild(bubble_tip.box);
}

bubble_tip.showhide = function(s, l, html, top, left, width, height, bubbleimg, bubbleshadowimg, tipclass, poplocation) {
	setTimeout(function() {
		bubble_tip.show(html,top,left,width,height, bubbleimg, bubbleshadowimg, tipclass);
		setTimeout(function() {
			bubble_tip.hide();
		}, l);
	}, s);
}
