function init()
{
	optionTest = true;
	lgth = document.forms[0].departement.options.length - 1;
	document.forms[0].departement.options[lgth] = null;
	if (document.forms[0].departement.options[lgth]) optionTest = false;
	getDepartement();
}

function populate(selected)
{
	if (!optionTest) return;
	var box = document.forms[0].CODPAY;
	var number = box.options[box.selectedIndex].value;
	if (!number) return;
	var list = frames['departement_get'].store[0];
	var box2 = document.forms[0].departement;
	box2.options.length = 0;
	for(i=0;i<list.length;i+=2)
	{
		box2.options[i/2] = new Option(list[i],list[i+1]);

		if (list[i+1] == selected){
			box2.selectedIndex = i/2;
		}

	}
	
}

