function refreshParent() {
  window.opener.location.href = window.opener.location.href;

  if (window.opener.progressWindow)
		
 {
    window.opener.progressWindow.close()
  }
  window.close();
}
function verify () {
			
			  	var _type=document.Search.elements['annonceur'].value;
			  	if(_type!='')
			  	{
			  	var adresse= "cupon-descuento_"+ _type + ".html" ;
			 
					  	window.setTimeout("document.location = '" +adresse +   "'", 0000);
			  }
			else alert('Gracias de indicar el nombre de la tienda !');
			}
function submitform() {
    	if  (document.f1.email.value=='')
			{
  				alert("Este email no esta correcto");
				return false;	
			}
		else if(document.f1.sexe.value==0)
			{
  				alert("Gracias de indicar tu tratamiento");
				return false;	
			}
		else {
  				if ( ((document.f1.email.value.indexOf('@',1))==-1)||(document.f1.email.value.indexOf('.',1))==-1 )
					{
  					alert("Este email no esta correcto");
					return false;	
					}

  				else {
                        window.open("", "formPopup", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,height=200,width=500,toolbar=no", true); 
                        document.f1.target='formPopup';
						document.f1.action='http://www.cupon-descuento.com/newsletter.php';
  						document.f1.submit();
                     }
  		}
  }	
  function Pop(id){
  
  	 window.open ('dar-opinion_cupon_'+ id + '.html', 'avis', config='height=200, width=420, location = no, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
  	
  }
  function PopComment(id){
  
  	 window.open ('dar-comentario_cupon_'+ id + '.html', 'avis', config='height=300, width=520, location = no, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
  	
  }
  function PopShowComments(id){
  
  	 window.open ('ver-comentario_cupon_'+ id + '.html', 'avis', config='height=300, width=420, location = no, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no')
  	
  }
  function closeRefresh() {  
   window.opener.refresh();  //refreshes window

	window.close(); //closes window

	}

function submitformsponsor() 
{
    	if  (document.f1.mailparrain.value=='')
			{
  				alert("Gracias de indicar tu email.");
				return false;	
			}
		else if(document.f1.prenomparrain.value=='')
			{
  				alert("Gracias de indicar tu nombre");
				return false;	
			}
		else if ( ((document.f1.mailparrain.value.indexOf('@',1))==-1)||(document.f1.mailparrain.value.indexOf('.',1))==-1 )
					{
  					alert("Este email no esta correcto. Necesitas corregirlo.");
					return false;	
					}
		else if ( (document.getElementById("amis[1]").value=='') &&  (document.getElementById("amis[2]").value=='') &&  (document.getElementById("amis[3]").value=='') &&  (document.getElementById("amis[4]").value=='') &&  (document.getElementById("amis[5]").value=='') )
					{
					alert("Gracias de indicar a lo menos un email de un(a) amigo(a).");
					return false;	
					}
		else if ( (document.getElementById("amis[1]").value!='') && (((document.getElementById("amis[1]").value.indexOf('@',1))==-1)||(document.getElementById("amis[1]").value.indexOf('.',1))==-1) )
					{
					alert("El email 1 de su amigo(a) no esta correcto. Necesitas corregirlo.");
					return false;	
					}
				
		else if ( (document.getElementById("amis[2]").value!='') && (((document.getElementById("amis[2]").value.indexOf('@',1))==-1)||(document.getElementById("amis[2]").value.indexOf('.',1))==-1) )
					{
					alert("El email 2 de su amigo(a) no esta correcto. Necesitas corregirlo.");
					return false;	
					}
				
		else if ( (document.getElementById("amis[3]").value!='') && (((document.getElementById("amis[3]").value.indexOf('@',1))==-1)||(document.getElementById("amis[3]").value.indexOf('.',1))==-1) )
					{
					alert("El email 3 de su amigo(a) no esta correcto. Necesitas corregirlo.");
					return false;	
					}
				
		else if ( (document.getElementById("amis[4]").value!='') && (((document.getElementById("amis[4]").value.indexOf('@',1))==-1)||(document.getElementById("amis[4]").value.indexOf('.',1))==-1) )
					{
					alert("El email 4 de su amigo(a) no esta correcto. Necesitas corregirlo.");
					return false;	
					}
				
		else if ( (document.getElementById("amis[5]").value!='') && (((document.getElementById("amis[5]").value.indexOf('@',1))==-1)||(document.getElementById("amis[5]").value.indexOf('.',1))==-1) )
					{
					alert("El email 5 de su amigo(a) no esta correcto. Necesitas corregirlo.");
					return false;	
					}
		else {
                        document.f1.action='http://www.cupon-descuento.com/parrainage.php';
  						document.f1.submit();
               }
}

function affichage_popup(nom_de_la_page, nom_interne_de_la_fenetre)
{
	window.open ('respect_vie_prive.htm', 'respect_vie_prive', config='height=500, width=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
}