// reference local blank image
Ext.BLANK_IMAGE_URL = '../js/resources/images/default/s.gif';


function	show_notification()
{
	if (Ext.MessageBox.isVisible() == true)
	{
		Ext.MessageBox.hide();
	}
	else
	{
		Ext.MessageBox.show({
		   msg: 'Saving your data, please wait...',
		   progressText: 'Saving...',
		   width:300,
		   wait:true,
		   waitConfig: {interval:200},
		   icon:'ext-mb-download' //custom class in msg-box.html
		});
	}
}

function	show_valide(title, msg)
{
	/*
	if (Ext.MessageBox.isVisible() == true)
	{
		Ext.MessageBox.hide();
	}
	else
	{
		Ext.MessageBox.show({
			title: title,
			msg: msg,
			progressText: 'Saving...',
			width:300,
			wait:true,
			waitConfig: {interval:200},
			icon:'ext-mb-download' //custom class in msg-box.html
		});
	}
	*/
}

function	show_error(msg, title)
{
	title = title || 'Erreur';
	Ext.Msg.show({
		title:title
		,msg:msg
		,modal:true
		,icon:Ext.Msg.ERROR
		,buttons:Ext.Msg.OK
	});
}

function ShowFlash(swf, hauteur, largeur, alternatif)
{
	document.write('<object type="application/x-shockwave-flash" data="'+swf+'" width="'+hauteur+'" height="'+largeur+'">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+swf+'" />');
	document.write('<param name="quality" value="hight" />');
	document.write('<param name="WMode" value="Transparent" />');	
	document.write(alternatif);
	document.write('</object>');
}


if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment)
{    
	Range.prototype.createContextualFragment = function(html){var frag = document.createDocumentFragment(),div = document.createElement("div");frag.appendChild(div);div.outerHTML = html;return frag;};
}

