confirmer={
	element:"",
	setElement:function(el){this.element=el;},
	getElement:function(){return this.element},
	submitConfirm:function(){
		var el=$.confirmer.getElement();
		if ($.confirmer.getElement().tagName=="A"){				
			document.location.href=el;
		};
		if ($.confirmer.getElement().tagName=="INPUT"){
			$.confirmer.getElement().form.submit();
		}
	}
};

$.confirmer=confirmer;

	$.fn.confirmer=function(){
		return this.each(function(){
			$(this).click(function(){
			$.confirmer.setElement(this);
			$("<div id='conf_id'></div>").appendTo("body");			
			$("#conf_id").html("<span style='position:absolute; width:400px; text-align:center; overflow:auto; '>"+(!$(this).attr("title")?"Delete, really?":$(this).attr("title"))+"</span><br/><br/><span style='position:absolute; width:400px; text-align:center; '><input type='button' value='&nbsp;&nbsp;&nbsp;&nbsp;Ok&nbsp;&nbsp;&nbsp;&nbsp;' onclick='$.confirmer.submitConfirm();$(\"#conf_id\").remove();'/>&nbsp;&nbsp;&nbsp;<input type='button' value='&nbsp;Cancel&nbsp;' onclick='$(\"#conf_id\").remove();tb_remove();'></span>");
			tb_show("","#TB_inline?height=100&width=450&inlineId=conf_id&modal=true",false);
			return false;
		});	
		});
	}