var MODIF ;

function modif() {
	MODIF = 1 ;
//			alert('modif !') ;
}

		
function testandgo(url) {
	if (MODIF) {
		if (confirm("Attention !\nVous n'avez pas enregistré vos dernières modifications !\nEtes-vous sûr de vouloir quitter cette page sans enregistrer ?")) {
			document.forms['F'].action = url ;
			document.forms['F'].submit() ;
			document.forms['F'].target='_self';
			document.forms['F'].op.value='';
		}
	}
	else {
			document.forms['F'].action = url ;
			document.forms['F'].submit() ;
			document.forms['F'].target='_self';
			document.forms['F'].op.value='';
	}
}
	


function chop(valeur) {
	document.forms['F'].op.value = valeur ;
}


function op(valeur) {
	document.forms['F'].op.value = valeur ;
}


function setfv(field, valeur) {
//	alert(field+' : '+valeur) ;
	document.forms['F'][field].value = valeur ;
}


function selectRadio(inputName, radioValue) {
	radios = document.forms['F'][inputName] ;
	var i = 0 ;
	do {
		if (radios[i].value == radioValue) {
			radios[i].checked = true ;
			break ;
		}
	} while (++i < radios.length) ;
}


function selectOption(inputName, optionValue) {
	optionList = document.forms['F'][inputName] ;
	var i = 0 ;
	do {
		if (optionList[i].value == optionValue) {
			optionList[i].selected = true ;
			break ;
		}
	} while (++i < optionList.length) ;
}


function getSelectedOption(inputName) {
	optionList = document.forms['F'][inputName] ;
	var i = 0 ;
	do {
		if (optionList[i].selected) {
			break ;
		}
	} while (++i < optionList.length) ;
	return optionList[i].value ;
}


function popup(url, nom, params, largeur, hauteur) {
	
	w = window.open(url, nom, params+',width='+largeur+',height='+hauteur+',top='+((screen.height-hauteur)/2)+',left='+((screen.width-largeur)/2)) ;
	w.focus() ;

}
