function checkNlt(langue) 
{
	if (document.frmsendmail._email.value=='')
	{
			if (langue == 'fr') 
			{
				alert('Veuillez renseigner votre adresse e-mail');
			}
			if (langue == 'us') 
			{
				alert('Plase fill in your e-mail');
			}
		document.frmsendmail._email.focus();
		return;
	}
document.frmsendmail.submit();
}

function init()
{
	document.frmprdsearch.localisation_principale.selectedIndex = 0;
	document.frmprdsearch.s_prd_Localisation.value = '';
	

	for (i=0;i<document.frmprdsearch.localisation_principale.length;i++)
	{
		if (document.frmprdsearch.elements['localisation_'+document.frmprdsearch.localisation_principale[i].value]!=null)
		document.frmprdsearch.elements['localisation_'+document.frmprdsearch.localisation_principale[i].value].selectedIndex = -1;
	}
}

function selectRegion(champ)
{
var choix = '';
	for (i=0;i<champ.length;i++)
	{
		if (champ.options[i].selected)
		{
			if (choix == '') choix = champ.options[i].value;
			else choix = choix + "," + champ.options[i].value;
		}
	}
	if (choix == '')
	{
		document.frmprdsearch.s_prd_Localisation.value=document.frmprdsearch.localisation_principale[document.frmprdsearch.localisation_principale.selectedIndex].value+'|0';
	}
	else document.frmprdsearch.s_prd_Localisation.value=choix;

}

function agyGo(agyId)
{
	if (agyId != 0)	{
		document.frmAgy.agy_detail_id.value=agyId;
		document.frmAgy.submit();
	}
}
	

function defiler() 
{
	var aleatoire = Math.random() * nbrlayers;
	aleatoire = Math.floor(aleatoire);

	if ((aleatoire != 0) && (aleatoire != nbrlayers))
	{
		document.getElementById('divprd'+aleatoire).style.display='';

		for (i=1;i<=nbrlayers;i++)
		{
			if (i != aleatoire)
			{
				var oDiv = document.getElementById('divprd'+i)
				if ( oDiv != null ) 
				{
					oDiv.style.display='none';
				}
			}
		}
	}
}

						function prices() 
						{
						var selection = document.frmprdsearch.selectPrices[document.frmprdsearch.selectPrices.selectedIndex].value;
						selection = selection.split('|');
						document.frmprdsearch.s_prd_Price1_min.value=selection[0];
						document.frmprdsearch.s_prd_Price1_max.value=selection[1];
						}
						


function checkForm(quoi,langue) 
{
	if ((quoi != 'noname') && (quoi != 'noname2')) 
	{
		if (document.frmsendmail._nom.value=='')
		{
			if (langue == 'fr') 
			{
				alert('Veuillez renseigner votre nom');
			}
			if (langue == 'us') 
			{
				alert('Plase fill in your name');
			}
			document.frmsendmail._nom.focus();
			return;
		}
	}
	if (quoi == 'noname2') 
	{
		if (document.frmsendmail._email_ami.value=='')
		{
			if (langue == 'fr') 
			{
				alert('Veuillez renseigner l\'adresse e-mail du destinataire');
			}
			if (langue == 'us') 
			{
				alert('Plase fill the e-mail');
			}
			document.frmsendmail._email_ami.focus();
			return;
		}
	}

	if (document.frmsendmail._email.value=='')
	{
			if (langue == 'fr') 
			{
				alert('Veuillez renseigner votre adresse e-mail');
			}
			if (langue == 'us') 
			{
				alert('Plase fill in your e-mail');
			}
		document.frmsendmail._email.focus();
		return;
	}
document.getElementById('layfrm').style.display='none';
document.getElementById('laywait').style.display='';
document.frmsendmail.submit();
}





function popup(page) {

window.open(page,'','width=550,height=600,scrollbars=yes');

}

