function productRatingClass() { this.display = display; this.hide = hide; var floatingLayer = null; var docBody = null; var star = null; function display(e, obj, str) { if(str != "") { star = obj; docBody = document.getElementsByTagName("body")[0]; floatingLayer = document.createElement("div"); floatingLayer.innerHTML = str; floatingLayer.style.position = "absolute"; floatingLayer.style.padding = "8px"; floatingLayer.style.border = "1px solid #AAAAAA"; floatingLayer.style.fontWeight = "bold"; floatingLayer.style.backgroundColor = "#FFFFD5"; floatingLayer.style.left = fLib.getMousePositionX(e) + 10 + "px"; floatingLayer.style.top = fLib.getMousePositionY(e) + 10 + "px"; docBody.appendChild(floatingLayer); fLib.addEvent("mouseout", hide, star); } } function hide() { if(docBody != null && floatingLayer != null) { docBody.removeChild(floatingLayer); floatingLayer = null; fLib.removeEvent("mouseout", hide, star); } } } var productRating = new productRatingClass();