function stopError() { return true; } window.onerror = stopError; var RATING_IMG = "http://www.dnlodge.com/_global/frontend/rate_dark_full.jpg"; var RATING_IMG_EMPTY = "http://www.dnlodge.com/_global/frontend/rate_dark_empty.jpg"; dn_session = ""; dn_url = "http://www.dnlodge.com"; function rating(objectName) { this.maxStars = 5; this.objectName = objectName; this.starTimer = null; this.starCount = 0; (new Image()).src = RATING_IMG; function showStars(starNum) { this.clearStarTimer(); this.greyStars(); this.colorStars(starNum); } function colorStars(starNum) { for (var i=0; i < starNum; i++) { document.getElementById('star__'+(i+1)).src = RATING_IMG; } } function greyStars() { for (var i=0; i < this.maxStars; i++) if (i <= this.starCount) { document.getElementById('star__'+(i+1)).src = RATING_IMG_EMPTY; } else { document.getElementById('star__'+(i+1)).src = RATING_IMG_EMPTY; } } function setStars(starNum) { this.starCount = starNum; this.drawStars(starNum); $j.post(dn_url+"/ajax/"+dn_session+"/save_rating", { content_id: 256, rating: starNum }, function(result){ //alert(result); data = result.split("|"); if(data[0] == "OK") { document.getElementById('ratethis').innerHTML = '