function EnviarCorreoEntorno(local)
 {
	var SubjectMail = "";
	
	switch (local) {
		case "spain":
			SubjectMail= "Proteger tu PC con Panda no te costará nada";
			break;
		default:
			SubjectMail= "Protecting your PC with PANDA won't cost a thing";
			break;
		}

	if (local!="" && local!=null) {	
		local = local + "/";
	}
	else {
		local = "";}
	
 	var texto = location.href;
	window.open('http://www.pandasecurity.com/'+local+'utilities/EnviarAmigo/EnviarPagina.htm?SubjectMail='+ URLEncodeClientCorreo(SubjectMail) + '&texto=' + URLEncodeClientCorreo(texto),'Enviar_a_un_amigo' ,'resizable=no,width=295,height=450,left=0, top=0');
 }

function URLEncodeClientCorreo(texto)
	{
	        var re;
	 
	        texto = texto.replace(/xE9/g, "%E9");
	        texto = texto.replace(/xED/g, "%ED");
	        texto = texto.replace(/xF3/g, "%F3");
	        texto = texto.replace(/xFA/g, "%FA");
	        texto = texto.replace(/xC1/g, "%C1");
	        texto = texto.replace(/xC9/g, "%C9");
	        texto = texto.replace(/xCD/g, "%CD");
	        texto = texto.replace(/xD3/g, "%D3");
	        texto = texto.replace(/xDA/g, "%DA");
	        texto = texto.replace(/xA1/g, "%A1");
	        texto = texto.replace(/xBF/g, "%BF");
	        texto = texto.replace(/xF1/g, "%F1");
	        texto = texto.replace(/xD1/g, "%D1");
	 
	        re= new RegExp("\"","g");
	        texto = texto.replace(re, "%22");
	        re= new RegExp("'","g");
	        texto = texto.replace(re, "%27");
	        re= new RegExp("&","g");
	        texto = texto.replace(re, "%26");
	        re= new RegExp("/","g");
	        texto = texto.replace(re, "%2F");
	        texto = texto.replace(/\\/g, "%5C");
	        return (texto);
}

