//function uniqid() {
//	var newDate = new Date;
//	return newDate.getTime();
//}


function showMessage(title, message, type) {
	content = "";
	if (title) {
		content += "<h1>"+title+"</h1>";
	}
	if (message) {
		content += "<p>"+message+"</p>";
	}
	className = "alert";
	if (type) {
		className += " "+type;
	}
	newAlert = $("<div class='"+className+"'>"+content+"</div>");
	$("#alerts_holder").prepend(newAlert);
	newAlert.oneTime(3000, function() {
		$(this).fadeOut('normal');
	});

//	var uniq = uniqid();
//	newAlert = "<div id='"+uniq+"' class='"+className+"'>"+content+"</div>";
//	var ah = document.getElementById('alerts_holder');
//	ah.innerHTML = newAlert+ah.innerHTML;
//	setTimeout(function(){ ah.removeChild(document.getElementById(uniq)) }, 3000);

//	newAlert.fadeIn('fast', function() {
//		$(this).oneTime(3000, function() {
//			$(this).fadeOut('normal');
//		});
//	});
} 

function confirmCall() {
	if (confirm(arguments[0])) {
		var func = arguments[1];
	
		var src = "";
	    for(var i=0; i<arguments.length-2; i++) {
	    	if (i!=0) {
	    		src += "','";
	    	}
	        src += arguments[i+2];
	    }
	
	    src = func+"('"+src+"');";
	    eval(src);
	}
}

