function validaEmail(cadena)
			{
				if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(cadena))
				{
					return true;
				} 
				else	 
				{
					return false;
				}
			}	
		
			function validarForm(valor)
			{
				if ((valor.frmNombre.value == 'Tu Nombre') || (valor.frmNombre.value == ''))
				{
					alert("Debes Ingresar tu Nombre");
					valor.frmNombre.focus();
					return false;
				}
		  
				if (!validaEmail(valor.frmRemitente.value))					
				{
					alert("Ingresa tu direccion de e-mail correctamente!");
					valor.frmRemitente.focus();
					return false;
				} else correcto = 0;
		
				
				if (valor.frmReceptor1.value != 'Email de tu amigo 1') 
				{  
					if (validaEmail(valor.frmReceptor1.value))
					{
						correcto=1
					} 
					else 
					{
						alert("Ingresa la direccion de e-mail de tu amigo 1 correctamente!");
						valor.frmReceptor1.focus();
						return (false);
					}
				}
				
				if (valor.frmReceptor2.value != 'Email de tu amigo 2') 
				{  
					if (validaEmail(valor.frmReceptor2.value))
					{
						correcto=1
					} 
					else 
					{
						alert("Ingresa la direccion de e-mail de tu amigo 2 correctamente!");
						valor.frmReceptor2.focus();
						return (false);
					}
				}
				
				if (valor.frmReceptor3.value != 'Email de tu amigo 3') 
				{  
					if (validaEmail(valor.frmReceptor3.value))
					{
						correcto=1
					} 
					else 
					{
						alert("Ingresa la direccion de e-mail de tu amigo 3 correctamente!");
						valor.frmReceptor3.focus();
						return (false);
					}
				}
				
				if (valor.frmReceptor4.value != 'Email de tu amigo 4') 
				{  
					if (validaEmail(valor.frmReceptor4.value))
					{
						correcto=1
					} 
					else 
					{
						alert("Ingresa la direccion de e-mail de tu amigo 4 correctamente!");
						valor.frmReceptor4.focus();
						return (false);
					}
				}
				
				if (valor.frmReceptor5.value != 'Email de tu amigo 5') 
				{  
					if (validaEmail(valor.frmReceptor5.value))
					{
						correcto=1
					} 
					else 
					{
						alert("Ingresa la direccion de e-mail de tu amigo 5 correctamente!");
						valor.frmReceptor5.focus();
						return (false);
					}
				}
				
				if (valor.frmReceptor6.value != 'Email de tu amigo 6') 
				{  
					if (validaEmail(valor.frmReceptor6.value))
					{
						correcto=1
					} 
					else 
					{
						alert("Ingresa la direccion de e-mail de tu amigo 6 correctamente!");
						valor.frmReceptor6.focus();
						return (false);
					}
				}
				
				if (valor.frmReceptor7.value != 'Email de tu amigo 7') 
				{  
					if (validaEmail(valor.frmReceptor7.value))
					{
						correcto=1
					} 
					else 
					{
						alert("Ingresa la direccion de e-mail de tu amigo 7 correctamente!");
						valor.frmReceptor7.focus();
						return (false);
					}
				}
				
		
				if (correcto==0) 
				{
					alert ("Debes de ingresar por lo menos un amigo para retar!");
					valor.frmReceptor1.focus();
					return false;
				}
			}
		
			
			function popUP(direccion)
			{
				window.open(direccion,"pollwin","toolbar=no,scrollbars=no,directories=no, status=no,menubar=no,resizable=no,width=350,height=150");
			}

			function validarViral(tipoEnvio)
			{
				flag=1;
				if (document.formViral.usuario.value=="" || document.formViral.usuario.value=="usuario") 
				{
					alert ('Debes de ingresar tu usuario');
					document.formViral.usuario.focus();
					flag=0;
				}
				if (document.formViral.pass.value=="" || document.formViral.pass.value=="contrasena") 
				{
					alert ('Debes de ingresar tu password');
					document.formViral.pass.focus();
					flag=0;
				}
			
			if (tipoEnvio=='1')
			document.formViral.Enviar.value='1';
			
			if (flag==1)
			document.formViral.submit();
			}
			
			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 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_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 writeIntoObject(text,id)
			{
				if (document.getElementById)
				{
					x = document.getElementById(id);
					x.innerHTML = '';
					x.innerHTML = text;
				}
				else if (document.all)
				{
					x = document.all[id];
					x.innerHTML = text;
				}
				else if (document.layers)
				{
					x = document.layers[id];
					text2 =  text ;
					x.document.open();
					x.document.write(text2);
					x.document.close();
				}
			}

			function mostrarDiv(element) {
				var sele;

				if (typeof element == 'string')
				{
					sele = document.getElementById(element);

					if (sele.style.display == '')  
						document.getElementById(element).style.display = 'block';
					else
						document.getElementById(element).style.display = '';				
				}
			}
			
			
var lastRanked = 0;
  function PaintStars(number){
	for ( i=1 ; i<=number ; i++ ) {
	  var image = document.getElementById("star" + i);
	  image.src = "http://www.lopeor.com/images/lopeor-star-vote-onn.gif";
	}
	for ( ; i<=5 ; i++ ) {
	  var image = document.getElementById("star" + i);
	  image.src = "http://www.lopeor.com/images/lopeor-star-vote-offn.gif";
	}
  }//PaintStars
																			
  function RecoverLastRanked(){
	PaintStars(lastRanked);
  }
  
  
function layerup () {
	var url = "http://www.ganaipods.com/index.php?broker_id=54"; 
	var popname = "GanaIpods";
	var hgt = 800;
	var wdt = 800;
	var epl_rndP=(new String(Math.random())).substring(2,11);
	var sw = self.innerWidth ? self.innerWidth : (document.documentElement && document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body ? document.body.clientWidth : wdt;
	var sh = self.innerHeight ? self.innerHeight : (document.documentElement && document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body ? document.body.clientHeight : hgt;
	var w2=window.open(url, popname, 'toolbar=no,status=no,scrollbars=yes,menubar=no,directories=no,location=no,resizable=yes,width='+  wdt + ',height=' + hgt + ',left='+(sw/2-230)+',top='+(sh/2-252));
	if (w2) {
	w2.blur();
	w2.focus();
	//window.focus();
	} else {
	document.write('<obj'+'ect id=s codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height=1 width=1 classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME="movie" VALUE="http://landings.sugeridos.com/jsincludes/fclick.swf"> <param name="flashvars" value="url='+ url + '"><PARAM NAME="quality" VALUE="high"><em'+'bed src="http://landings.sugeridos.com/jsincludes/fclick.swf" flashvars="' + url +'" quality="high" bgcolor="#ffffff" width=1 height=1 name="s" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></obj'+'ect>');
	}
}	
