	function create_bookmark(title,url) {
		url = document.location.href;//.replace(/[a-z]+\.html/, "index.html");
		title = document.title;
		if (window.sidebar) // firefox
			window.sidebar.addPanel(title, url, "");
			else if(window.opera && window.print){ // opera
			var elem = document.createElement('a');
			elem.setAttribute('href',url);
			elem.setAttribute('title',title);
			elem.setAttribute('rel','sidebar');
			elem.click();
		} else if(document.all)		// ie
			window.external.AddFavorite(url, title);
	}
	
	function rate(rating, scene_id) {
		$("#rating_" + scene_id + " a").remove();
		$.post("/ajax/action_rating.php", {item_id: scene_id, type_id: 5, rating: rating}, function (data) {
			$("#rating_" + scene_id + " .filled").
				css("width", Math.round(data.avg_vote * 20) + "%").
				removeClass("filled").
				addClass("voted");
			
			var text = $("#rating_" + scene_id).next();
			var numb = text.html().match(/\d+/);
			if (text.html() == "(Not Rated)")
				text.html("(1 Vote)");
			else
				text.html("(" + (parseInt(numb) + 1) + " Votes)");
			alert(data.message);
		}, "json");
	}
