function jconfirm(title, value, callback, params){
	var top=(document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop;
	var screen=screenSize();
	$('#dialog').css('top', top+screen['h']/2-50).show();
	$('#dialog_title').text(title);
	$('#dialog_content').html(value+'<br><br><input type="submit" value="ÎÊ" id="dialog_ok"> &nbsp; <input type=button value="Îòìåíà" id="dialog_cancel">');
	$('#dialog_ok').click(function(){$('#dialog').hide();callback(true, params);});
	$('#dialog_cancel').click(function(){$('#dialog').hide();callback(false, params);});
}

function init_dialogs(){	$().ready(function(){$('body').append('<div id="dialog"><div id="dialog_title"></div><div id="dialog_content"></div></div>');});}

init_dialogs();
