// JavaScript Document
function CheckFields(field) {

	var IdHeading = document.getElementById('IdHeading').value;
	var OldIdHeading = document.getElementById('OldIdHeading').value;

	var TypeAdd = document.getElementById('TypeAdd').value;
	var OldTypeAdd = document.getElementById('OldTypeAdd').value;
	
	var Price = document.getElementById('Price').value;
	var OldPrice = document.getElementById('OldPrice').value;
	

	SendForm = false;
		
	// ON VERIFIE SI LE PAYS A CHANGE
	if(field == "IdHeading"){
		
		if(IdHeading != OldIdHeading){
			SendForm = true;
		}
		
	}

	// ON VERIFIE SI LE TYPE DE RECHERCHE A CHANGE
	if(field == "TypeAdd"){
		if(TypeAdd != OldTypeAdd){
			SendForm = true;
		}
		
	}
	
	if(field == "Price"){
		if(Price != OldPrice){
			SendForm = true;
		}
		
	}

	if(SendForm == true) {
		document.getElementById('sqlsearch').value = "yes";
		document.getElementById('forms').submit();
		
		
	}

}
