function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function valide_form(kre1)
{
	if(kre1 == 3 && document.getElementById('aucun_metier') && document.getElementById('aucun_metier').selected == true)
	{
		alert('Si aucun métier ou aucun formulaire ne correspond à votre situation, merci de nous faire part de votre souhait par mail (contact@quotatis.com) ou en nous appelant au 01 46 04 02 22. Nous nous ferons un plaisir d’étudier avec vous la possibilité de créer rapidement les outils correspondant à votre besoin.');
	}
	else
	{
		if( kre1 == 2 && ((document.getElementById('couv_2') && document.getElementById('couv_2').checked == true && !region_sel()) ||
			(document.getElementById('couv_3') && document.getElementById('couv_3').checked == true && !dept_sel() ) ))
		{
			alert('Vous devez sélectionner des éléments');
		}
		else
		{
			if( kre1 == 2 && (document.getElementById('couv_4') && document.getElementById('couv_4').checked == true ) && ((document.getElementById('vact_aff') && document.getElementById('vact_aff').innerHTML=='&nbsp;<b></b>') ||(document.getElementById('ract') && document.getElementById('ract').value=='')))
			{
				alert('Vous devez choisir une ville et un rayon d\'action');
			}
			else
			{
				document.form.etape.value = kre1;
				document.form.submit();
			}
		}
	}
}

function eff_champ(chmp,val)
{
	if(chmp.value == val)
	{
		chmp.value = "";
	}
}

function jvsPOPUPwebcallback_ok()
{
	window.open("./pops/pop.php", "popuplinkeo", "width=400,height=370,top=5,left=5,toolbar=no,location=no, directories=no,status=no,scrollbars=no,resizable=1");
}


function addFavorite() {

	qtitle = "Quotatis : Affiliate Program";

	if( window.sidebar && window.sidebar.addPanel ) {
		//Gecko (Netscape 6 etc.) - add to Sidebar
		window.sidebar.addPanel(qtitle,'http://www.quotatispro.co.uk', '' );
	} else if( window.external && ( navigator.platform == 'Win32' ||
		  ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
		//IE Win32 or iCab -
		window.external.AddFavorite('http://www.quotatis.co.uk',qtitle);
	} else if( window.opera && window.print ) {
		//Opera 6+ - add as sidebar panel to Hotlist
		return true;
	} else if( document.layers ) {
		//NS4 & Escape - tell them how to add a bookmark quickly (adds current page,
		//not target page)
		window.alert( 'Please click OK then press Ctrl+D to create a bookmark' );
	} else {
		//other browsers - tell them to add a bookmark (adds current page, not target page)
		window.alert( 'Please use your browser\'s bookmarking facility to create a bookmark' );
	}
	return false;
}