function del( Obj ) {
	var label = ( Obj.title ) ? Obj.title : 'Etes vous sûr de vouloir supprimer cet élément ?';
	return confirm( label );	
}

function popup( href, name, h, l ) {
	var hauteur = Math.round( ( screen.availHeight - h ) / 2 );
	var largeur = Math.round( ( screen.availWidth - l ) / 2 );
	var popup = window.open( href, name, 'toolbar=0,location=0,directories=0,status=0, scrollbars=1,resizable=1,menubar=0,top='+hauteur+',left='+largeur+',width='+l+',height='+h);
	popup.focus();
	return false;	
}

function popupOrder( Obj ) {
	return popup( Obj.href, 'order', 600, 580 );
}
/*popstatic*/
var w = 650;
var h = 540;
var left = (screen.width-w)/2;
var top = (screen.height-h)/2;

var newwindow;
function poptastic(url)
{
	newwindow=window.open(url,'name','height='+h+',width='+w+',top='+ top +',left='+ left +',center=true');
	if (window.focus) {newwindow.focus()}

}

/*
function addDrug() {
	var drugsTable =  document.getElementById( 'drugs' );
	var tbody = drugsTable.getElementsByTagName( 'tbody' )[0];
	
	var formSelectValues = new Array( '', 'Ampoule buvable', 'Collyre', 'Comprimé', 'Comprimé effervescent', 'Crème', 'Dose homeopath.', 'Gelule', 'Gouttes', 'Injectable', 'Ovule', 'Pommade', 'Poudre',  'Sachet', 'Solution buvable', 'Suppositoire', 'Trituration', 'Tube granules' );

	if( drugsTable ) {	
		var count = tbody.getElementsByTagName( 'tr' ).length;
		var tr = document.createElement( 'tr' );
		
		var td = document.createElement( 'td' );
		var inputCheckbox = document.createElement( 'input' );
		inputCheckbox.setAttribute( 'type', 'checkbox' );
		inputCheckbox.setAttribute( 'name', 'drug[' + count + '][valid]' );
		inputCheckbox.setAttribute( 'value', '1' );
		inputCheckbox.setAttribute( 'checked', 'checked' );
		td.appendChild( inputCheckbox );
		tr.appendChild( td );
		
		var td = document.createElement( 'td' );
		var input = document.createElement( 'input' );
		input.setAttribute( 'type', 'text' );
		input.setAttribute( 'name', 'drug[' + count + '][name]' );
		input.setAttribute( 'value', '' );
		td.appendChild( input );
		tr.appendChild( td );
		
		var td = document.createElement( 'td' );
		var input = document.createElement( 'input' );
		var text = document.createTextNode( ' (en mg)' );
		input.setAttribute( 'type', 'text' );
		input.setAttribute( 'name', 'drug[' + count + '][weight]' );
		input.setAttribute( 'value', '' );
		input.setAttribute( 'size', '6' );
		td.appendChild( input );
		td.appendChild( text );
		tr.appendChild( td );
		
		var td = document.createElement( 'td' );
		
		var select = document.createElement( 'select' );
		select.setAttribute( 'name', 'drug[' + count + '][form]' );
		for( i in formSelectValues ) {
			var formSelectValue = formSelectValues[ i ];
			var option = document.createElement( 'option' );
			var text = document.createTextNode( formSelectValue );
			
			option.setAttribute( 'value', i );
			option.appendChild( text );
			
			select.appendChild( option );
		}
		td.appendChild( select );
		tr.appendChild( td );
		
		var td = document.createElement( 'td' );
		var input = document.createElement( 'input' );
		input.setAttribute( 'type', 'text' );
		input.setAttribute( 'name', 'drug[' + count + '][posology]' );
		input.setAttribute( 'value', '' );
		td.appendChild( input );
		tr.appendChild( td );
		
		tbody.appendChild( tr );
		
		// IE
		inputCheckbox.checked = true;
	}
}
*/
